Browse Source

[svn r12794] fix a bug when building an utf8 learning path (task 1771)

Eric Marguin 17 years ago
parent
commit
07f59d4df0
1 changed files with 9 additions and 0 deletions
  1. 9 0
      main/newscorm/learnpath.class.php

+ 9 - 0
main/newscorm/learnpath.class.php

@@ -3742,6 +3742,10 @@ class learnpath {
 		
 		while($row = Database::fetch_array($result))
 		{
+			if($this->encoding='UTF-8')
+			{
+				$row['title'] = utf8_decode($row['title']);
+			}
 			$arrLP[] = array(
 				'id' => $row['id'],
 				'item_type' => $row['item_type'],
@@ -3970,6 +3974,11 @@ class learnpath {
 				if($msg != '')
 					$return .= $msg;
 				
+				if($this->encoding=='UTF-8')
+				{
+					$row['title'] = utf8_decode($row['title']);
+				}
+				
 				$return .= '<p class="lp_title">' . stripslashes($row['title']) . '</p>';
 				//$return .= '<p class="lp_text">' . ((trim($row['description']) == '') ? 'no description' : stripslashes($row['description'])) . '</p>';