From: umorigu Date: Thu, 4 Feb 2016 15:43:45 +0000 (+0900) Subject: BugTrack2/290 Rename 'http_request' function to 'pkwk_http_request' X-Git-Tag: r1_5_1~27 X-Git-Url: http://git.osdn.net/view?p=pukiwiki%2Fpukiwiki.git;a=commitdiff_plain;h=8e23f5085f264a8a8c013cc53ea70d6ca17a2569 BugTrack2/290 Rename 'http_request' function to 'pkwk_http_request' pecl_http extension also have the function named 'http_request'. So, if pecl_http is enable, PukiWiki crashes because of the name conflict. I renamed the function to 'pkwk_http_request'. And I also defined 'http_request' function on the environment without pecl_http for the backword (mainly your plugin) compatibility. --- diff --git a/lib/proxy.php b/lib/proxy.php index fb63966..3683b33 100644 --- a/lib/proxy.php +++ b/lib/proxy.php @@ -1,6 +1,7 @@ diff --git a/plugin/amazon.inc.php b/plugin/amazon.inc.php index bf0baeb..636edfc 100644 --- a/plugin/amazon.inc.php +++ b/plugin/amazon.inc.php @@ -1,12 +1,11 @@ (Original author) // // License: GNU/GPL @@ -441,7 +440,7 @@ function plugin_amazon_review_save($page, $data) function plugin_amazon_get_page($url) { - $data = http_request($url); + $data = pkwk_http_request($url); return ($data['rc'] == 200) ? $data['data'] : ''; } @@ -461,4 +460,3 @@ function is_asin() return TRUE; } } - diff --git a/plugin/showrss.inc.php b/plugin/showrss.inc.php index ece800b..c7bc235 100644 --- a/plugin/showrss.inc.php +++ b/plugin/showrss.inc.php @@ -1,9 +1,8 @@ // (Original)hiro_do3ob@yahoo.co.jp // License: GPL, same as PukiWiki @@ -167,7 +166,7 @@ function plugin_showrss_get_rss($target, $cachehour) if ($time === NULL) { // Newly get RSS - $data = http_request($target); + $data = pkwk_http_request($target); if ($data['rc'] !== 200) return array(FALSE, 0); @@ -323,4 +322,3 @@ function plugin_showrss_get_timestamp($str) return ($time == -1) ? UTIME : $time - LOCALZONE; } } -?>