// REVERT MERGE

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7761 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rMalie
2011-07-27 13:35:06 +00:00
parent e159c925d8
commit be4811aa6e
182 changed files with 1335 additions and 6181 deletions
-91
View File
@@ -1,91 +0,0 @@
<?php
/*
* 2007-2011 PrestaShop
*
* NOTICE OF LICENSE
*
* 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/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.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2011 PrestaShop SA
* @version Release: $Revision$
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
define('_PS_ADMIN_DIR_', getcwd());
define('PS_ADMIN_DIR', _PS_ADMIN_DIR_); // Retro-compatibility
include(_PS_ADMIN_DIR_.'/../config/config.inc.php');
include(_PS_ADMIN_DIR_.'/functions.php');
include(_PS_ADMIN_DIR_.'/init.php');
if (empty($tab) and !sizeof($_POST))
{
$tab = 'AdminHome';
$_POST['tab'] = 'AdminHome';
$_POST['token'] = Tools::getAdminTokenLite($tab);
}
if ($id_tab = checkingTab($tab))
{
$isoUser = Language::getIsoById(intval($cookie->id_lang));
if (Validate::isLoadedObject($adminObj))
{
$adminObj->ajax = true;
if ($adminObj->checkToken())
{
// the differences with index.php is here
$adminObj->ajaxPreProcess();
$action = Tools::getValue('action');
// no need to use displayConf() here
if (!empty($action) AND method_exists($adminObj, 'ajaxProcess'.Tools::toCamelCase($action)) )
$adminObj->{'ajaxProcess'.Tools::toCamelCase($action)}();
else
$adminObj->ajaxProcess();
// @TODO We should use a displayAjaxError
$adminObj->displayErrors();
if (!empty($action) AND method_exists($adminObj, 'displayAjax'.Tools::toCamelCase($action)) )
$adminObj->{'displayAjax'.$action}();
else
$adminObj->displayAjax();
}
else
{
// If this is an XSS attempt, then we should only display a simple, secure page
ob_clean();
// ${1} in the replacement string of the regexp is required, because the token may begin with a number and mix up with it (e.g. $17)
$url = preg_replace('/([&?]token=)[^&]*(&.*)?$/', '${1}'.$adminObj->token.'$2', $_SERVER['REQUEST_URI']);
if (false === strpos($url, '?token=') AND false === strpos($url, '&token='))
$url .= '&token='.$adminObj->token;
// we can display the correct url
// die(Tools::jsonEncode(array(translate('Invalid security token'),$url)));
die(Tools::jsonEncode(translate('Invalid security token')));
}
}
}
+1 -1
View File
@@ -688,7 +688,7 @@ if (Tools::isSubmit('getAdminHomeElement'))
if (Tools::isSubmit('getChildrenCategories') && Tools::getValue('id_category_parent'))
{
$children_categories = Category::getChildrenWithNbSelectedSubCat(Tools::getValue('id_category_parent'), Tools::getValue('selectedCat', array()), $cookie->id_lang);
$children_categories = Category::getChildrenWithNbSelectedSubCatForProduct(Tools::getValue('id_category_parent'), Tools::getValue('id_product', 0), Tools::getValue('post_selected_cat', null), $cookie->id_lang);
die(Tools::jsonEncode($children_categories));
}
+4 -3
View File
@@ -207,9 +207,10 @@ function createDir($path, $rights)
function checkPSVersion()
{
$upgrader = new Upgrader();
return $upgrader->checkPSVersion();
libxml_set_streams_context(stream_context_create(array('http' => array('timeout' => 3))));
if ($feed = @simplexml_load_file('http://www.prestashop.com/xml/version.xml') AND _PS_VERSION_ < $feed->version->num)
return array('name' => $feed->version->name, 'link' => $feed->download->link);
return false;
}
function translate($string)
+1 -1
View File
@@ -52,7 +52,7 @@ if (empty($tab) and !sizeof($_POST))
? '<a href="?tab='.$item['class_name'].'&token='.Tools::getAdminToken($item['class_name'].intval($item['id_tab']).intval($cookie->id_employee)).'">'
: '').'
'.$item['name'].((sizeof($tabs) - 1 > $key) ? '</a>' : '');
// @TODO : a way to desactivate this feature
echo'<script type="text/javascript">
$(function() {
+1
View File
@@ -59,6 +59,7 @@ class AdminAliases extends AdminTab
if (!sizeof($this->_errors))
{
Alias::deleteAliases($search);
foreach ($aliases AS $alias)
{
$obj = new Alias(NULL, trim($alias), trim($search));
+1 -1
View File
@@ -241,7 +241,7 @@ class AdminBackup extends AdminTab
if (preg_match('/^([\d]+-[a-z\d]+)\.sql(\.gz|\.bz2)?$/', $file, $matches) == 0)
continue;
$timestamp = (int)($matches[1]);
$date = date('Y-m-d H:i:s', $timestamp);
$date = date('Y-m-d h:i:s', $timestamp);
$age = time() - $timestamp;
if ($age < 3600)
$age = '< 1 '.$this->l('hour');
+30
View File
@@ -100,6 +100,36 @@ class AdminCategories extends AdminTab
}
}
}
/* Change object statuts (active, inactive) */
elseif (isset($_GET['status']) AND Tools::getValue($this->identifier))
{
if ($this->tabAccess['edit'] === '1')
{
if (Validate::isLoadedObject($object = $this->loadObject()))
{
if ($object->toggleStatus())
{
$target = '';
if (($id_category = (int)(Tools::getValue('id_category'))) AND Tools::getValue('id_product'))
$target = '&id_category='.(int)($id_category);
else
{
$referrer = Tools::secureReferrer($_SERVER['HTTP_REFERER']);
if (preg_match('/id_category=(\d+)/', $referrer, $matches))
$target = '&id_category='.(int)($matches[1]);
}
Module::hookExec('categoryUpdate');
Tools::redirectAdmin(self::$currentIndex.'&conf=5'.$target.'&token='.Tools::getValue('token'));
}
else
$this->_errors[] = Tools::displayError('An error occurred while updating status.');
}
else
$this->_errors[] = Tools::displayError('An error occurred while updating status for object.').' <b>'.$this->table.'</b> '.Tools::displayError('(cannot load object)');
}
else
$this->_errors[] = Tools::displayError('You do not have permission to edit here.');
}
/* Delete object */
elseif (isset($_GET['delete'.$this->table]))
{
+1 -8
View File
@@ -62,12 +62,6 @@ class AdminGenerator extends AdminTab
<p>'.$this->l('Enable only if your server allows URL rewriting.').'</p>
</div>
<div class="clear">&nbsp;</div>
<label for="imageCacheControl">'.$this->l('Disable apache multiviews').'</label>
<div class="margin-form">
<input type="checkbox" name="PS_HTACCESS_DISABLE_MULTIVIEWS" id="PS_HTACCESS_CACHE_CONTROL" value="1" '.(Configuration::get('PS_HTACCESS_DISABLE_MULTIVIEWS') == 1 ? 'checked="checked"' : '').' />
<p>'.$this->l('Enable this option only if you have problems with some pages URL rewriting.').'</p>
</div>
<div class="clear">&nbsp;</div>
<label for="specific_configuration">'.$this->l('Specific configuration').'</label>
<div class="margin-form">
<textarea rows="10" class="width3" id="specific_configuration" name="ps_htaccess_specific">'.Configuration::get('PS_HTACCESS_SPECIFIC').'</textarea>
@@ -118,9 +112,8 @@ class AdminGenerator extends AdminTab
{
Configuration::updateValue('PS_HTACCESS_CACHE_CONTROL', (int)Tools::getValue('PS_HTACCESS_CACHE_CONTROL'));
Configuration::updateValue('PS_REWRITING_SETTINGS', (int)Tools::getValue('PS_REWRITING_SETTINGS'));
Configuration::updateValue('PS_HTACCESS_DISABLE_MULTIVIEWS', (int)Tools::getValue('PS_HTACCESS_DISABLE_MULTIVIEWS'));
Configuration::updateValue('PS_HTACCESS_SPECIFIC', Tools::getValue('ps_htaccess_specific'), true);
if (Tools::generateHtaccess($this->_htFile, Configuration::get('PS_REWRITING_SETTINGS'), Configuration::get('PS_HTACCESS_CACHE_CONTROL'), Tools::getValue('ps_htaccess_specific'), Tools::getValue('PS_HTACCESS_DISABLE_MULTIVIEWS')))
if (Tools::generateHtaccess($this->_htFile, Configuration::get('PS_REWRITING_SETTINGS'), Configuration::get('PS_HTACCESS_CACHE_CONTROL'), Tools::getValue('ps_htaccess_specific')))
Tools::redirectAdmin(self::$currentIndex.'&conf=4&token='.$this->token);
$this->_errors[] = $this->l('Cannot write into file:').' <b>'.$this->_htFile.'</b><br />'.$this->l('Please check write permissions.');
}
+2 -6
View File
@@ -159,13 +159,9 @@ class AdminHome extends AdminTab
<h1>'.$this->l('Dashboard').'</h1>
<hr style="background-color: #812143;color: #812143;" />
<br />';
if (@ini_get('allow_url_fopen'))
{
$upgrade = new Upgrader();
if($update = $upgrade->checkPSVersion())
if (@ini_get('allow_url_fopen') AND $update = checkPSVersion())
echo '<div class="warning warn" style="margin-bottom:30px;"><h3>'.$this->l('New PrestaShop version available').' : <a style="text-decoration: underline;" href="'.$update['link'].'" target="_blank">'.$this->l('Download').'&nbsp;'.$update['name'].'</a> !</h3></div>';
}
else
elseif (!@ini_get('allow_url_fopen'))
{
echo '<p>'.$this->l('Update notification unavailable').'</p>';
echo '<p>&nbsp;</p>';
+6 -53
View File
@@ -425,58 +425,11 @@ class AdminImages extends AdminTab
*/
private function _moveImagesToNewFileSystem()
{
if (!Image::testFileSystem())
$this->_errors[] = Tools::displayError('Error: your server configuration is not compatible with the new image system. No images were moved');
else
{
ini_set('max_execution_time', $this->max_execution_time); // ini_set may be disabled, we need the real value
$this->max_execution_time = (int)ini_get('max_execution_time');
$result = Image::moveToNewFileSystem($this->max_execution_time);
if ($result === 'timeout')
$this->_errors[] = Tools::displayError('Not all images have been moved, server timed out before finishing. Click on \"Move images\" again to resume moving images');
elseif ($result === false)
$this->_errors[] = Tools::displayError('Error: some or all images could not be moved.');
}
return (sizeof($this->_errors) > 0 ? false : true);
ini_set('max_execution_time', $this->max_execution_time); // ini_set may be disabled, we need the real value
$this->max_execution_time = (int)ini_get('max_execution_time');
$result = Image::moveToNewFileSystem($this->max_execution_time);
if ($result === 'timeout')
$this->_errors[] = Tools::displayError('Not all images have been moved, server timed out before finishing. Click on \"Move images\" again to resume moving images');
Tools::redirectAdmin(self::$currentIndex.'&conf=25'.'&token='.$this->token);
}
/**
* Display the block for moving images
*/
public function displayImagePreferences()
{
global $currentIndex;
echo '<br />
<form action="'.$currentIndex.'&token='.$this->token.'" method="post">
<fieldset class="width4">
<legend><img src="../img/admin/picture.gif" /> '.$this->l('Images').'</legend>'.'
<p>'.$this->l('JPEG images have a small file size and standard quality. PNG images have a bigger file size, a higher quality and support transparency. Note that in all cases the image files will have the .jpg extension.').'
<br /><br />'.$this->l('WARNING: This feature may not be compatible with your theme or with some modules. In particular, PNG mode is not compatible with the Watermark module. If you encounter any issue, turn it off by selecting "Use JPEG".').'</p>
<br />
<label>'.$this->l('Image quality').' </label>
<div class="margin-form">
<input type="radio" value="jpg" name="PS_IMAGE_QUALITY" id="PS_IMAGE_QUALITY_0" '.(Configuration::get('PS_IMAGE_QUALITY') == 'jpg' ? 'checked="checked"' : '').' />
<label class="t" for="PS_IMAGE_QUALITY_0">'.$this->l('Use JPEG').'</label>
<br />
<input type="radio" value="png" name="PS_IMAGE_QUALITY" id="PS_IMAGE_QUALITY_1" '.(Configuration::get('PS_IMAGE_QUALITY') == 'png' ? 'checked="checked"' : '').' />
<label class="t" for="PS_IMAGE_QUALITY_1">'.$this->l('Use PNG only if the base image is in PNG format').'</label>
<br />
<input type="radio" value="png_all" name="PS_IMAGE_QUALITY" id="PS_IMAGE_QUALITY_2" '.(Configuration::get('PS_IMAGE_QUALITY') == 'png_all' ? 'checked="checked"' : '').' />
<label class="t" for="PS_IMAGE_QUALITY_2">'.$this->l('Use PNG for all images').'</label>
</div>
<br />
<label for="PS_JPEG_QUALITY">'.$this->l('JPEG quality').'</label>
<div class="margin-form">
<input type="text" name="PS_JPEG_QUALITY" id="PS_JPEG_QUALITY" value="'.(int)Configuration::get('PS_JPEG_QUALITY').'" size="3" />
<p>'.$this->l('Ranges from 0 (worst quality, smallest file) to 100 (best quality, biggest file)').'</p>
</div>
<label for="PS_PNG_QUALITY">'.$this->l('PNG quality').'</label>
<div class="margin-form">
<input type="text" name="PS_PNG_QUALITY" id="PS_PNG_QUALITY" value="'.(int)Configuration::get('PS_PNG_QUALITY').'" size="3" />
<p>'.$this->l('Ranges from 9 (worst quality, smallest file) to 0 (best quality, biggest file)').'</p>
</div>
<div class="margin-form">
<input type="submit" value="'.$this->l(' Save ').'" name="submitImagePreferences" class="button" />
</div>
</fieldset>
</form>';
}
+1 -1
View File
@@ -183,7 +183,7 @@ class AdminPayment extends AdminTab
if ($nameId == 'country' && isset($module->limited_countries) &&
count($module->limited_countries))
{
if (in_array(strtoupper($item['iso_code']), array_map('strtoupper', $module->limited_countries)))
if (in_array($item['iso_code'], $module->limited_countries))
echo '<input type="checkbox" name="'.$module->name.'_'.
$nameId.'[]" value="'.$item['id_'.$nameId].'"'.
(in_array($item['id_'.$nameId.''], $value) ?
+9 -1
View File
@@ -171,7 +171,15 @@ class AdminPreferences extends AdminTab
{
$context = Context::getContext();
$languages = Language::getLanguages(false);
Tools::clearCache($context->smarty);
if (!Configuration::get('PS_FORCE_SMARTY_2'))
{
$files = scandir(_PS_THEME_DIR_);
foreach ($files AS $file)
if (!preg_match('/^\..*/', $file))
$context->smarty->clearCache($file);
}
else
$context->smarty->clear_all_cache();
/* Check required fields */
foreach ($fields AS $field => $values)
+15 -47
View File
@@ -248,7 +248,7 @@ class AdminProducts extends AdminTab
$attachment->file = $uniqid;
$attachment->mime = $_FILES['attachment_file']['type'];
$attachment->file_name = pSQL($_FILES['attachment_file']['name']);
if (empty($attachment->mime) OR Tools::strlen($attachment->mime) > 128)
if (empty($attachment->mime) OR Tools::strlen($attachment->mime) > 64)
$this->_errors[] = Tools::displayError('Invalid file extension');
if (!Validate::isGenericName($attachment->file_name))
$this->_errors[] = Tools::displayError('Invalid file name');
@@ -2709,48 +2709,8 @@ class AdminProducts extends AdminTab
<br /><input type="radio" name="out_of_stock" id="out_of_stock_3" value="2" '.($this->getFieldValue($obj, 'out_of_stock') == 2 ? 'checked="checked"' : '').'/> <label for="out_of_stock_3" class="t" id="label_out_of_stock_3">'.$this->l('Default:').' <i>'.$this->l(((int)(Configuration::get('PS_ORDER_OUT_OF_STOCK')) ? 'Allow orders' : 'Deny orders')).'</i> ('.$this->l('as set in').' <a href="index.php?tab=AdminPPreferences&token='.Tools::getAdminToken('AdminPPreferences'.(int)(Tab::getIdFromClassName('AdminPPreferences')).(int)$context->employee->id).'" onclick="return confirm(\''.$this->l('Are you sure you want to delete entered product information?', __CLASS__, true, false).'\');">'.$this->l('Preferences').'</a>)</label>
</td>
</tr>
<tr>
<td colspan="2" style="padding-bottom:5px;">
<hr style="width:100%;" />
</td>
</tr>
<tr>
<td class="col-left"><label for="id_category_default" class="t">'.$this->l('Default category:').'</label></td>
<td>
<div id="no_default_category" style="color: red;font-weight: bold;display: none;">'.$this->l('Please check a category in order to select the default category.').'</div>
<script>var post_selected_cat;</script>';
if (Tools::isSubmit('categoryBox'))
{
$postCat = Tools::getValue('categoryBox');
$selectedCat = Category::getSimpleCategories($this->_defaultFormLanguage, false, true, 'AND c.`id_category` IN ('.(empty($postCat) ? '1' : implode(',', $postCat)).')');
echo '<script>post_selected_cat = \''.implode(',', $postCat).'\';</script>';
}
if ($obj->id)
$selectedCat = Product::getProductCategoriesFull($obj->id, $this->_defaultFormLanguage);
else if(!Tools::isSubmit('categoryBox'))
$selectedCat[] = array('id_category' => 1, 'name' => $this->l('Home'));
echo '<select id="id_category_default" name="id_category_default">';
foreach($selectedCat AS $cat)
echo '<option value="'.$cat['id_category'].'" '.($obj->id_category_default == $cat['id_category'] ? 'selected' : '').'>'.$cat['name'].'</option>';
echo '</select>
</td>
</tr>
<tr id="tr_categories">
<td colspan="2">
';
// Translations are not automatic for the moment ;)
$trads = array(
'Home' => $this->l('Home'),
'selected' => $this->l('selected'),
'Collapse All' => $this->l('Collapse All'),
'Expand All' => $this->l('Expand All'),
'Check All' => $this->l('Check All'),
'Uncheck All' => $this->l('Uncheck All')
);
echo Helper::renderAdminCategorieTree($trads, $selectedCat).'
</td>
</tr>
<tr><td colspan="2" style="padding-bottom:5px;"><hr style="width:100%;" /></td></tr>
<tr id="tr_categories"></tr>
<tr><td colspan="2" style="padding-bottom:5px;"><hr style="width:100%;" /></td></tr>
<tr><td colspan="2">
<span onclick="$(\'#seo\').slideToggle();" style="cursor: pointer"><img src="../img/admin/arrow.gif" alt="'.$this->l('SEO').'" title="'.$this->l('SEO').'" style="float:left; margin-right:5px;"/>'.$this->l('Click here to improve product\'s rank in search engines (SEO)').'</span><br />
@@ -2759,7 +2719,7 @@ class AdminProducts extends AdminTab
<tr>
<td class="col-left">'.$this->l('Meta title:').'</td>
<td class="translatable">';
foreach ($this->_languages AS $language)
foreach ($this->_languages as $language)
echo ' <div class="lang_'.$language['id_lang'].'" style="display: '.($language['id_lang'] == $this->_defaultFormLanguage ? 'block' : 'none').'; float: left;">
<input size="55" type="text" id="meta_title_'.$language['id_lang'].'" name="meta_title_'.$language['id_lang'].'"
value="'.htmlentities($this->getFieldValue($obj, 'meta_title', $language['id_lang']), ENT_COMPAT, 'UTF-8').'" />
@@ -2934,10 +2894,18 @@ class AdminProducts extends AdminTab
<script type="text/javascript" src="'.__PS_BASE_URI__.'js/tinymce.inc.js"></script>
<script type="text/javascript">
toggleVirtualProduct(getE(\'is_virtual_good\'));
unitPriceWithTax(\'unit\');
</script>';
unitPriceWithTax(\'unit\');';
$categoryBox = Tools::getValue('categoryBox', array());
echo '
$(function() {
$.ajax({
type: \'POST\',
url: \'ajax_category_list.php\',
data: \''.(sizeof($categoryBox) > 0 ? 'categoryBox='.serialize($categoryBox).'&' : '').'id_product='.$obj->id.'&id_category_default='.($this->getFieldValue($obj, 'id_category_default') ? $this->getFieldValue($obj, 'id_category_default') : Tools::getValue('id_category', 1)).'&id_category='.(int)(Tools::getValue('id_category')).'&token='.$this->token.'\',
async : true,
success: function(msg) { $(\'#tr_categories\').replaceWith(msg); }
});
});</script>';
}
function displayFormImages($obj, $token = NULL)
-6
View File
@@ -112,11 +112,6 @@ class AdminStores extends AdminTab
if ((int)($country->contains_states) AND !$id_state)
$this->_errors[] = Tools::displayError('An address located in a country containing states must have a state selected.');
$latitude = (int)(Tools::getValue('latitude'));
$longitude = (int)(Tools::getValue('longitude'));
if(empty($latitude) OR empty($longitude))
$this->_errors[] = Tools::displayError('Latitude and longitude are required.');
/* Check zip code */
if ($country->need_zip_code)
{
@@ -232,7 +227,6 @@ class AdminStores extends AdminTab
<label>'.$this->l('Latitude / Longitude:').'</label>
<div class="margin-form">
<input type="text" size="8" maxlength="10" name="latitude" value="'.htmlentities($this->getFieldValue($obj, 'latitude'), ENT_COMPAT, 'UTF-8').'" onKeyUp="javascript:this.value = this.value.replace(/,/g, \'.\');" /> / <input type="text" size="8" maxlength="10" name="longitude" value="'.htmlentities($this->getFieldValue($obj, 'longitude'), ENT_COMPAT, 'UTF-8').'" onKeyUp="javascript:this.value = this.value.replace(/,/g, \'.\');" />
<sup>*</sup>
<p class="clear">'.$this->l('Store coords, eg. 45.265469 / -47.226478').'</p>
</div>
<label>'.$this->l('Phone:').'</label>
-1
View File
@@ -266,7 +266,6 @@ class AdminThemes extends AdminPreferences
Configuration::updateValue('PS_IMG_UPDATE_TIME', time());
if (!empty($val) AND !$this->_isThemeCompatible($val)) // don't submit if errors
unset($_POST['submitThemes'.$this->table]);
Tools::clearCache($smarty);
parent::postProcess();
}
}
+1 -1
View File
@@ -157,7 +157,7 @@ class AdminTranslations extends AdminTab
}
}
if ($bool)
Tools::redirectAdmin(self::$currentIndex.'&conf=14&token='.$this->token);
Tools::redirectLink(self::$currentIndex.'&conf=14&token='.$this->token);
$this->_errors[] = $this->l('a part of the data has been copied but some language files could not be found or copied');
}
File diff suppressed because it is too large Load Diff
+1 -9
View File
@@ -37,6 +37,7 @@ class AdminWebservice extends AdminTab
$this->lang = false;
$this->edit = true;
$this->delete = true;
$this->id_lang_default = Configuration::get('PS_LANG_DEFAULT');
$this->fieldsDisplay = array(
@@ -92,13 +93,6 @@ class AdminWebservice extends AdminTab
$warnings[] = $this->l('If possible, it is preferable to use SSL (https) for webservice calls, as it avoids the security issues of type "man in the middle".');
$this->displayWarning($warnings);
foreach ($this->_list as $k => $item)
if ($item['is_module'] && $item['class_name'] && $item['module_name'] &&
($instance = Module::getInstanceByName($item['module_name'])) &&
!$instance->useNormalPermissionBehaviour())
unset($this->_list[$k]);
parent::displayList();
}
public function displayForm($isMainTab = true)
@@ -227,8 +221,6 @@ echo '
{
if (Tools::getValue('key') && strlen(Tools::getValue('key')) < 32)
$this->_errors[] = Tools::displayError($this->l('Key length must be 32 character long'));
if (WebserviceKey::keyExists(Tools::getValue('key')) && !Tools::getValue('id_webservice_account'))
$this->_errors[] = Tools::displayError($this->l('Key already exists'));
return parent::postProcess();
}
-7
View File
@@ -59,10 +59,3 @@ a.action_module{color: #488C40;text-decoration: underline;}
a.header_module_toggle{font-weight: bold;color: #812143;display:block;}
a.module_toggle_all{color:#FFF;text-decoration:none;display:inherit;}
.nbr_module{float:right;margin-right:10px;font-style:italic;font-size:12px;color: #812143;}
.autoupgradeSteps div { line-height: 30px; }
.upgradestep { margin-right: 5px;padding-left: 10px; padding-right: 5px;}
#upgradeNow.stepok, .autoupgradeSteps a.stepok { background-image: url("../img/admin/enabled.gif");background-position: left center;background-repeat: no-repeat;padding-left: 15px;}
#upgradeNow {-moz-border-bottom-colors: none;-moz-border-image: none;-moz-border-left-colors: none;-moz-border-right-colors: none;-moz-border-top-colors: none;border-color: #FFF6D3 #DFD5AF #DFD5AF #FFF6D3;border-right: 1px solid #DFD5AF;border-style: solid;border-width: 1px;color: #268CCD;font-size: medium;padding: 5px;}
.button-autoupgrade {-moz-border-bottom-colors: none;-moz-border-image: none;-moz-border-left-colors: none;-moz-border-right-colors: none;-moz-border-top-colors: none;border-color: #FFF6D3 #DFD5AF #DFD5AF #FFF6D3;border-right: 1px solid #DFD5AF;border-style: solid;border-width: 1px;color: #268CCD;font-size: medium;padding: 5px;}
.processing {overflow: auto;}
+1 -8
View File
@@ -53,11 +53,4 @@ select {border: 1px solid #E0D0B1}
a.action_module{color: #268CCD;text-decoration: underline;}
a.header_module_toggle{font-weight: bold;color: #268CCD;display:block;}
a.module_toggle_all{color: #268CCD;}
.nbr_module{float:right;margin-right:10px;font-style:italic;font-size:12px;color: #268CCD;}
.autoupgradeSteps div { line-height: 30px; }
.upgradestep { margin-right: 5px;padding-left: 10px; padding-right: 5px;}
#upgradeNow.stepok, .autoupgradeSteps a.stepok { background-image: url("../img/admin/enabled.gif");background-position: left center;background-repeat: no-repeat;padding-left: 15px;}
#upgradeNow {-moz-border-bottom-colors: none;-moz-border-image: none;-moz-border-left-colors: none;-moz-border-right-colors: none;-moz-border-top-colors: none;border-color: #FFF6D3 #DFD5AF #DFD5AF #FFF6D3;border-right: 1px solid #DFD5AF;border-style: solid;border-width: 1px;color: #268CCD;font-size: medium;padding: 5px;}
.button-autoupgrade {-moz-border-bottom-colors: none;-moz-border-image: none;-moz-border-left-colors: none;-moz-border-right-colors: none;-moz-border-top-colors: none;border-color: #FFF6D3 #DFD5AF #DFD5AF #FFF6D3;border-right: 1px solid #DFD5AF;border-style: solid;border-width: 1px;color: #268CCD;font-size: medium;padding: 5px;}
.processing {overflow: auto;}
.nbr_module{float:right;margin-right:10px;font-style:italic;font-size:12px;color: #268CCD;}
-6
View File
@@ -57,9 +57,3 @@ a.header_module_toggle{font-weight: bold;color: #268CCD;display:block;}
a.module_toggle_all{color: #268CCD;}
.nbr_module{float:right;margin-right:10px;font-style:italic;font-size:12px;color: #268CCD;}
.autoupgradeSteps div { line-height: 30px; }
.upgradestep { margin-right: 5px;padding-left: 10px; padding-right: 5px;}
#upgradeNow.stepok, .autoupgradeSteps a.stepok { background-image: url("../img/admin/enabled.gif");background-position: left center;background-repeat: no-repeat;padding-left: 15px;}
#upgradeNow {-moz-border-bottom-colors: none;-moz-border-image: none;-moz-border-left-colors: none;-moz-border-right-colors: none;-moz-border-top-colors: none;border-color: #FFF6D3 #DFD5AF #DFD5AF #FFF6D3;border-right: 1px solid #DFD5AF;border-style: solid;border-width: 1px;color: #268CCD;font-size: medium;padding: 5px;}
.button-autoupgrade {-moz-border-bottom-colors: none;-moz-border-image: none;-moz-border-left-colors: none;-moz-border-right-colors: none;-moz-border-top-colors: none;border-color: #FFF6D3 #DFD5AF #DFD5AF #FFF6D3;border-right: 1px solid #DFD5AF;border-style: solid;border-width: 1px;color: #268CCD;font-size: medium;padding: 5px;}
.processing {overflow: auto;}