...
 
Commits (163)
......@@ -459,4 +459,4 @@ class ManufacturerCore extends ObjectModel
return ($result1 && $result2);
}
}
\ No newline at end of file
}
......@@ -73,6 +73,7 @@ class ProductSaleCore
if (is_null($order_way) || $order_by == 'sales') $order_way = 'DESC';
$interval = Validate::isUnsignedInt(Configuration::get('PS_NB_DAYS_NEW_PRODUCT')) ? Configuration::get('PS_NB_DAYS_NEW_PRODUCT') : 20;
$sql = 'SELECT p.*, product_shop.*, stock.out_of_stock, IFNULL(stock.quantity, 0) as quantity,
pl.`description`, pl.`description_short`, pl.`link_rewrite`, pl.`meta_description`,
pl.`meta_keywords`, pl.`meta_title`, pl.`name`, pl.`available_now`, pl.`available_later`,
......
......@@ -250,6 +250,7 @@ class RequestSqlCore extends ObjectModel
if (preg_match('/((`(\()?([a-z0-9_])+`(\))?)|((\()?([a-z0-9_])+(\))?))\.((`(\()?([a-z0-9_])+`(\))?)|((\()?([a-z0-9_])+(\))?))$/i', $attr, $matches, PREG_OFFSET_CAPTURE))
{
$tab = explode('.', str_replace(array('`', '(', ')'), '', $matches[0][0]));
if ($table = $this->returnNameTable($tab[0], $from))
return array(
'table' => $table,
......@@ -261,6 +262,7 @@ class RequestSqlCore extends ObjectModel
elseif (preg_match('/((`(\()?([a-z0-9_])+`(\))?)|((\()?([a-z0-9_])+(\))?))$/i', $attr, $matches, PREG_OFFSET_CAPTURE))
{
$attribut = str_replace(array('`', '(', ')'), '', $matches[0][0]);
if ($table = $this->returnNameTable(false, $from, $attr))
return array(
'table' => $table,
......
File mode changed from 100755 to 100644
......@@ -28,6 +28,7 @@ class UploaderCore
{
const DEFAULT_MAX_SIZE = 10485760;
private $_check_file_size;
private $_accept_types;
private $_files;
private $_max_size;
......@@ -37,6 +38,7 @@ class UploaderCore
public function __construct($name = null)
{
$this->setName($name);
$this->setCheckFileSize(true);
$this->files = array();
}
......@@ -51,6 +53,12 @@ class UploaderCore
return $this->_accept_types;
}
public function setCheckFileSize($value)
{
$this->_check_file_size = $value;
return $this;
}
public function getFilePath($file_name = null)
{
if (!isset($file_name))
......@@ -129,6 +137,11 @@ class UploaderCore
return uniqid($prefix, true);
}
public function checkFileSize()
{
return (isset($this->_check_file_size) && $this->_check_file_size);
}
public function process($dest = null)
{
$upload = isset($_FILES[$this->getName()]) ? $_FILES[$this->getName()] : null;
......@@ -247,7 +260,7 @@ class UploaderCore
return false;
}
if ($file['size'] > $this->getMaxSize())
if ($this->checkFileSize() && $file['size'] > $this->getMaxSize())
{
$file['error'] = Tools::displayError(sprintf('File (size : %1s) is too big (max : %2s)', $file['size'], $this->getMaxSize()));
return false;
......
......@@ -1058,8 +1058,6 @@ class FrontControllerCore extends Controller
else
$list_uri[$file] = $media;
}
else
$list_uri[$file] = $media;
}
if ($remove)
......
......@@ -118,6 +118,7 @@ class AdminAccessControllerCore extends AdminController
*/
public function initContent()
{
$this->initTabModuleList();
$this->display = 'edit';
$this->initTabModuleList();
if (!$this->loadObject(true))
......
......@@ -454,6 +454,7 @@ class AdminAttributesGroupsControllerCore extends AdminController
*/
public function initContent()
{
$this->initTabModuleList();
if (!Combination::isFeatureActive())
{
$url = '<a href="index.php?tab=AdminPerformance&token='.Tools::getAdminTokenLite('AdminPerformance').'#featuresDetachables">'.
......
......@@ -394,6 +394,7 @@ class AdminFeaturesControllerCore extends AdminController
*/
public function initContent()
{
$this->initTabModuleList();
if (Feature::isFeatureActive())
{
// toolbar (save, cancel, new, ..)
......
......@@ -184,6 +184,7 @@ class AdminInvoicesControllerCore extends AdminController
public function initContent()
{
$this->initTabModuleList();
$this->display = 'edit';
$this->initTabModuleList();
$this->initToolbar();
......
......@@ -700,7 +700,6 @@ class AdminThemesControllerCore extends AdminController
Tools::redirectAdmin(Context::getContext()->link->getAdminLink('AdminThemes').'&conf=2');
else
$this->errors[] = Tools::displayError('The folder cannot be deleted');
}
return parent::processDelete();
......@@ -1473,6 +1472,7 @@ class AdminThemesControllerCore extends AdminController
if (Tools::getValue('filename') != '')
{
$uploader = new Uploader('themearchive');
$uploader->setCheckFileSize(false);
$uploader->setAcceptTypes(array('zip'));
$uploader->setSavePath($sandbox);
$file = $uploader->process(Theme::UPLOADED_THEME_DIR_NAME.'.zip');
......@@ -1536,7 +1536,7 @@ class AdminThemesControllerCore extends AdminController
return false;
}
protected function installTheme($theme_dir, $sandbox = false, $redirect = true)
protected function installTheme($theme_dir, $sandbox = false)
{
if (!$sandbox)
{
......
......@@ -46,7 +46,7 @@
<title>Promotions</title>
<description>Nos promotions</description>
<keywords/>
<url_rewrite>promotions</url_rewrite>
<url_rewrite>baisse-de-prix</url_rewrite>
</meta>
<meta id='sitemap' id_shop='1'>
<title>Plan du site</title>
......@@ -118,7 +118,7 @@
<title>Avoirs</title>
<description/>
<keywords/>
<url_rewrite>avoirs</url_rewrite>
<url_rewrite>bordereau-commande</url_rewrite>
</meta>
<meta id='order' id_shop='1'>
<title>Commande</title>
......@@ -148,7 +148,7 @@
<title>Suivi de commande invité</title>
<description/>
<keywords/>
<url_rewrite>suivi-commande-invite</url_rewrite>
<url_rewrite>suivi-invite</url_rewrite>
</meta>
<meta id='order-confirmation' id_shop='1'>
<title>Confirmation de commande</title>
......