// replaced api by www in Language class and AdminTranslationsController

// better error message when suhosin or max_input_vars exceeded in Translations forms
// cleanning/comments code in email translations functions
This commit is contained in:
mMarinetti
2012-02-29 14:36:41 +00:00
parent a606d7c5af
commit 913927d2b0
6 changed files with 67 additions and 16 deletions
@@ -30,8 +30,22 @@
<h2>{l s='Language'} : {$lang} - {$translation_type}</h2>
{l s='Errors to translate'} : <b>{$count}</b>
{$limit_warning}
{if !$suoshin_exceeded}
{if $post_limit_exceeded}
<div class="warn">
{if $limit_warning['error_type'] == 'suhosin'}
{l s='Warning, your hosting provider is using the suhosin patch for PHP, which limits the maximum number of fields to post in a form:'}
<b>{$limit_warning['post.max_vars']}</b>{l s='for suhosin.post.max_vars.'}<br/>
<b>{$limit_warning['request.max_vars']}</b> {l s='for suhosin.request.max_vars.'}<br/>
{l s='Please ask your hosting provider to increase the suhosin post and request limit to'}
{else}
{l s='Warning, your PHP configuration limits the maximum number of fields to post in a form:'}<br/>
<b>{$limit_warning['max_input_vars']}</b> {l s='for max_input_vars.'}<br/>
{l s='Please ask your hosting provider to increase the this limit to'}
{/if}
<u><b>{$limit_warning['needed_limit']}</b></u> {l s='at least.'} {l s='or edit the translation file manually.'}
</div>
{else}
<form method="post" id="{$table}_form" action="{$url_submit}" class="form">
{*{$auto_translate}$*}
<input type="hidden" name="lang" value="{$lang}" />
@@ -48,4 +62,4 @@
</form>
{/if}
{/block}
{/block}
@@ -32,7 +32,7 @@
{l s='Expressions to translate'} : <b>{$count}</b>.
<div class="hint" style="display:block;">{l s='Click on the titles to open fieldsets'}.</div><br /><br />
<p>{l s='total missing expresssions:'} {$missing_translations|array_sum} </p>
{if $post_limit_exceeded == true}
{if $post_limit_exceeded}
<div class="warn">
{if $limit_warning['error_type'] == 'suhosin'}
{l s='Warning, your hosting provider is using the suhosin patch for PHP, which limits the maximum number of fields to post in a form:'}
@@ -31,8 +31,23 @@
{$tinyMCE}
<h2>{l s='Language'} : {$lang} - {$translation_type}</h2>
{if $post_limit_exceeded}
<div class="warn">
{if $limit_warning['error_type'] == 'suhosin'}
{l s='Warning, your hosting provider is using the suhosin patch for PHP, which limits the maximum number of fields to post in a form:'}
<b>{$limit_warning['post.max_vars']}</b>{l s='for suhosin.post.max_vars.'}<br/>
<b>{$limit_warning['request.max_vars']}</b> {l s='for suhosin.request.max_vars.'}<br/>
{l s='Please ask your hosting provider to increase the suhosin post and request limit to'}
{else}
{l s='Warning, your PHP configuration limits the maximum number of fields to post in a form:'}<br/>
<b>{$limit_warning['max_input_vars']}</b> {l s='for max_input_vars.'}<br/>
{l s='Please ask your hosting provider to increase the this limit to'}
{/if}
<u><b>{$limit_warning['needed_limit']}</b></u> {l s='at least.'} {l s='or edit the translation file manually.'}
</div>
{else}
<div class="hint" style="display:block;">{l s='Click on the titles to open fieldsets'}.</div><br />
{if !$suoshin_exceeded}
<form method="post" id="{$table}_form" action="{$url_submit}" class="form">
{$toggle_button}
<input type="hidden" name="lang" value="{$lang}" />
@@ -62,4 +77,4 @@
</form>
{/if}
{/block}
{/block}