summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorRobin Millette <millette@controlyourself.ca>2009-06-10 15:24:25 -0400
committerRobin Millette <millette@controlyourself.ca>2009-06-10 15:24:25 -0400
commit4699fa7936be41e05a950b357c6b46949ad7c74d (patch)
treea9d811ee5c139b0bb9ec25355e99b655ffff056d /classes
parentba6beaa3104c81b8b6e624aad28c9f0ce89af8dc (diff)
Now correctly identifiying notices with uploaded content.
Diffstat (limited to 'classes')
-rw-r--r--classes/Notice.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/classes/Notice.php b/classes/Notice.php
index e4dade780..eb51bbd8f 100644
--- a/classes/Notice.php
+++ b/classes/Notice.php
@@ -274,7 +274,11 @@ class Notice extends Memcached_DataObject
$query = 'select file.url as up, file.id as i from file join file_to_post on file.id = file_id where post_id=' . $post->escape($post->id) . ' and url like "%/notice/%/file"';
$post->query($query);
$post->fetch();
- $ret = array($post->up, $post->i);
+ if (empty($post->up) || empty($post->i)) {
+ $ret = false;
+ } else {
+ $ret = array($post->up, $post->i);
+ }
$post->free();
return $ret;
}