svn: /web/doc-editor/trunk/php/ AccountManager.php controller.php

[email protected] (Neal Poole)
Newsgroups php.doc.web
Message-ID <[email protected]>
nbpoole                                  Thu, 23 Jun 2011 20:09:07 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=312410

Log:
Reverting last commit: the cookies are used by JS to preserve username/email/language selection on the login page between sessions. Instead, the REQUEST superglobal is replaced with a combination of GET and POST.

Changed paths:
    U   web/doc-editor/trunk/php/AccountManager.php
    U   web/doc-editor/trunk/php/controller.php

Modified: web/doc-editor/trunk/php/AccountManager.php
===================================================================
--- web/doc-editor/trunk/php/AccountManager.php	2011-06-23 19:55:08 UTC (rev 312409)
+++ web/doc-editor/trunk/php/AccountManager.php	2011-06-23 20:09:07 UTC (rev 312410)
@@ -302,6 +302,10 @@
             $cookieLogin = $_SESSION['vcsLogin'];
            }

+           setcookie("loginApp", $cookieLogin, time() + 3600*24*365, "/"); // One year ;)
+           setcookie("email", $email, time() + 3600*24*365, "/");
+           setcookie("lang", $this->vcsLang, time() + 3600*24*365, "/");
+
         } elseif ($AuthReturn == 'Bad password') {

             // Authentication failed from the VCS server : bad password return

Modified: web/doc-editor/trunk/php/controller.php
===================================================================
--- web/doc-editor/trunk/php/controller.php	2011-06-23 19:55:08 UTC (rev 312409)
+++ web/doc-editor/trunk/php/controller.php	2011-06-23 20:09:07 UTC (rev 312410)
@@ -10,7 +10,7 @@
 require_once "./ExtJsController.php";
 require_once "./JsonResponseBuilder.php";

-$controller = new ExtJsController($_REQUEST);
+$controller = new ExtJsController(array_merge($_GET, $_POST));

 $method     = str_replace('-', '_', $controller->getRequestVariable('task'));
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.