From 81153e6b8bdf3761ebe805ae9622a305d001a786 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 20 Mar 2013 12:15:06 +0400 Subject: fix broken redirects --- plugins/af_unburn/init.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'plugins') diff --git a/plugins/af_unburn/init.php b/plugins/af_unburn/init.php index a0c51c97e..9f0b6cb0d 100644 --- a/plugins/af_unburn/init.php +++ b/plugins/af_unburn/init.php @@ -29,11 +29,16 @@ class Af_Unburn extends Plugin { if (strpos($article["plugin_data"], "unburn,$owner_uid:") === FALSE) { - $ch = curl_init(geturl($article["link"])); + if (ini_get("safe_mode")) { + $ch = curl_init(geturl($article["link"])); + } else { + $ch = curl_init($article["link"]); + } + curl_setopt($ch, CURLOPT_TIMEOUT, 5); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HEADER, true); - //curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); + curl_setopt($ch, CURLOPT_FOLLOWLOCATION, !ini_get("safe_mode")); curl_setopt($ch, CURLOPT_USERAGENT, SELF_USER_AGENT); $contents = @curl_exec($ch); @@ -74,7 +79,7 @@ class Af_Unburn extends Plugin { return $article; } - + function geturl($url){ (function_exists('curl_init')) ? '' : die('cURL Must be installed for geturl function to work. Ask your host to enable it or uncomment extension=php_curl.dll in php.ini'); -- cgit v1.2.3-54-g00ecf From 2d2d08fc41dec694ac0895368eff3eb80a173a5b Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 20 Mar 2013 20:45:57 +0400 Subject: digest: remove unused dependencies; optimize load a bit --- plugins/digest/digest.js | 2 -- plugins/digest/digest_body.php | 22 +++++++++++++--------- 2 files changed, 13 insertions(+), 11 deletions(-) (limited to 'plugins') diff --git a/plugins/digest/digest.js b/plugins/digest/digest.js index 88410d9ed..197847411 100644 --- a/plugins/digest/digest.js +++ b/plugins/digest/digest.js @@ -670,8 +670,6 @@ function init_second_stage() { function init() { try { - dojo.require("dijit.Dialog"); - new Ajax.Request("backend.php", { parameters: {op: "rpc", method: "sanityCheck"}, onComplete: function(transport) { diff --git a/plugins/digest/digest_body.php b/plugins/digest/digest_body.php index c4f51d376..5ffcfd812 100644 --- a/plugins/digest/digest_body.php +++ b/plugins/digest/digest_body.php @@ -7,8 +7,7 @@ Tiny Tiny RSS - - + @@ -16,13 +15,18 @@ - - - + - - - - +