Author: chabotc
Date: Sun May 10 19:57:10 2009
New Revision: 773399
URL: http://svn.apache.org/viewvc?rev=773399&view=rev
Log:
SHINDIG-1038 by Dmitry Vorobyev, adds country and lang params to the URL for
content type='url' gadgets
Modified:
incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
Modified: incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
URL:
http://svn.apache.org/viewvc/incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php?rev=773399&r1=773398&r2=773399&view=diff
==============================================================================
--- incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php
(original)
+++ incubator/shindig/trunk/php/src/gadgets/render/GadgetUrlRenderer.php Sun
May 10 19:57:10 2009
@@ -1,5 +1,4 @@
<?php
-
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -44,8 +43,8 @@
$features = explode(':', $forcedLibs);
}
$query .= $this->appendLibsToQuery($features);
- // code bugs out with me because of the invalid url syntax since we dont
have a URI class to fix it for us
- // this works around that
+ $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);
}