Permalink
Browse files

// Development branch merged

  • Loading branch information...
2 parents 1d03f35 + 22fe9f9 commit e3d9613abf2cd7e53e80d167faaea8735e5b36b0 @gaillafr gaillafr committed Mar 27, 2013
Showing 3,654 changed files with 35,450 additions and 90,607 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
View
@@ -26,4 +26,7 @@ tools/smarty*/compile/*.php
!tools/smarty*/compile/index.php
override/classes/*.php
themes/default/cache/*.js
-themes/default/cache/*.css
+themes/default/cache/*.css
+modules/*/translations/*.php
+!modules/*/translations/index.php
+
View
18 404.php
@@ -1,6 +1,6 @@
<?php
/*
-* 2007-2012 PrestaShop
+* 2007-2013 PrestaShop
*
* NOTICE OF LICENSE
*
@@ -19,23 +19,11 @@
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
-* @copyright 2007-2012 PrestaShop SA
+* @copyright 2007-2013 PrestaShop SA
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
-/* Send the proper status code in HTTP headers */
-header('HTTP/1.1 404 Not Found');
-header('Status: 404 Not Found');
-
-if (in_array(substr($_SERVER['REQUEST_URI'], -3), array('png', 'jpg', 'gif')))
-{
- require_once(dirname(__FILE__).'/config/settings.inc.php');
- header('Location: '.__PS_BASE_URI__.'img/404.gif');
- exit;
-}
-elseif (in_array(substr($_SERVER['REQUEST_URI'], -3), array('.js', 'css')))
- die('');
-
require_once(dirname(__FILE__).'/config/config.inc.php');
+Tools::displayFileAsDeprecated();
Controller::getController('PageNotFoundController')->run();
View
@@ -1,53 +1,75 @@
- (d)oekia
+ - Alexander Otchenashev
+ - Benjamin PONGY
+ - Burhan
- Caleydon Media
- Damien Metzger
- DamienMetzger
- Damon Skelhorn
+ - Daniel
- David Gasperoni
+ - DrySs
+ - DrÿSs'
- François Gaillard
- Gabriel Schwardy
+ - Gregory Roussac
- Ha!*!*y
- Jonathan Danse
- Krystian Podemski
+ - Marco Cervellin
+ - Michel Courtade
- Milow
+ - Patanock
+ - Pierre
- PrestaEdit
+ - Raphaël Malié
- Rémi Gaillard
+ - Samy Rabih
- Sarah Lorenzini
+ - Shagshag
- Vincent Augagneur
- Xavier POITAU
- aFolletete
- aKorczak
- aNiassy
- adonis karavokyros
+ - anat
- bLeveque
- bMancone
- bumbu
- cmouleyre
- dMetzger
- dSevere
+ - djfm
- fBrignoli
- fSerny
+ - fram
- gBrunier
- gCharmes
- gPoulain
+ - gRoussac
- hAitmansour
- ivancasasempere
- jBreux
- jObregon
- jessylenne
- jmCollin
+ - kpodemski
- lBrieu
- lCherifi
- lLefevre
- mBertholino
- mDeflotte
- mMarinetti
+ - marcinsz101
- montes
- nPellicari
+ - nezenmoins
- oleacorner
- rGaillard
- rMalie
- rMontagne
+ - root
- sLorenzini
- sThiebaut
- tDidierjean
View
@@ -1,6 +1,6 @@
<?php
/*
-* 2007-2012 PrestaShop
+* 2007-2013 PrestaShop
*
* NOTICE OF LICENSE
*
@@ -19,7 +19,7 @@
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
-* @copyright 2007-2012 PrestaShop SA
+* @copyright 2007-2013 PrestaShop SA
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
View
@@ -1,6 +1,6 @@
<?php
/*
-* 2007-2012 PrestaShop
+* 2007-2013 PrestaShop
*
* NOTICE OF LICENSE
*
@@ -19,7 +19,7 @@
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
-* @copyright 2007-2012 PrestaShop SA
+* @copyright 2007-2013 PrestaShop SA
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
View
@@ -1,6 +1,6 @@
<?php
/*
-* 2007-2012 PrestaShop
+* 2007-2013 PrestaShop
*
* NOTICE OF LICENSE
*
@@ -19,14 +19,14 @@
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
-* @copyright 2007-2012 PrestaShop SA
+* @copyright 2007-2013 PrestaShop SA
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
define('_PS_ADMIN_DIR_', getcwd());
-require(dirname(__FILE__).'/../config/config.inc.php');
-require(dirname(__FILE__).'/functions.php');
+require(_PS_ADMIN_DIR_.'/../config/config.inc.php');
+require(_PS_ADMIN_DIR_.'/functions.php');
// For retrocompatibility with "tab" parameter
if (!isset($_GET['controller']) && isset($_GET['tab']))
View
@@ -1,6 +1,6 @@
<?php
/*
-* 2007-2012 PrestaShop
+* 2007-2013 PrestaShop
*
* NOTICE OF LICENSE
*
@@ -19,15 +19,15 @@
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
-* @copyright 2007-2012 PrestaShop SA
+* @copyright 2007-2013 PrestaShop SA
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
define('_PS_ADMIN_DIR_', getcwd());
include(_PS_ADMIN_DIR_.'/../config/config.inc.php');
/* Getting cookie or logout */
-require_once(dirname(__FILE__).'/init.php');
+require_once(_PS_ADMIN_DIR_.'/init.php');
$context = Context::getContext();
@@ -171,110 +171,6 @@
die($notification->updateEmployeeLastElement(Tools::getValue('updateElementEmployeeType')));
}
-if (Tools::isSubmit('syncImapMail'))
-{
- if (!($url = Configuration::get('PS_SAV_IMAP_URL'))
- || !($port = Configuration::get('PS_SAV_IMAP_PORT'))
- || !($user = Configuration::get('PS_SAV_IMAP_USER'))
- || !($password = Configuration::get('PS_SAV_IMAP_PWD')))
- die('{"hasError" : true, "errors" : ["Configuration is not correct"]}');
-
- $conf = Configuration::getMultiple(array(
- 'PS_SAV_IMAP_OPT_NORSH', 'PS_SAV_IMAP_OPT_SSL',
- 'PS_SAV_IMAP_OPT_VALIDATE-CERT', 'PS_SAV_IMAP_OPT_NOVALIDATE-CERT',
- 'PS_SAV_IMAP_OPT_TLS', 'PS_SAV_IMAP_OPT_NOTLS'));
-
- $conf_str = '';
- if ($conf['PS_SAV_IMAP_OPT_NORSH'])
- $conf_str .= '/norsh';
- if ($conf['PS_SAV_IMAP_OPT_SSL'])
- $conf_str .= '/ssl';
- if ($conf['PS_SAV_IMAP_OPT_VALIDATE-CERT'])
- $conf_str .= '/validate-cert';
- if ($conf['PS_SAV_IMAP_OPT_NOVALIDATE-CERT'])
- $conf_str .= '/novalidate-cert';
- if ($conf['PS_SAV_IMAP_OPT_TLS'])
- $conf_str .= '/tls';
- if ($conf['PS_SAV_IMAP_OPT_NOTLS'])
- $conf_str .= '/notls';
-
- if (!function_exists('imap_open'))
- die('{"hasError" : true, "errors" : ["imap is not installed on this server"]}');
-
- $mbox = @imap_open('{'.$url.':'.$port.$conf_str.'}', $user, $password);
-
- //checks if there is no error when connecting imap server
- $errors = imap_errors();
- $str_errors = '';
- $str_error_delete = '';
- if (sizeof($errors) && is_array($errors))
- {
- var_dump($errors);
- $str_errors = '';
- foreach($errors as $error)
- $str_errors .= '"'.$error.'",';
- $str_errors = rtrim($str_errors, ',').'';
- }
- //checks if imap connexion is active
- if (!$mbox)
- die('{"hasError" : true, "errors" : ["Cannot connect to the mailbox"]}');
-
- //Returns information about the current mailbox. Returns FALSE on failure.
- $check = imap_check($mbox);
- if (!$check)
- die('{"hasError" : true, "errors" : ["Fail to get information about the current mailbox"]}');
-
- if ($check->Nmsgs == 0)
- die('{"hasError" : true, "errors" : ["NO message to sync"]}');
-
- $result = imap_fetch_overview($mbox,"1:{$check->Nmsgs}",0);
- foreach ($result as $overview)
- {
- //check if message exist in database
- if (isset($overview->subject))
- $subject = $overview->subject;
- else
- $subject = '';
-
- //Creating an md5 to check if message has been allready processed
- $md5 = md5($overview->date.$overview->from.$subject.$overview->msgno);
- $exist = Db::getInstance()->getValue(
- 'SELECT `md5_header`
- FROM `'._DB_PREFIX_.'customer_message_sync_imap`
- WHERE `md5_header` = \''.pSQL($md5).'\'');
- if ($exist)
- {
- if (Configuration::get('PS_SAV_IMAP_DELETE_MSG'))
- if (!imap_delete($mbox, $overview->msgno))
- $str_error_delete = ', "Fail to delete message"';
- }
- else
- {
- //check if subject has id_order
- preg_match('/\#ct([0-9]*)/', $subject, $matches1);
- preg_match('/\#tc([0-9-a-z-A-Z]*)/', $subject, $matches2);
-
- if (isset($matches1[1]) && isset($matches2[1]))
- {
- //check if order exist in database
- $ct = new CustomerThread((int)$matches1[1]);
-
- if (Validate::isLoadedObject($ct) && $ct->token == $matches2[1])
- {
- $cm = new CustomerMessage();
- $cm->id_customer_thread = $ct->id;
- $cm->message = imap_fetchbody($mbox, $overview->msgno, 1);
- $cm->add();
- }
- }
- Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'customer_message_sync_imap` (`md5_header`) VALUES (\''.pSQL($md5).'\')');
- }
- }
- imap_expunge($mbox);
- imap_close($mbox);
- die('{"hasError" : false, "errors" : ["'.$str_errors.$str_error_delete.'"]}');
-}
-
if (Tools::isSubmit('searchCategory'))
{
$q = Tools::getValue('q');
@@ -1,6 +1,6 @@
<?php
/*
-* 2007-2012 PrestaShop
+* 2007-2013 PrestaShop
*
* NOTICE OF LICENSE
*
@@ -19,15 +19,15 @@
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
-* @copyright 2007-2012 PrestaShop SA
+* @copyright 2007-2013 PrestaShop SA
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
define('_PS_ADMIN_DIR_', getcwd());
include(_PS_ADMIN_DIR_.'/../config/config.inc.php');
/* Getting cookie or logout */
-require_once(dirname(__FILE__).'/init.php');
+require_once(_PS_ADMIN_DIR_.'/init.php');
$query = Tools::getValue('q', false);
if (!$query OR $query == '' OR strlen($query) < 1)
@@ -51,13 +51,16 @@
// Excluding downloadable products from packs because download from pack is not supported
$excludeVirtuals = (bool)Tools::getValue('excludeVirtuals', false);
+$exclude_packs = (bool)Tools::getValue('exclude_packs', false);
$sql = 'SELECT p.`id_product`, `reference`, pl.name
FROM `'._DB_PREFIX_.'product` p
LEFT JOIN `'._DB_PREFIX_.'product_lang` pl ON (pl.id_product = p.id_product AND pl.id_lang = '.(int)Context::getContext()->language->id.Shop::addSqlRestrictionOnLang('pl').')
WHERE (pl.name LIKE \'%'.pSQL($query).'%\' OR p.reference LIKE \'%'.pSQL($query).'%\')'.
(!empty($excludeIds) ? ' AND p.id_product NOT IN ('.$excludeIds.') ' : ' ').
- ($excludeVirtuals ? 'AND p.id_product NOT IN (SELECT pd.id_product FROM `'._DB_PREFIX_.'product_download` pd WHERE (pd.id_product = p.id_product))' : '');
+ ($excludeVirtuals ? 'AND p.id_product NOT IN (SELECT pd.id_product FROM `'._DB_PREFIX_.'product_download` pd WHERE (pd.id_product = p.id_product))' : '').
+ ($exclude_packs ? 'AND (p.cache_is_pack IS NULL OR p.cache_is_pack = 0)' : '');
+
$items = Db::getInstance()->executeS($sql);
if ($items)
@@ -1,6 +1,6 @@
<?php
/*
-* 2007-2012 PrestaShop
+* 2007-2013 PrestaShop
*
* NOTICE OF LICENSE
*
@@ -19,7 +19,7 @@
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
-* @copyright 2007-2012 PrestaShop SA
+* @copyright 2007-2013 PrestaShop SA
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
@@ -1,6 +1,6 @@
<?php
/*
-* 2007-2012 PrestaShop
+* 2007-2013 PrestaShop
*
* NOTICE OF LICENSE
*
@@ -19,7 +19,7 @@
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
-* @copyright 2007-2012 PrestaShop SA
+* @copyright 2007-2013 PrestaShop SA
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
Oops, something went wrong.

0 comments on commit e3d9613

Please sign in to comment.