From 9839d13d7ceaeb6df2cc0ab341c98c94fa01834d Mon Sep 17 00:00:00 2001 From: CaMer0n Date: Wed, 4 Nov 2009 03:37:56 +0000 Subject: [PATCH] More comment work --- e107_admin/comment.php | 19 ++++++++----------- e107_admin/update_routines.php | 8 +++++--- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/e107_admin/comment.php b/e107_admin/comment.php index 02e1965f2..654bf6962 100644 --- a/e107_admin/comment.php +++ b/e107_admin/comment.php @@ -11,8 +11,8 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/e107_admin/comment.php,v $ -| $Revision: 1.7 $ -| $Date: 2009-11-04 03:07:39 $ +| $Revision: 1.8 $ +| $Date: 2009-11-04 03:37:56 $ | $Author: e107coders $ +----------------------------------------------------------------------------+ */ @@ -57,7 +57,7 @@ class comments_admin_ui extends e_admin_ui protected $pluginName = 'comments'; protected $table = "comments"; protected $pid = "comment_id"; - protected $perPage = 20; + protected $perPage = 10; protected $batchDelete = true; protected $fields = array( @@ -65,21 +65,18 @@ class comments_admin_ui extends e_admin_ui 'comment_id' => array('title'=> ID, 'type' => 'int', 'width' =>'5%', 'forced'=> TRUE, 'primary'=>TRUE), 'comment_item_id' => array('title'=> "item id", 'type' => 'text', 'width' => 'auto'), 'comment_subject' => array('title'=> "subject", 'type' => 'text', 'width' => 'auto', 'thclass' => 'left first'), // Display name - 'comment_author_id' => array('title'=> "authorID", 'type' => 'text', 'width' => 'auto'), // User name + 'comment_comment' => array('title'=> "comment", 'type' => 'text', 'width' => 'auto'), // Display name + 'comment_author_id' => array('title'=> "authorID", 'type' => 'text', 'width' => 'auto'), // User name 'comment_author_name' => array('title'=> "authorName", 'type' => 'text', 'width' => 'auto'), // User name - 'comment_comment' => array('title'=> "comment", 'type' => 'text', 'width' => 'auto'), // Display name 'comment_datestamp' => array('title'=> "datestamp", 'type' => 'text', 'width' => 'auto'), // User name 'comment_blocked' => array('title'=> "blocked", 'type' => 'text', 'width' => 'auto'), // Photo 'comment_ip' => array('title'=> "IP", 'type' => 'text', 'width' => '10%', 'thclass' => 'center' ), // Real name (no real vetting) 'comment_type' => array('title'=> "Type", 'type' => 'method', 'width' => '10%', 'thclass' => 'center', 'filter'=>TRUE,'batch'=>TRUE ), // No real vetting 'comment_lock' => array('title'=> "Lock", 'type' => 'text', 'width' => 'auto'), - - // 'page_ip_restrict' => array('title'=> LAN_USER_07, 'type' => 'text', 'width' => 'auto'), // Avatar - - 'options' => array('title'=> LAN_OPTIONS, 'forced'=>TRUE, 'width' => '10%', 'thclass' => 'center last', 'class' => 'center') + 'options' => array('title'=> LAN_OPTIONS, 'forced'=>TRUE, 'width' => '10%', 'thclass' => 'center last', 'class' => 'center') ); //required (but should be optional) - default column user prefs - protected $fieldpref = array('checkboxes', 'comment_id', 'comment_item_id', 'comment_author_id', 'comment_author_name', 'comment_subject', 'comment_type', 'options'); + protected $fieldpref = array('checkboxes', 'comment_id', 'comment_item_id', 'comment_author_id', 'comment_author_name', 'comment_subject', 'comment_comment', 'comment_type', 'options'); // optional, if $pluginName == 'core', core prefs will be used, else e107::getPluginConfig($pluginName); @@ -95,7 +92,7 @@ class comments_admin_ui extends e_admin_ui } -//TODO Block and Unblock buttons +//TODO Block and Unblock buttons, moderated comments? class comments_admin_form_ui extends e_admin_form_ui { function comment_type($curVal,$mode) // not really necessary since we can use 'dropdown' - but just an example of a custom function. diff --git a/e107_admin/update_routines.php b/e107_admin/update_routines.php index 543ce1992..009f01790 100644 --- a/e107_admin/update_routines.php +++ b/e107_admin/update_routines.php @@ -11,8 +11,8 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/e107_admin/update_routines.php,v $ -| $Revision: 1.56 $ -| $Date: 2009-10-24 07:52:32 $ +| $Revision: 1.57 $ +| $Date: 2009-11-04 03:37:56 $ | $Author: e107coders $ +----------------------------------------------------------------------------+ */ @@ -195,6 +195,7 @@ function update_core_prefs($type='') $accum = array(); $just_check = $type == 'do' ? FALSE : TRUE; // TRUE if we're just seeing if an update is needed + foreach ($should as $k => $v) { if ($k && !array_key_exists($k,$pref)) @@ -261,7 +262,8 @@ function update_706_to_800($type='') // List of changed DB tables (defined in core_sql.php) // (primarily those which have changed significantly; for the odd field write some explicit code - it'll run faster) - $changed_tables = array('user', 'dblog','admin_log', 'userclass_classes', 'banlist', 'menus', 'plugin', 'news', 'news_category'); + $changed_tables = array('user', 'dblog','admin_log', 'userclass_classes', 'banlist', 'menus', + 'plugin', 'news', 'news_category','online'); // List of changed DB tables from core plugins (defined in pluginname_sql.php file)