// 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:
+5
-23
@@ -1491,7 +1491,7 @@ class ToolsCore
|
||||
return Tools::getHttpHost();
|
||||
}
|
||||
|
||||
public static function generateHtaccess($path, $rewrite_settings, $cache_control, $specific = '', $disableMuliviews = false)
|
||||
public static function generateHtaccess($path, $rewrite_settings, $cache_control, $specific = '')
|
||||
{
|
||||
if (!$writeFd = @fopen($path, 'w'))
|
||||
return false;
|
||||
@@ -1531,8 +1531,7 @@ class ToolsCore
|
||||
$tab['RewriteRule'][$domain]['content']['^'.ltrim($uri['uri'], '/').'([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$'] = _PS_PROD_IMG_.'$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8.jpg [L]';
|
||||
$tab['RewriteRule'][$domain]['content']['^'.ltrim($uri['uri'], '/').'([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$'] = _PS_PROD_IMG_.'$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9.jpg [L]';
|
||||
|
||||
$tab['RewriteRule']['content']['^c/([0-9]+)(\-[_a-zA-Z0-9-]*)/[_a-zA-Z0-9-]*\.jpg$'] = 'img/c/$1$2.jpg [L]';
|
||||
$tab['RewriteRule']['content']['^c/([a-zA-Z-]+)/[a-zA-Z0-9-]+\.jpg$'] = 'img/c/$1.jpg [L]';
|
||||
$tab['RewriteRule'][$domain]['content']['^'.ltrim($uri['uri'], '/').'c/([0-9]+)(\-[_a-zA-Z0-9-]*)/[_a-zA-Z0-9-]*\.jpg$'] = 'img/c/$1$2.jpg [L]';
|
||||
|
||||
if ($multilang)
|
||||
{
|
||||
@@ -1592,13 +1591,9 @@ class ToolsCore
|
||||
fwrite($writeFd, $specific);
|
||||
// RewriteEngine
|
||||
fwrite($writeFd, "\n<IfModule mod_rewrite.c>\n");
|
||||
|
||||
if ($disableMuliviews)
|
||||
fwrite($writeFd, "\n# Disable Multiviews\nOptions -Multiviews\n\n");
|
||||
|
||||
fwrite($writeFd, $tab['RewriteEngine']['comment']."\nRewriteEngine on\n\n");
|
||||
fwrite($writeFd, $tab['RewriteRule']['comment']."\n");
|
||||
// Webservice
|
||||
fwrite($writeFd, "\nRewriteEngine on\n\n");
|
||||
// fwrite($writeFd, $tab['RewriteRule']['comment']."\n");
|
||||
// Webservice needs apache_mod_rewrite in order to work
|
||||
fwrite($writeFd, 'RewriteRule ^api/?(.*)$ '.__PS_BASE_URI__."webservice/dispatcher.php?url=$1 [QSA,L]\n");
|
||||
|
||||
fwrite($writeFd, "RewriteCond %{REQUEST_FILENAME} -s [OR]\nRewriteCond %{REQUEST_FILENAME} -l [OR]\nRewriteCond %{REQUEST_FILENAME} -d\nRewriteRule ^.*$ - [NC,L]\nRewriteRule ^.*\$ index.php [NC,L]\n");
|
||||
@@ -1995,19 +1990,6 @@ FileETag INode MTime Size
|
||||
{
|
||||
return str_replace(array("\r\n", "\r", "\n"), '<br />', $str);
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear cache for Smarty
|
||||
*
|
||||
* @param objet $smarty
|
||||
*/
|
||||
public static function clearCache($smarty)
|
||||
{
|
||||
if (!Configuration::get('PS_FORCE_SMARTY_2'))
|
||||
$smarty->clearAllCache();
|
||||
else
|
||||
$smarty->clear_all_cache();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user