// Merge -> revision 9221
This commit is contained in:
@@ -316,5 +316,4 @@ class AdminAttributeGenerator extends AdminTab
|
||||
</fieldset>
|
||||
</form>';
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -116,7 +116,7 @@ class AdminAttributes extends AdminTab
|
||||
<label>'.$this->l('Current texture:').' </label>
|
||||
<div class="margin-form">
|
||||
<p>'.(file_exists(_PS_IMG_DIR_.$this->fieldImageSettings['dir'].'/'.$obj->id.'.jpg')
|
||||
? '<img src="../img/'.$this->fieldImageSettings['dir'].'/'.$obj->id.'.jpg" alt="" title="" /> <a href="'.Tools::safeOutput($_SERVER['REQUEST_URI']).'&deleteImage=1"><img src="../img/admin/delete.gif" alt="'.$this->l('delete').'" title="" /></a>'
|
||||
? '<img src="../img/'.$this->fieldImageSettings['dir'].'/'.$obj->id.'.jpg" alt="" title="" /> <a href="'.Tools::safeOutput($_SERVER['REQUEST_URI']).'&deleteImage=1"><img src="../img/admin/delete.gif" alt="" title="'.$this->l('Delete').'" />'.$this->l('Delete').'</a>'
|
||||
: $this->l('None')
|
||||
).'</p>
|
||||
</div>
|
||||
|
||||
@@ -241,7 +241,7 @@ class AdminCarts extends AdminTab
|
||||
</table>';
|
||||
}
|
||||
echo '<div style="float:left; margin-top:15px;">'.
|
||||
$this->l('According to the group of this customer, prices are printed:').' '.($order->getTaxCalculationMethod() == PS_TAX_EXC ? $this->l('tax excluded.') : $this->l('tax included.')).'
|
||||
$this->l('According to the group of this customer, prices are printed:').' <b>'.($order->getTaxCalculationMethod() == PS_TAX_EXC ? $this->l('tax excluded.') : $this->l('tax included.')).'</b>
|
||||
</div></div>';
|
||||
|
||||
// Cancel product
|
||||
@@ -263,7 +263,7 @@ class AdminCarts extends AdminTab
|
||||
<td align="center">'.($image->id ? cacheImage(_PS_IMG_DIR_.'p/'.$image->getExistingImgPath().'.jpg',
|
||||
'product_mini_'.(int)($product['id_product']).(isset($product['id_product_attribute']) ? '_'.(int)($product['id_product_attribute']) : '').'.jpg', 45, 'jpg') : '--').'</td>
|
||||
<td><a href="index.php?tab=AdminCatalog&id_product='.$product['id_product'].'&updateproduct&token='.$tokenCatalog.'">
|
||||
<span class="productName">'.$product['name'].'</span><br />
|
||||
<span class="productName">'.$product['name'].'</span>'.(isset($product['attributes']) ? '<br />'.$product['attributes'] : '').'<br />
|
||||
'.($product['reference'] ? $this->l('Ref:').' '.$product['reference'] : '')
|
||||
.(($product['reference'] AND $product['supplier_reference']) ? ' / '.$product['supplier_reference'] : '')
|
||||
.'</a></td>
|
||||
@@ -281,7 +281,7 @@ class AdminCarts extends AdminTab
|
||||
if ($type == Product::CUSTOMIZE_FILE)
|
||||
{
|
||||
$i = 0;
|
||||
echo '<ul style="margin: 4px 0px 4px 0px; padding: 0px; list-style-type: none;">';
|
||||
echo '<ul style="margin: 0; padding: 0; list-style-type: none;">';
|
||||
foreach ($datas AS $data)
|
||||
echo '<li style="display: inline; margin: 2px;">
|
||||
<a href="displayImage.php?img='.$data['value'].'&name='.(int)($order->id).'-file'.++$i.'" target="_blank"><img src="'._THEME_PROD_PIC_DIR_.$data['value'].'_small" alt="" /></a>
|
||||
@@ -291,9 +291,9 @@ class AdminCarts extends AdminTab
|
||||
elseif ($type == Product::CUSTOMIZE_TEXTFIELD)
|
||||
{
|
||||
$i = 0;
|
||||
echo '<ul style="margin: 0px 0px 4px 0px; padding: 0px 0px 0px 6px; list-style-type: none;">';
|
||||
echo '<ul style="margin-bottom: 4px; padding: 0; list-style-type: none;">';
|
||||
foreach ($datas AS $data)
|
||||
echo '<li>'.($data['name'] ? $data['name'] : $this->l('Text #').++$i).$this->l(':').' '.$data['value'].'</li>';
|
||||
echo '<li>'.($data['name'] ? $data['name'] : $this->l('Text #').++$i).$this->l(':').' <b>'.$data['value'].'</b></li>';
|
||||
echo '</ul>';
|
||||
}
|
||||
echo '</td>
|
||||
|
||||
@@ -129,7 +129,7 @@ class AdminCounty extends AdminTab
|
||||
<fieldset><legend><img src="../img/admin/world.gif" />'.$this->l('Counties').'</legend>';
|
||||
|
||||
if (!isset($obj->id))
|
||||
echo '<div class="hint clear" style="display:block;">'.$this->l('Save this county then you will be able to associate zipcodes').'</div><br />';
|
||||
echo '<div class="hint clear" style="display:block;"> '.$this->l('Save this county then you will be able to associate zipcodes').'</div><br />';
|
||||
|
||||
$countries = Country::getCountries($this->context->language->id, true, true);
|
||||
echo '<label>'.$this->l('Country:').' </label>
|
||||
|
||||
@@ -43,10 +43,10 @@ class AdminGenerator extends AdminTab
|
||||
// Htaccess
|
||||
echo '
|
||||
<form action="'.self::$currentIndex.'&token='.$this->token.'" method="post" enctype="multipart/form-data">
|
||||
<fieldset><legend><img src="../img/admin/htaccess.gif" />'.$this->l('Htaccess file generation').'</legend>
|
||||
<fieldset><legend><img src="../img/admin/htaccess.gif" alt="" />'.$this->l('Htaccess file generation').'</legend>
|
||||
<p><b>'.$this->l('Warning:').'</b> '.$this->l('this tool can ONLY be used if you are hosted by an Apache web server. Please ask your webhost.').'</p>
|
||||
<p>'.$this->l('This tool will automatically generate a ".htaccess" file that will give you the ability to do URL rewriting and to catch 404 errors.').'</p>
|
||||
<p>'.$this->l('If you do not have "Friendly URL" enabled when generating the ".htaccess" file, this feature won\'t be available.').'</p>';
|
||||
<p>'.$this->l('This tool will automatically generate a ".htaccess" file that will give you the ability to do URL rewriting and to catch 404 errors.').'</p>';
|
||||
|
||||
if ($this->_checkConfiguration($this->_htFile))
|
||||
echo '
|
||||
<div class="clear"> </div>
|
||||
@@ -67,7 +67,7 @@ class AdminGenerator extends AdminTab
|
||||
<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>
|
||||
<p class="clear" style="font-weight:bold;">'.$this->l('Generate your ".htaccess" file by clicking on the following button:').'<br /><br />
|
||||
<p class="clear" style="font-weight:bold;">'.$this->l('Generate your ".htaccess" file by clicking on the following button:').'
|
||||
<input type="submit" value="'.$this->l('Generate .htaccess file').'" name="submitHtaccess" class="button" /></p>
|
||||
<p>'.$this->l('This will erase your').'<b> '.$this->l('old').'</b> '.$this->l('.htaccess file!').'</p>';
|
||||
else
|
||||
@@ -80,13 +80,13 @@ class AdminGenerator extends AdminTab
|
||||
// Robots
|
||||
echo '<br /><br />
|
||||
<form action="'.self::$currentIndex.'&token='.$this->token.'" method="post" enctype="multipart/form-data">
|
||||
<fieldset><legend><img src="../img/admin/robots.gif" />'.$this->l('Robots file generation').'</legend>
|
||||
<fieldset><legend><img src="../img/admin/binoculars.png" alt="" />'.$this->l('Robots file generation').'</legend>
|
||||
<p><b>'.$this->l('Warning:').' </b>'.$this->l('Your file robots.txt MUST be in your website\'s root directory and nowhere else.').'</p>
|
||||
<p>'.$this->l('eg: http://www.yoursite.com/robots.txt').'.</p>
|
||||
<p>'.$this->l('This tool will automatically generate a "robots.txt" file that you can configure to deny access to search engines for some pages.').'</p>';
|
||||
if ($this->_checkConfiguration($this->_rbFile))
|
||||
echo '
|
||||
<p style="font-weight:bold;">'.$this->l('Generate your "robots.txt" file by clicking on the following button:').'<br /><br />
|
||||
<p style="font-weight:bold;">'.$this->l('Generate your "robots.txt" file by clicking on the following button:').'
|
||||
<input type="submit" value="'.$this->l('Generate robots.txt file').'" name="submitRobots" class="button" /></p>
|
||||
<p>'.$this->l('This will erase your').'<b> '.$this->l('old').'</b> '.$this->l('robots.txt file!').'</p>';
|
||||
else
|
||||
@@ -94,7 +94,8 @@ class AdminGenerator extends AdminTab
|
||||
<p style="color:red; font-weight:bold;">'.$this->l('Before being able to use this tool, you need to:').'</p>
|
||||
<p>'.$this->l('- create a').' <b>'. $this->l('robots.txt').'</b> '.$this->l('blank file in dir:').' <b>'.__PS_BASE_URI__.'</b>
|
||||
<br />'.$this->l('- give it write permissions (CHMOD 666 on Unix system)').'</p>';
|
||||
echo '</p></fieldset></form>';
|
||||
echo '</p></fieldset></form>
|
||||
<br />';
|
||||
}
|
||||
|
||||
public function _checkConfiguration($file)
|
||||
|
||||
@@ -39,7 +39,7 @@ class AdminGeolocation extends AdminTab
|
||||
|
||||
echo '
|
||||
<form method="POST" action="'.self::$currentIndex.'&token='.Tools::getValue('token').'">
|
||||
<fieldset>
|
||||
<fieldset class="width3">
|
||||
<legend><img src="../img/admin/world.gif" alt="" /> '.$this->l('Geolocation by IP').'</legend>
|
||||
|
||||
<label>'.$this->l('Geolocation by IP:').'</label>
|
||||
@@ -58,7 +58,7 @@ class AdminGeolocation extends AdminTab
|
||||
$allowedCountries = explode(';', Configuration::get('PS_ALLOWED_COUNTRIES'));
|
||||
echo '
|
||||
<form method="POST" action="'.self::$currentIndex.'&token='.Tools::getValue('token').'">
|
||||
<fieldset style="margin-top:10px;">
|
||||
<fieldset style="margin-top: 10px;" class="width3">
|
||||
<legend><img src="../img/admin/world.gif" alt="" /> '.$this->l('Options').'</legend>
|
||||
|
||||
<div class="hint" style="display:block;margin-bottom:20px;">
|
||||
@@ -87,7 +87,7 @@ class AdminGeolocation extends AdminTab
|
||||
<div class="clear" style="margin-top:10px;"></div>
|
||||
|
||||
<label>'.$this->l('Select countries that can access your store:').'</label>
|
||||
<div class="margin-form">
|
||||
<div class="margin-form" style="float: left; padding-left: 0; width: 317px; margin-top: 6px; height: 300px; overflow-y: auto;">
|
||||
<table class="table" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -108,7 +108,8 @@ class AdminGeolocation extends AdminTab
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="clear"></div>
|
||||
<br />
|
||||
<div class="margin-form">
|
||||
<input type="submit" class="button" name="submitGeolocationCountries" value="'.$this->l('Save').'" />
|
||||
</div>
|
||||
@@ -116,7 +117,7 @@ class AdminGeolocation extends AdminTab
|
||||
</form>
|
||||
|
||||
<form method="POST" action="'.self::$currentIndex.'&token='.Tools::getValue('token').'">
|
||||
<fieldset style="margin-top:10px;">
|
||||
<fieldset style="margin-top: 10px;" class="width3">
|
||||
<legend><img src="../img/admin/world.gif" alt="" /> '.$this->l('Whitelist of IP addresses').'</legend>
|
||||
|
||||
<div class="hint" style="display:block;margin-bottom:20px;">
|
||||
|
||||
@@ -67,7 +67,7 @@ class AdminGroups extends AdminTab
|
||||
echo '
|
||||
<form id="group" action="'.self::$currentIndex.'&submitAdd'.$this->table.'=1&token='.$this->token.'" method="post">
|
||||
'.($obj->id ? '<input type="hidden" name="id_'.$this->table.'" value="'.$obj->id.'" />' : '').'
|
||||
<fieldset><legend><img src="../img/admin/tab-groups.gif" />'.$this->l('Group').'</legend>
|
||||
<fieldset class="width3"><legend><img src="../img/admin/tab-groups.gif" alt="" />'.$this->l('Customer group').'</legend>
|
||||
<label>'.$this->l('Name:').' </label>
|
||||
<div class="margin-form">';
|
||||
foreach ($this->_languages as $language)
|
||||
|
||||
@@ -37,7 +37,9 @@ class AdminInvoices extends AdminTab
|
||||
'fields' => array(
|
||||
'PS_INVOICE' => array('title' => $this->l('Enable invoices:'), 'desc' => $this->l('Select whether or not to activate invoices for your shop'), 'cast' => 'intval', 'type' => 'bool'),
|
||||
'PS_INVOICE_PREFIX' => array('title' => $this->l('Invoice prefix:'), 'desc' => $this->l('Prefix used for invoices'), 'size' => 6, 'type' => 'textLang'),
|
||||
'PS_INVOICE_START_NUMBER' => array('title' => $this->l('Invoice number:'), 'desc' => $this->l('The next invoice will begin with this number, and then increase with each additional invoice. Set to 0 if you want to keep the current number (#').(Order::getLastInvoiceNumber() + 1).').', 'size' => 6, 'type' => 'text', 'cast' => 'intval')
|
||||
'PS_INVOICE_START_NUMBER' => array('title' => $this->l('Invoice number:'), 'desc' => $this->l('The next invoice will begin with this number, and then increase with each additional invoice. Set to 0 if you want to keep the current number (#').(Order::getLastInvoiceNumber() + 1).').', 'size' => 6, 'type' => 'text', 'cast' => 'intval'),
|
||||
'PS_INVOICE_FREE_TEXT' => array('title' => $this->l('Free Text:'), 'desc' => $this->l('This text will appear at the bottom of the invoice'), 'size' => 6, 'type' => 'textareaLang',
|
||||
'cols' => 40, 'rows' => 8)
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -32,6 +32,8 @@ define ('TEXTAREA_SIZED', 70);
|
||||
|
||||
class AdminTranslations extends AdminTab
|
||||
{
|
||||
|
||||
protected $link_lang_pack = 'http://www.prestashop.com/download/lang_packs/get_each_language_pack.php';
|
||||
protected $total_expression = 0;
|
||||
protected $all_iso_lang = array();
|
||||
protected $modules_translations = array();
|
||||
@@ -394,8 +396,11 @@ class AdminTranslations extends AdminTab
|
||||
{
|
||||
if ((preg_match('/^(.*).tpl$/', $template_file) OR ($is_default AND preg_match('/^(.*).php$/', $template_file))) AND file_exists($tpl = $dir.$template_file))
|
||||
{
|
||||
// Get translations key
|
||||
$content = file_get_contents($tpl);
|
||||
// module files can now be ignored by adding this string in a file
|
||||
if (strpos($content, 'IGNORE_THIS_FILE_FOR_TRANSLATION') !== false)
|
||||
continue;
|
||||
// Get translations key
|
||||
preg_match_all(substr($template_file, -4) == '.tpl' ? self::$tpl_regexp : self::$php_regexp, $content, $matches);
|
||||
|
||||
// Write each translation on its module file
|
||||
@@ -712,7 +717,7 @@ class AdminTranslations extends AdminTab
|
||||
$this->displayWarning($this->l('If you choose to update an existing language pack, all your previous customization in the theme named prestashop will be lost. This includes front office expressions and default e-mail templates.'));
|
||||
echo '<div style="font-weight:bold; float:left;">'.$this->l('Language you want to add or update:').' ';
|
||||
|
||||
if ($lang_packs = Tools::file_get_contents('http://www.prestashop.com/download/lang_packs/get_each_language_pack.php?version='._PS_VERSION_, false, @stream_context_create(array('http' => array('method' => 'GET', 'timeout' => 5)))))
|
||||
if ($lang_packs = Tools::file_get_contents($this->link_lang_pack .'?version='._PS_VERSION_, false, @stream_context_create(array('http' => array('method' => 'GET', 'timeout' => 5)))))
|
||||
{
|
||||
// Notice : for php < 5.2 compatibility, Tools::jsonDecode. The second parameter to true will set us
|
||||
if ($lang_packs != '' AND $lang_packs = Tools::jsonDecode($lang_packs,true))
|
||||
@@ -1323,10 +1328,12 @@ class AdminTranslations extends AdminTab
|
||||
<input type="text" name="subject['.$group_name.']['.$subject_mail.']" value="'.(isset($mails['subject'][$subject_mail]) ? $mails['subject'][$subject_mail] : '').'" />
|
||||
</div>
|
||||
</div>';
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
$str_return .= '
|
||||
<div class="label-subject">
|
||||
<b>'.sprintf($this->l('No Subject was found for %s.'), '<em>'.$mail_name.'</em>').'</b>'
|
||||
<b>'.sprintf($this->l('No Subject was found for %s, or subject is generated in database.'), '<em>'.$mail_name.'</em>').'</b>'
|
||||
.'</div>';
|
||||
}
|
||||
if (key_exists('html', $mail_files))
|
||||
@@ -1587,7 +1594,7 @@ class AdminTranslations extends AdminTab
|
||||
echo $str_output;
|
||||
}
|
||||
|
||||
protected function getSubjectMail($directory, $subject_mail)
|
||||
protected static function getSubjectMail($directory, $subject_mail)
|
||||
{
|
||||
foreach (scandir($directory) AS $filename)
|
||||
{
|
||||
@@ -1605,7 +1612,7 @@ class AdminTranslations extends AdminTab
|
||||
if ($tab2 && isset($tab2[1]))
|
||||
{
|
||||
$tab2[1] = trim(str_replace('\'', '', $tab2[1]));
|
||||
if (preg_match('/Mail::l\(\''._PS_TRANS_PATTERN_.'\'\)/s', $tab2[2], $tab3))
|
||||
if (preg_match('/Mail::l\(\''._PS_TRANS_PATTERN_.'\'/s', $tab2[2], $tab3))
|
||||
$tab2[2] = $tab3[1];
|
||||
$subject_mail[$tab2[1]] = $tab2[2];
|
||||
}
|
||||
@@ -1848,8 +1855,8 @@ class AdminTranslations extends AdminTab
|
||||
@include(_PS_TRANSLATIONS_DIR_.$lang.'/pdf.php');
|
||||
$files = array();
|
||||
$count = 0;
|
||||
$tabsArray = array($tab=>array());
|
||||
$tab = 'PDF_invoice';
|
||||
$tabsArray = array($tab=>array());
|
||||
$regex = '/self::l\(\''._PS_TRANS_PATTERN_.'\'[\)|\,]/U';
|
||||
// need to parse PDF.php in order to find $regex and add this to $tabsArray
|
||||
// this has to be done for the core class, and eventually for the override
|
||||
|
||||
@@ -1110,7 +1110,7 @@ class AdminUpgrade extends AdminPreferences
|
||||
}
|
||||
else if (!method_exists(get_class($this), 'ajaxProcess'.$action))
|
||||
{
|
||||
$this->nextDesc = sprintf($this->l('action "%1$s" non trouvée '), $action);
|
||||
$this->nextDesc = sprintf($this->l('action "%1$s" not found'), $action);
|
||||
$this->next = 'error';
|
||||
$this->error = '1';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user