Use Get::set() and Post::set() instead of direct assignations of
authorFlorent Bruneau <florent.bruneau@polytechnique.org>
Fri, 25 Feb 2011 16:32:03 +0000 (17:32 +0100)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Fri, 25 Feb 2011 16:43:35 +0000 (17:43 +0100)
$_GET/$_POST

Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
core
modules/auth.php
modules/email.php
modules/search.php

diff --git a/core b/core
index 38cbb20..bc02cec 160000 (submodule)
--- a/core
+++ b/core
@@ -1 +1 @@
-Subproject commit 38cbb20a4ca795e838faeef0fda7374b304068b3
+Subproject commit bc02ceca4595728711127a2317d35e8cfc934918
index 6d9eae3..1883ab6 100644 (file)
@@ -51,7 +51,7 @@ class AuthModule extends PLModule
 
         $res = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<membres>\n\n";
 
-        if (S::v('chall') && $_GET['PASS'] == md5(S::v('chall').$cle)) {
+        if (S::v('chall') && Get::s('PASS') == md5(S::v('chall').$cle)) {
             $list = new MMList(User::getWithUID(10154), "x-econfiance.polytechnique.org");
             $members = $list->get_members('membres');
             if (is_array($members)) {
index c0473f7..8b4bcf3 100644 (file)
@@ -381,8 +381,8 @@ class EmailModule extends PLModule
 
             unset($_POST['save']);
             if (trim(preg_replace('/-- .*/', '', Post::v('contenu'))) != "") {
-                $_POST['to_contacts'] = explode(';', @$_POST['to_contacts']);
-                $_POST['cc_contacts'] = explode(';', @$_POST['cc_contacts']);
+                Post::set('to_contacts', explode(';', Post::s('to_contacts')));
+                Post::set('cc_contacts', explode(';', Post::s('cc_contacts')));
                 $data = serialize($_POST);
                 XDB::execute('INSERT INTO  email_send_save (uid, data)
                                    VALUES  ({?}, {?})
index c43a295..6033f26 100644 (file)
@@ -96,8 +96,7 @@ class SearchModule extends PLModule
                 if ($user) {
                     pl_redirect($base . $user->login());
                 }
-                $_REQUEST['quick'] = $login;
-                $_GET['quick'] = $login;
+                Get::set('quick', $login);
             } elseif (strpos($quick, 'doc:') === 0) {
                 $url = 'Docs/Recherche?';
                 $url .= 'action=search&q=' . urlencode(substr($quick, 4));