예제 #1
0
 /**
  * Common data for all request types
  *
  * @return array
  */
 protected function getRequestCommonData()
 {
     $data = array(static::FIELD_VERSION_API => static::MP_API_VERSION, static::FIELD_SHOP_ID => $this->generateShopID(), static::FIELD_SHOP_DOMAIN => \Includes\Utils\ConfigParser::getOptions(array('host_details', 'http_host')), static::FIELD_SHOP_URL => \XLite\Core\URLManager::getShopURL(), static::FIELD_VERSION_CORE_CURRENT => $this->getVersionField(\XLite::getInstance()->getMajorVersion(), \XLite::getInstance()->getMinorVersion()), static::FIELD_XCN_LICENSE_KEY => \XLite::getXCNLicenseKey(), static::FIELD_INSTALLATION_LNG => \XLite::getInstallationLng());
     return $data;
 }
예제 #2
0
파일: RSS.php 프로젝트: kirkbauer2/kirkxc
 /**
  * Return Blog Url
  *
  * @return string
  */
 protected function getBlogUrl()
 {
     return \XLite::getInstallationLng() === 'ru' ? 'http://www.x-cart.ru/blog' : 'http://blog.x-cart.com';
 }
예제 #3
0
 /**
  * Get a Powered By phrase
  *
  * @return string
  */
 protected function getPhrase()
 {
     $phrase = static::PHRASE;
     $installationLng = \XLite::getInstallationLng();
     $currentPhrases = $installationLng && isset($this->phrases[$installationLng]) ? $this->phrases[$installationLng] : $this->phrases['en'];
     if (isset($currentPhrases) && is_array($currentPhrases) && 0 < count($currentPhrases)) {
         if (!isset(\XLite\Core\Config::getInstance()->Internal->prnotice_index) || !isset($currentPhrases[\XLite\Core\Config::getInstance()->Internal->prnotice_index])) {
             $index = mt_rand(0, count($currentPhrases) - 1);
             \XLite\Core\Database::getRepo('\\XLite\\Model\\Config')->createOption(array('category' => 'Internal', 'name' => 'prnotice_index', 'value' => $index));
         } else {
             $index = intval(\XLite\Core\Config::getInstance()->Internal->prnotice_index);
         }
         $tmp = $currentPhrases[$index];
         if (is_string($tmp) && 0 < strlen(trim($tmp))) {
             $phrase = $tmp;
         }
     }
     return $phrase;
 }