From: garvinhicking Date: Mon, 10 Jul 2006 11:30:03 +0000 (+0000) Subject: fix bug by falk :) X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=e2ca659b18aa652547d691c542db32390cce5331;p=s9y.git fix bug by falk :) --- diff --git a/plugins/serendipity_event_entryproperties/serendipity_event_entryproperties.php b/plugins/serendipity_event_entryproperties/serendipity_event_entryproperties.php index 4d23068..6e7c9d0 100644 --- a/plugins/serendipity_event_entryproperties/serendipity_event_entryproperties.php +++ b/plugins/serendipity_event_entryproperties/serendipity_event_entryproperties.php @@ -21,7 +21,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.11'); + $propbag->add('version', '1.12'); $propbag->add('requirements', array( 'serendipity' => '0.8', 'smarty' => '2.6.7', @@ -138,7 +138,7 @@ class serendipity_event_entryproperties extends serendipity_event static $supported_properties = null; if ($supported_properties === null) { - $supported_properties = array('is_sticky', 'access', 'access_groups', 'access_users', 'cache_body', 'cache_extended', 'no_frontpage', 'hiderss', 'password'); + $supported_properties = array('is_sticky', 'access', 'access_groups', 'access_users', 'cache_body', 'cache_extended', 'no_frontpage', 'hiderss', 'entrypassword'); $fields = explode(',', trim($this->get_config('customfields'))); if (is_array($fields) && count($fields) > 0) { @@ -287,8 +287,8 @@ class serendipity_event_entryproperties extends serendipity_event $access_users = array(); } - if (isset($eventData['properties']['ep_password'])) { - $password = $eventData['properties']['ep_password']; + if (isset($eventData['properties']['ep_entrypassword'])) { + $password = $eventData['properties']['ep_entrypassword']; } elseif (isset($serendipity['POST']['properties']['entrypassword'])) { $password = $serendipity['POST']['properties']['entrypassword']; } else { @@ -621,9 +621,9 @@ class serendipity_event_entryproperties extends serendipity_event } } - if (isset($serendipity['GET']['id']) && isset($eventData[0]['properties']['ep_password'])) { - - if (isset($_SESSION['entrypassword_unlocked'][$serendipity['GET']['id']]) || $eventData[0]['properties']['ep_password'] == $serendipity['POST']['entrypassword']) { + if (isset($serendipity['GET']['id']) && isset($eventData[0]['properties']['ep_entrypassword'])) { + + if (isset($_SESSION['entrypassword_unlocked'][$serendipity['GET']['id']]) || $eventData[0]['properties']['ep_entrypassword'] == $serendipity['POST']['entrypassword']) { // Do not show login form again, once we have first enabled it. $_SESSION['entrypassword_unlocked'][$serendipity['GET']['id']] = true; } else {