Update of /cvsroot/php-blog/serendipity/plugins/serendipity_event_entryproperties
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17878/plugins/serendipity_event_entryproperties
Modified Files:
Tag: branch-smarty
serendipity_event_entryproperties.php
Log Message:
* RSS feed should not display sticky posts as sticky
* RSS Export uses reverse chronological order for easier import
* Fixed PostgreSQL concatenation issue
* Fixed entry visibility (private/hidden/member) attribute to work as
intended
* Remove obsolete "force nocache" directive for RSS feed.
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.6
retrieving revision 1.1.2.7
diff -u -d -r1.1.2.6 -r1.1.2.7
--- serendipity_event_entryproperties.php 29 Oct 2004 11:02:35 -0000 1.1.2.6
+++ serendipity_event_entryproperties.php 8 Nov 2004 09:25:32 -0000 1.1.2.7
@@ -241,6 +241,8 @@
$conds = array();
if ($_SESSION['serendipityAuthedUser'] === true) {
$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'] . ")) ";
+ } else {
+ $conds[] = " (ISNULL(ep_access.property) OR ep_access.value = 'public') ";
}
if (count($conds) > 0) {
@@ -253,12 +255,19 @@
}
$conds = array();
- $conds[] = 'ep_sticky.value IS NULL AS orderkey,';
+ if (!isset($addData['noSticky']) || $addData['noSticky'] !== true) {
+ $conds[] = 'ep_sticky.value IS NULL AS orderkey,';
+ }
+
if ($iscache && (!isset($addData['noCache']) || !$addData['noCache'])) {
$conds[] = 'ep_cache_extended,';
$conds[] = 'ep_cache_body,';
}
+ if (count($conds) < 1) {
+ $conds[] = '1 AS orderkey,';
+ }
+
$cond = implode("\n", $conds);
if (empty($eventData['addkey'])) {
$eventData['addkey'] = $cond;
@@ -282,8 +291,12 @@
}
$joins[] = "LEFT OUTER JOIN {$serendipity['dbPrefix']}entryproperties ep_access
ON (e.id = ep_access.entryid AND ep_access.property = 'ep_access')";
- $joins[] = "LEFT OUTER JOIN {$serendipity['dbPrefix']}entryproperties ep_sticky
- ON (e.id = ep_sticky.entryid AND ep_sticky.property = 'ep_is_sticky')";
+
+ if (!isset($addData['noSticky']) || $addData['noSticky'] !== true) {
+ $joins[] = "LEFT OUTER JOIN {$serendipity['dbPrefix']}entryproperties ep_sticky
+ ON (e.id = ep_sticky.entryid AND ep_sticky.property = 'ep_is_sticky')";
+ }
+
$cond = implode("\n", $joins);
if (empty($eventData['joins'])) {
$eventData['joins'] = $cond;
|