Commits

Insolita Donna committed 65fecbc

Range of values save in cache with unique queueid now - more security

Comments (0)

Files changed (1)

JToggleColumn.php

 
     public $queueType='toggle';//May by toggle or select
 
-    public $queueid;//!!!!!Important - unique id for caching range -> must be different for different attributes
 
     /**
      * @var array the HTML options for the data cell tags.
      * @var string Assets url
      */
     private $_assetsUrl;
+    /**
+     * @var string  unique id for caching range of values
+     */
+    private $queueid;
 
     /**
      * Returns assets url, where check and uncheck images are located
             throw new CException(Yii::t('toggle_column', 'Model attribute ("name") must be specified for CToggleColumn.'));
         if($this->action == 'qtoggle')
         {
+            if  (empty($this->queueid))
+               $this->queueid=Yii::app()->controller->action->id.$this->name.$this->grid->id;
             if  (empty($this->queue))
             throw new CException(Yii::t('toggle_column', 'Please set correct queue array!!!'));
-            if  (empty($this->queueid))
-                throw new CException(Yii::t('toggle_column', 'Please set  queueid - it`s important setting !!!'));
+
             if  (empty($this->queueTitles))
                 throw new CException(Yii::t('toggle_column', 'Please set correct queueTitles array!!!'));
              $archeq=array_diff_key($this->queue,$this->queueTitles);
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.