diff --git a/controllers/admin/AdminCustomerThreadsController.php b/controllers/admin/AdminCustomerThreadsController.php
index 8d3d68d5c..b678cc1d4 100644
--- a/controllers/admin/AdminCustomerThreadsController.php
+++ b/controllers/admin/AdminCustomerThreadsController.php
@@ -458,7 +458,7 @@ class AdminCustomerThreadsControllerCore extends AdminController
$extension = false;
foreach ($extensions as $key => $val)
- if (substr($filename, -4) == $key || substr($filename, -5) == $key)
+ if (substr(Tools::strtolower($filename), -4) == $key || substr(Tools::strtolower($filename), -5) == $key)
{
$extension = $val;
break;
diff --git a/controllers/admin/AdminEmployeesController.php b/controllers/admin/AdminEmployeesController.php
index b0222401a..ebdef6a4a 100644
--- a/controllers/admin/AdminEmployeesController.php
+++ b/controllers/admin/AdminEmployeesController.php
@@ -227,7 +227,7 @@ class AdminEmployeesControllerCore extends AdminController
'name' => 'id_lang',
'required' => true,
'options' => array(
- 'query' => Language::getLanguages(),
+ 'query' => Language::getLanguages(false),
'id' => 'id_lang',
'name' => 'name'
)
diff --git a/controllers/admin/AdminImportController.php b/controllers/admin/AdminImportController.php
index 3486bccbd..2bf3a7aa5 100644
--- a/controllers/admin/AdminImportController.php
+++ b/controllers/admin/AdminImportController.php
@@ -2518,13 +2518,7 @@ class AdminImportControllerCore extends AdminController
public function utf8EncodeArray($array)
{
- if (is_array($array))
- foreach ($array as $key => $value)
- $array[$key] = utf8_encode($value);
- else
- $array = utf8_encode($array);
-
- return $array;
+ return (is_array($array) ? array_map('utf8_encode', $array) : utf8_encode($array));
}
protected function getNbrColumn($handle, $glue)
diff --git a/controllers/admin/AdminLoginController.php b/controllers/admin/AdminLoginController.php
index 3329fb75a..5ce949c00 100755
--- a/controllers/admin/AdminLoginController.php
+++ b/controllers/admin/AdminLoginController.php
@@ -70,18 +70,23 @@ class AdminLoginControllerCore extends AdminController
if (file_exists(_PS_ADMIN_DIR_.'/../install'))
$this->context->smarty->assign('wrong_install_name', true);
- if (file_exists(_PS_ADMIN_DIR_.'/../admin'))
+
+ if (basename(_PS_ADMIN_DIR_) == 'admin' && file_exists(_PS_ADMIN_DIR_.'/../admin/'))
{
- $rand = sprintf('%04d', rand(0, 9999));
- if (@rename(_PS_ADMIN_DIR_.'/../admin', _PS_ADMIN_DIR_.'/../admin'.$rand))
- Tools::redirectAdmin('../admin'.$rand);
+ $rand = 'admin'.sprintf('%04d', rand(0, 9999)).'/';
+ if (@rename(_PS_ADMIN_DIR_.'/../admin/', _PS_ADMIN_DIR_.'/../'.$rand))
+ Tools::redirectAdmin('../'.$rand);
else
$this->context->smarty->assign(array(
'wrong_folder_name' => true
));
}
+ else
+ $rand = basename(_PS_ADMIN_DIR_).'/';
+
$this->context->smarty->assign(array(
- 'randomNb' => rand(0, 9999)
+ 'randomNb' => $rand,
+ 'adminUrl' => Tools::getCurrentUrlProtocolPrefix().Tools::getShopDomain().__PS_BASE_URI__.$rand
));
// Redirect to admin panel
diff --git a/controllers/admin/AdminMetaController.php b/controllers/admin/AdminMetaController.php
index a268098ff..6a08f8bc7 100644
--- a/controllers/admin/AdminMetaController.php
+++ b/controllers/admin/AdminMetaController.php
@@ -66,7 +66,7 @@ class AdminMetaControllerCore extends AdminController
),
'PS_ALLOW_ACCENTED_CHARS_URL' => array(
'title' => $this->l('Accented URL'),
- 'desc' => $this->l('Enable if you want to allow accented characters in your friendly URLs.'),
+ 'desc' => $this->l('Enable if you want to allow accented characters in your friendly URLs.').' '.$this->l('You should only activate this option if you are using non-latin characters ; for all the latin charsets, your SEO will be better without this option.'),
'validation' => 'isBool',
'cast' => 'intval',
'type' => 'bool'
diff --git a/controllers/admin/AdminModulesController.php b/controllers/admin/AdminModulesController.php
index 934eff0ee..c457c4496 100644
--- a/controllers/admin/AdminModulesController.php
+++ b/controllers/admin/AdminModulesController.php
@@ -391,6 +391,8 @@ class AdminModulesControllerCore extends AdminController
$this->recursiveDeleteOnDisk($tmp_folder);
if ($success && $redirect)
Tools::redirectAdmin(self::$currentIndex.'&conf=8&anchor=anchor'.ucfirst($folder).'&token='.$this->token);
+
+ return $success;
}
protected function recursiveDeleteOnDisk($dir)
@@ -600,25 +602,14 @@ class AdminModulesControllerCore extends AdminController
foreach ($modules as $name)
{
$full_report = null;
- if ($key == 'update')
- {
- if (ConfigurationTest::test_dir('modules/'.$name, true, $full_report))
- Tools::deleteDirectory('../modules/'.$name.'/');
- else
- {
- $module = Module::getInstanceByName(urldecode($name));
- $this->errors[] = $this->l(sprintf("Module %s can't be upgraded : ", $module->displayName)).$full_report;
- continue;
- }
- }
-
// If Addons module, download and unzip it before installing it
- if (!file_exists('../modules/'.$name.'/'.$name.'.php'))
+ if (!file_exists('../modules/'.$name.'/'.$name.'.php') || $key == 'update')
{
$filesList = array(
array('type' => 'addonsNative', 'file' => Module::CACHE_FILE_DEFAULT_COUNTRY_MODULES_LIST, 'loggedOnAddons' => 0),
array('type' => 'addonsBought', 'file' => Module::CACHE_FILE_CUSTOMER_MODULES_LIST, 'loggedOnAddons' => 1),
);
+
foreach ($filesList as $f)
if (file_exists(_PS_ROOT_DIR_.$f['file']))
{
@@ -628,12 +619,19 @@ class AdminModulesControllerCore extends AdminController
foreach ($xml->module as $modaddons)
if ($name == $modaddons->name && isset($modaddons->id) && ($this->logged_on_addons || $f['loggedOnAddons'] == 0))
{
+ $download_ok = false;
if ($f['loggedOnAddons'] == 0)
- if (file_put_contents('../modules/'.$modaddons->name.'.zip', Tools::addonsRequest('module', array('id_module' => pSQL($modaddons->id)))))
- $this->extractArchive('../modules/'.$modaddons->name.'.zip', false);
- if ($f['loggedOnAddons'] == 1 && $this->logged_on_addons)
- if (file_put_contents('../modules/'.$modaddons->name.'.zip', Tools::addonsRequest('module', array('id_module' => pSQL($modaddons->id), 'username_addons' => pSQL(trim($this->context->cookie->username_addons)), 'password_addons' => pSQL(trim($this->context->cookie->password_addons))))))
- $this->extractArchive('../modules/'.$modaddons->name.'.zip', false);
+ if (file_put_contents(_PS_MODULE_DIR_.$modaddons->name.'.zip', Tools::addonsRequest('module', array('id_module' => pSQL($modaddons->id)))))
+ $download_ok = true;
+ elseif ($f['loggedOnAddons'] == 1 && $this->logged_on_addons)
+ if (file_put_contents(_PS_MODULE_DIR_.$modaddons->name.'.zip', Tools::addonsRequest('module', array('id_module' => pSQL($modaddons->id), 'username_addons' => pSQL(trim($this->context->cookie->username_addons)), 'password_addons' => pSQL(trim($this->context->cookie->password_addons))))))
+ $download_ok = true;
+
+ if (!$download_ok)
+ $this->errors[] = $this->l('Error on downloading the lastest version');
+ else
+ if(!$this->extractArchive(_PS_MODULE_DIR_.$modaddons->name.'.zip', false))
+ $this->errors[] = $this->l(sprintf("Module %s can't be upgraded: ", $modaddons->name));
}
}
}
@@ -1005,6 +1003,7 @@ class AdminModulesControllerCore extends AdminController
$this->nb_modules_total = count($modules);
$module_errors = array();
$module_success = array();
+ $upgrade_available = array();
// Browse modules list
foreach ($modules as $km => $module)
@@ -1015,7 +1014,7 @@ class AdminModulesControllerCore extends AdminController
unset($modules[$km]);
continue;
}
-
+
// Upgrade Module process, init check if a module could be upgraded
if (Module::initUpgradeModule($module))
{
@@ -1085,6 +1084,8 @@ class AdminModulesControllerCore extends AdminController
$modules[$km]->preferences = $modules_preferences[$modules[$km]->name];
}
unset($object);
+ if (isset($module->version_addons))
+ $upgrade_available[] = array('anchor' => ucfirst($module->name), 'name' => $module->displayName);;
}
// Don't display categories without modules
@@ -1109,6 +1110,7 @@ class AdminModulesControllerCore extends AdminController
$tpl_vars = array();
$tpl_vars['token'] = $this->token;
+ $tpl_vars['upgrade_available'] = $upgrade_available;
$tpl_vars['currentIndex'] = self::$currentIndex;
$tpl_vars['dirNameCurrentIndex'] = dirname(self::$currentIndex);
$tpl_vars['ajaxCurrentIndex'] = str_replace('index', 'ajax-tab', self::$currentIndex);
diff --git a/controllers/admin/AdminModulesPositionsController.php b/controllers/admin/AdminModulesPositionsController.php
index f614e7755..bb01368cd 100644
--- a/controllers/admin/AdminModulesPositionsController.php
+++ b/controllers/admin/AdminModulesPositionsController.php
@@ -303,7 +303,7 @@ class AdminModulesPositionsControllerCore extends AdminController
{
$url = $this->context->shop->getBaseURL().Dispatcher::getInstance()->createUrl('index', (int)$this->context->language->id, $live_edit_params);
if (Configuration::get('PS_REWRITING_SETTINGS'))
- $url = str_replace('index.php', Language::getIsoById($this->context->employee->id_lang).'/', $url);
+ $url = str_replace('index.php', ((count(Language::getLanguages(true)) > 1)? Language::getIsoById($this->context->employee->id_lang).'/' : ''), $url);
return $url;
}
diff --git a/controllers/admin/AdminOrdersController.php b/controllers/admin/AdminOrdersController.php
index ce4f93147..67e8fd9a1 100755
--- a/controllers/admin/AdminOrdersController.php
+++ b/controllers/admin/AdminOrdersController.php
@@ -568,9 +568,9 @@ class AdminOrdersControllerCore extends AdminController
{
if ($this->tabAccess['delete'] === '1')
{
- if (!Tools::isSubmit('id_order_detail'))
+ if (!Tools::isSubmit('id_order_detail') && !Tools::isSubmit('id_customization'))
$this->errors[] = Tools::displayError('You must select a product.');
- elseif (!Tools::isSubmit('cancelQuantity'))
+ elseif (!Tools::isSubmit('cancelQuantity') && !Tools::isSubmit('cancelCustomizationQuantity'))
$this->errors[] = Tools::displayError('You must enter a quantity.');
else
{
@@ -597,7 +597,8 @@ class AdminOrdersControllerCore extends AdminController
foreach ($customizationList as $key => $id_order_detail)
{
$full_product_list[(int)$id_order_detail] = $id_order_detail;
- $full_quantity_list[(int)$id_order_detail] += $customizationQtyList[$key];
+ if (isset($customizationQtyList[$key]))
+ $full_quantity_list[(int)$id_order_detail] += $customizationQtyList[$key];
}
if ($productList || $customizationList)
@@ -1297,7 +1298,7 @@ class AdminOrdersControllerCore extends AdminController
// display warning if there are products out of stock
$display_out_of_stock_warning = false;
$current_order_state = $order->getCurrentOrderState();
- if (!Validate::isLoadedObject($current_order_state) || ($current_order_state->delivery != 1 && $current_order_state->shipped != 1))
+ if (configuration::get('PS_STOCK_MANAGEMENT') && (!Validate::isLoadedObject($current_order_state) || ($current_order_state->delivery != 1 && $current_order_state->shipped != 1)))
$display_out_of_stock_warning = true;
// products current stock (from stock_available)
diff --git a/controllers/admin/AdminPPreferencesController.php b/controllers/admin/AdminPPreferencesController.php
index 4cb5beedf..c3cb9a352 100644
--- a/controllers/admin/AdminPPreferencesController.php
+++ b/controllers/admin/AdminPPreferencesController.php
@@ -223,7 +223,7 @@ class AdminPPreferencesControllerCore extends AdminController
public function beforeUpdateOptions()
{
- if (!Tools::getValue('PS_STOCK_MANAGEMENT'))
+ if (!Tools::getValue('PS_STOCK_MANAGEMENT', true))
{
$_POST['PS_ORDER_OUT_OF_STOCK'] = 1;
$_POST['PS_DISPLAY_QTIES'] = 0;
diff --git a/controllers/admin/AdminPerformanceController.php b/controllers/admin/AdminPerformanceController.php
index 80df339b6..c19b3c221 100644
--- a/controllers/admin/AdminPerformanceController.php
+++ b/controllers/admin/AdminPerformanceController.php
@@ -26,6 +26,13 @@
class AdminPerformanceControllerCore extends AdminController
{
+
+ public function __construct()
+ {
+ $this->className = 'Configuration';
+ parent::__construct();
+ }
+
public function initFieldsetSmarty()
{
$this->fields_form[0]['form'] = array(
@@ -541,6 +548,7 @@ class AdminPerformanceControllerCore extends AdminController
public function postProcess()
{
+
/* PrestaShop demo mode */
if (_PS_MODE_DEMO_)
{
@@ -617,6 +625,9 @@ class AdminPerformanceControllerCore extends AdminController
{
if ($this->tabAccess['edit'] === '1')
{
+ $theme_cache_directory = _PS_ALL_THEMES_DIR_.$this->context->shop->theme_directory.'/cache/';
+ if (((bool)Tools::getValue('PS_CSS_THEME_CACHE') || (bool)Tools::getValue('PS_JS_THEME_CACHE')) && !is_writable($theme_cache_directory))
+ $this->errors[] = Tools::displayError(sprintf($this->l('To use Smart Cache directory %s must be writable.'), realpath($theme_cache_directory)));
if (!Configuration::updateValue('PS_CSS_THEME_CACHE', (int)Tools::getValue('PS_CSS_THEME_CACHE')) ||
!Configuration::updateValue('PS_JS_THEME_CACHE', (int)Tools::getValue('PS_JS_THEME_CACHE')) ||
!Configuration::updateValue('PS_HTML_THEME_COMPRESSION', (int)Tools::getValue('PS_HTML_THEME_COMPRESSION')) ||
@@ -665,9 +676,8 @@ class AdminPerformanceControllerCore extends AdminController
else
$this->errors[] = Tools::displayError('You do not have permission to edit this.');
}
-
if ((bool)Tools::getValue('ciphering_up') && Configuration::get('PS_CIPHER_ALGORITHM') != (int)Tools::getValue('PS_CIPHER_ALGORITHM'))
- {
+ {
if ($this->tabAccess['edit'] === '1')
{
$algo = (int)Tools::getValue('PS_CIPHER_ALGORITHM');
@@ -793,8 +803,6 @@ class AdminPerformanceControllerCore extends AdminController
Hook::exec('action'.get_class($this).ucfirst($this->action).'After', array('controller' => $this, 'return' => ''));
Tools::redirectAdmin(self::$currentIndex.'&token='.Tools::getValue('token').'&conf=4');
}
- else
- return parent::postProcess();
}
public function ajaxProcess()
diff --git a/controllers/admin/AdminScenesController.php b/controllers/admin/AdminScenesController.php
index 38d31e3e9..7f9ef8b91 100644
--- a/controllers/admin/AdminScenesController.php
+++ b/controllers/admin/AdminScenesController.php
@@ -206,7 +206,7 @@ class AdminScenesControllerCore extends AdminController
$this->addJqueryPlugin('autocomplete');
$this->addJqueryPlugin('imgareaselect');
$this->addJs(_PS_JS_DIR_.'admin-scene-cropping.js' );
- $image_to_map_desc .= ' ';
$image_to_map_desc .= '
diff --git a/controllers/admin/AdminTranslationsController.php b/controllers/admin/AdminTranslationsController.php
index 5c8645a3d..df8898e62 100644
--- a/controllers/admin/AdminTranslationsController.php
+++ b/controllers/admin/AdminTranslationsController.php
@@ -586,7 +586,6 @@ class AdminTranslationsControllerCore extends AdminController
{
// Get instance of this tab by class name
$tab = Tab::getInstanceFromClassName($class_name);
-
//Check if class name exists
if (isset($tab->class_name) && !empty($tab->class_name))
{
@@ -687,6 +686,9 @@ class AdminTranslationsControllerCore extends AdminController
if (pathinfo($file2check['filename'], PATHINFO_BASENAME) == 'index.php' && file_put_contents(_PS_TRANSLATIONS_DIR_.'../'.$file2check['filename'], Tools::getDefaultIndexContent()))
continue;
+ // Clear smarty modules cache
+ Tools::clearCache();
+
if (Validate::isLanguageFileName($filename))
{
if (!Language::checkAndAddLanguage($iso_code))
@@ -736,13 +738,14 @@ class AdminTranslationsControllerCore extends AdminController
$this->errors[] = Tools::displayError('The archive cannot be extracted.'). ' '.$error->message;
else
{
-
if (!Language::checkAndAddLanguage($arr_import_lang[0]))
$conf = 20;
else
{
// Reset cache
Language::loadLanguages();
+ // Clear smarty modules cache
+ Tools::clearCache();
AdminTranslationsController::checkAndAddMailsFiles($arr_import_lang[0], $files_list);
if ($tab_errors = AdminTranslationsController::addNewTabs($arr_import_lang[0], $files_list))
@@ -1331,22 +1334,19 @@ class AdminTranslationsControllerCore extends AdminController
{
if ($this->tabAccess['edit'] === '1')
{
- // Get a good path for module directory
- if ($this->theme_selected == self::DEFAULT_THEME_NAME && _PS_MODE_DEV_)
- $i18n_dir = $this->translations_informations[$this->type_selected]['dir'];
- else
- $i18n_dir = $this->translations_informations[$this->type_selected]['override']['dir'];
-
// Get list of modules
if ($modules = $this->getListModules())
{
// Get files of all modules
- $arr_files = $this->getAllModuleFiles($modules, $i18n_dir, $this->lang_selected->iso_code, true);
+ $arr_files = $this->getAllModuleFiles($modules, null, $this->lang_selected->iso_code, true);
// Find and write all translation modules files
foreach ($arr_files as $value)
$this->findAndWriteTranslationsIntoFile($value['file_name'], $value['files'], $value['theme'], $value['module'], $value['dir']);
+ // Clear modules cache
+ Tools::clearCache();
+
// Redirect
if (Tools::getValue('submitTranslationsModulesAndStay'))
$this->redirect(true);
@@ -1882,24 +1882,10 @@ class AdminTranslationsControllerCore extends AdminController
throw new PrestaShopException(Tools::displayError('The module directory must be writable.'));
$modules = array();
- if (!_PS_MODE_DEV_ && $this->theme_selected == self::DEFAULT_THEME_NAME)
- {
- // Get all module which are installed for to have a minimum of POST
- $modules = Module::getModulesInstalled();
-
- foreach ($modules as &$module)
- $module = $module['name'];
- }
- else if ($this->theme_selected == self::DEFAULT_THEME_NAME)
- if (Tools::file_exists_cache($this->translations_informations['modules']['dir']))
- $modules = scandir($this->translations_informations['modules']['dir']);
- else
- $this->displayWarning(Tools::displayError('There are no active modules in this copy of PrestaShop. Please use the Modules page to activate, or visit the PrestaShop Addons Store to download them.'));
- else
- if (Tools::file_exists_cache($this->translations_informations['modules']['override']['dir']))
- $modules = scandir($this->translations_informations['modules']['override']['dir']);
- else
- $this->displayWarning(Tools::displayError('There are no active modules in this copy of PrestaShop. Please use the Modules page to activate, or visit the PrestaShop Addons Store to download them.'));
+ // Get all module which are installed for to have a minimum of POST
+ $modules = Module::getModulesInstalled();
+ foreach ($modules as &$module)
+ $module = $module['name'];
return $modules;
}
@@ -2539,12 +2525,30 @@ class AdminTranslationsControllerCore extends AdminController
* @param boolean $is_default set it if modules are located in root/prestashop/modules folder
* This allow to distinguish overrided prestashop theme and original module
*/
- protected function getAllModuleFiles($modules, $root_dir, $lang, $is_default = false)
+ protected function getAllModuleFiles($modules, $root_dir = null, $lang, $is_default = false)
{
$array_files = array();
+ $initial_root_dir = $root_dir;
foreach ($modules as $module)
{
- if ($module{0} != '.' && is_dir($root_dir.$module))
+ $root_dir = $initial_root_dir;
+ if ($module{0} == '.')
+ continue;
+ // Get path of directory for find a good path of translation file
+ if ($root_dir == null)
+ {
+ $i18n_dir = $this->translations_informations[$this->type_selected]['override']['dir'];
+ if (is_dir($i18n_dir.$module))
+ $root_dir = $i18n_dir;
+ }
+ if ($root_dir == null)
+ {
+ $i18n_dir = $this->translations_informations[$this->type_selected]['dir'];
+ if (is_dir($i18n_dir.$module))
+ $root_dir = $i18n_dir;
+ }
+
+ if (is_dir($root_dir.$module))
{
if (Tools::file_exists_cache($root_dir.$module.'/translations/'.$lang.'.php'))
$lang_file = $root_dir.$module.'/translations/'.$lang.'.php';
@@ -2564,20 +2568,13 @@ class AdminTranslationsControllerCore extends AdminController
*/
public function initFormModules()
{
- // Get path of directory for find a good path of translation file
- if ($this->theme_selected != self::DEFAULT_THEME_NAME || !_PS_MODE_DEV_)
- $i18n_dir = $this->translations_informations[$this->type_selected]['override']['dir'];
- else
- $i18n_dir = $this->translations_informations[$this->type_selected]['dir'];
-
// Get list of modules
$modules = $this->getListModules();
if (!empty($modules))
{
// Get all modules files and include all translation files
- $arr_files = $this->getAllModuleFiles($modules, $i18n_dir, $this->lang_selected->iso_code, true);
-
+ $arr_files = $this->getAllModuleFiles($modules, null, $this->lang_selected->iso_code, true);
foreach ($arr_files as $value)
$this->findAndFillTranslations($value['files'], $value['theme'], $value['module'], $value['dir']);
diff --git a/controllers/front/AuthController.php b/controllers/front/AuthController.php
index d9d750c27..f5b8563b4 100644
--- a/controllers/front/AuthController.php
+++ b/controllers/front/AuthController.php
@@ -104,12 +104,21 @@ class AuthControllerCore extends FrontController
$countries = Carrier::getDeliveredCountries($this->context->language->id, true, true);
else
$countries = Country::getCountries($this->context->language->id, true);
-
+
+ if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE']))
+ {
+ $array = preg_split('/,|-/', $_SERVER['HTTP_ACCEPT_LANGUAGE']);
+ if (!Validate::isLanguageIsoCode($array[0]) || !($sl_country = Country::getByIso($array[0])))
+ $sl_country = (int)Configuration::get('PS_COUNTRY_DEFAULT');
+ }
+ else
+ $sl_country = (int)Tools::getValue('id_country', Configuration::get('PS_COUNTRY_DEFAULT'));
+
$this->context->smarty->assign(array(
'inOrderProcess' => true,
'PS_GUEST_CHECKOUT_ENABLED' => Configuration::get('PS_GUEST_CHECKOUT_ENABLED'),
'PS_REGISTRATION_PROCESS_TYPE' => Configuration::get('PS_REGISTRATION_PROCESS_TYPE'),
- 'sl_country' => (int)Tools::getValue('id_country', Configuration::get('PS_COUNTRY_DEFAULT')),
+ 'sl_country' => (int)$sl_country,
'countries' => $countries
));
}
@@ -307,7 +316,7 @@ class AuthControllerCore extends FrontController
$this->context->cart->secure_key = $customer->secure_key;
$this->context->cart->save();
$this->context->cookie->id_cart = (int)$this->context->cart->id;
- $this->context->cookie->update();
+ $this->context->cookie->write();
$this->context->cart->autosetProductAddress();
Hook::exec('actionAuthentication');
@@ -379,8 +388,8 @@ class AuthControllerCore extends FrontController
$this->errors[] = Tools::displayError('An account using this email address has already been registered.', false);
// Preparing customer
$customer = new Customer();
- $lastnameAddress = $_POST['lastname'];
- $firstnameAddress = $_POST['firstname'];
+ $lastnameAddress = Tools::getValue('lastname');
+ $firstnameAddress = Tools::getValue('firstname');
$_POST['lastname'] = Tools::getValue('customer_lastname');
$_POST['firstname'] = Tools::getValue('customer_firstname');
diff --git a/controllers/front/CompareController.php b/controllers/front/CompareController.php
index 5317d6d75..410946a84 100644
--- a/controllers/front/CompareController.php
+++ b/controllers/front/CompareController.php
@@ -31,7 +31,7 @@ class CompareControllerCore extends FrontController
public function setMedia()
{
parent::setMedia();
- $this->addCSS(_THEME_CSS_DIR_.'/comparator.css');
+ $this->addCSS(_THEME_CSS_DIR_.'comparator.css');
if (Configuration::get('PS_COMPARATOR_MAX_ITEM') > 0)
$this->addJS(_THEME_JS_DIR_.'products-comparison.js');
diff --git a/controllers/front/ContactController.php b/controllers/front/ContactController.php
index 713d8bd1d..598258a8d 100644
--- a/controllers/front/ContactController.php
+++ b/controllers/front/ContactController.php
@@ -57,7 +57,7 @@ class ContactControllerCore extends FrontController
$this->errors[] = Tools::displayError('Please select a subject from the list provided. ');
else if (!empty($_FILES['fileUpload']['name']) && $_FILES['fileUpload']['error'] != 0)
$this->errors[] = Tools::displayError('An error occurred during the file-upload process.');
- else if (!empty($_FILES['fileUpload']['name']) && !in_array(substr($_FILES['fileUpload']['name'], -4), $extension) && !in_array(substr($_FILES['fileUpload']['name'], -5), $extension))
+ else if (!empty($_FILES['fileUpload']['name']) && !in_array(substr(Tools::strtolower($_FILES['fileUpload']['name']), -4), $extension) && !in_array(substr(Tools::strtolower($_FILES['fileUpload']['name']), -5), $extension))
$this->errors[] = Tools::displayError('Bad file extension');
else
{
diff --git a/controllers/front/OrderController.php b/controllers/front/OrderController.php
index 190bdd1de..37b5d90b8 100644
--- a/controllers/front/OrderController.php
+++ b/controllers/front/OrderController.php
@@ -347,7 +347,6 @@ class OrderControllerCore extends ParentOrderController
$this->context->smarty->assign(
array(
- 'free_shipping' => false, // Deprecated since a cart rule can be applied the specific carriers only
'is_guest' => (isset($this->context->customer->is_guest) ? $this->context->customer->is_guest : 0)
));
}
diff --git a/controllers/front/OrderOpcController.php b/controllers/front/OrderOpcController.php
index 9d8b593ad..166afebeb 100644
--- a/controllers/front/OrderOpcController.php
+++ b/controllers/front/OrderOpcController.php
@@ -190,6 +190,13 @@ class OrderOpcControllerCore extends ParentOrderController
$this->context->cart->id_address_invoice = Tools::isSubmit('same') ? $this->context->cart->id_address_delivery : (int)(Tools::getValue('id_address_invoice'));
if (!$this->context->cart->update())
$this->errors[] = Tools::displayError('An error occurred while updating your cart.');
+
+ $infos = Address::getCountryAndState((int)($this->context->cart->id_address_delivery));
+ if (isset($infos['id_country']) && $infos['id_country'])
+ {
+ $country = new Country((int)$infos['id_country']);
+ $this->context->country = $country;
+ }
// Address has changed, so we check if the cart rules still apply
CartRule::autoRemoveFromCart($this->context);
@@ -316,7 +323,7 @@ class OrderOpcControllerCore extends ParentOrderController
// If a rule offer free-shipping, force hidding shipping prices
$free_shipping = false;
foreach ($this->context->cart->getCartRules() as $rule)
- if ($rule['free_shipping'])
+ if ($rule['free_shipping'] && !$rule['carrier_restriction'])
{
$free_shipping = true;
break;
@@ -357,7 +364,8 @@ class OrderOpcControllerCore extends ParentOrderController
$this->_assignPayment();
Tools::safePostVars();
- $this->context->smarty->assign('newsletter', (int)Module::getInstanceByName('blocknewsletter')->active);
+ $blocknewsletter = Module::getInstanceByName('blocknewsletter');
+ $this->context->smarty->assign('newsletter', (bool)($blocknewsletter && $blocknewsletter->active));
$this->_processAddressFormat();
$this->setTemplate(_PS_THEME_DIR_.'order-opc.tpl');
@@ -405,9 +413,11 @@ class OrderOpcControllerCore extends ParentOrderController
if (!$this->isLogged)
{
$carriers = $this->context->cart->simulateCarriersOutput();
+ $oldMessage = Message::getMessageByCartId((int)($this->context->cart->id));
$this->context->smarty->assign(array(
'HOOK_EXTRACARRIER' => null,
'HOOK_EXTRACARRIER_ADDR' => null,
+ 'oldMessage' => isset($oldMessage['message'])? $oldMessage['message'] : '',
'HOOK_BEFORECARRIER' => Hook::exec('displayBeforeCarrier', array(
'carriers' => $carriers,
'checked' => $this->context->cart->simulateCarrierSelectedOutput(),
@@ -494,9 +504,20 @@ class OrderOpcControllerCore extends ParentOrderController
$wrapping_fees = $this->context->cart->getGiftWrappingPrice(false);
$wrapping_fees_tax_inc = $wrapping_fees = $this->context->cart->getGiftWrappingPrice();
+ $oldMessage = Message::getMessageByCartId((int)($this->context->cart->id));
+
+ $free_shipping = false;
+ foreach ($this->context->cart->getCartRules() as $rule)
+ {
+ if ($rule['free_shipping'] && !$rule['carrier_restriction'])
+ {
+ $free_shipping = true;
+ break;
+ }
+ }
$vars = array(
- 'free_shipping' => false, // Deprecated since a cart rule can be applied the specific carriers only
+ 'free_shipping' => $free_shipping,
'checkedTOS' => (int)($this->context->cookie->checkedTOS),
'recyclablePackAllowed' => (int)(Configuration::get('PS_RECYCLABLE_PACK')),
'giftAllowed' => (int)(Configuration::get('PS_GIFT_WRAPPING')),
@@ -513,6 +534,7 @@ class OrderOpcControllerCore extends ParentOrderController
'delivery_option' => $delivery_option,
'address_collection' => $this->context->cart->getAddressCollection(),
'opc' => true,
+ 'oldMessage' => isset($oldMessage['message'])? $oldMessage['message'] : '',
'HOOK_BEFORECARRIER' => Hook::exec('displayBeforeCarrier', array(
'carriers' => $carriers,
'delivery_option_list' => $this->context->cart->getDeliveryOptionList(),
@@ -538,6 +560,7 @@ class OrderOpcControllerCore extends ParentOrderController
)),
'carrier_block' => $this->context->smarty->fetch(_PS_THEME_DIR_.'order-carrier.tpl')
);
+
Cart::addExtraCarriers($result);
return $result;
}
diff --git a/controllers/front/ParentOrderController.php b/controllers/front/ParentOrderController.php
index 164ba87b2..075198f2f 100644
--- a/controllers/front/ParentOrderController.php
+++ b/controllers/front/ParentOrderController.php
@@ -30,6 +30,8 @@
class FreeOrder extends PaymentModule
{
public $active = 1;
+ public $name = 'free_order';
+ public $displayName = 'free_order';
}
class ParentOrderControllerCore extends FrontController
@@ -454,15 +456,15 @@ class ParentOrderControllerCore extends FrontController
}
protected function _assignCarrier()
- {
+ {
$address = new Address($this->context->cart->id_address_delivery);
$id_zone = Address::getZoneById($address->id);
$carriers = $this->context->cart->simulateCarriersOutput();
$checked = $this->context->cart->simulateCarrierSelectedOutput();
$delivery_option_list = $this->context->cart->getDeliveryOptionList();
$this->setDefaultCarrierSelection($delivery_option_list);
-
- $this->context->smarty->assign(array(
+
+ $this->context->smarty->assign(array(
'address_collection' => $this->context->cart->getAddressCollection(),
'delivery_option_list' => $delivery_option_list,
'carriers' => $carriers,
@@ -497,8 +499,18 @@ class ParentOrderControllerCore extends FrontController
$this->link_conditions .= '?content_only=1';
else
$this->link_conditions .= '&content_only=1';
-
+
+ $free_shipping = false;
+ foreach ($this->context->cart->getCartRules() as $rule)
+ {
+ if ($rule['free_shipping'] && !$rule['carrier_restriction'])
+ {
+ $free_shipping = true;
+ break;
+ }
+ }
$this->context->smarty->assign(array(
+ 'free_shipping' => $free_shipping,
'checkedTOS' => (int)($this->context->cookie->checkedTOS),
'recyclablePackAllowed' => (int)(Configuration::get('PS_RECYCLABLE_PACK')),
'giftAllowed' => (int)(Configuration::get('PS_GIFT_WRAPPING')),
diff --git a/controllers/front/ProductController.php b/controllers/front/ProductController.php
index 202801041..0938d1106 100644
--- a/controllers/front/ProductController.php
+++ b/controllers/front/ProductController.php
@@ -257,9 +257,9 @@ class ProductControllerCore extends FrontController
'HOOK_EXTRA_LEFT' => Hook::exec('displayLeftColumnProduct'),
'HOOK_EXTRA_RIGHT' => Hook::exec('displayRightColumnProduct'),
'HOOK_PRODUCT_OOS' => Hook::exec('actionProductOutOfStock', array('product' => $this->product)),
- 'HOOK_PRODUCT_ACTIONS' => Hook::exec('displayProductButtons'),
- 'HOOK_PRODUCT_TAB' => Hook::exec('displayProductTab'),
- 'HOOK_PRODUCT_TAB_CONTENT' => Hook::exec('displayProductTabContent'),
+ 'HOOK_PRODUCT_ACTIONS' => Hook::exec('displayProductButtons', array('product' => $this->product)),
+ 'HOOK_PRODUCT_TAB' => Hook::exec('displayProductTab', array('product' => $this->product)),
+ 'HOOK_PRODUCT_TAB_CONTENT' => Hook::exec('displayProductTabContent', array('product' => $this->product)),
'display_qties' => (int)Configuration::get('PS_DISPLAY_QTIES'),
'display_ht' => !Tax::excludeTaxeOption(),
'currencySign' => $this->context->currency->sign,
@@ -340,26 +340,39 @@ class ProductControllerCore extends FrontController
{
$images = $this->product->getImages((int)$this->context->cookie->id_lang);
$product_images = array();
+
+ if(isset($images[0]))
+ $this->context->smarty->assign('mainImage', $images[0]);
foreach ($images as $k => $image)
{
if ($image['cover'])
{
- $this->context->smarty->assign('mainImage', $images[0]);
+ $this->context->smarty->assign('mainImage', $image);
$cover = $image;
$cover['id_image'] = (Configuration::get('PS_LEGACY_IMAGES') ? ($this->product->id.'-'.$image['id_image']) : $image['id_image']);
$cover['id_image_only'] = (int)$image['id_image'];
}
$product_images[(int)$image['id_image']] = $image;
}
+
if (!isset($cover))
- $cover = array(
- 'id_image' => $this->context->language->iso_code.'-default',
- 'legend' => 'No picture',
- 'title' => 'No picture'
+ {
+ if(isset($images[0]))
+ {
+ $cover = $images[0];
+ $cover['id_image'] = (Configuration::get('PS_LEGACY_IMAGES') ? ($this->product->id.'-'.$images[0]['id_image']) : $images[0]['id_image']);
+ $cover['id_image_only'] = (int)$images[0]['id_image'];
+ }
+ else
+ $cover = array(
+ 'id_image' => $this->context->language->iso_code.'-default',
+ 'legend' => 'No picture',
+ 'title' => 'No picture'
);
+ }
$size = Image::getSize(ImageType::getFormatedName('large'));
$this->context->smarty->assign(array(
- 'have_image' => Product::getCover((int)Tools::getValue('id_product')),
+ 'have_image' => isset($cover['id_image'])? array((int)$cover['id_image']) : Product::getCover((int)Tools::getValue('id_product')),
'cover' => $cover,
'imgWidth' => (int)$size['width'],
'mediumSize' => Image::getSize(ImageType::getFormatedName('medium')),
@@ -432,11 +445,37 @@ class ProductControllerCore extends FrontController
else
$combinations[$row['id_product_attribute']]['available_date'] = '';
- if (isset($combination_images[$row['id_product_attribute']][0]['id_image']))
- $combinations[$row['id_product_attribute']]['id_image'] = $combination_images[$row['id_product_attribute']][0]['id_image'];
- else
+ if (!isset($combination_images[$row['id_product_attribute']][0]['id_image']))
$combinations[$row['id_product_attribute']]['id_image'] = -1;
+ else
+ {
+ $combinations[$row['id_product_attribute']]['id_image'] = $id_image = (int)$combination_images[$row['id_product_attribute']][0]['id_image'];
+ if ($row['default_on'] && $id_image > 0)
+ {
+ if (isset($this->context->smarty->tpl_vars['images']->value))
+ $product_images = $this->context->smarty->tpl_vars['images']->value;
+ if (is_array($product_images) && isset($product_images[$id_image]))
+ {
+ $product_images[$id_image]['cover'] = 1;
+ $this->context->smarty->assign('mainImage', $product_images[$id_image]);
+ if (count($product_images))
+ $this->context->smarty->assign('images', $product_images);
+ }
+ if (isset($this->context->smarty->tpl_vars['cover']->value))
+ $cover = $this->context->smarty->tpl_vars['cover']->value;
+ if (is_array($cover) && is_array($product_images))
+ {
+ $product_images[$cover['id_image']]['cover'] = 0;
+ if (isset($product_images[$id_image]))
+ $cover = $product_images[$id_image];
+ $cover['id_image'] = (Configuration::get('PS_LEGACY_IMAGES') ? ($this->product->id.'-'.$id_image) : (int)$id_image);
+ $cover['id_image_only'] = (int)$id_image;
+ $this->context->smarty->assign('cover', $cover);
+ }
+ }
+ }
}
+
// wash attributes list (if some attributes are unavailables and if allowed to wash it)
if (!Product::isAvailableWhenOutOfStock($this->product->out_of_stock) && Configuration::get('PS_DISP_UNAVAILABLE_ATTR') == 0)
{
@@ -616,4 +655,4 @@ class ProductControllerCore extends FrontController
}
return $specific_prices;
}
-}
+}
\ No newline at end of file
diff --git a/css/admin.css b/css/admin.css
index 76e53d8b3..4ee837e91 100644
--- a/css/admin.css
+++ b/css/admin.css
@@ -199,6 +199,8 @@ background: -moz-linear-gradient(center top , #F9F9F9, #ECECEC) repeat-x scroll
color: #7F7F7F;
font-size: 0.85em;
}
+
+
.margin-form .normal-text {
display: block;
padding-top: 0.2em;
@@ -761,7 +763,6 @@ tr.deleted td {
}
.row {
- background: #F4E6C9 url(../img/admin/news-bg.gif) repeat-x top left;
}
.uppercase {
@@ -844,6 +845,9 @@ tr.deleted td {
font-weight:bold;
font-size:16px;
}
+
+span.hint {position: relative;}
+
div.hint {
position: relative;
}
diff --git a/header.php b/header.php
index 3cc63af2b..a5320b9ab 100644
--- a/header.php
+++ b/header.php
@@ -34,6 +34,7 @@ else
{
$controller = new FrontController();
$controller->init();
+ $controller->setMedia();
}
Tools::displayFileAsDeprecated();
$controller->displayHeader();
diff --git a/install-dev/classes/controllerConsole.php b/install-dev/classes/controllerConsole.php
new file mode 100644
index 000000000..52660528b
--- /dev/null
+++ b/install-dev/classes/controllerConsole.php
@@ -0,0 +1,176 @@
+
+* @copyright 2007-2013 PrestaShop SA
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+abstract class InstallControllerConsole
+{
+ /**
+ * @var array List of installer steps
+ */
+ protected static $steps = array('process');
+
+ protected static $instances = array();
+
+ /**
+ * @var string Current step
+ */
+ public $step;
+
+ /**
+ * @var array List of errors
+ */
+ public $errors = array();
+
+ /**
+ * @var InstallController
+ */
+ public $controller;
+
+ /**
+ * @var InstallSession
+ */
+ public $session;
+
+ /**
+ * @var InstallLanguages
+ */
+ public $language;
+
+ /**
+ * @var InstallAbstractModel
+ */
+ public $model;
+
+ /**
+ * Validate current step
+ */
+ abstract public function validate();
+
+ final public static function execute($argc, $argv)
+ {
+ if (!($argc-1))
+ {
+ $available_arguments = Datas::getInstance()->getArgs();
+ echo 'Arguments available:'."\n";
+ foreach ($available_arguments as $key => $arg)
+ {
+ $name = isset($arg['name']) ? $arg['name'] : $key;
+ echo '--'.$name."\t".(isset($arg['help']) ? $arg['help'] : '').(isset($arg['default']) ? "\t".'(Default: '.$arg['default'].')' : '')."\n";
+ }
+ exit;
+ }
+
+ $errors = Datas::getInstance()->getAndCheckArgs($argv);
+ if (Datas::getInstance()->show_license)
+ {
+ echo strip_tags(file_get_contents(_PS_INSTALL_PATH_.'theme/views/license_content.phtml'));
+ exit;
+ }
+
+ if ($errors !== true)
+ {
+ if (count($errors))
+ foreach ($errors as $error)
+ echo $error."\n";
+ exit;
+ }
+
+ // Include all controllers
+ foreach (self::$steps as $step)
+ {
+ if (!file_exists(_PS_INSTALL_CONTROLLERS_PATH_.'console/'.$step.'.php'))
+ throw new PrestashopInstallerException("Controller file 'console/{$step}.php' not found");
+
+ require_once _PS_INSTALL_CONTROLLERS_PATH_.'console/'.$step.'.php';
+ $classname = 'InstallControllerConsole'.$step;
+ self::$instances[$step] = new $classname($step);
+ }
+
+ $datas = Datas::getInstance();
+
+ /* redefine HTTP_HOST */
+ $_SERVER['HTTP_HOST'] = $datas->http_host;
+
+ @date_default_timezone_set($datas->timezone);
+
+ if (!$current_step = $datas->step)
+ return false;
+
+ self::$instances[$current_step]->process();
+ }
+
+ final public function __construct($step)
+ {
+ $this->step = $step;
+ $this->datas = Datas::getInstance();
+
+ // Set current language
+ $this->language = InstallLanguages::getInstance();
+ if (!$this->datas->language)
+ die('No language defined');
+ $this->language->setLanguage($this->datas->language);
+
+ $this->init();
+ }
+
+ /**
+ * Initialize model
+ */
+ public function init()
+ {
+ }
+
+ public function printErrors()
+ {
+ $errors = $this->model_install->getErrors();
+ if (count($errors))
+ {
+ if (!is_array($errors))
+ $errors = array($errors);
+ echo 'Errors :'."\n";
+ foreach ($errors as $error_process)
+ foreach ($error_process as $error)
+ echo $error."\n";
+ die;
+ }
+ }
+
+ /**
+ * Get translated string
+ *
+ * @param string $str String to translate
+ * @param ... All other params will be used with sprintf
+ * @return string
+ */
+ public function l($str)
+ {
+ $args = func_get_args();
+ return call_user_func_array(array($this->language, 'l'), $args);
+ }
+
+ public function process()
+ {
+ }
+}
diff --git a/install-dev/classes/datas.php b/install-dev/classes/datas.php
new file mode 100644
index 000000000..964d737cf
--- /dev/null
+++ b/install-dev/classes/datas.php
@@ -0,0 +1,203 @@
+
+* @copyright 2007-2013 PrestaShop SA
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+class Datas
+{
+ private static $instance = null;
+ protected static $available_args = array(
+ 'step' => array(
+ 'name' => 'step',
+ 'default' => 'process',
+ 'validate' => 'isGenericName',
+ ),
+ 'language' => array(
+ 'default' => 'en',
+ 'validate' => 'isLanguageIsoCode',
+ 'alias' => 'l',
+ 'help' => 'language iso code',
+ ),
+ 'timezone' => array(
+ 'default' => 'Europe/Paris',
+ 'alias' => 't',
+ ),
+ 'http_host' => array(
+ 'name' => 'domain',
+ 'validate' => 'isGenericName',
+ 'default' => 'localhost',
+ ),
+ 'database_server' => array(
+ 'name' => 'db_server',
+ 'default' => 'localhost',
+ 'validate' => 'isGenericName',
+ 'alias' => 'h',
+ ),
+ 'database_login' => array(
+ 'name' => 'db_user',
+ 'alias' => 'u',
+ 'default' => 'root',
+ 'validate' => 'isGenericName',
+ ),
+ 'database_password' => array(
+ 'name' => 'db_password',
+ 'alias' => 'p',
+ 'default' => '',
+ ),
+ 'database_name' => array(
+ 'name' => 'db_name',
+ 'alias' => 'd',
+ 'default' => 'prestashop',
+ 'validate' => 'isGenericName',
+ ),
+ 'database_clear' => array(
+ 'name' => 'db_clear',
+ 'default' => '1',
+ 'validate' => 'isInt',
+ 'help' => 'Drop existing tables'
+ ),
+ 'database_prefix' => array(
+ 'name' => 'prefix',
+ 'default' => 'ps_',
+ 'validate' => 'isGenericName',
+ ),
+ 'database_engine' => array(
+ 'name' => 'engine',
+ 'validate' => 'isMySQLEngine',
+ 'default' => 'InnoDB',
+ 'help' => 'InnoDB/MyISAM',
+ ),
+ 'shop_name' => array(
+ 'name' => 'name',
+ 'validate' => 'isGenericName',
+ 'default' => 'PrestaShop',
+ ),
+ 'shop_activity' => array(
+ 'name' => 'activity',
+ 'default' => 0,
+ 'validate' => 'isInt',
+ ),
+ 'shop_country' => array(
+ 'name' => 'country',
+ 'validate' => 'isLanguageIsoCode',
+ 'default' => 'fr',
+ ),
+ 'admin_firstname' => array(
+ 'name' => 'firstname',
+ 'validate' => 'isName',
+ 'default' => 'John',
+ ),
+ 'admin_lastname' => array(
+ 'name' => 'lastname',
+ 'validate' => 'isName',
+ 'default' => 'Doe',
+ ),
+ 'admin_password' => array(
+ 'name' => 'password',
+ 'validate' => 'isPasswd',
+ 'default' => '0123456789',
+ ),
+ 'admin_email' => array(
+ 'name' => 'email',
+ 'validate' => 'isEmail',
+ 'default' => 'pub@prestashop.com'
+ ),
+ 'show_license' => array(
+ 'name' => 'license',
+ 'default' => 0,
+ 'help' => 'show PrestaShop license'
+ ),
+ 'newsletter' => array(
+ 'name' => 'newsletter',
+ 'default' => 1,
+ 'help' => 'get news from PrestaShop',
+ ),
+ );
+
+ protected $datas = array();
+
+ public function __get($key)
+ {
+ if (isset($this->datas[$key]))
+ return $this->datas[$key];
+
+ return false;
+ }
+
+ public function __set($key, $value)
+ {
+ $this->datas[$key] = $value;
+ }
+
+ public static function getInstance()
+ {
+ if (Datas::$instance === null)
+ Datas::$instance = new Datas();
+ return Datas::$instance;
+ }
+
+ public static function getArgs()
+ {
+ return Datas::$available_args;
+ }
+
+ public function getAndCheckArgs($argv)
+ {
+ if (!$argv)
+ return false;
+
+ $args_ok = array();
+ foreach ($argv as $arg)
+ {
+ if (!preg_match('/^--([^=\'"><|`]+)(?:=([^=\'"><|`]+)|(?!license))/i', trim($arg), $res))
+ continue;
+
+ if ($res[1] == 'license' && !isset($res[2]))
+ $res[2] = 1;
+ $args_ok[$res[1]] = $res[2];
+ }
+
+ $errors = array();
+ foreach (Datas::getArgs() as $key => $row)
+ {
+ if (isset($row['name']))
+ $name = $row['name'];
+ else
+ $name = $key;
+ if (!isset($args_ok[$name]))
+ {
+ if (!isset($row['default']))
+ $errors[] = 'Field '.$row['name'].' is empty';
+ else
+ $this->$key = $row['default'];
+ }
+ elseif (isset($row['validate']) && !call_user_func(array('Validate', $row['validate']), $args_ok[$name]))
+ $errors[] = 'Field '.$row['name'].' is not valid';
+ else
+ $this->$key = $args_ok[$name];
+ }
+
+ return count($errors) ? $errors : true;
+ }
+}
diff --git a/install-dev/controllers/console/process.php b/install-dev/controllers/console/process.php
new file mode 100644
index 000000000..346114ece
--- /dev/null
+++ b/install-dev/controllers/console/process.php
@@ -0,0 +1,288 @@
+
+* @copyright 2007-2013 PrestaShop SA
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+class InstallControllerConsoleProcess extends InstallControllerConsole
+{
+ const SETTINGS_FILE = 'config/settings.inc.php';
+
+ /**
+ * @var InstallModelInstall
+ */
+ protected $model_install;
+
+ public $process_steps = array();
+
+ public $previous_button = false;
+
+ public function init()
+ {
+ require_once _PS_INSTALL_MODELS_PATH_.'install.php';
+ require_once _PS_INSTALL_MODELS_PATH_.'database.php';
+ $this->model_install = new InstallModelInstall();
+ $this->model_database = new InstallModelDatabase();
+ }
+
+ /**
+ * @see InstallAbstractModel::processNextStep()
+ */
+ public function processNextStep()
+ {
+ }
+
+ /**
+ * @see InstallAbstractModel::validate()
+ */
+ public function validate()
+ {
+ return false;
+ }
+
+ public function initializeContext()
+ {
+ global $smarty;
+ // Clean all cache values
+ Cache::clean('*');
+
+ Context::getContext()->shop = new Shop(1);
+ Shop::setContext(Shop::CONTEXT_SHOP, 1);
+ Configuration::loadConfiguration();
+ if (!isset(Context::getContext()->language) || !Validate::isLoadedObject(Context::getContext()->language))
+ if ($id_lang = (int)Configuration::get('PS_LANG_DEFAULT'))
+ Context::getContext()->language = new Language($id_lang);
+ if (!isset(Context::getContext()->country) || !Validate::isLoadedObject(Context::getContext()->country))
+ if ($id_country = (int)Configuration::get('PS_COUNTRY_DEFAULT'))
+ Context::getContext()->country = new Country((int)$id_country);
+
+ Context::getContext()->cart = new Cart();
+ Context::getContext()->employee = new Employee(1);
+ if (!defined('_PS_SMARTY_FAST_LOAD_'))
+ define('_PS_SMARTY_FAST_LOAD_', true);
+ require_once _PS_ROOT_DIR_.'/config/smarty.config.inc.php';
+
+ Context::getContext()->smarty = $smarty;
+ }
+
+ public function process()
+ {
+ /*if (file_exists(_PS_ROOT_DIR_.'/'.self::SETTINGS_FILE))
+ @require_once _PS_ROOT_DIR_.'/'.self::SETTINGS_FILE;*/
+
+ if (!$this->processGenerateSettingsFile())
+ $this->printErrors();
+ if (!$this->model_database->testDatabaseSettings($this->datas->database_server, $this->datas->database_name, $this->datas->database_login, $this->datas->database_password, $this->datas->database_prefix, $this->datas->database_engine, $this->datas->database_clear))
+ $this->printErrors();
+ if (!$this->processInstallDatabase())
+ $this->printErrors();
+ if (!$this->processInstallDefaultData())
+ $this->printErrors();
+ if (!$this->processPopulateDatabase())
+ $this->printErrors();
+ if (!$this->processConfigureShop())
+ $this->printErrors();
+ if (!$this->processInstallModules())
+ $this->printErrors();
+ if (!$this->processInstallAddonsModules())
+ $this->printErrors();
+ if (!$this->processInstallFixtures())
+ $this->printErrors();
+ if (!$this->processInstallTheme())
+ $this->printErrors();
+ if (!$this->processSendEmail())
+ $this->printErrors();
+
+ $params = http_build_query(array(
+ 'email' => $this->datas->admin_email,
+ 'method' => 'addMemberToNewsletter',
+ 'language' => $this->datas->lang,
+ 'visitorType' => 1,
+ 'source' => 'installer'
+ ));
+ Tools::file_get_contents('http://www.prestashop.com/ajax/controller.php?'.$params);
+ }
+
+ /**
+ * PROCESS : generateSettingsFile
+ */
+ public function processGenerateSettingsFile()
+ {
+ return $this->model_install->generateSettingsFile(
+ $this->datas->database_server,
+ $this->datas->database_login,
+ $this->datas->database_password,
+ $this->datas->database_name,
+ $this->datas->database_prefix,
+ $this->datas->database_engine
+ );
+
+ }
+
+ /**
+ * PROCESS : installDatabase
+ * Create database structure
+ */
+ public function processInstallDatabase()
+ {
+ $this->initializeContext();
+ return $this->model_install->installDatabase($this->datas->database_clear);
+ }
+
+ /**
+ * PROCESS : installDefaultData
+ * Create default shop and languages
+ */
+ public function processInstallDefaultData()
+ {
+ $this->initializeContext();
+ return $this->model_install->installDefaultData($this->datas->shop_name, true);
+ }
+
+ /**
+ * PROCESS : populateDatabase
+ * Populate database with default data
+ */
+ public function processPopulateDatabase()
+ {
+ $this->initializeContext();
+
+ $this->model_install->xml_loader_ids = $this->datas->xml_loader_ids;
+ $result = $this->model_install->populateDatabase();
+ $this->datas->xml_loader_ids = $this->model_install->xml_loader_ids;
+ return $result;
+ }
+
+ /**
+ * PROCESS : configureShop
+ * Set default shop configuration
+ */
+ public function processConfigureShop()
+ {
+ $this->initializeContext();
+
+ return $this->model_install->configureShop(array(
+ 'shop_name' => $this->datas->shop_name,
+ 'shop_activity' => $this->datas->shop_activity,
+ 'shop_country' => $this->datas->shop_country,
+ 'shop_timezone' => $this->datas->timezone,
+ 'use_smtp' => false,
+ 'smtp_server' => null,
+ 'smtp_login' => null,
+ 'smtp_password' => null,
+ 'smtp_encryption' => null,
+ 'smtp_port' => null,
+ 'admin_firstname' => $this->datas->admin_firstname,
+ 'admin_lastname' => $this->datas->admin_lastname,
+ 'admin_password' => $this->datas->admin_password,
+ 'admin_email' => $this->datas->admin_email,
+ 'configuration_agrement' => true,
+ ));
+
+ }
+
+ /**
+ * PROCESS : installModules
+ * Install all modules in ~/modules/ directory
+ */
+ public function processInstallModules()
+ {
+ $this->initializeContext();
+
+ return $this->model_install->installModules();
+ }
+
+ /**
+ * PROCESS : installFixtures
+ * Install fixtures (E.g. demo products)
+ */
+ public function processInstallFixtures()
+ {
+ $this->initializeContext();
+
+ $this->model_install->xml_loader_ids = $this->datas->xml_loader_ids;
+ $result = $this->model_install->installFixtures();
+ $this->datas->xml_loader_ids = $this->model_install->xml_loader_ids;
+ return $result;
+ }
+
+ /**
+ * PROCESS : installTheme
+ * Install theme
+ */
+ public function processInstallTheme()
+ {
+ $this->initializeContext();
+
+ return $this->model_install->installTheme();
+ }
+
+ /**
+ * PROCESS : sendEmail
+ * Send information e-mail
+ */
+ public function processSendEmail()
+ {
+ require_once _PS_INSTALL_MODELS_PATH_.'mail.php';
+ $mail = new InstallModelMail(
+ $this->datas->use_smtp,
+ $this->datas->smtp_server,
+ $this->datas->smtp_login,
+ $this->datas->smtp_password,
+ $this->datas->smtp_port,
+ $this->datas->smtp_encryption,
+ $this->datas->admin_email
+ );
+
+ if (file_exists(_PS_INSTALL_LANGS_PATH_.$this->language->getLanguageIso().'/mail_identifiers.txt'))
+ $content = file_get_contents(_PS_INSTALL_LANGS_PATH_.$this->language->getLanguageIso().'/mail_identifiers.txt');
+ else
+ $content = file_get_contents(_PS_INSTALL_LANGS_PATH_.InstallLanguages::DEFAULT_ISO.'/mail_identifiers.txt');
+
+ $vars = array(
+ '{firstname}' => $this->datas->admin_firstname,
+ '{lastname}' => $this->datas->admin_lastname,
+ '{shop_name}' => $this->datas->shop_name,
+ '{passwd}' => $this->datas->admin_password,
+ '{email}' => $this->datas->admin_email,
+ '{shop_url}' => Tools::getHttpHost(true).__PS_BASE_URI__,
+ );
+ $content = str_replace(array_keys($vars), array_values($vars), $content);
+
+ $mail->send(
+ $this->l('%s - Login information', $this->datas->shop_name),
+ $content
+ );
+
+ return true;
+ }
+ /**
+ * PROCESS : installModulesAddons
+ * Install modules from addons
+ */
+ public function processInstallAddonsModules()
+ {
+ return $this->model_install->installModulesAddons();
+ }
+}
+
diff --git a/install-dev/controllers/http/configure.php b/install-dev/controllers/http/configure.php
index ce237f7a9..1b35a3a9f 100644
--- a/install-dev/controllers/http/configure.php
+++ b/install-dev/controllers/http/configure.php
@@ -227,28 +227,29 @@ class InstallControllerHttpConfigure extends InstallControllerHttp
{
// List of activities
$list_activities = array(
- $this->l('Lingerie and Adult'),
- $this->l('Animals and Pets'),
- $this->l('Art and Culture'),
- $this->l('Babies'),
- $this->l('Beauty and Personal Care'),
- $this->l('Cars'),
- $this->l('Computer Hardware and Software'),
- $this->l('Download'),
- $this->l('Fashion and accessories'),
- $this->l('Flowers, Gifts and Crafts'),
- $this->l('Food and beverage'),
- $this->l('HiFi, Photo and Video'),
- $this->l('Home and Garden'),
- $this->l('Home Appliances'),
- $this->l('Jewelry'),
- $this->l('Mobile and Telecom'),
- $this->l('Services'),
- $this->l('Shoes and accessories'),
- $this->l('Sports and Entertainment'),
- $this->l('Travel'),
+ 1 => $this->l('Lingerie and Adult'),
+ 2 => $this->l('Animals and Pets'),
+ 3 => $this->l('Art and Culture'),
+ 4 => $this->l('Babies'),
+ 5 => $this->l('Beauty and Personal Care'),
+ 6 => $this->l('Cars'),
+ 7 => $this->l('Computer Hardware and Software'),
+ 8 => $this->l('Download'),
+ 9 => $this->l('Fashion and accessories'),
+ 10 => $this->l('Flowers, Gifts and Crafts'),
+ 11 => $this->l('Food and beverage'),
+ 12 => $this->l('HiFi, Photo and Video'),
+ 13 => $this->l('Home and Garden'),
+ 14 => $this->l('Home Appliances'),
+ 15 => $this->l('Jewelry'),
+ 16 => $this->l('Mobile and Telecom'),
+ 17 => $this->l('Services'),
+ 18 => $this->l('Shoes and accessories'),
+ 19 => $this->l('Sports and Entertainment'),
+ 20 => $this->l('Travel'),
);
- sort($list_activities);
+
+ asort($list_activities);
$this->list_activities = $list_activities;
// Countries list
diff --git a/install-dev/controllers/http/process.php b/install-dev/controllers/http/process.php
index ff63be1f0..f9d98996f 100644
--- a/install-dev/controllers/http/process.php
+++ b/install-dev/controllers/http/process.php
@@ -66,7 +66,7 @@ class InstallControllerHttpProcess extends InstallControllerHttp
Shop::setContext(Shop::CONTEXT_SHOP, 1);
Configuration::loadConfiguration();
Context::getContext()->language = new Language(Configuration::get('PS_LANG_DEFAULT'));
- Context::getContext()->country = new Country('PS_COUNTRY_DEFAULT');
+ Context::getContext()->country = new Country(Configuration::get('PS_COUNTRY_DEFAULT'));
Context::getContext()->cart = new Cart();
Context::getContext()->employee = new Employee(1);
define('_PS_SMARTY_FAST_LOAD_', true);
@@ -95,7 +95,9 @@ class InstallControllerHttpProcess extends InstallControllerHttp
$this->processConfigureShop();
elseif (Tools::getValue('installModules') && !empty($this->session->process_validated['configureShop']))
$this->processInstallModules();
- elseif (Tools::getValue('installFixtures') && !empty($this->session->process_validated['installModules']))
+ elseif (Tools::getValue('installModulesAddons') && !empty($this->session->process_validated['installModules']))
+ $this->processInstallAddonsModules();
+ elseif (Tools::getValue('installFixtures') && !empty($this->session->process_validated['installModulesAddons']))
$this->processInstallFixtures();
elseif (Tools::getValue('installTheme') && !empty($this->session->process_validated['installModules']))
$this->processInstallTheme();
@@ -231,6 +233,23 @@ class InstallControllerHttpProcess extends InstallControllerHttp
$this->session->process_validated = array_merge($this->session->process_validated, array('installModules' => true));
$this->ajaxJsonAnswer(true);
}
+
+ /**
+ * PROCESS : installModulesAddons
+ * Install modules from addons
+ */
+ public function processInstallAddonsModules()
+ {
+ $this->initializeContext();
+ if ($module = Tools::getValue('module') && $id_module = Tools::getValue('id_module'))
+ $result = $this->model_install->installModulesAddons(array('name' => $module, 'id_module' => $id_module));
+ else
+ $result = $this->model_install->installModulesAddons();
+ if (!$result || $this->model_install->getErrors())
+ $this->ajaxJsonAnswer(false, $this->model_install->getErrors());
+ $this->session->process_validated = array_merge($this->session->process_validated, array('installModulesAddons' => true));
+ $this->ajaxJsonAnswer(true);
+ }
/**
* PROCESS : installFixtures
@@ -333,12 +352,24 @@ class InstallControllerHttpProcess extends InstallControllerHttp
$this->process_steps[] = $populate_step;
$this->process_steps[] = array('key' => 'configureShop', 'lang' => $this->l('Configure shop information'));
-
$install_modules = array('key' => 'installModules', 'lang' => $this->l('Install modules'));
if ($low_memory)
foreach ($this->model_install->getModulesList() as $module)
$install_modules['subtasks'][] = array('module' => $module);
$this->process_steps[] = $install_modules;
+
+ $install_modules = array('key' => 'installModulesAddons', 'lang' => $this->l('Install modules Addons'));
+
+ $params = array('iso_lang' => $this->language->getLanguageIso(),
+ 'iso_country' => $this->session->shop_country,
+ 'email' => $this->session->admin_email,
+ 'shop_url' => Tools::getHttpHost(),
+ 'version' => _PS_INSTALL_VERSION_);
+
+ if ($low_memory)
+ foreach ($this->model_install->getAddonsModulesList($params) as $module)
+ $install_modules['subtasks'][] = array('module' => (string)$module['name'], 'id_module' => (string)$module['id_module']);
+ $this->process_steps[] = $install_modules;
// Fixtures are installed only if option is selected
if ($this->session->install_type == 'full')
diff --git a/install-dev/controllers/http/system.php b/install-dev/controllers/http/system.php
index 84f652d64..4db6d3ce1 100644
--- a/install-dev/controllers/http/system.php
+++ b/install-dev/controllers/http/system.php
@@ -74,7 +74,6 @@ class InstallControllerHttpSystem extends InstallControllerHttp
if (!isset($this->tests['optional']))
$this->tests['optional'] = $this->model_system->checkOptionalTests();
- $session_path = @ini_get('session.save_path');
// Generate display array
$this->tests_render = array(
'required' => array(
@@ -87,7 +86,6 @@ class InstallControllerHttpSystem extends InstallControllerHttp
'system' => $this->l('Cannot create new files and folders'),
'gd' => $this->l('GD Library is not installed'),
'mysql_support' => $this->l('MySQL support is not activated'),
- 'sessions' => $this->l('Your PHP sessions path is not writable - check with your hosting provider:').' '.$session_path,
)
),
array(
@@ -139,5 +137,4 @@ class InstallControllerHttpSystem extends InstallControllerHttp
$this->displayTemplate('system');
}
-}
-
+}
\ No newline at end of file
diff --git a/install-dev/data/db_structure.sql b/install-dev/data/db_structure.sql
index 0166bb0ec..5a06fb9ac 100644
--- a/install-dev/data/db_structure.sql
+++ b/install-dev/data/db_structure.sql
@@ -144,7 +144,7 @@ CREATE TABLE `PREFIX_carrier` (
`max_width` int(10) DEFAULT 0,
`max_height` int(10) DEFAULT 0,
`max_depth` int(10) DEFAULT 0,
- `max_weight` int(10) DEFAULT 0,
+ `max_weight` DECIMAL(20,6) DEFAULT 0,
`grade` int(10) DEFAULT 0,
PRIMARY KEY (`id_carrier`),
KEY `deleted` (`deleted`,`active`),
diff --git a/install-dev/fixtures/apple/langs/br/data/attribute.xml b/install-dev/fixtures/apple/langs/br/data/attribute.xml
index 6c19c4704..09a95fe15 100644
--- a/install-dev/fixtures/apple/langs/br/data/attribute.xml
+++ b/install-dev/fixtures/apple/langs/br/data/attribute.xml
@@ -42,13 +42,13 @@
Black
-
+ 8Go
-
+ 16Go
-
+ 32Go
diff --git a/modules/gsitemap/translations/index.php b/install-dev/index_cli.php
similarity index 54%
rename from modules/gsitemap/translations/index.php
rename to install-dev/index_cli.php
index 3f6561f72..1dfee011f 100644
--- a/modules/gsitemap/translations/index.php
+++ b/install-dev/index_cli.php
@@ -4,10 +4,10 @@
*
* NOTICE OF LICENSE
*
-* This source file is subject to the Academic Free License (AFL 3.0)
+* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
-* http://opensource.org/licenses/afl-3.0.php
+* http://opensource.org/licenses/osl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
@@ -20,16 +20,22 @@
*
* @author PrestaShop SA
* @copyright 2007-2013 PrestaShop SA
-* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
-
-header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
-header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
-
-header("Cache-Control: no-store, no-cache, must-revalidate");
-header("Cache-Control: post-check=0, pre-check=0", false);
-header("Pragma: no-cache");
-
-header("Location: ../");
-exit;
\ No newline at end of file
+
+/* Redefine REQUEST_URI */
+$_SERVER['REQUEST_URI'] = '/install/index_cli.php';
+require_once dirname(__FILE__).'/init.php';
+require_once _PS_INSTALL_PATH_.'classes/datas.php';
+ini_set('memory_limit', '128M');
+try
+{
+ require_once _PS_INSTALL_PATH_.'classes/controllerConsole.php';
+ InstallControllerConsole::execute($argc, $argv);
+ echo '-- Installation successfull! --'."\n";
+}
+catch (PrestashopInstallerException $e)
+{
+ $e->displayMessage();
+}
diff --git a/install-dev/install_version.php b/install-dev/install_version.php
index 144b75cf7..5d86dc4df 100644
--- a/install-dev/install_version.php
+++ b/install-dev/install_version.php
@@ -24,4 +24,4 @@
* International Registered Trademark & Property of PrestaShop SA
*/
-define('_PS_INSTALL_VERSION_', '1.5.4.0');
+define('_PS_INSTALL_VERSION_', '1.5.4.1');
diff --git a/install-dev/langs/br/data/tab.xml b/install-dev/langs/br/data/tab.xml
index 92b02303f..818f33034 100644
--- a/install-dev/langs/br/data/tab.xml
+++ b/install-dev/langs/br/data/tab.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/install-dev/models/install.php b/install-dev/models/install.php
index 2d60d8ad6..ca62908fc 100644
--- a/install-dev/models/install.php
+++ b/install-dev/models/install.php
@@ -557,7 +557,6 @@ class InstallModelInstall extends InstallAbstractModel
'graphvisifire',
'graphxmlswfcharts',
'gridhtml',
- 'gsitemap',
'homefeatured',
'homeslider',
'pagesnotfound',
@@ -585,14 +584,13 @@ class InstallModelInstall extends InstallAbstractModel
'statsvisits',
);
}
-
return $modules;
}
- public function getAddonsModulesList()
+ public function getAddonsModulesList($params = array())
{
$addons_modules = array();
- $content = Tools::addonsRequest('install-modules');
+ $content = Tools::addonsRequest('install-modules', $params);
$xml = @simplexml_load_string($content, null, LIBXML_NOCDATA);
if ($xml !== false and isset($xml->module))
@@ -602,18 +600,16 @@ class InstallModelInstall extends InstallAbstractModel
return $addons_modules;
}
-
/**
* PROCESS : installModules
* Download module from addons and Install all modules in ~/modules/ directory
*/
- public function installModules($module = null)
+ public function installModulesAddons($module = null)
{
- $modules = $module ? array($module) : $this->getModulesList();
+ $addons_modules = $module ? array($module) : $this->getAddonsModulesList();
+ $modules = array();
if (!InstallSession::getInstance()->safe_mode)
{
- $addons_modules = $this->getAddonsModulesList();
-
foreach($addons_modules as $addons_module)
if (file_put_contents(_PS_MODULE_DIR_.$addons_module['name'].'.zip', Tools::addonsRequest('module', array('id_module' => $addons_module['id_module']))))
if (Tools::ZipExtract(_PS_MODULE_DIR_.$addons_module['name'].'.zip', _PS_MODULE_DIR_))
@@ -622,6 +618,26 @@ class InstallModelInstall extends InstallAbstractModel
unlink(_PS_MODULE_DIR_.$addons_module['name'].'.zip');
}
}
+ $errors = array();
+ foreach ($modules as $module_name)
+ $this->installModules($module_name);
+
+ if ($errors)
+ {
+ $this->setError($errors);
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * PROCESS : installModules
+ * Download module from addons and Install all modules in ~/modules/ directory
+ */
+ public function installModules($module = null)
+ {
+ $modules = $module ? array($module) : $this->getModulesList();
+
$errors = array();
foreach ($modules as $module_name)
{
@@ -634,7 +650,7 @@ class InstallModelInstall extends InstallAbstractModel
}
if ($errors)
- {
+ {
$this->setError($errors);
return false;
}
diff --git a/install-dev/theme/views/configure.phtml b/install-dev/theme/views/configure.phtml
index ff9b6f95c..c67b110e7 100644
--- a/install-dev/theme/views/configure.phtml
+++ b/install-dev/theme/views/configure.phtml
@@ -26,7 +26,7 @@ var default_iso = 'session->shop_country ?>';
diff --git a/install-dev/theme/views/license.phtml b/install-dev/theme/views/license.phtml
index 71d63d5be..ca0089b63 100644
--- a/install-dev/theme/views/license.phtml
+++ b/install-dev/theme/views/license.phtml
@@ -4,59 +4,7 @@
l('License Agreements') ?>
l('To enjoy the many features that are offered by PrestaShop, please read the license terms below. PrestaShop core is licensed under OSL 3.0, while the modules and themes are licensed under AFL 3.0.') ?>
-
Core: Open Software License ("OSL") v. 3.0
-
This Open Software License (the "License") applies to any original work of authorship (the "Original Work") whose owner (the "Licensor") has placed the following licensing notice adjacent to the copyright notice for the Original Work:
-
Licensed under the Open Software License version 3.0
-
1. Grant of Copyright License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, for the duration of the copyright, to do the following:
-
-
to reproduce the Original Work in copies, either alone or as part of a collective work
-
to translate, adapt, alter, transform, modify, or arrange the Original Work, thereby creating derivative works ("Derivative Works") based upon the Original Work
-
to distribute or communicate copies of the Original Work and Derivative Works to the public, with the proviso that copies of Original Work or Derivative Works that You distribute or communicate shall be licensed under this Open Software License
-
to perform the Original Work publicly
-
to display the Original Work publicly
-
-
2. Grant of Patent License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, under patent claims owned or controlled by the Licensor that are embodied in the Original Work as furnished by the Licensor, for the duration of the patents, to make, use, sell, offer for sale, have made, and import the Original Work and Derivative Works.
-
3. Grant of Source Code License. The term "Source Code" means the preferred form of the Original Work for making modifications to it and all available documentation describing how to modify the Original Work. Licensor agrees to provide a machine-readable copy of the Source Code of the Original Work along with each copy of the Original Work that Licensor distributes. Licensor reserves the right to satisfy this obligation by placing a machine-readable copy of the Source Code in an information repository reasonably calculated to permit inexpensive and convenient access by You for as long as Licensor continues to distribute the Original Work.
-
4. Exclusions From License Grant. Neither the names of Licensor, nor the names of any contributors to the Original Work, nor any of their trademarks or service marks, may be used to endorse or promote products derived from this Original Work without express prior permission of the Licensor. Except as expressly stated herein, nothing in this License grants any license to Licensor's trademarks, copyrights, patents, trade secrets or any other intellectual property. No patent license is granted to make, use, sell, offer for sale, have made, or import embodiments of any patent claims other than the licensed claims defined in Section 2. No license is granted to the trademarks of Licensor even if such marks are included in the Original Work. Nothing in this License shall be interpreted to prohibit Licensor from licensing under terms different from this License any Original Work that Licensor otherwise would have a right to license.
-
5. External Deployment. The term "External Deployment" means the use, distribution, or communication of the Original Work or Derivative Works in any way such that the Original Work or Derivative Works may be used by anyone other than You, whether those works are distributed or communicated to those persons or made available as an application intended for use over a network. As an express condition for the grants of license hereunder, You must treat any External Deployment by You of the Original Work or a Derivative Work as a distribution under section 1(c).
-
6. Attribution Rights. You must retain, in the Source Code of any Derivative Works that You create, all copyright, patent, or trademark notices from the Source Code of the Original Work, as well as any notices of licensing and any descriptive text identified therein as an "Attribution Notice." You must cause the Source Code for any Derivative Works that You create to carry a prominent Attribution Notice reasonably calculated to inform recipients that You have modified the Original Work.
-
7. Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that the copyright in and to the Original Work and the patent rights granted herein by Licensor are owned by the Licensor or are sublicensed to You under the terms of this License with the permission of the contributor(s) of those copyrights and patent rights. Except as expressly stated in the immediately preceding sentence, the Original Work is provided under this License on an "AS IS" BASIS and WITHOUT WARRANTY, either express or implied, including, without limitation, the warranties of non-infringement, merchantability or fitness for a particular purpose. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No license to the Original Work is granted by this License except under this disclaimer.
-
8. Limitation of Liability. Under no circumstances and under no legal theory, whether in tort (including negligence), contract, or otherwise, shall the Licensor be liable to anyone for any indirect, special, incidental, or consequential damages of any character arising as a result of this License or the use of the Original Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses. This limitation of liability shall not apply to the extent applicable law prohibits such limitation.
-
9. Acceptance and Termination. If, at any time, You expressly assented to this License, that assent indicates your clear and irrevocable acceptance of this License and all of its terms and conditions. If You distribute or communicate copies of the Original Work or a Derivative Work, You must make a reasonable effort under the circumstances to obtain the express assent of recipients to the terms of this License. This License conditions your rights to undertake the activities listed in Section 1, including your right to create Derivative Works based upon the Original Work, and doing so without honoring these terms and conditions is prohibited by copyright law and international treaty. Nothing in this License is intended to affect copyright exceptions and limitations (including 'fair use' or 'fair dealing'). This License shall terminate immediately and You may no longer exercise any of the rights granted to You by this License upon your failure to honor the conditions in Section 1(c).
-
10. Termination for Patent Action. This License shall terminate automatically and You may no longer exercise any of the rights granted to You by this License as of the date You commence an action, including a cross-claim or counterclaim, against Licensor or any licensee alleging that the Original Work infringes a patent. This termination provision shall not apply for an action alleging patent infringement by combinations of the Original Work with other software or hardware.
-
11. Jurisdiction, Venue and Governing Law. Any action or suit relating to this License may be brought only in the courts of a jurisdiction wherein the Licensor resides or in which Licensor conducts its primary business, and under the laws of that jurisdiction excluding its conflict-of-law provisions. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any use of the Original Work outside the scope of this License or after its termination shall be subject to the requirements and penalties of copyright or patent law in the appropriate jurisdiction. This section shall survive the termination of this License.
-
12. Attorneys Fees. In any action to enforce the terms of this License or seeking damages relating thereto, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. This section shall survive the termination of this License.
-
13. Miscellaneous. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable.
-
14. Definition of "You" in This License. "You" throughout this License, whether in upper or lower case, means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with you. For purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
-
15. Right to Use. You may use the Original Work in all ways not otherwise restricted or conditioned by this License or by law, and Licensor promises not to interfere with or be responsible for such uses by You.
Modules and Themes: Academic Free License ("AFL") v. 3.0
-
This Academic Free License (the "License") applies to any original work of authorship (the "Original Work") whose owner (the "Licensor") has placed the following licensing notice adjacent to the copyright notice for the Original Work:
-
Licensed under the Academic Free License version 3.0
-
1. Grant of Copyright License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, for the duration of the copyright, to do the following:
-
-
to reproduce the Original Work in copies, either alone or as part of a collective work;
-
to translate, adapt, alter, transform, modify, or arrange the Original Work, thereby creating derivative works ("Derivative Works") based upon the Original Work;
-
to distribute or communicate copies of the Original Work and Derivative Works to the public, under any license of your choice that does not contradict the terms and conditions, including Licensor's reserved rights and remedies, in this Academic Free License;
-
to perform the Original Work publicly; and
-
to display the Original Work publicly.
-
-
2. Grant of Patent License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, under patent claims owned or controlled by the Licensor that are embodied in the Original Work as furnished by the Licensor, for the duration of the patents, to make, use, sell, offer for sale, have made, and import the Original Work and Derivative Works.
-
3. Grant of Source Code License. The term "Source Code" means the preferred form of the Original Work for making modifications to it and all available documentation describing how to modify the Original Work. Licensor agrees to provide a machine-readable copy of the Source Code of the Original Work along with each copy of the Original Work that Licensor distributes. Licensor reserves the right to satisfy this obligation by placing a machine-readable copy of the Source Code in an information repository reasonably calculated to permit inexpensive and convenient access by You for as long as Licensor continues to distribute the Original Work.
-
4. Exclusions From License Grant. Neither the names of Licensor, nor the names of any contributors to the Original Work, nor any of their trademarks or service marks, may be used to endorse or promote products derived from this Original Work without express prior permission of the Licensor. Except as expressly stated herein, nothing in this License grants any license to Licensor's trademarks, copyrights, patents, trade secrets or any other intellectual property. No patent license is granted to make, use, sell, offer for sale, have made, or import embodiments of any patent claims other than the licensed claims defined in Section 2. No license is granted to the trademarks of Licensor even if such marks are included in the Original Work. Nothing in this License shall be interpreted to prohibit Licensor from licensing under terms different from this License any Original Work that Licensor otherwise would have a right to license.
-
5. External Deployment. The term "External Deployment" means the use, distribution, or communication of the Original Work or Derivative Works in any way such that the Original Work or Derivative Works may be used by anyone other than You, whether those works are distributed or communicated to those persons or made available as an application intended for use over a network. As an express condition for the grants of license hereunder, You must treat any External Deployment by You of the Original Work or a Derivative Work as a distribution under section 1(c).
-
6. Attribution Rights. You must retain, in the Source Code of any Derivative Works that You create, all copyright, patent, or trademark notices from the Source Code of the Original Work, as well as any notices of licensing and any descriptive text identified therein as an "Attribution Notice." You must cause the Source Code for any Derivative Works that You create to carry a prominent Attribution Notice reasonably calculated to inform recipients that You have modified the Original Work.
-
7. Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that the copyright in and to the Original Work and the patent rights granted herein by Licensor are owned by the Licensor or are sublicensed to You under the terms of this License with the permission of the contributor(s) of those copyrights and patent rights. Except as expressly stated in the immediately preceding sentence, the Original Work is provided under this License on an "AS IS" BASIS and WITHOUT WARRANTY, either express or implied, including, without limitation, the warranties of non-infringement, merchantability or fitness for a particular purpose. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No license to the Original Work is granted by this License except under this disclaimer.
-
8. Limitation of Liability. Under no circumstances and under no legal theory, whether in tort (including negligence), contract, or otherwise, shall the Licensor be liable to anyone for any indirect, special, incidental, or consequential damages of any character arising as a result of this License or the use of the Original Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses. This limitation of liability shall not apply to the extent applicable law prohibits such limitation.
-
9. Acceptance and Termination. If, at any time, You expressly assented to this License, that assent indicates your clear and irrevocable acceptance of this License and all of its terms and conditions. If You distribute or communicate copies of the Original Work or a Derivative Work, You must make a reasonable effort under the circumstances to obtain the express assent of recipients to the terms of this License. This License conditions your rights to undertake the activities listed in Section 1, including your right to create Derivative Works based upon the Original Work, and doing so without honoring these terms and conditions is prohibited by copyright law and international treaty. Nothing in this License is intended to affect copyright exceptions and limitations (including "fair use" or "fair dealing"). This License shall terminate immediately and You may no longer exercise any of the rights granted to You by this License upon your failure to honor the conditions in Section 1(c).
-
10. Termination for Patent Action. This License shall terminate automatically and You may no longer exercise any of the rights granted to You by this License as of the date You commence an action, including a cross-claim or counterclaim, against Licensor or any licensee alleging that the Original Work infringes a patent. This termination provision shall not apply for an action alleging patent infringement by combinations of the Original Work with other software or hardware.
-
11. Jurisdiction, Venue and Governing Law. Any action or suit relating to this License may be brought only in the courts of a jurisdiction wherein the Licensor resides or in which Licensor conducts its primary business, and under the laws of that jurisdiction excluding its conflict-of-law provisions. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any use of the Original Work outside the scope of this License or after its termination shall be subject to the requirements and penalties of copyright or patent law in the appropriate jurisdiction. This section shall survive the termination of this License.
-
12. Attorneys' Fees. In any action to enforce the terms of this License or seeking damages relating thereto, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. This section shall survive the termination of this License.
-
13. Miscellaneous. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable.
-
14. Definition of "You" in This License. "You" throughout this License, whether in upper or lower case, means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with you. For purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
-
15. Right to Use. You may use the Original Work in all ways not otherwise restricted or conditioned by this License or by law, and Licensor promises not to interfere with or be responsible for such uses by You.
diff --git a/install-dev/theme/views/license_content.phtml b/install-dev/theme/views/license_content.phtml
new file mode 100644
index 000000000..0ca4d805e
--- /dev/null
+++ b/install-dev/theme/views/license_content.phtml
@@ -0,0 +1,53 @@
+
Core: Open Software License ("OSL") v. 3.0
+
This Open Software License (the "License") applies to any original work of authorship (the "Original Work") whose owner (the "Licensor") has placed the following licensing notice adjacent to the copyright notice for the Original Work:
+
Licensed under the Open Software License version 3.0
+
1. Grant of Copyright License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, for the duration of the copyright, to do the following:
+
+
to reproduce the Original Work in copies, either alone or as part of a collective work
+
to translate, adapt, alter, transform, modify, or arrange the Original Work, thereby creating derivative works ("Derivative Works") based upon the Original Work
+
to distribute or communicate copies of the Original Work and Derivative Works to the public, with the proviso that copies of Original Work or Derivative Works that You distribute or communicate shall be licensed under this Open Software License
+
to perform the Original Work publicly
+
to display the Original Work publicly
+
+
2. Grant of Patent License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, under patent claims owned or controlled by the Licensor that are embodied in the Original Work as furnished by the Licensor, for the duration of the patents, to make, use, sell, offer for sale, have made, and import the Original Work and Derivative Works.
+
3. Grant of Source Code License. The term "Source Code" means the preferred form of the Original Work for making modifications to it and all available documentation describing how to modify the Original Work. Licensor agrees to provide a machine-readable copy of the Source Code of the Original Work along with each copy of the Original Work that Licensor distributes. Licensor reserves the right to satisfy this obligation by placing a machine-readable copy of the Source Code in an information repository reasonably calculated to permit inexpensive and convenient access by You for as long as Licensor continues to distribute the Original Work.
+
4. Exclusions From License Grant. Neither the names of Licensor, nor the names of any contributors to the Original Work, nor any of their trademarks or service marks, may be used to endorse or promote products derived from this Original Work without express prior permission of the Licensor. Except as expressly stated herein, nothing in this License grants any license to Licensor's trademarks, copyrights, patents, trade secrets or any other intellectual property. No patent license is granted to make, use, sell, offer for sale, have made, or import embodiments of any patent claims other than the licensed claims defined in Section 2. No license is granted to the trademarks of Licensor even if such marks are included in the Original Work. Nothing in this License shall be interpreted to prohibit Licensor from licensing under terms different from this License any Original Work that Licensor otherwise would have a right to license.
+
5. External Deployment. The term "External Deployment" means the use, distribution, or communication of the Original Work or Derivative Works in any way such that the Original Work or Derivative Works may be used by anyone other than You, whether those works are distributed or communicated to those persons or made available as an application intended for use over a network. As an express condition for the grants of license hereunder, You must treat any External Deployment by You of the Original Work or a Derivative Work as a distribution under section 1(c).
+
6. Attribution Rights. You must retain, in the Source Code of any Derivative Works that You create, all copyright, patent, or trademark notices from the Source Code of the Original Work, as well as any notices of licensing and any descriptive text identified therein as an "Attribution Notice." You must cause the Source Code for any Derivative Works that You create to carry a prominent Attribution Notice reasonably calculated to inform recipients that You have modified the Original Work.
+
7. Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that the copyright in and to the Original Work and the patent rights granted herein by Licensor are owned by the Licensor or are sublicensed to You under the terms of this License with the permission of the contributor(s) of those copyrights and patent rights. Except as expressly stated in the immediately preceding sentence, the Original Work is provided under this License on an "AS IS" BASIS and WITHOUT WARRANTY, either express or implied, including, without limitation, the warranties of non-infringement, merchantability or fitness for a particular purpose. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No license to the Original Work is granted by this License except under this disclaimer.
+
8. Limitation of Liability. Under no circumstances and under no legal theory, whether in tort (including negligence), contract, or otherwise, shall the Licensor be liable to anyone for any indirect, special, incidental, or consequential damages of any character arising as a result of this License or the use of the Original Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses. This limitation of liability shall not apply to the extent applicable law prohibits such limitation.
+
9. Acceptance and Termination. If, at any time, You expressly assented to this License, that assent indicates your clear and irrevocable acceptance of this License and all of its terms and conditions. If You distribute or communicate copies of the Original Work or a Derivative Work, You must make a reasonable effort under the circumstances to obtain the express assent of recipients to the terms of this License. This License conditions your rights to undertake the activities listed in Section 1, including your right to create Derivative Works based upon the Original Work, and doing so without honoring these terms and conditions is prohibited by copyright law and international treaty. Nothing in this License is intended to affect copyright exceptions and limitations (including 'fair use' or 'fair dealing'). This License shall terminate immediately and You may no longer exercise any of the rights granted to You by this License upon your failure to honor the conditions in Section 1(c).
+
10. Termination for Patent Action. This License shall terminate automatically and You may no longer exercise any of the rights granted to You by this License as of the date You commence an action, including a cross-claim or counterclaim, against Licensor or any licensee alleging that the Original Work infringes a patent. This termination provision shall not apply for an action alleging patent infringement by combinations of the Original Work with other software or hardware.
+
11. Jurisdiction, Venue and Governing Law. Any action or suit relating to this License may be brought only in the courts of a jurisdiction wherein the Licensor resides or in which Licensor conducts its primary business, and under the laws of that jurisdiction excluding its conflict-of-law provisions. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any use of the Original Work outside the scope of this License or after its termination shall be subject to the requirements and penalties of copyright or patent law in the appropriate jurisdiction. This section shall survive the termination of this License.
+
12. Attorneys Fees. In any action to enforce the terms of this License or seeking damages relating thereto, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. This section shall survive the termination of this License.
+
13. Miscellaneous. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable.
+
14. Definition of "You" in This License. "You" throughout this License, whether in upper or lower case, means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with you. For purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
+
15. Right to Use. You may use the Original Work in all ways not otherwise restricted or conditioned by this License or by law, and Licensor promises not to interfere with or be responsible for such uses by You.
Modules and Themes: Academic Free License ("AFL") v. 3.0
+
This Academic Free License (the "License") applies to any original work of authorship (the "Original Work") whose owner (the "Licensor") has placed the following licensing notice adjacent to the copyright notice for the Original Work:
+
Licensed under the Academic Free License version 3.0
+
1. Grant of Copyright License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, for the duration of the copyright, to do the following:
+
+
to reproduce the Original Work in copies, either alone or as part of a collective work;
+
to translate, adapt, alter, transform, modify, or arrange the Original Work, thereby creating derivative works ("Derivative Works") based upon the Original Work;
+
to distribute or communicate copies of the Original Work and Derivative Works to the public, under any license of your choice that does not contradict the terms and conditions, including Licensor's reserved rights and remedies, in this Academic Free License;
+
to perform the Original Work publicly; and
+
to display the Original Work publicly.
+
+
2. Grant of Patent License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, under patent claims owned or controlled by the Licensor that are embodied in the Original Work as furnished by the Licensor, for the duration of the patents, to make, use, sell, offer for sale, have made, and import the Original Work and Derivative Works.
+
3. Grant of Source Code License. The term "Source Code" means the preferred form of the Original Work for making modifications to it and all available documentation describing how to modify the Original Work. Licensor agrees to provide a machine-readable copy of the Source Code of the Original Work along with each copy of the Original Work that Licensor distributes. Licensor reserves the right to satisfy this obligation by placing a machine-readable copy of the Source Code in an information repository reasonably calculated to permit inexpensive and convenient access by You for as long as Licensor continues to distribute the Original Work.
+
4. Exclusions From License Grant. Neither the names of Licensor, nor the names of any contributors to the Original Work, nor any of their trademarks or service marks, may be used to endorse or promote products derived from this Original Work without express prior permission of the Licensor. Except as expressly stated herein, nothing in this License grants any license to Licensor's trademarks, copyrights, patents, trade secrets or any other intellectual property. No patent license is granted to make, use, sell, offer for sale, have made, or import embodiments of any patent claims other than the licensed claims defined in Section 2. No license is granted to the trademarks of Licensor even if such marks are included in the Original Work. Nothing in this License shall be interpreted to prohibit Licensor from licensing under terms different from this License any Original Work that Licensor otherwise would have a right to license.
+
5. External Deployment. The term "External Deployment" means the use, distribution, or communication of the Original Work or Derivative Works in any way such that the Original Work or Derivative Works may be used by anyone other than You, whether those works are distributed or communicated to those persons or made available as an application intended for use over a network. As an express condition for the grants of license hereunder, You must treat any External Deployment by You of the Original Work or a Derivative Work as a distribution under section 1(c).
+
6. Attribution Rights. You must retain, in the Source Code of any Derivative Works that You create, all copyright, patent, or trademark notices from the Source Code of the Original Work, as well as any notices of licensing and any descriptive text identified therein as an "Attribution Notice." You must cause the Source Code for any Derivative Works that You create to carry a prominent Attribution Notice reasonably calculated to inform recipients that You have modified the Original Work.
+
7. Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that the copyright in and to the Original Work and the patent rights granted herein by Licensor are owned by the Licensor or are sublicensed to You under the terms of this License with the permission of the contributor(s) of those copyrights and patent rights. Except as expressly stated in the immediately preceding sentence, the Original Work is provided under this License on an "AS IS" BASIS and WITHOUT WARRANTY, either express or implied, including, without limitation, the warranties of non-infringement, merchantability or fitness for a particular purpose. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No license to the Original Work is granted by this License except under this disclaimer.
+
8. Limitation of Liability. Under no circumstances and under no legal theory, whether in tort (including negligence), contract, or otherwise, shall the Licensor be liable to anyone for any indirect, special, incidental, or consequential damages of any character arising as a result of this License or the use of the Original Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses. This limitation of liability shall not apply to the extent applicable law prohibits such limitation.
+
9. Acceptance and Termination. If, at any time, You expressly assented to this License, that assent indicates your clear and irrevocable acceptance of this License and all of its terms and conditions. If You distribute or communicate copies of the Original Work or a Derivative Work, You must make a reasonable effort under the circumstances to obtain the express assent of recipients to the terms of this License. This License conditions your rights to undertake the activities listed in Section 1, including your right to create Derivative Works based upon the Original Work, and doing so without honoring these terms and conditions is prohibited by copyright law and international treaty. Nothing in this License is intended to affect copyright exceptions and limitations (including "fair use" or "fair dealing"). This License shall terminate immediately and You may no longer exercise any of the rights granted to You by this License upon your failure to honor the conditions in Section 1(c).
+
10. Termination for Patent Action. This License shall terminate automatically and You may no longer exercise any of the rights granted to You by this License as of the date You commence an action, including a cross-claim or counterclaim, against Licensor or any licensee alleging that the Original Work infringes a patent. This termination provision shall not apply for an action alleging patent infringement by combinations of the Original Work with other software or hardware.
+
11. Jurisdiction, Venue and Governing Law. Any action or suit relating to this License may be brought only in the courts of a jurisdiction wherein the Licensor resides or in which Licensor conducts its primary business, and under the laws of that jurisdiction excluding its conflict-of-law provisions. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any use of the Original Work outside the scope of this License or after its termination shall be subject to the requirements and penalties of copyright or patent law in the appropriate jurisdiction. This section shall survive the termination of this License.
+
12. Attorneys' Fees. In any action to enforce the terms of this License or seeking damages relating thereto, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. This section shall survive the termination of this License.
+
13. Miscellaneous. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable.
+
14. Definition of "You" in This License. "You" throughout this License, whether in upper or lower case, means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with you. For purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
+
15. Right to Use. You may use the Original Work in all ways not otherwise restricted or conditioned by this License or by law, and Licensor promises not to interfere with or be responsible for such uses by You.
\ No newline at end of file
diff --git a/install-dev/theme/views/process.phtml b/install-dev/theme/views/process.phtml
index 67b1e4320..3383edae2 100644
--- a/install-dev/theme/views/process.phtml
+++ b/install-dev/theme/views/process.phtml
@@ -75,7 +75,7 @@ var process_steps = process_steps) ?>;
-
-
+
@@ -18,7 +17,8 @@
{/if}
-
+
+
{/if}
\ No newline at end of file
diff --git a/modules/blockviewed/blockviewed.php b/modules/blockviewed/blockviewed.php
index d7cd1aed0..0ea240300 100644
--- a/modules/blockviewed/blockviewed.php
+++ b/modules/blockviewed/blockviewed.php
@@ -103,16 +103,16 @@ class BlockViewed extends Module
$productsImages = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
SELECT image_shop.id_image, p.id_product, il.legend, product_shop.active, pl.name, pl.description_short, pl.link_rewrite, cl.link_rewrite AS category_rewrite
FROM '._DB_PREFIX_.'product p
- LEFT JOIN '._DB_PREFIX_.'product_lang pl ON (pl.id_product = p.id_product'.Shop::addSqlRestrictionOnLang('pl').')
- LEFT JOIN '._DB_PREFIX_.'image i ON (i.id_product = p.id_product AND i.cover = 1)'.
- Shop::addSqlAssociation('image', 'i', false, 'image_shop.cover=1').'
- LEFT JOIN '._DB_PREFIX_.'image_lang il ON (il.id_image = i.id_image)
'.Shop::addSqlAssociation('product', 'p').'
+ LEFT JOIN '._DB_PREFIX_.'product_lang pl ON (pl.id_product = p.id_product'.Shop::addSqlRestrictionOnLang('pl').')
+ LEFT JOIN '._DB_PREFIX_.'image i ON (i.id_product = p.id_product)'.
+ Shop::addSqlAssociation('image', 'i', false, 'image_shop.cover=1').'
+ LEFT JOIN '._DB_PREFIX_.'image_lang il ON (il.id_image = i.id_image)
LEFT JOIN '._DB_PREFIX_.'category_lang cl ON (cl.id_category = product_shop.id_category_default'.Shop::addSqlRestrictionOnLang('cl').')
WHERE p.id_product IN ('.$productIds.')
- AND (i.id_image IS NULL OR image_shop.id_shop='.(int)$this->context->shop->id.')
AND pl.id_lang = '.(int)($params['cookie']->id_lang).'
- AND cl.id_lang = '.(int)($params['cookie']->id_lang)
+ AND cl.id_lang = '.(int)($params['cookie']->id_lang).'
+ GROUP BY product_shop.id_product'
);
$productsImagesArray = array();
diff --git a/modules/blockwishlist/mails/en/wishlink.html b/modules/blockwishlist/mails/en/wishlink.html
index 6089277f2..d82bfb660 100644
--- a/modules/blockwishlist/mails/en/wishlink.html
+++ b/modules/blockwishlist/mails/en/wishlink.html
@@ -20,7 +20,7 @@