svn: /web/doc-editor/trunk/php/ ExtJsController.php

[email protected] (Yannick Torres)
Newsgroups php.doc.web
Message-ID <[email protected]>
yannick                                  Wed, 26 May 2010 21:11:06 +0000

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

Log:
simplify erasePersonalData method

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

Modified: web/doc-editor/trunk/php/ExtJsController.php
===================================================================
--- web/doc-editor/trunk/php/ExtJsController.php	2010-05-26 21:09:56 UTC (rev 299833)
+++ web/doc-editor/trunk/php/ExtJsController.php	2010-05-26 21:11:06 UTC (rev 299834)
@@ -1090,13 +1090,15 @@
      */
     public function erasePersonalData()
     {
-        AccountManager::getInstance()->isLogged();
+        $am = AccountManager::getInstance();

-        if ( AccountManager::getInstance()->isAnonymous ) {
+        $am->isLogged();
+
+        if ( $am->isAnonymous ) {
             return JsonResponseBuilder::failure();
         }

-        AccountManager::getInstance()->eraseData();
+        $am->eraseData();

         return JsonResponseBuilder::success();
     }
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.