From e80cf0996d114825515aa8a0de20d49a4a6064b3 Mon Sep 17 00:00:00 2001 From: Yannick Warnier Date: Tue, 2 Sep 2008 07:13:33 +0200 Subject: [PATCH] [svn r16212] Little fix to author field edition --- main/newscorm/lp_controller.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/main/newscorm/lp_controller.php b/main/newscorm/lp_controller.php index 2f63390516..7a639f9ac4 100644 --- a/main/newscorm/lp_controller.php +++ b/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) - $len = strripos($author,'

')-stripos($author,'

'); - $author_fixed=substr($author,stripos($author,'

'), $len+4); + if( stripos($author) != 0 ) { + $len = strripos($author,'

')-stripos($author,'

'); + $author_fixed=substr($author,stripos($author,'

'), $len+4); + } else { + $len = strripos($author,'')-stripos($author,''); + $author_fixed=substr($author,stripos($author,''), $len+7); + } $_SESSION['oLP']->set_author($author_fixed); $_SESSION['oLP']->set_encoding($_REQUEST['lp_encoding']);