[Jaws-commits] r12343 - trunk/jaws/html/include/Jaws

afz at jaws-project.com afz at jaws-project.com
Wed Jan 4 11:23:23 UTC 2012


Author: afz
Date: 2012-01-04 11:23:23 +0000 (Wed, 04 Jan 2012)
New Revision: 12343

Modified:
   trunk/jaws/html/include/Jaws/GadgetInfo.php
Log:
Added set default ACL value method to set it through gadget install process

Modified: trunk/jaws/html/include/Jaws/GadgetInfo.php
===================================================================
--- trunk/jaws/html/include/Jaws/GadgetInfo.php	2012-01-04 11:22:56 UTC (rev 12342)
+++ trunk/jaws/html/include/Jaws/GadgetInfo.php	2012-01-04 11:23:23 UTC (rev 12343)
@@ -45,6 +45,12 @@
         'urls'       => array(),
     );
 
+    /*
+     * @access  private
+     * @var     boolean
+     */
+    var $_DefaultACL = true;
+
     /**
      * Name of the gadget, is shorter using it this way
      */
@@ -288,6 +294,17 @@
     }
 
     /**
+     * Set value of front-end default ACL
+     *
+     * @access  public
+     * @param   boolean $default
+     */
+    function SetDefaultACL($default = true)
+    {
+        $this->_DefaultACL = $default;
+    }
+
+    /**
      * Gets the short description of a given ACL key
      *
      * @access protected
@@ -396,7 +413,7 @@
 
         $this->ACLKey("/ACL/gadgets/{$this->_Name}/default",
                       _t('GLOBAL_ACL_DEFAULT'),
-                      'true');
+                      $this->_DefaultACL? 'true' : 'false');
         $this->ACLKey("/ACL/gadgets/{$this->_Name}/default_admin",
                       _t('GLOBAL_ACL_DEFAULT_ADMIN'),
                       'false');



More information about the Jaws-commits mailing list