Added AbstractForm::$objectAction
authorAlexander Ebert <ebert@woltlab.com>
Fri, 10 Feb 2012 16:30:52 +0000 (17:30 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Fri, 10 Feb 2012 16:30:52 +0000 (17:30 +0100)
Closes #364

wcfsetup/install/files/lib/acp/form/CronjobAddForm.class.php
wcfsetup/install/files/lib/acp/form/CronjobEditForm.class.php
wcfsetup/install/files/lib/acp/form/OptionForm.class.php
wcfsetup/install/files/lib/acp/form/OptionImportForm.class.php
wcfsetup/install/files/lib/acp/form/UpdateServerAddForm.class.php
wcfsetup/install/files/lib/acp/form/UpdateServerEditForm.class.php
wcfsetup/install/files/lib/acp/form/UserAddForm.class.php
wcfsetup/install/files/lib/acp/form/UserEditForm.class.php
wcfsetup/install/files/lib/acp/form/UserGroupAddForm.class.php
wcfsetup/install/files/lib/acp/form/UserGroupEditForm.class.php
wcfsetup/install/files/lib/form/AbstractForm.class.php

index 4365a2149351cdc4c930bb93756434b7f8ca2497..33ee536e7ef1d5f3c159d17348e0e67116b823fc 100755 (executable)
@@ -144,8 +144,8 @@ class CronjobAddForm extends ACPForm {
                        'startDow' => $this->startDow
                );
                
-               $cronjobAction = new CronjobAction(array(), 'create', array('data' => $data));
-               $cronjobAction->executeAction();
+               $this->objectAction = new CronjobAction(array(), 'create', array('data' => $data));
+               $this->objectAction->executeAction();
                $this->saved();
                
                // reset values
index 82b5d5ae71f43a4385c38c79309189d53d3b0e0f..357d5a31fc0a0e52343e65673bacf51b6d55d8b6 100755 (executable)
@@ -70,8 +70,8 @@ class CronjobEditForm extends CronjobAddForm {
                        'startDow' => $this->startDow
                );
                
-               $cronjobAction = new CronjobAction(array($this->cronjobID), 'update', array('data' => $data));
-               $cronjobAction->executeAction();
+               $this->objectAction = new CronjobAction(array($this->cronjobID), 'update', array('data' => $data));
+               $this->objectAction->executeAction();
                
                $this->saved();
                
index 26573557bd5ec15a2545b2e666ac72d1bbd552f2..96affb7ab525351b7606b86bf632a3851f31bf77 100644 (file)
@@ -85,8 +85,8 @@ class OptionForm extends AbstractOptionListForm {
                
                // save options
                $saveOptions = $this->optionHandler->save('wcf.acp.option', 'wcf.acp.option.option');
-               $optionAction = new OptionAction(array(), 'updateAll', array('data' => $saveOptions));
-               $optionAction->executeAction();
+               $this->objectAction = new OptionAction(array(), 'updateAll', array('data' => $saveOptions));
+               $this->objectAction->executeAction();
                $this->saved();
                
                // show succes message
index 9127e8cc0424d55b74d853bdb1dd4213db9784b8..4dab16fe837be76d11ad077eeb6218cdf8036cca 100755 (executable)
@@ -103,8 +103,8 @@ class OptionImportForm extends ACPForm {
                parent::save();
                
                // save
-               $optionAction = new OptionAction(array(), 'import', array('data' => $this->options));
-               $optionAction->executeAction();
+               $this->objectAction = new OptionAction(array(), 'import', array('data' => $this->options));
+               $this->objectAction->executeAction();
                $this->saved();
                
                // show success message
index abc5378ec2a3132f14c5035422f54411e66970a6..068f6303b1d1ba490abb67c623e0521aa27e420a 100755 (executable)
@@ -84,12 +84,12 @@ class UpdateServerAddForm extends ACPForm {
                parent::save();
                
                // save server
-               $updateServerAction = new PackageUpdateServerAction(array(), 'create', array('data' => array(
+               $this->objectAction = new PackageUpdateServerAction(array(), 'create', array('data' => array(
                        'serverURL' => $this->serverURL,
                        'loginUsername' => $this->loginUsername,
                        'loginPassword' => $this->loginPassword
                )));
-               $updateServer = $updateServerAction->executeAction();
+               $this->objectAction->executeAction();
                $this->saved();
                
                // reset values
index 2992788b44bc212f434384140cb99b4184aea493..b223047931b0199921d76f9f7120b784c04b1014 100755 (executable)
@@ -54,12 +54,12 @@ class UpdateServerEditForm extends UpdateServerAddForm {
                AbstractForm::save();
                
                // save server
-               $updateServerAction = new PackageUpdateServerAction(array($this->packageUpdateServerID), 'update', array('data' => array(
+               $this->objectAction = new PackageUpdateServerAction(array($this->packageUpdateServerID), 'update', array('data' => array(
                        'serverURL' => $this->serverURL,
                        'loginUsername' => $this->loginUsername,
                        'loginPassword' => $this->loginPassword
                )));
-               $updateServerAction->executeAction();
+               $this->objectAction->executeAction();
                $this->saved();
                
                // show success message
index 37c1a88ddd00f5fd28ac428d01724d73a66a0de6..f5f08ba545d2340a680d6302475f1576a2f36e26 100644 (file)
@@ -196,8 +196,8 @@ class UserAddForm extends UserOptionListForm {
                        'languages' => $this->visibleLanguages,
                        'options' => $saveOptions
                );
-               $userAction = new UserAction(array(), 'create', $data);
-               $userAction->executeAction();
+               $this->objectAction = new UserAction(array(), 'create', $data);
+               $this->objectAction->executeAction();
                $this->saved();
                
                // show empty add form
index af547510f9524d68e86ed85c763c1eef154a5882..eb9f95f8fdd5297ba9a08badc413c5fdb2c19378 100755 (executable)
@@ -167,8 +167,8 @@ class UserEditForm extends UserAddForm {
                        'languages' => $this->visibleLanguages,
                        'options' => $saveOptions
                );
-               $userAction = new UserAction(array($this->userID), 'update', $data);
-               $userAction->executeAction();
+               $this->objectAction = new UserAction(array($this->userID), 'update', $data);
+               $this->objectAction->executeAction();
                
                $this->saved();
                
index e4a6064d5b537c3f393e5610ca6a0c382fedf740..332ac6b8cc86ec8bd166e8f5022176e5bed49192 100755 (executable)
@@ -155,8 +155,8 @@ class UserGroupAddForm extends AbstractOptionListForm {
                        'data' => array_merge($this->additionalFields, array('groupName' => $this->groupName)),
                        'options' => $saveOptions
                );
-               $groupAction = new UserGroupAction(array(), 'create', $data);
-               $groupAction->executeAction();
+               $this->objectAction = new UserGroupAction(array(), 'create', $data);
+               $this->objectAction->executeAction();
                
                if (!I18nHandler::getInstance()->isPlainValue('groupName')) {
                        $returnValues = $groupAction->getReturnValues();
index 5dfc11905dbaa1d7adaa49d1092be190680b9944..ef3fff415e7c27bdd7f93502adeda2af7dc10c26 100755 (executable)
@@ -150,8 +150,8 @@ class UserGroupEditForm extends UserGroupAddForm {
                        'data' => array_merge(array('groupName' => $this->groupName), $this->additionalFields),
                        'options' => $saveOptions
                );
-               $groupAction = new UserGroupAction(array($this->groupID), 'update', $data);
-               $groupAction->executeAction();
+               $this->objectAction = new UserGroupAction(array($this->groupID), 'update', $data);
+               $this->objectAction->executeAction();
                $this->saved();
                
                // show success message
index b3d566c97dc40f7b3b0f45c2b9891af79fe56e54..092c12ba28ae83caa7b92a7da8213fbcf2a9b0fc 100644 (file)
@@ -29,6 +29,12 @@ abstract class AbstractForm extends AbstractPage implements IForm {
         */
        public $errorType = '';
        
+       /**
+        * database object action
+        * @var wcf\data\AbstractDatabaseObjectAction
+        */
+       public $objectAction = null;
+       
        /**
         * @see wcf\form\IForm::submit()
         */