Jump to content

Api V1 Getzonelistbypublisherid And Chainedzoneid


onad

Recommended Posts

Was able to find the below regarding this matter ...

 

https://www.openhub.net/p/openx-source/commits/350631737

  www/api/v2/xmlrpc/ZoneXmlRpcService.php

  lib/xmlrpc/php/ZoneInfo.php

 

https://www.openhub.net/p/openx-source/commits/350631736

  lib/OA/Dll/tests/unit/Zone.dll.test.php

  lib/OA/Dll/ZoneInfo.php

  lib/OA/Dll/Zone.php

 

 

So does it mean that the v1 version was not updated with the chainedZoneId like the v2 - and now v1 doesn't work when doing the "getZoneListByPublisherId"?

Link to comment
Share on other sites

Super!

 

 

Got the "getZoneListByPublisherId" working (or at least displayed) again with API v1 by adding else to the to file ....

 

lib/OA/Dll/Zone.php

    function _setZoneDataFromArray(&$oZone, $zoneData)
    {
        $zoneData['publisherId']    = $zoneData['affiliateid'];
        $zoneData['zoneId']         = $zoneData['zoneid'];
        $zoneData['type']           = $zoneData['delivery'];
        $zoneData['zoneName']       = $zoneData['zonename'];
        $zoneData['sessionCapping'] = $zoneData['session_capping'];
        $zoneData['block']          = $zoneData['block'];

        if (preg_match('/^zone:(\d+)$/D', $zoneData['chain'], $m)) {
            $zoneData['chainedZoneId'] = (int)$m[1];
        }
	else{
            $zoneData['chainedZoneId'] = 0;
	    }

        $oZone->readDataFromArray($zoneData);
        return  true;
    }
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...