From 8c96d4b1da8b2628d3e3067217704f7539aee4f9 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 7 Aug 2008 09:12:24 +0100 Subject: [PATCH] label editor: bugfixes --- functions.js | 22 ++++++++++++++++++++++ functions.php | 6 +++--- 2 files changed, 25 insertions(+), 3 deletions(-) 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 ""; -- 2.39.5