Cleaning wiki recent activity URLs. MDL-15896 ; backported from 19_STABLE

This commit is contained in:
stronk7
2008-09-26 09:38:32 +00:00
parent 665ba7679d
commit 5af25dd922
+5 -1
View File
@@ -192,6 +192,10 @@ function wiki_print_recent_activity($course, $isteacher, $timestart) {
//Obtain the visible property from the instance
$modvisible = instance_is_visible($log->module,$tempmod);
/// Process log->url and rebuild it here to properly clean the pagename - MDL-15896
$extractedpage = preg_replace('/^.*&page=/', '', $log->url);
$log->url = preg_replace('/page=.*$/', 'page='.urlencode($extractedpage), $log->url);
//Only if the mod is visible
if ($modvisible) {
$wikis[$log->info] = wiki_log_info($log);
@@ -1660,4 +1664,4 @@ function wiki_release_lock($wikiid,$pagename) {
}
?>
?>