Author: jablko
Date: Tue Oct 26 15:46:52 2010
New Revision: 8516
Log:
Call $resource->save(), fixes issues 1836 and 1837
Modified:
trunk/apps/qubit/modules/actor/actions/editAction.class.php
trunk/apps/qubit/modules/function/actions/editAction.class.php
trunk/apps/qubit/modules/informationobject/actions/editAction.class.php
trunk/apps/qubit/modules/menu/actions/editAction.class.php
trunk/apps/qubit/modules/physicalobject/actions/editAction.class.php
trunk/apps/qubit/modules/repository/actions/editAction.class.php
trunk/apps/qubit/modules/staticpage/actions/editAction.class.php
trunk/apps/qubit/modules/term/actions/editAction.class.php
trunk/apps/qubit/modules/user/actions/editAction.class.php
Modified: trunk/apps/qubit/modules/actor/actions/editAction.class.php
==============================================================================
--- trunk/apps/qubit/modules/actor/actions/editAction.class.php Tue Oct 26
15:10:01 2010 (r8515)
+++ trunk/apps/qubit/modules/actor/actions/editAction.class.php Tue Oct 26
15:46:52 2010 (r8516)
@@ -163,6 +163,7 @@
if ($this->form->isValid())
{
$this->processForm();
+
$this->resource->save();
if (isset($request->id) && (0 < strlen($next =
$this->form->getValue('next'))))
Modified: trunk/apps/qubit/modules/function/actions/editAction.class.php
==============================================================================
--- trunk/apps/qubit/modules/function/actions/editAction.class.php Tue Oct
26 15:10:01 2010 (r8515)
+++ trunk/apps/qubit/modules/function/actions/editAction.class.php Tue Oct
26 15:46:52 2010 (r8516)
@@ -59,6 +59,7 @@
if ($this->form->isValid())
{
$this->processForm();
+
$this->resource->save();
$this->redirect(array($this->resource, 'module' => 'function'));
Modified:
trunk/apps/qubit/modules/informationobject/actions/editAction.class.php
==============================================================================
--- trunk/apps/qubit/modules/informationobject/actions/editAction.class.php
Tue Oct 26 15:10:01 2010 (r8515)
+++ trunk/apps/qubit/modules/informationobject/actions/editAction.class.php
Tue Oct 26 15:46:52 2010 (r8516)
@@ -454,13 +454,9 @@
parent::processForm();
- $this->updateStatus();
- $this->updateChildLevels();
-
- $this->resource->save();
-
- // Delete related objects marked for deletion
$this->deleteNotes();
+ $this->updateChildLevels();
+ $this->updateStatus();
}
public function execute($request)
@@ -474,6 +470,8 @@
{
$this->processForm();
+ $this->resource->save();
+
$this->redirect(array($this->resource, 'module' =>
'informationobject'));
}
}
Modified: trunk/apps/qubit/modules/menu/actions/editAction.class.php
==============================================================================
--- trunk/apps/qubit/modules/menu/actions/editAction.class.php Tue Oct 26
15:10:01 2010 (r8515)
+++ trunk/apps/qubit/modules/menu/actions/editAction.class.php Tue Oct 26
15:46:52 2010 (r8516)
@@ -113,8 +113,6 @@
}
}
- $this->menu->save();
-
return $this;
}
@@ -152,6 +150,8 @@
{
$this->processForm();
+ $this->menu->save();
+
$this->redirect(array('module' => 'menu', 'action' => 'list'));
}
}
Modified: trunk/apps/qubit/modules/physicalobject/actions/editAction.class.php
==============================================================================
--- trunk/apps/qubit/modules/physicalobject/actions/editAction.class.php
Tue Oct 26 15:10:01 2010 (r8515)
+++ trunk/apps/qubit/modules/physicalobject/actions/editAction.class.php
Tue Oct 26 15:46:52 2010 (r8516)
@@ -88,8 +88,6 @@
$this->processField($field);
}
}
-
- $this->physicalObject->save();
}
public function execute($request)
@@ -124,6 +122,8 @@
{
$this->processForm();
+ $this->physicalObject->save();
+
if (null !== $next = $this->form->getValue('next'))
{
$this->redirect($next);
Modified: trunk/apps/qubit/modules/repository/actions/editAction.class.php
==============================================================================
--- trunk/apps/qubit/modules/repository/actions/editAction.class.php Tue Oct
26 15:10:01 2010 (r8515)
+++ trunk/apps/qubit/modules/repository/actions/editAction.class.php Tue Oct
26 15:46:52 2010 (r8516)
@@ -216,15 +216,6 @@
}
}
- protected function processForm()
- {
- parent::processForm();
-
- $this->resource->save();
-
- $this->updateContactInformation();
- }
-
public function execute($request)
{
parent::execute($request);
@@ -239,6 +230,10 @@
{
$this->processForm();
+ $this->resource->save();
+
+ $this->updateContactInformation();
+
$this->redirect(array($this->resource, 'module' => 'repository'));
}
}
Modified: trunk/apps/qubit/modules/staticpage/actions/editAction.class.php
==============================================================================
--- trunk/apps/qubit/modules/staticpage/actions/editAction.class.php Tue Oct
26 15:10:01 2010 (r8515)
+++ trunk/apps/qubit/modules/staticpage/actions/editAction.class.php Tue Oct
26 15:46:52 2010 (r8516)
@@ -87,6 +87,8 @@
{
$this->processForm();
+ $this->resource->save();
+
$this->redirect(array($this->resource, 'module' => 'staticpage'));
}
}
Modified: trunk/apps/qubit/modules/term/actions/editAction.class.php
==============================================================================
--- trunk/apps/qubit/modules/term/actions/editAction.class.php Tue Oct 26
15:10:01 2010 (r8515)
+++ trunk/apps/qubit/modules/term/actions/editAction.class.php Tue Oct 26
15:46:52 2010 (r8516)
@@ -407,8 +407,6 @@
QubitAcl::forwardUnauthorized();
}
- $this->resource->save();
-
// Update related info objects when term labels changes
if ($this->updatedLabel)
{
@@ -427,6 +425,8 @@
{
$this->processForm();
+ $this->resource->save();
+
$this->redirect(array($this->resource, 'module' => 'term'));
}
}
Modified: trunk/apps/qubit/modules/user/actions/editAction.class.php
==============================================================================
--- trunk/apps/qubit/modules/user/actions/editAction.class.php Tue Oct 26
15:10:01 2010 (r8515)
+++ trunk/apps/qubit/modules/user/actions/editAction.class.php Tue Oct 26
15:46:52 2010 (r8516)
@@ -208,9 +208,6 @@
$this->processField($field);
}
- // Save changes
- $this->user->save();
-
return $this;
}
@@ -270,6 +267,8 @@
{
$this->processForm();
+ $this->user->save();
+
$this->redirect(array($this->user, 'module' => 'user'));
}
}
--
You received this message because you are subscribed to the Google Groups
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/qubit-commits?hl=en.