Backporting MDL-15896 (tabs and recent activity) from HEAD

This commit is contained in:
stronk7
2008-09-26 09:50:11 +00:00
parent 5cb0b4571b
commit 979078fd7e
2 changed files with 6 additions and 2 deletions
+5 -1
View File
@@ -206,6 +206,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);
@@ -1670,4 +1674,4 @@ function wiki_release_lock($wikiid,$pagename) {
}
?>
?>
+1 -1
View File
@@ -366,7 +366,7 @@
$currenttab = '';
foreach ($tabs as $tab) {
$tabname = get_string("tab$tab", 'wiki');
$row[] = new tabobject($tabname, $ewbase.'&page='.$tab.'/'.$ewiki_id, $tabname);
$row[] = new tabobject($tabname, $ewbase.'&page='.$tab.'/'.s($ewiki_id), $tabname);
if ($ewiki_action == "$tab" or in_array($page, $specialpages)) {
$currenttab = $tabname;
}