Made action_redir.php take posted parameters, fixing a problem in IE that when trying to add a lot user (say 150+) to the actions this fails to work
This commit is contained in:
+3
-11
@@ -4,7 +4,7 @@
|
||||
*/
|
||||
require_once("../config.php");
|
||||
|
||||
if (empty($_GET) || empty($_GET['formaction']) || empty($_GET['id'])) {
|
||||
if (empty($_POST) || empty($_POST['formaction']) || empty($_POST['id'])) {
|
||||
die();
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ $actions = array(
|
||||
'extendenrol.php'
|
||||
);
|
||||
|
||||
if (array_search($_GET['formaction'], $actions) === false) {
|
||||
if (array_search($_POST['formaction'], $actions) === false) {
|
||||
die();
|
||||
}
|
||||
|
||||
@@ -22,13 +22,5 @@ if (!confirm_sesskey()) {
|
||||
die();
|
||||
}
|
||||
|
||||
$pass = false;
|
||||
foreach ($_GET as $k => $v) {
|
||||
$pass = $pass || preg_match('/^user(\d+)$/',$k);
|
||||
}
|
||||
if (!$pass) {
|
||||
die();
|
||||
}
|
||||
|
||||
header("Location: $CFG->wwwroot/user/" . $_GET['formaction'] . '?' . $_SERVER['QUERY_STRING']);
|
||||
require_once($_POST['formaction']);
|
||||
?>
|
||||
@@ -53,7 +53,7 @@ $table->align = array ('left', 'center', 'center', 'center');
|
||||
$table->width = "600";
|
||||
$timeformat = get_string('strftimedate');
|
||||
$nochange = get_string('nochange');
|
||||
foreach ($_GET as $k => $v) {
|
||||
foreach ($_POST as $k => $v) {
|
||||
if (preg_match('/^user(\d+)$/',$k,$m)) {
|
||||
if (!($user = get_record_sql("SELECT * FROM {$CFG->prefix}user u INNER JOIN {$CFG->prefix}user_students s ON u.id=s.userid WHERE u.id={$m[1]}"))) {
|
||||
continue;
|
||||
|
||||
+1
-1
@@ -370,7 +370,7 @@ function checkchecked(form) {
|
||||
//-->
|
||||
</script>
|
||||
';
|
||||
echo '<form action="action_redir.php" method="get" name="studentsform" onSubmit="return checksubmit(this);">';
|
||||
echo '<form action="action_redir.php" method="post" name="studentsform" onSubmit="return checksubmit(this);">';
|
||||
echo '<input type="hidden" name="id" value="'.$id.'" />';
|
||||
echo '<input type="hidden" name="returnto" value="'.$_SERVER['REQUEST_URI'].'" />';
|
||||
echo '<input type="hidden" name="sesskey" value="'.$USER->sesskey.'" />';
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
$count = 0;
|
||||
|
||||
foreach ($_GET as $k => $v) {
|
||||
foreach ($_POST as $k => $v) {
|
||||
if (preg_match('/^user(\d+)$/',$k,$m)) {
|
||||
if (!array_key_exists($m[1],$SESSION->emailto[$id])) {
|
||||
if ($user = get_record_select('user','id = '.$m[1],'id,firstname,lastname,idnumber,email,emailstop,mailformat')) {
|
||||
|
||||
Reference in New Issue
Block a user