From c4c7d936accf7f7a70055c97495dbb0132b53cef Mon Sep 17 00:00:00 2001 From: nicolasconnault Date: Thu, 20 Aug 2009 08:39:27 +0000 Subject: [PATCH] MDL-19789 upgraded calls to print_table, print_single_button, print_user_picture, print_container* and notice_yesno --- backup/backup_check.html | 15 ++++++++------- backup/restore_check.html | 4 ++-- backup/restorelib.php | 12 ++++++------ 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/backup/backup_check.html b/backup/backup_check.html index 51d46763fc..d5b034554c 100644 --- a/backup/backup_check.html +++ b/backup/backup_check.html @@ -129,6 +129,7 @@ } //This is the alignment of every row in the table + $table = new html_table(); $table->align = array ("left","right"); if ($allmods = $DB->get_records("modules") ) { @@ -179,7 +180,7 @@ } } $table->data = $modcheckbackup($id,$backupprefs->$var,$backupprefs->backup_unique_code,$instancestopass); - print_table($table); + echo $OUTPUT->table($table); echo ""; } } @@ -199,7 +200,7 @@ echo $user_options[$backupprefs->backup_users].''; //Print info $table->data = user_check_backup($id,$backupprefs->backup_unique_code,$backupprefs->backup_users,$backupprefs->backup_messages, $backupprefs->backup_blogs); - print_table($table); + echo $OUTPUT->table($table); echo ""; } @@ -211,7 +212,7 @@ echo get_string("includelogentries").''; //Print info $table->data = log_check_backup($id); - print_table($table); + echo $OUTPUT->table($table); echo ""; } @@ -222,7 +223,7 @@ echo get_string("includeuserfiles").''; //Print info $table->data = user_files_check_backup($id,$backupprefs->backup_unique_code); - print_table($table); + echo $OUTPUT->table($table); echo ""; } @@ -233,7 +234,7 @@ echo get_string("includecoursefiles").''; //Print info $table->data = course_files_check_backup($id,$backupprefs->backup_unique_code); - print_table($table); + echo $OUTPUT->table($table); echo ""; } @@ -244,7 +245,7 @@ echo get_string("includesitefiles").''; //Print info $table->data = site_files_check_backup($id,$backupprefs->backup_unique_code); - print_table($table); + echo $OUTPUT->table($table); echo ""; } @@ -255,7 +256,7 @@ echo get_string("includeroleassignments").''; //Print info $table->data = array(array(get_string('roles'), count($backupprefs->backuproleassignments))); - print_table($table); + echo $OUTPUT->table($table); echo ""; } } diff --git a/backup/restore_check.html b/backup/restore_check.html index deb4aaf380..de9fa8487e 100644 --- a/backup/restore_check.html +++ b/backup/restore_check.html @@ -7,7 +7,7 @@ //Finally, it calls restore_execute to do the hard work //Get objects from session - global $DB; + global $DB, $OUTPUT; if ($SESSION) { $info = $SESSION->info; @@ -333,7 +333,7 @@ /// Restore button - print_single_button("restore.php", $hidden, get_string("restorecoursenow"),"post"); + echo $OUTPUT->button(html_form::make_button("restore.php", $hidden, get_string("restorecoursenow"))); } echo ""; diff --git a/backup/restorelib.php b/backup/restorelib.php index 82382814b0..a39045d73f 100644 --- a/backup/restorelib.php +++ b/backup/restorelib.php @@ -500,7 +500,7 @@ define('RESTORE_GROUPS_GROUPINGS', 3); $status = true; if ($info) { - $table = new object(); + $table = new html_table(); //This is tha align to every ingo table $table->align = array ("right","left"); //This is the nowrap clause @@ -533,7 +533,7 @@ define('RESTORE_GROUPS_GROUPINGS', 3); echo $OUTPUT->heading(get_string("backup").":"); $table->data = $tab; //Print backup general info - print_table($table); + echo $OUTPUT->table($table); if ($info->backup_backup_version <= 2005070500) { echo $OUTPUT->notification(get_string('backupnonisowarning')); // Message informing that this backup may not work! @@ -643,7 +643,7 @@ define('RESTORE_GROUPS_GROUPINGS', 3); //Print title echo $OUTPUT->heading(get_string("backupdetails").":"); //Print backup general info - print_table($table); + echo $OUTPUT->table($table); } else { $status = false; } @@ -656,7 +656,7 @@ define('RESTORE_GROUPS_GROUPINGS', 3); global $OUTPUT; $status = true; if ($course_header) { - $table = new object(); + $table = new html_table(); //This is tha align to every ingo table $table->align = array ("right","left"); //The width @@ -672,7 +672,7 @@ define('RESTORE_GROUPS_GROUPINGS', 3); //Print title echo $OUTPUT->heading(get_string("course").":"); //Print backup course header info - print_table($table); + echo $OUTPUT->table($table); } else { $status = false; } @@ -7972,7 +7972,7 @@ define('RESTORE_GROUPS_GROUPINGS', 3); $hidden["launch"] = "form"; $hidden["file"] = $file; $hidden["id"] = $id; - print_single_button("restore.php", $hidden, get_string("continue"),"post"); + echo $OUTPUT->button(html_form::make_button("restore.php", $hidden, get_string("continue"))); echo ""; } else { -- 2.39.5