Author: jablko
Date: Sun Oct 31 19:56:08 2010
New Revision: 8726
Log:
Interpret object as $params
Modified:
trunk/lib/QubitRoute.class.php
trunk/plugins/sfIsaarPlugin/modules/sfIsaarPlugin/templates/_relatedAuthorityRecord.php
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/templates/_relatedFunction.php
trunk/vendor/symfony/lib/helper/UrlHelper.php
Modified: trunk/lib/QubitRoute.class.php
==============================================================================
--- trunk/lib/QubitRoute.class.php Sun Oct 31 03:25:23 2010 (r8725)
+++ trunk/lib/QubitRoute.class.php Sun Oct 31 19:56:08 2010 (r8726)
@@ -22,6 +22,11 @@
protected function filterParams($params)
{
// Fill in missing parameters with attributes of $params[0]
+ if (!is_array($params))
+ {
+ $params = array($params);
+ }
+
if (isset($params[0]))
{
foreach (array_diff_key($this->params + $this->variables, $params) as
$key => $ignore)
Modified:
trunk/plugins/sfIsaarPlugin/modules/sfIsaarPlugin/templates/_relatedAuthorityRecord.php
==============================================================================
---
trunk/plugins/sfIsaarPlugin/modules/sfIsaarPlugin/templates/_relatedAuthorityRecord.php
Sun Oct 31 03:25:23 2010 (r8725)
+++
trunk/plugins/sfIsaarPlugin/modules/sfIsaarPlugin/templates/_relatedAuthorityRecord.php
Sun Oct 31 19:56:08 2010 (r8726)
@@ -73,7 +73,7 @@
value
);
-$url = url_for(array($resource));
+$url = url_for($resource);
echo javascript_tag(<<<content
Drupal.behaviors.relatedAuthorityRecord = {
Modified:
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/templates/_relatedFunction.php
==============================================================================
---
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/templates/_relatedFunction.php
Sun Oct 31 03:25:23 2010 (r8725)
+++
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/templates/_relatedFunction.php
Sun Oct 31 19:56:08 2010 (r8726)
@@ -73,7 +73,7 @@
value
);
-$url = url_for(array($resource));
+$url = url_for($resource);
echo javascript_tag(<<<content
Modified: trunk/vendor/symfony/lib/helper/UrlHelper.php
==============================================================================
--- trunk/vendor/symfony/lib/helper/UrlHelper.php Sun Oct 31 03:25:23
2010 (r8725)
+++ trunk/vendor/symfony/lib/helper/UrlHelper.php Sun Oct 31 19:56:08
2010 (r8726)
@@ -112,7 +112,7 @@
$arguments = func_get_args();
// http://trac.symfony-project.org/ticket/7933
- if (is_array($arguments[0]) || '@' == substr($arguments[0], 0, 1) || false
!== strpos($arguments[0], '/'))
+ if (!is_string($arguments[0]) || '@' == substr($arguments[0], 0, 1) || false
!== strpos($arguments[0], '/'))
{
return call_user_func_array('url_for1', $arguments);
}
@@ -165,7 +165,7 @@
{
// for BC with 1.1
$arguments = func_get_args();
- if (is_array($arguments[1]) || '@' == substr($arguments[1], 0, 1) || false
!== strpos($arguments[1], '/'))
+ if (!is_string($arguments[1]) || '@' == substr($arguments[1], 0, 1) || false
!== strpos($arguments[1], '/'))
{
return call_user_func_array('link_to1', $arguments);
}
@@ -233,7 +233,7 @@
function link_to_if()
{
$arguments = func_get_args();
- if (is_array($arguments[2]) || '@' == substr($arguments[2], 0, 1) || false
!== strpos($arguments[2], '/'))
+ if (!is_string($arguments[2]) || '@' == substr($arguments[2], 0, 1) || false
!== strpos($arguments[2], '/'))
{
list($condition, $name, $params, $options) = array_pad($arguments, 4,
null);
}
--
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.