Commits

Anonymous committed 7e862b2

commit for mass delete Walkthrough Test

Comments (0)

Files changed (3)

app/protected/core/controllers/Controller.php

             $moduleClassName       = $moduleName . 'Module';
             $title                 = Yii::t('Default', 'Mass Delete') . ': ' . $title;
             $massDeleteViewClassName = 'MassDeleteView';
-            $selectedRecordCountFromPost = $selectedRecordCount;
+
             $view  = new $massDeleteViewClassName($this->getId(), $this->getModule()->getId(), $model,$activeAttributes,
-            $selectedRecordCount, $title, null, $moduleClassName, $selectedRecordCountFromPost);
+            $selectedRecordCount, $title, null, $moduleClassName);
+
             return $view;
         }
 

app/protected/core/views/MassDeleteView.php

          * Constructs a detail view specifying the controller as
          * well as the model that will have its mass delete displayed.
          */
-        public function __construct($controllerId, $moduleId, RedBeanModel $model, $activeAttributes, $selectedRecordCount, $title, $alertMessage = null, $moduleClassName, $selectedRecordCountFromPost = null)
+        public function __construct($controllerId, $moduleId, RedBeanModel $model, $activeAttributes, $selectedRecordCount, $title, $alertMessage = null, $moduleClassName)
         {
             assert('is_array($activeAttributes)');
             assert('is_string($title)');
+
             $this->controllerId                       = $controllerId;
             $this->moduleId                           = $moduleId;
             $this->model                              = $model;
             $this->title                              = $title;
             $this->alertMessage                       = $alertMessage;
             $this->moduleClassName                    = $moduleClassName;
-            $this->selectedRecordCountFromPost        = $selectedRecordCountFromPost;
 
         }
 

app/protected/modules/zurmo/components/ZurmoBaseController.php

         {
             assert('$dataProvider == null || $dataProvider instanceof CDataProvider');
             $listModel = new $modelClassName(false);
-            $selectedRecordCount = $this->getSelectedRecordCountByPost();
+
+            $PostDataForMassDeleteProgressView = PostUtil::getData();
  1. Jason Green

    just call this $postData, not $PostDataForMassDeleteProgressView. Also be careful that variables are not with a capital as the first letter. should always be lower case

+            $selectedRecordCount = $PostDataForMassDeleteProgressView['selectedRecordCount'];
+
             $this->doMassDelete(
                 get_class($listModel),
                 $modelClassName,