You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@shindig.apache.org by "Dmitry Vorobyev (JIRA)" <ji...@apache.org> on 2009/08/03 16:35:14 UTC

[jira] Created: (SHINDIG-1138) Gadget Url Renderer

Gadget Url Renderer
-------------------

                 Key: SHINDIG-1138
                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
             Project: Shindig
          Issue Type: Bug
          Components: PHP
    Affects Versions: 1.1-BETA2
            Reporter: Dmitry Vorobyev
            Priority: Minor
             Fix For: 1.1-BETA2


Substitute __MODULE_ID__ and other parameters in url. 

### Eclipse Workspace Patch 1.0
#P shindig
Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
===================================================================
--- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
+++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
@@ -32,9 +32,7 @@
   public function renderGadget(Gadget $gadget, $view) {
     // Preserve existing query string parameters.
     $redirURI = $view['href'];
-    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
-    $query = $queryStr;
-    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
+    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
     $features = array();
     $forcedLibs = Config::get('focedJsLibs');
     if ($forcedLibs == null) {
@@ -45,10 +43,15 @@
     $query .= $this->appendLibsToQuery($features);
     $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
     $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
-    if (substr($query, 0, 1) == '&') {
-      $query = '?' . substr($query, 1);
+    
+    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
+    if (strpos($redirURI, '?') !== false) {
+        $redirURI = $redirURI . $query;
+    } elseif (substr($query, 0, 1) == '&') {
+        $redirURI = $redirURI . '?' . substr($query, 1);
+    } else {
+        $redirURI = $redirURI . '?' . $query;
     }
-    $redirURI .= $query;
     header('Location: ' . $redirURI);
   }
 


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738612#action_12738612 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738874#action_12738874 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738689#action_12738689 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738836#action_12738836 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738539#action_12738539 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738644#action_12738644 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738751#action_12738751 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738372#action_12738372 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738558#action_12738558 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738410#action_12738410 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738502#action_12738502 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738828#action_12738828 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738437#action_12738437 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738581#action_12738581 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738510#action_12738510 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738820#action_12738820 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738850#action_12738850 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738538#action_12738538 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738688#action_12738688 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738763#action_12738763 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738557#action_12738557 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738880#action_12738880 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738528#action_12738528 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738750#action_12738750 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738702#action_12738702 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738808#action_12738808 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738881#action_12738881 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738422#action_12738422 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738871#action_12738871 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738775#action_12738775 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738593#action_12738593 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738807#action_12738807 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738764#action_12738764 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738413#action_12738413 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738696#action_12738696 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738429#action_12738429 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738527#action_12738527 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738640#action_12738640 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738846#action_12738846 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738787#action_12738787 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738674#action_12738674 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738711#action_12738711 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738379#action_12738379 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738800#action_12738800 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738388#action_12738388 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738849#action_12738849 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738830#action_12738830 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738573#action_12738573 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738786#action_12738786 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738768#action_12738768 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738460#action_12738460 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738778#action_12738778 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738574#action_12738574 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738611#action_12738611 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738701#action_12738701 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738842#action_12738842 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738623#action_12738623 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738738#action_12738738 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738790#action_12738790 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738473#action_12738473 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738891#action_12738891 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738491#action_12738491 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738592#action_12738592 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738645#action_12738645 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738373#action_12738373 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738665#action_12738665 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738886#action_12738886 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738890#action_12738890 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738511#action_12738511 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738658#action_12738658 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738485#action_12738485 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738409#action_12738409 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738474#action_12738474 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738719#action_12738719 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738452#action_12738452 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738876#action_12738876 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738867#action_12738867 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738503#action_12738503 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738868#action_12738868 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738412#action_12738412 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738673#action_12738673 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738885#action_12738885 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738453#action_12738453 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738622#action_12738622 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738796#action_12738796 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738392#action_12738392 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738398#action_12738398 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738726#action_12738726 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738858#action_12738858 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738843#action_12738843 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738819#action_12738819 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738549#action_12738549 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738421#action_12738421 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738769#action_12738769 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738440#action_12738440 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738629#action_12738629 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738822#action_12738822 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738789#action_12738789 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738873#action_12738873 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738548#action_12738548 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738720#action_12738720 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738847#action_12738847 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738387#action_12738387 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738397#action_12738397 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738710#action_12738710 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738428#action_12738428 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738760#action_12738760 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738837#action_12738837 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738875#action_12738875 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738639#action_12738639 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738393#action_12738393 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738682#action_12738682 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738486#action_12738486 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738695#action_12738695 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738657#action_12738657 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738739#action_12738739 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738857#action_12738857 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738801#action_12738801 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738582#action_12738582 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738630#action_12738630 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738441#action_12738441 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738821#action_12738821 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738378#action_12738378 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738872#action_12738872 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738759#action_12738759 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738725#action_12738725 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738779#action_12738779 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738664#action_12738664 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738774#action_12738774 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738436#action_12738436 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738492#action_12738492 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738459#action_12738459 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738681#action_12738681 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dmitry Vorobyev updated SHINDIG-1138:
-------------------------------------

    Summary: Gadget Url Renderer: parameters substitution  (was: Gadget Url Renderer)

> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738797#action_12738797 ] 

Dmitry Vorobyev commented on SHINDIG-1138:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> Gadget Url Renderer: parameters substitution
> --------------------------------------------
>
>                 Key: SHINDIG-1138
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1138
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: 1.1-BETA2
>            Reporter: Dmitry Vorobyev
>            Priority: Minor
>             Fix For: 1.1-BETA2
>
>
> Substitute __MODULE_ID__ and other parameters in url. 
> ### Eclipse Workspace Patch 1.0
> #P shindig
> Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
> ===================================================================
> --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(revision 800379)
> +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php	(working copy)
> @@ -32,9 +32,7 @@
>    public function renderGadget(Gadget $gadget, $view) {
>      // Preserve existing query string parameters.
>      $redirURI = $view['href'];
> -    $queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';
> -    $query = $queryStr;
> -    $query .= $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
> +    $query = $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs);
>      $features = array();
>      $forcedLibs = Config::get('focedJsLibs');
>      if ($forcedLibs == null) {
> @@ -45,10 +43,15 @@
>      $query .= $this->appendLibsToQuery($features);
>      $query .= '&lang=' . urlencode(isset($_GET['lang']) ? $_GET['lang'] : 'en');
>      $query .= '&country=' . urlencode(isset($_GET['country']) ? $_GET['country'] : 'US');
> -    if (substr($query, 0, 1) == '&') {
> -      $query = '?' . substr($query, 1);
> +    
> +    $redirURI = $gadget->substitutions->substituteUri(null, $redirURI);
> +    if (strpos($redirURI, '?') !== false) {
> +        $redirURI = $redirURI . $query;
> +    } elseif (substr($query, 0, 1) == '&') {
> +        $redirURI = $redirURI . '?' . substr($query, 1);
> +    } else {
> +        $redirURI = $redirURI . '?' . $query;
>      }
> -    $redirURI .= $query;
>      header('Location: ' . $redirURI);
>    }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.