Author: chabotc
Date: Sun May 10 19:54:10 2009
New Revision: 773398
URL: http://svn.apache.org/viewvc?rev=773398&view=rev
Log:
Add a zero value module id to the substitutions so translations behave well
even if no token is present on the render iframe url
Modified:
incubator/shindig/trunk/php/src/gadgets/GadgetFactory.php
Modified: incubator/shindig/trunk/php/src/gadgets/GadgetFactory.php
URL:
http://svn.apache.org/viewvc/incubator/shindig/trunk/php/src/gadgets/GadgetFactory.php?rev=773398&r1=773397&r2=773398&view=diff
==============================================================================
--- incubator/shindig/trunk/php/src/gadgets/GadgetFactory.php (original)
+++ incubator/shindig/trunk/php/src/gadgets/GadgetFactory.php Sun May 10
19:54:10 2009
@@ -119,6 +119,8 @@
$gadget->substitutions = new Substitutions();
if ($this->token) {
$gadget->substitutions->addSubstitution('MODULE', "ID",
$this->token->getModuleId());
+ } else {
+ $gadget->substitutions->addSubstitution('MODULE', "ID", 0);
}
if ($gadget->gadgetSpec->locales) {
$gadget->substitutions->addSubstitutions('MSG',
$gadget->gadgetSpec->locales);