Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Boyquotes
2014-03-21 09:30:30 +01:00
452 changed files with 24215 additions and 21493 deletions

17
.gitignore vendored
View File

@@ -21,12 +21,23 @@ web/cache/*
web/tinymce
web/media
phpdoc*.log
php-cs
xhprof/
phpunit.phar
.DS_Store
phpmyadmin
templates/default-esi
local/modules/TemplateEsiModule
composer.phar
web/.htaccess
# Ignore everything in the "modules" directory, except the "default modules"
local/modules/*
!local/modules/Cheque/
!local/modules/Front/
!local/modules/TheliaDebugBar/
!local/modules/Tinymce/
# Ignore everything in the "templates" directory, except the "default template"
templates/*
!templates/backOffice/
!templates/email/
!templates/frontOffice/
!templates/pdf/

View File

@@ -2,7 +2,7 @@ If you contributes or contributed to this project and do not appear in this list
please email us (info@thelia.net) or fork this file on Github and send a pull-request.
Manuel Raynaud - manu@thelia.net
Etienne Roudeix - etienne@thelia.net
Etienne Roudeix - etienne.roudeix@gmail.com
Franck Allimant - franck@allimant.org
Guillaume Morel - gmorel@openstudio.fr
Michaël Espeche - mespeche@openstudio.fr

View File

@@ -3,7 +3,7 @@ Readme
Thelia
------
[![Build Status](https://travis-ci.org/thelia/thelia.png?branch=master)](https://travis-ci.org/thelia/thelia) [![License](https://poser.pugx.org/thelia/thelia/license.png)](https://packagist.org/packages/thelia/thelia)
[![Build Status](https://travis-ci.org/thelia/thelia.png?branch=master)](https://travis-ci.org/thelia/thelia) [![License](https://poser.pugx.org/thelia/thelia/license.png)](https://packagist.org/packages/thelia/thelia) [![Scrutinizer Quality Score](https://scrutinizer-ci.com/g/thelia/thelia/badges/quality-score.png?s=61e3e04a69bffd71c29b08e5392080317a546716)](https://scrutinizer-ci.com/g/thelia/thelia/)
[Thelia](http://thelia.net/v2) is an open source tool for creating e-business websites and managing online content. This software is published under GPL.

View File

@@ -1,7 +1,7 @@
#How to update your Thelia
- copy all files from the thelia new version (local/modules/* files too)
- clear all caches running ```php Thelia cache:clear```
- copy all files from the thelia new version (local/modules/* files too)
- run ```php Thelia thelia:update```
- again clear all caches in all environment :
- ```php Thelia cache:clear```

View File

@@ -21,7 +21,6 @@ if (!file_exists(THELIA_CONF_DIR . 'database.yml') && !defined('THELIA_INSTALL_M
define('THELIA_INSTALL_MODE', true);
} else {
$request = \Thelia\Core\HttpFoundation\Request::createFromGlobals();
header('location: '.$request->getUriForPath() . '/install');
exit;
header('location: '.$request->getUriForPath('/install'));
}
}

View File

@@ -147,6 +147,11 @@ class Customer extends BaseAction implements EventSubscriberInterface
public function login(CustomerLoginEvent $event)
{
$customer = $event->getCustomer();
if (method_exists($customer, 'clearDispatcher')) {
$customer->clearDispatcher();
}
$this->securityContext->setCustomerUser($event->getCustomer());
}

View File

@@ -30,6 +30,7 @@ use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Symfony\Component\HttpKernel\KernelEvents;
use Thelia\Core\Template\ParserInterface;
use Thelia\Exception\AdminAccessDenied;
use Thelia\Model\ConfigQuery;
use Thelia\Core\Template\TemplateHelper;
@@ -53,13 +54,36 @@ class HttpException extends BaseAction implements EventSubscriberInterface
public function checkHttpException(GetResponseForExceptionEvent $event)
{
if ($event->getException() instanceof NotFoundHttpException) {
$exception = $event->getException();
if ($exception instanceof NotFoundHttpException) {
$this->display404($event);
}
if ($event->getException() instanceof AccessDeniedHttpException) {
if ($exception instanceof AccessDeniedHttpException) {
$this->display403($event);
}
if ($exception instanceof AdminAccessDenied) {
$this->displayAdminGeneralError($event);
}
}
protected function displayAdminGeneralError(GetResponseForExceptionEvent $event)
{
// Define the template thant shoud be used
$this->parser->setTemplateDefinition(TemplateHelper::getInstance()->getActiveAdminTemplate());
$message = $event->getException()->getMessage();
$response = Response::create(
$this->parser->render('general_error.html',
array(
"error_message" => $message
)),
403
) ;
$event->setResponse($response);
}
protected function display404(GetResponseForExceptionEvent $event)
@@ -67,8 +91,6 @@ class HttpException extends BaseAction implements EventSubscriberInterface
// Define the template thant shoud be used
$this->parser->setTemplateDefinition(TemplateHelper::getInstance()->getActiveFrontTemplate());
//$event->getRequest()->attributes->set('_view', ConfigQuery::getPageNotFoundView());
$response = new Response($this->parser->render(ConfigQuery::getPageNotFoundView()), 404);
$event->setResponse($response);

View File

@@ -112,8 +112,6 @@ class Image extends BaseCachedFile implements EventSubscriberInterface
throw new \InvalidArgumentException("Cache sub-directory and source file path cannot be null");
}
// echo basename($source_file).": ";
// Find cached file path
$cacheFilePath = $this->getCacheFilePath($subdir, $source_file, $event->isOriginalImage(), $event->getOptionsHash());
@@ -391,8 +389,6 @@ class Image extends BaseCachedFile implements EventSubscriberInterface
$image->resize(new Box($next_width, $next_height));
// echo "w=$dest_width, h=$dest_height, nw=$next_width, nh=$next_height, dx=$delta_x, dy=$delta_y, bw=$border_width, bh=$border_height\n";
if ($resize_mode == self::EXACT_RATIO_WITH_BORDERS) {
$border_width = intval(($dest_width - $next_width) / 2);

View File

@@ -75,7 +75,7 @@ class Product extends BaseAction implements EventSubscriberInterface
->setRef($event->getRef())
->setLocale($event->getLocale())
->setTitle($event->getTitle())
->setVisible($event->getVisible())
->setVisible($event->getVisible() ? 1 : 0)
// Set the default tax rule to this product
->setTaxRule(TaxRuleQuery::create()->findOneByIsDefault(true))
@@ -109,7 +109,7 @@ class Product extends BaseAction implements EventSubscriberInterface
->setDescription($event->getDescription())
->setChapo($event->getChapo())
->setPostscriptum($event->getPostscriptum())
->setVisible($event->getVisible())
->setVisible($event->getVisible() ? 1 : 0)
->save()
;

View File

@@ -83,7 +83,7 @@ class CreateAdminUser extends ContainerAwareCommand
{
$output->writeln('Please enter the admin user information:');
$admin = $this->getAdminInfo($input, $output); // new Admin();
$admin = $this->getAdminInfo($input, $output);
$admin->save();

View File

@@ -61,8 +61,7 @@ class GenerateResources extends ContainerAwareCommand
$constants = $class->getConstants();
if (count($constants) == 0) {
$output->writeln('No resources found');
exit;
throw new \RuntimeException('No resources found');
}
switch ($input->getOption("output")) {

View File

@@ -163,11 +163,7 @@ class Install extends ContainerAwareCommand
}
if (false === $isValid) {
$output->writeln(array(
"",
"<error>Please put correct permissions and reload install process</error>"
));
exit;
throw new \RuntimeException('Please put correct permissions and reload install process');
}
}
@@ -198,9 +194,6 @@ class Install extends ContainerAwareCommand
file_put_contents($configFile, $configContent);
// FA - no, as no further install will be possible
// $fs->remove($sampleConfigFile);
$fs->remove($this->getContainer()->getParameter("kernel.cache_dir"));
}

View File

@@ -23,8 +23,6 @@
namespace Thelia\Condition\Implementation;
use InvalidArgumentException;
/**
* Allow every one, perform no check
*

View File

@@ -23,8 +23,6 @@
namespace Thelia\Condition\Implementation;
use InvalidArgumentException;
use Thelia\Condition\Operators;
use Thelia\Exception\InvalidConditionOperatorException;
use Thelia\Exception\InvalidConditionValueException;

60
core/lib/Thelia/Config/I18n/en_US.php Executable file → Normal file
View File

@@ -6,14 +6,17 @@ return array(
'%obj modification' => '%obj modification',
'A currency with code "%name" already exists.' => 'A currency with code "%name" already exists.',
'A message with name "%name" already exists.' => 'A message with name "%name" already exists.',
'A user already exists with this email address. Please login or if you\'ve forgotten your password, go to Reset Your Password.' => 'A user already exists with this email address. Please login or if you\'ve forgotten your password, go to Reset Your Password.',
'A variable with name "%name" already exists.' => 'A variable with name "%name" already exists.',
'Activate logs only for these IP Addresses' => 'Activate logs only for these IP Addresses',
'Activate logs only for these files' => 'Activate logs only for these files',
'Add to all product templates' => 'Add to all product templates',
'Additional address' => 'Additional address',
'Address ID not found' => 'Address ID not found',
'Address Line 2' => 'Address Line 2',
'Address Line 3' => 'Address Line 3',
'Address label' => 'Address label',
'Administrator ID not found' => 'Administrator ID not found',
'Advertise this product as new' => 'Advertise this product as new',
'Alerts' => 'Alerts',
'Alpha code 2 *' => 'Alpha code 2 *',
@@ -25,6 +28,7 @@ return array(
'Auth mode' => 'Auth mode',
'Available quantity' => 'Available quantity',
'Available quantity *' => 'Available quantity *',
'Bad tax list JSON' => 'Bad tax list JSON',
'Business ID' => 'Business ID',
'Cannot find a default country. Please define one.' => 'Cannot find a default country. Please define one.',
'Cannot find the shop country. Please select a shop country.' => 'Cannot find the shop country. Please select a shop country.',
@@ -41,6 +45,7 @@ return array(
'Constant amount found in one of the product\'s feature' => 'Constant amount found in one of the product\'s feature',
'Content title *' => 'Content title *',
'Country' => 'Country',
'Country ID not found' => 'Country ID not found',
'Country area' => 'Country area',
'Country title *' => 'Country title *',
'Critical' => 'Critical',
@@ -49,6 +54,7 @@ return array(
'Default folder *' => 'Default folder *',
'Default product category *' => 'Default product category *',
'Default product sale element' => 'Default product sale element',
'Delivery module ID not found' => 'Delivery module ID not found',
'Description' => 'Description',
'Detailed description' => 'Detailed description',
'Disabled' => 'Disabled',
@@ -73,6 +79,7 @@ return array(
'ISO 639-1 Code' => 'ISO 639-1 Code',
'ISO Code *' => 'ISO Code *',
'If a translation is missing or incomplete :' => 'If a translation is missing or incomplete :',
'Impossible to delete a customer who already have orders' => 'Impossible to delete a customer who already have orders',
'Information' => 'Information',
'Invalid product_sale_elements' => 'Invalid product_sale_elements',
'Invalid value for walkMode parameter: %value' => 'Invalid value for walkMode parameter: %value',
@@ -88,6 +95,7 @@ return array(
'Message subject' => 'Message subject',
'Meta Description' => 'Meta Description',
'Meta Keywords' => 'Meta Keywords',
'Module ID not found' => 'Module ID not found',
'Name' => 'Name',
'Name *' => 'Name *',
'Name of the HTML layout file' => 'Name of the HTML layout file',
@@ -99,6 +107,7 @@ return array(
'No %obj was updated.' => 'No %obj was updated.',
'No, I am a new customer.' => 'No, I am a new customer.',
'Notices' => 'Notices',
'Order address ID not found' => 'Order address ID not found',
'Page Title' => 'Page Title',
'Parent category *' => 'Parent category *',
'Parent folder *' => 'Parent folder *',
@@ -108,6 +117,7 @@ return array(
'Percentage of the product price' => 'Percentage of the product price',
'Percentage removed from the cart' => 'Percentage removed from the cart',
'Phone' => 'Phone',
'Please accept the Terms and conditions in order to register.' => 'Please accept the Terms and conditions in order to register.',
'Please enter your email address' => 'Please enter your email address',
'Please enter your password' => 'Please enter your password',
'Please specify either \'path\' or \'file\' parameter in {url} function.' => 'Please specify either \'path\' or \'file\' parameter in {url} function.',
@@ -123,6 +133,7 @@ return array(
'Product ID' => 'Product ID',
'Product ID *' => 'Product ID *',
'Product base price excluding taxes *' => 'Product base price excluding taxes *',
'Product base price with taxes' => 'Product base price with taxes',
'Product price excluding taxes' => 'Product price excluding taxes',
'Product price excluding taxes *' => 'Product price excluding taxes *',
'Product price including taxes' => 'Product price including taxes',
@@ -133,6 +144,8 @@ return array(
'ProductSaleElement modification' => 'ProductSaleElement modification',
'Profile' => 'Profile',
'Profile Code' => 'Profile Code',
'Profile ID not found' => 'Profile ID not found',
'Profile `code` already exists' => 'Profile `code` already exists',
'Purpose *' => 'Purpose *',
'Quantity' => 'Quantity',
'Rate from &euro; *' => 'Rate from &euro; *',
@@ -167,20 +180,31 @@ return array(
'Summary' => 'Summary',
'Symbol *' => 'Symbol *',
'System log configuration failed.' => 'System log configuration failed.',
'Tax ID not found in tax list JSON' => 'Tax ID not found in tax list JSON',
'Tax list is not valid JSON' => 'Tax list is not valid JSON',
'Tax rule ID not found' => 'Tax rule ID not found',
'Tax rule for this product *' => 'Tax rule for this product *',
'Template Name *' => 'Template Name *',
'Template file %file cannot be found.' => 'Template file %file cannot be found.',
'Text File' => 'Text File',
'Text Message' => 'Text Message',
'The TaxEngine should be passed to this form before using it.' => 'The TaxEngine should be passed to this form before using it.',
'This category is online.' => 'This category is online.',
'This content is online.' => 'This content is online.',
'This coupon does not exists' => 'This coupon does not exists',
'This email already exists.' => 'This email already exists.',
'This email does not exists' => 'This email does not exists',
'This extension must be installed and loaded' => 'This extension must be installed and loaded',
'This folder is online.' => 'This folder is online.',
'This login already exists' => 'This login already exists',
'This product is on sale' => 'This product is on sale',
'This product is online' => 'This product is online',
'This product_sale_elements_id does not exists for this product : %d' => 'This product_sale_elements_id does not exists for this product : %d',
'This value should not be blank.' => 'This value should not be blank.',
'Timeout' => 'Timeout',
'Title' => 'Title',
'Title *' => 'Title *',
'Title ID not found' => 'Title ID not found',
'Type' => 'Type',
'Username' => 'Username',
'Username *' => 'Username *',
@@ -190,42 +214,20 @@ return array(
'Weight' => 'Weight',
'Weight *' => 'Weight *',
'Yes, I have a password :' => 'Yes, I have a password :',
'You are already registered!' => 'You are already registered!',
'Your Email Address' => 'Your Email Address',
'Your Message' => 'Your Message',
'Your current password does not match.' => 'Your current password does not match.',
'Zip code' => 'Zip code',
'date format' => 'date format',
'delivery module %s is not a Thelia\Module\DeliveryModuleInterface' => 'delivery module %s is not a Thelia\Module\DeliveryModuleInterface',
'payment module %s is not a Thelia\Module\PaymentModuleInterface' => 'payment module %s is not a Thelia\Module\PaymentModuleInterface',
'language locale' => 'language locale',
'mailing system modification' => 'mailing system modification',
'shipping area name' => 'shipping area name',
'time format' => 'time format',
'This value should not be blank.' => 'This value should not be blank.',
'A user already exists with this email address. Please login or if you\'ve forgotten your password, go to Reset Your Password.' => 'A user already exists with this email address. Please login or if you\'ve forgotten your password, go to Reset Your Password.',
'Administrator ID not found' => 'Administrator ID not found',
'This login already exists' => 'This login already exists',
'password confirmation is not the same as password field' => 'password confirmation is not the same as password field',
'password must be composed of at least 4 characters' => 'password must be composed of at least 4 characters',
'this product id does not exists : %d' => 'this product id does not exists : %d',
'This product_sale_elements_id does not exists for this product : %d' => 'This product_sale_elements_id does not exists for this product : %d',
'quantity value is not valid' => 'quantity value is not valid',
'Please accept the Terms and conditions in order to register.' => 'Please accept the Terms and conditions in order to register.',
'This email already exists.' => 'This email already exists.',
'This email does not exists' => 'This email does not exists',
'Your current password does not match.' => 'Your current password does not match.',
'Module ID not found' => 'Module ID not found',
'You are already registered!' => 'You are already registered!',
'Address ID not found' => 'Address ID not found',
'Delivery module ID not found' => 'Delivery module ID not found',
'delivery module %s is not a Thelia\Module\DeliveryModuleInterface' => 'delivery module %s is not a Thelia\Module\DeliveryModuleInterface',
'Order address ID not found' => 'Order address ID not found',
'Title ID not found' => 'Title ID not found',
'Country ID not found' => 'Country ID not found',
'Profile `code` already exists' => 'Profile `code` already exists',
'Profile ID not found' => 'Profile ID not found',
'The TaxEngine should be passed to this form before using it.' => 'The TaxEngine should be passed to this form before using it.',
'Tax rule ID not found' => 'Tax rule ID not found',
'Tax list is not valid JSON' => 'Tax list is not valid JSON',
'Bad tax list JSON' => 'Bad tax list JSON',
'Tax ID not found in tax list JSON' => 'Tax ID not found in tax list JSON',
'Please check your input: %s' => 'Please check your input: %s',
'Sorry, an error occured: %s' => 'Sorry, an error occured: %s',
'shipping area name' => 'shipping area name',
'this product id does not exists : %d' => 'this product id does not exists : %d',
'time format' => 'time format',
);

0
core/lib/Thelia/Config/I18n/es_ES.php Executable file → Normal file
View File

60
core/lib/Thelia/Config/I18n/fr_FR.php Executable file → Normal file
View File

@@ -6,14 +6,17 @@ return array(
'%obj modification' => 'Modification de %obj',
'A currency with code "%name" already exists.' => 'Une devise avec la code "%name" existe déjà',
'A message with name "%name" already exists.' => 'Un message avec le nom "%name" existe déjà.',
'A user already exists with this email address. Please login or if you\'ve forgotten your password, go to Reset Your Password.' => 'Un utilisateur existe déjà avec cette adresse email. Connectez-vous ou demandez une réinitialisation de votre mot de passe.',
'A variable with name "%name" already exists.' => 'Une variable avec le nom "%name" existe déjà.',
'Activate logs only for these IP Addresses' => 'Activer les logs uniquement pour ces adresses IP',
'Activate logs only for these files' => 'Activer les logs uniquement pour ces fichiers',
'Add to all product templates' => 'Ajouter à tous les templates produit',
'Additional address' => 'Adresse complémentaire',
'Address ID not found' => 'ID de l\'adresse non trouvé',
'Address Line 2' => 'Adresse 1',
'Address Line 3' => 'Adresse 2',
'Address label' => 'Adresse',
'Administrator ID not found' => 'ID de l\'administrateur not trouvé',
'Advertise this product as new' => 'Afficher ce produit comme nouveau',
'Alerts' => 'Alertes',
'Alpha code 2 *' => 'Code Alpha 2 *',
@@ -25,6 +28,7 @@ return array(
'Auth mode' => 'Mode d\'authentification',
'Available quantity' => 'Quantité disponible',
'Available quantity *' => 'Quantité disponible *',
'Bad tax list JSON' => 'Mauvais JSON de la liste des taxes',
'Business ID' => 'ID du business',
'Cannot find a default country. Please define one.' => 'Impossible de trouver un pays par défaut. Veuillez en définir un.',
'Cannot find the shop country. Please select a shop country.' => 'Impossible de trouver le pays du magasin. Veuillez en sélectionner un.',
@@ -41,6 +45,7 @@ return array(
'Constant amount found in one of the product\'s feature' => 'Montant fixe trouvé depuis une caractéristique produit',
'Content title *' => 'Titre du contenu *',
'Country' => 'Pays',
'Country ID not found' => 'ID du pays non trouvé',
'Country area' => 'Zone du pays',
'Country title *' => 'Pays *',
'Critical' => 'Critique',
@@ -49,6 +54,7 @@ return array(
'Default folder *' => 'Dossier par défaut *',
'Default product category *' => 'Catégorie du produit par défaut *',
'Default product sale element' => 'Product Sale Element par défaut',
'Delivery module ID not found' => 'Id du module de livraison non trouvé',
'Description' => 'Description',
'Detailed description' => 'Description détaillée',
'Disabled' => 'Désactivé',
@@ -73,6 +79,7 @@ return array(
'ISO 639-1 Code' => 'Code ISO 639-1',
'ISO Code *' => 'Code ISO *',
'If a translation is missing or incomplete :' => 'Si une traduction est manquante ou incomplète :',
'Impossible to delete a customer who already have orders' => 'Impossible de supprimer un client si celui-ci a déjà une commande',
'Information' => 'Information',
'Invalid product_sale_elements' => 'product_sale_elements invalide',
'Invalid value for walkMode parameter: %value' => 'Valeur incorrecte pour le paramètre walkMode : %value',
@@ -88,6 +95,7 @@ return array(
'Message subject' => 'Sujet',
'Meta Description' => 'Meta description',
'Meta Keywords' => 'Meta keywords',
'Module ID not found' => 'Id du module non trouvé',
'Name' => 'Nom',
'Name *' => 'Nom *',
'Name of the HTML layout file' => 'Nom du layout HTML',
@@ -99,6 +107,7 @@ return array(
'No %obj was updated.' => 'Aucun %obj mis à jour',
'No, I am a new customer.' => 'Non, je suis un nouveau client.',
'Notices' => 'Notices',
'Order address ID not found' => 'ID de l\'adresse de la commande non trouvé',
'Page Title' => 'Titre de la page',
'Parent category *' => 'Catégorie parente *',
'Parent folder *' => 'Dossier parent *',
@@ -108,6 +117,7 @@ return array(
'Percentage of the product price' => 'Pourcentage du prix du produit',
'Percentage removed from the cart' => 'Pourcentage déduit du panier',
'Phone' => 'Téléphone',
'Please accept the Terms and conditions in order to register.' => 'Veuillez accepter les termes et conditions pour vous inscrire.',
'Please enter your email address' => 'Renseignez votre adresse mail',
'Please enter your password' => 'Entrez votre mot de passe.',
'Please specify either \'path\' or \'file\' parameter in {url} function.' => 'Veuillez spécifier soit le paramètre \'chemin\' ou \'fichier\' dans la fonction {url}',
@@ -123,6 +133,7 @@ return array(
'Product ID' => 'ID produit',
'Product ID *' => 'ID produit *',
'Product base price excluding taxes *' => 'Prix du produit Hors Taxe *',
'Product base price with taxes' => 'Prix du produit TTC',
'Product price excluding taxes' => 'Prix du produit Hors Taxes',
'Product price excluding taxes *' => 'prix HT',
'Product price including taxes' => 'Prix du produit taxes incluses',
@@ -133,6 +144,8 @@ return array(
'ProductSaleElement modification' => 'Modification de ProductSaleElement.',
'Profile' => 'Profil',
'Profile Code' => 'Profil',
'Profile ID not found' => 'ID du profil non trouvé',
'Profile `code` already exists' => 'Le `code` du profil existe déjà',
'Purpose *' => 'Objet',
'Rate from &euro; *' => 'Taux à partie de l\'&euro; *',
'Redirecting ...' => 'Redirection ...',
@@ -166,20 +179,31 @@ return array(
'Summary' => 'Résumé',
'Symbol *' => 'Symbole *',
'System log configuration failed.' => 'Erreur du configurateur de log system.',
'Tax ID not found in tax list JSON' => 'ID de la taxe non trouvé dans le JSON de la liste des taxes',
'Tax list is not valid JSON' => 'Le JSON de la liste des taxes n\'est pas valide',
'Tax rule ID not found' => 'ID de la règle de taxe non trouvé',
'Tax rule for this product *' => 'Règle de taxe pour ce produit *',
'Template Name *' => 'Nom du template *',
'Template file %file cannot be found.' => 'Le fichier %file n\'a pas été trouvé dans le template. ',
'Text File' => 'Fichier texte',
'Text Message' => 'Message au format texte',
'The TaxEngine should be passed to this form before using it.' => 'Le moteur de taxe doit être passé au formulaire avant d\'être utilisé.',
'This category is online.' => 'Cette catégorie est en ligne.',
'This content is online.' => 'Ce contenu est en ligne.',
'This coupon does not exists' => 'Ce code promo n\'existe pas',
'This email already exists.' => 'Cette adresse email existe déjà',
'This email does not exists' => 'Cette adresse email n\'existe pas',
'This extension must be installed and loaded' => 'Cette extension doit être installée et chargée.',
'This folder is online.' => 'Ce dossier est en ligne.',
'This login already exists' => 'Cet identifiant existe déjà',
'This product is on sale' => 'Ce produit est en promo',
'This product is online' => 'Ce produit est en ligne',
'This product_sale_elements_id does not exists for this product : %d' => 'Le product_sale_elements_id n\'existe pas pour ce produit : %d',
'This value should not be blank.' => 'Cette valeur ne doit pas être vide.',
'Timeout' => 'Délai d\'attente expiré',
'Title' => 'Titre',
'Title *' => 'Titre *',
'Title ID not found' => 'ID de la civilité non trouvé',
'Type' => 'Type',
'Username' => 'Nom d\'utilisateur',
'Username *' => 'Nom d\'utilisateur *',
@@ -189,42 +213,20 @@ return array(
'Weight' => 'Poids',
'Weight *' => 'Poids *',
'Yes, I have a password :' => 'Oui, j\'ai un mot de passe :',
'You are already registered!' => 'Vous êtes déjà enregistré !',
'Your Email Address' => 'Votre adresse mail',
'Your Message' => 'Votre message',
'Your current password does not match.' => 'Votre mot de passe actuel ne correspond pas',
'Zip code' => 'Code postal',
'date format' => 'Format de date',
'delivery module %s is not a Thelia\Module\DeliveryModuleInterface' => 'le module de livraison %s n\'est pas un Thelia\Module\DeliveryModuleInterface',
'language locale' => 'Langue locale',
'mailing system modification' => 'Modification du système d\'envoi de mail.',
'shipping area name' => 'Nom de la zone de livraison',
'time format' => 'Format d\'heure',
'This value should not be blank.' => 'Cette valeur ne doit pas être vide.',
'A user already exists with this email address. Please login or if you\'ve forgotten your password, go to Reset Your Password.' => 'Un utilisateur existe déjà avec cette adresse email. Connectez-vous ou demandez une réinitialisation de votre mot de passe.',
'Administrator ID not found' => 'ID de l\'administrateur not trouvé',
'This login already exists' => 'Cet identifiant existe déjà',
'password confirmation is not the same as password field' => 'le mot de passe de confirmation n\'est pas le même que le champ mot de passe',
'password must be composed of at least 4 characters' => 'le mot de passe doit être composé d\'au moins 4 caractères',
'this product id does not exists : %d' => 'l\'id du produit %d n\'existe pas',
'This product_sale_elements_id does not exists for this product : %d' => 'Le product_sale_elements_id n\'existe pas pour ce produit : %d',
'payment module %s is not a Thelia\Module\PaymentModuleInterface' => 'Le module de paiement %s n\'est pas une instance de Thelia\Module\PaymentModuleInterface ',
'quantity value is not valid' => 'la valeur de la quantité n\'est pas valide',
'Please accept the Terms and conditions in order to register.' => 'Veuillez accepter les termes et conditions pour vous inscrire.',
'This email already exists.' => 'Cette adresse email existe déjà',
'This email does not exists' => 'Cette adresse email n\'existe pas',
'Your current password does not match.' => 'Votre mot de passe actuel ne correspond pas',
'Module ID not found' => 'Id du module non trouvé',
'You are already registered!' => 'Vous êtes déjà enregistré !',
'Address ID not found' => 'ID de l\'adresse non trouvé',
'Delivery module ID not found' => 'Id du module de livraison non trouvé',
'delivery module %s is not a Thelia\Module\DeliveryModuleInterface' => 'le module de livraison %s n\'est pas un Thelia\Module\DeliveryModuleInterface',
'Order address ID not found' => 'ID de l\'adresse de la commande non trouvé',
'Title ID not found' => 'ID de la civilité non trouvé',
'Country ID not found' => 'ID du pays non trouvé',
'Profile `code` already exists' => 'Le `code` du profil existe déjà',
'Profile ID not found' => 'ID du profil non trouvé',
'The TaxEngine should be passed to this form before using it.' => 'Le moteur de taxe doit être passé au formulaire avant d\'être utilisé.',
'Tax rule ID not found' => 'ID de la règle de taxe non trouvé',
'Tax list is not valid JSON' => 'Le JSON de la liste des taxes n\'est pas valide',
'Bad tax list JSON' => 'Mauvais JSON de la liste des taxes',
'Tax ID not found in tax list JSON' => 'ID de la taxe non trouvé dans le JSON de la liste des taxes',
'Please check your input: %s' => 'Veuillez vérifier votre saisie: %s',
'Sorry, an error occured: %s' => 'Désolé, une erreur est survenue: %s',
'shipping area name' => 'Nom de la zone de livraison',
'this product id does not exists : %d' => 'l\'id du produit %d n\'existe pas',
'time format' => 'Format d\'heure',
);

0
core/lib/Thelia/Config/I18n/it_IT.php Executable file → Normal file
View File

View File

@@ -7,6 +7,7 @@
<!-- Route to administration base -->
<route id="admin" path="/admin">
<default key="_controller">Thelia\Controller\Admin\AdminController::indexAction</default>
<default key="not-logged">1</default>
</route>
<!-- home -->
@@ -24,6 +25,7 @@
<!-- Route to the administration login page -->
<route id="admin.login" path="/admin/login">
<default key="_controller">Thelia\Controller\Admin\SessionController::showLoginAction</default>
<default key="not-logged">1</default>
</route>
<!-- Route to the administration logout page -->
@@ -34,6 +36,7 @@
<!-- Route to the login check controller -->
<route id="admin.checklogin" path="/admin/checklogin">
<default key="_controller">Thelia\Controller\Admin\SessionController::checkLoginAction</default>
<default key="not-logged">1</default>
</route>
<!-- Route to the catalog controller -->
@@ -337,6 +340,10 @@
<default key="_controller">Thelia\Controller\Admin\ProductController::priceCaclulator</default>
</route>
<route id="admin.product.calculate-raw-price" path="/admin/product/calculate-raw-price">
<default key="_controller">Thelia\Controller\Admin\ProductController::calculatePrice</default>
</route>
<route id="admin.product.load-converted-prices" path="/admin/product/load-converted-prices">
<default key="_controller">Thelia\Controller\Admin\ProductController::loadConvertedPrices</default>
</route>

View File

@@ -449,7 +449,6 @@ abstract class AbstractCrudController extends BaseAdminController
/**
* Update object position (only for objects whichsupport that)
*
* FIXME: integrate with genericUpdatePositionAction
*/
public function updatePositionAction()
{

View File

@@ -157,13 +157,14 @@ abstract class AbstractSeoCrudController extends AbstractCrudController
/**
* Update SEO modification, and either go back to the object list, or stay on the edition page.
*
* @return Thelia\Core\HttpFoundation\Response the response
* @return \Thelia\Core\HttpFoundation\Response the response
*/
public function processUpdateSeoAction()
{
// Check current user authorization
if (null !== $response = $this->checkAuth($this->resourceCode, array(), AccessManager::UPDATE))
if (null !== $response = $this->checkAuth($this->resourceCode, array(), AccessManager::UPDATE)) {
return $response;
}
// Error (Default: false)
$error_msg = false;

View File

@@ -340,24 +340,6 @@ class CategoryController extends AbstractSeoCrudController
return $response;
}
// $content_id = intval($this->getRequest()->get('content_id'));
//
// if ($content_id > 0) {
//
// $event = new CategoryAddContentEvent(
// $this->getExistingObject(),
// $content_id
// );
//
// try {
// $this->dispatch(TheliaEvents::CATEGORY_ADD_CONTENT, $event);
// }
// catch (\Exception $ex) {
// // Any error
// return $this->errorPage($ex);
// }
// }
$this->redirectToEditionTemplate();
}

View File

@@ -73,6 +73,7 @@ use Thelia\Form\ProductSaleElementUpdateForm;
use Thelia\Form\ProductDefaultSaleElementUpdateForm;
use Thelia\Form\ProductCombinationGenerationForm;
use Thelia\Model\TaxRuleQuery;
use Thelia\TaxEngine\Calculator;
use Thelia\Tools\NumberFormat;
@@ -1155,10 +1156,10 @@ class ProductController extends AbstractSeoCrudController
{
$return_price = 0;
$price = floatval($this->getRequest()->get('price', 0));
$product_id = intval($this->getRequest()->get('product_id', 0));
$action = $this->getRequest()->get('action', ''); // With ot without tax
$convert = intval($this->getRequest()->get('convert_from_default_currency', 0));
$price = floatval($this->getRequest()->query->get('price', 0));
$product_id = intval($this->getRequest()->query->get('product_id', 0));
$action = $this->getRequest()->query->get('action', ''); // With ot without tax
$convert = intval($this->getRequest()->query->get('convert_from_default_currency', 0));
if (null !== $product = ProductQuery::create()->findPk($product_id)) {
@@ -1171,7 +1172,46 @@ class ProductController extends AbstractSeoCrudController
}
if ($convert != 0) {
$return_price = $prix * Currency::getDefaultCurrency()->getRate();
$return_price = $price * Currency::getDefaultCurrency()->getRate();
}
}
return new JsonResponse(array('result' => $return_price));
}
/**
*
* Calculate tax or untax price for a non existing product.
*
* For an existing product, use self::priceCaclulator
*
* @return JsonResponse
*/
public function calculatePrice()
{
$return_price = 0;
$price = floatval($this->getRequest()->query->get('price'));
$tax_rule_id = intval($this->getRequest()->query->get('tax_rule'));
$action = $this->getRequest()->query->get('action'); // With ot without tax
$taxRule = TaxRuleQuery::create()->findPk($tax_rule_id);
if (null !== $price && null !== $taxRule) {
$calculator = new Calculator();
$calculator->loadTaxRuleWithoutProduct(
$taxRule,
Country::getShopLocation()
);
if ($action == 'to_tax') {
$return_price = $calculator->getTaxedPrice($price);
} elseif ($action == 'from_tax') {
$return_price = $calculator->getUntaxedPrice($price);
} else {
$return_price = $price;
}
}
@@ -1251,7 +1291,7 @@ class ProductController extends AbstractSeoCrudController
}
if ($convert != 0) {
$return_price = $prix * Currency::getDefaultCurrency()->getRate();
$return_price = $price * Currency::getDefaultCurrency()->getRate();
}
// Format the number using '.', to perform further calculation

View File

@@ -122,7 +122,7 @@ class SessionController extends BaseAdminController
$this->applyUserLocale($user);
/**
* FIXME: we have tou find a way to send cookie
* we have tou find a way to send cookie
*/
if (intval($adminLoginForm->getForm()->get('remember_me')->getData()) > 0) {
// If a remember me field if present and set in the form, create

View File

@@ -83,27 +83,13 @@ class SystemLogController extends BaseAdminController
}
}
/**
* @return mixed|\Thelia\Core\HttpFoundation\Response
*/
public function defaultAction()
{
if (null !== $response = $this->checkAuth(AdminResources::SYSTEM_LOG, array(), AccessManager::VIEW)) return $response;
/*
const VAR_LEVEL = "tlog_level";
const VAR_DESTINATIONS = "tlog_destinations";
const VAR_PREFIXE = "tlog_prefix";
const VAR_FILES = "tlog_files";
const VAR_IP = "tlog_ip";
const VAR_SHOW_REDIRECT = "tlog_show_redirect";
const DEFAULT_LEVEL = self::DEBUG;
const DEFAUT_DESTINATIONS = "Thelia\Log\Destination\TlogDestinationFile";
const DEFAUT_PREFIXE = "#NUM: #NIVEAU [#FICHIER:#FONCTION()] {#LIGNE} #DATE #HEURE: ";
const DEFAUT_FILES = "*";
const DEFAUT_IP = "";
const DEFAUT_SHOW_REDIRECT = 0;
*/
// Hydrate the general configuration form
$systemLogForm = new SystemLogConfigurationForm($this->getRequest(), 'form', array(
'level' => ConfigQuery::read(Tlog::VAR_LEVEL, Tlog::DEFAULT_LEVEL),

View File

@@ -117,7 +117,7 @@ class TranslationsController extends BaseAdminController
$translations = $this->getRequest()->get('translation', array());
TemplateHelper::getInstance()->write_translation($file, $texts, $translations);
TemplateHelper::getInstance()->writeTranslation($file, $texts, $translations);
if ($save_mode == 'stay')
$this->redirectToRoute("admin.configuration.translations", $templateArguments);

View File

@@ -27,6 +27,8 @@ use Symfony\Component\HttpKernel\Controller\ControllerResolver as BaseController
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
use Psr\Log\LoggerInterface;
use Thelia\Controller\Admin\BaseAdminController;
use Thelia\Exception\AdminAccessDenied;
/**
* ControllerResolver that supports "a:b:c", "service:method" and class::method" notations in routes definition
@@ -90,6 +92,15 @@ class ControllerResolver extends BaseControllerResolver
$controller->setContainer($this->container);
}
//check if an admin is logged in
if ($controller instanceof BaseAdminController) {
$securityContext = $this->container->get('thelia.securityContext');
$request = $this->container->get('request');
if (false === $securityContext->hasAdminUser() && $request->attributes->get('not-logged') != 1) {
throw new AdminAccessDenied();
}
}
return array($controller, $method);
}
}

View File

@@ -22,7 +22,7 @@
/*************************************************************************************/
namespace Thelia\Core\Event\Address;
use Symfony\Component\EventDispatcher\Event;
use Thelia\Core\Event\ActionEvent;
use Thelia\Model\Address;
use Thelia\Model\Customer;

View File

@@ -22,7 +22,7 @@
/*************************************************************************************/
namespace Thelia\Core\Event\Address;
use Symfony\Component\EventDispatcher\Event;
use Thelia\Core\Event\ActionEvent;
use Thelia\Model\Address;

View File

@@ -23,7 +23,6 @@
namespace Thelia\Core\Event\Cart;
use Symfony\Component\EventDispatcher\Event;
use Thelia\Core\Event\ActionEvent;
use Thelia\Model\Cart;

View File

@@ -22,9 +22,6 @@
/*************************************************************************************/
namespace Thelia\Core\Event\Customer;
use Symfony\Component\EventDispatcher\Event;
use Thelia\Model\Customer;
/**
* Class CustomerCreateOrUpdateEvent
* @package Thelia\Core\Event

View File

@@ -23,8 +23,6 @@
namespace Thelia\Core\Event\Customer;
use Thelia\Model\Customer;
class CustomerLoginEvent extends CustomerEvent
{
// Nothing specific :)

View File

@@ -22,7 +22,6 @@
/*************************************************************************************/
namespace Thelia\Core\Event\FeatureProduct;
use Thelia\Model\FeatureProduct;
class FeatureProductDeleteEvent extends FeatureProductEvent
{

View File

@@ -22,7 +22,6 @@
/*************************************************************************************/
namespace Thelia\Core\Event\FeatureProduct;
use Thelia\Model\FeatureProduct;
class FeatureProductUpdateEvent extends FeatureProductEvent
{

View File

@@ -219,7 +219,6 @@ final class TheliaEvents
const COUNTRY_UPDATE = "action.updateCountry";
const COUNTRY_DELETE = "action.deleteCountry";
const COUNTRY_TOGGLE_DEFAULT = "action.toggleCountryDefault";
//const COUNTRY_UPDATE_POSITION = "action.updateFolderPosition";
const BEFORE_CREATECOUNTRY = "action.before_createCountry";
const AFTER_CREATECOUNTRY = "action.after_createCountry";

View File

@@ -250,7 +250,14 @@ class Session extends BaseSession
*/
public function getOrder()
{
return $this->get("thelia.order");
$order = $this->get("thelia.order");
if (null === $order) {
$order = new Order();
$this->setOrder($order);
}
return $order;
}
/**

View File

@@ -32,7 +32,6 @@ use Symfony\Component\Routing\Matcher\RequestMatcherInterface;
use Symfony\Component\Routing\RequestContext;
use Symfony\Component\Routing\RouteCollection;
use Symfony\Component\Routing\RouterInterface;
use Thelia\Exception\RedirectException;
use Thelia\Exception\UrlRewritingException;
use Thelia\Model\ConfigQuery;
use Thelia\Tools\Redirect;
@@ -161,7 +160,6 @@ class RewritingRouter implements RouterInterface, RequestMatcherInterface
*
* @throws \Exception|\Thelia\Exception\UrlRewritingException
* @throws \Symfony\Component\Routing\Exception\ResourceNotFoundException
* @throws \Thelia\Exception\RedirectException
* @return array An array of parameters
*
*/

View File

@@ -171,16 +171,6 @@ class AsseticAssetManager implements AssetManagerInterface
$fs = new Filesystem();
// FIXME: locking or not locking ?
/*
$lock_file = "$web_assets_directory_base/assets-".md5($source_assets_directory)."-generation-lock.txt";
if (! $fp = fopen($lock_file, "w")) {
throw new IOException(sprintf('Failed to open lock file %s', $lock_file));
}
if (flock($fp, LOCK_EX|LOCK_NB)) { // do an exclusive lock
*/
$tmp_dir = "$to_directory.tmp";
$fs->remove($tmp_dir);

View File

@@ -30,7 +30,6 @@ use Thelia\Core\Template\Loop\Argument\ArgumentCollection;
use Thelia\Core\Template\Loop\Argument\Argument;
use Thelia\Model\AccessoryQuery;
use Thelia\Type;
/**
*

View File

@@ -31,7 +31,6 @@ use Thelia\Core\Template\Loop\Argument\Argument;
use Thelia\Model\ProductAssociatedContentQuery;
use Thelia\Model\CategoryAssociatedContentQuery;
use Thelia\Type;
/**
*
@@ -57,8 +56,8 @@ class AssociatedContent extends Content
$argumentCollection
->addArgument(Argument::createIntTypeArgument('product'))
->addArgument(Argument::createIntTypeArgument('category'))
->addArgument(Argument::createIntTypeArgument('exclude_product'))
->addArgument(Argument::createIntTypeArgument('exclude_category'))
->addArgument(Argument::createIntListTypeArgument('exclude_product'))
->addArgument(Argument::createIntListTypeArgument('exclude_category'))
;
$argumentCollection->get('order')->default = "associated_content";

View File

@@ -71,8 +71,7 @@ class Auth extends BaseLoop implements ArraySearchLoopInterface
new TypeCollection(
new EnumListType(array(AccessManager::VIEW, AccessManager::CREATE, AccessManager::UPDATE, AccessManager::DELETE))
)
),
Argument::createAnyTypeArgument('context', 'front', false)
)
);
}

View File

@@ -90,7 +90,6 @@ class Cart extends BaseLoop implements ArraySearchLoopInterface
$loopResultRow->set("TITLE", $product->getTitle());
$loopResultRow->set("REF", $product->getRef());
$loopResultRow->set("QUANTITY", $cartItem->getQuantity());
$loopResultRow->set("PRICE", $cartItem->getPrice());
$loopResultRow->set("PRODUCT_ID", $product->getId());
$loopResultRow->set("PRODUCT_URL", $product->getUrl($this->request->getSession()->getLang()->getLocale()))
->set("STOCK", $productSaleElement->getQuantity())

View File

@@ -65,7 +65,6 @@ class CategoryPath extends BaseI18nLoop implements ArraySearchLoopInterface
return new ArgumentCollection(
Argument::createIntTypeArgument('category', null, true),
Argument::createIntTypeArgument('depth'),
Argument::createIntTypeArgument('level'),
Argument::createBooleanOrBothTypeArgument('visible', true, false)
);
}

View File

@@ -36,7 +36,6 @@ use Thelia\Core\Template\Loop\Argument\ArgumentCollection;
use Thelia\Coupon\Type\CouponInterface;
use Thelia\Model\Coupon as MCoupon;
use Thelia\Model\CouponQuery;
use Thelia\Type;
/**
* Coupon Loop

View File

@@ -70,13 +70,20 @@ class Customer extends BaseLoop implements SearchLoopInterface, PropelSearchLoop
'order',
new TypeCollection(
new Type\EnumListType(array(
'id', 'id_reverse',
'reference', 'reference_reverse',
'firstname', 'firstname_reverse',
'lastname', 'lastname_reverse',
'last_order', 'last_order_reverse',
'order_amount', 'order_amount_reverse',
'registration_date', 'registration_date_reverse'
'id',
'id_reverse',
'reference',
'reference_reverse',
'firstname',
'firstname_reverse',
'lastname',
'lastname_reverse',
'last_order',
'last_order_reverse',
'order_amount',
'order_amount_reverse',
'registration_date',
'registration_date_reverse'
))
),
'lastname'
@@ -219,19 +226,15 @@ class Customer extends BaseLoop implements SearchLoopInterface, PropelSearchLoop
$loopResultRow = new LoopResultRow($customer);
$loopResultRow
->set("ID" , $customer->getId())
->set("REF" , $customer->getRef())
->set("TITLE" , $customer->getTitleId())
->set("FIRSTNAME" , $customer->getFirstname())
->set("LASTNAME" , $customer->getLastname())
->set("EMAIL" , $customer->getEmail())
->set("RESELLER" , $customer->getReseller())
->set("SPONSOR" , $customer->getSponsor())
->set("DISCOUNT" , $customer->getDiscount())
->set("LAST_ORDER_DATE" , $lastOrder != null ? $lastOrder->getCreatedAt() : '')
->set("LAST_ORDER_AMOUNT" , $lastOrder != null ? $lastOrder->getCreatedAt() : '')
->set("LAST_ORDER_CURRENCY" , $lastOrder != null ? $lastOrder->getCreatedAt() : '')
->set("ID", $customer->getId())
->set("REF", $customer->getRef())
->set("TITLE", $customer->getTitleId())
->set("FIRSTNAME", $customer->getFirstname())
->set("LASTNAME", $customer->getLastname())
->set("EMAIL", $customer->getEmail())
->set("RESELLER", $customer->getReseller())
->set("SPONSOR", $customer->getSponsor())
->set("DISCOUNT", $customer->getDiscount())
;
$loopResult->addRow($loopResultRow);

View File

@@ -165,8 +165,6 @@ class Document extends BaseI18nLoop implements PropelSearchLoopInterface
$source_id = $this->getSourceId();
$id = $this->getId();
// echo "source = ".$this->getSource().", id=".$source_id." - ".$this->getArg('source_id')->getValue()."<br />";
if (is_null($source_id) && is_null($id)) {
throw new \InvalidArgumentException("If 'source' argument is specified, 'id' or 'source_id' argument should be specified");
}
@@ -264,7 +262,7 @@ class Document extends BaseI18nLoop implements PropelSearchLoopInterface
$loopResult->addRow($loopResultRow);
} catch (\Exception $ex) {
// Ignore the result and log an error
Tlog::getInstance()->addError(sprintf("Failed to process document in document loop: %s", $ex->getMessage()), $this->args);
Tlog::getInstance()->addError(sprintf("Failed to process document in document loop: %s", $ex->getMessage()));
}
}

View File

@@ -82,7 +82,7 @@ class Feed extends BaseLoop implements ArraySearchLoopInterface
->set("TITLE" , $item->get_title())
->set("AUTHOR" , $item->get_author())
->set("DESCRIPTION" , $item->get_description())
->set("DATE" , $item->get_date('U')) // FIXME - date format should be an intl parameter
->set("DATE" , $item->get_date('U'))
;
$loopResult->addRow($loopResultRow);

View File

@@ -75,7 +75,6 @@ class FolderPath extends BaseI18nLoop implements ArraySearchLoopInterface
return new ArgumentCollection(
Argument::createIntTypeArgument('folder', null, true),
Argument::createIntTypeArgument('depth'),
Argument::createIntTypeArgument('level'),
Argument::createBooleanOrBothTypeArgument('visible', true, false)
);
}

View File

@@ -180,8 +180,6 @@ class Image extends BaseI18nLoop implements PropelSearchLoopInterface
$source_id = $this->getSourceId();
$id = $this->getId();
//echo "source = ".$this->getSourceId()."source_id=$source_id, id=$id<br />";
if (is_null($source_id) && is_null($id)) {
throw new \InvalidArgumentException("If 'source' argument is specified, 'id' or 'source_id' argument should be specified");
}
@@ -235,7 +233,6 @@ class Image extends BaseI18nLoop implements PropelSearchLoopInterface
if (!is_null($exclude))
$search->filterById($exclude, Criteria::NOT_IN);
// echo "sql=".$search->toString();
return $search;
}
@@ -273,10 +270,6 @@ class Image extends BaseI18nLoop implements PropelSearchLoopInterface
}
foreach ($loopResult->getResultDataCollection() as $result) {
// Create image processing event
// ERO : following is duplicated, guess it's useless at this point
//$event = new ImageEvent($this->request);
// Setup required transformations
if (! is_null($width)) $event->setWidth($width);
@@ -323,7 +316,7 @@ class Image extends BaseI18nLoop implements PropelSearchLoopInterface
$loopResult->addRow($loopResultRow);
} catch (\Exception $ex) {
// Ignore the result and log an error
Tlog::getInstance()->addError("Failed to process image in image loop: ", $this->args);
Tlog::getInstance()->addError(sprintf("Failed to process image in image loop: %s", $ex->getMessage()));
}
}

View File

@@ -78,19 +78,11 @@ class OrderCoupon extends BaseLoop implements PropelSearchLoopInterface
/** @var OrderCoupon $orderCoupon */
foreach ($loopResult->getResultDataCollection() as $orderCoupon) {
$loopResultRow = new LoopResultRow($orderCoupon);
/*$conditions = $conditionFactory->unserializeConditionCollection(
$orderCoupon->getSerializedConditions()
);*/
$now = time();
$datediff = $orderCoupon->getExpirationDate()->getTimestamp() - $now;
$daysLeftBeforeExpiration = floor($datediff/(60*60*24));
/*$cleanedConditions = array();
foreach ($conditions->getConditions() as $condition) {
$cleanedConditions[] = $condition->getToolTip();
}*/
$loopResultRow->set("ID", $orderCoupon->getId())
->set("CODE", $orderCoupon->getCode())
->set("TITLE", $orderCoupon->getTitle())
@@ -100,8 +92,6 @@ class OrderCoupon extends BaseLoop implements PropelSearchLoopInterface
->set("IS_CUMULATIVE", $orderCoupon->getIsCumulative())
->set("IS_REMOVING_POSTAGE", $orderCoupon->getIsRemovingPostage())
->set("IS_AVAILABLE_ON_SPECIAL_OFFERS", $orderCoupon->getIsAvailableOnSpecialOffers())
//->set("AMOUNT", $orderCoupon->getAmount())
//->set("APPLICATION_CONDITIONS", $cleanedConditions)
->set("DAY_LEFT_BEFORE_EXPIRATION", $daysLeftBeforeExpiration)
;
$loopResult->addRow($loopResultRow);

View File

@@ -83,6 +83,7 @@ class Product extends BaseI18nLoop implements PropelSearchLoopInterface, SearchL
Argument::createIntTypeArgument('min_stock'),
Argument::createFloatTypeArgument('min_weight'),
Argument::createFloatTypeArgument('max_weight'),
Argument::createBooleanTypeArgument('with_prev_next_info', false),
Argument::createBooleanTypeArgument('current'),
Argument::createBooleanTypeArgument('current_category'),
Argument::createIntTypeArgument('depth', 1),
@@ -494,35 +495,10 @@ class Product extends BaseI18nLoop implements PropelSearchLoopInterface, SearchL
// Find previous and next product, in the default category.
$default_category_id = $product->getDefaultCategoryId();
$previous = ProductQuery::create()
->joinProductCategory()
->where('ProductCategory.category_id = ?', $default_category_id)
->filterByPosition($product->getPosition(), Criteria::LESS_THAN)
->orderByPosition(Criteria::DESC)
->findOne()
;
$next = ProductQuery::create()
->joinProductCategory()
->where('ProductCategory.category_id = ?', $default_category_id)
->filterByPosition($product->getPosition(), Criteria::GREATER_THAN)
->orderByPosition(Criteria::ASC)
->findOne()
;
$loopResultRow
->set("ID" , $product->getId())
->set("REF" , $product->getRef())
->set("IS_TRANSLATED" , $product->getVirtualColumn('IS_TRANSLATED'))
->set("LOCALE" , $this->locale)
->set("TITLE" , $product->getVirtualColumn('i18n_TITLE'))
->set("CHAPO" , $product->getVirtualColumn('i18n_CHAPO'))
->set("DESCRIPTION" , $product->getVirtualColumn('i18n_DESCRIPTION'))
->set("POSTSCRIPTUM" , $product->getVirtualColumn('i18n_POSTSCRIPTUM'))
->set("URL" , $product->getUrl($this->locale))
->set("META_TITLE" , $product->getVirtualColumn('i18n_META_TITLE'))
->set("META_DESCRIPTION" , $product->getVirtualColumn('i18n_META_DESCRIPTION'))
->set("META_KEYWORDS" , $product->getVirtualColumn('i18n_META_KEYWORDS'))
->set("WEIGHT" , $product->getVirtualColumn('weight'))
->set("QUANTITY" , $product->getVirtualColumn('quantity'))
->set("EAN_CODE" , $product->getVirtualColumn('ean_code'))
->set("BEST_PRICE" , $product->getVirtualColumn('is_promo') ? $promoPrice : $price)
->set("BEST_PRICE_TAX" , $taxedPrice - $product->getVirtualColumn('is_promo') ? $taxedPromoPrice - $promoPrice : $taxedPrice - $price)
->set("BEST_TAXED_PRICE" , $product->getVirtualColumn('is_promo') ? $taxedPromoPrice : $taxedPrice)
@@ -532,25 +508,13 @@ class Product extends BaseI18nLoop implements PropelSearchLoopInterface, SearchL
->set("PROMO_PRICE" , $promoPrice)
->set("PROMO_PRICE_TAX" , $taxedPromoPrice - $promoPrice)
->set("TAXED_PROMO_PRICE" , $taxedPromoPrice)
->set("PRODUCT_SALE_ELEMENT" , $product->getVirtualColumn('pse_id'))
->set("WEIGHT" , $product->getVirtualColumn('weight'))
->set("QUANTITY" , $product->getVirtualColumn('quantity'))
->set("EAN_CODE" , $product->getVirtualColumn('ean_code'))
->set("IS_PROMO" , $product->getVirtualColumn('is_promo'))
->set("IS_NEW" , $product->getVirtualColumn('is_new'))
->set("POSITION" , $product->getPosition())
->set("VISIBLE" , $product->getVisible() ? "1" : "0")
->set("TEMPLATE" , $product->getTemplateId())
->set("HAS_PREVIOUS" , $previous != null ? 1 : 0)
->set("HAS_NEXT" , $next != null ? 1 : 0)
->set("PREVIOUS" , $previous != null ? $previous->getId() : -1)
->set("NEXT" , $next != null ? $next->getId() : -1)
->set("DEFAULT_CATEGORY" , $default_category_id)
->set("TAX_RULE_ID" , $product->getTaxRuleId())
;
$loopResult->addRow($loopResultRow);
$loopResult->addRow($this->associateValues($loopResultRow, $product, $default_category_id));
}
return $loopResult;
@@ -1004,6 +968,48 @@ class Product extends BaseI18nLoop implements PropelSearchLoopInterface, SearchL
// Find previous and next product, in the default category.
$default_category_id = $product->getDefaultCategoryId();
$loopResultRow
->set("BEST_PRICE" , $price)
->set("BEST_PRICE_TAX" , $taxedPrice - $price)
->set("BEST_TAXED_PRICE" , $taxedPrice)
->set("IS_PROMO" , $product->getVirtualColumn('is_promo'))
->set("IS_NEW" , $product->getVirtualColumn('is_new'))
;
$loopResult->addRow($this->associateValues($loopResultRow, $product, $default_category_id));
}
return $loopResult;
}
private function associateValues($loopResultRow, $product, $default_category_id)
{
$loopResultRow
->set("ID" , $product->getId())
->set("REF" , $product->getRef())
->set("IS_TRANSLATED" , $product->getVirtualColumn('IS_TRANSLATED'))
->set("LOCALE" , $this->locale)
->set("TITLE" , $product->getVirtualColumn('i18n_TITLE'))
->set("CHAPO" , $product->getVirtualColumn('i18n_CHAPO'))
->set("DESCRIPTION" , $product->getVirtualColumn('i18n_DESCRIPTION'))
->set("POSTSCRIPTUM" , $product->getVirtualColumn('i18n_POSTSCRIPTUM'))
->set("URL" , $product->getUrl($this->locale))
->set("META_TITLE" , $product->getVirtualColumn('i18n_META_TITLE'))
->set("META_DESCRIPTION" , $product->getVirtualColumn('i18n_META_DESCRIPTION'))
->set("META_KEYWORDS" , $product->getVirtualColumn('i18n_META_KEYWORDS'))
->set("PRODUCT_SALE_ELEMENT" , $product->getVirtualColumn('pse_id'))
->set("POSITION" , $product->getPosition())
->set("VISIBLE" , $product->getVisible() ? "1" : "0")
->set("TEMPLATE" , $product->getTemplateId())
->set("DEFAULT_CATEGORY" , $default_category_id)
->set("TAX_RULE_ID" , $product->getTaxRuleId())
;
if ($this->getBackend_context() || $this->getWithPrevNextInfo()) {
// Find previous and next category
$previous = ProductQuery::create()
->joinProductCategory()
->where('ProductCategory.category_id = ?', $default_category_id)
@@ -1021,39 +1027,14 @@ class Product extends BaseI18nLoop implements PropelSearchLoopInterface, SearchL
;
$loopResultRow
->set("ID" , $product->getId())
->set("REF" , $product->getRef())
->set("IS_TRANSLATED" , $product->getVirtualColumn('IS_TRANSLATED'))
->set("LOCALE" , $this->locale)
->set("TITLE" , $product->getVirtualColumn('i18n_TITLE'))
->set("CHAPO" , $product->getVirtualColumn('i18n_CHAPO'))
->set("DESCRIPTION" , $product->getVirtualColumn('i18n_DESCRIPTION'))
->set("POSTSCRIPTUM" , $product->getVirtualColumn('i18n_POSTSCRIPTUM'))
->set("URL" , $product->getUrl($this->locale))
->set("META_TITLE" , $product->getVirtualColumn('i18n_META_TITLE'))
->set("META_DESCRIPTION" , $product->getVirtualColumn('i18n_META_DESCRIPTION'))
->set("META_KEYWORDS" , $product->getVirtualColumn('i18n_META_KEYWORDS'))
->set("BEST_PRICE" , $price)
->set("BEST_PRICE_TAX" , $taxedPrice - $price)
->set("BEST_TAXED_PRICE" , $taxedPrice)
->set("IS_PROMO" , $product->getVirtualColumn('main_product_is_promo'))
->set("IS_NEW" , $product->getVirtualColumn('main_product_is_new'))
->set("POSITION" , $product->getPosition())
->set("VISIBLE" , $product->getVisible() ? "1" : "0")
->set("TEMPLATE" , $product->getTemplateId())
->set("HAS_PREVIOUS" , $previous != null ? 1 : 0)
->set("HAS_NEXT" , $next != null ? 1 : 0)
->set("PREVIOUS" , $previous != null ? $previous->getId() : -1)
->set("NEXT" , $next != null ? $next->getId() : -1)
->set("DEFAULT_CATEGORY" , $default_category_id)
->set("TAX_RULE_ID" , $product->getTaxRuleId())
;
$loopResult->addRow($loopResultRow);
}
return $loopResult;
return $loopResultRow;
}
protected function manageFeatureAv(&$search, $feature_availability)

View File

@@ -35,10 +35,10 @@ abstract class AbstractSmartyPlugin
/**
* Explode a comma separated list in a array, trimming all array elements
*
* @param unknown $commaSeparatedValues
* @return multitype:
* @param mixed $commaSeparatedValues
* @return mixed:
*/
protected function _explode($commaSeparatedValues)
protected function explode($commaSeparatedValues)
{
if (null === $commaSeparatedValues) {
return array();

View File

@@ -43,7 +43,7 @@ class AdminUtilities extends AbstractSmartyPlugin
$this->securityContext = $securityContext;
}
protected function fetch_snippet($smarty, $templateName, $variablesArray)
protected function fetchSnippet($smarty, $templateName, $variablesArray)
{
$data = '';
@@ -97,7 +97,7 @@ class AdminUtilities extends AbstractSmartyPlugin
$module === null ? array() : array($module),
array($access))
) {
return $this->fetch_snippet($smarty, 'includes/admin-utilities-position-block', array(
return $this->fetchSnippet($smarty, 'includes/admin-utilities-position-block', array(
'admin_utilities_go_up_url' => URL::getInstance()->absoluteUrl($path, array('mode' => 'up', $url_parameter => $id)),
'admin_utilities_in_place_edit_class' => $in_place_edit_class,
'admin_utilities_object_id' => $id,
@@ -146,7 +146,7 @@ class AdminUtilities extends AbstractSmartyPlugin
$order_change = $order;
}
return $this->fetch_snippet($smarty, 'includes/admin-utilities-sortable-column-header', array(
return $this->fetchSnippet($smarty, 'includes/admin-utilities-sortable-column-header', array(
'admin_utilities_sort_direction' => $sort_direction,
'admin_utilities_sorting_url' => URL::getInstance()->absoluteUrl($path, array($request_parameter_name => $order_change)),
'admin_utilities_header_text' => $label

View File

@@ -170,12 +170,6 @@ class DataAccessFunctions extends AbstractSmartyPlugin
{
switch ($params["ask"]) {
case "default":
/*if (array_key_exists('defaultCountry', self::$dataAccessCache)) {
$defaultCountry = self::$dataAccessCache['defaultCountry'];
} else {
$defaultCountry = CountryQuery::create()->findOneByByDefault(1);
self::$dataAccessCache['defaultCountry'] = $defaultCountry;
}*/
$defaultCountry = CountryQuery::create()->filterByByDefault(1)->limit(1);
return $this->dataAccessWithI18n("defaultCountry", $params, $defaultCountry);

View File

@@ -63,7 +63,7 @@ class Module extends AbstractSmartyPlugin
public function theliaModule($params, \Smarty_Internal_Template $template)
{
$content = null;
$count = 0;
if (false !== $location = $this->getParam($params, 'location', false)) {
if ($this->debug === true && $this->request->get('SHOW_INCLUDE')) {
@@ -74,8 +74,6 @@ class Module extends AbstractSmartyPlugin
$modules = ModuleQuery::getActivated();
$count = 0;
foreach ($modules as $module) {
if (null !== $moduleLimit && $moduleLimit != $module->getCode()) {
@@ -92,14 +90,14 @@ class Module extends AbstractSmartyPlugin
}
}
if (! empty($content)) {
return $template->fetch(sprintf("string:%s", $content));
}
if (false !== $countvarname = $this->getParam($params, 'countvar', false)) {
$template->assign($countvarname, $count);
}
if (! empty($content)) {
return $template->fetch(sprintf("string:%s", $content));
}
return "";
}

View File

@@ -53,16 +53,16 @@ class Security extends AbstractSmartyPlugin
*/
public function checkAuthFunction($params, &$smarty)
{
$roles = $this->_explode($this->getParam($params, 'role'));
$resources = $this->_explode($this->getParam($params, 'resource'));
$modules = $this->_explode($this->getParam($params, 'module'));
$accesses = $this->_explode($this->getParam($params, 'access'));
$roles = $this->explode($this->getParam($params, 'role'));
$resources = $this->explode($this->getParam($params, 'resource'));
$modules = $this->explode($this->getParam($params, 'module'));
$accesses = $this->explode($this->getParam($params, 'access'));
if (! $this->securityContext->isGranted($roles, $resources, $modules, $accesses)) {
$ex = new AuthenticationException(
sprintf("User not granted for roles '%s', to access resources '%s' with %s in context '%s'.",
implode(',', $roles), implode(',', $resources), implode(',', $accesses), $context
sprintf("User not granted for roles '%s', to access resources '%s' with %s.",
implode(',', $roles), implode(',', $resources), implode(',', $accesses)
)
);

View File

@@ -186,7 +186,6 @@ class UrlGenerator extends AbstractSmartyPlugin
protected function getCurrentUrl()
{
//return URL::getInstance()->retrieveCurrent($this->request)->toString();
return $this->request->getUri();
}

View File

@@ -82,8 +82,6 @@ class SmartyParser extends Smarty implements ParserInterface
$this->setForceCompile(false);
}
//$this->enableSecurity();
// The default HTTP status
$this->status = 200;

View File

@@ -139,7 +139,7 @@ class TemplateHelper
}
}
protected function normalize_path($path)
protected function normalizePath($path)
{
$path = str_replace(
str_replace('\\', '/', THELIA_ROOT),
@@ -203,7 +203,7 @@ class TemplateHelper
if ($content = file_get_contents($fileInfo->getPathName())) {
$short_path = $this->normalize_path($fileInfo->getPathName());
$short_path = $this->normalizePath($fileInfo->getPathName());
Tlog::getInstance()->debug("Examining file $short_path\n");
@@ -249,7 +249,7 @@ class TemplateHelper
}
public function write_translation($file, $texts, $translations)
public function writeTranslation($file, $texts, $translations)
{
if ($fp = @fopen($file, 'w')) {

View File

@@ -63,9 +63,6 @@ class Thelia extends Kernel
public function init()
{
parent::init();
if ($this->debug) {
ini_set('display_errors', 1);
}
$this->initPropel();
}

View File

@@ -79,7 +79,6 @@ class TheliaHttpKernel extends HttpKernel
*/
public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true)
{
//$request->headers->set('X-Php-Ob-Level', ob_get_level());
if ($type == HttpKernelInterface::MASTER_REQUEST) {
$request = $this->initSession($request);
$this->initParam($request);
@@ -189,7 +188,6 @@ class TheliaHttpKernel extends HttpKernel
// TODO : search if http status 302 is the good one.
$redirect = new RedirectResponse($lang->getUrl(), 302);
$redirect->send();
exit;
} else {
//the user is actually on the good domain, nothing to change
return null;

View File

@@ -20,53 +20,15 @@
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* */
/*************************************************************************************/
namespace Thelia\Core\EventListener;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpKernel\KernelEvents;
use Symfony\Component\HttpKernel\Event\FilterControllerEvent;
use Thelia\Core\Factory\ActionEventFactory;
use Thelia\Core\Template\ParserContext;
namespace Thelia\Exception;
/**
*
* Action are dispatched here.
*
* A factory is used for creating appropriate action object
*
* Class ControllerListener
* @package Thelia\Core\EventListener
* Class AdminAccessDenied
* @package Thelia\Exception
* @author Manuel Raynaud <mraynaud@openstudio.fr>
*/
class ControllerListener implements EventSubscriberInterface
class AdminAccessDenied extends \RuntimeException
{
/**
* @var ParserContext the parser context
*/
protected $parserContext;
public function __construct(ParserContext $parserContext)
{
$this->parserContext = $parserContext;
}
public function onKernelController(FilterControllerEvent $event)
{
$dispatcher = $event->getDispatcher();
$request = $event->getRequest();
if (false !== $action = $request->get("action")) {
//search corresponding action
$event = new ActionEventFactory($request, $action, $event->getKernel()->getContainer()->getParameter("thelia.actionEvent"));
$actionEvent = $event->createActionEvent();
$dispatcher->dispatch("action.".$action, $actionEvent);
}
}
public static function getSubscribedEvents()
{
return array(
KernelEvents::CONTROLLER => array('onKernelController', 0)
);
}
}

View File

@@ -39,12 +39,6 @@ class AttributeModificationForm extends AttributeCreationForm
)
)
))
/* FIXME: doesn't work
->add('attribute_values', 'collection', array(
'type' => 'text',
'options' => array('required' => false)
))
*/
;
// Add standard description fields

View File

@@ -46,9 +46,6 @@ class FeatureCreationForm extends BaseForm
))
)
->add("add_to_all" , "checkbox" , array(
"constraints" => array(
new NotBlank()
),
"label" => Translator::getInstance()->trans("Add to all product templates"),
"label_attr" => array(
"for" => "add_to_all"

View File

@@ -39,12 +39,6 @@ class FeatureModificationForm extends FeatureCreationForm
)
)
))
/* FIXME: doesn't work
->add('feature_values', 'collection', array(
'type' => 'text',
'options' => array('required' => false)
))
*/
;
// Add standard description fields

View File

@@ -88,7 +88,7 @@ class OrderPayment extends BaseForm
$moduleReflection = new \ReflectionClass($module->getFullNamespace());
if ($moduleReflection->isSubclassOf("Thelia\Module\PaymentModuleInterface") === false) {
$context->addViolation(
sprintf(Translator::getInstance()->trans("delivery module %s is not a Thelia\Module\PaymentModuleInterface"), $module->getCode())
sprintf(Translator::getInstance()->trans("payment module %s is not a Thelia\Module\PaymentModuleInterface"), $module->getCode())
);
}
}

View File

@@ -70,7 +70,11 @@ class ProductCreationForm extends BaseForm
->add("price", "number", array(
"constraints" => array(new NotBlank()),
"label" => Translator::getInstance()->trans("Product base price excluding taxes *"),
"label_attr" => array("for" => "price_field")
"label_attr" => array("for" => "price_without_tax")
))
->add("tax_price", "number", array(
"label" => Translator::getInstance()->trans("Product base price with taxes"),
"label_attr" => array("for" => "price_with_tax")
))
->add("currency", "integer", array(
"constraints" => array(new NotBlank()),
@@ -83,8 +87,7 @@ class ProductCreationForm extends BaseForm
"label_attr" => array("for" => "tax_rule_field")
))
->add("weight", "number", array(
"constraints" => array(new NotBlank()),
"label" => Translator::getInstance()->trans("Weight *"),
"label" => Translator::getInstance()->trans("Weight"),
"label_attr" => array("for" => "weight_field")
))
;

View File

@@ -65,8 +65,7 @@ class ProductDefaultSaleElementUpdateForm extends ProductSaleElementUpdateForm
"label_attr" => array("for" => "tax_rule_field")
))
->add("weight", "number", array(
"constraints" => array(new NotBlank()),
"label" => Translator::getInstance()->trans("Weight *"),
"label" => Translator::getInstance()->trans("Weight"),
"label_attr" => array("for" => "weight_field")
))
->add("quantity", "number", array(

View File

@@ -91,13 +91,10 @@ class ProductSaleElementUpdateForm extends BaseForm
))
->add('weight', 'collection', array(
'type' => 'number',
'label' => Translator::getInstance()->trans('Weight *'),
'label' => Translator::getInstance()->trans('Weight'),
'label_attr' => array('for' => 'weight_field'),
'allow_add' => true,
'allow_delete' => true,
'options' => array(
'constraints' => array(new NotBlank()),
)
'allow_delete' => true
))
->add('quantity', 'collection', array(
'type' => 'number',

View File

@@ -41,18 +41,6 @@ class TemplateModificationForm extends TemplateCreationForm
)
)
))
/*
->add('attributes', 'collection', array(
'type' => 'text',
'options' => array('required' => false)
))
*/
/* FIXME: doesn't work
->add('features', 'collection', array(
'type' => 'text',
'options' => array('required' => false)
))
*/
;
}

View File

@@ -66,8 +66,8 @@ class Database
);
}
}
for ($i = 0; $i < count($sql); $i ++) {
$size = count($sql);
for ($i = 0; $i < $size; $i ++) {
if (!empty($sql[$i])) {
$this->connection->query($sql[$i]);
}
@@ -87,8 +87,8 @@ class Database
$query = array();
$tab = explode(";\n", $sql);
for ($i=0; $i<count($tab); $i++) {
$size = count($tab);
for ($i=0; $i<$size; $i++) {
$queryTemp = str_replace("-CODE-", ";',", $tab[$i]);
$queryTemp = str_replace("|", ";", $queryTemp);
$query[] = $queryTemp;

View File

@@ -73,7 +73,8 @@ class Update
$logger->debug("begin transaction");
$database = new Database($con->getWrappedConnection());
try {
for ($i = ++$index; $i < count(self::$version); $i++) {
$size = count(self::$version);
for ($i = ++$index; $i < $size; $i++) {
$this->updateToVersion(self::$version[$i], $database, $logger);
$updatedVersions[] = self::$version[$i];
}

View File

@@ -620,7 +620,7 @@ class Tlog Implements LoggerInterface
// we are sometimes in functions = no class available: avoid php warning here
$className = $hop['class'];
if (! empty($className) and ($className == ltrim(__CLASS__,'\\') or strtolower(get_parent_class($className)) == ltrim(__CLASS__,'\\'))) {
if (! empty($className) && ($className == ltrim(__CLASS__,'\\') || strtolower(get_parent_class($className)) == ltrim(__CLASS__,'\\'))) {
$origine['line'] = $hop['line'];
$origine['file'] = $hop['file'];
break;
@@ -632,10 +632,10 @@ class Tlog Implements LoggerInterface
$origine['class'] = isset($prevHop['class']) ? $prevHop['class'] : 'main';
if(isset($prevHop['function']) and
$prevHop['function'] !== 'include' and
$prevHop['function'] !== 'include_once' and
$prevHop['function'] !== 'require' and
if(isset($prevHop['function']) &&
$prevHop['function'] !== 'include' &&
$prevHop['function'] !== 'include_once' &&
$prevHop['function'] !== 'require' &&
$prevHop['function'] !== 'require_once') {
$origine['function'] = $prevHop['function'];

View File

@@ -27,6 +27,11 @@ class Admin extends BaseAdmin implements UserInterface
{
use ModelEventDispatcherTrait;
/**
* Retrieve all permissions for the current admin
*
* @return array|string
*/
public function getPermissions()
{
$profileId = $this->getProfileId();
@@ -105,7 +110,7 @@ class Admin extends BaseAdmin implements UserInterface
*/
public function eraseCredentials()
{
$this->setPassword(null);
parent::setPassword(null);
}
/**

View File

@@ -4,7 +4,7 @@ namespace Thelia\Model;
use Thelia\Model\Base\AreaDeliveryModule as BaseAreaDeliveryModule;
class AreaDeliveryModule extends BaseAreaDeliveryModule
class AreaDeliveryModule extends BaseAreaDeliveryModule
{
}

View File

@@ -29,6 +29,7 @@ abstract class Accessory implements ActiveRecordInterface
*/
const TABLE_MAP = '\\Thelia\\Model\\Map\\AccessoryTableMap';
/**
* attribute to determine if this object has previously been saved.
* @var boolean
@@ -374,6 +375,7 @@ abstract class Accessory implements ActiveRecordInterface
*/
public function getId()
{
return $this->id;
}
@@ -384,6 +386,7 @@ abstract class Accessory implements ActiveRecordInterface
*/
public function getProductId()
{
return $this->product_id;
}
@@ -394,6 +397,7 @@ abstract class Accessory implements ActiveRecordInterface
*/
public function getAccessory()
{
return $this->accessory;
}
@@ -404,6 +408,7 @@ abstract class Accessory implements ActiveRecordInterface
*/
public function getPosition()
{
return $this->position;
}
@@ -464,6 +469,7 @@ abstract class Accessory implements ActiveRecordInterface
$this->modifiedColumns[AccessoryTableMap::ID] = true;
}
return $this;
} // setId()
@@ -488,6 +494,7 @@ abstract class Accessory implements ActiveRecordInterface
$this->aProductRelatedByProductId = null;
}
return $this;
} // setProductId()
@@ -512,6 +519,7 @@ abstract class Accessory implements ActiveRecordInterface
$this->aProductRelatedByAccessory = null;
}
return $this;
} // setAccessory()
@@ -532,6 +540,7 @@ abstract class Accessory implements ActiveRecordInterface
$this->modifiedColumns[AccessoryTableMap::POSITION] = true;
}
return $this;
} // setPosition()
@@ -552,6 +561,7 @@ abstract class Accessory implements ActiveRecordInterface
}
} // if either are not null
return $this;
} // setCreatedAt()
@@ -572,6 +582,7 @@ abstract class Accessory implements ActiveRecordInterface
}
} // if either are not null
return $this;
} // setUpdatedAt()
@@ -1164,6 +1175,7 @@ abstract class Accessory implements ActiveRecordInterface
if ($this->isColumnModified(AccessoryTableMap::POSITION)) $criteria->add(AccessoryTableMap::POSITION, $this->position);
if ($this->isColumnModified(AccessoryTableMap::CREATED_AT)) $criteria->add(AccessoryTableMap::CREATED_AT, $this->created_at);
if ($this->isColumnModified(AccessoryTableMap::UPDATED_AT)) $criteria->add(AccessoryTableMap::UPDATED_AT, $this->updated_at);
return $criteria;
}
@@ -1209,6 +1221,7 @@ abstract class Accessory implements ActiveRecordInterface
*/
public function isPrimaryKeyNull()
{
return null === $this->getId();
}
@@ -1281,6 +1294,7 @@ abstract class Accessory implements ActiveRecordInterface
$v->addAccessoryRelatedByProductId($this);
}
return $this;
}
@@ -1331,6 +1345,7 @@ abstract class Accessory implements ActiveRecordInterface
$v->addAccessoryRelatedByAccessory($this);
}
return $this;
}

View File

@@ -223,6 +223,7 @@ abstract class AccessoryQuery extends ModelCriteria
*/
public function filterByPrimaryKey($key)
{
return $this->addUsingAlias(AccessoryTableMap::ID, $key, Criteria::EQUAL);
}
@@ -235,6 +236,7 @@ abstract class AccessoryQuery extends ModelCriteria
*/
public function filterByPrimaryKeys($keys)
{
return $this->addUsingAlias(AccessoryTableMap::ID, $keys, Criteria::IN);
}
@@ -719,6 +721,7 @@ abstract class AccessoryQuery extends ModelCriteria
// for more than one table or we could emulating ON DELETE CASCADE, etc.
$con->beginTransaction();
AccessoryTableMap::removeInstanceFromPool($criteria);
$affectedRows += ModelCriteria::delete($con);

View File

@@ -36,6 +36,7 @@ abstract class Address implements ActiveRecordInterface
*/
const TABLE_MAP = '\\Thelia\\Model\\Map\\AddressTableMap';
/**
* attribute to determine if this object has previously been saved.
* @var boolean
@@ -496,6 +497,7 @@ abstract class Address implements ActiveRecordInterface
*/
public function getId()
{
return $this->id;
}
@@ -506,6 +508,7 @@ abstract class Address implements ActiveRecordInterface
*/
public function getLabel()
{
return $this->label;
}
@@ -516,6 +519,7 @@ abstract class Address implements ActiveRecordInterface
*/
public function getCustomerId()
{
return $this->customer_id;
}
@@ -526,6 +530,7 @@ abstract class Address implements ActiveRecordInterface
*/
public function getTitleId()
{
return $this->title_id;
}
@@ -536,6 +541,7 @@ abstract class Address implements ActiveRecordInterface
*/
public function getCompany()
{
return $this->company;
}
@@ -546,6 +552,7 @@ abstract class Address implements ActiveRecordInterface
*/
public function getFirstname()
{
return $this->firstname;
}
@@ -556,6 +563,7 @@ abstract class Address implements ActiveRecordInterface
*/
public function getLastname()
{
return $this->lastname;
}
@@ -566,6 +574,7 @@ abstract class Address implements ActiveRecordInterface
*/
public function getAddress1()
{
return $this->address1;
}
@@ -576,6 +585,7 @@ abstract class Address implements ActiveRecordInterface
*/
public function getAddress2()
{
return $this->address2;
}
@@ -586,6 +596,7 @@ abstract class Address implements ActiveRecordInterface
*/
public function getAddress3()
{
return $this->address3;
}
@@ -596,6 +607,7 @@ abstract class Address implements ActiveRecordInterface
*/
public function getZipcode()
{
return $this->zipcode;
}
@@ -606,6 +618,7 @@ abstract class Address implements ActiveRecordInterface
*/
public function getCity()
{
return $this->city;
}
@@ -616,6 +629,7 @@ abstract class Address implements ActiveRecordInterface
*/
public function getCountryId()
{
return $this->country_id;
}
@@ -626,6 +640,7 @@ abstract class Address implements ActiveRecordInterface
*/
public function getPhone()
{
return $this->phone;
}
@@ -636,6 +651,7 @@ abstract class Address implements ActiveRecordInterface
*/
public function getCellphone()
{
return $this->cellphone;
}
@@ -646,6 +662,7 @@ abstract class Address implements ActiveRecordInterface
*/
public function getIsDefault()
{
return $this->is_default;
}
@@ -706,6 +723,7 @@ abstract class Address implements ActiveRecordInterface
$this->modifiedColumns[AddressTableMap::ID] = true;
}
return $this;
} // setId()
@@ -726,6 +744,7 @@ abstract class Address implements ActiveRecordInterface
$this->modifiedColumns[AddressTableMap::LABEL] = true;
}
return $this;
} // setLabel()
@@ -750,6 +769,7 @@ abstract class Address implements ActiveRecordInterface
$this->aCustomer = null;
}
return $this;
} // setCustomerId()
@@ -774,6 +794,7 @@ abstract class Address implements ActiveRecordInterface
$this->aCustomerTitle = null;
}
return $this;
} // setTitleId()
@@ -794,6 +815,7 @@ abstract class Address implements ActiveRecordInterface
$this->modifiedColumns[AddressTableMap::COMPANY] = true;
}
return $this;
} // setCompany()
@@ -814,6 +836,7 @@ abstract class Address implements ActiveRecordInterface
$this->modifiedColumns[AddressTableMap::FIRSTNAME] = true;
}
return $this;
} // setFirstname()
@@ -834,6 +857,7 @@ abstract class Address implements ActiveRecordInterface
$this->modifiedColumns[AddressTableMap::LASTNAME] = true;
}
return $this;
} // setLastname()
@@ -854,6 +878,7 @@ abstract class Address implements ActiveRecordInterface
$this->modifiedColumns[AddressTableMap::ADDRESS1] = true;
}
return $this;
} // setAddress1()
@@ -874,6 +899,7 @@ abstract class Address implements ActiveRecordInterface
$this->modifiedColumns[AddressTableMap::ADDRESS2] = true;
}
return $this;
} // setAddress2()
@@ -894,6 +920,7 @@ abstract class Address implements ActiveRecordInterface
$this->modifiedColumns[AddressTableMap::ADDRESS3] = true;
}
return $this;
} // setAddress3()
@@ -914,6 +941,7 @@ abstract class Address implements ActiveRecordInterface
$this->modifiedColumns[AddressTableMap::ZIPCODE] = true;
}
return $this;
} // setZipcode()
@@ -934,6 +962,7 @@ abstract class Address implements ActiveRecordInterface
$this->modifiedColumns[AddressTableMap::CITY] = true;
}
return $this;
} // setCity()
@@ -958,6 +987,7 @@ abstract class Address implements ActiveRecordInterface
$this->aCountry = null;
}
return $this;
} // setCountryId()
@@ -978,6 +1008,7 @@ abstract class Address implements ActiveRecordInterface
$this->modifiedColumns[AddressTableMap::PHONE] = true;
}
return $this;
} // setPhone()
@@ -998,6 +1029,7 @@ abstract class Address implements ActiveRecordInterface
$this->modifiedColumns[AddressTableMap::CELLPHONE] = true;
}
return $this;
} // setCellphone()
@@ -1018,6 +1050,7 @@ abstract class Address implements ActiveRecordInterface
$this->modifiedColumns[AddressTableMap::IS_DEFAULT] = true;
}
return $this;
} // setIsDefault()
@@ -1038,6 +1071,7 @@ abstract class Address implements ActiveRecordInterface
}
} // if either are not null
return $this;
} // setCreatedAt()
@@ -1058,6 +1092,7 @@ abstract class Address implements ActiveRecordInterface
}
} // if either are not null
return $this;
} // setUpdatedAt()
@@ -1101,6 +1136,7 @@ abstract class Address implements ActiveRecordInterface
{
try {
$col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : AddressTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)];
$this->id = (null !== $col) ? (int) $col : null;
@@ -1929,6 +1965,7 @@ abstract class Address implements ActiveRecordInterface
if ($this->isColumnModified(AddressTableMap::IS_DEFAULT)) $criteria->add(AddressTableMap::IS_DEFAULT, $this->is_default);
if ($this->isColumnModified(AddressTableMap::CREATED_AT)) $criteria->add(AddressTableMap::CREATED_AT, $this->created_at);
if ($this->isColumnModified(AddressTableMap::UPDATED_AT)) $criteria->add(AddressTableMap::UPDATED_AT, $this->updated_at);
return $criteria;
}
@@ -1974,6 +2011,7 @@ abstract class Address implements ActiveRecordInterface
*/
public function isPrimaryKeyNull()
{
return null === $this->getId();
}
@@ -2078,9 +2116,11 @@ abstract class Address implements ActiveRecordInterface
$v->addAddress($this);
}
return $this;
}
/**
* Get the associated ChildCustomer object
*
@@ -2127,9 +2167,11 @@ abstract class Address implements ActiveRecordInterface
$v->addAddress($this);
}
return $this;
}
/**
* Get the associated ChildCustomerTitle object
*
@@ -2176,9 +2218,11 @@ abstract class Address implements ActiveRecordInterface
$v->addAddress($this);
}
return $this;
}
/**
* Get the associated ChildCountry object
*
@@ -2202,6 +2246,7 @@ abstract class Address implements ActiveRecordInterface
return $this->aCountry;
}
/**
* Initializes a collection based on the name of a relation.
* Avoids crafting an 'init[$relationName]s' method name

View File

@@ -283,6 +283,7 @@ abstract class AddressQuery extends ModelCriteria
*/
public function filterByPrimaryKey($key)
{
return $this->addUsingAlias(AddressTableMap::ID, $key, Criteria::EQUAL);
}
@@ -295,6 +296,7 @@ abstract class AddressQuery extends ModelCriteria
*/
public function filterByPrimaryKeys($keys)
{
return $this->addUsingAlias(AddressTableMap::ID, $keys, Criteria::IN);
}
@@ -1362,6 +1364,7 @@ abstract class AddressQuery extends ModelCriteria
// for more than one table or we could emulating ON DELETE CASCADE, etc.
$con->beginTransaction();
AddressTableMap::removeInstanceFromPool($criteria);
$affectedRows += ModelCriteria::delete($con);

View File

@@ -29,6 +29,7 @@ abstract class Admin implements ActiveRecordInterface
*/
const TABLE_MAP = '\\Thelia\\Model\\Map\\AdminTableMap';
/**
* attribute to determine if this object has previously been saved.
* @var boolean
@@ -411,6 +412,7 @@ abstract class Admin implements ActiveRecordInterface
*/
public function getId()
{
return $this->id;
}
@@ -421,6 +423,7 @@ abstract class Admin implements ActiveRecordInterface
*/
public function getProfileId()
{
return $this->profile_id;
}
@@ -431,6 +434,7 @@ abstract class Admin implements ActiveRecordInterface
*/
public function getFirstname()
{
return $this->firstname;
}
@@ -441,6 +445,7 @@ abstract class Admin implements ActiveRecordInterface
*/
public function getLastname()
{
return $this->lastname;
}
@@ -451,6 +456,7 @@ abstract class Admin implements ActiveRecordInterface
*/
public function getLogin()
{
return $this->login;
}
@@ -461,6 +467,7 @@ abstract class Admin implements ActiveRecordInterface
*/
public function getPassword()
{
return $this->password;
}
@@ -471,6 +478,7 @@ abstract class Admin implements ActiveRecordInterface
*/
public function getLocale()
{
return $this->locale;
}
@@ -481,6 +489,7 @@ abstract class Admin implements ActiveRecordInterface
*/
public function getAlgo()
{
return $this->algo;
}
@@ -491,6 +500,7 @@ abstract class Admin implements ActiveRecordInterface
*/
public function getSalt()
{
return $this->salt;
}
@@ -501,6 +511,7 @@ abstract class Admin implements ActiveRecordInterface
*/
public function getRememberMeToken()
{
return $this->remember_me_token;
}
@@ -511,6 +522,7 @@ abstract class Admin implements ActiveRecordInterface
*/
public function getRememberMeSerial()
{
return $this->remember_me_serial;
}
@@ -571,6 +583,7 @@ abstract class Admin implements ActiveRecordInterface
$this->modifiedColumns[AdminTableMap::ID] = true;
}
return $this;
} // setId()
@@ -595,6 +608,7 @@ abstract class Admin implements ActiveRecordInterface
$this->aProfile = null;
}
return $this;
} // setProfileId()
@@ -615,6 +629,7 @@ abstract class Admin implements ActiveRecordInterface
$this->modifiedColumns[AdminTableMap::FIRSTNAME] = true;
}
return $this;
} // setFirstname()
@@ -635,6 +650,7 @@ abstract class Admin implements ActiveRecordInterface
$this->modifiedColumns[AdminTableMap::LASTNAME] = true;
}
return $this;
} // setLastname()
@@ -655,6 +671,7 @@ abstract class Admin implements ActiveRecordInterface
$this->modifiedColumns[AdminTableMap::LOGIN] = true;
}
return $this;
} // setLogin()
@@ -675,6 +692,7 @@ abstract class Admin implements ActiveRecordInterface
$this->modifiedColumns[AdminTableMap::PASSWORD] = true;
}
return $this;
} // setPassword()
@@ -695,6 +713,7 @@ abstract class Admin implements ActiveRecordInterface
$this->modifiedColumns[AdminTableMap::LOCALE] = true;
}
return $this;
} // setLocale()
@@ -715,6 +734,7 @@ abstract class Admin implements ActiveRecordInterface
$this->modifiedColumns[AdminTableMap::ALGO] = true;
}
return $this;
} // setAlgo()
@@ -735,6 +755,7 @@ abstract class Admin implements ActiveRecordInterface
$this->modifiedColumns[AdminTableMap::SALT] = true;
}
return $this;
} // setSalt()
@@ -755,6 +776,7 @@ abstract class Admin implements ActiveRecordInterface
$this->modifiedColumns[AdminTableMap::REMEMBER_ME_TOKEN] = true;
}
return $this;
} // setRememberMeToken()
@@ -775,6 +797,7 @@ abstract class Admin implements ActiveRecordInterface
$this->modifiedColumns[AdminTableMap::REMEMBER_ME_SERIAL] = true;
}
return $this;
} // setRememberMeSerial()
@@ -795,6 +818,7 @@ abstract class Admin implements ActiveRecordInterface
}
} // if either are not null
return $this;
} // setCreatedAt()
@@ -815,6 +839,7 @@ abstract class Admin implements ActiveRecordInterface
}
} // if either are not null
return $this;
} // setUpdatedAt()
@@ -1519,6 +1544,7 @@ abstract class Admin implements ActiveRecordInterface
if ($this->isColumnModified(AdminTableMap::REMEMBER_ME_SERIAL)) $criteria->add(AdminTableMap::REMEMBER_ME_SERIAL, $this->remember_me_serial);
if ($this->isColumnModified(AdminTableMap::CREATED_AT)) $criteria->add(AdminTableMap::CREATED_AT, $this->created_at);
if ($this->isColumnModified(AdminTableMap::UPDATED_AT)) $criteria->add(AdminTableMap::UPDATED_AT, $this->updated_at);
return $criteria;
}
@@ -1564,6 +1590,7 @@ abstract class Admin implements ActiveRecordInterface
*/
public function isPrimaryKeyNull()
{
return null === $this->getId();
}
@@ -1643,6 +1670,7 @@ abstract class Admin implements ActiveRecordInterface
$v->addAdmin($this);
}
return $this;
}

View File

@@ -9,6 +9,7 @@ use Propel\Runtime\Propel;
use Propel\Runtime\ActiveQuery\Criteria;
use Propel\Runtime\ActiveQuery\ModelCriteria;
use Propel\Runtime\ActiveRecord\ActiveRecordInterface;
use Propel\Runtime\Collection\Collection;
use Propel\Runtime\Connection\ConnectionInterface;
use Propel\Runtime\Exception\BadMethodCallException;
use Propel\Runtime\Exception\PropelException;
@@ -26,6 +27,7 @@ abstract class AdminLog implements ActiveRecordInterface
*/
const TABLE_MAP = '\\Thelia\\Model\\Map\\AdminLogTableMap';
/**
* attribute to determine if this object has previously been saved.
* @var boolean
@@ -385,6 +387,7 @@ abstract class AdminLog implements ActiveRecordInterface
*/
public function getId()
{
return $this->id;
}
@@ -395,6 +398,7 @@ abstract class AdminLog implements ActiveRecordInterface
*/
public function getAdminLogin()
{
return $this->admin_login;
}
@@ -405,6 +409,7 @@ abstract class AdminLog implements ActiveRecordInterface
*/
public function getAdminFirstname()
{
return $this->admin_firstname;
}
@@ -415,6 +420,7 @@ abstract class AdminLog implements ActiveRecordInterface
*/
public function getAdminLastname()
{
return $this->admin_lastname;
}
@@ -425,6 +431,7 @@ abstract class AdminLog implements ActiveRecordInterface
*/
public function getResource()
{
return $this->resource;
}
@@ -435,6 +442,7 @@ abstract class AdminLog implements ActiveRecordInterface
*/
public function getAction()
{
return $this->action;
}
@@ -445,6 +453,7 @@ abstract class AdminLog implements ActiveRecordInterface
*/
public function getMessage()
{
return $this->message;
}
@@ -455,6 +464,7 @@ abstract class AdminLog implements ActiveRecordInterface
*/
public function getRequest()
{
return $this->request;
}
@@ -515,6 +525,7 @@ abstract class AdminLog implements ActiveRecordInterface
$this->modifiedColumns[AdminLogTableMap::ID] = true;
}
return $this;
} // setId()
@@ -535,6 +546,7 @@ abstract class AdminLog implements ActiveRecordInterface
$this->modifiedColumns[AdminLogTableMap::ADMIN_LOGIN] = true;
}
return $this;
} // setAdminLogin()
@@ -555,6 +567,7 @@ abstract class AdminLog implements ActiveRecordInterface
$this->modifiedColumns[AdminLogTableMap::ADMIN_FIRSTNAME] = true;
}
return $this;
} // setAdminFirstname()
@@ -575,6 +588,7 @@ abstract class AdminLog implements ActiveRecordInterface
$this->modifiedColumns[AdminLogTableMap::ADMIN_LASTNAME] = true;
}
return $this;
} // setAdminLastname()
@@ -595,6 +609,7 @@ abstract class AdminLog implements ActiveRecordInterface
$this->modifiedColumns[AdminLogTableMap::RESOURCE] = true;
}
return $this;
} // setResource()
@@ -615,6 +630,7 @@ abstract class AdminLog implements ActiveRecordInterface
$this->modifiedColumns[AdminLogTableMap::ACTION] = true;
}
return $this;
} // setAction()
@@ -635,6 +651,7 @@ abstract class AdminLog implements ActiveRecordInterface
$this->modifiedColumns[AdminLogTableMap::MESSAGE] = true;
}
return $this;
} // setMessage()
@@ -655,6 +672,7 @@ abstract class AdminLog implements ActiveRecordInterface
$this->modifiedColumns[AdminLogTableMap::REQUEST] = true;
}
return $this;
} // setRequest()
@@ -675,6 +693,7 @@ abstract class AdminLog implements ActiveRecordInterface
}
} // if either are not null
return $this;
} // setCreatedAt()
@@ -695,6 +714,7 @@ abstract class AdminLog implements ActiveRecordInterface
}
} // if either are not null
return $this;
} // setUpdatedAt()
@@ -1205,6 +1225,7 @@ abstract class AdminLog implements ActiveRecordInterface
$result[$key] = $virtualColumn;
}
return $result;
}
@@ -1322,6 +1343,7 @@ abstract class AdminLog implements ActiveRecordInterface
if ($this->isColumnModified(AdminLogTableMap::REQUEST)) $criteria->add(AdminLogTableMap::REQUEST, $this->request);
if ($this->isColumnModified(AdminLogTableMap::CREATED_AT)) $criteria->add(AdminLogTableMap::CREATED_AT, $this->created_at);
if ($this->isColumnModified(AdminLogTableMap::UPDATED_AT)) $criteria->add(AdminLogTableMap::UPDATED_AT, $this->updated_at);
return $criteria;
}
@@ -1367,6 +1389,7 @@ abstract class AdminLog implements ActiveRecordInterface
*/
public function isPrimaryKeyNull()
{
return null === $this->getId();
}

View File

@@ -228,6 +228,7 @@ abstract class AdminLogQuery extends ModelCriteria
*/
public function filterByPrimaryKey($key)
{
return $this->addUsingAlias(AdminLogTableMap::ID, $key, Criteria::EQUAL);
}
@@ -240,6 +241,7 @@ abstract class AdminLogQuery extends ModelCriteria
*/
public function filterByPrimaryKeys($keys)
{
return $this->addUsingAlias(AdminLogTableMap::ID, $keys, Criteria::IN);
}
@@ -650,6 +652,7 @@ abstract class AdminLogQuery extends ModelCriteria
// for more than one table or we could emulating ON DELETE CASCADE, etc.
$con->beginTransaction();
AdminLogTableMap::removeInstanceFromPool($criteria);
$affectedRows += ModelCriteria::delete($con);

View File

@@ -247,6 +247,7 @@ abstract class AdminQuery extends ModelCriteria
*/
public function filterByPrimaryKey($key)
{
return $this->addUsingAlias(AdminTableMap::ID, $key, Criteria::EQUAL);
}
@@ -259,6 +260,7 @@ abstract class AdminQuery extends ModelCriteria
*/
public function filterByPrimaryKeys($keys)
{
return $this->addUsingAlias(AdminTableMap::ID, $keys, Criteria::IN);
}
@@ -845,6 +847,7 @@ abstract class AdminQuery extends ModelCriteria
// for more than one table or we could emulating ON DELETE CASCADE, etc.
$con->beginTransaction();
AdminTableMap::removeInstanceFromPool($criteria);
$affectedRows += ModelCriteria::delete($con);

View File

@@ -32,6 +32,7 @@ abstract class Area implements ActiveRecordInterface
*/
const TABLE_MAP = '\\Thelia\\Model\\Map\\AreaTableMap';
/**
* attribute to determine if this object has previously been saved.
* @var boolean
@@ -385,6 +386,7 @@ abstract class Area implements ActiveRecordInterface
*/
public function getId()
{
return $this->id;
}
@@ -395,6 +397,7 @@ abstract class Area implements ActiveRecordInterface
*/
public function getName()
{
return $this->name;
}
@@ -405,6 +408,7 @@ abstract class Area implements ActiveRecordInterface
*/
public function getPostage()
{
return $this->postage;
}
@@ -465,6 +469,7 @@ abstract class Area implements ActiveRecordInterface
$this->modifiedColumns[AreaTableMap::ID] = true;
}
return $this;
} // setId()
@@ -485,6 +490,7 @@ abstract class Area implements ActiveRecordInterface
$this->modifiedColumns[AreaTableMap::NAME] = true;
}
return $this;
} // setName()
@@ -505,6 +511,7 @@ abstract class Area implements ActiveRecordInterface
$this->modifiedColumns[AreaTableMap::POSTAGE] = true;
}
return $this;
} // setPostage()
@@ -525,6 +532,7 @@ abstract class Area implements ActiveRecordInterface
}
} // if either are not null
return $this;
} // setCreatedAt()
@@ -545,6 +553,7 @@ abstract class Area implements ActiveRecordInterface
}
} // if either are not null
return $this;
} // setUpdatedAt()
@@ -1131,6 +1140,7 @@ abstract class Area implements ActiveRecordInterface
if ($this->isColumnModified(AreaTableMap::POSTAGE)) $criteria->add(AreaTableMap::POSTAGE, $this->postage);
if ($this->isColumnModified(AreaTableMap::CREATED_AT)) $criteria->add(AreaTableMap::CREATED_AT, $this->created_at);
if ($this->isColumnModified(AreaTableMap::UPDATED_AT)) $criteria->add(AreaTableMap::UPDATED_AT, $this->updated_at);
return $criteria;
}
@@ -1176,6 +1186,7 @@ abstract class Area implements ActiveRecordInterface
*/
public function isPrimaryKeyNull()
{
return null === $this->getId();
}
@@ -1380,6 +1391,7 @@ abstract class Area implements ActiveRecordInterface
{
$countriesToDelete = $this->getCountries(new Criteria(), $con)->diff($countries);
$this->countriesScheduledForDeletion = $countriesToDelete;
foreach ($countriesToDelete as $countryRemoved) {
@@ -1597,6 +1609,7 @@ abstract class Area implements ActiveRecordInterface
{
$areaDeliveryModulesToDelete = $this->getAreaDeliveryModules(new Criteria(), $con)->diff($areaDeliveryModules);
$this->areaDeliveryModulesScheduledForDeletion = $areaDeliveryModulesToDelete;
foreach ($areaDeliveryModulesToDelete as $areaDeliveryModuleRemoved) {
@@ -1697,6 +1710,7 @@ abstract class Area implements ActiveRecordInterface
return $this;
}
/**
* If this collection has already been initialized with
* an identical criteria, it returns the collection.
@@ -1866,6 +1880,7 @@ abstract class Area implements ActiveRecordInterface
}
/**
* Derived method to catches calls to undefined methods.
*

View File

@@ -31,6 +31,7 @@ abstract class AreaDeliveryModule implements ActiveRecordInterface
*/
const TABLE_MAP = '\\Thelia\\Model\\Map\\AreaDeliveryModuleTableMap';
/**
* attribute to determine if this object has previously been saved.
* @var boolean
@@ -370,6 +371,7 @@ abstract class AreaDeliveryModule implements ActiveRecordInterface
*/
public function getId()
{
return $this->id;
}
@@ -380,6 +382,7 @@ abstract class AreaDeliveryModule implements ActiveRecordInterface
*/
public function getAreaId()
{
return $this->area_id;
}
@@ -390,6 +393,7 @@ abstract class AreaDeliveryModule implements ActiveRecordInterface
*/
public function getDeliveryModuleId()
{
return $this->delivery_module_id;
}
@@ -450,6 +454,7 @@ abstract class AreaDeliveryModule implements ActiveRecordInterface
$this->modifiedColumns[AreaDeliveryModuleTableMap::ID] = true;
}
return $this;
} // setId()
@@ -474,6 +479,7 @@ abstract class AreaDeliveryModule implements ActiveRecordInterface
$this->aArea = null;
}
return $this;
} // setAreaId()
@@ -498,6 +504,7 @@ abstract class AreaDeliveryModule implements ActiveRecordInterface
$this->aModule = null;
}
return $this;
} // setDeliveryModuleId()
@@ -518,6 +525,7 @@ abstract class AreaDeliveryModule implements ActiveRecordInterface
}
} // if either are not null
return $this;
} // setCreatedAt()
@@ -538,6 +546,7 @@ abstract class AreaDeliveryModule implements ActiveRecordInterface
}
} // if either are not null
return $this;
} // setUpdatedAt()
@@ -1112,6 +1121,7 @@ abstract class AreaDeliveryModule implements ActiveRecordInterface
if ($this->isColumnModified(AreaDeliveryModuleTableMap::DELIVERY_MODULE_ID)) $criteria->add(AreaDeliveryModuleTableMap::DELIVERY_MODULE_ID, $this->delivery_module_id);
if ($this->isColumnModified(AreaDeliveryModuleTableMap::CREATED_AT)) $criteria->add(AreaDeliveryModuleTableMap::CREATED_AT, $this->created_at);
if ($this->isColumnModified(AreaDeliveryModuleTableMap::UPDATED_AT)) $criteria->add(AreaDeliveryModuleTableMap::UPDATED_AT, $this->updated_at);
return $criteria;
}
@@ -1157,6 +1167,7 @@ abstract class AreaDeliveryModule implements ActiveRecordInterface
*/
public function isPrimaryKeyNull()
{
return null === $this->getId();
}
@@ -1228,6 +1239,7 @@ abstract class AreaDeliveryModule implements ActiveRecordInterface
$v->addAreaDeliveryModule($this);
}
return $this;
}
@@ -1278,6 +1290,7 @@ abstract class AreaDeliveryModule implements ActiveRecordInterface
$v->addAreaDeliveryModule($this);
}
return $this;
}

View File

@@ -219,6 +219,7 @@ abstract class AreaDeliveryModuleQuery extends ModelCriteria
*/
public function filterByPrimaryKey($key)
{
return $this->addUsingAlias(AreaDeliveryModuleTableMap::ID, $key, Criteria::EQUAL);
}
@@ -231,6 +232,7 @@ abstract class AreaDeliveryModuleQuery extends ModelCriteria
*/
public function filterByPrimaryKeys($keys)
{
return $this->addUsingAlias(AreaDeliveryModuleTableMap::ID, $keys, Criteria::IN);
}
@@ -674,6 +676,7 @@ abstract class AreaDeliveryModuleQuery extends ModelCriteria
// for more than one table or we could emulating ON DELETE CASCADE, etc.
$con->beginTransaction();
AreaDeliveryModuleTableMap::removeInstanceFromPool($criteria);
$affectedRows += ModelCriteria::delete($con);

View File

@@ -219,6 +219,7 @@ abstract class AreaQuery extends ModelCriteria
*/
public function filterByPrimaryKey($key)
{
return $this->addUsingAlias(AreaTableMap::ID, $key, Criteria::EQUAL);
}
@@ -231,6 +232,7 @@ abstract class AreaQuery extends ModelCriteria
*/
public function filterByPrimaryKeys($keys)
{
return $this->addUsingAlias(AreaTableMap::ID, $keys, Criteria::IN);
}
@@ -654,6 +656,7 @@ abstract class AreaQuery extends ModelCriteria
// for more than one table or we could emulating ON DELETE CASCADE, etc.
$con->beginTransaction();
AreaTableMap::removeInstanceFromPool($criteria);
$affectedRows += ModelCriteria::delete($con);

View File

@@ -38,6 +38,7 @@ abstract class Attribute implements ActiveRecordInterface
*/
const TABLE_MAP = '\\Thelia\\Model\\Map\\AttributeTableMap';
/**
* attribute to determine if this object has previously been saved.
* @var boolean
@@ -434,6 +435,7 @@ abstract class Attribute implements ActiveRecordInterface
*/
public function getId()
{
return $this->id;
}
@@ -444,6 +446,7 @@ abstract class Attribute implements ActiveRecordInterface
*/
public function getPosition()
{
return $this->position;
}
@@ -504,6 +507,7 @@ abstract class Attribute implements ActiveRecordInterface
$this->modifiedColumns[AttributeTableMap::ID] = true;
}
return $this;
} // setId()
@@ -524,6 +528,7 @@ abstract class Attribute implements ActiveRecordInterface
$this->modifiedColumns[AttributeTableMap::POSITION] = true;
}
return $this;
} // setPosition()
@@ -544,6 +549,7 @@ abstract class Attribute implements ActiveRecordInterface
}
} // if either are not null
return $this;
} // setCreatedAt()
@@ -564,6 +570,7 @@ abstract class Attribute implements ActiveRecordInterface
}
} // if either are not null
return $this;
} // setUpdatedAt()
@@ -1203,6 +1210,7 @@ abstract class Attribute implements ActiveRecordInterface
if ($this->isColumnModified(AttributeTableMap::POSITION)) $criteria->add(AttributeTableMap::POSITION, $this->position);
if ($this->isColumnModified(AttributeTableMap::CREATED_AT)) $criteria->add(AttributeTableMap::CREATED_AT, $this->created_at);
if ($this->isColumnModified(AttributeTableMap::UPDATED_AT)) $criteria->add(AttributeTableMap::UPDATED_AT, $this->updated_at);
return $criteria;
}
@@ -1248,6 +1256,7 @@ abstract class Attribute implements ActiveRecordInterface
*/
public function isPrimaryKeyNull()
{
return null === $this->getId();
}
@@ -1469,6 +1478,7 @@ abstract class Attribute implements ActiveRecordInterface
{
$attributeAvsToDelete = $this->getAttributeAvs(new Criteria(), $con)->diff($attributeAvs);
$this->attributeAvsScheduledForDeletion = $attributeAvsToDelete;
foreach ($attributeAvsToDelete as $attributeAvRemoved) {
@@ -1686,6 +1696,7 @@ abstract class Attribute implements ActiveRecordInterface
{
$attributeCombinationsToDelete = $this->getAttributeCombinations(new Criteria(), $con)->diff($attributeCombinations);
//since at least one column in the foreign key is at the same time a PK
//we can not just set a PK to NULL in the lines below. We have to store
//a backup of all values, so we are able to manipulate these items based on the onDelete value later.
@@ -1789,6 +1800,7 @@ abstract class Attribute implements ActiveRecordInterface
return $this;
}
/**
* If this collection has already been initialized with
* an identical criteria, it returns the collection.
@@ -1813,6 +1825,7 @@ abstract class Attribute implements ActiveRecordInterface
return $this->getAttributeCombinations($query, $con);
}
/**
* If this collection has already been initialized with
* an identical criteria, it returns the collection.
@@ -1954,6 +1967,7 @@ abstract class Attribute implements ActiveRecordInterface
{
$attributeTemplatesToDelete = $this->getAttributeTemplates(new Criteria(), $con)->diff($attributeTemplates);
$this->attributeTemplatesScheduledForDeletion = $attributeTemplatesToDelete;
foreach ($attributeTemplatesToDelete as $attributeTemplateRemoved) {
@@ -2054,6 +2068,7 @@ abstract class Attribute implements ActiveRecordInterface
return $this;
}
/**
* If this collection has already been initialized with
* an identical criteria, it returns the collection.
@@ -2195,6 +2210,7 @@ abstract class Attribute implements ActiveRecordInterface
{
$attributeI18nsToDelete = $this->getAttributeI18ns(new Criteria(), $con)->diff($attributeI18ns);
//since at least one column in the foreign key is at the same time a PK
//we can not just set a PK to NULL in the lines below. We have to store
//a backup of all values, so we are able to manipulate these items based on the onDelete value later.
@@ -2674,6 +2690,7 @@ abstract class Attribute implements ActiveRecordInterface
return $this->getTranslation($this->getLocale(), $con);
}
/**
* Get the [title] column value.
*
@@ -2684,6 +2701,7 @@ abstract class Attribute implements ActiveRecordInterface
return $this->getCurrentTranslation()->getTitle();
}
/**
* Set the value of [title] column.
*
@@ -2696,6 +2714,7 @@ abstract class Attribute implements ActiveRecordInterface
return $this;
}
/**
* Get the [description] column value.
*
@@ -2706,6 +2725,7 @@ abstract class Attribute implements ActiveRecordInterface
return $this->getCurrentTranslation()->getDescription();
}
/**
* Set the value of [description] column.
*
@@ -2718,6 +2738,7 @@ abstract class Attribute implements ActiveRecordInterface
return $this;
}
/**
* Get the [chapo] column value.
*
@@ -2728,6 +2749,7 @@ abstract class Attribute implements ActiveRecordInterface
return $this->getCurrentTranslation()->getChapo();
}
/**
* Set the value of [chapo] column.
*
@@ -2740,6 +2762,7 @@ abstract class Attribute implements ActiveRecordInterface
return $this;
}
/**
* Get the [postscriptum] column value.
*
@@ -2750,6 +2773,7 @@ abstract class Attribute implements ActiveRecordInterface
return $this->getCurrentTranslation()->getPostscriptum();
}
/**
* Set the value of [postscriptum] column.
*
@@ -2838,6 +2862,7 @@ abstract class Attribute implements ActiveRecordInterface
}
/**
* Derived method to catches calls to undefined methods.
*

View File

@@ -34,6 +34,7 @@ abstract class AttributeAv implements ActiveRecordInterface
*/
const TABLE_MAP = '\\Thelia\\Model\\Map\\AttributeAvTableMap';
/**
* attribute to determine if this object has previously been saved.
* @var boolean
@@ -406,6 +407,7 @@ abstract class AttributeAv implements ActiveRecordInterface
*/
public function getId()
{
return $this->id;
}
@@ -416,6 +418,7 @@ abstract class AttributeAv implements ActiveRecordInterface
*/
public function getAttributeId()
{
return $this->attribute_id;
}
@@ -426,6 +429,7 @@ abstract class AttributeAv implements ActiveRecordInterface
*/
public function getPosition()
{
return $this->position;
}
@@ -486,6 +490,7 @@ abstract class AttributeAv implements ActiveRecordInterface
$this->modifiedColumns[AttributeAvTableMap::ID] = true;
}
return $this;
} // setId()
@@ -510,6 +515,7 @@ abstract class AttributeAv implements ActiveRecordInterface
$this->aAttribute = null;
}
return $this;
} // setAttributeId()
@@ -530,6 +536,7 @@ abstract class AttributeAv implements ActiveRecordInterface
$this->modifiedColumns[AttributeAvTableMap::POSITION] = true;
}
return $this;
} // setPosition()
@@ -550,6 +557,7 @@ abstract class AttributeAv implements ActiveRecordInterface
}
} // if either are not null
return $this;
} // setCreatedAt()
@@ -570,6 +578,7 @@ abstract class AttributeAv implements ActiveRecordInterface
}
} // if either are not null
return $this;
} // setUpdatedAt()
@@ -1174,6 +1183,7 @@ abstract class AttributeAv implements ActiveRecordInterface
if ($this->isColumnModified(AttributeAvTableMap::POSITION)) $criteria->add(AttributeAvTableMap::POSITION, $this->position);
if ($this->isColumnModified(AttributeAvTableMap::CREATED_AT)) $criteria->add(AttributeAvTableMap::CREATED_AT, $this->created_at);
if ($this->isColumnModified(AttributeAvTableMap::UPDATED_AT)) $criteria->add(AttributeAvTableMap::UPDATED_AT, $this->updated_at);
return $criteria;
}
@@ -1219,6 +1229,7 @@ abstract class AttributeAv implements ActiveRecordInterface
*/
public function isPrimaryKeyNull()
{
return null === $this->getId();
}
@@ -1310,6 +1321,7 @@ abstract class AttributeAv implements ActiveRecordInterface
$v->addAttributeAv($this);
}
return $this;
}
@@ -1473,6 +1485,7 @@ abstract class AttributeAv implements ActiveRecordInterface
{
$attributeCombinationsToDelete = $this->getAttributeCombinations(new Criteria(), $con)->diff($attributeCombinations);
//since at least one column in the foreign key is at the same time a PK
//we can not just set a PK to NULL in the lines below. We have to store
//a backup of all values, so we are able to manipulate these items based on the onDelete value later.
@@ -1576,6 +1589,7 @@ abstract class AttributeAv implements ActiveRecordInterface
return $this;
}
/**
* If this collection has already been initialized with
* an identical criteria, it returns the collection.
@@ -1600,6 +1614,7 @@ abstract class AttributeAv implements ActiveRecordInterface
return $this->getAttributeCombinations($query, $con);
}
/**
* If this collection has already been initialized with
* an identical criteria, it returns the collection.
@@ -1741,6 +1756,7 @@ abstract class AttributeAv implements ActiveRecordInterface
{
$attributeAvI18nsToDelete = $this->getAttributeAvI18ns(new Criteria(), $con)->diff($attributeAvI18ns);
//since at least one column in the foreign key is at the same time a PK
//we can not just set a PK to NULL in the lines below. We have to store
//a backup of all values, so we are able to manipulate these items based on the onDelete value later.
@@ -2021,6 +2037,7 @@ abstract class AttributeAv implements ActiveRecordInterface
return $this->getTranslation($this->getLocale(), $con);
}
/**
* Get the [title] column value.
*
@@ -2031,6 +2048,7 @@ abstract class AttributeAv implements ActiveRecordInterface
return $this->getCurrentTranslation()->getTitle();
}
/**
* Set the value of [title] column.
*
@@ -2043,6 +2061,7 @@ abstract class AttributeAv implements ActiveRecordInterface
return $this;
}
/**
* Get the [description] column value.
*
@@ -2053,6 +2072,7 @@ abstract class AttributeAv implements ActiveRecordInterface
return $this->getCurrentTranslation()->getDescription();
}
/**
* Set the value of [description] column.
*
@@ -2065,6 +2085,7 @@ abstract class AttributeAv implements ActiveRecordInterface
return $this;
}
/**
* Get the [chapo] column value.
*
@@ -2075,6 +2096,7 @@ abstract class AttributeAv implements ActiveRecordInterface
return $this->getCurrentTranslation()->getChapo();
}
/**
* Set the value of [chapo] column.
*
@@ -2087,6 +2109,7 @@ abstract class AttributeAv implements ActiveRecordInterface
return $this;
}
/**
* Get the [postscriptum] column value.
*
@@ -2097,6 +2120,7 @@ abstract class AttributeAv implements ActiveRecordInterface
return $this->getCurrentTranslation()->getPostscriptum();
}
/**
* Set the value of [postscriptum] column.
*
@@ -2185,6 +2209,7 @@ abstract class AttributeAv implements ActiveRecordInterface
}
/**
* Derived method to catches calls to undefined methods.
*

View File

@@ -26,6 +26,7 @@ abstract class AttributeAvI18n implements ActiveRecordInterface
*/
const TABLE_MAP = '\\Thelia\\Model\\Map\\AttributeAvI18nTableMap';
/**
* attribute to determine if this object has previously been saved.
* @var boolean
@@ -380,6 +381,7 @@ abstract class AttributeAvI18n implements ActiveRecordInterface
*/
public function getId()
{
return $this->id;
}
@@ -390,6 +392,7 @@ abstract class AttributeAvI18n implements ActiveRecordInterface
*/
public function getLocale()
{
return $this->locale;
}
@@ -400,6 +403,7 @@ abstract class AttributeAvI18n implements ActiveRecordInterface
*/
public function getTitle()
{
return $this->title;
}
@@ -410,6 +414,7 @@ abstract class AttributeAvI18n implements ActiveRecordInterface
*/
public function getDescription()
{
return $this->description;
}
@@ -420,6 +425,7 @@ abstract class AttributeAvI18n implements ActiveRecordInterface
*/
public function getChapo()
{
return $this->chapo;
}
@@ -430,6 +436,7 @@ abstract class AttributeAvI18n implements ActiveRecordInterface
*/
public function getPostscriptum()
{
return $this->postscriptum;
}
@@ -454,6 +461,7 @@ abstract class AttributeAvI18n implements ActiveRecordInterface
$this->aAttributeAv = null;
}
return $this;
} // setId()
@@ -474,6 +482,7 @@ abstract class AttributeAvI18n implements ActiveRecordInterface
$this->modifiedColumns[AttributeAvI18nTableMap::LOCALE] = true;
}
return $this;
} // setLocale()
@@ -494,6 +503,7 @@ abstract class AttributeAvI18n implements ActiveRecordInterface
$this->modifiedColumns[AttributeAvI18nTableMap::TITLE] = true;
}
return $this;
} // setTitle()
@@ -514,6 +524,7 @@ abstract class AttributeAvI18n implements ActiveRecordInterface
$this->modifiedColumns[AttributeAvI18nTableMap::DESCRIPTION] = true;
}
return $this;
} // setDescription()
@@ -534,6 +545,7 @@ abstract class AttributeAvI18n implements ActiveRecordInterface
$this->modifiedColumns[AttributeAvI18nTableMap::CHAPO] = true;
}
return $this;
} // setChapo()
@@ -554,6 +566,7 @@ abstract class AttributeAvI18n implements ActiveRecordInterface
$this->modifiedColumns[AttributeAvI18nTableMap::POSTSCRIPTUM] = true;
}
return $this;
} // setPostscriptum()
@@ -597,6 +610,7 @@ abstract class AttributeAvI18n implements ActiveRecordInterface
{
try {
$col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : AttributeAvI18nTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)];
$this->id = (null !== $col) ? (int) $col : null;
@@ -1107,6 +1121,7 @@ abstract class AttributeAvI18n implements ActiveRecordInterface
if ($this->isColumnModified(AttributeAvI18nTableMap::DESCRIPTION)) $criteria->add(AttributeAvI18nTableMap::DESCRIPTION, $this->description);
if ($this->isColumnModified(AttributeAvI18nTableMap::CHAPO)) $criteria->add(AttributeAvI18nTableMap::CHAPO, $this->chapo);
if ($this->isColumnModified(AttributeAvI18nTableMap::POSTSCRIPTUM)) $criteria->add(AttributeAvI18nTableMap::POSTSCRIPTUM, $this->postscriptum);
return $criteria;
}
@@ -1159,6 +1174,7 @@ abstract class AttributeAvI18n implements ActiveRecordInterface
*/
public function isPrimaryKeyNull()
{
return (null === $this->getId()) && (null === $this->getLocale());
}
@@ -1231,9 +1247,11 @@ abstract class AttributeAvI18n implements ActiveRecordInterface
$v->addAttributeAvI18n($this);
}
return $this;
}
/**
* Get the associated ChildAttributeAv object
*

View File

@@ -590,6 +590,7 @@ abstract class AttributeAvI18nQuery extends ModelCriteria
// for more than one table or we could emulating ON DELETE CASCADE, etc.
$con->beginTransaction();
AttributeAvI18nTableMap::removeInstanceFromPool($criteria);
$affectedRows += ModelCriteria::delete($con);

View File

@@ -224,6 +224,7 @@ abstract class AttributeAvQuery extends ModelCriteria
*/
public function filterByPrimaryKey($key)
{
return $this->addUsingAlias(AttributeAvTableMap::ID, $key, Criteria::EQUAL);
}
@@ -236,6 +237,7 @@ abstract class AttributeAvQuery extends ModelCriteria
*/
public function filterByPrimaryKeys($keys)
{
return $this->addUsingAlias(AttributeAvTableMap::ID, $keys, Criteria::IN);
}
@@ -748,6 +750,7 @@ abstract class AttributeAvQuery extends ModelCriteria
// for more than one table or we could emulating ON DELETE CASCADE, etc.
$con->beginTransaction();
AttributeAvTableMap::removeInstanceFromPool($criteria);
$affectedRows += ModelCriteria::delete($con);

View File

@@ -33,6 +33,7 @@ abstract class AttributeCombination implements ActiveRecordInterface
*/
const TABLE_MAP = '\\Thelia\\Model\\Map\\AttributeCombinationTableMap';
/**
* attribute to determine if this object has previously been saved.
* @var boolean
@@ -377,6 +378,7 @@ abstract class AttributeCombination implements ActiveRecordInterface
*/
public function getAttributeId()
{
return $this->attribute_id;
}
@@ -387,6 +389,7 @@ abstract class AttributeCombination implements ActiveRecordInterface
*/
public function getAttributeAvId()
{
return $this->attribute_av_id;
}
@@ -397,6 +400,7 @@ abstract class AttributeCombination implements ActiveRecordInterface
*/
public function getProductSaleElementsId()
{
return $this->product_sale_elements_id;
}
@@ -461,6 +465,7 @@ abstract class AttributeCombination implements ActiveRecordInterface
$this->aAttribute = null;
}
return $this;
} // setAttributeId()
@@ -485,6 +490,7 @@ abstract class AttributeCombination implements ActiveRecordInterface
$this->aAttributeAv = null;
}
return $this;
} // setAttributeAvId()
@@ -509,6 +515,7 @@ abstract class AttributeCombination implements ActiveRecordInterface
$this->aProductSaleElements = null;
}
return $this;
} // setProductSaleElementsId()
@@ -529,6 +536,7 @@ abstract class AttributeCombination implements ActiveRecordInterface
}
} // if either are not null
return $this;
} // setCreatedAt()
@@ -549,6 +557,7 @@ abstract class AttributeCombination implements ActiveRecordInterface
}
} // if either are not null
return $this;
} // setUpdatedAt()
@@ -869,6 +878,7 @@ abstract class AttributeCombination implements ActiveRecordInterface
$modifiedColumns = array();
$index = 0;
// check the columns in natural order for more readable SQL queries
if ($this->isColumnModified(AttributeCombinationTableMap::ATTRIBUTE_ID)) {
$modifiedColumns[':p' . $index++] = '`ATTRIBUTE_ID`';
@@ -1125,6 +1135,7 @@ abstract class AttributeCombination implements ActiveRecordInterface
if ($this->isColumnModified(AttributeCombinationTableMap::PRODUCT_SALE_ELEMENTS_ID)) $criteria->add(AttributeCombinationTableMap::PRODUCT_SALE_ELEMENTS_ID, $this->product_sale_elements_id);
if ($this->isColumnModified(AttributeCombinationTableMap::CREATED_AT)) $criteria->add(AttributeCombinationTableMap::CREATED_AT, $this->created_at);
if ($this->isColumnModified(AttributeCombinationTableMap::UPDATED_AT)) $criteria->add(AttributeCombinationTableMap::UPDATED_AT, $this->updated_at);
return $criteria;
}
@@ -1180,6 +1191,7 @@ abstract class AttributeCombination implements ActiveRecordInterface
*/
public function isPrimaryKeyNull()
{
return (null === $this->getAttributeId()) && (null === $this->getAttributeAvId()) && (null === $this->getProductSaleElementsId());
}
@@ -1251,6 +1263,7 @@ abstract class AttributeCombination implements ActiveRecordInterface
$v->addAttributeCombination($this);
}
return $this;
}
@@ -1301,6 +1314,7 @@ abstract class AttributeCombination implements ActiveRecordInterface
$v->addAttributeCombination($this);
}
return $this;
}
@@ -1351,6 +1365,7 @@ abstract class AttributeCombination implements ActiveRecordInterface
$v->addAttributeCombination($this);
}
return $this;
}

View File

@@ -776,6 +776,7 @@ abstract class AttributeCombinationQuery extends ModelCriteria
// for more than one table or we could emulating ON DELETE CASCADE, etc.
$con->beginTransaction();
AttributeCombinationTableMap::removeInstanceFromPool($criteria);
$affectedRows += ModelCriteria::delete($con);

View File

@@ -26,6 +26,7 @@ abstract class AttributeI18n implements ActiveRecordInterface
*/
const TABLE_MAP = '\\Thelia\\Model\\Map\\AttributeI18nTableMap';
/**
* attribute to determine if this object has previously been saved.
* @var boolean
@@ -380,6 +381,7 @@ abstract class AttributeI18n implements ActiveRecordInterface
*/
public function getId()
{
return $this->id;
}
@@ -390,6 +392,7 @@ abstract class AttributeI18n implements ActiveRecordInterface
*/
public function getLocale()
{
return $this->locale;
}
@@ -400,6 +403,7 @@ abstract class AttributeI18n implements ActiveRecordInterface
*/
public function getTitle()
{
return $this->title;
}
@@ -410,6 +414,7 @@ abstract class AttributeI18n implements ActiveRecordInterface
*/
public function getDescription()
{
return $this->description;
}
@@ -420,6 +425,7 @@ abstract class AttributeI18n implements ActiveRecordInterface
*/
public function getChapo()
{
return $this->chapo;
}
@@ -430,6 +436,7 @@ abstract class AttributeI18n implements ActiveRecordInterface
*/
public function getPostscriptum()
{
return $this->postscriptum;
}
@@ -454,6 +461,7 @@ abstract class AttributeI18n implements ActiveRecordInterface
$this->aAttribute = null;
}
return $this;
} // setId()
@@ -474,6 +482,7 @@ abstract class AttributeI18n implements ActiveRecordInterface
$this->modifiedColumns[AttributeI18nTableMap::LOCALE] = true;
}
return $this;
} // setLocale()
@@ -494,6 +503,7 @@ abstract class AttributeI18n implements ActiveRecordInterface
$this->modifiedColumns[AttributeI18nTableMap::TITLE] = true;
}
return $this;
} // setTitle()
@@ -514,6 +524,7 @@ abstract class AttributeI18n implements ActiveRecordInterface
$this->modifiedColumns[AttributeI18nTableMap::DESCRIPTION] = true;
}
return $this;
} // setDescription()
@@ -534,6 +545,7 @@ abstract class AttributeI18n implements ActiveRecordInterface
$this->modifiedColumns[AttributeI18nTableMap::CHAPO] = true;
}
return $this;
} // setChapo()
@@ -554,6 +566,7 @@ abstract class AttributeI18n implements ActiveRecordInterface
$this->modifiedColumns[AttributeI18nTableMap::POSTSCRIPTUM] = true;
}
return $this;
} // setPostscriptum()
@@ -597,6 +610,7 @@ abstract class AttributeI18n implements ActiveRecordInterface
{
try {
$col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : AttributeI18nTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)];
$this->id = (null !== $col) ? (int) $col : null;
@@ -1107,6 +1121,7 @@ abstract class AttributeI18n implements ActiveRecordInterface
if ($this->isColumnModified(AttributeI18nTableMap::DESCRIPTION)) $criteria->add(AttributeI18nTableMap::DESCRIPTION, $this->description);
if ($this->isColumnModified(AttributeI18nTableMap::CHAPO)) $criteria->add(AttributeI18nTableMap::CHAPO, $this->chapo);
if ($this->isColumnModified(AttributeI18nTableMap::POSTSCRIPTUM)) $criteria->add(AttributeI18nTableMap::POSTSCRIPTUM, $this->postscriptum);
return $criteria;
}
@@ -1159,6 +1174,7 @@ abstract class AttributeI18n implements ActiveRecordInterface
*/
public function isPrimaryKeyNull()
{
return (null === $this->getId()) && (null === $this->getLocale());
}
@@ -1231,9 +1247,11 @@ abstract class AttributeI18n implements ActiveRecordInterface
$v->addAttributeI18n($this);
}
return $this;
}
/**
* Get the associated ChildAttribute object
*

View File

@@ -590,6 +590,7 @@ abstract class AttributeI18nQuery extends ModelCriteria
// for more than one table or we could emulating ON DELETE CASCADE, etc.
$con->beginTransaction();
AttributeI18nTableMap::removeInstanceFromPool($criteria);
$affectedRows += ModelCriteria::delete($con);

View File

@@ -224,6 +224,7 @@ abstract class AttributeQuery extends ModelCriteria
*/
public function filterByPrimaryKey($key)
{
return $this->addUsingAlias(AttributeTableMap::ID, $key, Criteria::EQUAL);
}
@@ -236,6 +237,7 @@ abstract class AttributeQuery extends ModelCriteria
*/
public function filterByPrimaryKeys($keys)
{
return $this->addUsingAlias(AttributeTableMap::ID, $keys, Criteria::IN);
}
@@ -793,6 +795,7 @@ abstract class AttributeQuery extends ModelCriteria
// for more than one table or we could emulating ON DELETE CASCADE, etc.
$con->beginTransaction();
AttributeTableMap::removeInstanceFromPool($criteria);
$affectedRows += ModelCriteria::delete($con);

View File

@@ -31,6 +31,7 @@ abstract class AttributeTemplate implements ActiveRecordInterface
*/
const TABLE_MAP = '\\Thelia\\Model\\Map\\AttributeTemplateTableMap';
/**
* attribute to determine if this object has previously been saved.
* @var boolean
@@ -376,6 +377,7 @@ abstract class AttributeTemplate implements ActiveRecordInterface
*/
public function getId()
{
return $this->id;
}
@@ -386,6 +388,7 @@ abstract class AttributeTemplate implements ActiveRecordInterface
*/
public function getAttributeId()
{
return $this->attribute_id;
}
@@ -396,6 +399,7 @@ abstract class AttributeTemplate implements ActiveRecordInterface
*/
public function getTemplateId()
{
return $this->template_id;
}
@@ -406,6 +410,7 @@ abstract class AttributeTemplate implements ActiveRecordInterface
*/
public function getPosition()
{
return $this->position;
}
@@ -466,6 +471,7 @@ abstract class AttributeTemplate implements ActiveRecordInterface
$this->modifiedColumns[AttributeTemplateTableMap::ID] = true;
}
return $this;
} // setId()
@@ -490,6 +496,7 @@ abstract class AttributeTemplate implements ActiveRecordInterface
$this->aAttribute = null;
}
return $this;
} // setAttributeId()
@@ -514,6 +521,7 @@ abstract class AttributeTemplate implements ActiveRecordInterface
$this->aTemplate = null;
}
return $this;
} // setTemplateId()
@@ -534,6 +542,7 @@ abstract class AttributeTemplate implements ActiveRecordInterface
$this->modifiedColumns[AttributeTemplateTableMap::POSITION] = true;
}
return $this;
} // setPosition()
@@ -554,6 +563,7 @@ abstract class AttributeTemplate implements ActiveRecordInterface
}
} // if either are not null
return $this;
} // setCreatedAt()
@@ -574,6 +584,7 @@ abstract class AttributeTemplate implements ActiveRecordInterface
}
} // if either are not null
return $this;
} // setUpdatedAt()
@@ -1166,6 +1177,7 @@ abstract class AttributeTemplate implements ActiveRecordInterface
if ($this->isColumnModified(AttributeTemplateTableMap::POSITION)) $criteria->add(AttributeTemplateTableMap::POSITION, $this->position);
if ($this->isColumnModified(AttributeTemplateTableMap::CREATED_AT)) $criteria->add(AttributeTemplateTableMap::CREATED_AT, $this->created_at);
if ($this->isColumnModified(AttributeTemplateTableMap::UPDATED_AT)) $criteria->add(AttributeTemplateTableMap::UPDATED_AT, $this->updated_at);
return $criteria;
}
@@ -1211,6 +1223,7 @@ abstract class AttributeTemplate implements ActiveRecordInterface
*/
public function isPrimaryKeyNull()
{
return null === $this->getId();
}
@@ -1283,6 +1296,7 @@ abstract class AttributeTemplate implements ActiveRecordInterface
$v->addAttributeTemplate($this);
}
return $this;
}
@@ -1333,6 +1347,7 @@ abstract class AttributeTemplate implements ActiveRecordInterface
$v->addAttributeTemplate($this);
}
return $this;
}

View File

@@ -223,6 +223,7 @@ abstract class AttributeTemplateQuery extends ModelCriteria
*/
public function filterByPrimaryKey($key)
{
return $this->addUsingAlias(AttributeTemplateTableMap::ID, $key, Criteria::EQUAL);
}
@@ -235,6 +236,7 @@ abstract class AttributeTemplateQuery extends ModelCriteria
*/
public function filterByPrimaryKeys($keys)
{
return $this->addUsingAlias(AttributeTemplateTableMap::ID, $keys, Criteria::IN);
}
@@ -719,6 +721,7 @@ abstract class AttributeTemplateQuery extends ModelCriteria
// for more than one table or we could emulating ON DELETE CASCADE, etc.
$con->beginTransaction();
AttributeTemplateTableMap::removeInstanceFromPool($criteria);
$affectedRows += ModelCriteria::delete($con);

View File

@@ -36,6 +36,7 @@ abstract class Cart implements ActiveRecordInterface
*/
const TABLE_MAP = '\\Thelia\\Model\\Map\\CartTableMap';
/**
* attribute to determine if this object has previously been saved.
* @var boolean
@@ -435,6 +436,7 @@ abstract class Cart implements ActiveRecordInterface
*/
public function getId()
{
return $this->id;
}
@@ -445,6 +447,7 @@ abstract class Cart implements ActiveRecordInterface
*/
public function getToken()
{
return $this->token;
}
@@ -455,6 +458,7 @@ abstract class Cart implements ActiveRecordInterface
*/
public function getCustomerId()
{
return $this->customer_id;
}
@@ -465,6 +469,7 @@ abstract class Cart implements ActiveRecordInterface
*/
public function getAddressDeliveryId()
{
return $this->address_delivery_id;
}
@@ -475,6 +480,7 @@ abstract class Cart implements ActiveRecordInterface
*/
public function getAddressInvoiceId()
{
return $this->address_invoice_id;
}
@@ -485,6 +491,7 @@ abstract class Cart implements ActiveRecordInterface
*/
public function getCurrencyId()
{
return $this->currency_id;
}
@@ -495,6 +502,7 @@ abstract class Cart implements ActiveRecordInterface
*/
public function getDiscount()
{
return $this->discount;
}
@@ -555,6 +563,7 @@ abstract class Cart implements ActiveRecordInterface
$this->modifiedColumns[CartTableMap::ID] = true;
}
return $this;
} // setId()
@@ -575,6 +584,7 @@ abstract class Cart implements ActiveRecordInterface
$this->modifiedColumns[CartTableMap::TOKEN] = true;
}
return $this;
} // setToken()
@@ -599,6 +609,7 @@ abstract class Cart implements ActiveRecordInterface
$this->aCustomer = null;
}
return $this;
} // setCustomerId()
@@ -623,6 +634,7 @@ abstract class Cart implements ActiveRecordInterface
$this->aAddressRelatedByAddressDeliveryId = null;
}
return $this;
} // setAddressDeliveryId()
@@ -647,6 +659,7 @@ abstract class Cart implements ActiveRecordInterface
$this->aAddressRelatedByAddressInvoiceId = null;
}
return $this;
} // setAddressInvoiceId()
@@ -671,6 +684,7 @@ abstract class Cart implements ActiveRecordInterface
$this->aCurrency = null;
}
return $this;
} // setCurrencyId()
@@ -691,6 +705,7 @@ abstract class Cart implements ActiveRecordInterface
$this->modifiedColumns[CartTableMap::DISCOUNT] = true;
}
return $this;
} // setDiscount()
@@ -711,6 +726,7 @@ abstract class Cart implements ActiveRecordInterface
}
} // if either are not null
return $this;
} // setCreatedAt()
@@ -731,6 +747,7 @@ abstract class Cart implements ActiveRecordInterface
}
} // if either are not null
return $this;
} // setUpdatedAt()
@@ -774,6 +791,7 @@ abstract class Cart implements ActiveRecordInterface
{
try {
$col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : CartTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)];
$this->id = (null !== $col) ? (int) $col : null;
@@ -1430,6 +1448,7 @@ abstract class Cart implements ActiveRecordInterface
if ($this->isColumnModified(CartTableMap::DISCOUNT)) $criteria->add(CartTableMap::DISCOUNT, $this->discount);
if ($this->isColumnModified(CartTableMap::CREATED_AT)) $criteria->add(CartTableMap::CREATED_AT, $this->created_at);
if ($this->isColumnModified(CartTableMap::UPDATED_AT)) $criteria->add(CartTableMap::UPDATED_AT, $this->updated_at);
return $criteria;
}
@@ -1475,6 +1494,7 @@ abstract class Cart implements ActiveRecordInterface
*/
public function isPrimaryKeyNull()
{
return null === $this->getId();
}
@@ -1564,6 +1584,7 @@ abstract class Cart implements ActiveRecordInterface
$v->addCart($this);
}
return $this;
}
@@ -1614,6 +1635,7 @@ abstract class Cart implements ActiveRecordInterface
$v->addCartRelatedByAddressDeliveryId($this);
}
return $this;
}
@@ -1664,6 +1686,7 @@ abstract class Cart implements ActiveRecordInterface
$v->addCartRelatedByAddressInvoiceId($this);
}
return $this;
}
@@ -1714,6 +1737,7 @@ abstract class Cart implements ActiveRecordInterface
$v->addCart($this);
}
return $this;
}
@@ -1874,6 +1898,7 @@ abstract class Cart implements ActiveRecordInterface
{
$cartItemsToDelete = $this->getCartItems(new Criteria(), $con)->diff($cartItems);
$this->cartItemsScheduledForDeletion = $cartItemsToDelete;
foreach ($cartItemsToDelete as $cartItemRemoved) {
@@ -1974,6 +1999,7 @@ abstract class Cart implements ActiveRecordInterface
return $this;
}
/**
* If this collection has already been initialized with
* an identical criteria, it returns the collection.
@@ -1998,6 +2024,7 @@ abstract class Cart implements ActiveRecordInterface
return $this->getCartItems($query, $con);
}
/**
* If this collection has already been initialized with
* an identical criteria, it returns the collection.
@@ -2170,6 +2197,7 @@ abstract class Cart implements ActiveRecordInterface
}
/**
* Derived method to catches calls to undefined methods.
*

Some files were not shown because too many files have changed in this diff Show More