From c549b003b73ef6e8e8bbeb30773c26db5ef6a33f Mon Sep 17 00:00:00 2001 From: Ian Date: Thu, 19 Jan 2012 09:35:32 +0100 Subject: [PATCH] guestbook sidebar plugin: fixed show unapproved events --- .../serendipity_plugin_guestbook.php | 28 ++++++++++--------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/serendipity_event_guestbook/serendipity_plugin_guestbook.php b/serendipity_event_guestbook/serendipity_plugin_guestbook.php index c24910bb..6c40b860 100644 --- a/serendipity_event_guestbook/serendipity_plugin_guestbook.php +++ b/serendipity_event_guestbook/serendipity_plugin_guestbook.php @@ -1,4 +1,4 @@ -add('description', PLUGIN_GUESTSIDE_BLAHBLAH); $propbag->add('stackable', false); $propbag->add('author', 'Jaap Boerma ( j@webbict.com ), Tadashi Jokagi , Ian (Timbalu)'); - $propbag->add('version', '1.18'); + $propbag->add('version', '1.19'); $propbag->add('requirements', array( 'serendipity' => '0.7', 'smarty' => '2.6.7', @@ -42,9 +42,9 @@ class serendipity_plugin_guestbook extends serendipity_plugin { ); $this->dependencies = array('serendipity_event_guestbook' => 'keep'); - if(!is_array($serendipity['plugin_guestbook_dependency'])) { - $this->dependency_config_merge($this->conty); - } + #if(!is_array($serendipity['plugin_guestbook_dependency'])) { + # $this->dependency_config_merge($this->conty); + #} } function introspect_config_item($name, &$propbag) { @@ -159,14 +159,16 @@ class serendipity_plugin_guestbook extends serendipity_plugin { $sql .=", email"; } - if($this->get_config('dbversion') == '3.0') { - $sql .=", approved"; - } + #if($this->get_config('dbversion') == '3.0') { + # $sql .=", approved"; + #} - $whe = (serendipity_db_bool($serendipity['plugin_guestbook_dependency']['showapp']) === true || - serendipity_db_bool($serendipity['plugin_guestbook_dependency']['automoderate']) === true) - ? "WHERE approved=1" - : ''; + #$whe = (serendipity_db_bool($serendipity['plugin_guestbook_dependency']['showapp']) === true || + # serendipity_db_bool($serendipity['plugin_guestbook_dependency']['automoderate']) === true) + # ? "WHERE approved=1" + # : ''; + // as of 2012/01/19 disabled all this dependency tweaks, while not in real nead for the sidebar (why did I do this then?) + $whe = "WHERE approved=1"; $sql .=", body FROM {$serendipity['dbPrefix']}guestbook $whe ORDER BY timestamp DESC"; $sql .=" LIMIT ".$max_items;