Author: jablko
Date: Tue Oct 26 18:41:42 2010
New Revision: 8528
Log:
Use $route->resource
Modified:
trunk/apps/qubit/modules/taxonomy/templates/indexSuccess.php
trunk/apps/qubit/modules/term/actions/autocompleteAction.class.php
Modified: trunk/apps/qubit/modules/taxonomy/templates/indexSuccess.php
==============================================================================
--- trunk/apps/qubit/modules/taxonomy/templates/indexSuccess.php Tue Oct
26 18:36:28 2010 (r8527)
+++ trunk/apps/qubit/modules/taxonomy/templates/indexSuccess.php Tue Oct
26 18:41:42 2010 (r8528)
@@ -45,7 +45,7 @@
<div class="content">
<ul class="clearfix links">
<?php if (QubitAcl::check($taxonomy, 'createTerm')): ?>
- <li><?php echo link_to(__('Add new'), array('module' => 'term',
'action' => 'add', 'taxonomyId' => $taxonomy->id)) ?></li>
+ <li><?php echo link_to(__('Add new'), array('module' => 'term',
'action' => 'add', 'taxonomy' => url_for(array($taxonomy, 'module' =>
'taxonomy')))) ?></li>
<?php endif; ?>
</ul>
</div>
Modified: trunk/apps/qubit/modules/term/actions/autocompleteAction.class.php
==============================================================================
--- trunk/apps/qubit/modules/term/actions/autocompleteAction.class.php Tue Oct
26 18:36:28 2010 (r8527)
+++ trunk/apps/qubit/modules/term/actions/autocompleteAction.class.php Tue Oct
26 18:41:42 2010 (r8528)
@@ -46,7 +46,7 @@
}
$params =
$this->context->routing->parse(Qubit::pathInfo($request->taxonomy));
- $criteria->add(QubitTerm::TAXONOMY_ID, $params['id']);
+ $criteria->add(QubitTerm::TAXONOMY_ID,
$params['_sf_route']->resource->id);
$criteria->addJoin(QubitTerm::ID, QubitTermI18n::ID);
$criteria->add(QubitTermI18n::CULTURE,
$this->context->user->getCulture());
@@ -94,7 +94,7 @@
$connection = Propel::getConnection();
$statement = $connection->prepare("($s1) UNION ALL ($s2) ORDER BY name
LIMIT 10");
$params =
$this->context->routing->parse(Qubit::pathInfo($request->taxonomy));
- $statement->bindValue(':p1', $params['id']);
+ $statement->bindValue(':p1', $params['_sf_route']->resource->id);
$statement->bindValue(':p2', $this->context->user->getCulture());
--
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.