Merge branch 'MDL-31935_search_restore_link' of git://github.com/davosmith/moodle
authorAparup Banerjee <aparup@moodle.com>
Tue, 13 Mar 2012 02:00:33 +0000 (10:00 +0800)
committerAparup Banerjee <aparup@moodle.com>
Tue, 13 Mar 2012 02:00:33 +0000 (10:00 +0800)
course/search.php

index 1e191a3..b3be912 100644 (file)
 
                 // checks whether user can do site backup
                 if (has_capability('moodle/backup:backupcourse', $coursecontext)) {
-                    echo "<a title=\"".get_string("backup")."\" href=\"../backup/backup.php?id=$course->id\">\n<img".
+                    $backupurl = new moodle_url('/backup/backup.php', array('id' => $course->id));
+                    echo "<a title=\"".get_string("backup")."\" href=\"".$backupurl."\">\n<img".
                         " src=\"" . $OUTPUT->pix_url('t/backup') . "\" class=\"iconsmall\" alt=\"".get_string("backup")."\" /></a>\n ";
                 }
 
                 // checks whether user can do restore
                 if (has_capability('moodle/restore:restorecourse', $coursecontext)) {
-                    echo "<a title=\"".get_string("restore")."\" href=\"../files/index.php?id=$course->id&amp;wdir=/backupdata\">\n<img".
+                    $restoreurl = new moodle_url('/backup/restorefile.php', array('contextid' => $coursecontext->id));
+                    echo "<a title=\"".get_string("restore")."\" href=\"".$restoreurl."\">\n<img".
                         " src=\"" . $OUTPUT->pix_url('t/restore') . "\" class=\"iconsmall\" alt=\"".get_string("restore")."\" /></a>\n ";
                 }