| [ Index ] |
PHP Cross Reference of Moodle 1.9.3 [Build 15-Oct-2008] |
[Summary view] [Print] [Text view]
1 <?php 2 3 require_once ('../config.php'); 4 require_once($CFG->libdir.'/adminlib.php'); 5 6 admin_externalpage_setup('toinodb'); 7 8 $confirm = optional_param('confirm', 0, PARAM_BOOL); 9 10 require_login(); 11 12 require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM)); 13 14 admin_externalpage_print_header(); 15 print_heading('Convert all MySQL tables from MYISAM to InnoDB'); 16 17 if ($CFG->dbfamily != 'mysql') { 18 notice('This function is for MySQL databases only!', 'index.php'); 19 } 20 21 if (data_submitted() and $confirm and confirm_sesskey()) { 22 23 notify('Please be patient and wait for this to complete...', 'notifysuccess'); 24 25 if ($tables = $db->MetaTables()) { 26 $db->debug = true; 27 foreach ($tables as $table) { 28 execute_sql("ALTER TABLE $table TYPE=INNODB; "); 29 } 30 $db->debug = false; 31 } 32 notify('... done.', 'notifysuccess'); 33 print_continue('index.php'); 34 admin_externalpage_print_footer(); 35 36 } else { 37 $optionsyes = array('confirm'=>'1', 'sesskey'=>sesskey()); 38 notice_yesno('Are you sure you want convert all your tables to the InnoDB format?', 39 'innodb.php', 'index.php', $optionsyes, NULL, 'post', 'get'); 40 admin_externalpage_print_footer(); 41 } 42 43 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Wed Jan 14 11:33:29 2009 | Cross-referenced by PHPXref 0.7 |