[svn r16212] Little fix to author field edition

skala
Yannick Warnier 17 years ago
parent 52f4a42927
commit e80cf0996d
  1. 5
      main/newscorm/lp_controller.php

@ -577,8 +577,13 @@ switch($action)
$_SESSION['oLP']->set_name($_REQUEST['lp_name']);
$author= $_REQUEST['lp_author'];
//fixing the author name (no body or html tags)
if( stripos($author) != 0 ) {
$len = strripos($author,'</p>')-stripos($author,'<p>');
$author_fixed=substr($author,stripos($author,'<p>'), $len+4);
} else {
$len = strripos($author,'</body>')-stripos($author,'<body>');
$author_fixed=substr($author,stripos($author,'<body>'), $len+7);
}
$_SESSION['oLP']->set_author($author_fixed);
$_SESSION['oLP']->set_encoding($_REQUEST['lp_encoding']);

Loading…
Cancel
Save