when inserting 'Give Up' button, if site encoding is not iso-8859-1, then set page...
[moodle.git] / admin / innodb.php
blobe5cd323387bd93823e3e72dbf664d495178092b1
1 <?php
3 require_once('../config.php');
5 $confirm = optional_param('confirm', 0, PARAM_BOOL);
7 require_login();
9 if (!isadmin()) {
10 error('Admin only');
13 print_header("Convert all tables from MYISAM to InnoDB", "Convert all tables from MYISAM to InnoDB",
14 "Convert all tables from MYISAM to InnoDB");
17 if ($confirm and confirm_sesskey()) {
19 print_heading("Please be patient and wait for this to complete...");
21 if ($tables = $db->MetaTables()) {
22 $db->debug = true;
23 foreach ($tables as $table) {
24 execute_sql("ALTER TABLE $table TYPE=INNODB; ");
27 } else {
28 notice_yesno("Are you sure you want convert all your tables to the InnoDB format?",
29 "innodb.php?confirm=1&sesskey=".sesskey(), "index.php");