From 53d8ff166f5607e29b507c7c8150763aeb53c1a4 Mon Sep 17 00:00:00 2001 From: lLefevre Date: Tue, 4 Sep 2012 12:18:14 +0000 Subject: [PATCH] // small fix : display message for max_input_vars --- .../translations/helpers/view/translation_errors.tpl | 2 +- .../translations/helpers/view/translation_form.tpl | 4 ++-- .../translations/helpers/view/translation_mails.tpl | 2 +- .../translations/helpers/view/translation_modules.tpl | 2 +- controllers/admin/AdminTranslationsController.php | 2 -- 5 files changed, 5 insertions(+), 7 deletions(-) diff --git a/admin-dev/themes/default/template/controllers/translations/helpers/view/translation_errors.tpl b/admin-dev/themes/default/template/controllers/translations/helpers/view/translation_errors.tpl index 5b526688d..6287b435a 100644 --- a/admin-dev/themes/default/template/controllers/translations/helpers/view/translation_errors.tpl +++ b/admin-dev/themes/default/template/controllers/translations/helpers/view/translation_errors.tpl @@ -28,7 +28,7 @@ {block name="override_tpl"} - {if $post_limit_exceeded} + {if !empty($limit_warning)}
{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:'} diff --git a/admin-dev/themes/default/template/controllers/translations/helpers/view/translation_form.tpl b/admin-dev/themes/default/template/controllers/translations/helpers/view/translation_form.tpl index 131626c72..ebb92db19 100644 --- a/admin-dev/themes/default/template/controllers/translations/helpers/view/translation_form.tpl +++ b/admin-dev/themes/default/template/controllers/translations/helpers/view/translation_form.tpl @@ -28,7 +28,7 @@ {block name="override_tpl"} - {if $post_limit_exceeded} + {if !empty($limit_warning)}
{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:'} @@ -37,7 +37,7 @@ {$limit_warning['request.max_vars']} {l s='for suhosin.request.max_vars.'}
{l s='Please ask your hosting provider to increase the suhosin post and request a limit of'} {else} - {l s='Warning, your PHP configuration limits the maximum number of fields to post in a form:'}
+ {l s='Warning, your PHP configuration limits the maximum number of fields to post in a form:'} {$limit_warning['max_input_vars']} {l s='for max_input_vars.'}
{l s='Please ask your hosting provider to increase the this limit to'} {/if} diff --git a/admin-dev/themes/default/template/controllers/translations/helpers/view/translation_mails.tpl b/admin-dev/themes/default/template/controllers/translations/helpers/view/translation_mails.tpl index 5e0a758c3..25fedcfe8 100644 --- a/admin-dev/themes/default/template/controllers/translations/helpers/view/translation_mails.tpl +++ b/admin-dev/themes/default/template/controllers/translations/helpers/view/translation_mails.tpl @@ -30,7 +30,7 @@ {$tinyMCE} - {if $post_limit_exceeded} + {if !empty($limit_warning)}
{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:'} diff --git a/admin-dev/themes/default/template/controllers/translations/helpers/view/translation_modules.tpl b/admin-dev/themes/default/template/controllers/translations/helpers/view/translation_modules.tpl index 7e943a7b7..9032609b0 100644 --- a/admin-dev/themes/default/template/controllers/translations/helpers/view/translation_modules.tpl +++ b/admin-dev/themes/default/template/controllers/translations/helpers/view/translation_modules.tpl @@ -28,7 +28,7 @@ {block name="override_tpl"} - {if $post_limit_exceeded} + {if !empty($limit_warning)}
{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:'} diff --git a/controllers/admin/AdminTranslationsController.php b/controllers/admin/AdminTranslationsController.php index 624acced2..bd1e34b21 100644 --- a/controllers/admin/AdminTranslationsController.php +++ b/controllers/admin/AdminTranslationsController.php @@ -1404,7 +1404,6 @@ class AdminTranslationsControllerCore extends AdminController $return = array(); if ((ini_get('suhosin.post.max_vars') && ini_get('suhosin.post.max_vars') < $count) || (ini_get('suhosin.request.max_vars') && ini_get('suhosin.request.max_vars') < $count)) { - $this->post_limit_exceed = true; $return['error_type'] = 'suhosin'; $return['post.max_vars'] = ini_get('suhosin.post.max_vars'); $return['request.max_vars'] = ini_get('suhosin.request.max_vars'); @@ -1412,7 +1411,6 @@ class AdminTranslationsControllerCore extends AdminController } elseif (ini_get('max_input_vars') && ini_get('max_input_vars') < $count) { - $this->post_limit_exceed = true; $return['error_type'] = 'conf'; $return['max_input_vars'] = ini_get('max_input_vars'); $return['needed_limit'] = $count + 100;