MDL-70711 form: deleted useless if block
get_magic_quotes_gpc() always return false since PHP 5.3 so (1 == get_magic_quotes_gpc()) is never verified. This allows me to safetly delete what I dropped out.
This commit is contained in:
@@ -266,21 +266,8 @@ class HTML_QuickForm extends HTML_Common {
|
||||
$attributes = array('action'=>$action, 'method'=>$method, 'name'=>$formName, 'id'=>$formName) + $target;
|
||||
$this->updateAttributes($attributes);
|
||||
if (!$trackSubmit || isset($_REQUEST['_qf__' . $formName])) {
|
||||
if (1 == get_magic_quotes_gpc()) {
|
||||
$this->_submitValues = ('get' == $method? $_GET: $_POST); // we already eliminated magic quotes in moodle setup.php
|
||||
foreach ($_FILES as $keyFirst => $valFirst) {
|
||||
foreach ($valFirst as $keySecond => $valSecond) {
|
||||
if ('name' == $keySecond) {
|
||||
$this->_submitFiles[$keyFirst][$keySecond] = $valSecond; // we already eliminated magic quotes in moodle setup.php
|
||||
} else {
|
||||
$this->_submitFiles[$keyFirst][$keySecond] = $valSecond;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$this->_submitValues = 'get' == $method? $_GET: $_POST;
|
||||
$this->_submitFiles = $_FILES;
|
||||
}
|
||||
$this->_submitValues = 'get' == $method? $_GET: $_POST;
|
||||
$this->_submitFiles = $_FILES;
|
||||
$this->_flagSubmitted = count($this->_submitValues) > 0 || count($this->_submitFiles) > 0;
|
||||
}
|
||||
if ($trackSubmit) {
|
||||
|
||||
Reference in New Issue
Block a user