From: Andrew Dolgov Date: Mon, 16 Jan 2017 08:36:00 +0000 (+0300) Subject: Merge branch 'subscribe-idn-feed' into 'master' X-Git-Tag: 17.1~18 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=f6bcb5c60687f6d8d57612057996852e144c8c61;hp=-c;p=tt-rss.git Merge branch 'subscribe-idn-feed' into 'master' Subscribe to feed with Internationalized Domain Name Currently you cannot subscribe to feeds on hosts with internationalized domain names (IDNA) within tt-rss. You need to manually convert them to punycode to subscribe to them. This patch adds code to detect IDNA and convert them to punycode in fix_url() if possible on the system. This requires PHP IDN functions (e.g. on Debian Jessie this needs php5-intl to be installed), so a notice is added to the installer sanity check. See merge request !37 --- f6bcb5c60687f6d8d57612057996852e144c8c61 diff --combined install/index.php index 16314edf,d9e370ea..7da311ff --- a/install/index.php +++ b/install/index.php @@@ -128,6 -128,12 +128,6 @@@ $finished = false; - if (function_exists("mcrypt_decrypt")) { - $crypt_key = make_password(24); - } else { - $crypt_key = ""; - } - foreach ($data as $line) { if (preg_match("/define\('DB_TYPE'/", $line)) { $rv .= "\tdefine('DB_TYPE', '$DB_TYPE');\n"; @@@ -143,6 -149,8 +143,6 @@@ $rv .= "\tdefine('DB_PORT', '$DB_PORT');\n"; } else if (preg_match("/define\('SELF_URL_PATH'/", $line)) { $rv .= "\tdefine('SELF_URL_PATH', '$SELF_URL_PATH');\n"; - } else if (preg_match("/define\('FEED_CRYPT_KEY'/", $line)) { - $rv .= "\tdefine('FEED_CRYPT_KEY', '$crypt_key');\n"; } else if (!$finished) { $rv .= "$line\n"; } @@@ -309,6 -317,10 +309,10 @@@ array_push($notices, "CURL and open_basedir combination breaks support for HTTP redirects. See the FAQ for more information."); } + if (!function_exists("idn_to_ascii")) { + array_push($notices, "PHP support for Internationalization Functions is required to handle Internationalized Domain Names."); + } + if (count($notices) > 0) { print_notice("Configuration check succeeded with minor problems:");