コード例 #1
0
	public function execute() {
		$masterAccountSettings = Gpf_Settings::getAccountSettings(Gpf_Application::getInstance()->getAccountId());
			
		if ($masterAccountSettings->get(Pap_settings::NOTIFICATION_DAILY_REPORT) ||
		$masterAccountSettings->get(Pap_settings::NOTIFICATION_WEEKLY_REPORT) ||
		$masterAccountSettings->get(Pap_settings::NOTIFICATION_MONTHLY_REPORT) ||
		Gpf_Settings::get(Pap_settings::AFF_NOTIFICATION_DAILY_REPORT_ENABLED) ||
		Gpf_Settings::get(Pap_settings::AFF_NOTIFICATION_DAILY_REPORT_DEFAULT) ||
		Gpf_Settings::get(Pap_settings::AFF_NOTIFICATION_WEEKLY_REPORT_ENABLED) ||
		Gpf_Settings::get(Pap_settings::AFF_NOTIFICATION_WEEKLY_REPORT_DEFAULT) ||
		Gpf_Settings::get(Pap_settings::AFF_NOTIFICATION_MONTHLY_REPORT_ENABLED) ||
		Gpf_Settings::get(Pap_settings::AFF_NOTIFICATION_MONTHLY_REPORT_DEFAULT)) {
			$this->saveReportsSendTask();
		}
	}
 /**
  * @return Gpf_Settings_AccountSettings
  */
 protected function createAccountSettings() {
 	$campaign = new Pap_Common_Campaign();
 	$campaign->setId($this->transaction->getCampaignId());
 	try {
 		$campaign->load();
 		return Gpf_Settings::getAccountSettings($campaign->getAccountId());
 	} catch (Gpf_Exception $e) {
 	}
 	return Gpf_Settings::getAccountSettings(Gpf_Db_Account::DEFAULT_ACCOUNT_ID);
 }
コード例 #3
0
ファイル: Impression.php プロジェクト: AmineCherrai/rostanvo
 protected function initSettings()
 {
     if (!is_null($this->task) && !is_null($this->task->getAccountId()) && $this->task->getAccountId() !== '') {
         $this->accountSettings = Gpf_Settings::getAccountSettings($this->task->getAccountId());
         return;
     }
     $this->accountSettings = Gpf_Settings::getAccountSettings(Gpf_Application::getInstance()->getAccountId());
 }
コード例 #4
0
 /**
  * This method will be removed when all accounts will be able own affiliates
  */
 protected function isMailReportOn() {
 	$masterMerchantSettings = Gpf_Settings::getAccountSettings(Gpf_Application::getInstance()->getAccountId());
 	$masterMerchantReports = $masterMerchantSettings->get(Pap_Settings::NOTIFICATION_DAILY_REPORT) == Gpf::YES ||
    		$masterMerchantSettings->get(Pap_Settings::NOTIFICATION_WEEKLY_REPORT) == Gpf::YES ||
    		$masterMerchantSettings->get(Pap_Settings::NOTIFICATION_MONTHLY_REPORT) == Gpf::YES;
    	
 	return $masterMerchantReports || $this->isReportsForAffiliatesEnabled();
 }