[*] BO : now you can't activate friendly URL when mod_rewrite is not active

This commit is contained in:
vAugagneur
2012-02-29 08:13:09 +00:00
parent e462d968f0
commit 320e44d464
6 changed files with 66 additions and 7 deletions
@@ -27,10 +27,10 @@
{block name="defaultOptions"}
<form action="{$current}&amp;token={$token}" method="post" enctype="multipart/form-data">
<fieldset><legend><img src="../img/admin/htaccess.gif" alt="" />{l s='Htaccess file generation'}</legend>
<p>
<div class="warn">
<b>{l s='Warning:'}</b>
{l s='this tool can ONLY be used if you are hosted by an Apache web server. Please ask your webhost.'}
</p>
</div>
<p>
{l s='This tool will automatically generate a ".htaccess" file that will give you the ability to do URL rewriting and to catch 404 errors.'}
</p>
@@ -44,8 +44,16 @@
<div class="clear">&nbsp;</div>
<label for="imageCacheControl">{l s='Friendly URL'}</label>
<div class="margin-form">
<input type="checkbox" name="PS_REWRITING_SETTINGS" id="PS_REWRITING_SETTINGS" value="1" {if $ps_rewriting_settings}checked="checked"{/if} />
<p>{l s='Enable only if your server allows URL rewriting.'}</p>
{if $mod_rewrite}
<input type="checkbox" name="PS_REWRITING_SETTINGS" id="PS_REWRITING_SETTINGS" value="1" {if $ps_rewriting_settings}checked="checked"{/if} />
<p>{l s='Enable only if your server allows URL rewriting.'}</p>
{else}
<span class="warning_mod_rewrite" style="display:block;height:15px">
{l s='URL rewriting (mod_rewrite) is not active on your server. If you want to use Friendly URL you have to active this mod.'}
</span>
<div class="clear"></div>
{/if}
</div>
<div class="clear">&nbsp;</div>
<label for="imageCacheControl">{l s='Disable apache multiviews'}</label>
@@ -0,0 +1,43 @@
{*
* 2007-2012 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 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
* 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-2012 PrestaShop SA
* @version Release: $Revision: 13686 $
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
{extends file="helpers/options/options.tpl"}
{block name="start_field_block"}
<div class="margin-form">
{if $field['type'] == 'rewriting_settings'}
{if $field['mod_rewrite']}
<label class="t" for="{$key}_on"><img src="../img/admin/enabled.gif" alt="{l s='Yes'}" title="{l s='Yes'}" /></label>
<input type="radio" name="{$key}" id="{$key}_on" value="1" {if $field['value']} checked="checked"{/if}{if isset($field['js']['on'])} {$field['js']['on']}{/if}/>
<label class="t" for="{$key}_on"> {l s='Yes'}</label>
<label class="t" for="{$key}_off"><img src="../img/admin/disabled.gif" alt="{l s='No'}" title="{l s='No'}" style="margin-left: 10px;" /></label>
<input type="radio" name="{$key}" id="{$key}_off" value="0" {if !$field['value']} checked="checked"{/if}{if isset($field['js']['off'])} {$field['js']['off']}{/if}/>
<label class="t" for="{$key}_off"> {l s='No'}</label>
{else}
<span class="warning_mod_rewrite" style="display:block;height:15px">{l s='URL rewriting (mod_rewrite) is not active on your server. If you want to use Friendly URL you have to active this mod.'}</span>
<div class="clear"></div>
{/if}
{/if}
{/block}