From 8dcefd608fce723e5c76f979d86a445294d9c5cb Mon Sep 17 00:00:00 2001 From: John Clause Date: Fri, 17 Apr 2015 21:06:56 -0600 Subject: [PATCH] 3.2.9.9.3 REDIRECT_STATUS handling --- qtranslate_utils.php | 2 +- readme.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/qtranslate_utils.php b/qtranslate_utils.php index 00e9663..3a4cd41 100644 --- a/qtranslate_utils.php +++ b/qtranslate_utils.php @@ -602,6 +602,6 @@ function qtranxf_can_redirect() { return !defined('WP_ADMIN') && !defined('DOING_AJAX') && !defined('WP_CLI') && !defined('DOING_CRON') && empty($_POST) //'REDIRECT_*' needs more testing //&& !isset($_SERVER['REDIRECT_URL']) - //&& (!isset($_SERVER['REDIRECT_STATUS']) || $_SERVER['REDIRECT_STATUS']=='200') + && (!isset($_SERVER['REDIRECT_STATUS']) || $_SERVER['REDIRECT_STATUS']=='200') ; } diff --git a/readme.txt b/readme.txt index 5ed66d1..1f9a162 100644 --- a/readme.txt +++ b/readme.txt @@ -115,6 +115,7 @@ Developers: please drop new topics here, the text will be moved to [qTranslate-X * Enhancement: improved report messages for action 'markdefault'. * Enhancement: improved messages in column "Language" of post listing pages. * Translation: German (de_DE) po/mo files updated. Thanks to Robert Skiba. +* Enhancement: another attempt to check `REDIRECT_STATUS` in function `qtranxf_can_redirect` to prevent unnecessary redirection if `mod_rewrite` is already doing redirection. In particular, this should help to troubleshoot internal server error as it was observed in [Issue #96](https://github.com/qTranslate-Team/qtranslate-x/issues/96). ### 3.2.9.9.2 alpha ### * Fix: troublesome use of deprecated function `mysql_real_escape_string` is removed: [WP Topic](https://wordpress.org/support/topic/bulk-remove-language).