svn: /web/doc-editor/trunk/ js/ui/cmp/EmailPrompt.js php/ExtJsController.php

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

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

Log:
Anonymous users should not be able to send email.

Changed paths:
    U   web/doc-editor/trunk/js/ui/cmp/EmailPrompt.js
    U   web/doc-editor/trunk/php/ExtJsController.php

Modified: web/doc-editor/trunk/js/ui/cmp/EmailPrompt.js
===================================================================
--- web/doc-editor/trunk/js/ui/cmp/EmailPrompt.js	2011-06-23 20:25:02 UTC (rev 312412)
+++ web/doc-editor/trunk/js/ui/cmp/EmailPrompt.js	2011-06-23 20:42:51 UTC (rev 312413)
@@ -37,6 +37,10 @@
                         String.format(_('Email sent to {0} with success!'), win.name.ucFirst()),
                         Ext.emptyFn
                     );
+                },
+                failure : function()
+                {
+                    PhDOE.winForbidden();
                 }
             });

@@ -86,4 +90,4 @@
         });
         ui.cmp.EmailPrompt.superclass.initComponent.call(this);
     }
-});
\ No newline at end of file
+});

Modified: web/doc-editor/trunk/php/ExtJsController.php
===================================================================
--- web/doc-editor/trunk/php/ExtJsController.php	2011-06-23 20:25:02 UTC (rev 312412)
+++ web/doc-editor/trunk/php/ExtJsController.php	2011-06-23 20:42:51 UTC (rev 312413)
@@ -1622,6 +1622,10 @@
             return JsonResponseBuilder::failure();
         }

+        if (AccountManager::getInstance()->isAnonymous) {
+            return JsonResponseBuilder::failure();
+        }
+
         $to      = $this->getRequestVariable('to');
         $subject = $this->getRequestVariable('subject');
         $msg     = $this->getRequestVariable('msg');
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.