Author: jablko
Date: Tue Aug 11 17:44:59 2009
New Revision: 3015
Log:
Merge preExecute() back into execute(), no longer needed
Modified:
trunk/apps/qubit/modules/informationobject/actions/editAction.class.php
Modified:
trunk/apps/qubit/modules/informationobject/actions/editAction.class.php
==============================================================================
--- trunk/apps/qubit/modules/informationobject/actions/editAction.class.php
Tue Aug 11 17:28:59 2009 (r3014)
+++ trunk/apps/qubit/modules/informationobject/actions/editAction.class.php
Tue Aug 11 17:44:59 2009 (r3015)
@@ -28,25 +28,6 @@
*/
class InformationObjectEditAction extends sfAction
{
- public function preExecute()
- {
- $this->informationObject = new QubitInformationObject;
-
- if (isset($this->request->id))
- {
- $this->informationObject =
QubitInformationObject::getById($this->request->id);
-
- // Check that object exists and that it is not the root
- if (!isset($this->informationObject) ||
!isset($this->informationObject->parent))
- {
- $this->forward404();
- }
- }
-
- $this->form = new sfForm;
- $this->form->getValidatorSchema()->setOption('allow_extra_fields', true);
- }
-
protected function addField($name)
{
switch ($name)
@@ -168,6 +149,22 @@
public function execute($request)
{
+ $this->informationObject = new QubitInformationObject;
+
+ if (isset($this->request->id))
+ {
+ $this->informationObject =
QubitInformationObject::getById($this->request->id);
+
+ // Check that object exists and that it is not the root
+ if (!isset($this->informationObject) ||
!isset($this->informationObject->parent))
+ {
+ $this->forward404();
+ }
+ }
+
+ $this->form = new sfForm;
+ $this->form->getValidatorSchema()->setOption('allow_extra_fields', true);
+
// HACK: Use static::$NAMES in PHP 5.3,
// http://php.net/oop5.late-static-bindings
$class = new ReflectionClass($this);
--~--~---------~--~----~------------~-------~--~----~
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.ca/group/qubit-commits?hl=en
-~----------~----~----~----~------~----~------~--~---