Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
authored November 08, 2005
14  user/action_redir.php
@@ -4,7 +4,7 @@
4 4
  */
5 5
 require_once("../config.php");
6 6
 
7  
-if (empty($_GET) || empty($_GET['formaction']) || empty($_GET['id'])) {
  7
+if (empty($_POST) || empty($_POST['formaction']) || empty($_POST['id'])) {
8 8
     die();
9 9
 }
10 10
 
@@ -14,7 +14,7 @@
14 14
         'extendenrol.php'
15 15
     );
16 16
 
17  
-if (array_search($_GET['formaction'], $actions) === false) {
  17
+if (array_search($_POST['formaction'], $actions) === false) {
18 18
     die();
19 19
 }
20 20
 
@@ -22,13 +22,5 @@
22 22
     die();
23 23
 }
24 24
 
25  
-$pass = false;
26  
-foreach ($_GET as $k => $v) {
27  
-    $pass = $pass || preg_match('/^user(\d+)$/',$k);
28  
-}
29  
-if (!$pass) {
30  
-    die();
31  
-}
32  
-
33  
-header("Location: $CFG->wwwroot/user/" . $_GET['formaction'] . '?' . $_SERVER['QUERY_STRING']);
  25
+require_once($_POST['formaction']);
34 26
 ?>
2  user/extendenrol.php
@@ -53,7 +53,7 @@
53 53
 $table->width = "600";
54 54
 $timeformat = get_string('strftimedate');
55 55
 $nochange = get_string('nochange');
56  
-foreach ($_GET as $k => $v) {
  56
+foreach ($_POST as $k => $v) {
57 57
     if (preg_match('/^user(\d+)$/',$k,$m)) {
58 58
         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]}"))) {
59 59
             continue;
2  user/index.php
@@ -370,7 +370,7 @@ function checkchecked(form) {
370 370
 //-->
371 371
 </script>
372 372
 ';
373  
-        echo '<form action="action_redir.php" method="get" name="studentsform" onSubmit="return checksubmit(this);">';
  373
+        echo '<form action="action_redir.php" method="post" name="studentsform" onSubmit="return checksubmit(this);">';
374 374
         echo '<input type="hidden" name="id" value="'.$id.'" />';
375 375
         echo '<input type="hidden" name="returnto" value="'.$_SERVER['REQUEST_URI'].'" />';
376 376
         echo '<input type="hidden" name="sesskey" value="'.$USER->sesskey.'" />';
2  user/messageselect.php
@@ -41,7 +41,7 @@
41 41
 
42 42
     $count = 0;
43 43
 
44  
-    foreach ($_GET as $k => $v) {
  44
+    foreach ($_POST as $k => $v) {
45 45
         if (preg_match('/^user(\d+)$/',$k,$m)) {
46 46
             if (!array_key_exists($m[1],$SESSION->emailto[$id])) {
47 47
                 if ($user = get_record_select('user','id = '.$m[1],'id,firstname,lastname,idnumber,email,emailstop,mailformat')) {

0 notes on commit db0a817

Please sign in to comment.
Something went wrong with that request. Please try again.