You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by ch...@apache.org on 2008/10/09 10:39:33 UTC
svn commit: r703103 - in /incubator/shindig/trunk/php/src:
common/UrlGenerator.php gadgets/Gadget.php gadgets/GadgetSpecParser.php
Author: chabotc
Date: Thu Oct 9 01:39:33 2008
New Revision: 703103
URL: http://svn.apache.org/viewvc?rev=703103&view=rev
Log:
SHINDIG-644 by Eiji Kitamura, v param improvement on JsonRpcRequest
Modified:
incubator/shindig/trunk/php/src/common/UrlGenerator.php
incubator/shindig/trunk/php/src/gadgets/Gadget.php
incubator/shindig/trunk/php/src/gadgets/GadgetSpecParser.php
Modified: incubator/shindig/trunk/php/src/common/UrlGenerator.php
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/php/src/common/UrlGenerator.php?rev=703103&r1=703102&r2=703103&view=diff
==============================================================================
--- incubator/shindig/trunk/php/src/common/UrlGenerator.php (original)
+++ incubator/shindig/trunk/php/src/common/UrlGenerator.php Thu Oct 9 01:39:33 2008
@@ -22,15 +22,7 @@
static function getIframeURL($gadget, $context)
{
- $inlineJs = '';
- foreach ($gadget->getJsLibraries() as $library) {
- $type = $library->getType();
- if ($type != 'URL') {
- $inlineJs .= $library->getContent() . "\n";
- }
- }
- $v = md5($inlineJs);
-
+ $v = $gadget->getChecksum();
$view = HttpUtil::getView($gadget, $context);
$up = '';
Modified: incubator/shindig/trunk/php/src/gadgets/Gadget.php
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/php/src/gadgets/Gadget.php?rev=703103&r1=703102&r2=703103&view=diff
==============================================================================
--- incubator/shindig/trunk/php/src/gadgets/Gadget.php (original)
+++ incubator/shindig/trunk/php/src/gadgets/Gadget.php Thu Oct 9 01:39:33 2008
@@ -29,6 +29,7 @@
private $userPrefValues;
private $oAuthSpec;
private $messageBundle = array();
+ private $checksum;
public $contentTypes = array('HTML', 'URL');
public $id;
public $author;
@@ -321,6 +322,16 @@
{
$this->oAuthSpec = $oAuthSpec;
}
+
+ public function setChecksum($xml)
+ {
+ $this->checksum = md5($xml);
+ }
+
+ public function getChecksum($xml)
+ {
+ return $this->checksum;
+ }
}
Modified: incubator/shindig/trunk/php/src/gadgets/GadgetSpecParser.php
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/php/src/gadgets/GadgetSpecParser.php?rev=703103&r1=703102&r2=703103&view=diff
==============================================================================
--- incubator/shindig/trunk/php/src/gadgets/GadgetSpecParser.php (original)
+++ incubator/shindig/trunk/php/src/gadgets/GadgetSpecParser.php Thu Oct 9 01:39:33 2008
@@ -43,6 +43,10 @@
throw new SpecParserException("Missing or duplicated <ModulePrefs>");
}
$gadget = new Gadget($context->getGadgetId(), $context);
+
+ // record Checksum to trace xml version
+ $gadget->setChecksum($xml);
+
// process ModulePref attributes
$this->processModulePrefs($gadget, $doc->ModulePrefs, $context);
if (isset($doc->ModulePrefs->OAuth)) {