Commits

Insolita Donna  committed 65fecbc

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

  • Participants
  • Parent commits f5509ea

Comments (0)

Files changed (1)

File 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);