Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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
  • Loading branch information...
commit db0a8174c65b429be86b092ee8961fb08b9d3e71 1 parent c269573
patrickslee authored
View
14 user/action_redir.php
@@ -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 @@
'extendenrol.php'
);
-if (array_search($_GET['formaction'], $actions) === false) {
+if (array_search($_POST['formaction'], $actions) === false) {
die();
}
@@ -22,13 +22,5 @@
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']);
?>
View
2  user/extendenrol.php
@@ -53,7 +53,7 @@
$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;
View
2  user/index.php
@@ -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.'" />';
View
2  user/messageselect.php
@@ -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')) {
Please sign in to comment.
Something went wrong with that request. Please try again.