Return-Path: Delivered-To: apmail-incubator-shindig-issues-archive@minotaur.apache.org Received: (qmail 42756 invoked from network); 3 Aug 2009 15:23:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 3 Aug 2009 15:23:32 -0000 Received: (qmail 71210 invoked by uid 500); 3 Aug 2009 15:23:37 -0000 Delivered-To: apmail-incubator-shindig-issues-archive@incubator.apache.org Received: (qmail 71149 invoked by uid 500); 3 Aug 2009 15:23:37 -0000 Mailing-List: contact shindig-issues-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: shindig-dev@incubator.apache.org Delivered-To: mailing list shindig-issues@incubator.apache.org Received: (qmail 71139 invoked by uid 99); 3 Aug 2009 15:23:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Aug 2009 15:23:37 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Aug 2009 15:23:35 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 1657B234C04B for ; Mon, 3 Aug 2009 08:23:15 -0700 (PDT) Message-ID: <1763985025.1249312995090.JavaMail.jira@brutus> Date: Mon, 3 Aug 2009 08:23:15 -0700 (PDT) From: "Dmitry Vorobyev (JIRA)" To: shindig-issues@incubator.apache.org Subject: [jira] Commented: (SHINDIG-1138) Gadget Url Renderer: parameters substitution In-Reply-To: <654444777.1249310114803.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/SHINDIG-1138?page=3Dcom.atlassi= an.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D12= 738388#action_12738388 ]=20 Dmitry Vorobyev commented on SHINDIG-1138: ------------------------------------------ =D0=9F=D1=80=D0=BE=D1=88=D1=83 =D0=BF=D1=80=D0=BE=D1=89=D0=B5=D0=BD=D0=B8= =D1=8F, =D0=BD=D0=BE =D1=8D=D1=82=D0=BE=D1=82 =D0=B0=D0=B4=D1=80=D0=B5=D1= =81 =D0=BD=D0=B5 =D1=8F=D0=B2=D0=BB=D1=8F=D0=B5=D1=82=D1=81=D1=8F =D0=BC=D0= =BE=D0=B8=D0=BC =D0=BE=D1=81=D0=BD=D0=BE=D0=B2=D0=BD=D1=8B=D0=BC =D0=B8 =D0= =BF=D1=80=D0=BE=D0=B2=D0=B5=D1=80=D1=8F=D0=B5=D1=82=D1=81=D1=8F =D0=BE=D1= =82 =D1=81=D0=BB=D1=83=D1=87=D0=B0=D1=8F =D0=BA =D1=81=D0=BB=D1=83=D1=87=D0= =B0=D1=8E. =D0=95=D1=81=D0=BB=D0=B8 =D0=BD=D1=83=D0=B6=D0=BD=D0=BE =D1=81= =D1=80=D0=BE=D1=87=D0=BD=D0=BE =D1=81=D0=BE =D0=BC=D0=BD=D0=BE=D0=B9 =D1=81= =D0=B2=D1=8F=D0=B7=D0=B0=D1=82=D1=8C=D1=81=D1=8F, =D1=82=D0=BE =D0=BF=D0=B8= =D1=88=D0=B8=D1=82=D0=B5 =D0=BD=D0=B0 =D0=B3=D1=83=D0=B3=D0=BB=D0=BE=D0=BF= =D0=BE=D1=87=D1=82=D1=83, =D0=BD=D0=B0=D1=87=D0=B0=D0=BB=D0=BE =D0=B0=D0=B4= =D1=80=D0=B5=D1=81=D0=B0 =D1=82=D0=B0=D0=BA=D0=BE=D0=B5 =D0=B6=D0=B5 =D0=BA= =D0=B0=D0=BA =D0=B8 =D1=82=D1=83=D1=82. =D0=95=D1=81=D0=BB=D0=B8 =D1=82=D1=8B =D1=80=D0=BE=D0=B1=D0=BE=D1=82, =D1= =82=D0=BE =D0=BF=D1=80=D0=BE=D1=88=D1=83 =D0=BF=D1=80=D0=BE=D1=89=D0=B5=D0= =BD=D0=B8=D1=8F =D0=B5=D1=89=D0=B5 =D1=80=D0=B0=D0=B7, =D1=8F =D0=BD=D0=B5 = =D1=83=D1=81=D0=BF=D0=B5=D0=BB =D0=BF=D0=BE=D0=BA=D0=B0 =D0=BD=D0=B0=D1=81= =D1=82=D1=80=D0=BE=D0=B8=D1=82=D1=8C =D1=84=D0=B8=D0=BB=D1=8C=D1=82=D1=80= =D1=8B. > 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.=20 > ### Eclipse Workspace Patch 1.0 > #P shindig > Index: http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/ga= dgets/render/GadgetUrlRenderer.php > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadge= ts/render/GadgetUrlRenderer.php=09(revision 800379) > +++ http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadge= ts/render/GadgetUrlRenderer.php=09(working copy) > @@ -32,9 +32,7 @@ > public function renderGadget(Gadget $gadget, $view) { > // Preserve existing query string parameters. > $redirURI =3D $view['href']; > - $queryStr =3D strpos($redirURI, '?') !=3D=3D false ? substr($redirUR= I, strpos($redirURI, '?')) : ''; > - $query =3D $queryStr; > - $query .=3D $this->getPrefsQueryString($gadget->gadgetSpec->userPref= s); > + $query =3D $this->getPrefsQueryString($gadget->gadgetSpec->userPrefs= ); > $features =3D array(); > $forcedLibs =3D Config::get('focedJsLibs'); > if ($forcedLibs =3D=3D null) { > @@ -45,10 +43,15 @@ > $query .=3D $this->appendLibsToQuery($features); > $query .=3D '&lang=3D' . urlencode(isset($_GET['lang']) ? $_GET['lan= g'] : 'en'); > $query .=3D '&country=3D' . urlencode(isset($_GET['country']) ? $_GE= T['country'] : 'US'); > - if (substr($query, 0, 1) =3D=3D '&') { > - $query =3D '?' . substr($query, 1); > + =20 > + $redirURI =3D $gadget->substitutions->substituteUri(null, $redirURI)= ; > + if (strpos($redirURI, '?') !=3D=3D false) { > + $redirURI =3D $redirURI . $query; > + } elseif (substr($query, 0, 1) =3D=3D '&') { > + $redirURI =3D $redirURI . '?' . substr($query, 1); > + } else { > + $redirURI =3D $redirURI . '?' . $query; > } > - $redirURI .=3D $query; > header('Location: ' . $redirURI); > } > =20 --=20 This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.