]> git.mjollnir.org Git - moodle.git/commitdiff
fixed bug 1887
authorgustav_delius <gustav_delius>
Sat, 15 Jan 2005 21:55:25 +0000 (21:55 +0000)
committergustav_delius <gustav_delius>
Sat, 15 Jan 2005 21:55:25 +0000 (21:55 +0000)
mod/wiki/view.php

index a0c99a64837a4157ef2a3d28e3b7758b96cc5b8e..e157f99e2eec5873615bd715e5235a8eeb270f4d 100644 (file)
     }
 
 /// Moodle Log
-    add_to_log($course->id, "wiki", $ewiki_action, "view.php?id=$cm->id&amp;groupid=$groupid&amp;userid=$userid&amp;page=$page", $wiki->name." ".$ewiki_title);
+    add_to_log($course->id, "wiki", $ewiki_action, addslashes("view.php?id=$cm->id&amp;groupid=$groupid&amp;userid=$userid&amp;page=$page", $wiki->name." ".$ewiki_title));
 
 
 /// Print the page header
     /// is 'view', filter it. Also, if the page doesn't exist, it will default to 'edit'.
     $actions = explode('/', $page);
     if ($ewiki_action == "edit" || ($actions !== false && count($actions) > 1 && $actions[0] != 'view') ||
-        (count($actions) == 1 && !record_exists('wiki_pages', 'pagename', $page, 'wiki', $wiki_entry->id))) {
+        (count($actions) == 1 && !record_exists('wiki_pages', 'pagename', addslashes($page), 'wiki', $wiki_entry->id))) {
         print $content;
     }
     else {