Skip to content

Commit

Permalink
change != to < on version condition
Browse files Browse the repository at this point in the history
  • Loading branch information
inbal-ben-david committed Jan 9, 2018
1 parent 6f867d1 commit a4ad634
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public function __construct($templateName, DoubleClickDistributionProfile $profi
$this->addDfpMrssNameSpaces();
$this->setTemplateNodes();
$this->setProfileProperties($profile);
if($version != 2)
if($version < 2)
$this->setItemsPerPage($profile->getItemsPerPage());
}

Expand Down Expand Up @@ -272,7 +272,7 @@ public function setCategories($values, $item)
if (!$category)
continue;
$categoryNode = $this->category->cloneNode(true);
if($this->version != 2)
if($this->version < 2)
{
$categoryNode->nodeValue = $category;
$mediaGroupNode = $item->getElementsByTagName('group')->item(0);
Expand Down Expand Up @@ -365,7 +365,7 @@ public function setFlavorAssets(DOMElement $item, array $flavorAssets)
{
/* @var $flavorAsset flavorAsset */
$content = $this->content->cloneNode(true);
if($this->version != 2)
if($this->version < 2)
{
$mediaGroup = $this->xpath->query('media:group', $item)->item(0);
$mediaGroup->appendChild($content);
Expand Down Expand Up @@ -400,7 +400,7 @@ public function setFlavorAssets(DOMElement $item, array $flavorAssets)

kXml::setNodeValue($this->xpath,'@url', $url, $content);
kXml::setNodeValue($this->xpath,'@duration', (int)$flavorAsset->getentry()->getDuration(), $content);
if($this->version != 2)
if($this->version < 2)
{
kXml::setNodeValue($this->xpath,'@type', $type, $content);
kXml::setNodeValue($this->xpath,'@fileSize', (int)$flavorAsset->getSize(), $content);
Expand All @@ -423,7 +423,7 @@ public function setThumbAssets(DOMElement $item, array $thumbAssets)
{
/* @var $flavorAsset flavorAsset */
$content = $this->thumbnail->cloneNode(true);
if($this->version != 2)
if($this->version < 2)
{
$mediaGroup = $this->xpath->query('media:group', $item)->item(0);
$mediaGroup->appendChild($content);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ protected function createFeedGenerator($context)

$feed = new DoubleClickFeed($templateName, $this->profile, $context->version);

if($context->version != 2)
if($context->version < 2)
{
$feed->setTotalResult($context->totalCount);
$feed->setStartIndex(($context->page - 1) * $this->profile->getItemsPerPage() + 1);
Expand Down

0 comments on commit a4ad634

Please sign in to comment.