]> git.mjollnir.org Git - moodle.git/commitdiff
Added backup & restore to SITE page.
authorstronk7 <stronk7>
Sat, 25 Sep 2004 11:37:10 +0000 (11:37 +0000)
committerstronk7 <stronk7>
Sat, 25 Sep 2004 11:37:10 +0000 (11:37 +0000)
Some changes from hardcoded '1' to SITEID.

See Bug 1928
(http://moodle.org/bugs/bug.php?op=show&bugid=1928)

Merged from MOODLE_14_STABLE

blocks/admin/block_admin.php

index 1da94e92838e5a691206983b86754fcc768193aa..3eb8328ad279c3065d0a51281d3533df98e8d6a4 100644 (file)
@@ -40,6 +40,12 @@ class CourseBlock_admin extends MoodleBlock {
 
             $this->content->items[] = '<a href="'.$CFG->wwwroot.'/'.$CFG->admin.'/users.php">'.get_string('users').'</a>...';
             $this->content->icons[] = '<img src="'.$CFG->pixpath.'/i/users.gif" height="16" width="16" alt="" />';
+
+            $this->content->items[]='<a href="'.$CFG->wwwroot.'/backup/backup.php?id='.SITEID.'">'.get_string('backup').'...</a>';
+            $this->content->icons[]='<img src="'.$CFG->pixpath.'/i/backup.gif" height="16" width="16" alt="">';
+
+            $this->content->items[]='<a href="'.$CFG->wwwroot.'/files/index.php?id='.SITEID.'&amp;wdir=/backupdata">'.get_string('restore').'...</a>';
+            $this->content->icons[]='<img src="'.$CFG->pixpath.'/i/restore.gif" height="16" width="16" alt="">';
         }
 
         if (iscreator()) {
@@ -48,10 +54,10 @@ class CourseBlock_admin extends MoodleBlock {
         }
 
         if (isadmin()) {
-            $this->content->items[] = '<a href="'.$CFG->wwwroot.'/course/log.php?id=1">'.get_string('logs').'</a>';
+            $this->content->items[] = '<a href="'.$CFG->wwwroot.'/course/log.php?id='.SITEID.'">'.get_string('logs').'</a>';
             $this->content->icons[] = '<img src="'.$CFG->pixpath.'/i/log.gif" height="16" width="16" alt="" />';
 
-            $this->content->items[] = '<a href="'.$CFG->wwwroot.'/files/index.php?id=1">'.get_string('sitefiles').'</a>';
+            $this->content->items[] = '<a href="'.$CFG->wwwroot.'/files/index.php?id='.SITEID.'">'.get_string('sitefiles').'</a>';
             $this->content->icons[] = '<img src="'.$CFG->pixpath.'/i/files.gif" height="16" width="16" alt="" />';
 
             if (file_exists($CFG->dirroot.'/'.$CFG->admin.'/'.$CFG->dbtype)) {