mirrored from git://git.moodle.org/moodle.git
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
major cleanup of unsupported and legacy external pages in admin/; cre…
…ated new hidden unsupported category; some other minor fixes and changes
- Loading branch information
skodak
committed
Sep 25, 2006
1 parent
6caa705
commit c9a49ce
Showing
14 changed files
with
149 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,43 @@ | ||
<?php | ||
|
||
require_once('../config.php'); | ||
require_once($CFG->libdir.'/adminlib.php'); | ||
$adminroot = admin_get_root(); | ||
admin_externalpage_setup('toinodb', $adminroot); | ||
|
||
$confirm = optional_param('confirm', 0, PARAM_BOOL); | ||
|
||
require_login(); | ||
|
||
require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM, SITEID)); | ||
|
||
print_header("Convert all tables from MYISAM to InnoDB", "Convert all tables from MYISAM to InnoDB", | ||
"Convert all tables from MYISAM to InnoDB"); | ||
admin_externalpage_print_header($adminroot); | ||
print_heading('Convert all MySQL tables from MYISAM to InnoDB'); | ||
|
||
if ($CFG->dbtype != 'mysql') { | ||
notice('This function is for MySQL databases only!', 'index.php'); | ||
} | ||
|
||
if ($confirm and confirm_sesskey()) { | ||
if (data_submitted() and $confirm and confirm_sesskey()) { | ||
|
||
print_heading("Please be patient and wait for this to complete..."); | ||
notify('Please be patient and wait for this to complete...', 'notifysuccess'); | ||
|
||
if ($tables = $db->MetaTables()) { | ||
$db->debug = true; | ||
foreach ($tables as $table) { | ||
execute_sql("ALTER TABLE $table TYPE=INNODB; "); | ||
} | ||
$db->debug = false; | ||
} | ||
notify('... done.', 'notifysuccess'); | ||
print_continue('index.php'); | ||
admin_externalpage_print_footer($adminroot); | ||
|
||
} else { | ||
notice_yesno("Are you sure you want convert all your tables to the InnoDB format?", | ||
"innodb.php?confirm=1&sesskey=".sesskey(), "index.php"); | ||
$optionsyes = array('confirm'=>'1', 'sesskey'=>sesskey()); | ||
notice_yesno('Are you sure you want convert all your tables to the InnoDB format?', | ||
'innodb.php', 'index.php', $optionsyes, NULL, 'post', 'get'); | ||
admin_externalpage_print_footer($adminroot); | ||
} | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php // $Id$ | ||
|
||
// This file defines settingpages and externalpages in the "unsupported" hidden category, use wisely! | ||
|
||
$ADMIN->add('unsupported', new admin_externalpage('purgemoodledata', 'Purge moodledata', $CFG->wwwroot.'/'.$CFG->admin.'/delete.php')); | ||
$ADMIN->add('unsupported', new admin_externalpage('healthcenter', get_string('healthcenter'), $CFG->wwwroot.'/'.$CFG->admin.'/health.php')); | ||
$ADMIN->add('unsupported', new admin_externalpage('toinodb', 'Convert to InnoDB', $CFG->wwwroot.'/'.$CFG->admin.'/innodb.php')); | ||
$ADMIN->add('unsupported', new admin_externalpage('replace', 'Search and replace', $CFG->wwwroot.'/'.$CFG->admin.'/replace.php')); | ||
|
||
|
||
?> |
Oops, something went wrong.