[limb-svn] r6274 - 3.x/trunk/limb/cms/src/controller

svn at limb-project.com svn at limb-project.com
Fri Sep 7 16:20:42 MSD 2007


Author: pachanga
Date: 2007-09-07 16:20:42 +0400 (Fri, 07 Sep 2007)
New Revision: 6274
URL: http://fisheye.limb-project.com/changelog/limb/?cs=6274

Modified:
   3.x/trunk/limb/cms/src/controller/AdminObjectController.class.php
Log:
-- AdminObjectController :: doDelete() uses internal implementation instead of calling command, this allowed for better control of request processing

Modified: 3.x/trunk/limb/cms/src/controller/AdminObjectController.class.php
===================================================================
--- 3.x/trunk/limb/cms/src/controller/AdminObjectController.class.php	2007-09-07 11:13:22 UTC (rev 6273)
+++ 3.x/trunk/limb/cms/src/controller/AdminObjectController.class.php	2007-09-07 12:20:42 UTC (rev 6274)
@@ -64,6 +64,33 @@
     }
   }
 
+  function doDelete()
+  {
+    if($this->request->hasPost())
+      $this->_onBeforeDelete();
+
+    if($this->request->get('delete'))
+    {
+      foreach($this->request->getArray('ids') as $id)
+      {
+        $item = new $this->_object_class_name((int)$id);
+        $item->destroy();
+      }
+      $this->_endDialog();
+      $this->_onAfterDelete();
+    }
+  }
+
+  function performPublishCommand()
+  {
+    $this->performCommand('limb/cms/src/command/lmbCmsPublishObjectCommand', $this->_object_class_name);
+  }
+
+  function performUnpublishCommand()
+  {
+    $this->performCommand('limb/cms/src/command/lmbCmsUnpublishObjectCommand', $this->_object_class_name);
+  }
+
   protected function _import()
   {
     $this->item->import($this->request);
@@ -113,24 +140,6 @@
   protected function _onBeforeValidate() {}
   protected function _onAfterValidate() {}
 
-  function performPublishCommand()
-  {
-    $this->performCommand('limb/cms/src/command/lmbCmsPublishObjectCommand', $this->_object_class_name);
-  }
-
-  function performUnpublishCommand()
-  {
-    $this->performCommand('limb/cms/src/command/lmbCmsUnpublishObjectCommand', $this->_object_class_name);
-  }
-
-  function doDelete()
-  {
-    if($this->request->hasPost())
-      $this->_onBeforeDelete();
-    $this->performCommand('limb/cms/src/command/lmbCmsDeleteObjectCommand', $this->_object_class_name);
-    if($this->request->hasPost())
-      $this->_onAfterDelete();
-  }
 }
 
 



More information about the limb-svn mailing list