]> git.mjollnir.org Git - s9y.git/commitdiff
Fix not showing "no frontpage" article not in admin panel
authorgarvinhicking <garvinhicking>
Thu, 4 Aug 2005 09:15:10 +0000 (09:15 +0000)
committergarvinhicking <garvinhicking>
Thu, 4 Aug 2005 09:15:10 +0000 (09:15 +0000)
Fix not showing own entries when person not in userlist

plugins/serendipity_event_entryproperties/serendipity_event_entryproperties.php

index 7335a13f61a150a1eb11a69a745edbebecad0f40..36da2ebd08e62629656ffe8349a1c7ac266abf34 100644 (file)
@@ -43,7 +43,7 @@ class serendipity_event_entryproperties extends serendipity_event
         $propbag->add('description',   PLUGIN_EVENT_ENTRYPROPERTIES_DESC);
         $propbag->add('stackable',     false);
         $propbag->add('author',        'Garvin Hicking');
-        $propbag->add('version',       '1.4');
+        $propbag->add('version',       '1.5');
         $propbag->add('requirements',  array(
             'serendipity' => '0.8',
             'smarty'      => '2.6.7',
@@ -496,13 +496,13 @@ class serendipity_event_entryproperties extends serendipity_event
                         }
                         
                         if ($use_users) {
-                            $conds[] = " (ep_access_users.property IS NULL OR (ep_access.value = 'member' AND ep_access_users.value LIKE '%;" . (int)$serendipity['authorid'] . ";%')) ";
+                            $conds[] = " (ep_access_users.property IS NULL OR (ep_access.value = 'member' AND (ep_access_users.value LIKE '%;" . (int)$serendipity['authorid'] . ";%' OR e.authorid = " . (int)$serendipity['authorid'] . "))) ";
                         }
                     } else {
                         $conds[] = " (ep_access.property IS NULL OR ep_access.value = 'public') ";
                     }
 
-                    if (!isset($serendipity['GET']['category']) && $event == 'frontend_fetchentries') {
+                    if (!isset($serendipity['GET']['category']) && !isset($serendipity['GET']['adminModule']) && $event == 'frontend_fetchentries') {
                         $conds[] = " (ep_no_frontpage.property IS NULL OR ep_no_frontpage.value != 'true') ";
                         $joins[] = "LEFT OUTER JOIN {$serendipity['dbPrefix']}entryproperties ep_no_frontpage
                                                  ON (e.id = ep_no_frontpage.entryid AND ep_no_frontpage.property = 'ep_no_frontpage')";