From 6dbcea7d43969a43b1e2324048c5c6c5ee4e95a7 Mon Sep 17 00:00:00 2001 From: Christopher Gu Date: Sun, 22 Nov 2015 16:10:45 -0800 Subject: [PATCH] Forgot to implement the global exchange-wide SSP and PMP disable flags in global.php This would be used if you are using NginAd as a bidder only without hosting private exchanges. --- upload/config/autoload/global.php | 8 ++++++++ upload/config/autoload/global.php.dist | 10 +++++++++- .../CheckPrivateMarketPlace.php | 13 +++++++++++++ .../CheckSspChannelSelections.php | 13 +++++++++++++ .../CheckPrivateMarketPlace.php | 6 +++++- .../CheckSspChannelSelections.php | 6 +++++- 6 files changed, 53 insertions(+), 3 deletions(-) diff --git a/upload/config/autoload/global.php b/upload/config/autoload/global.php index 714396a..c48787a 100644 --- a/upload/config/autoload/global.php +++ b/upload/config/autoload/global.php @@ -41,6 +41,14 @@ * and are not hosting private exchange customers. */ 'ssp_channel_bypass' => false, + /* + * Bypass private exchange channel selections + * completely and bid on all PMP(Private Marketplace/Platform Exchange) traffic. + * + * Set this to true if you are using NginAd as a bidder + * and are not hosting private exchange customers. + */ + 'pmp_channel_bypass' => false, /* * publisher settings */ diff --git a/upload/config/autoload/global.php.dist b/upload/config/autoload/global.php.dist index 714396a..68772ed 100644 --- a/upload/config/autoload/global.php.dist +++ b/upload/config/autoload/global.php.dist @@ -41,9 +41,17 @@ return array( * and are not hosting private exchange customers. */ 'ssp_channel_bypass' => false, + /* + * Bypass private exchange channel selections + * completely and bid on all PMP(Private Marketplace/Platform Exchange) traffic. + * + * Set this to true if you are using NginAd as a bidder + * and are not hosting private exchange customers. + */ + 'pmp_channel_bypass' => false, /* * publisher settings - */ + */ 'publisher' => array( 'auto_approve_zones' => true, 'auto_approve_websites' => true diff --git a/upload/module/BuyFidelityRTB/src/BuyFidelityRTB/common/workflows/tasklets/common/insertionorderlineitem/CheckPrivateMarketPlace.php b/upload/module/BuyFidelityRTB/src/BuyFidelityRTB/common/workflows/tasklets/common/insertionorderlineitem/CheckPrivateMarketPlace.php index 315d5b1..df1b82f 100644 --- a/upload/module/BuyFidelityRTB/src/BuyFidelityRTB/common/workflows/tasklets/common/insertionorderlineitem/CheckPrivateMarketPlace.php +++ b/upload/module/BuyFidelityRTB/src/BuyFidelityRTB/common/workflows/tasklets/common/insertionorderlineitem/CheckPrivateMarketPlace.php @@ -6,6 +6,19 @@ class CheckPrivateMarketPlace { public static function execute(&$Logger, &$Workflow, \model\openrtb\RtbBidRequest &$RtbBidRequest, \model\openrtb\RtbBidRequestImp &$RtbBidRequestImp, &$InsertionOrderLineItem) { + /* + * Skip this decision for the test user installed + * user_login = suckmedia + * + * Also enable the global exchange PMP selection + * bypass if set to true in config/autoload/global.php + */ + + if ($InsertionOrderLineItem->UserID == TEST_USER_DEMAND + || $Workflow->config['settings']['pmp_channel_bypass'] === true): + return true; + endif; + /* * A. Check to see if this is a private auction * from another exchange. If so lets ignore it since diff --git a/upload/module/BuyFidelityRTB/src/BuyFidelityRTB/common/workflows/tasklets/common/insertionorderlineitem/CheckSspChannelSelections.php b/upload/module/BuyFidelityRTB/src/BuyFidelityRTB/common/workflows/tasklets/common/insertionorderlineitem/CheckSspChannelSelections.php index d08a789..34d9f20 100644 --- a/upload/module/BuyFidelityRTB/src/BuyFidelityRTB/common/workflows/tasklets/common/insertionorderlineitem/CheckSspChannelSelections.php +++ b/upload/module/BuyFidelityRTB/src/BuyFidelityRTB/common/workflows/tasklets/common/insertionorderlineitem/CheckSspChannelSelections.php @@ -6,6 +6,19 @@ class CheckSspChannelSelections { public static function execute(&$Logger, &$Workflow, \model\openrtb\RtbBidRequest &$RtbBidRequest, \model\openrtb\RtbBidRequestImp &$RtbBidRequestImp, &$InsertionOrderLineItem) { + /* + * Skip this decision for the test user installed + * user_login = suckmedia + * + * Also enable the global exchange SSP selection + * bypass if set to true in config/autoload/global.php + */ + + if ($InsertionOrderLineItem->UserID == TEST_USER_DEMAND + || $Workflow->config['settings']['ssp_channel_bypass'] === true): + return true; + endif; + /* * From NginAd 1.6 on, SSP inventory will only be available * to private exchange Domain Admins on an explicit basis. diff --git a/upload/module/BuyGenericRTB/src/BuyGenericRTB/common/workflows/tasklets/common/insertionorderlineitem/CheckPrivateMarketPlace.php b/upload/module/BuyGenericRTB/src/BuyGenericRTB/common/workflows/tasklets/common/insertionorderlineitem/CheckPrivateMarketPlace.php index d76f49a..b915077 100644 --- a/upload/module/BuyGenericRTB/src/BuyGenericRTB/common/workflows/tasklets/common/insertionorderlineitem/CheckPrivateMarketPlace.php +++ b/upload/module/BuyGenericRTB/src/BuyGenericRTB/common/workflows/tasklets/common/insertionorderlineitem/CheckPrivateMarketPlace.php @@ -9,9 +9,13 @@ public static function execute(&$Logger, &$Workflow, \model\openrtb\RtbBidReques /* * Skip this decision for the test user installed * user_login = suckmedia + * + * Also enable the global exchange PMP selection + * bypass if set to true in config/autoload/global.php */ - if ($InsertionOrderLineItem->UserID == TEST_USER_DEMAND): + if ($InsertionOrderLineItem->UserID == TEST_USER_DEMAND + || $Workflow->config['settings']['pmp_channel_bypass'] === true): return true; endif; diff --git a/upload/module/BuyGenericRTB/src/BuyGenericRTB/common/workflows/tasklets/common/insertionorderlineitem/CheckSspChannelSelections.php b/upload/module/BuyGenericRTB/src/BuyGenericRTB/common/workflows/tasklets/common/insertionorderlineitem/CheckSspChannelSelections.php index 3d07520..e24d5fc 100644 --- a/upload/module/BuyGenericRTB/src/BuyGenericRTB/common/workflows/tasklets/common/insertionorderlineitem/CheckSspChannelSelections.php +++ b/upload/module/BuyGenericRTB/src/BuyGenericRTB/common/workflows/tasklets/common/insertionorderlineitem/CheckSspChannelSelections.php @@ -9,9 +9,13 @@ public static function execute(&$Logger, &$Workflow, \model\openrtb\RtbBidReques /* * Skip this decision for the test user installed * user_login = suckmedia + * + * Also enable the global exchange SSP selection + * bypass if set to true in config/autoload/global.php */ - if ($InsertionOrderLineItem->UserID == TEST_USER_DEMAND): + if ($InsertionOrderLineItem->UserID == TEST_USER_DEMAND + || $Workflow->config['settings']['ssp_channel_bypass'] === true): return true; endif;