// Merge -> revision 8984

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8988 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rMalie
2011-10-03 15:48:07 +00:00
parent 79115b2572
commit ae5fc92bf7
60 changed files with 669 additions and 356 deletions
+1 -38
View File
@@ -1427,46 +1427,9 @@ $this->standalone = true;
}
}
if ($this->apacheModExists('evasive'))
if (Tools::apacheModExists('evasive'))
sleep(1);
}
/**
* apacheModExists return true if the apache module $name is loaded
* @TODO move this method in class Information (when it will exist)
*
* @param string $name module name
* @return boolean true if exists
*/
function apacheModExists($name)
{
if(function_exists('apache_get_modules'))
{
static $apacheModuleList = null;
if (!is_array($apacheModuleList))
$apacheModuleList = apache_get_modules();
// we need strpos (example can be evasive20
foreach($apacheModuleList as $module)
{
if (strpos($module, $name)!==false)
return true;
}
}
else{
// If apache_get_modules does not exists,
// one solution should be parsing httpd.conf,
// but we could simple parse phpinfo(INFO_MODULES) return string
ob_start();
phpinfo(INFO_MODULES);
$phpinfo = ob_get_contents();
ob_end_clean();
if (strpos($phpinfo, $module) !== false)
return true;
}
return false;
}
private function _getJsErrorMsgs()
{
+4
View File
@@ -0,0 +1,4 @@
<?php
global $_MODULE;
$_MODULE = array();
+4
View File
@@ -0,0 +1,4 @@
<?php
global $_MODULE;
$_MODULE = array();
+4
View File
@@ -0,0 +1,4 @@
<?php
global $_MODULE;
$_MODULE = array();
+4
View File
@@ -0,0 +1,4 @@
<?php
global $_MODULE;
$_MODULE = array();
+4
View File
@@ -0,0 +1,4 @@
<?php
global $_MODULE;
$_MODULE = array();
+29
View File
@@ -87,6 +87,7 @@ function initSliders()
function initLayered()
{
initSliders();
initLocationChange();
if (window.location.href.split('#').length == 2 && window.location.href.split('#')[1] != '')
{
var params = window.location.href.split('#')[1];
@@ -312,3 +313,31 @@ function reloadContent(params_plus)
});
ajaxQueries.push(ajaxQuery);
}
function initLocationChange(func, time) {
if(!time) time = 500;
var currLoc = '';
setInterval(function()
{
if(window.location.href != currLoc)
{
currLoc = window.location.href;
// Don't reload page if current_friendly_url and real url match
if (window.location.href.split('#').length == 2 && window.location.href.split('#')[1] != '')
current_url = '#'+window.location.href.split('#')[1];
else
current_url = '';
if (current_friendly_url.replace(/^#(\/)?/, '') == current_url.replace(/^#(\/)?/, ''))
return;
if (window.location.href.split('#').length == 2 && window.location.href.split('#')[1] != '')
{
var params = window.location.href.split('#')[1];
reloadContent('&selected_filters='+params);
}
else
reloadContent('&selected_filters=#');
}
}, time);
}
+13 -13
View File
@@ -484,7 +484,7 @@ class BlockLayered extends Module
$id_lang = (int)$language['id_lang'];
Db::getInstance()->Execute('INSERT INTO '._DB_PREFIX_.'layered_indexable_feature_lang
VALUES ('.(int)$params['id_feature'].', '.$id_lang.', \''.Tools::link_rewrite(Tools::getValue('url_name_'.$id_lang)).'\',
\''.pSQL(htmlspecialchars(Tools::getValue('meta_title_'.$id_lang))).'\')');
\''.pSQL(Tools::safeOutput(Tools::getValue('meta_title_'.$id_lang), true)).'\')');
}
}
@@ -500,7 +500,7 @@ class BlockLayered extends Module
$id_lang = (int)$language['id_lang'];
Db::getInstance()->Execute('INSERT INTO '._DB_PREFIX_.'layered_indexable_feature_value_lang
VALUES ('.(int)$params['id_feature_value'].', '.$id_lang.', \''.Tools::link_rewrite(Tools::getValue('url_name_'.$id_lang)).'\',
\''.pSQL(htmlspecialchars(Tools::getValue('meta_title_'.$id_lang))).'\')');
\''.pSQL(Tools::safeOutput(Tools::getValue('meta_title_'.$id_lang), true)).'\')');
}
}
@@ -537,7 +537,7 @@ class BlockLayered extends Module
foreach ($languages as $language)
$return .= '
<div id="url_name_'.$language['id_lang'].'" style="display: '.($language['id_lang'] == $default_form_language ? 'block' : 'none').'; float: left;">
<input size="33" type="text" name="url_name_'.$language['id_lang'].'" value="'.htmlspecialchars(@$langValue[$language['id_lang']]['url_name']).'" />
<input size="33" type="text" name="url_name_'.$language['id_lang'].'" value="'.Tools::safeOutput(@$langValue[$language['id_lang']]['url_name'], true).'" />
<span class="hint" name="help_box">'.$this->l('Invalid characters:').' <>;=#{}_<span class="hint-pointer">&nbsp;</span></span>
<p style="clear: both">'.$this->l('Specific format in url block layered generation').'</p>
</div>';
@@ -550,7 +550,7 @@ class BlockLayered extends Module
foreach ($languages as $language)
$return .= '
<div id="meta_title_'.$language['id_lang'].'" style="display: '.($language['id_lang'] == $default_form_language ? 'block' : 'none').'; float: left;">
<input size="33" type="text" name="meta_title_'.$language['id_lang'].'" value="'.htmlspecialchars(@$langValue[$language['id_lang']]['meta_title']).'" />
<input size="33" type="text" name="meta_title_'.$language['id_lang'].'" value="'.Tools::safeOutput(@$langValue[$language['id_lang']]['meta_title'], true).'" />
<p style="clear: both">'.$this->l('Specific format for meta title').'</p>
</div>';
$return .= $this->displayFlags($languages, $default_form_language, 'flag_fields', 'meta_title', true, true);
@@ -572,7 +572,7 @@ class BlockLayered extends Module
$id_lang = (int)$language['id_lang'];
Db::getInstance()->Execute('INSERT INTO '._DB_PREFIX_.'layered_indexable_attribute_lang
VALUES ('.(int)$params['id_attribute'].', '.$id_lang.', \''.Tools::link_rewrite(Tools::getValue('url_name_'.$id_lang)).'\',
\''.pSQL(htmlspecialchars(Tools::getValue('meta_title_'.$id_lang))).'\')');
\''.pSQL(Tools::safeOutput(Tools::getValue('meta_title_'.$id_lang), true)).'\')');
}
}
@@ -609,7 +609,7 @@ class BlockLayered extends Module
foreach ($languages as $language)
$return .= '
<div id="url_name_'.$language['id_lang'].'" style="display: '.($language['id_lang'] == $default_form_language ? 'block' : 'none').'; float: left;">
<input size="33" type="text" name="url_name_'.$language['id_lang'].'" value="'.htmlspecialchars(@$langValue[$language['id_lang']]['url_name']).'" />
<input size="33" type="text" name="url_name_'.$language['id_lang'].'" value="'.Tools::safeOutput(@$langValue[$language['id_lang']]['url_name'], true).'" />
<span class="hint" name="help_box">'.$this->l('Invalid characters:').' <>;=#{}_<span class="hint-pointer">&nbsp;</span></span>
<p style="clear: both">'.$this->l('Specific format in url block layered generation').'</p>
</div>';
@@ -622,7 +622,7 @@ class BlockLayered extends Module
foreach ($languages as $language)
$return .= '
<div id="meta_title_'.$language['id_lang'].'" style="display: '.($language['id_lang'] == $default_form_language ? 'block' : 'none').'; float: left;">
<input size="33" type="text" name="meta_title_'.$language['id_lang'].'" value="'.htmlspecialchars(@$langValue[$language['id_lang']]['meta_title']).'" />
<input size="33" type="text" name="meta_title_'.$language['id_lang'].'" value="'.Tools::safeOutput(@$langValue[$language['id_lang']]['meta_title'], true).'" />
<p style="clear: both">'.$this->l('Specific format for meta title').'</p>
</div>';
$return .= $this->displayFlags($languages, $default_form_language, 'flag_fields', 'meta_title', true, true);
@@ -659,7 +659,7 @@ class BlockLayered extends Module
$id_lang = (int)$language['id_lang'];
Db::getInstance()->Execute('INSERT INTO '._DB_PREFIX_.'layered_indexable_attribute_group_lang
VALUES ('.(int)$params['id_attribute_group'].', '.$id_lang.', \''.Tools::link_rewrite(Tools::getValue('url_name_'.$id_lang)).'\',
\''.pSQL(htmlspecialchars(Tools::getValue('meta_title_'.$id_lang))).'\')');
\''.pSQL(Tools::safeOutput(Tools::getValue('meta_title_'.$id_lang), true)).'\')');
}
}
@@ -722,7 +722,7 @@ class BlockLayered extends Module
foreach ($languages as $language)
$return .= '
<div id="url_name_'.$language['id_lang'].'" style="display: '.($language['id_lang'] == $default_form_language ? 'block' : 'none').'; float: left;">
<input size="33" type="text" name="url_name_'.$language['id_lang'].'" value="'.htmlspecialchars(@$langValue[$language['id_lang']]['url_name']).'" />
<input size="33" type="text" name="url_name_'.$language['id_lang'].'" value="'.Tools::safeOutput(@$langValue[$language['id_lang']]['url_name'], true).'" />
<span class="hint" name="help_box">'.$this->l('Invalid characters:').' <>;=#{}_<span class="hint-pointer">&nbsp;</span></span>
<p style="clear: both">'.$this->l('Specific format in url block layered generation').'</p>
</div>';
@@ -735,7 +735,7 @@ class BlockLayered extends Module
foreach ($languages as $language)
$return .= '
<div id="meta_title_'.$language['id_lang'].'" style="display: '.($language['id_lang'] == $default_form_language ? 'block' : 'none').'; float: left;">
<input size="33" type="text" name="meta_title_'.$language['id_lang'].'" value="'.htmlspecialchars(@$langValue[$language['id_lang']]['meta_title']).'" />
<input size="33" type="text" name="meta_title_'.$language['id_lang'].'" value="'.Tools::safeOutput(@$langValue[$language['id_lang']]['meta_title'], true).'" />
<p style="clear: both">'.$this->l('Specific format for meta title').'</p>
</div>';
$return .= $this->displayFlags($languages, $default_form_language, 'flag_fields', 'meta_title', true, true);
@@ -782,7 +782,7 @@ class BlockLayered extends Module
foreach ($languages as $language)
$return .= '
<div id="url_name_'.$language['id_lang'].'" style="display: '.($language['id_lang'] == $default_form_language ? 'block' : 'none').'; float: left;">
<input size="33" type="text" name="url_name_'.$language['id_lang'].'" value="'.htmlspecialchars(@$langValue[$language['id_lang']]['url_name']).'" />
<input size="33" type="text" name="url_name_'.$language['id_lang'].'" value="'.Tools::safeOutput(@$langValue[$language['id_lang']]['url_name'], true).'" />
<span class="hint" name="help_box">'.$this->l('Invalid characters:').' <>;=#{}_<span class="hint-pointer">&nbsp;</span></span>
<p style="clear: both">'.$this->l('Specific format in url block layered generation').'</p>
</div>';
@@ -795,7 +795,7 @@ class BlockLayered extends Module
foreach ($languages as $language)
$return .= '
<div id="meta_title_'.$language['id_lang'].'" style="display: '.($language['id_lang'] == $default_form_language ? 'block' : 'none').'; float: left;">
<input size="33" type="text" name="meta_title_'.$language['id_lang'].'" value="'.htmlspecialchars(@$langValue[$language['id_lang']]['meta_title']).'" />
<input size="33" type="text" name="meta_title_'.$language['id_lang'].'" value="'.Tools::safeOutput(@$langValue[$language['id_lang']]['meta_title'], true).'" />
<p style="clear: both">'.$this->l('Specific format for meta title').'</p>
</div>';
$return .= $this->displayFlags($languages, $default_form_language, 'flag_fields', 'meta_title', true, true);
@@ -1732,7 +1732,7 @@ class BlockLayered extends Module
if(Tools::getValue('selected_filters'))
$url = Tools::getValue('selected_filters');
else
$url = preg_replace('/\/(?:\w*)\/(?:[0-9]+[-\w]*)([^\?]*)\??.*/', '$1', Tools::htmlentitiesUTF8($_SERVER['REQUEST_URI']));
$url = preg_replace('/\/(?:\w*)\/(?:[0-9]+[-\w]*)([^\?]*)\??.*/', '$1', Tools::safeOutput($_SERVER['REQUEST_URI'], true));
$urlAttributes = explode('/',$url);
array_shift($urlAttributes);
+4
View File
@@ -0,0 +1,4 @@
<?php
global $_MODULE;
$_MODULE = array();
+4
View File
@@ -0,0 +1,4 @@
<?php
global $_MODULE;
$_MODULE = array();
+4
View File
@@ -0,0 +1,4 @@
<?php
global $_MODULE;
$_MODULE = array();
+4
View File
@@ -0,0 +1,4 @@
<?php
global $_MODULE;
$_MODULE = array();
+4
View File
@@ -0,0 +1,4 @@
<?php
global $_MODULE;
$_MODULE = array();
-1
View File
@@ -6,7 +6,6 @@
<description><![CDATA[Open your shop on the eBay market place !]]></description>
<author><![CDATA[PrestaShop]]></author>
<tab><![CDATA[market_place]]></tab>
<confirmUninstall>Are you sure you want uninstall this module ? All your configuration will be lost.</confirmUninstall>
<is_configurable>1</is_configurable>
<need_instance>1</need_instance>
<limited_countries></limited_countries>
+1 -1
View File
@@ -915,7 +915,7 @@ class Ebay extends Module
// Load categories only if necessary
if (Db::getInstance()->getValue('SELECT COUNT(`id_ebay_category_configuration`) FROM `'._DB_PREFIX_.'ebay_category_configuration`') > 4 && Tools::getValue('section') != 'category')
return '<p align="center"><b>'.$this->l('Your categories have already been configured.').'</b></p>
<form action="index.php?tab='.$_GET['tab'].'&configure='.$_GET['configure'].'&token='.$_GET['token'].'&tab_module='.$_GET['tab_module'].'&module_name='.$_GET['module_name'].'&id_tab=2&section=category" method="post" class="form">
<form action="index.php?tab='.Tools::safeOuput($_GET['tab']).'&configure='.Tools::safeOuput($_GET['configure']).'&token='.Tools::safeOuput($_GET['token']).'&tab_module='.Tools::safeOuput($_GET['tab_module']).'&module_name='.Tools::safeOuput($_GET['module_name']).'&id_tab=2&section=category" method="post" class="form">
<p align="center"><input class="button" name="submitSave" type="submit" value="'.$this->l('See Categories').'" /></p></form>';
// Display eBay Categories
+4
View File
@@ -0,0 +1,4 @@
<?php
global $_MODULE;
$_MODULE = array();
+4
View File
@@ -0,0 +1,4 @@
<?php
global $_MODULE;
$_MODULE = array();
+4
View File
@@ -0,0 +1,4 @@
<?php
global $_MODULE;
$_MODULE = array();
+4
View File
@@ -0,0 +1,4 @@
<?php
global $_MODULE;
$_MODULE = array();
+4
View File
@@ -0,0 +1,4 @@
<?php
global $_MODULE;
$_MODULE = array();
+4
View File
@@ -0,0 +1,4 @@
<?php
global $_MODULE;
$_MODULE = array();
+4
View File
@@ -0,0 +1,4 @@
<?php
global $_MODULE;
$_MODULE = array();
+4
View File
@@ -0,0 +1,4 @@
<?php
global $_MODULE;
$_MODULE = array();
+4
View File
@@ -0,0 +1,4 @@
<?php
global $_MODULE;
$_MODULE = array();
+4
View File
@@ -0,0 +1,4 @@
<?php
global $_MODULE;
$_MODULE = array();
+1 -1
View File
@@ -701,7 +701,7 @@ class shopimporter extends ImportModule
{
$this->saveMatchId(strtolower($className), (int)$object->id, (int)$id);
if ($className == 'Customer')
Db::getInstance()->Execute('UPDATE '._DB_PREFIX_.'customer SET `passwd_'.bqSQL(Tools::getValue('moduleName')).'̀ = \''.pSQL($password).'\' WHERE id_customer = '.(int)$object->id);
Db::getInstance()->Execute('UPDATE '._DB_PREFIX_.'customer SET `passwd_'.bqSQL(Tools::getValue('moduleName')).'` = \''.pSQL($password).'\' WHERE id_customer = '.(int)$object->id);
if (array_key_exists('hasImage', $this->supportedImports[strtolower($className)]) AND Tools::isSubmit('images_'.$className))
$this->copyImg($item, $className);
}
+4
View File
@@ -0,0 +1,4 @@
<?php
global $_MODULE;
$_MODULE = array();
+4
View File
@@ -0,0 +1,4 @@
<?php
global $_MODULE;
$_MODULE = array();
+4
View File
@@ -0,0 +1,4 @@
<?php
global $_MODULE;
$_MODULE = array();
+4
View File
@@ -0,0 +1,4 @@
<?php
global $_MODULE;
$_MODULE = array();
+4
View File
@@ -0,0 +1,4 @@
<?php
global $_MODULE;
$_MODULE = array();
+4
View File
@@ -0,0 +1,4 @@
<?php
global $_MODULE;
$_MODULE = array();
+4
View File
@@ -0,0 +1,4 @@
<?php
global $_MODULE;
$_MODULE = array();
+4
View File
@@ -0,0 +1,4 @@
<?php
global $_MODULE;
$_MODULE = array();
+4
View File
@@ -0,0 +1,4 @@
<?php
global $_MODULE;
$_MODULE = array();
+4
View File
@@ -0,0 +1,4 @@
<?php
global $_MODULE;
$_MODULE = array();