[Jaws-commits] r13506 - in branches/0.8/html/gadgets: Blog Chatbox Contact Phoo Policy Users/Actions

afz at jaws-project.com afz at jaws-project.com
Sun Aug 26 15:45:21 UTC 2012


Author: afz
Date: 2012-08-26 15:45:21 +0000 (Sun, 26 Aug 2012)
New Revision: 13506

Modified:
   branches/0.8/html/gadgets/Blog/HTML.php
   branches/0.8/html/gadgets/Chatbox/LayoutHTML.php
   branches/0.8/html/gadgets/Contact/LayoutHTML.php
   branches/0.8/html/gadgets/Phoo/HTML.php
   branches/0.8/html/gadgets/Policy/Model.php
   branches/0.8/html/gadgets/Users/Actions/Login.php
   branches/0.8/html/gadgets/Users/Actions/Registration.php
Log:
using captcha label in all gadgets

Modified: branches/0.8/html/gadgets/Blog/HTML.php
===================================================================
--- branches/0.8/html/gadgets/Blog/HTML.php	2012-08-26 15:44:01 UTC (rev 13505)
+++ branches/0.8/html/gadgets/Blog/HTML.php	2012-08-26 15:45:21 UTC (rev 13506)
@@ -958,9 +958,9 @@
         }
 
         $mPolicy = $GLOBALS['app']->LoadGadget('Policy', 'Model');
-        if ($mPolicy->LoadCaptcha($captcha, $entry, $description)) {
+        if ($mPolicy->LoadCaptcha($captcha, $entry, $label, $description)) {
             $tpl->SetBlock('commentform/captcha');
-            $tpl->SetVariable('lbl_captcha', _t('GLOBAL_CAPTCHA_CODE'));
+            $tpl->SetVariable('lbl_captcha', $label);
             $tpl->SetVariable('captcha', $captcha);
             if (!empty($entry)) {
                 $tpl->SetVariable('captchavalue', $entry);

Modified: branches/0.8/html/gadgets/Chatbox/LayoutHTML.php
===================================================================
--- branches/0.8/html/gadgets/Chatbox/LayoutHTML.php	2012-08-26 15:44:01 UTC (rev 13505)
+++ branches/0.8/html/gadgets/Chatbox/LayoutHTML.php	2012-08-26 15:45:21 UTC (rev 13506)
@@ -53,9 +53,9 @@
             }
 
             $mPolicy = $GLOBALS['app']->LoadGadget('Policy', 'Model');
-            if ($mPolicy->LoadCaptcha($captcha, $entry, $description)) {
+            if ($mPolicy->LoadCaptcha($captcha, $entry, $label, $description)) {
                 $tpl->SetBlock('chatbox/fieldset/captcha');
-                $tpl->SetVariable('lbl_captcha', _t('GLOBAL_CAPTCHA_CODE'));
+                $tpl->SetVariable('lbl_captcha', $label);
                 $tpl->SetVariable('captcha', $captcha);
                 if (!empty($entry)) {
                     $tpl->SetVariable('captchavalue', $entry);

Modified: branches/0.8/html/gadgets/Contact/LayoutHTML.php
===================================================================
--- branches/0.8/html/gadgets/Contact/LayoutHTML.php	2012-08-26 15:44:01 UTC (rev 13505)
+++ branches/0.8/html/gadgets/Contact/LayoutHTML.php	2012-08-26 15:45:21 UTC (rev 13506)
@@ -92,9 +92,9 @@
         }
 
         $mPolicy = $GLOBALS['app']->LoadGadget('Policy', 'Model');
-        if ($mPolicy->LoadCaptcha($captcha, $entry, $description)) {
+        if ($mPolicy->LoadCaptcha($captcha, $entry, $label, $description)) {
             $tpl->SetBlock('contact/captcha');
-            $tpl->SetVariable('lbl_captcha', _t('GLOBAL_CAPTCHA_CODE'));
+            $tpl->SetVariable('lbl_captcha', $label);
             $tpl->SetVariable('captcha', $captcha);
             if (!empty($entry)) {
                 $tpl->SetVariable('captchavalue', $entry);

Modified: branches/0.8/html/gadgets/Phoo/HTML.php
===================================================================
--- branches/0.8/html/gadgets/Phoo/HTML.php	2012-08-26 15:44:01 UTC (rev 13505)
+++ branches/0.8/html/gadgets/Phoo/HTML.php	2012-08-26 15:45:21 UTC (rev 13506)
@@ -680,9 +680,9 @@
         }
 
         $mPolicy = $GLOBALS['app']->LoadGadget('Policy', 'Model');
-        if ($mPolicy->LoadCaptcha($captcha, $entry, $description)) {
+        if ($mPolicy->LoadCaptcha($captcha, $entry, $label, $description)) {
             $tpl->SetBlock('commentform/captcha');
-            $tpl->SetVariable('lbl_captcha', _t('GLOBAL_CAPTCHA_CODE'));
+            $tpl->SetVariable('lbl_captcha', $label);
             $tpl->SetVariable('captcha', $captcha);
             if (!empty($entry)) {
                 $tpl->SetVariable('captchavalue', $entry);

Modified: branches/0.8/html/gadgets/Policy/Model.php
===================================================================
--- branches/0.8/html/gadgets/Policy/Model.php	2012-08-26 15:44:01 UTC (rev 13505)
+++ branches/0.8/html/gadgets/Policy/Model.php	2012-08-26 15:45:21 UTC (rev 13506)
@@ -81,7 +81,7 @@
      * @param   string  $description
      * @return  boolean True if captcha loaded successfully
      */
-    function LoadCaptcha(&$captcha, &$entry, &$description)
+    function LoadCaptcha(&$captcha, &$entry, &$label, &$description)
     {
         $status = $GLOBALS['app']->Registry->Get('/gadgets/Policy/captcha');
         if (($status == 'DISABLED') ||
@@ -103,6 +103,7 @@
         $resCaptcha = $objCaptcha[$dCaptcha]->Get();
         $captcha = $resCaptcha['captcha']->Get();
         $entry   = empty($resCaptcha['entry'])? null : $resCaptcha['entry']->Get();
+        $label   = $resCaptcha['label'];
         $description = $resCaptcha['description'];
 
         return true;

Modified: branches/0.8/html/gadgets/Users/Actions/Login.php
===================================================================
--- branches/0.8/html/gadgets/Users/Actions/Login.php	2012-08-26 15:44:01 UTC (rev 13505)
+++ branches/0.8/html/gadgets/Users/Actions/Login.php	2012-08-26 15:45:21 UTC (rev 13506)
@@ -67,9 +67,9 @@
         $tpl->SetVariable('remember', _t('GLOBAL_SUBMIT'));
 
         $mPolicy = $GLOBALS['app']->LoadGadget('Policy', 'Model');
-        if ($mPolicy->LoadCaptcha($captcha, $entry, $description)) {
+        if ($mPolicy->LoadCaptcha($captcha, $entry, $label, $description)) {
             $tpl->SetBlock('forgot/captcha');
-            $tpl->SetVariable('lbl_captcha', _t('GLOBAL_CAPTCHA_CODE'));
+            $tpl->SetVariable('lbl_captcha', $label);
             $tpl->SetVariable('captcha', $captcha);
             if (!empty($entry)) {
                 $tpl->SetVariable('captchavalue', $entry);

Modified: branches/0.8/html/gadgets/Users/Actions/Registration.php
===================================================================
--- branches/0.8/html/gadgets/Users/Actions/Registration.php	2012-08-26 15:44:01 UTC (rev 13505)
+++ branches/0.8/html/gadgets/Users/Actions/Registration.php	2012-08-26 15:45:21 UTC (rev 13506)
@@ -163,9 +163,9 @@
 
         $tpl->SetVariable('register', _t('USERS_REGISTER'));
         $mPolicy = $GLOBALS['app']->LoadGadget('Policy', 'Model');
-        if ($mPolicy->LoadCaptcha($captcha, $entry, $description)) {
+        if ($mPolicy->LoadCaptcha($captcha, $entry, $label, $description)) {
             $tpl->SetBlock('register/captcha');
-            $tpl->SetVariable('lbl_captcha', _t('GLOBAL_CAPTCHA_CODE'));
+            $tpl->SetVariable('lbl_captcha', $label);
             $tpl->SetVariable('captcha', $captcha);
             if (!empty($entry)) {
                 $tpl->SetVariable('captchavalue', $entry);



More information about the Jaws-commits mailing list