[xoops-cvslog 6063] CVS update: xoops2jp/html/modules/legacy/admin/actions

Zurück zum Archiv-Index

NobuNobu nobun****@users*****
2006年 12月 28日 (木) 22:24:51 JST


Index: xoops2jp/html/modules/legacy/admin/actions/ModuleListAction.class.php
diff -u xoops2jp/html/modules/legacy/admin/actions/ModuleListAction.class.php:1.1.2.2 xoops2jp/html/modules/legacy/admin/actions/ModuleListAction.class.php:1.1.2.3
--- xoops2jp/html/modules/legacy/admin/actions/ModuleListAction.class.php:1.1.2.2	Sun Oct 15 00:55:15 2006
+++ xoops2jp/html/modules/legacy/admin/actions/ModuleListAction.class.php	Thu Dec 28 22:24:50 2006
@@ -1,7 +1,7 @@
 <?php
 /**
  * @package Legacy
- * @version $Id: ModuleListAction.class.php,v 1.1.2.2 2006/10/14 15:55:15 minahito Exp $
+ * @version $Id: ModuleListAction.class.php,v 1.1.2.3 2006/12/28 13:24:50 nobunobu Exp $
  */
 
 if (!defined('XOOPS_ROOT_PATH')) exit();
@@ -67,26 +67,34 @@
 		return LEGACY_FRAME_VIEW_INPUT;
 	}
 
-	function _processSave(&$controller, &$xoopsUser)
-	{
-		$moduleHandler =& xoops_gethandler('module');
-		$t_objectArr =& $moduleHandler->getObjects();
-		
-		$successFlag = true;
-		foreach($t_objectArr as $module) {
-			$mid = $module->get('mid');
-			$module->set('name', $this->mActionForm->get('name', $mid));
-			$module->set('weight', $this->mActionForm->get('weight', $mid));
-			$module->set('isactive', $this->mActionForm->get('isactive', $mid));
-
-			//
-			// Store.
-			//
-			$successFlag &= $moduleHandler->insert($module);
-		}
-		
-		return $successFlag ? LEGACY_FRAME_VIEW_SUCCESS : LEGACY_FRAME_VIEW_ERROR;
-	}
+    function _processSave(&$controller, &$xoopsUser)
+    {
+        $moduleHandler =& xoops_gethandler('module');
+        $t_objectArr =& $moduleHandler->getObjects();
+
+        $successFlag = true;
+        foreach($t_objectArr as $module) {
+            $mid = $module->get('mid');
+            $olddata['name'] = $module->get('name');
+            $olddata['weight'] = $module->get('weight');
+            $olddata['isactive'] = $module->get('isactive');
+            $newdata['name'] = $this->mActionForm->get('name', $mid);
+            $newdata['weight'] = $this->mActionForm->get('weight', $mid);
+            $newdata['isactive'] = $this->mActionForm->get('isactive', $mid);
+            if ( count(array_diff_assoc($olddata, $newdata)) > 0 ) {
+                $module->set('name', $this->mActionForm->get('name', $mid));
+                $module->set('weight', $this->mActionForm->get('weight', $mid));
+                $module->set('isactive', $this->mActionForm->get('isactive', $mid));
+
+                //
+                // Store.
+                //
+                $successFlag &= $moduleHandler->insert($module);
+            }
+        }
+
+        return $successFlag ? LEGACY_FRAME_VIEW_SUCCESS : LEGACY_FRAME_VIEW_ERROR;
+    }
 
 	/**
 	 * To support a template writer, this send the list of mid that actionForm kept.


xoops-cvslog メーリングリストの案内
Zurück zum Archiv-Index