Author: sevein
Date: Thu Jul 28 12:23:42 2011
New Revision: 9410
Log:
Revert r9385, and update switch from static index action instead (todo)
Modified:
trunk/apps/qubit/modules/relation/actions/indexAction.class.php
trunk/lib/QubitRoute.class.php
Modified: trunk/apps/qubit/modules/relation/actions/indexAction.class.php
==============================================================================
--- trunk/apps/qubit/modules/relation/actions/indexAction.class.php Thu Jul
28 12:21:59 2011 (r9409)
+++ trunk/apps/qubit/modules/relation/actions/indexAction.class.php Thu Jul
28 12:23:42 2011 (r9410)
@@ -40,12 +40,12 @@
if (isset($this->resource->object))
{
- $value['object'] = $this->context->routing->generate(null,
array($this->resource->object, 'module' => '?'));
+ $value['object'] = $this->context->routing->generate(null,
array($this->resource->object));
}
if (isset($this->resource->subject))
{
- $value['subject'] = $this->context->routing->generate(null,
array($this->resource->subject, 'module' => '?'));
+ $value['subject'] = $this->context->routing->generate(null,
array($this->resource->subject));
}
if (isset($this->resource->type))
Modified: trunk/lib/QubitRoute.class.php
==============================================================================
--- trunk/lib/QubitRoute.class.php Thu Jul 28 12:21:59 2011 (r9409)
+++ trunk/lib/QubitRoute.class.php Thu Jul 28 12:23:42 2011 (r9410)
@@ -59,31 +59,6 @@
*/
public function generate($params, $context = array(), $absolute = false)
{
- // Set module parameter if user asked it (module is '?')
- if (!is_object($params) && '?' == @$params['module'])
- {
- $params['module'] = self::getModuleName($params[0]['className']);
- }
-
return parent::generate($this->filterParams($params), $context, $absolute);
}
-
- /**
- * Try to figure out the module name of a Qubit object
- */
- public function getModuleName($className)
- {
- $module = str_replace('qubit', '', strtolower($className));
-
- switch ($module)
- {
- case 'informationobject':
- case 'actor':
- case 'repository':
-
- return
sfContext::getInstance()->routing->getDefaultParameter($module.'_template');
- }
-
- return $module;
- }
}
--
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.