Author: jablko
Date: Mon Oct 25 10:20:09 2010
New Revision: 8469
Log:
Sanitize values
Modified:
trunk/apps/qubit/modules/term/actions/editAction.class.php
Modified: trunk/apps/qubit/modules/term/actions/editAction.class.php
==============================================================================
--- trunk/apps/qubit/modules/term/actions/editAction.class.php Mon Oct 25
10:13:48 2010 (r8468)
+++ trunk/apps/qubit/modules/term/actions/editAction.class.php Mon Oct 25
10:20:09 2010 (r8469)
@@ -75,17 +75,6 @@
{
QubitAcl::forwardUnauthorized();
}
-
- if (isset($request->parent) && 0 < strlen($request->parent))
- {
- $params =
$this->context->routing->parse(Qubit::pathInfo($request->parent));
- $this->resource->parentId = $params['id'];
- }
-
- if (isset($request->taxonomyId))
- {
- $this->resource->taxonomyId = $request->taxonomyId;
- }
}
}
@@ -132,6 +121,11 @@
case 'parent':
$this->form->setDefault('parent',
$this->context->routing->generate(null, array($this->resource->parent, 'module'
=> 'term')));
+ if (isset($this->request->parent))
+ {
+ $this->form->setDefault('parent', $this->request->parent);
+ }
+
$this->form->setValidator('parent', new sfValidatorString);
$choices = array();
@@ -161,6 +155,11 @@
case 'taxonomy':
$this->form->setDefault('taxonomy',
$this->context->routing->generate(null, array($this->resource->taxonomy,
'module' => 'taxonomy')));
+ if (isset($this->request->taxonomy))
+ {
+ $this->form->setDefault('taxonomy', $this->request->taxonomy);
+ }
+
$this->form->setValidator('taxonomy', new
sfValidatorString(array('required' => true), array('required' =>
$this->context->i18n->__('This is a mandatory element.'))));
$choices = array();
--
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.