diff options
author | Andrew Dolgov <[email protected]> | 2010-11-18 23:09:55 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2010-11-18 23:09:55 +0300 |
commit | 42623d7f65af33a1c314d6ac017e9ca63bb57e4b (patch) | |
tree | 80f9ca62830f305cc1ceddc1c5262eb126d65093 /modules | |
parent | a83280194a4482c14fac7d8c1940d81c6d089357 (diff) |
pref-filters: add some sql checks
Diffstat (limited to 'modules')
-rw-r--r-- | modules/pref-filters.php | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/modules/pref-filters.php b/modules/pref-filters.php index 95721f7cb..ac6f4e68b 100644 --- a/modules/pref-filters.php +++ b/modules/pref-filters.php @@ -61,12 +61,14 @@ db_escape_string($line["action_param"])."' AND owner_uid = " . $_SESSION["uid"]); - $fg_color = db_fetch_result($tmp_result, 0, "fg_color"); - $bg_color = db_fetch_result($tmp_result, 0, "bg_color"); - - $tmp = "<span class=\"labelColorIndicator\" style='color : $fg_color; background-color : $bg_color'>α</span> " . $line['action_param']; + if (db_num_rows($tmp_result) != 0) { + $fg_color = db_fetch_result($tmp_result, 0, "fg_color"); + $bg_color = db_fetch_result($tmp_result, 0, "bg_color"); + + $tmp = "<span class=\"labelColorIndicator\" style='color : $fg_color; background-color : $bg_color'>α</span> " . $line['action_param']; - $line['action_param'] = $tmp; + $line['action_param'] = $tmp; + } } } |