parameter cleaup - round 2
This commit is contained in:
+3
-4
@@ -7,7 +7,8 @@
|
||||
define('SEVERITY_SIGNIFICANT', 'significant');
|
||||
define('SEVERITY_CRITICAL', 'critical');
|
||||
|
||||
$resetsesserrorcounter = optional_param( 'resetsesserrorcounter' );
|
||||
$resetsesserrorcounter = optional_param('resetsesserrorcounter', 0, PARAM_BOOL);
|
||||
$solution = optional_param('solution', 0, PARAM_SAFEDIR); //in fact it is class name alhanumeric and _
|
||||
|
||||
require_login();
|
||||
if (!isadmin()) {
|
||||
@@ -83,9 +84,7 @@ dd.solution li {
|
||||
</style>
|
||||
STYLES;
|
||||
|
||||
$solution = optional_param('solution', NULL);
|
||||
|
||||
if(!empty($solution) && class_exists($solution)) {
|
||||
if(strpos($solution, 'problem_') === 0 && class_exists($solution)) {
|
||||
health_print_solution($solution);
|
||||
}
|
||||
else {
|
||||
|
||||
+8
-8
@@ -1,23 +1,23 @@
|
||||
<?php // $Id$
|
||||
|
||||
/// Check that config.php exists, if not then call the install script
|
||||
if (!file_exists("../config.php")) {
|
||||
if (!file_exists('../config.php')) {
|
||||
header('Location: ../install.php');
|
||||
die;
|
||||
}
|
||||
|
||||
require_once("../config.php");
|
||||
include_once("$CFG->dirroot/lib/adminlib.php"); // Contains various admin-only functions
|
||||
require_once('../config.php');
|
||||
include_once($CFG->dirroot.'/lib/adminlib.php'); // Contains various admin-only functions
|
||||
|
||||
$id = optional_param('id', '', PARAM_ALPHANUM);
|
||||
$confirmupgrade = optional_param('confirmupgrade','');
|
||||
$id = optional_param('id', '', PARAM_ALPHANUM);
|
||||
$confirmupgrade = optional_param('confirmupgrade', 0, PARAM_BOOL);
|
||||
|
||||
|
||||
/// Check that PHP is of a sufficient version
|
||||
|
||||
if (!check_php_version("4.1.0")) {
|
||||
$version = phpversion();
|
||||
print_heading("Sorry, Moodle requires PHP 4.1.0 or later (currently using version $version)");
|
||||
if (!check_php_version("4.1.0")) { //TODO: should we bump it up to 4.3.0??
|
||||
$phpversion = phpversion();
|
||||
print_heading("Sorry, Moodle requires PHP 4.1.0 or later (currently using version $phpversion)");
|
||||
die;
|
||||
}
|
||||
|
||||
|
||||
+5
-3
@@ -1,6 +1,8 @@
|
||||
<?php
|
||||
|
||||
include('../config.php');
|
||||
require_once('../config.php');
|
||||
|
||||
$confirm = optional_param('confirm', 0, PARAM_BOOL);
|
||||
|
||||
require_login();
|
||||
|
||||
@@ -12,7 +14,7 @@
|
||||
"Convert all tables from MYISAM to InnoDB");
|
||||
|
||||
|
||||
if (!empty($confirm) and confirm_sesskey()) {
|
||||
if ($confirm and confirm_sesskey()) {
|
||||
|
||||
print_heading("Please be patient and wait for this to complete...");
|
||||
|
||||
@@ -24,7 +26,7 @@
|
||||
}
|
||||
} else {
|
||||
notice_yesno("Are you sure you want convert all your tables to the InnoDB format?",
|
||||
"innodb.php?confirm=yes&sesskey=".sesskey(), "index.php");
|
||||
"innodb.php?confirm=1&sesskey=".sesskey(), "index.php");
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
<?PHP // $Id$
|
||||
|
||||
require_once("../config.php");
|
||||
require_once('../config.php');
|
||||
|
||||
$mode = optional_param('mode', '', PARAM_ALPHA);
|
||||
$mode = optional_param('mode', '', PARAM_ALPHA);
|
||||
$currentfile = optional_param('currentfile', 'moodle.php', PARAM_FILE);
|
||||
|
||||
require_login();
|
||||
|
||||
+1
-2
@@ -9,6 +9,7 @@ Based on: lang.php in 1.4.3+ release
|
||||
Thanks: Jaime Villate for important bug fixing, koen roggemans for his job and all moodlers
|
||||
for intensive testing of this my first contribution
|
||||
*/
|
||||
require_once('../config.php');
|
||||
|
||||
//
|
||||
// Some local configuration
|
||||
@@ -21,8 +22,6 @@ Thanks: Jaime Villate for important bug fixing, koen roggemans for his job a
|
||||
// or to filenames with filesize() == 0
|
||||
$filetemplate = ''; // template for new files, i.e. '$Id$';
|
||||
|
||||
require_once("../config.php");
|
||||
|
||||
$currentfile = optional_param('currentfile', 'docs/README.txt', PARAM_PATH);
|
||||
|
||||
require_login();
|
||||
|
||||
Reference in New Issue
Block a user