Permalink
Browse files

Added the 'Restore' option near the 'Backup' one to course list.

See bug 616. Closed. It needs Martin confirmation.
  • Loading branch information...
1 parent 2b4c64e commit 41b9b44faf6e5198179ff5d99f98b8d49d6f5f3b stronk7 committed Aug 15, 2003
Showing with 7 additions and 1 deletion.
  1. +7 −1 course/category.php
View
@@ -221,6 +221,7 @@
$stredit = get_string("edit");
$strdelete = get_string("delete");
$strbackup = get_string("backup");
+ $strrestore = get_string("restore");
$strmoveup = get_string("moveup");
$strmovedown = get_string("movedown");
$strupdate = get_string("update");
@@ -280,7 +281,12 @@
echo "<a title=\"$strbackup\" href=\"../backup/backup.php?id=$course->id\"><img".
" src=\"$pixpath/t/backup.gif\" height=11 width=11 border=0></a> ";
-
+
+ //Only showed if "backupdata" dir exists
+ if (is_dir("$CFG->dataroot/$course->id/backupdata")) {
+ echo "<a title=\"$strrestore\" href=\"../files/index.php?id=$course->id&wdir=/backupdata\"><img".
+ " src=\"$pixpath/t/restore.gif\" height=11 width=11 border=0></a> ";
+ }
if ($up) {
echo "<a title=\"$strmoveup\" href=\"category.php?id=$category->id&moveup=$course->id\"><img".

0 comments on commit 41b9b44

Please sign in to comment.