Skip to content

Commit

Permalink
replaced the opGDataDocument::NAMESPACE class constant to opGDataDocu…
Browse files Browse the repository at this point in the history
…ment::GDATA_NAMESPACE because "namespace" is reserved word in PHP 5.3+ (fixes #1012)
  • Loading branch information
Kousuke Ebihara committed Apr 29, 2010
1 parent fc30604 commit 06a6254
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions lib/api/opAPICommunityEvent.class.php
Expand Up @@ -34,7 +34,7 @@ public function insert(SimpleXMLElement $xml)
}
}

$gd = $xml->children(opGDataDocument::NAMESPACE);
$gd = $xml->children(opGDataDocument::GDATA_NAMESPACE);
if (!$gd)
{
return false;
Expand Down Expand Up @@ -84,13 +84,13 @@ public function createEntryByInstance(Doctrine_Record $event, SimpleXMLElement $

public function addWhenElement($entry, $startTime)
{
$child = $entry->addChild('when', '', opGDataDocument::NAMESPACE);
$child = $entry->addChild('when', '', opGDataDocument::GDATA_NAMESPACE);
$child->addAttribute('startTime', $startTime);
}

public function addWhereElement($entry, $valueString)
{
$child = $entry->addChild('where', '', opGDataDocument::NAMESPACE);
$child = $entry->addChild('where', '', opGDataDocument::GDATA_NAMESPACE);
$child->addAttribute('valueString', $valueString);
}
}
2 changes: 1 addition & 1 deletion lib/api/opGDataDocument.class.php
Expand Up @@ -20,7 +20,7 @@ abstract class opGDataDocument
protected $elements;

const XML_DECLARATION = '<?xml version="1.0" encoding="UTF-8"?>';
const NAMESPACE = 'http://schemas.google.com/g/2005';
const GDATA_NAMESPACE = 'http://schemas.google.com/g/2005';

public function __construct($input = '')
{
Expand Down
2 changes: 1 addition & 1 deletion lib/api/opGDataDocumentEntry.class.php
Expand Up @@ -38,7 +38,7 @@ public function __construct($entry = null, $isInsert = false)

protected function getRootXMLString()
{
$string = self::XML_DECLARATION.'<entry xmlns="http://www.w3.org/2005/Atom" xmlns:gd="'.self::NAMESPACE.'"></entry>';
$string = self::XML_DECLARATION.'<entry xmlns="http://www.w3.org/2005/Atom" xmlns:gd="'.self::GDATA_NAMESPACE.'"></entry>';
return $string;
}

Expand Down

0 comments on commit 06a6254

Please sign in to comment.