From: stronk7 Date: Sun, 27 Jan 2008 00:39:56 +0000 (+0000) Subject: Adding some missing log actions when restoring forums. MDL-13184 ; merged from 19_STABLE X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=04150e0886aa057837ac12d2f4d922d1817b8a08;p=moodle.git Adding some missing log actions when restoring forums. MDL-13184 ; merged from 19_STABLE --- diff --git a/mod/forum/restorelib.php b/mod/forum/restorelib.php index 13f0bb5e5e..c0861bbe7c 100644 --- a/mod/forum/restorelib.php +++ b/mod/forum/restorelib.php @@ -749,6 +749,17 @@ } } break; + case "stop tracking": + if ($log->cmid) { + //Get the new_id of the module (to recode the url and info fields) + $mod = backup_getid($restore->backup_unique_code,$log->module,$log->info); + if ($mod) { + $log->url = "view.php?f=".$mod->new_id; + $log->info = $mod->new_id; + $status = true; + } + } + break; case "update": if ($log->cmid) { //Get the new_id of the module (to recode the info field) @@ -775,6 +786,14 @@ $log->url = "index.php?id=".$log->course; $status = true; break; + case "subscribeall": + $log->url = "index.php?id=".$log->course; + $status = true; + break; + case "unsubscribeall": + $log->url = "index.php?id=".$log->course; + $status = true; + break; case "subscribe": if ($log->cmid) { //Get the new_id of the module (to recode the info and url field) @@ -787,6 +806,7 @@ } break; case "view subscriber": + case "view subscribers": if ($log->cmid) { //Get the new_id of the module (to recode the info and field) $mod = backup_getid($restore->backup_unique_code,$log->module,$log->info); @@ -842,6 +862,7 @@ } break; case "delete discussi": + case "delete discussion": if ($log->cmid) { //Get the new_id of the module (to recode the info field) $mod = backup_getid($restore->backup_unique_code,$log->module,$log->info); @@ -909,6 +930,16 @@ } } break; + case "user report": + //Extract mode from url + $mode = substr(strrchr($log->url,"="),1); + //Get new user id + if ($use = backup_getid($restore->backup_unique_code, 'user', $log->info)) { + $log->url = 'user.php?id=' . $log->course . '&user=' . $use->new_id . '&mode=' . $mode; + $log->info = $use->new_id; + $status = true; + } + break; case "search": $log->url = "search.php?id=".$log->course."&search=".urlencode($log->info); $status = true;