From 14c84904fe8541a7ad4a91abfe28086f2ffde7c2 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 27 May 2013 14:03:14 +0400 Subject: pluginhost: allow html tags in plugin storage --- classes/pluginhost.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/classes/pluginhost.php b/classes/pluginhost.php index 9ac1789f5..53adf01f9 100644 --- a/classes/pluginhost.php +++ b/classes/pluginhost.php @@ -274,7 +274,8 @@ class PluginHost { if (!isset($this->storage[$plugin])) $this->storage[$plugin] = array(); - $content = $this->dbh->escape_string(serialize($this->storage[$plugin])); + $content = $this->dbh->escape_string(serialize($this->storage[$plugin]), + false); if ($this->dbh->num_rows($result) != 0) { $this->dbh->query("UPDATE ttrss_plugin_storage SET content = '$content' -- cgit v1.2.3 From 2a7362596f5ffcf6c5fad98f0e188eb3e9c2d466 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 27 May 2013 22:11:20 +0400 Subject: moveToPost: check for current article element existing before getting its position info (closes #695) --- js/viewfeed.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/viewfeed.js b/js/viewfeed.js index 095bfab22..005e0758c 100644 --- a/js/viewfeed.js +++ b/js/viewfeed.js @@ -590,7 +590,7 @@ function moveToPost(mode, noscroll, noexpand) { if (!getInitParam("cdm_expanded")) { - if (!noscroll && article.offsetTop < ctr.scrollTop) { + if (!noscroll && article && article.offsetTop < ctr.scrollTop) { scrollArticle(-ctr.offsetHeight/4); } else { cdmExpandArticle(prev_id, noexpand); -- cgit v1.2.3 From 1d7658969352ee73dd94baf3cea15364dd303786 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 28 May 2013 15:58:03 +0400 Subject: file_is_locked: check if file exists before trying to flock it --- include/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/functions.php b/include/functions.php index 7db040d04..01ffa751f 100644 --- a/include/functions.php +++ b/include/functions.php @@ -961,7 +961,7 @@ } function file_is_locked($filename) { - if (function_exists('flock')) { + if (function_exists('flock') && file_exists(LOCK_DIRECTORY . "/$filename")) { $fp = @fopen(LOCK_DIRECTORY . "/$filename", "r"); if ($fp) { if (flock($fp, LOCK_EX | LOCK_NB)) { -- cgit v1.2.3