From: Andrew Dolgov Date: Thu, 7 Aug 2008 08:12:24 +0000 (+0100) Subject: label editor: bugfixes X-Git-Tag: 1.2.26~25 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=8c96d4b1da8b2628d3e3067217704f7539aee4f9;p=tt-rss.git label editor: bugfixes --- diff --git a/functions.js b/functions.js index 7f9f1d21..42e22619 100644 --- a/functions.js +++ b/functions.js @@ -1768,21 +1768,43 @@ function addLabelExample() { } if (op == "kw_title") { + if (p.value == "") { + alert("This action requires a parameter."); + return false; + } tmp = tmp + "ttrss_entries.title like '%"+p.value+"%'"; } + if (op == "kw_content") { + if (p.value == "") { + alert("This action requires a parameter."); + return false; + } + tmp = tmp + "ttrss_entries.content like '%"+p.value+"%'"; } if (op == "scoreE") { + if (isNaN(parseInt(p.value))) { + alert("This action expects numeric parameter."); + return false; + } tmp = tmp + "score = " + p.value; } if (op == "scoreG") { + if (isNaN(parseInt(p.value))) { + alert("This action expects numeric parameter."); + return false; + } tmp = tmp + "score > " + p.value; } if (op == "scoreL") { + if (isNaN(parseInt(p.value))) { + alert("This action expects numeric parameter."); + return false; + } tmp = tmp + "score < " + p.value; } diff --git a/functions.php b/functions.php index 23d618b8..eb67f520 100644 --- a/functions.php +++ b/functions.php @@ -5660,9 +5660,9 @@ print ""; print ""; print ""; - print ""; - print ""; - print ""; + print ""; + print ""; + print ""; print ""; print "";