Uploaded image for project: 'Shindig'
  1. Shindig
  2. SHINDIG-1139

Gadget Url Renderer: parameters substitution

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.1-BETA2
    • 2.0.0
    • PHP
    • None

    Description

      This was originally SHINDIG-1138 by Dmitry Vorobyev, but due to spamming auto responders i've deleted that issue. Original content:

      Substitute _MODULE_ID_ and other parameters in url.

          1. Eclipse Workspace Patch 1.0
            #P shindig
            Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
            ===================================================================
      • $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);
        }

      Attachments

        Activity

          People

            chabotc Chris Chabot
            chabotc Chris Chabot
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: