Commit 119879cb authored by Gregory Roussac's avatar Gregory Roussac
parent 66c304ff
......@@ -3243,10 +3243,9 @@ exit;
}
/**
* Allows to display the category description without HTML tags and slashes
*
* @return string
*/
* Allows to display the category description without HTML tags and slashes
* @return string
*/
public static function getDescriptionClean($description)
{
return strip_tags(stripslashes($description));
......@@ -3288,7 +3287,7 @@ exit;
// http://developers.whatwg.org/the-video-element.html#the-video-element
if ($def = $config->maybeGetRawHTMLDefinition())
{
$def->addElement('video', 'Block', 'Optional: (source, Flow) | (Flow, source) | Flow', 'Common', array(
$def->addElement('video', 'Block', 'Optional: (source, Flow) | (Flow, source) | Flow', 'Common', array(
'src' => 'URI',
'type' => 'Text',
'width' => 'Length',
......@@ -3297,7 +3296,7 @@ exit;
'preload' => 'Enum#auto,metadata,none',
'controls' => 'Bool',
));
$def->addElement('source', 'Block', 'Flow', 'Common', array(
$def->addElement('source', 'Block', 'Flow', 'Common', array(
'src' => 'URI',
'type' => 'Text',
));
......@@ -3316,6 +3315,17 @@ exit;
return $html;
}
/**
* Check if a constant was already defined
* @param string $constant Constant name
* @param mixed $value Default value to set if not defined
*/
public static function safeDefine($constant, $value)
{
if (!defined($constant))
define($constant, $value);
}
}
/**
......
......@@ -55,7 +55,7 @@ define('_THEME_MOBILE_JS_DIR_', _THEME_MOBILE_DIR_.'js/');
define('_PS_THEME_TOUCHPAD_DIR_', _PS_THEME_DIR_.'touchpad/');
define('_THEME_TOUCHPAD_DIR_', _THEMES_DIR_._THEME_NAME_.'/touchpad/');
define('_THEME_TOUCHPAD_CSS_DIR_', _THEME_TOUCHPAD_DIR_.'css/');
define('_THEME_TOUCHPAD_JS_DIR_', _THEME_TOUCHPAD_DIR_.'js/');
define('_THEME_TOUCHPAD_JS_DIR_', _THEME_TOUCHPAD_DIR_.'js/');
/* Image URLs */
define('_PS_IMG_', __PS_BASE_URI__.'img/');
......@@ -82,12 +82,9 @@ define('_THEME_PROD_PIC_DIR_', __PS_BASE_URI__.'upload/');
define('_MAIL_DIR_', __PS_BASE_URI__.'mails/');
define('_MODULE_DIR_', __PS_BASE_URI__.'modules/');
/* Define API URLs if not defined by customer */
define('_PS_API_DOMAIN_', 'api.prestashop.com');
define('_PS_API_URL_', 'http://'._PS_API_DOMAIN_);
define('_PS_API_SSL_URL_', 'https://'._PS_API_DOMAIN_);
define('_PS_TAB_MODULE_LIST_URL_', 'http://'._PS_API_DOMAIN_.'/xml/tab_modules_list.xml');
define('_PS_API_MODULES_LIST_16_', _PS_API_DOMAIN_.'/xml/modules_list_16.xml');
// Different name for currency url. customers could customize just this without affecting all other apis
define('_PS_CURRENCY_FEED_URL_', 'http://'._PS_API_DOMAIN_.'/xml/currencies.xml');
/* Define API URLs if not defined before */
Tools::safeDefine('_PS_API_DOMAIN_', 'api.prestashop.com');
Tools::safeDefine('_PS_API_URL_', 'http://'._PS_API_DOMAIN_);
Tools::safeDefine('_PS_TAB_MODULE_LIST_URL_', _PS_API_URL_.'/xml/tab_modules_list.xml');
Tools::safeDefine('_PS_API_MODULES_LIST_16_', _PS_API_DOMAIN_.'/xml/modules_list_16.xml');
Tools::safeDefine('_PS_CURRENCY_FEED_URL_', _PS_API_URL_.'/xml/currencies.xml');
......@@ -343,7 +343,7 @@ class AdminDashboardControllerCore extends AdminController
{
$return = array('has_errors' => false, 'rss' => array());
if (!$this->isFresh('/config/xml/blog-'.$this->context->language->iso_code.'.xml', 86400))
if (!$this->refresh('/config/xml/blog-'.$this->context->language->iso_code.'.xml', _PS_API_SSL_URL_.'/rss/blog/blog-'.$this->context->language->iso_code.'.xml'))
if (!$this->refresh('/config/xml/blog-'.$this->context->language->iso_code.'.xml', _PS_API_URL_.'/rss/blog/blog-'.$this->context->language->iso_code.'.xml'))
$return['has_errors'] = true;
if (!$return['has_errors'])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment