Update of /cvsroot/php-blog/serendipity/plugins/serendipity_event_entryproperties
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26531/plugins/serendipity_event_entryproperties
Modified Files:
Tag: branch-smarty
serendipity_event_entryproperties.php
Log Message:
fix sql for non-logged in users
Index: serendipity_event_entryproperties.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/plugins/serendipity_event_entryproperties/Attic/serendipity_event_entryproperties.php,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -u -d -r1.1.2.2 -r1.1.2.3
--- serendipity_event_entryproperties.php 21 Sep 2004 21:08:56 -0000 1.1.2.2
+++ serendipity_event_entryproperties.php 22 Sep 2004 08:11:47 -0000 1.1.2.3
@@ -140,11 +140,13 @@
$conds[] = " (ISNULL(ep_access.property) OR ep_access.value = 'member' OR ep_access.value = 'public' OR (ep_access.value = 'private' AND e.authorid = " . (int)$serendipity['authorid'] . ")) ";
}
- $cond = implode(' AND ', $conds);
- if (empty($eventData['and'])) {
- $eventData['and'] = " WHERE $cond ";
- } else {
- $eventData['and'] .= " AND $cond ";
+ if (count($conds) > 0) {
+ $cond = implode(' AND ', $conds);
+ if (empty($eventData['and'])) {
+ $eventData['and'] = " WHERE $cond ";
+ } else {
+ $eventData['and'] .= " AND $cond ";
+ }
}
$cond = 'ep_sticky.value IS NULL AS orderkey,';
|