Author: jablko
Date: Sun Oct 24 13:39:18 2010
New Revision: 8428
Log:
Use $route->resource
Modified:
trunk/apps/qubit/modules/actor/templates/deleteSuccess.php
trunk/apps/qubit/modules/function/actions/browseAction.class.php
trunk/apps/qubit/modules/function/actions/deleteAction.class.php
Modified: trunk/apps/qubit/modules/actor/templates/deleteSuccess.php
==============================================================================
--- trunk/apps/qubit/modules/actor/templates/deleteSuccess.php Sun Oct 24
13:30:40 2010 (r8427)
+++ trunk/apps/qubit/modules/actor/templates/deleteSuccess.php Sun Oct 24
13:39:18 2010 (r8428)
@@ -3,13 +3,16 @@
<?php echo $form->renderFormTag(url_for(array($resource, 'module' => 'actor',
'action' => 'delete')), array('method' => 'delete')) ?>
<div class="actions section">
- <h2 class="element-invisible"><?php echo __('Actions') ?></h2>
+
+ <h2 class="element-invisible"><?php echo __('Actions') ?></h2>
+
<div class="content">
<ul class="clearfix links">
<li><?php echo link_to(__('Cancel'), array($resource, 'module' =>
'actor')) ?></li>
<li><input class="form-submit" type="submit" value="<?php echo
__('Confirm') ?>"/></li>
</ul>
</div>
+
</div>
</form>
Modified: trunk/apps/qubit/modules/function/actions/browseAction.class.php
==============================================================================
--- trunk/apps/qubit/modules/function/actions/browseAction.class.php Sun Oct
24 13:30:40 2010 (r8427)
+++ trunk/apps/qubit/modules/function/actions/browseAction.class.php Sun Oct
24 13:39:18 2010 (r8428)
@@ -33,7 +33,6 @@
}
$criteria = new Criteria;
-
switch ($request->sort)
{
case 'nameDown':
Modified: trunk/apps/qubit/modules/function/actions/deleteAction.class.php
==============================================================================
--- trunk/apps/qubit/modules/function/actions/deleteAction.class.php Sun Oct
24 13:30:40 2010 (r8427)
+++ trunk/apps/qubit/modules/function/actions/deleteAction.class.php Sun Oct
24 13:39:18 2010 (r8428)
@@ -23,19 +23,14 @@
{
$this->form = new sfForm;
- $this->resource = QubitFunction::getById($request->id);
-
- if (!isset($this->resource))
- {
- $this->forward404();
- }
+ $this->resource = $this->getRoute()->resource;
if ($request->isMethod('delete'))
{
// Delete relationships
- foreach (QubitRelation::getBySubjectOrObjectId($this->resource->id) as
$relation)
+ foreach (QubitRelation::getBySubjectOrObjectId($this->resource->id) as
$item)
{
- $relation->delete();
+ $item->delete();
}
$this->resource->delete();
--
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.