From geeklog-cvs at lists.geeklog.net Sun Feb 1 03:16:25 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 01 Feb 2009 03:16:25 -0500 Subject: [geeklog-cvs] bad_behavior2: Added tag bad_behavior2_0_25 for changeset f3d741... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/52aaf58fe42f changeset: 7:52aaf58fe42f user: Dirk Haun date: Sun Feb 01 09:16:11 2009 +0100 description: Added tag bad_behavior2_0_25 for changeset f3d741c1b860 diffstat: 1 file changed, 1 insertion(+) .hgtags | 1 + diffs (8 lines): diff -r f3d741c1b860 -r 52aaf58fe42f .hgtags --- a/.hgtags Fri Nov 21 13:11:20 2008 +0100 +++ b/.hgtags Sun Feb 01 09:16:11 2009 +0100 @@ -1,3 +1,4 @@ 0000000000000000000000000000000000000000 bad_behavior2_0_23 2a0f46e172cf283f5e5eb3ad8e40bc6eb4e9bdce bad_behavior2_0_23 295e0e69e02339db41ea1d5f5e8ca2693131e4f6 bad_behavior2_0_24 +f3d741c1b8604cc5f669b2a1cfbb2d12c567d7b2 bad_behavior2_0_25 From geeklog-cvs at lists.geeklog.net Sun Feb 1 03:18:25 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 01 Feb 2009 03:18:25 -0500 Subject: [geeklog-cvs] bad_behavior2: Added tag bad_behavior2_0_26 for changeset 3cf973... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/af66f081058a changeset: 9:af66f081058a user: Dirk Haun date: Sun Feb 01 09:18:15 2009 +0100 description: Added tag bad_behavior2_0_26 for changeset 3cf973786d8b diffstat: 1 file changed, 1 insertion(+) .hgtags | 1 + diffs (8 lines): diff -r 3cf973786d8b -r af66f081058a .hgtags --- a/.hgtags Sun Feb 01 09:17:55 2009 +0100 +++ b/.hgtags Sun Feb 01 09:18:15 2009 +0100 @@ -2,3 +2,4 @@ 2a0f46e172cf283f5e5eb3ad8e40bc6eb4e9bdce bad_behavior2_0_23 295e0e69e02339db41ea1d5f5e8ca2693131e4f6 bad_behavior2_0_24 f3d741c1b8604cc5f669b2a1cfbb2d12c567d7b2 bad_behavior2_0_25 +3cf973786d8b661642017112ebfc00ff2c17c054 bad_behavior2_0_26 From geeklog-cvs at lists.geeklog.net Sun Feb 1 03:18:25 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 01 Feb 2009 03:18:25 -0500 Subject: [geeklog-cvs] bad_behavior2: Upgraded to Bad Behavior 2.0.26 Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/3cf973786d8b changeset: 8:3cf973786d8b user: Dirk Haun date: Sun Feb 01 09:17:55 2009 +0100 description: Upgraded to Bad Behavior 2.0.26 diffstat: 7 files changed, 23 insertions(+), 11 deletions(-) INSTALL.txt | 10 +++++----- public_html/README.txt | 4 ++-- public_html/bad-behavior-wordpress-admin.php | 2 +- public_html/bad-behavior-wordpress.php | 2 +- public_html/bad-behavior/blackhole.inc.php | 11 +++++++++++ public_html/bad-behavior/msie.inc.php | 3 ++- public_html/bad-behavior/version.inc.php | 2 +- diffs (127 lines): diff -r 52aaf58fe42f -r 3cf973786d8b INSTALL.txt --- a/INSTALL.txt Sun Feb 01 09:16:11 2009 +0100 +++ b/INSTALL.txt Sun Feb 01 09:17:55 2009 +0100 @@ -1,4 +1,4 @@ -Bad Behavior2 Plugin v2.0.25 for Geeklog v1.4.1 and later +Bad Behavior2 Plugin v2.0.26 for Geeklog v1.4.1 and later - Bad Behavior 2 is Copyright (c) 2005-2008 Michael Hampton. All rights reserved. Original Geeklog Plugin by Dirk Haun @@ -18,7 +18,7 @@ With one exception (see step 5), this plugin installs like any other Geeklog plugin: -1) Unpack bad_behavior2_2.0.25-1.4.1.tar.gz +1) Unpack bad_behavior2_2.0.26-1.4.1.tar.gz 2) Upload the contents of the public_html directory into /path/to/geeklog/public_html/bad_behavior2 3) Upload the contents of the admin directory into @@ -47,7 +47,7 @@ UPGRADING If you are upgrading from v1.2.4-1 you must first uninstall the existing -plugin before you install v2.0.25. +plugin before you install v2.0.26. - Perform a standard plugin uninstall - Plugins -> Bad Behavior - Delete - Do not forget to remove the Bad Behavior 1 lib-common.php entry @@ -132,8 +132,8 @@ Copyright -Bad Behavior is (c) 2005-2008 by Michael Hampton and released under the GPL -The Geeklog plugin is (c) 2005-2008 Dirk Haun and also released under the GPL +Bad Behavior is (c) 2005-2009 by Michael Hampton and released under the GPL +The Geeklog plugin is (c) 2005-2009 Dirk Haun and also released under the GPL Original upgrade to Bad Behavior v2.0.x by Mark Evans - GPL'ed of course... Please see the included file COPYING (in public_html) for license details. diff -r 52aaf58fe42f -r 3cf973786d8b public_html/README.txt --- a/public_html/README.txt Sun Feb 01 09:16:11 2009 +0100 +++ b/public_html/README.txt Sun Feb 01 09:17:55 2009 +0100 @@ -3,8 +3,8 @@ Contributors: error, MarkJaquith, Firas, skeltoac Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=error%40ioerror%2eus&item_name=Bad%20Behavior%20%28From%20WordPress%20Page%29&no_shipping=1&cn=Comments%20about%20Bad%20Behavior&tax=0¤cy_code=USD&bn=PP%2dDonationsBF&charset=UTF%2d8 Requires at least: 1.2 -Tested up to: 2.7 -Stable tag: 2.0.25 +Tested up to: 2.8 +Stable tag: 2.0.26 Welcome to a whole new way of keeping your blog, forum, guestbook, wiki or content management system free of link spam. Bad Behavior is a PHP-based diff -r 52aaf58fe42f -r 3cf973786d8b public_html/bad-behavior-wordpress-admin.php --- a/public_html/bad-behavior-wordpress-admin.php Sun Feb 01 09:16:11 2009 +0100 +++ b/public_html/bad-behavior-wordpress-admin.php Sun Feb 01 09:17:55 2009 +0100 @@ -167,7 +167,7 @@ echo "\n"; $headers = str_replace("\n", "
\n", htmlspecialchars($result['http_headers'])); if (@strpos($headers, $result['user_agent']) !== FALSE) $headers = substr_replace($headers, "" . $result['user_agent'] . "", strpos($headers, $result['user_agent']), strlen($result['user_agent'])); - if (strpos($headers, $result['request_method']) !== FALSE) $headers = substr_replace($headers, "" . $result['request_method'] . "", strpos($headers, $result['request_method']), strlen($result['request_method'])); + if (@strpos($headers, $result['request_method']) !== FALSE) $headers = substr_replace($headers, "" . $result['request_method'] . "", strpos($headers, $result['request_method']), strlen($result['request_method'])); echo "$headers\n"; echo "" . str_replace("\n", "
\n", htmlspecialchars($result["request_entity"])) . "\n"; echo "\n"; diff -r 52aaf58fe42f -r 3cf973786d8b public_html/bad-behavior-wordpress.php --- a/public_html/bad-behavior-wordpress.php Sun Feb 01 09:16:11 2009 +0100 +++ b/public_html/bad-behavior-wordpress.php Sun Feb 01 09:17:55 2009 +0100 @@ -1,7 +1,7 @@ From geeklog-cvs at lists.geeklog.net Sun Feb 1 03:49:16 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 01 Feb 2009 03:49:16 -0500 Subject: [geeklog-cvs] geeklog: Forgot to check group membership again when sending the... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/99c4995f2ef1 changeset: 6743:99c4995f2ef1 user: Dirk Haun date: Sun Feb 01 09:49:03 2009 +0100 description: Forgot to check group membership again when sending the emails diffstat: 1 file changed, 20 insertions(+), 12 deletions(-) public_html/admin/mail.php | 32 ++++++++++++++++++++------------ diffs (64 lines): diff -r 3ccf161b2de2 -r 99c4995f2ef1 public_html/admin/mail.php --- a/public_html/admin/mail.php Sat Jan 31 22:44:58 2009 +0100 +++ b/public_html/admin/mail.php Sun Feb 01 09:49:03 2009 +0100 @@ -114,23 +114,31 @@ * @return string HTML with success or error message * */ -function send_messages ($vars) +function send_messages($vars) { global $_CONF, $_TABLES, $LANG31; - require_once($_CONF['path_system'] . 'lib-user.php'); + require_once $_CONF['path_system'] . 'lib-user.php'; $retval = ''; - if (empty ($vars['fra']) OR empty ($vars['fraepost']) OR - empty ($vars['subject']) OR empty ($vars['message']) OR - empty ($vars['to_group'])) { - $retval .= COM_startBlock ($LANG31[1], '', - COM_getBlockTemplate ('_msg_block', 'header')); - $retval .= $LANG31[26]; - $retval .= COM_endBlock (COM_getBlockTemplate ('_msg_block', 'footer')); + if (empty($vars['fra']) OR empty($vars['fraepost']) OR + empty($vars['subject']) OR empty($vars['message']) OR + empty($vars['to_group'])) { + $retval .= COM_showMessageText($LANG31[26]); return $retval; + } + + $to_group = COM_applyFilter($vars['to_group'], true); + if ($to_group > 0) { + $group_name = DB_getItem($_TABLES['groups'], 'grp_name', + "grp_id = $to_group"); + if (! SEC_inGroup($group_name)) { + return COM_refresh($_CONF['site_admin_url'] . '/mail.php'); + } + } else { + return COM_refresh($_CONF['site_admin_url'] . '/mail.php'); } // Urgent message! @@ -147,16 +155,16 @@ $html = false; } - $groupList = implode (',', USER_getChildGroups($vars['to_group'])); + $groupList = implode(',', USER_getChildGroups($to_group)); // and now mail it if (isset ($vars['overstyr'])) { $sql = "SELECT DISTINCT username,fullname,email FROM {$_TABLES['users']},{$_TABLES['group_assignments']} WHERE uid > 1"; - $sql .= " AND {$_TABLES['users']}.status = 3 AND ((email is not null) and (email != ''))"; + $sql .= " AND {$_TABLES['users']}.status = 3 AND ((email IS NOT NULL) and (email != ''))"; $sql .= " AND {$_TABLES['users']}.uid = ug_uid AND ug_main_grp_id IN ({$groupList})"; } else { $sql = "SELECT DISTINCT username,fullname,email,emailfromadmin FROM {$_TABLES['users']},{$_TABLES['userprefs']},{$_TABLES['group_assignments']} WHERE {$_TABLES['users']}.uid > 1"; - $sql .= " AND {$_TABLES['users']}.status = 3 AND ((email is not null) and (email != ''))"; + $sql .= " AND {$_TABLES['users']}.status = 3 AND ((email IS NOT NULL) and (email != ''))"; $sql .= " AND {$_TABLES['users']}.uid = {$_TABLES['userprefs']}.uid AND emailfromadmin = 1"; $sql .= " AND ug_uid = {$_TABLES['users']}.uid AND ug_main_grp_id IN ({$groupList})"; } From geeklog-cvs at lists.geeklog.net Sun Feb 1 03:49:16 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 01 Feb 2009 03:49:16 -0500 Subject: [geeklog-cvs] geeklog: Let users with user.mail permissions only email groups ... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/3ccf161b2de2 changeset: 6742:3ccf161b2de2 user: Dirk Haun date: Sat Jan 31 22:44:58 2009 +0100 description: Let users with user.mail permissions only email groups that they are in themselves diffstat: 2 files changed, 13 insertions(+), 15 deletions(-) public_html/admin/mail.php | 26 +++++++++++--------------- public_html/docs/history | 2 ++ diffs (69 lines): diff -r 39b5799ac006 -r 3ccf161b2de2 public_html/admin/mail.php --- a/public_html/admin/mail.php Sat Jan 31 22:17:59 2009 +0100 +++ b/public_html/admin/mail.php Sat Jan 31 22:44:58 2009 +0100 @@ -2,13 +2,13 @@ /* Reminder: always indent with 4 spaces (no tabs). */ // +---------------------------------------------------------------------------+ -// | Geeklog 1.5 | +// | Geeklog 1.6 | // +---------------------------------------------------------------------------+ // | mail.php | // | | // | Geeklog mail administration page. | // +---------------------------------------------------------------------------+ -// | Copyright (C) 2001-2008 by the following authors: | +// | Copyright (C) 2001-2009 by the following authors: | // | | // | Authors: Tony Bibbs - tony AT tonybibbs DOT com | // | Dirk Haun - dirk AT haun-online DOT de | @@ -29,8 +29,6 @@ // | Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | // | | // +---------------------------------------------------------------------------+ -// -// $Id: mail.php,v 1.37 2008/05/27 20:53:10 dhaun Exp $ require_once '../lib-common.php'; require_once 'auth.inc.php'; @@ -72,19 +70,17 @@ $mail_templates->set_var ('lang_note', $LANG31[19]); $mail_templates->set_var ('lang_to', $LANG31[18]); $mail_templates->set_var ('lang_selectgroup', $LANG31[25]); + + $thisUsersGroups = SEC_getUserGroups(); + uksort($thisUsersGroups, 'strcasecmp'); $group_options = ''; - $result = DB_query("SELECT grp_id, grp_name FROM {$_TABLES['groups']} WHERE grp_name <> 'All Users'"); - $nrows = DB_numRows ($result); - $groups = array (); - for ($i = 0; $i < $nrows; $i++) { - $A = DB_fetchArray ($result); - $groups[$A['grp_id']] = ucwords ($A['grp_name']); + foreach ($thisUsersGroups as $groupName => $groupID) { + if ($groupName != 'All Users') { + $group_options .= ''; + } } - asort ($groups); - foreach ($groups as $groupID => $groupName) { - $group_options .= ''; - } + $mail_templates->set_var ('group_options', $group_options); $mail_templates->set_var ('lang_from', $LANG31[2]); $mail_templates->set_var ('site_name', $_CONF['site_name']); diff -r 39b5799ac006 -r 3ccf161b2de2 public_html/docs/history --- a/public_html/docs/history Sat Jan 31 22:17:59 2009 +0100 +++ b/public_html/docs/history Sat Jan 31 22:44:58 2009 +0100 @@ -11,6 +11,8 @@ + (TBD) Comment moderation and editable comments, by Jared Wenerd Other changes: +- Let users with user.mail permissions only email groups that they are in + themselves [Dirk] - Gave the Groups and User editors a facelift. Requires a new template file, admin/lists/inline.thtml [Dirk] - Add new permissions plugin.install and plugin.upload for more fine-grained From geeklog-cvs at lists.geeklog.net Sun Feb 1 03:49:16 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 01 Feb 2009 03:49:16 -0500 Subject: [geeklog-cvs] geeklog: Let users with user.mail permissions only email groups ... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/3ccf161b2de2 changeset: 6742:3ccf161b2de2 user: Dirk Haun date: Sat Jan 31 22:44:58 2009 +0100 description: Let users with user.mail permissions only email groups that they are in themselves diffstat: 2 files changed, 13 insertions(+), 15 deletions(-) public_html/admin/mail.php | 26 +++++++++++--------------- public_html/docs/history | 2 ++ diffs (69 lines): diff -r 39b5799ac006 -r 3ccf161b2de2 public_html/admin/mail.php --- a/public_html/admin/mail.php Sat Jan 31 22:17:59 2009 +0100 +++ b/public_html/admin/mail.php Sat Jan 31 22:44:58 2009 +0100 @@ -2,13 +2,13 @@ /* Reminder: always indent with 4 spaces (no tabs). */ // +---------------------------------------------------------------------------+ -// | Geeklog 1.5 | +// | Geeklog 1.6 | // +---------------------------------------------------------------------------+ // | mail.php | // | | // | Geeklog mail administration page. | // +---------------------------------------------------------------------------+ -// | Copyright (C) 2001-2008 by the following authors: | +// | Copyright (C) 2001-2009 by the following authors: | // | | // | Authors: Tony Bibbs - tony AT tonybibbs DOT com | // | Dirk Haun - dirk AT haun-online DOT de | @@ -29,8 +29,6 @@ // | Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | // | | // +---------------------------------------------------------------------------+ -// -// $Id: mail.php,v 1.37 2008/05/27 20:53:10 dhaun Exp $ require_once '../lib-common.php'; require_once 'auth.inc.php'; @@ -72,19 +70,17 @@ $mail_templates->set_var ('lang_note', $LANG31[19]); $mail_templates->set_var ('lang_to', $LANG31[18]); $mail_templates->set_var ('lang_selectgroup', $LANG31[25]); + + $thisUsersGroups = SEC_getUserGroups(); + uksort($thisUsersGroups, 'strcasecmp'); $group_options = ''; - $result = DB_query("SELECT grp_id, grp_name FROM {$_TABLES['groups']} WHERE grp_name <> 'All Users'"); - $nrows = DB_numRows ($result); - $groups = array (); - for ($i = 0; $i < $nrows; $i++) { - $A = DB_fetchArray ($result); - $groups[$A['grp_id']] = ucwords ($A['grp_name']); + foreach ($thisUsersGroups as $groupName => $groupID) { + if ($groupName != 'All Users') { + $group_options .= ''; + } } - asort ($groups); - foreach ($groups as $groupID => $groupName) { - $group_options .= ''; - } + $mail_templates->set_var ('group_options', $group_options); $mail_templates->set_var ('lang_from', $LANG31[2]); $mail_templates->set_var ('site_name', $_CONF['site_name']); diff -r 39b5799ac006 -r 3ccf161b2de2 public_html/docs/history --- a/public_html/docs/history Sat Jan 31 22:17:59 2009 +0100 +++ b/public_html/docs/history Sat Jan 31 22:44:58 2009 +0100 @@ -11,6 +11,8 @@ + (TBD) Comment moderation and editable comments, by Jared Wenerd Other changes: +- Let users with user.mail permissions only email groups that they are in + themselves [Dirk] - Gave the Groups and User editors a facelift. Requires a new template file, admin/lists/inline.thtml [Dirk] - Add new permissions plugin.install and plugin.upload for more fine-grained From geeklog-cvs at lists.geeklog.net Sun Feb 1 07:35:08 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 01 Feb 2009 07:35:08 -0500 Subject: [geeklog-cvs] geeklog: Added an ISO 8601-ish format to the gl_dateformats table Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/29e633449941 changeset: 6744:29e633449941 user: Dirk Haun date: Sun Feb 01 10:57:08 2009 +0100 description: Added an ISO 8601-ish format to the gl_dateformats table diffstat: 6 files changed, 32 insertions(+) public_html/admin/install/lib-upgrade.php | 1 + public_html/docs/history | 1 + sql/mssql_tableanddata.php | 1 + sql/mysql_tableanddata.php | 1 + sql/updates/mssql_1.5.2_to_1.6.0.php | 14 ++++++++++++++ sql/updates/mysql_1.5.2_to_1.6.0.php | 14 ++++++++++++++ diffs (88 lines): diff -r 99c4995f2ef1 -r 29e633449941 public_html/admin/install/lib-upgrade.php --- a/public_html/admin/install/lib-upgrade.php Sun Feb 01 09:49:03 2009 +0100 +++ b/public_html/admin/install/lib-upgrade.php Sun Feb 01 10:57:08 2009 +0100 @@ -465,6 +465,7 @@ update_ConfValues(); upgrade_addPluginPermissions(); + upgrade_addIsoFormat(); $current_gl_version = '1.6.0'; $_SQL = ''; diff -r 99c4995f2ef1 -r 29e633449941 public_html/docs/history --- a/public_html/docs/history Sun Feb 01 09:49:03 2009 +0100 +++ b/public_html/docs/history Sun Feb 01 10:57:08 2009 +0100 @@ -11,6 +11,7 @@ + (TBD) Comment moderation and editable comments, by Jared Wenerd Other changes: +- Added an ISO 8601-ish format to the gl_dateformats table [Dirk] - Let users with user.mail permissions only email groups that they are in themselves [Dirk] - Gave the Groups and User editors a facelift. Requires a new template file, diff -r 99c4995f2ef1 -r 29e633449941 sql/mssql_tableanddata.php --- a/sql/mssql_tableanddata.php Sun Feb 01 09:49:03 2009 +0100 +++ b/sql/mssql_tableanddata.php Sun Feb 01 10:57:08 2009 +0100 @@ -1234,6 +1234,7 @@ $_SQL[] = "INSERT INTO {$_TABLES['dateformats']} (dfid, format, description) VALUES (16,'%y-%m-%d %I:%M','99-03-21 10:00')"; $_SQL[] = "INSERT INTO {$_TABLES['dateformats']} (dfid, format, description) VALUES (17,'%d/%m/%y %H:%M','21/03/99 22:00')"; $_SQL[] = "INSERT INTO {$_TABLES['dateformats']} (dfid, format, description) VALUES (18,'%a %d %b %I:%M%p','Sun 21 Mar 10:00PM')"; +$_SQL[] = "INSERT INTO {$_TABLES['dateformats']} (dfid, format, description) VALUES (19,'%Y-%m-%d %H:%M','1999-03-21 22:00')"; $_SQL[] = "INSERT INTO {$_TABLES['featurecodes']} (code, name) VALUES (0,'Not Featured')"; $_SQL[] = "INSERT INTO {$_TABLES['featurecodes']} (code, name) VALUES (1,'Featured')"; diff -r 99c4995f2ef1 -r 29e633449941 sql/mysql_tableanddata.php --- a/sql/mysql_tableanddata.php Sun Feb 01 09:49:03 2009 +0100 +++ b/sql/mysql_tableanddata.php Sun Feb 01 10:57:08 2009 +0100 @@ -553,6 +553,7 @@ $_DATA[] = "INSERT INTO {$_TABLES['dateformats']} (dfid, format, description) VALUES (16,'%y-%m-%d %I:%M','99-03-21 10:00') "; $_DATA[] = "INSERT INTO {$_TABLES['dateformats']} (dfid, format, description) VALUES (17,'%d/%m/%y %H:%M','21/03/99 22:00') "; $_DATA[] = "INSERT INTO {$_TABLES['dateformats']} (dfid, format, description) VALUES (18,'%a %d %b %I:%M%p','Sun 21 Mar 10:00PM') "; +$_DATA[] = "INSERT INTO {$_TABLES['dateformats']} (dfid, format, description) VALUES (19,'%Y-%m-%d %H:%M','1999-03-21 22:00') "; $_DATA[] = "INSERT INTO {$_TABLES['featurecodes']} (code, name) VALUES (0,'Not Featured') "; $_DATA[] = "INSERT INTO {$_TABLES['featurecodes']} (code, name) VALUES (1,'Featured') "; diff -r 99c4995f2ef1 -r 29e633449941 sql/updates/mssql_1.5.2_to_1.6.0.php --- a/sql/updates/mssql_1.5.2_to_1.6.0.php Sun Feb 01 09:49:03 2009 +0100 +++ b/sql/updates/mssql_1.5.2_to_1.6.0.php Sun Feb 01 10:57:08 2009 +0100 @@ -48,4 +48,18 @@ } } +/** + * Add ISO 8601-ish date/time format + * + */ +function upgrade_addIsoFormat() +{ + global $_TABLES; + + $maxid = DB_getItem($_TABLES['dateformats'], 'MAX(dfid)'); + $maxid++; + DB_save($_TABLES['dateformats'], 'dfid,format,description', + "$maxid,'%Y-%m-%d %H:%M','1999-03-21 22:00'"); +} + ?> diff -r 99c4995f2ef1 -r 29e633449941 sql/updates/mysql_1.5.2_to_1.6.0.php --- a/sql/updates/mysql_1.5.2_to_1.6.0.php Sun Feb 01 09:49:03 2009 +0100 +++ b/sql/updates/mysql_1.5.2_to_1.6.0.php Sun Feb 01 10:57:08 2009 +0100 @@ -49,4 +49,18 @@ } } +/** + * Add ISO 8601-ish date/time format + * + */ +function upgrade_addIsoFormat() +{ + global $_TABLES; + + $maxid = DB_getItem($_TABLES['dateformats'], 'MAX(dfid)'); + $maxid++; + DB_save($_TABLES['dateformats'], 'dfid,format,description', + "$maxid,'%Y-%m-%d %H:%M','1999-03-21 22:00'"); +} + ?> From geeklog-cvs at lists.geeklog.net Sun Feb 1 07:35:09 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 01 Feb 2009 07:35:09 -0500 Subject: [geeklog-cvs] geeklog: Sort groups non-case sensitive Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/d3f66f393a12 changeset: 6745:d3f66f393a12 user: Dirk Haun date: Sun Feb 01 11:26:53 2009 +0100 description: Sort groups non-case sensitive diffstat: 1 file changed, 3 insertions(+), 5 deletions(-) system/lib-security.php | 8 +++----- diffs (37 lines): diff -r 29e633449941 -r d3f66f393a12 system/lib-security.php --- a/system/lib-security.php Sun Feb 01 10:57:08 2009 +0100 +++ b/system/lib-security.php Sun Feb 01 11:26:53 2009 +0100 @@ -2,13 +2,13 @@ /* Reminder: always indent with 4 spaces (no tabs). */ // +---------------------------------------------------------------------------+ -// | Geeklog 1.5 | +// | Geeklog 1.6 | // +---------------------------------------------------------------------------+ // | lib-security.php | // | | // | Geeklog security library. | // +---------------------------------------------------------------------------+ -// | Copyright (C) 2000-2008 by the following authors: | +// | Copyright (C) 2000-2009 by the following authors: | // | | // | Authors: Tony Bibbs - tony AT tonybibbs DOT com | // | Mark Limburg - mlimburg AT users DOT sourceforge DOT net | @@ -31,8 +31,6 @@ // | Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | // | | // +---------------------------------------------------------------------------+ -// -// $Id: lib-security.php,v 1.75 2008/09/21 08:37:11 dhaun Exp $ /** * This is the security library for Geeklog. This is used to implement Geeklog's @@ -151,7 +149,7 @@ } } - ksort($groups); + uksort($groups, 'strcasecmp'); if ($_SEC_VERBOSE) { COM_errorLog("****************leaving getusergroups(uid=$uid)***************",1); From geeklog-cvs at lists.geeklog.net Sun Feb 1 07:35:10 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 01 Feb 2009 07:35:10 -0500 Subject: [geeklog-cvs] geeklog: Some comments ... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/ae2e81cceb5c changeset: 6746:ae2e81cceb5c user: Dirk Haun date: Sun Feb 01 13:19:00 2009 +0100 description: Some comments ... diffstat: 1 file changed, 43 insertions(+) system/lib-admin.php | 43 +++++++++++++++++++++++++++++++++++++++++++ diffs (109 lines): diff -r d3f66f393a12 -r ae2e81cceb5c system/lib-admin.php --- a/system/lib-admin.php Sun Feb 01 11:26:53 2009 +0100 +++ b/system/lib-admin.php Sun Feb 01 13:19:00 2009 +0100 @@ -602,6 +602,17 @@ } +/** + * The following functions are helper functions used as $fieldfunction with + * ADMIN_list and ADMIN_simpleList (see above) + * + */ + + +/** + * used for the list of blocks in admin/block.php + * + */ function ADMIN_getListField_blocks($fieldname, $fieldvalue, $A, $icon_arr, $token) { global $_CONF, $LANG_ADMIN, $LANG21, $_IMAGE_TYPE; @@ -667,6 +678,10 @@ return $retval; } +/** + * used for the list of groups and in the group editor in admin/group.php + * + */ function ADMIN_getListField_groups($fieldname, $fieldvalue, $A, $icon_arr, $selected = '') { global $_CONF, $LANG_ACCESS, $LANG_ADMIN, $thisUsersGroups; @@ -739,6 +754,10 @@ return $retval; } +/** + * used for the list of users in admin/user.php + * + */ function ADMIN_getListField_users($fieldname, $fieldvalue, $A, $icon_arr) { global $_CONF, $_TABLES, $LANG_ADMIN, $LANG04, $LANG28, $_IMAGE_TYPE; @@ -818,6 +837,10 @@ return $retval; } +/** + * used for the list of stories in admin/story.php + * + */ function ADMIN_getListField_stories($fieldname, $fieldvalue, $A, $icon_arr) { global $_CONF, $_TABLES, $LANG_ADMIN, $LANG24, $LANG_ACCESS, $_IMAGE_TYPE; @@ -912,6 +935,10 @@ return $retval; } +/** + * used for the list of feeds in admin/syndication.php + * + */ function ADMIN_getListField_syndication($fieldname, $fieldvalue, $A, $icon_arr, $token) { global $_CONF, $_TABLES, $LANG_ADMIN, $LANG33, $_IMAGE_TYPE; @@ -967,6 +994,10 @@ return $retval; } +/** + * used for the list of plugins in admin/plugins.php + * + */ function ADMIN_getListField_plugins($fieldname, $fieldvalue, $A, $icon_arr, $token) { global $_CONF, $LANG_ADMIN, $LANG32; @@ -1028,6 +1059,10 @@ return $retval; } +/** + * used for the lists of submissions and draft stories in admin/moderation.php + * + */ function ADMIN_getListField_moderation($fieldname, $fieldvalue, $A, $icon_arr) { global $_CONF, $_TABLES, $LANG_ADMIN; @@ -1069,6 +1104,10 @@ return $retval; } +/** + * used for the list of ping services in admin/trackback.php + * + */ function ADMIN_getListField_trackback($fieldname, $fieldvalue, $A, $icon_arr, $token) { global $_CONF, $LANG_TRB; @@ -1112,6 +1151,10 @@ return $retval; } +/** + * used in the user editor in admin/user.php + * + */ function ADMIN_getListField_usergroups($fieldname, $fieldvalue, $A, $icon_arr, $selected = '') { global $thisUsersGroups; From geeklog-cvs at lists.geeklog.net Sun Feb 1 07:35:09 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 01 Feb 2009 07:35:09 -0500 Subject: [geeklog-cvs] geeklog: Sort groups non-case sensitive Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/d3f66f393a12 changeset: 6745:d3f66f393a12 user: Dirk Haun date: Sun Feb 01 11:26:53 2009 +0100 description: Sort groups non-case sensitive diffstat: 1 file changed, 3 insertions(+), 5 deletions(-) system/lib-security.php | 8 +++----- diffs (37 lines): diff -r 29e633449941 -r d3f66f393a12 system/lib-security.php --- a/system/lib-security.php Sun Feb 01 10:57:08 2009 +0100 +++ b/system/lib-security.php Sun Feb 01 11:26:53 2009 +0100 @@ -2,13 +2,13 @@ /* Reminder: always indent with 4 spaces (no tabs). */ // +---------------------------------------------------------------------------+ -// | Geeklog 1.5 | +// | Geeklog 1.6 | // +---------------------------------------------------------------------------+ // | lib-security.php | // | | // | Geeklog security library. | // +---------------------------------------------------------------------------+ -// | Copyright (C) 2000-2008 by the following authors: | +// | Copyright (C) 2000-2009 by the following authors: | // | | // | Authors: Tony Bibbs - tony AT tonybibbs DOT com | // | Mark Limburg - mlimburg AT users DOT sourceforge DOT net | @@ -31,8 +31,6 @@ // | Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | // | | // +---------------------------------------------------------------------------+ -// -// $Id: lib-security.php,v 1.75 2008/09/21 08:37:11 dhaun Exp $ /** * This is the security library for Geeklog. This is used to implement Geeklog's @@ -151,7 +149,7 @@ } } - ksort($groups); + uksort($groups, 'strcasecmp'); if ($_SEC_VERBOSE) { COM_errorLog("****************leaving getusergroups(uid=$uid)***************",1); From geeklog-cvs at lists.geeklog.net Sun Feb 1 07:35:11 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 01 Feb 2009 07:35:11 -0500 Subject: [geeklog-cvs] geeklog: Display group names with an uppercase first letter ever... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/3e15885d32b4 changeset: 6747:3e15885d32b4 user: Dirk Haun date: Sun Feb 01 13:34:44 2009 +0100 description: Display group names with an uppercase first letter everywhere diffstat: 4 files changed, 11 insertions(+), 3 deletions(-) public_html/admin/mail.php | 4 ++-- public_html/docs/history | 1 + system/lib-admin.php | 7 +++++++ system/lib-security.php | 2 +- diffs (61 lines): diff -r ae2e81cceb5c -r 3e15885d32b4 public_html/admin/mail.php --- a/public_html/admin/mail.php Sun Feb 01 13:19:00 2009 +0100 +++ b/public_html/admin/mail.php Sun Feb 01 13:34:44 2009 +0100 @@ -76,8 +76,8 @@ $group_options = ''; foreach ($thisUsersGroups as $groupName => $groupID) { if ($groupName != 'All Users') { - $group_options .= ''; + $group_options .= ''; } } diff -r ae2e81cceb5c -r 3e15885d32b4 public_html/docs/history --- a/public_html/docs/history Sun Feb 01 13:19:00 2009 +0100 +++ b/public_html/docs/history Sun Feb 01 13:34:44 2009 +0100 @@ -11,6 +11,7 @@ + (TBD) Comment moderation and editable comments, by Jared Wenerd Other changes: +- Display group names with an uppercase first letter everywhere [Dirk] - Added an ISO 8601-ish format to the gl_dateformats table [Dirk] - Let users with user.mail permissions only email groups that they are in themselves [Dirk] diff -r ae2e81cceb5c -r 3e15885d32b4 system/lib-admin.php --- a/system/lib-admin.php Sun Feb 01 13:19:00 2009 +0100 +++ b/system/lib-admin.php Sun Feb 01 13:34:44 2009 +0100 @@ -745,6 +745,9 @@ . ''; break; + case 'grp_name': + $retval = ucwords($fieldvalue); + break; default: $retval = $fieldvalue; break; @@ -1186,6 +1189,10 @@ } break; + case 'grp_name': + $retval = ucwords($fieldvalue); + break; + default: $retval = $fieldvalue; break; diff -r ae2e81cceb5c -r 3e15885d32b4 system/lib-security.php --- a/system/lib-security.php Sun Feb 01 13:19:00 2009 +0100 +++ b/system/lib-security.php Sun Feb 01 13:34:44 2009 +0100 @@ -1031,7 +1031,7 @@ if ($group_id == $ug_id) { $groupdd .= ' selected="selected"'; } - $groupdd .= '>' . $ug_name . '' . LB; + $groupdd .= '>' . ucwords($ug_name) . '' . LB; } $groupdd .= '' . LB; } else { From geeklog-cvs at lists.geeklog.net Sun Feb 1 11:59:12 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 01 Feb 2009 11:59:12 -0500 Subject: [geeklog-cvs] geeklog: Let USER_sendNotification return the result of COM_mail Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/063645a4564f changeset: 6748:063645a4564f user: Dirk Haun date: Sun Feb 01 17:18:07 2009 +0100 description: Let USER_sendNotification return the result of COM_mail diffstat: 1 file changed, 3 insertions(+), 1 deletion(-) system/lib-user.php | 4 +++- diffs (21 lines): diff -r 3e15885d32b4 -r 063645a4564f system/lib-user.php --- a/system/lib-user.php Sun Feb 01 13:34:44 2009 +0100 +++ b/system/lib-user.php Sun Feb 01 17:18:07 2009 +0100 @@ -345,6 +345,7 @@ * @param email string Email address of the new user * @param uid int User id of the new user * @param mode string Mode user was added at. +* @return bool true = success, false = an error occured * */ function USER_sendNotification ($username, $email, $uid, $mode='inactive') @@ -367,7 +368,8 @@ $mailbody .= "\n------------------------------\n"; $mailsubject = $_CONF['site_name'] . ' ' . $LANG29[40]; - COM_mail ($_CONF['site_mail'], $mailsubject, $mailbody); + + return COM_mail($_CONF['site_mail'], $mailsubject, $mailbody); } /** From geeklog-cvs at lists.geeklog.net Sun Feb 1 11:59:12 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 01 Feb 2009 11:59:12 -0500 Subject: [geeklog-cvs] geeklog: Display a message when sending the email for a new pass... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/6d6e4b21742a changeset: 6749:6d6e4b21742a user: Dirk Haun date: Sun Feb 01 17:46:47 2009 +0100 description: Display a message when sending the email for a new password failed diffstat: 2 files changed, 11 insertions(+), 12 deletions(-) public_html/docs/history | 2 ++ public_html/users.php | 21 +++++++++------------ diffs (75 lines): diff -r 81e157f9d3fb -r 6d6e4b21742a public_html/docs/history --- a/public_html/docs/history Sat Jan 31 22:15:27 2009 +0100 +++ b/public_html/docs/history Sun Feb 01 17:46:47 2009 +0100 @@ -2,6 +2,8 @@ Feb ??, 2009 (1.5.2) ------------ + +- Display a message when sending the email for a new password failed [Dirk] - Updated Japanese language file, provided by the Geeklog.jp group diff -r 81e157f9d3fb -r 6d6e4b21742a public_html/users.php --- a/public_html/users.php Sat Jan 31 22:15:27 2009 +0100 +++ b/public_html/users.php Sun Feb 01 17:46:47 2009 +0100 @@ -8,7 +8,7 @@ // | | // | User authentication module. | // +---------------------------------------------------------------------------+ -// | Copyright (C) 2000-2008 by the following authors: | +// | Copyright (C) 2000-2009 by the following authors: | // | | // | Authors: Tony Bibbs - tony AT tonybibbs DOT com | // | Mark Limburg - mlimburg AT users DOT sourceforge DOT net | @@ -31,8 +31,6 @@ // | Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | // | | // +---------------------------------------------------------------------------+ -// -// $Id: users.php,v 1.170 2008/09/15 18:26:17 mjervis Exp $ /** * This file handles user authentication @@ -376,11 +374,10 @@ * User request for a new password - send email with a link and request id * * @param username string name of user who requested the new password -* @param msg int index of message to display (if any) * @return string form or meta redirect * */ -function requestpassword ($username, $msg = 0) +function requestpassword($username) { global $_CONF, $_TABLES, $LANG04; @@ -412,13 +409,13 @@ } else { $mailfrom = $_CONF['site_mail']; } - COM_mail ($A['email'], $subject, $mailtext, $mailfrom); + if (COM_mail ($A['email'], $subject, $mailtext, $mailfrom)) { + $msg = 55; // message sent + } else { + $msg = 85; // problem sending the email + } - if ($msg) { - $retval .= COM_refresh ($_CONF['site_url'] . "/index.php?msg=$msg"); - } else { - $retval .= COM_refresh ($_CONF['site_url'] . '/index.php'); - } + $retval .= COM_refresh ($_CONF['site_url'] . "/index.php?msg=$msg"); COM_updateSpeedlimit ('password'); } else { $retval .= COM_siteHeader ('menu', $LANG04[17]) @@ -1007,7 +1004,7 @@ "email = '$email' AND ((remoteservice IS NULL) OR (remoteservice = ''))"); } if (!empty ($username)) { - $display .= requestpassword ($username, 55); + $display .= requestpassword($username); } else { $display = COM_refresh ($_CONF['site_url'] . '/users.php?mode=getpassword'); From geeklog-cvs at lists.geeklog.net Sun Feb 1 11:59:13 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 01 Feb 2009 11:59:13 -0500 Subject: [geeklog-cvs] geeklog: Display a message when sending the email for a new pass... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/60e7e87f1934 changeset: 6750:60e7e87f1934 user: Dirk Haun date: Sun Feb 01 17:46:47 2009 +0100 description: Display a message when sending the email for a new password failed diffstat: 2 files changed, 10 insertions(+), 9 deletions(-) public_html/docs/history | 2 ++ public_html/users.php | 17 ++++++++--------- diffs (57 lines): diff -r 063645a4564f -r 60e7e87f1934 public_html/docs/history --- a/public_html/docs/history Sun Feb 01 17:18:07 2009 +0100 +++ b/public_html/docs/history Sun Feb 01 17:46:47 2009 +0100 @@ -76,6 +76,8 @@ Feb ??, 2009 (1.5.2) ------------ + +- Display a message when sending the email for a new password failed [Dirk] - Updated Japanese language file, provided by the Geeklog.jp group diff -r 063645a4564f -r 60e7e87f1934 public_html/users.php --- a/public_html/users.php Sun Feb 01 17:18:07 2009 +0100 +++ b/public_html/users.php Sun Feb 01 17:46:47 2009 +0100 @@ -374,11 +374,10 @@ * User request for a new password - send email with a link and request id * * @param username string name of user who requested the new password -* @param msg int index of message to display (if any) * @return string form or meta redirect * */ -function requestpassword ($username, $msg = 0) +function requestpassword($username) { global $_CONF, $_TABLES, $LANG04; @@ -409,13 +408,13 @@ } else { $mailfrom = $_CONF['site_mail']; } - COM_mail ($A['email'], $subject, $mailtext, $mailfrom); + if (COM_mail ($A['email'], $subject, $mailtext, $mailfrom)) { + $msg = 55; // message sent + } else { + $msg = 85; // problem sending the email + } - if ($msg) { - $retval .= COM_refresh ($_CONF['site_url'] . "/index.php?msg=$msg"); - } else { - $retval .= COM_refresh ($_CONF['site_url'] . '/index.php'); - } + $retval .= COM_refresh ($_CONF['site_url'] . "/index.php?msg=$msg"); COM_updateSpeedlimit ('password'); } else { $retval .= COM_siteHeader ('menu', $LANG04[17]) @@ -1004,7 +1003,7 @@ "email = '$email' AND ((remoteservice IS NULL) OR (remoteservice = ''))"); } if (!empty ($username)) { - $display .= requestpassword ($username, 55); + $display .= requestpassword($username); } else { $display = COM_refresh ($_CONF['site_url'] . '/users.php?mode=getpassword'); From geeklog-cvs at lists.geeklog.net Sun Feb 1 11:59:14 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 01 Feb 2009 11:59:14 -0500 Subject: [geeklog-cvs] geeklog: Display a message when sending the email to report an a... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/f0a1e033383a changeset: 6751:f0a1e033383a user: Dirk Haun date: Sun Feb 01 17:56:06 2009 +0100 description: Display a message when sending the email to report an abusive comment failed diffstat: 2 files changed, 8 insertions(+), 2 deletions(-) public_html/docs/history | 2 ++ system/lib-comment.php | 8 ++++++-- diffs (32 lines): diff -r 6d6e4b21742a -r f0a1e033383a public_html/docs/history --- a/public_html/docs/history Sun Feb 01 17:46:47 2009 +0100 +++ b/public_html/docs/history Sun Feb 01 17:56:06 2009 +0100 @@ -3,6 +3,8 @@ Feb ??, 2009 (1.5.2) ------------ +- Display a message when sending the email to report an abusive comment failed + [Dirk] - Display a message when sending the email for a new password failed [Dirk] - Updated Japanese language file, provided by the Geeklog.jp group diff -r 6d6e4b21742a -r f0a1e033383a system/lib-comment.php --- a/system/lib-comment.php Sun Feb 01 17:46:47 2009 +0100 +++ b/system/lib-comment.php Sun Feb 01 17:56:06 2009 +0100 @@ -1268,10 +1268,14 @@ $mailsubject = $_CONF['site_name'] . ' ' . $LANG03[27]; - COM_mail ($_CONF['site_mail'], $mailsubject, $mailbody); + if (COM_mail ($_CONF['site_mail'], $mailsubject, $mailbody)) { + $msg = 27; // message sent + } else { + $msg = 85; // problem sending the email + } COM_updateSpeedlimit ('mail'); - return COM_refresh ($_CONF['site_url'] . '/index.php?msg=27'); + return COM_refresh ($_CONF['site_url'] . "/index.php?msg=$msg"); } ?> From geeklog-cvs at lists.geeklog.net Sun Feb 1 11:59:14 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 01 Feb 2009 11:59:14 -0500 Subject: [geeklog-cvs] geeklog: Display a message when sending the email to report an a... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/3196aac35129 changeset: 6752:3196aac35129 user: Dirk Haun date: Sun Feb 01 17:56:06 2009 +0100 description: Display a message when sending the email to report an abusive comment failed diffstat: 2 files changed, 8 insertions(+), 2 deletions(-) public_html/docs/history | 2 ++ system/lib-comment.php | 8 ++++++-- diffs (32 lines): diff -r 60e7e87f1934 -r 3196aac35129 public_html/docs/history --- a/public_html/docs/history Sun Feb 01 17:46:47 2009 +0100 +++ b/public_html/docs/history Sun Feb 01 17:56:06 2009 +0100 @@ -77,6 +77,8 @@ Feb ??, 2009 (1.5.2) ------------ +- Display a message when sending the email to report an abusive comment failed + [Dirk] - Display a message when sending the email for a new password failed [Dirk] - Updated Japanese language file, provided by the Geeklog.jp group diff -r 60e7e87f1934 -r 3196aac35129 system/lib-comment.php --- a/system/lib-comment.php Sun Feb 01 17:46:47 2009 +0100 +++ b/system/lib-comment.php Sun Feb 01 17:56:06 2009 +0100 @@ -1268,10 +1268,14 @@ $mailsubject = $_CONF['site_name'] . ' ' . $LANG03[27]; - COM_mail ($_CONF['site_mail'], $mailsubject, $mailbody); + if (COM_mail ($_CONF['site_mail'], $mailsubject, $mailbody)) { + $msg = 27; // message sent + } else { + $msg = 85; // problem sending the email + } COM_updateSpeedlimit ('mail'); - return COM_refresh ($_CONF['site_url'] . '/index.php?msg=27'); + return COM_refresh ($_CONF['site_url'] . "/index.php?msg=$msg"); } ?> From geeklog-cvs at lists.geeklog.net Sun Feb 1 11:59:12 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 01 Feb 2009 11:59:12 -0500 Subject: [geeklog-cvs] geeklog: Display a message when sending the email for a new pass... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/6d6e4b21742a changeset: 6749:6d6e4b21742a user: Dirk Haun date: Sun Feb 01 17:46:47 2009 +0100 description: Display a message when sending the email for a new password failed diffstat: 2 files changed, 11 insertions(+), 12 deletions(-) public_html/docs/history | 2 ++ public_html/users.php | 21 +++++++++------------ diffs (75 lines): diff -r 81e157f9d3fb -r 6d6e4b21742a public_html/docs/history --- a/public_html/docs/history Sat Jan 31 22:15:27 2009 +0100 +++ b/public_html/docs/history Sun Feb 01 17:46:47 2009 +0100 @@ -2,6 +2,8 @@ Feb ??, 2009 (1.5.2) ------------ + +- Display a message when sending the email for a new password failed [Dirk] - Updated Japanese language file, provided by the Geeklog.jp group diff -r 81e157f9d3fb -r 6d6e4b21742a public_html/users.php --- a/public_html/users.php Sat Jan 31 22:15:27 2009 +0100 +++ b/public_html/users.php Sun Feb 01 17:46:47 2009 +0100 @@ -8,7 +8,7 @@ // | | // | User authentication module. | // +---------------------------------------------------------------------------+ -// | Copyright (C) 2000-2008 by the following authors: | +// | Copyright (C) 2000-2009 by the following authors: | // | | // | Authors: Tony Bibbs - tony AT tonybibbs DOT com | // | Mark Limburg - mlimburg AT users DOT sourceforge DOT net | @@ -31,8 +31,6 @@ // | Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | // | | // +---------------------------------------------------------------------------+ -// -// $Id: users.php,v 1.170 2008/09/15 18:26:17 mjervis Exp $ /** * This file handles user authentication @@ -376,11 +374,10 @@ * User request for a new password - send email with a link and request id * * @param username string name of user who requested the new password -* @param msg int index of message to display (if any) * @return string form or meta redirect * */ -function requestpassword ($username, $msg = 0) +function requestpassword($username) { global $_CONF, $_TABLES, $LANG04; @@ -412,13 +409,13 @@ } else { $mailfrom = $_CONF['site_mail']; } - COM_mail ($A['email'], $subject, $mailtext, $mailfrom); + if (COM_mail ($A['email'], $subject, $mailtext, $mailfrom)) { + $msg = 55; // message sent + } else { + $msg = 85; // problem sending the email + } - if ($msg) { - $retval .= COM_refresh ($_CONF['site_url'] . "/index.php?msg=$msg"); - } else { - $retval .= COM_refresh ($_CONF['site_url'] . '/index.php'); - } + $retval .= COM_refresh ($_CONF['site_url'] . "/index.php?msg=$msg"); COM_updateSpeedlimit ('password'); } else { $retval .= COM_siteHeader ('menu', $LANG04[17]) @@ -1007,7 +1004,7 @@ "email = '$email' AND ((remoteservice IS NULL) OR (remoteservice = ''))"); } if (!empty ($username)) { - $display .= requestpassword ($username, 55); + $display .= requestpassword($username); } else { $display = COM_refresh ($_CONF['site_url'] . '/users.php?mode=getpassword'); From geeklog-cvs at lists.geeklog.net Mon Feb 2 03:27:22 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Mon, 02 Feb 2009 03:27:22 -0500 Subject: [geeklog-cvs] geeklog: Sort groups non-case sensitive Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/e7ac7e1d805a changeset: 6753:e7ac7e1d805a user: Dirk Haun date: Sun Feb 01 11:26:53 2009 +0100 description: Sort groups non-case sensitive diffstat: 1 file changed, 2 insertions(+), 4 deletions(-) system/lib-security.php | 6 ++---- diffs (30 lines): diff -r f0a1e033383a -r e7ac7e1d805a system/lib-security.php --- a/system/lib-security.php Sun Feb 01 17:56:06 2009 +0100 +++ b/system/lib-security.php Sun Feb 01 11:26:53 2009 +0100 @@ -8,7 +8,7 @@ // | | // | Geeklog security library. | // +---------------------------------------------------------------------------+ -// | Copyright (C) 2000-2008 by the following authors: | +// | Copyright (C) 2000-2009 by the following authors: | // | | // | Authors: Tony Bibbs - tony AT tonybibbs DOT com | // | Mark Limburg - mlimburg AT users DOT sourceforge DOT net | @@ -31,8 +31,6 @@ // | Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | // | | // +---------------------------------------------------------------------------+ -// -// $Id: lib-security.php,v 1.75 2008/09/21 08:37:11 dhaun Exp $ /** * This is the security library for Geeklog. This is used to implement Geeklog's @@ -151,7 +149,7 @@ } } - ksort($groups); + uksort($groups, 'strcasecmp'); if ($_SEC_VERBOSE) { COM_errorLog("****************leaving getusergroups(uid=$uid)***************",1); From geeklog-cvs at lists.geeklog.net Mon Feb 2 03:45:38 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Mon, 02 Feb 2009 03:45:38 -0500 Subject: [geeklog-cvs] geeklog: Added missing page title when viewing a single comment Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/13f6803831ed changeset: 6754:13f6803831ed user: Dirk Haun date: Mon Feb 02 09:41:18 2009 +0100 description: Added missing page title when viewing a single comment diffstat: 2 files changed, 4 insertions(+), 4 deletions(-) public_html/comment.php | 6 ++---- public_html/docs/history | 2 ++ diffs (42 lines): diff -r e7ac7e1d805a -r 13f6803831ed public_html/comment.php --- a/public_html/comment.php Sun Feb 01 11:26:53 2009 +0100 +++ b/public_html/comment.php Mon Feb 02 09:41:18 2009 +0100 @@ -8,7 +8,7 @@ // | | // | Let user comment on a story or plugin. | // +---------------------------------------------------------------------------+ -// | Copyright (C) 2000-2008 by the following authors: | +// | Copyright (C) 2000-2009 by the following authors: | // | | // | Authors: Tony Bibbs - tony AT tonybibbs DOT com | // | Mark Limburg - mlimburg AT users DOT sourceforge DOT net | @@ -32,8 +32,6 @@ // | Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | // | | // +---------------------------------------------------------------------------+ -// -// $Id: comment.php,v 1.116 2008/08/12 19:15:36 mjervis Exp $ /** * This file is responsible for letting user enter a comment and saving the @@ -250,7 +248,7 @@ break; } - return COM_siteHeader() . $display . COM_siteFooter(); + return COM_siteHeader('menu', $title) . $display . COM_siteFooter(); } // MAIN diff -r e7ac7e1d805a -r 13f6803831ed public_html/docs/history --- a/public_html/docs/history Sun Feb 01 11:26:53 2009 +0100 +++ b/public_html/docs/history Mon Feb 02 09:41:18 2009 +0100 @@ -3,6 +3,8 @@ Feb ??, 2009 (1.5.2) ------------ +- Added missing page title when viewing a single comment [Dirk] +- Sort groups in the group dropdowns non-case sensitive [Dirk] - Display a message when sending the email to report an abusive comment failed [Dirk] - Display a message when sending the email for a new password failed [Dirk] From geeklog-cvs at lists.geeklog.net Mon Feb 2 03:45:38 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Mon, 02 Feb 2009 03:45:38 -0500 Subject: [geeklog-cvs] geeklog: Added missing page title when viewing a single comment Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/e919cddc9187 changeset: 6755:e919cddc9187 user: Dirk Haun date: Mon Feb 02 09:41:18 2009 +0100 description: Added missing page title when viewing a single comment diffstat: 2 files changed, 4 insertions(+), 4 deletions(-) public_html/comment.php | 6 ++---- public_html/docs/history | 2 ++ diffs (42 lines): diff -r 3196aac35129 -r e919cddc9187 public_html/comment.php --- a/public_html/comment.php Sun Feb 01 17:56:06 2009 +0100 +++ b/public_html/comment.php Mon Feb 02 09:41:18 2009 +0100 @@ -8,7 +8,7 @@ // | | // | Let user comment on a story or plugin. | // +---------------------------------------------------------------------------+ -// | Copyright (C) 2000-2008 by the following authors: | +// | Copyright (C) 2000-2009 by the following authors: | // | | // | Authors: Tony Bibbs - tony AT tonybibbs DOT com | // | Mark Limburg - mlimburg AT users DOT sourceforge DOT net | @@ -32,8 +32,6 @@ // | Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | // | | // +---------------------------------------------------------------------------+ -// -// $Id: comment.php,v 1.116 2008/08/12 19:15:36 mjervis Exp $ /** * This file is responsible for letting user enter a comment and saving the @@ -250,7 +248,7 @@ break; } - return COM_siteHeader() . $display . COM_siteFooter(); + return COM_siteHeader('menu', $title) . $display . COM_siteFooter(); } // MAIN diff -r 3196aac35129 -r e919cddc9187 public_html/docs/history --- a/public_html/docs/history Sun Feb 01 17:56:06 2009 +0100 +++ b/public_html/docs/history Mon Feb 02 09:41:18 2009 +0100 @@ -77,6 +77,8 @@ Feb ??, 2009 (1.5.2) ------------ +- Added missing page title when viewing a single comment [Dirk] +- Sort groups in the group dropdowns non-case sensitive [Dirk] - Display a message when sending the email to report an abusive comment failed [Dirk] - Display a message when sending the email for a new password failed [Dirk] From geeklog-cvs at lists.geeklog.net Mon Feb 2 13:58:37 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Mon, 02 Feb 2009 13:58:37 -0500 Subject: [geeklog-cvs] geeklog: Added the topic name to the page title Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/fcc8b4ab664b changeset: 6756:fcc8b4ab664b user: Dirk Haun date: Mon Feb 02 10:52:36 2009 +0100 description: Added the topic name to the page title diffstat: 1 file changed, 11 insertions(+), 7 deletions(-) public_html/directory.php | 18 +++++++++++------- diffs (48 lines): diff -r e919cddc9187 -r fcc8b4ab664b public_html/directory.php --- a/public_html/directory.php Mon Feb 02 09:41:18 2009 +0100 +++ b/public_html/directory.php Mon Feb 02 10:52:36 2009 +0100 @@ -2,13 +2,13 @@ /* Reminder: always indent with 4 spaces (no tabs). */ // +---------------------------------------------------------------------------+ -// | Geeklog 1.5 | +// | Geeklog 1.6 | // +---------------------------------------------------------------------------+ // | directory.php | // | | // | Directory of all the stories on a Geeklog site. | // +---------------------------------------------------------------------------+ -// | Copyright (C) 2004-2008 by the following authors: | +// | Copyright (C) 2004-2009 by the following authors: | // | | // | Authors: Dirk Haun - dirk AT haun-online DOT de | // +---------------------------------------------------------------------------+ @@ -28,10 +28,8 @@ // | Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | // | | // +---------------------------------------------------------------------------+ -// -// $Id: directory.php,v 1.19 2008/06/20 19:12:56 dhaun Exp $ -require_once ('lib-common.php'); +require_once 'lib-common.php'; // configuration option: // List stories for the current month on top of the overview page @@ -487,8 +485,14 @@ $display .= DIR_displayYear ($topic, $year, true); $display .= DIR_navBar ($topic, $year); } else { - $display .= COM_siteHeader ('menu', $LANG_DIR['title']); - $display .= DIR_displayAll ($topic, $conf_list_current_month); + $title = $LANG_DIR['title']; + if ($topic != 'all') { + $topicName = DB_getItem($_TABLES['topics'], 'topic', + "tid = '" . addslashes($topic) . "'"); + $title .= ': ' . $topicName; + } + $display .= COM_siteHeader('menu', $title); + $display .= DIR_displayAll($topic, $conf_list_current_month); } $display .= COM_siteFooter (true); From geeklog-cvs at lists.geeklog.net Mon Feb 2 18:07:34 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Mon, 02 Feb 2009 18:07:34 -0500 Subject: [geeklog-cvs] geeklog: Implemented Search Improvements Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/6db77ef26a37 changeset: 6757:6db77ef26a37 user: Sami Barakat date: Mon Feb 02 23:04:14 2009 +0000 description: Implemented Search Improvements diffstat: 18 files changed, 1544 insertions(+), 735 deletions(-) language/english.php | 26 public_html/admin/install/config-install.php | 14 public_html/docs/config.html | 52 public_html/layout/professional/lists/inline/item_field.thtml | 1 public_html/layout/professional/lists/inline/item_row.thtml | 4 public_html/layout/professional/lists/inline/list.thtml | 14 public_html/layout/professional/lists/inline/page_limit.thtml | 1 public_html/layout/professional/lists/inline/page_sort.thtml | 1 public_html/layout/professional/lists/table/item_field.thtml | 1 public_html/layout/professional/lists/table/item_row.thtml | 3 public_html/layout/professional/lists/table/list.thtml | 16 public_html/layout/professional/lists/table/page_limit.thtml | 1 public_html/layout/professional/lists/table/page_sort.thtml | 1 public_html/lib-common.php | 5 system/classes/listfactory.class.php | 652 +++++ system/classes/search.class.php | 1278 ++++------ system/classes/searchcriteria.class.php | 164 + system/lib-plugins.php | 45 diffs (truncated from 2591 to 300 lines): diff -r fcc8b4ab664b -r 6db77ef26a37 language/english.php --- a/language/english.php Mon Feb 02 10:52:36 2009 +0100 +++ b/language/english.php Mon Feb 02 23:04:14 2009 +0000 @@ -502,7 +502,14 @@ 58 => 'More results >>', 59 => 'Results', 60 => 'per page', - 61 => 'Refine search' + 61 => 'Refine search', + 62 => '#', + 63 => 'Description', + 64 => 'Showing %d - %d of %d results', + 65 => 'Story', + 66 => 'Comment', + 67 => 'Show %d Results', + 68 => 'Sort By' ); ############################################################################### @@ -1801,7 +1808,18 @@ 'default_permissions_topic' => "Topic Default Permissions", 'atom_max_stories' => "Max. Stories in Webservices Feed", 'disable_webservices' => 'Disable Webservices?', - 'restrict_webservices' => 'Restrict Webservices?' + 'restrict_webservices' => 'Restrict Webservices?', + 'search_style' => "Results List Style", + 'search_limits' => "Page Limits", + 'search_show_num' => "Show Result Number?", + 'search_show_type' => "Show Result Type?", + 'search_show_user' => "Show Author?", + 'search_show_hits' => "Show Number of Hits?", + 'search_show_sort' => "Allow User to Sort Results?", + 'search_show_limit' => "Show Page Limits?", + 'search_no_data' => "If No Data is Avaliable, Display", + 'search_separator' => "Group Separator", + 'search_def_keytype' => "Default Search Method" ); $LANG_configsubgroups['Core'] = array( @@ -1885,7 +1903,9 @@ 15 => array('By Number' => 'sortnum', 'Alphabetically' => 'alpha'), 16 => array('No Login required' => 0, 'Advanced Search only' => 1, 'Simple + Advanced Search' => 2), 17 => array('Comments Enabled' => 0, 'Comments Disabled' => -1), - 18 => array('Disabled' => 0, 'Enabled (Exact Match)' => 1, 'Enabled (Word Beginning)' => 2, 'Enabled (Word Fragment)' => 3) + 18 => array('Disabled' => 0, 'Enabled (Exact Match)' => 1, 'Enabled (Word Beginning)' => 2, 'Enabled (Word Fragment)' => 3), + 19 => array('Google' => 'google', 'Table' => 'table'), + 20 => array('Exact Phrase' => 'phrase', 'All of The Words' => 'all', 'Any of The Words' => 'any') ); ?> diff -r fcc8b4ab664b -r 6db77ef26a37 public_html/admin/install/config-install.php --- a/public_html/admin/install/config-install.php Mon Feb 02 10:52:36 2009 +0100 +++ b/public_html/admin/install/config-install.php Mon Feb 02 23:04:14 2009 +0000 @@ -83,7 +83,19 @@ $c->add('mysqldump_options','-Q','text',0,5,NULL,180,TRUE); $c->add('fs_search', NULL, 'fieldset', 0, 6, NULL, 0, TRUE); - $c->add('num_search_results',10,'text',0,6,NULL,670,TRUE); + $c->add('search_style','google','select',0,6,19,650,TRUE); + $c->add('search_limits','10,15,25,30','text',0,6,NULL,660,TRUE); + $c->add('num_search_results',30,'text',0,6,NULL,670,TRUE); + $c->add('search_show_limit',TRUE,'select',0,6,1,680,TRUE); + $c->add('search_show_sort',TRUE,'select',0,6,1,690,TRUE); + $c->add('search_show_num',TRUE,'select',0,6,1,700,TRUE); + $c->add('search_show_type',TRUE,'select',0,6,1,710,TRUE); + $c->add('search_show_user',TRUE,'select',0,6,1,720,TRUE); + $c->add('search_show_hits',TRUE,'select',0,6,1,730,TRUE); + $c->add('search_no_data','Not available...','text',0,6,NULL,740,TRUE); + $c->add('search_separator',' > ','text',0,6,NULL,750,TRUE); + $c->add('search_def_keytype','phrase','select',0,6,20,760,TRUE); + $c->add('search_use_fulltext',FALSE,'hidden',0,6); // Subgroup: Stories and Trackback $c->add('sg_stories', NULL, 'subgroup', 1, 0, NULL, 0, TRUE); diff -r fcc8b4ab664b -r 6db77ef26a37 public_html/docs/config.html --- a/public_html/docs/config.html Mon Feb 02 10:52:36 2009 +0100 +++ b/public_html/docs/config.html Mon Feb 02 23:04:14 2009 +0000 @@ -263,9 +263,57 @@ Default Value Description + search_style + 'google' + Sets the style of the results page. Can be either 'google' or 'table' + + search_limits + 10,15,25,30 + The result limits a user can select. Each value must be seperated with a comma. + num_search_results - 10 - Number of search results per page (and per type). + 30 + The default number of results per page. Should be a value from 'search_limits' above. + + search_show_limit + true + Shows (= true) or hides (= false) the page limits selection box. + + search_show_sort + true + Shows (= true) or hides (= false) the 'Sort By' selection box. (When using the table style it will enable/disable column sorting) + + search_show_num + true + Shows (= true) or hides (= false) the result number. + + search_show_type + true + Shows (= true) or hides (= false) the plugin name the result came from. + + search_show_user + true + Shows (= true) or hides (= false) the author of a result. + + search_show_hits + true + Shows (= true) or hides (= false) the number of hits a result has received. + + search_no_data + <i>Not available...</i> + When there is an incompatibility between plugin and Geeklog display this string. + + search_separator + &gt; (Space before and after character) + The character to display between result type sub groups. + + search_def_keytype + 'phrase' + Default to one of these search methods:
    +
  • 'all': results must contain all of the search terms.
  • +
  • 'any': results may contain any of the search terms.
  • +
  • 'phrase': search for the exact phrase as entered. (default)
  • +
diff -r fcc8b4ab664b -r 6db77ef26a37 public_html/layout/professional/lists/inline/item_field.thtml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/public_html/layout/professional/lists/inline/item_field.thtml Mon Feb 02 23:04:14 2009 +0000 @@ -0,0 +1,1 @@ + {field_text} diff -r fcc8b4ab664b -r 6db77ef26a37 public_html/layout/professional/lists/inline/item_row.thtml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/public_html/layout/professional/lists/inline/item_row.thtml Mon Feb 02 23:04:14 2009 +0000 @@ -0,0 +1,4 @@ +
+ {item_field} +
+
diff -r fcc8b4ab664b -r 6db77ef26a37 public_html/layout/professional/lists/inline/list.thtml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/public_html/layout/professional/lists/inline/list.thtml Mon Feb 02 23:04:14 2009 +0000 @@ -0,0 +1,14 @@ + {list_top} + + {item_row} +

{message}

+ + {google_paging} + {list_bottom} diff -r fcc8b4ab664b -r 6db77ef26a37 public_html/layout/professional/lists/inline/page_limit.thtml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/public_html/layout/professional/lists/inline/page_limit.thtml Mon Feb 02 23:04:14 2009 +0000 @@ -0,0 +1,1 @@ +{limit_text} diff -r fcc8b4ab664b -r 6db77ef26a37 public_html/layout/professional/lists/inline/page_sort.thtml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/public_html/layout/professional/lists/inline/page_sort.thtml Mon Feb 02 23:04:14 2009 +0000 @@ -0,0 +1,1 @@ +{sort_text} diff -r fcc8b4ab664b -r 6db77ef26a37 public_html/layout/professional/lists/table/item_field.thtml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/public_html/layout/professional/lists/table/item_field.thtml Mon Feb 02 23:04:14 2009 +0000 @@ -0,0 +1,1 @@ + {field_text} diff -r fcc8b4ab664b -r 6db77ef26a37 public_html/layout/professional/lists/table/item_row.thtml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/public_html/layout/professional/lists/table/item_row.thtml Mon Feb 02 23:04:14 2009 +0000 @@ -0,0 +1,3 @@ + + {item_field} + diff -r fcc8b4ab664b -r 6db77ef26a37 public_html/layout/professional/lists/table/list.thtml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/public_html/layout/professional/lists/table/list.thtml Mon Feb 02 23:04:14 2009 +0000 @@ -0,0 +1,16 @@ + {list_top} + + + + {page_sort} + + {item_row} +
+

{message}

+ + {google_paging} + {list_bottom} diff -r fcc8b4ab664b -r 6db77ef26a37 public_html/layout/professional/lists/table/page_limit.thtml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/public_html/layout/professional/lists/table/page_limit.thtml Mon Feb 02 23:04:14 2009 +0000 @@ -0,0 +1,1 @@ +{limit_text} diff -r fcc8b4ab664b -r 6db77ef26a37 public_html/layout/professional/lists/table/page_sort.thtml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/public_html/layout/professional/lists/table/page_sort.thtml Mon Feb 02 23:04:14 2009 +0000 @@ -0,0 +1,1 @@ +{sort_text}{sort_selected} diff -r fcc8b4ab664b -r 6db77ef26a37 public_html/lib-common.php --- a/public_html/lib-common.php Mon Feb 02 10:52:36 2009 +0100 +++ b/public_html/lib-common.php Mon Feb 02 23:04:14 2009 +0000 @@ -5759,10 +5759,11 @@ * * @param string $text the text * @param string $query the search query +* @param string $class html class to use to highlight * @return string the text with highlighted search words * */ -function COM_highlightQuery( $text, $query ) +function COM_highlightQuery( $text, $query, $class = 'highlight' ) { $query = str_replace( '+', ' ', $query ); @@ -5783,7 +5784,7 @@ { $searchword = preg_quote( str_replace( "'", "\'", $searchword )); $searchword = str_replace('/', '\\/', $searchword); - $text = preg_replace( '/(\>(((?>[^><]+)|(?R))*)\<)/ie', "preg_replace('/(?>$searchword+)/i','\\\\0','\\0')", '' . $text . '' ); + $text = preg_replace( '/(\>(((?>[^><]+)|(?R))*)\<)/ie', "preg_replace('/(?>$searchword+)/i','\\\\0','\\0')", '' . $text . '' ); } } diff -r fcc8b4ab664b -r 6db77ef26a37 system/classes/listfactory.class.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/system/classes/listfactory.class.php Mon Feb 02 23:04:14 2009 +0000 @@ -0,0 +1,652 @@ +setField('ID', 'id', false); + + // Set up the fields that will be seen by the user + $obj->setField( + '#', // Title of the field + ROW_NUMBER, // The field identifier can be either: + // ROW_NUMBER - The number of each row will be displayed From geeklog-cvs at lists.geeklog.net Tue Feb 3 05:13:55 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Tue, 03 Feb 2009 05:13:55 -0500 Subject: [geeklog-cvs] geeklog: Removed undefined variable and fixed a typo Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/4a25081c5db9 changeset: 6759:4a25081c5db9 user: Dirk Haun date: Tue Feb 03 10:00:40 2009 +0100 description: Removed undefined variable and fixed a typo diffstat: 1 file changed, 1 insertion(+), 2 deletions(-) system/classes/searchcriteria.class.php | 3 +-- diffs (20 lines): diff -r 60994cd85ddd -r 4a25081c5db9 system/classes/searchcriteria.class.php --- a/system/classes/searchcriteria.class.php Tue Feb 03 09:50:37 2009 +0100 +++ b/system/classes/searchcriteria.class.php Tue Feb 03 10:00:40 2009 +0100 @@ -44,7 +44,6 @@ { $this->_pluginName = $pluginName; $this->_pluginLabel = $pluginLabel; - $this->_rank = $rank; $this->_url_rewrite = false; $this->_rank = 3; } @@ -103,7 +102,7 @@ function UrlRewriteEnable() { - return $this->_url_rewite; + return $this->_url_rewrite; } function buildSearchSQL( $keyType, $query, $columns, $sql = '' ) From geeklog-cvs at lists.geeklog.net Tue Feb 3 05:13:55 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Tue, 03 Feb 2009 05:13:55 -0500 Subject: [geeklog-cvs] geeklog: Synced with english.php Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/60994cd85ddd changeset: 6758:60994cd85ddd user: Dirk Haun date: Tue Feb 03 09:50:37 2009 +0100 description: Synced with english.php diffstat: 5 files changed, 117 insertions(+), 18 deletions(-) language/english_utf-8.php | 31 +++++++++++++++++++++++++------ language/german.php | 26 +++++++++++++++++++++++--- language/german_formal.php | 26 +++++++++++++++++++++++--- language/german_formal_utf-8.php | 26 +++++++++++++++++++++++--- language/german_utf-8.php | 26 +++++++++++++++++++++++--- diffs (269 lines): diff -r 6db77ef26a37 -r 60994cd85ddd language/english_utf-8.php --- a/language/english_utf-8.php Mon Feb 02 23:04:14 2009 +0000 +++ b/language/english_utf-8.php Tue Feb 03 09:50:37 2009 +0100 @@ -502,7 +502,14 @@ 58 => 'More results >>', 59 => 'Results', 60 => 'per page', - 61 => 'Refine search' + 61 => 'Refine search', + 62 => '#', + 63 => 'Description', + 64 => 'Showing %d - %d of %d results', + 65 => 'Story', + 66 => 'Comment', + 67 => 'Show %d Results', + 68 => 'Sort By' ); ############################################################################### @@ -1148,8 +1155,8 @@ 39 => '', 40 => 'System Message', 41 => '', - 42 => 'Your word has been successfully saved.', - 43 => 'The word has been successfully deleted.', + 42 => '', + 43 => '', 44 => 'The plugin was successfully installed!', 45 => 'The plugin was successfully deleted.', 46 => '', @@ -1210,7 +1217,6 @@ 101 => 'There are no topics (that you have access to). You need at least one topic to be able to submit stories.', 400 => 'Not all required fields have been passed validation', // Error codes in the 400 range reserved for CUSTOM membership 401 => 'Please enter Fullname' - ); ############################################################################### @@ -1802,7 +1808,18 @@ 'default_permissions_topic' => "Topic Default Permissions", 'atom_max_stories' => "Max. Stories in Webservices Feed", 'disable_webservices' => 'Disable Webservices?', - 'restrict_webservices' => 'Restrict Webservices?' + 'restrict_webservices' => 'Restrict Webservices?', + 'search_style' => "Results List Style", + 'search_limits' => "Page Limits", + 'search_show_num' => "Show Result Number?", + 'search_show_type' => "Show Result Type?", + 'search_show_user' => "Show Author?", + 'search_show_hits' => "Show Number of Hits?", + 'search_show_sort' => "Allow User to Sort Results?", + 'search_show_limit' => "Show Page Limits?", + 'search_no_data' => "If No Data is Avaliable, Display", + 'search_separator' => "Group Separator", + 'search_def_keytype' => "Default Search Method" ); $LANG_configsubgroups['Core'] = array( @@ -1886,7 +1903,9 @@ 15 => array('By Number' => 'sortnum', 'Alphabetically' => 'alpha'), 16 => array('No Login required' => 0, 'Advanced Search only' => 1, 'Simple + Advanced Search' => 2), 17 => array('Comments Enabled' => 0, 'Comments Disabled' => -1), - 18 => array('Disabled' => 0, 'Enabled (Exact Match)' => 1, 'Enabled (Word Beginning)' => 2, 'Enabled (Word Fragment)' => 3) + 18 => array('Disabled' => 0, 'Enabled (Exact Match)' => 1, 'Enabled (Word Beginning)' => 2, 'Enabled (Word Fragment)' => 3), + 19 => array('Google' => 'google', 'Table' => 'table'), + 20 => array('Exact Phrase' => 'phrase', 'All of The Words' => 'all', 'Any of The Words' => 'any') ); ?> diff -r 6db77ef26a37 -r 60994cd85ddd language/german.php --- a/language/german.php Mon Feb 02 23:04:14 2009 +0000 +++ b/language/german.php Tue Feb 03 09:50:37 2009 +0100 @@ -505,7 +505,14 @@ 58 => 'Weitere Ergebnisse >>', 59 => 'Ergebnisse', 60 => 'pro Seite', - 61 => 'Suche korrigieren' + 61 => 'Suche korrigieren', + 62 => '#', + 63 => 'Description', + 64 => 'Showing %d - %d of %d results', + 65 => 'Story', + 66 => 'Comment', + 67 => 'Show %d Results', + 68 => 'Sort By' ); ############################################################################### @@ -1808,7 +1815,18 @@ 'default_permissions_topic' => 'Grundeinstellung Kategorierechte', 'atom_max_stories' => 'Max. Artikel im Webservices-Feed', 'disable_webservices' => 'Webservices ausschalten?', - 'restrict_webservices' => 'Webservices beschr?nken?' + 'restrict_webservices' => 'Webservices beschr?nken?', + 'search_style' => "Results List Style", + 'search_limits' => "Page Limits", + 'search_show_num' => "Show Result Number?", + 'search_show_type' => "Show Result Type?", + 'search_show_user' => "Show Author?", + 'search_show_hits' => "Show Number of Hits?", + 'search_show_sort' => "Allow User to Sort Results?", + 'search_show_limit' => "Show Page Limits?", + 'search_no_data' => "If No Data is Avaliable, Display", + 'search_separator' => "Group Separator", + 'search_def_keytype' => "Default Search Method" ); $LANG_configsubgroups['Core'] = array( @@ -1885,7 +1903,9 @@ 15 => array('Nummerisch' => 'sortnum', 'Alphabetisch' => 'alpha'), 16 => array('Kein Login ben?tigt' => 0, 'Nur erweiterte Suche' => 1, 'Einfache und erweiterte Suche' => 2), 17 => array('Kommentare eingeschaltet' => 0, 'Kommentare ausgeschaltet' => -1), - 18 => array('Aus' => 0, 'Ein (Exakte ?bereinstimmung)' => 1, 'Ein (Wortanfang)' => 2, 'Ein (Teilwort)' => 3) + 18 => array('Aus' => 0, 'Ein (Exakte ?bereinstimmung)' => 1, 'Ein (Wortanfang)' => 2, 'Ein (Teilwort)' => 3), + 19 => array('Google' => 'google', 'Table' => 'table'), + 20 => array('Exact Phrase' => 'phrase', 'All of The Words' => 'all', 'Any of The Words' => 'any') ); ?> diff -r 6db77ef26a37 -r 60994cd85ddd language/german_formal.php --- a/language/german_formal.php Mon Feb 02 23:04:14 2009 +0000 +++ b/language/german_formal.php Tue Feb 03 09:50:37 2009 +0100 @@ -506,7 +506,14 @@ 58 => 'Weitere Ergebnisse >>', 59 => 'Ergebnisse', 60 => 'pro Seite', - 61 => 'Suche korrigieren' + 61 => 'Suche korrigieren', + 62 => '#', + 63 => 'Description', + 64 => 'Showing %d - %d of %d results', + 65 => 'Story', + 66 => 'Comment', + 67 => 'Show %d Results', + 68 => 'Sort By' ); ############################################################################### @@ -1809,7 +1816,18 @@ 'default_permissions_topic' => 'Grundeinstellung Kategorierechte', 'atom_max_stories' => 'Max. Artikel im Webservices-Feed', 'disable_webservices' => 'Webservices ausschalten?', - 'restrict_webservices' => 'Webservices beschr?nken?' + 'restrict_webservices' => 'Webservices beschr?nken?', + 'search_style' => "Results List Style", + 'search_limits' => "Page Limits", + 'search_show_num' => "Show Result Number?", + 'search_show_type' => "Show Result Type?", + 'search_show_user' => "Show Author?", + 'search_show_hits' => "Show Number of Hits?", + 'search_show_sort' => "Allow User to Sort Results?", + 'search_show_limit' => "Show Page Limits?", + 'search_no_data' => "If No Data is Avaliable, Display", + 'search_separator' => "Group Separator", + 'search_def_keytype' => "Default Search Method" ); $LANG_configsubgroups['Core'] = array( @@ -1886,7 +1904,9 @@ 15 => array('Nummerisch' => 'sortnum', 'Alphabetisch' => 'alpha'), 16 => array('Kein Login ben?tigt' => 0, 'Nur erweiterte Suche' => 1, 'Einfache und erweiterte Suche' => 2), 17 => array('Kommentare eingeschaltet' => 0, 'Kommentare ausgeschaltet' => -1), - 18 => array('Aus' => 0, 'Ein (Exakte ?bereinstimmung)' => 1, 'Ein (Wortanfang)' => 2, 'Ein (Teilwort)' => 3) + 18 => array('Aus' => 0, 'Ein (Exakte ?bereinstimmung)' => 1, 'Ein (Wortanfang)' => 2, 'Ein (Teilwort)' => 3), + 19 => array('Google' => 'google', 'Table' => 'table'), + 20 => array('Exact Phrase' => 'phrase', 'All of The Words' => 'all', 'Any of The Words' => 'any') ); ?> diff -r 6db77ef26a37 -r 60994cd85ddd language/german_formal_utf-8.php --- a/language/german_formal_utf-8.php Mon Feb 02 23:04:14 2009 +0000 +++ b/language/german_formal_utf-8.php Tue Feb 03 09:50:37 2009 +0100 @@ -506,7 +506,14 @@ 58 => 'Weitere Ergebnisse >>', 59 => 'Ergebnisse', 60 => 'pro Seite', - 61 => 'Suche korrigieren' + 61 => 'Suche korrigieren', + 62 => '#', + 63 => 'Description', + 64 => 'Showing %d - %d of %d results', + 65 => 'Story', + 66 => 'Comment', + 67 => 'Show %d Results', + 68 => 'Sort By' ); ############################################################################### @@ -1809,7 +1816,18 @@ 'default_permissions_topic' => 'Grundeinstellung Kategorierechte', 'atom_max_stories' => 'Max. Artikel im Webservices-Feed', 'disable_webservices' => 'Webservices ausschalten?', - 'restrict_webservices' => 'Webservices beschr??nken?' + 'restrict_webservices' => 'Webservices beschr??nken?', + 'search_style' => "Results List Style", + 'search_limits' => "Page Limits", + 'search_show_num' => "Show Result Number?", + 'search_show_type' => "Show Result Type?", + 'search_show_user' => "Show Author?", + 'search_show_hits' => "Show Number of Hits?", + 'search_show_sort' => "Allow User to Sort Results?", + 'search_show_limit' => "Show Page Limits?", + 'search_no_data' => "If No Data is Avaliable, Display", + 'search_separator' => "Group Separator", + 'search_def_keytype' => "Default Search Method" ); $LANG_configsubgroups['Core'] = array( @@ -1886,7 +1904,9 @@ 15 => array('Nummerisch' => 'sortnum', 'Alphabetisch' => 'alpha'), 16 => array('Kein Login ben??tigt' => 0, 'Nur erweiterte Suche' => 1, 'Einfache und erweiterte Suche' => 2), 17 => array('Kommentare eingeschaltet' => 0, 'Kommentare ausgeschaltet' => -1), - 18 => array('Aus' => 0, 'Ein (Exakte ??bereinstimmung)' => 1, 'Ein (Wortanfang)' => 2, 'Ein (Teilwort)' => 3) + 18 => array('Aus' => 0, 'Ein (Exakte ??bereinstimmung)' => 1, 'Ein (Wortanfang)' => 2, 'Ein (Teilwort)' => 3), + 19 => array('Google' => 'google', 'Table' => 'table'), + 20 => array('Exact Phrase' => 'phrase', 'All of The Words' => 'all', 'Any of The Words' => 'any') ); ?> diff -r 6db77ef26a37 -r 60994cd85ddd language/german_utf-8.php --- a/language/german_utf-8.php Mon Feb 02 23:04:14 2009 +0000 +++ b/language/german_utf-8.php Tue Feb 03 09:50:37 2009 +0100 @@ -505,7 +505,14 @@ 58 => 'Weitere Ergebnisse >>', 59 => 'Ergebnisse', 60 => 'pro Seite', - 61 => 'Suche korrigieren' + 61 => 'Suche korrigieren', + 62 => '#', + 63 => 'Description', + 64 => 'Showing %d - %d of %d results', + 65 => 'Story', + 66 => 'Comment', + 67 => 'Show %d Results', + 68 => 'Sort By' ); ############################################################################### @@ -1808,7 +1815,18 @@ 'default_permissions_topic' => 'Grundeinstellung Kategorierechte', 'atom_max_stories' => 'Max. Artikel im Webservices-Feed', 'disable_webservices' => 'Webservices ausschalten?', - 'restrict_webservices' => 'Webservices beschr??nken?' + 'restrict_webservices' => 'Webservices beschr??nken?', + 'search_style' => "Results List Style", + 'search_limits' => "Page Limits", + 'search_show_num' => "Show Result Number?", + 'search_show_type' => "Show Result Type?", + 'search_show_user' => "Show Author?", + 'search_show_hits' => "Show Number of Hits?", + 'search_show_sort' => "Allow User to Sort Results?", + 'search_show_limit' => "Show Page Limits?", + 'search_no_data' => "If No Data is Avaliable, Display", + 'search_separator' => "Group Separator", + 'search_def_keytype' => "Default Search Method" ); $LANG_configsubgroups['Core'] = array( @@ -1885,7 +1903,9 @@ 15 => array('Nummerisch' => 'sortnum', 'Alphabetisch' => 'alpha'), 16 => array('Kein Login ben??tigt' => 0, 'Nur erweiterte Suche' => 1, 'Einfache und erweiterte Suche' => 2), 17 => array('Kommentare eingeschaltet' => 0, 'Kommentare ausgeschaltet' => -1), - 18 => array('Aus' => 0, 'Ein (Exakte ??bereinstimmung)' => 1, 'Ein (Wortanfang)' => 2, 'Ein (Teilwort)' => 3) + 18 => array('Aus' => 0, 'Ein (Exakte ??bereinstimmung)' => 1, 'Ein (Wortanfang)' => 2, 'Ein (Teilwort)' => 3), + 19 => array('Google' => 'google', 'Table' => 'table'), + 20 => array('Exact Phrase' => 'phrase', 'All of The Words' => 'all', 'Any of The Words' => 'any') ); ?> From geeklog-cvs at lists.geeklog.net Tue Feb 3 05:13:57 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Tue, 03 Feb 2009 05:13:57 -0500 Subject: [geeklog-cvs] geeklog: strftime needs a long as the second parameter Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/47b8386f2e94 changeset: 6761:47b8386f2e94 user: Dirk Haun date: Tue Feb 03 11:13:26 2009 +0100 description: strftime needs a long as the second parameter diffstat: 1 file changed, 1 insertion(+), 1 deletion(-) system/classes/search.class.php | 2 +- diffs (12 lines): diff -r 237435f67e18 -r 47b8386f2e94 system/classes/search.class.php --- a/system/classes/search.class.php Tue Feb 03 11:11:23 2009 +0100 +++ b/system/classes/search.class.php Tue Feb 03 11:13:26 2009 +0100 @@ -731,7 +731,7 @@ $row['description'] = stripslashes($this->_shortenText($this->_query, $row['description'], $this->_wordlength)); } - $row['date'] = strftime($_CONF['daytime'], $row['date']); + $row['date'] = strftime($_CONF['daytime'], intval($row['date'])); $row['hits'] = COM_NumberFormat($row['hits']) . ' '; // simple solution to a silly problem! } From geeklog-cvs at lists.geeklog.net Tue Feb 3 05:13:56 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Tue, 03 Feb 2009 05:13:56 -0500 Subject: [geeklog-cvs] geeklog: Changed sort_order for the search options and added the... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/237435f67e18 changeset: 6760:237435f67e18 user: Dirk Haun date: Tue Feb 03 11:11:23 2009 +0100 description: Changed sort_order for the search options and added them to the update diffstat: 3 files changed, 67 insertions(+), 18 deletions(-) public_html/admin/install/config-install.php | 29 +++++++++++++------------- sql/updates/mssql_1.5.2_to_1.6.0.php | 28 +++++++++++++++++++++++-- sql/updates/mysql_1.5.2_to_1.6.0.php | 28 +++++++++++++++++++++++-- diffs (137 lines): diff -r 4a25081c5db9 -r 237435f67e18 public_html/admin/install/config-install.php --- a/public_html/admin/install/config-install.php Tue Feb 03 10:00:40 2009 +0100 +++ b/public_html/admin/install/config-install.php Tue Feb 03 11:11:23 2009 +0100 @@ -82,20 +82,21 @@ $c->add('mysqldump_path','/usr/bin/mysqldump','text',0,5,NULL,175,TRUE); $c->add('mysqldump_options','-Q','text',0,5,NULL,180,TRUE); + // squeeze search options between 640 (lastlogin) and 680 (loginrequired) $c->add('fs_search', NULL, 'fieldset', 0, 6, NULL, 0, TRUE); - $c->add('search_style','google','select',0,6,19,650,TRUE); - $c->add('search_limits','10,15,25,30','text',0,6,NULL,660,TRUE); - $c->add('num_search_results',30,'text',0,6,NULL,670,TRUE); - $c->add('search_show_limit',TRUE,'select',0,6,1,680,TRUE); - $c->add('search_show_sort',TRUE,'select',0,6,1,690,TRUE); - $c->add('search_show_num',TRUE,'select',0,6,1,700,TRUE); - $c->add('search_show_type',TRUE,'select',0,6,1,710,TRUE); - $c->add('search_show_user',TRUE,'select',0,6,1,720,TRUE); - $c->add('search_show_hits',TRUE,'select',0,6,1,730,TRUE); - $c->add('search_no_data','Not available...','text',0,6,NULL,740,TRUE); - $c->add('search_separator',' > ','text',0,6,NULL,750,TRUE); - $c->add('search_def_keytype','phrase','select',0,6,20,760,TRUE); - $c->add('search_use_fulltext',FALSE,'hidden',0,6); + $c->add('search_style','google','select',0,6,19,642,TRUE); + $c->add('search_limits','10,15,25,30','text',0,6,NULL,645,TRUE); + $c->add('num_search_results',30,'text',0,6,NULL,648,TRUE); + $c->add('search_show_limit',TRUE,'select',0,6,1,651,TRUE); + $c->add('search_show_sort',TRUE,'select',0,6,1,654,TRUE); + $c->add('search_show_num',TRUE,'select',0,6,1,657,TRUE); + $c->add('search_show_type',TRUE,'select',0,6,1,660,TRUE); + $c->add('search_show_user',TRUE,'select',0,6,1,663,TRUE); + $c->add('search_show_hits',TRUE,'select',0,6,1,666,TRUE); + $c->add('search_no_data','Not available...','text',0,6,NULL,669,TRUE); + $c->add('search_separator',' > ','text',0,6,NULL,672,TRUE); + $c->add('search_def_keytype','phrase','select',0,6,20,675,TRUE); + $c->add('search_use_fulltext',FALSE,'hidden',0,6); // 678 // Subgroup: Stories and Trackback $c->add('sg_stories', NULL, 'subgroup', 1, 0, NULL, 0, TRUE); @@ -302,7 +303,7 @@ $c->add('cookiesecure',FALSE,'select',7,30,1,630,TRUE); $c->add('fs_misc', NULL, 'fieldset', 7, 31, NULL, 0, TRUE); - $c->add('pdf_enabled',0,'select',7,31,0,660,TRUE); + $c->add('pdf_enabled',0,'select',7,31,0,795,TRUE); $c->add('notification',array(),'%text',7,31,NULL,800,TRUE); $c->add('cron_schedule_interval',86400,'text',7,31,NULL,860,TRUE); $c->add('disable_autolinks',0,'select',7,31,0,1750,TRUE); diff -r 4a25081c5db9 -r 237435f67e18 sql/updates/mssql_1.5.2_to_1.6.0.php --- a/sql/updates/mssql_1.5.2_to_1.6.0.php Tue Feb 03 10:00:40 2009 +0100 +++ b/sql/updates/mssql_1.5.2_to_1.6.0.php Tue Feb 03 11:11:23 2009 +0100 @@ -14,15 +14,39 @@ */ function update_ConfValues() { - global $_CONF; + global $_CONF, $_TABLES; require_once $_CONF['path_system'] . 'classes/config.class.php'; + // move pdf_enabled option to make room for new search options + DB_query("UPDATE {$_TABLES['conf_values']} SET sort_order = 795 WHERE sort_order = 660"); + // move num_search_results options + DB_query("UPDATE {$_TABLES['conf_values']} SET sort_order = 648 WHERE sort_order = 670"); + // change default for num_search_results + $thirty = addslashes(serialize(30)); + DB_query("UPDATE {$_TABLES['conf_values']} SET value = '$thirty', default_value = '$thirty' WHERE name = 'num_search_results'"); + $c = config::get_instance(); - // new option + // new options $c->add('jpeg_quality',75,'text',5,23,NULL,1495,FALSE); $c->add('advanced_html',array ('img' => array('width' => 1, 'height' => 1, 'src' => 1, 'align' => 1, 'valign' => 1, 'border' => 1, 'alt' => 1)),'**placeholder',7,34,NULL,1721,TRUE); + + // squeeze search options between 640 (lastlogin) and 680 (loginrequired) + $c->add('fs_search', NULL, 'fieldset', 0, 6, NULL, 0, TRUE); + $c->add('search_style','google','select',0,6,19,642,TRUE); + $c->add('search_limits','10,15,25,30','text',0,6,NULL,645,TRUE); + // see above: $c->add('num_search_results',30,'text',0,6,NULL,648,TRUE); + $c->add('search_show_limit',TRUE,'select',0,6,1,651,TRUE); + $c->add('search_show_sort',TRUE,'select',0,6,1,654,TRUE); + $c->add('search_show_num',TRUE,'select',0,6,1,657,TRUE); + $c->add('search_show_type',TRUE,'select',0,6,1,660,TRUE); + $c->add('search_show_user',TRUE,'select',0,6,1,663,TRUE); + $c->add('search_show_hits',TRUE,'select',0,6,1,666,TRUE); + $c->add('search_no_data','Not available...','text',0,6,NULL,669,TRUE); + $c->add('search_separator',' > ','text',0,6,NULL,672,TRUE); + $c->add('search_def_keytype','phrase','select',0,6,20,675,TRUE); + $c->add('search_use_fulltext',FALSE,'hidden',0,6); // 678 return true; } diff -r 4a25081c5db9 -r 237435f67e18 sql/updates/mysql_1.5.2_to_1.6.0.php --- a/sql/updates/mysql_1.5.2_to_1.6.0.php Tue Feb 03 10:00:40 2009 +0100 +++ b/sql/updates/mysql_1.5.2_to_1.6.0.php Tue Feb 03 11:11:23 2009 +0100 @@ -15,15 +15,39 @@ */ function update_ConfValues() { - global $_CONF; + global $_CONF, $_TABLES; require_once $_CONF['path_system'] . 'classes/config.class.php'; + // move pdf_enabled option to make room for new search options + DB_query("UPDATE {$_TABLES['conf_values']} SET sort_order = 795 WHERE sort_order = 660"); + // move num_search_results options + DB_query("UPDATE {$_TABLES['conf_values']} SET sort_order = 648 WHERE sort_order = 670"); + // change default for num_search_results + $thirty = addslashes(serialize(30)); + DB_query("UPDATE {$_TABLES['conf_values']} SET value = '$thirty', default_value = '$thirty' WHERE name = 'num_search_results'"); + $c = config::get_instance(); - // new option + // new options $c->add('jpeg_quality',75,'text',5,23,NULL,1495,FALSE); $c->add('advanced_html',array ('img' => array('width' => 1, 'height' => 1, 'src' => 1, 'align' => 1, 'valign' => 1, 'border' => 1, 'alt' => 1)),'**placeholder',7,34,NULL,1721,TRUE); + + // squeeze search options between 640 (lastlogin) and 680 (loginrequired) + $c->add('fs_search', NULL, 'fieldset', 0, 6, NULL, 0, TRUE); + $c->add('search_style','google','select',0,6,19,642,TRUE); + $c->add('search_limits','10,15,25,30','text',0,6,NULL,645,TRUE); + // see above: $c->add('num_search_results',30,'text',0,6,NULL,648,TRUE); + $c->add('search_show_limit',TRUE,'select',0,6,1,651,TRUE); + $c->add('search_show_sort',TRUE,'select',0,6,1,654,TRUE); + $c->add('search_show_num',TRUE,'select',0,6,1,657,TRUE); + $c->add('search_show_type',TRUE,'select',0,6,1,660,TRUE); + $c->add('search_show_user',TRUE,'select',0,6,1,663,TRUE); + $c->add('search_show_hits',TRUE,'select',0,6,1,666,TRUE); + $c->add('search_no_data','Not available...','text',0,6,NULL,669,TRUE); + $c->add('search_separator',' > ','text',0,6,NULL,672,TRUE); + $c->add('search_def_keytype','phrase','select',0,6,20,675,TRUE); + $c->add('search_use_fulltext',FALSE,'hidden',0,6); // 678 return true; } From geeklog-cvs at lists.geeklog.net Wed Feb 4 07:48:18 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Wed, 04 Feb 2009 07:48:18 -0500 Subject: [geeklog-cvs] geeklog: Fixed preg_match overwriting $result variable Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/f2c9ffac0fbc changeset: 6762:f2c9ffac0fbc user: Dirk Haun date: Wed Feb 04 13:48:07 2009 +0100 description: Fixed preg_match overwriting $result variable diffstat: 1 file changed, 2 insertions(+), 2 deletions(-) system/classes/search.class.php | 4 ++-- diffs (14 lines): diff -r 47b8386f2e94 -r f2c9ffac0fbc system/classes/search.class.php --- a/system/classes/search.class.php Tue Feb 03 11:13:26 2009 +0100 +++ b/system/classes/search.class.php Wed Feb 04 13:48:07 2009 +0100 @@ -621,8 +621,8 @@ 'uid' => $col_user == -1 ? ' ' : $old_row[$col_user], 'hits' => $col_hits == -1 ? '0' : str_replace(',', '', $old_row[$col_hits]) ); - preg_match('/href="([^"]+)"/i', $api_results['title'], $result); - $api_results['url'] = empty($result) ? '#' : $result[1]; + preg_match('/href="([^"]+)"/i', $api_results['title'], $links); + $api_results['url'] = empty($links) ? '#' : $links[1]; $obj->addResult($api_results); } From geeklog-cvs at lists.geeklog.net Sat Feb 7 09:59:40 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sat, 07 Feb 2009 09:59:40 -0500 Subject: [geeklog-cvs] geeklog: Check if variables are set before using them Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/f3c8c971e6b6 changeset: 6763:f3c8c971e6b6 user: Dirk Haun date: Sat Feb 07 15:20:13 2009 +0100 description: Check if variables are set before using them diffstat: 1 file changed, 11 insertions(+), 3 deletions(-) system/classes/config.class.php | 14 +++++++++++--- diffs (28 lines): diff -r f2c9ffac0fbc -r f3c8c971e6b6 system/classes/config.class.php --- a/system/classes/config.class.php Wed Feb 04 13:48:07 2009 +0100 +++ b/system/classes/config.class.php Sat Feb 07 15:20:13 2009 +0100 @@ -373,13 +373,21 @@ global $_USER; if (empty($_USER['theme'])) { - $theme = $this->config_array['Core']['theme']; + if (! empty($this->config_array['Core']['theme'])) { + $theme = $this->config_array['Core']['theme']; + } } else { $theme = $_USER['theme']; } - $this->config_array['Core']['path_layout'] = $this->config_array['Core']['path_themes'] . $theme . '/'; - $this->config_array['Core']['layout_url'] = $this->config_array['Core']['site_url'] . '/layout/' . $theme; + if (! empty($theme)) { + if (! empty($this->config_array['Core']['path_themes'])) { + $this->config_array['Core']['path_layout'] = $this->config_array['Core']['path_themes'] . $theme . '/'; + } + if (! empty($this->config_array['Core']['site_url'])) { + $this->config_array['Core']['layout_url'] = $this->config_array['Core']['site_url'] . '/layout/' . $theme; + } + } } function _get_groups() From geeklog-cvs at lists.geeklog.net Sat Feb 7 09:59:41 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sat, 07 Feb 2009 09:59:41 -0500 Subject: [geeklog-cvs] geeklog: Fixed problem with backslashes appearing in the story t... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/87aabd060f27 changeset: 6765:87aabd060f27 user: Dirk Haun date: Sat Feb 07 15:59:21 2009 +0100 description: Fixed problem with backslashes appearing in the story title when previewing with magic_quotes_gpc = On (bug #0000790) diffstat: 1 file changed, 11 insertions(+), 2 deletions(-) public_html/admin/story.php | 13 +++++++++++-- diffs (23 lines): diff -r d1add93e44bf -r 87aabd060f27 public_html/admin/story.php --- a/public_html/admin/story.php Sat Feb 07 15:34:04 2009 +0100 +++ b/public_html/admin/story.php Sat Feb 07 15:59:21 2009 +0100 @@ -262,8 +262,17 @@ } $story = new Story(); - if($mode == 'preview') - { + if ($mode == 'preview') { + // Handle Magic GPC Garbage: + while (list($key, $value) = each($_POST)) { + if (!is_array($value)) { + $_POST[$key] = COM_stripslashes($value); + } else { + while (list($subkey, $subvalue) = each($value)) { + $value[$subkey] = COM_stripslashes($subvalue); + } + } + } $result = $story->loadFromArgsArray($_POST); } else { $result = $story->loadFromDatabase($sid, $mode); From geeklog-cvs at lists.geeklog.net Sat Feb 7 09:59:41 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sat, 07 Feb 2009 09:59:41 -0500 Subject: [geeklog-cvs] geeklog: Make the logo link to geeklog.net Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/d1add93e44bf changeset: 6764:d1add93e44bf user: Dirk Haun date: Sat Feb 07 15:34:04 2009 +0100 description: Make the logo link to geeklog.net diffstat: 14 files changed, 14 insertions(+), 14 deletions(-) public_html/docs/calendar.html | 2 +- public_html/docs/changes.html | 2 +- public_html/docs/config.html | 2 +- public_html/docs/index.html | 2 +- public_html/docs/install.html | 2 +- public_html/docs/links.html | 2 +- public_html/docs/plugin.html | 2 +- public_html/docs/polls.html | 2 +- public_html/docs/spamx.html | 2 +- public_html/docs/staticpages.html | 2 +- public_html/docs/support.html | 2 +- public_html/docs/theme.html | 2 +- public_html/docs/themevars.html | 2 +- public_html/docs/trackback.html | 2 +- diffs (168 lines): diff -r f3c8c971e6b6 -r d1add93e44bf public_html/docs/calendar.html --- a/public_html/docs/calendar.html Sat Feb 07 15:20:13 2009 +0100 +++ b/public_html/docs/calendar.html Sat Feb 07 15:34:04 2009 +0100 @@ -6,7 +6,7 @@ -

Geeklog Documentation

+

Geeklog

Calendar Plugin

diff -r f3c8c971e6b6 -r d1add93e44bf public_html/docs/changes.html --- a/public_html/docs/changes.html Sat Feb 07 15:20:13 2009 +0100 +++ b/public_html/docs/changes.html Sat Feb 07 15:34:04 2009 +0100 @@ -6,7 +6,7 @@ -

Geeklog Documentation

+

Geeklog

Changes

diff -r f3c8c971e6b6 -r d1add93e44bf public_html/docs/config.html --- a/public_html/docs/config.html Sat Feb 07 15:20:13 2009 +0100 +++ b/public_html/docs/config.html Sat Feb 07 15:34:04 2009 +0100 @@ -6,7 +6,7 @@ -

Geeklog Documentation

+

Geeklog

Geeklog Configuration

diff -r f3c8c971e6b6 -r d1add93e44bf public_html/docs/index.html --- a/public_html/docs/index.html Sat Feb 07 15:20:13 2009 +0100 +++ b/public_html/docs/index.html Sat Feb 07 15:34:04 2009 +0100 @@ -6,7 +6,7 @@ -

Geeklog Documentation

+

Geeklog

Thank You!

diff -r f3c8c971e6b6 -r d1add93e44bf public_html/docs/install.html --- a/public_html/docs/install.html Sat Feb 07 15:20:13 2009 +0100 +++ b/public_html/docs/install.html Sat Feb 07 15:34:04 2009 +0100 @@ -6,7 +6,7 @@ -

Geeklog Documentation

+

Geeklog

Installing Geeklog

diff -r f3c8c971e6b6 -r d1add93e44bf public_html/docs/links.html --- a/public_html/docs/links.html Sat Feb 07 15:20:13 2009 +0100 +++ b/public_html/docs/links.html Sat Feb 07 15:34:04 2009 +0100 @@ -6,7 +6,7 @@ -

Geeklog Documentation

+

Geeklog

Links Plugin

diff -r f3c8c971e6b6 -r d1add93e44bf public_html/docs/plugin.html --- a/public_html/docs/plugin.html Sat Feb 07 15:20:13 2009 +0100 +++ b/public_html/docs/plugin.html Sat Feb 07 15:34:04 2009 +0100 @@ -6,7 +6,7 @@ -

Geeklog Documentation

+

Geeklog

Plugin Development

diff -r f3c8c971e6b6 -r d1add93e44bf public_html/docs/polls.html --- a/public_html/docs/polls.html Sat Feb 07 15:20:13 2009 +0100 +++ b/public_html/docs/polls.html Sat Feb 07 15:34:04 2009 +0100 @@ -6,7 +6,7 @@ -

Geeklog Documentation

+

Geeklog

Polls Plugin

diff -r f3c8c971e6b6 -r d1add93e44bf public_html/docs/spamx.html --- a/public_html/docs/spamx.html Sat Feb 07 15:20:13 2009 +0100 +++ b/public_html/docs/spamx.html Sat Feb 07 15:34:04 2009 +0100 @@ -7,7 +7,7 @@ -

Geeklog Documentation

+

Geeklog

Geeklog Spam-X Plugin

diff -r f3c8c971e6b6 -r d1add93e44bf public_html/docs/staticpages.html --- a/public_html/docs/staticpages.html Sat Feb 07 15:20:13 2009 +0100 +++ b/public_html/docs/staticpages.html Sat Feb 07 15:34:04 2009 +0100 @@ -6,7 +6,7 @@ -

Geeklog Documentation

+

Geeklog

Static Pages plugin

diff -r f3c8c971e6b6 -r d1add93e44bf public_html/docs/support.html --- a/public_html/docs/support.html Sat Feb 07 15:20:13 2009 +0100 +++ b/public_html/docs/support.html Sat Feb 07 15:34:04 2009 +0100 @@ -6,7 +6,7 @@ -

Geeklog Documentation

+

Geeklog

Support options

diff -r f3c8c971e6b6 -r d1add93e44bf public_html/docs/theme.html --- a/public_html/docs/theme.html Sat Feb 07 15:20:13 2009 +0100 +++ b/public_html/docs/theme.html Sat Feb 07 15:34:04 2009 +0100 @@ -6,7 +6,7 @@ -

Geeklog Documentation

+

Geeklog

(see below for a list of theme changes in diff -r f3c8c971e6b6 -r d1add93e44bf public_html/docs/themevars.html --- a/public_html/docs/themevars.html Sat Feb 07 15:20:13 2009 +0100 +++ b/public_html/docs/themevars.html Sat Feb 07 15:34:04 2009 +0100 @@ -6,7 +6,7 @@ -

Geeklog Documentation

+

Geeklog

Variables in Themes

diff -r f3c8c971e6b6 -r d1add93e44bf public_html/docs/trackback.html --- a/public_html/docs/trackback.html Sat Feb 07 15:20:13 2009 +0100 +++ b/public_html/docs/trackback.html Sat Feb 07 15:34:04 2009 +0100 @@ -6,7 +6,7 @@ -

Geeklog Documentation

+

Geeklog

Trackback, Pingback, Ping

From geeklog-cvs at lists.geeklog.net Sat Feb 7 10:08:57 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sat, 07 Feb 2009 10:08:57 -0500 Subject: [geeklog-cvs] geeklog: Fixed problem with backslashes appearing in the story t... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/6b5facf000ee changeset: 6766:6b5facf000ee user: Dirk Haun date: Sat Feb 07 15:59:21 2009 +0100 description: Fixed problem with backslashes appearing in the story title when previewing with magic_quotes_gpc = On (bug #0000790) diffstat: 1 file changed, 11 insertions(+), 2 deletions(-) public_html/admin/story.php | 13 +++++++++++-- diffs (23 lines): diff -r 13f6803831ed -r 6b5facf000ee public_html/admin/story.php --- a/public_html/admin/story.php Mon Feb 02 09:41:18 2009 +0100 +++ b/public_html/admin/story.php Sat Feb 07 15:59:21 2009 +0100 @@ -258,8 +258,17 @@ } $story = new Story(); - if($mode == 'preview') - { + if ($mode == 'preview') { + // Handle Magic GPC Garbage: + while (list($key, $value) = each($_POST)) { + if (!is_array($value)) { + $_POST[$key] = COM_stripslashes($value); + } else { + while (list($subkey, $subvalue) = each($value)) { + $value[$subkey] = COM_stripslashes($subvalue); + } + } + } $result = $story->loadFromArgsArray($_POST); } else { $result = $story->loadFromDatabase($sid, $mode); From geeklog-cvs at lists.geeklog.net Sat Feb 7 10:08:58 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sat, 07 Feb 2009 10:08:58 -0500 Subject: [geeklog-cvs] geeklog: Updated list of changes Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/bde76ed5a488 changeset: 6767:bde76ed5a488 user: Dirk Haun date: Sat Feb 07 16:07:05 2009 +0100 description: Updated list of changes diffstat: 2 files changed, 9 insertions(+), 4 deletions(-) public_html/docs/changes.html | 2 ++ public_html/docs/history | 11 +++++++---- diffs (39 lines): diff -r 6b5facf000ee -r bde76ed5a488 public_html/docs/changes.html --- a/public_html/docs/changes.html Sat Feb 07 15:59:21 2009 +0100 +++ b/public_html/docs/changes.html Sat Feb 07 16:07:05 2009 +0100 @@ -23,6 +23,8 @@
  • Fixed a bug in the story preview where the story content was lost when previewing a story with a duplicate story ID.
  • +
  • Fixed another bug in the story preview that caused extra backslashes to + appear in the story's title.
  • The Trackback editor didn't work since the security token was missing from the editor template.
  • Fixed issues with clickable links in plain text postings.
  • diff -r 6b5facf000ee -r bde76ed5a488 public_html/docs/history --- a/public_html/docs/history Sat Feb 07 15:59:21 2009 +0100 +++ b/public_html/docs/history Sat Feb 07 16:07:05 2009 +0100 @@ -1,8 +1,10 @@ Geeklog History/Changes: -Feb ??, 2009 (1.5.2) ------------- - +Feb 8, 2009 (1.5.2) +----------- + +- Fixed problem with extra backslashes appearing in a story's title during the + story preview when magic_quotes_gpc = On (bug #0000790) [Mike, Dirk] - Added missing page title when viewing a single comment [Dirk] - Sort groups in the group dropdowns non-case sensitive [Dirk] - Display a message when sending the email to report an abusive comment failed @@ -13,7 +15,8 @@ Static Pages plugin ------------------- -- Fixed parse error when saving a static page (reported by greenteagod) [Dirk] +- Fixed parse error when saving a static page (reported by greenteagod). This + problem was only introduced in 1.5.2rc1 [Dirk] Jan 24, 2009 (1.5.2rc1) From geeklog-cvs at lists.geeklog.net Sat Feb 7 10:08:59 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sat, 07 Feb 2009 10:08:59 -0500 Subject: [geeklog-cvs] geeklog: Updated list of changes Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/d67652fb5e73 changeset: 6769:d67652fb5e73 user: Dirk Haun date: Sat Feb 07 16:07:05 2009 +0100 description: Updated list of changes diffstat: 2 files changed, 9 insertions(+), 4 deletions(-) public_html/docs/changes.html | 2 ++ public_html/docs/history | 11 +++++++---- diffs (40 lines): diff -r 87aabd060f27 -r d67652fb5e73 public_html/docs/changes.html --- a/public_html/docs/changes.html Sat Feb 07 15:59:21 2009 +0100 +++ b/public_html/docs/changes.html Sat Feb 07 16:07:05 2009 +0100 @@ -23,6 +23,8 @@
    • Fixed a bug in the story preview where the story content was lost when previewing a story with a duplicate story ID.
    • +
    • Fixed another bug in the story preview that caused extra backslashes to + appear in the story's title.
    • The Trackback editor didn't work since the security token was missing from the editor template.
    • Fixed issues with clickable links in plain text postings.
    • diff -r 87aabd060f27 -r d67652fb5e73 public_html/docs/history --- a/public_html/docs/history Sat Feb 07 15:59:21 2009 +0100 +++ b/public_html/docs/history Sat Feb 07 16:07:05 2009 +0100 @@ -74,9 +74,11 @@ every other plugin and built-in function does (bug #0000644) [Dirk] -Feb ??, 2009 (1.5.2) ------------- - +Feb 8, 2009 (1.5.2) +----------- + +- Fixed problem with extra backslashes appearing in a story's title during the + story preview when magic_quotes_gpc = On (bug #0000790) [Mike, Dirk] - Added missing page title when viewing a single comment [Dirk] - Sort groups in the group dropdowns non-case sensitive [Dirk] - Display a message when sending the email to report an abusive comment failed @@ -87,7 +89,8 @@ Static Pages plugin ------------------- -- Fixed parse error when saving a static page (reported by greenteagod) [Dirk] +- Fixed parse error when saving a static page (reported by greenteagod). This + problem was only introduced in 1.5.2rc1 [Dirk] Jan 24, 2009 (1.5.2rc1) From geeklog-cvs at lists.geeklog.net Sat Feb 7 10:08:58 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sat, 07 Feb 2009 10:08:58 -0500 Subject: [geeklog-cvs] geeklog: Updated version number Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/d100539bbfc6 changeset: 6768:d100539bbfc6 user: Dirk Haun date: Sat Feb 07 16:07:22 2009 +0100 description: Updated version number diffstat: 1 file changed, 1 insertion(+), 1 deletion(-) public_html/siteconfig.php.dist | 2 +- diffs (12 lines): diff -r bde76ed5a488 -r d100539bbfc6 public_html/siteconfig.php.dist --- a/public_html/siteconfig.php.dist Sat Feb 07 16:07:05 2009 +0100 +++ b/public_html/siteconfig.php.dist Sat Feb 07 16:07:22 2009 +0100 @@ -38,7 +38,7 @@ define('LB',"\n"); } if (!defined('VERSION')) { - define('VERSION', '1.5.2rc1'); + define('VERSION', '1.5.2'); } ?> From geeklog-cvs at lists.geeklog.net Sat Feb 7 12:33:17 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sat, 07 Feb 2009 12:33:17 -0500 Subject: [geeklog-cvs] geeklog: Fixed $_POST index name Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/fe6b16c494e7 changeset: 6770:fe6b16c494e7 user: Dirk Haun date: Sat Feb 07 17:57:40 2009 +0100 description: Fixed $_POST index name diffstat: 1 file changed, 1 insertion(+), 2 deletions(-) public_html/admin/user.php | 3 +-- diffs (13 lines): diff -r d67652fb5e73 -r fe6b16c494e7 public_html/admin/user.php --- a/public_html/admin/user.php Sat Feb 07 16:07:05 2009 +0100 +++ b/public_html/admin/user.php Sat Feb 07 17:57:40 2009 +0100 @@ -1172,8 +1172,7 @@ $display = saveusers (COM_applyFilter ($_POST['uid'], true), $_POST['username'], $_POST['fullname'], $_POST['passwd'], $_POST['passwd_conf'], $_POST['email'], - $_POST['regdate'], $_POST['homepage'], - $_POST[$_TABLES['groups']], + $_POST['regdate'], $_POST['homepage'], $_POST['groups'], $delphoto, $_POST['userstatus'], $_POST['oldstatus']); if (!empty($display)) { $tmp = COM_siteHeader('menu', $LANG28[22]); From geeklog-cvs at lists.geeklog.net Sat Feb 7 12:47:58 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sat, 07 Feb 2009 12:47:58 -0500 Subject: [geeklog-cvs] geeklog: The default replacement text for censored text was supp... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/646c32d0878a changeset: 6771:646c32d0878a user: Dirk Haun date: Sat Feb 07 18:46:54 2009 +0100 description: The default replacement text for censored text was supposed to read "censored", not "censormode" diffstat: 2 files changed, 3 insertions(+), 1 deletion(-) public_html/admin/install/config-install.php | 2 +- public_html/docs/history | 2 ++ diffs (24 lines): diff -r d100539bbfc6 -r 646c32d0878a public_html/admin/install/config-install.php --- a/public_html/admin/install/config-install.php Sat Feb 07 16:07:22 2009 +0100 +++ b/public_html/admin/install/config-install.php Sat Feb 07 18:46:54 2009 +0100 @@ -312,7 +312,7 @@ $c->add('fs_censoring', NULL, 'fieldset', 7, 35, NULL, 0, TRUE); $c->add('censormode',1,'select',7,35,0,1760,TRUE); - $c->add('censorreplace','*censormode*','text',7,35,NULL,1770,TRUE); + $c->add('censorreplace','*censored*','text',7,35,NULL,1770,TRUE); $c->add('censorlist', array('fuck','cunt','fucker','fucking','pussy','cock','c0ck',' cum ','twat','clit','bitch','fuk','fuking','motherfucker'),'%text',7,35,NULL,1780,TRUE); $c->add('fs_iplookup', NULL, 'fieldset', 7, 36, NULL, 0, TRUE); diff -r d100539bbfc6 -r 646c32d0878a public_html/docs/history --- a/public_html/docs/history Sat Feb 07 16:07:22 2009 +0100 +++ b/public_html/docs/history Sat Feb 07 18:46:54 2009 +0100 @@ -3,6 +3,8 @@ Feb 8, 2009 (1.5.2) ----------- +- The default replacement text for censored text was supposed to read + "censored", not "censormode" [Dirk] - Fixed problem with extra backslashes appearing in a story's title during the story preview when magic_quotes_gpc = On (bug #0000790) [Mike, Dirk] - Added missing page title when viewing a single comment [Dirk] From geeklog-cvs at lists.geeklog.net Sat Feb 7 12:47:58 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sat, 07 Feb 2009 12:47:58 -0500 Subject: [geeklog-cvs] geeklog: The default replacement text for censored text was supp... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/b71bb6309c6c changeset: 6772:b71bb6309c6c user: Dirk Haun date: Sat Feb 07 18:46:54 2009 +0100 description: The default replacement text for censored text was supposed to read "censored", not "censormode" diffstat: 2 files changed, 3 insertions(+), 1 deletion(-) public_html/admin/install/config-install.php | 2 +- public_html/docs/history | 2 ++ diffs (24 lines): diff -r fe6b16c494e7 -r b71bb6309c6c public_html/admin/install/config-install.php --- a/public_html/admin/install/config-install.php Sat Feb 07 17:57:40 2009 +0100 +++ b/public_html/admin/install/config-install.php Sat Feb 07 18:46:54 2009 +0100 @@ -326,7 +326,7 @@ $c->add('fs_censoring', NULL, 'fieldset', 7, 35, NULL, 0, TRUE); $c->add('censormode',1,'select',7,35,0,1760,TRUE); - $c->add('censorreplace','*censormode*','text',7,35,NULL,1770,TRUE); + $c->add('censorreplace','*censored*','text',7,35,NULL,1770,TRUE); $c->add('censorlist', array('fuck','cunt','fucker','fucking','pussy','cock','c0ck',' cum ','twat','clit','bitch','fuk','fuking','motherfucker'),'%text',7,35,NULL,1780,TRUE); $c->add('fs_iplookup', NULL, 'fieldset', 7, 36, NULL, 0, TRUE); diff -r fe6b16c494e7 -r b71bb6309c6c public_html/docs/history --- a/public_html/docs/history Sat Feb 07 17:57:40 2009 +0100 +++ b/public_html/docs/history Sat Feb 07 18:46:54 2009 +0100 @@ -77,6 +77,8 @@ Feb 8, 2009 (1.5.2) ----------- +- The default replacement text for censored text was supposed to read + "censored", not "censormode" [Dirk] - Fixed problem with extra backslashes appearing in a story's title during the story preview when magic_quotes_gpc = On (bug #0000790) [Mike, Dirk] - Added missing page title when viewing a single comment [Dirk] From geeklog-cvs at lists.geeklog.net Sat Feb 7 16:49:58 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sat, 07 Feb 2009 16:49:58 -0500 Subject: [geeklog-cvs] geeklog: Hide archive option radiobutton from the story editor w... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/48f1098d5218 changeset: 6773:48f1098d5218 user: Dirk Haun date: Sat Feb 07 21:39:46 2009 +0100 description: Hide archive option radiobutton from the story editor when no archive topic is defined (feature request #0000807) diffstat: 2 files changed, 19 insertions(+), 2 deletions(-) public_html/admin/story.php | 19 +++++++++++++++++-- public_html/docs/history | 2 ++ diffs (63 lines): diff -r b71bb6309c6c -r 48f1098d5218 public_html/admin/story.php --- a/public_html/admin/story.php Sat Feb 07 18:46:54 2009 +0100 +++ b/public_html/admin/story.php Sat Feb 07 21:39:46 2009 +0100 @@ -2,7 +2,7 @@ /* Reminder: always indent with 4 spaces (no tabs). */ // +---------------------------------------------------------------------------+ -// | Geeklog 1.5 | +// | Geeklog 1.6 | // +---------------------------------------------------------------------------+ // | story.php | // | | @@ -506,22 +506,37 @@ $story_templates->set_var('expire_date_explanation', $LANG24[46]); $story_templates->set_var('story_unixstamp', $story->EditElements('expirestamp')); + + $atopic = DB_getItem($_TABLES['topics'], 'tid', "archive_flag = 1"); + $have_archive_topic = (empty($atopic) ? false : true); + if ($story->EditElements('statuscode') == STORY_ARCHIVE_ON_EXPIRE) { $story_templates->set_var('is_checked2', 'checked="checked"'); $story_templates->set_var('is_checked3', 'checked="checked"'); $story_templates->set_var('showarchivedisabled', 'false'); + $have_archive_topic = true; // force display of auto archive option } elseif ($story->EditElements('statuscode') == STORY_DELETE_ON_EXPIRE) { $story_templates->set_var('is_checked2', 'checked="checked"'); $story_templates->set_var('is_checked4', 'checked="checked"'); + if (! $have_archive_topic) { + $story_templates->set_var('is_checked3', 'style="display:none;"'); + } $story_templates->set_var('showarchivedisabled', 'false'); } else { + if (! $have_archive_topic) { + $story_templates->set_var('is_checked3', 'style="display:none;"'); + } $story_templates->set_var('showarchivedisabled', 'true'); } $story_templates->set_var('lang_archivetitle', $LANG24[58]); $story_templates->set_var('lang_option', $LANG24[59]); $story_templates->set_var('lang_enabled', $LANG_ADMIN['enabled']); $story_templates->set_var('lang_story_stats', $LANG24[87]); - $story_templates->set_var('lang_optionarchive', $LANG24[61]); + if ($have_archive_topic) { + $story_templates->set_var('lang_optionarchive', $LANG24[61]); + } else { + $story_templates->set_var('lang_optionarchive', ''); + } $story_templates->set_var('lang_optiondelete', $LANG24[62]); $story_templates->set_var('lang_title', $LANG_ADMIN['title']); $story_templates->set_var('story_title', $story->EditElements('title')); diff -r b71bb6309c6c -r 48f1098d5218 public_html/docs/history --- a/public_html/docs/history Sat Feb 07 18:46:54 2009 +0100 +++ b/public_html/docs/history Sat Feb 07 21:39:46 2009 +0100 @@ -11,6 +11,8 @@ + (TBD) Comment moderation and editable comments, by Jared Wenerd Other changes: +- Hide archive option radiobutton from the story editor when no archive topic + is defined (feature request #0000807) [Dirk] - Display group names with an uppercase first letter everywhere [Dirk] - Added an ISO 8601-ish format to the gl_dateformats table [Dirk] - Let users with user.mail permissions only email groups that they are in From geeklog-cvs at lists.geeklog.net Sun Feb 8 04:50:20 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 08 Feb 2009 04:50:20 -0500 Subject: [geeklog-cvs] geeklog: Updated Estonian language file for the Calendar plugin, ... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/e075a7435782 changeset: 6775:e075a7435782 user: Dirk Haun date: Sun Feb 08 10:49:22 2009 +0100 description: Updated Estonian language file for the Calendar plugin, provided by Artur R?pp diffstat: 3 files changed, 3 insertions(+), 2 deletions(-) plugins/calendar/language/estonian.php | 2 +- plugins/calendar/language/estonian_utf-8.php | 2 +- public_html/docs/history | 1 + diffs (35 lines): diff -r 48f1098d5218 -r e075a7435782 plugins/calendar/language/estonian.php --- a/plugins/calendar/language/estonian.php Sat Feb 07 21:39:46 2009 +0100 +++ b/plugins/calendar/language/estonian.php Sun Feb 08 10:49:22 2009 +0100 @@ -109,7 +109,7 @@ 11 => 'Peakalender', 12 => 'Minu kalender', 25 => 'tagasi ', - 26 => 'K?ik p?evad', + 26 => 'Kogu p?ev', 27 => 'N?dal', 28 => 'Isiklik kalender, kasutaja', 29 => 'Avalik kalender', diff -r 48f1098d5218 -r e075a7435782 plugins/calendar/language/estonian_utf-8.php --- a/plugins/calendar/language/estonian_utf-8.php Sat Feb 07 21:39:46 2009 +0100 +++ b/plugins/calendar/language/estonian_utf-8.php Sun Feb 08 10:49:22 2009 +0100 @@ -109,7 +109,7 @@ 11 => 'Peakalender', 12 => 'Minu kalender', 25 => 'tagasi ', - 26 => 'K??ik p??evad', + 26 => 'Kogu p??ev', 27 => 'N??dal', 28 => 'Isiklik kalender, kasutaja', 29 => 'Avalik kalender', diff -r 48f1098d5218 -r e075a7435782 public_html/docs/history --- a/public_html/docs/history Sat Feb 07 21:39:46 2009 +0100 +++ b/public_html/docs/history Sun Feb 08 10:49:22 2009 +0100 @@ -89,6 +89,7 @@ [Dirk] - Display a message when sending the email for a new password failed [Dirk] +- Updated Estonian language file for the Calendar plugin, provided by Artur R?pp - Updated Japanese language file, provided by the Geeklog.jp group Static Pages plugin From geeklog-cvs at lists.geeklog.net Sun Feb 8 04:50:19 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 08 Feb 2009 04:50:19 -0500 Subject: [geeklog-cvs] geeklog: Updated Estonian language file for the Calendar plugin, ... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/70c2ed57cfa5 changeset: 6774:70c2ed57cfa5 user: Dirk Haun date: Sun Feb 08 10:49:22 2009 +0100 description: Updated Estonian language file for the Calendar plugin, provided by Artur R?pp diffstat: 3 files changed, 3 insertions(+), 2 deletions(-) plugins/calendar/language/estonian.php | 2 +- plugins/calendar/language/estonian_utf-8.php | 2 +- public_html/docs/history | 1 + diffs (35 lines): diff -r 646c32d0878a -r 70c2ed57cfa5 plugins/calendar/language/estonian.php --- a/plugins/calendar/language/estonian.php Sat Feb 07 18:46:54 2009 +0100 +++ b/plugins/calendar/language/estonian.php Sun Feb 08 10:49:22 2009 +0100 @@ -109,7 +109,7 @@ 11 => 'Peakalender', 12 => 'Minu kalender', 25 => 'tagasi ', - 26 => 'K?ik p?evad', + 26 => 'Kogu p?ev', 27 => 'N?dal', 28 => 'Isiklik kalender, kasutaja', 29 => 'Avalik kalender', diff -r 646c32d0878a -r 70c2ed57cfa5 plugins/calendar/language/estonian_utf-8.php --- a/plugins/calendar/language/estonian_utf-8.php Sat Feb 07 18:46:54 2009 +0100 +++ b/plugins/calendar/language/estonian_utf-8.php Sun Feb 08 10:49:22 2009 +0100 @@ -109,7 +109,7 @@ 11 => 'Peakalender', 12 => 'Minu kalender', 25 => 'tagasi ', - 26 => 'K??ik p??evad', + 26 => 'Kogu p??ev', 27 => 'N??dal', 28 => 'Isiklik kalender, kasutaja', 29 => 'Avalik kalender', diff -r 646c32d0878a -r 70c2ed57cfa5 public_html/docs/history --- a/public_html/docs/history Sat Feb 07 18:46:54 2009 +0100 +++ b/public_html/docs/history Sun Feb 08 10:49:22 2009 +0100 @@ -13,6 +13,7 @@ [Dirk] - Display a message when sending the email for a new password failed [Dirk] +- Updated Estonian language file for the Calendar plugin, provided by Artur R?pp - Updated Japanese language file, provided by the Geeklog.jp group Static Pages plugin From geeklog-cvs at lists.geeklog.net Sun Feb 8 12:04:46 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 08 Feb 2009 12:04:46 -0500 Subject: [geeklog-cvs] geeklog: Updated Search API for Links plugin Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/9e74946957b9 changeset: 6777:9e74946957b9 user: Sami Barakat date: Sun Feb 08 17:03:14 2009 +0000 description: Updated Search API for Links plugin diffstat: 1 file changed, 32 insertions(+), 120 deletions(-) plugins/links/functions.inc | 152 +++++++++---------------------------------- diffs (173 lines): diff -r b6ad992926a3 -r 9e74946957b9 plugins/links/functions.inc --- a/plugins/links/functions.inc Sun Feb 08 17:02:59 2009 +0000 +++ b/plugins/links/functions.inc Sun Feb 08 17:03:14 2009 +0000 @@ -337,137 +337,49 @@ * @param date $datestart Start date to get results for * @param date $dateend End date to get results for * @param string $topic The topic they were searching in -* @param string $type Type of items they are searching, or 'all' +* @param string $type Type of items they are searching, or 'all' (deprecated) * @param int $author Get all results by this author * @param string $keyType search key type: 'all', 'phrase', 'any' -* @param int $page page number of current search -* @param int $perpage number of results per page +* @param int $page page number of current search (deprecated) +* @param int $perpage number of results per page (deprecated) * @return object search result object * */ function plugin_dopluginsearch_links($query, $datestart, $dateend, $topic, $type, $author, $keyType, $page, $perpage) { - global $_CONF, $_TABLES, $LANG_LINKS_SEARCH; + global $_TABLES, $LANG_LINKS; - if (empty ($type)) { - $type = 'all'; + // Make sure the query is SQL safe + $query = trim(addslashes($query)); + + $sql = "SELECT lid AS id, title, description, UNIX_TIMESTAMP(date) AS date, owner_id AS uid, hits, url "; + $sql .= "FROM {$_TABLES['links']} WHERE date <> 1 "; + $sql .= COM_getPermSQL('AND') . ' '; + + if (!empty($datestart) && !empty($dateend)) + { + $delim = substr($datestart, 4, 1); + if (!empty($delim)) + { + $DS = explode($delim, $datestart); + $DE = explode($delim, $dateend); + $startdate = mktime(0,0,0,$DS[1],$DS[2],$DS[0]); + $enddate = mktime(23,59,59,$DE[1],$DE[2],$DE[0]); + $sql .= "AND (UNIX_TIMESTAMP(date) BETWEEN '$startdate' AND '$enddate') "; + } + } + if (!empty ($author)) { + $sql .= "AND (owner_id = '$author') "; } - // Bail if we aren't supppose to do our search - if ($type <> 'all' AND $type <> 'links') { - $plugin_results = new Plugin(); - $plugin_results->plugin_name = 'links'; - $plugin_results->searchlabel = $LANG_LINKS_SEARCH['results']; + $search = new SearchCriteria('links', $LANG_LINKS[14]); + $columns = array('description','title'); + list($sql,$ftsql) = $search->buildSearchSQL($keyType, $query, $columns, $sql); + $search->setSQL($sql); + $search->setFTSQL($ftsql); + $search->setRank(3); - return $plugin_results; - } - - // link search - $select = 'SELECT lid,title,url,owner_id,hits,UNIX_TIMESTAMP(date) AS day'; - $sql = " FROM {$_TABLES['links']} WHERE date <> 1"; - - if (!empty ($query)) { - if ($keyType == 'phrase') { - $mysearchterm = addslashes ($query); - $sql .= " AND ((description LIKE '%$mysearchterm%')" - . " OR (title LIKE '%$mysearchterm%'))"; - } else if ($keyType == 'all') { - $mywords = explode (' ', $query); - $sql .= ' AND ('; - $tmp = ''; - foreach ($mywords AS $mysearchterm) { - $mysearchterm = addslashes (trim ($mysearchterm)); - if (!empty ($mysearchterm)) { - $tmp .= "((description LIKE '%$mysearchterm%')" - . " OR (title LIKE '%$mysearchterm%')) AND "; - } - } - $tmp = substr ($tmp, 0, strlen ($tmp) - 5); - $sql .= $tmp . ')'; - } else if ($keyType == 'any') { - $mywords = explode (' ', $query); - $sql .= ' AND ('; - $tmp = ''; - foreach ($mywords AS $mysearchterm) { - $mysearchterm = addslashes (trim ($mysearchterm)); - if (!empty ($mysearchterm)) { - $tmp .= "((description LIKE '%$mysearchterm%')" - . " OR (title LIKE '%$mysearchterm%')) OR "; - } - } - $tmp = substr ($tmp, 0, strlen ($tmp) - 4); - $sql .= $tmp . ')'; - } else { // quick search - $mysearchterm = addslashes ($query); - $sql .= " AND ((description LIKE '%$mysearchterm%')" - . " OR (title LIKE '%$mysearchterm%'))"; - } - } - - if (!empty ($datestart) && !empty ($dateend)) { - $delim = substr ($datestart, 4, 1); - if (!empty($delim)) { - $DS = explode ($delim, $datestart); - $DE = explode ($delim, $dateend); - $startdate = mktime (0, 0, 0, $DS[1], $DS[2], $DS[0]); - $enddate = mktime (23, 59, 59, $DE[1], $DE[2], $DE[0]); - $sql .= " AND (UNIX_TIMESTAMP(date) BETWEEN '$startdate' AND '$enddate')"; - } - } - - if (!empty ($author)) { - $sql .= " AND (owner_id = '$author')"; - } - $sql .= COM_getPermSQL('AND') . LINKS_getCategorySQL('AND'); - $sql .= ' GROUP BY date, lid, cid, url, description, title, hits, owner_id, group_id, perm_owner, perm_group, perm_members, perm_anon ORDER BY date DESC'; - $l = ($perpage * $page) - $perpage; - $sql .= ' LIMIT ' . $l . ',' . $perpage; - - // Perform search - $result = DB_query ($select . $sql); - $mycount = DB_numRows ($result); - $result_count = DB_query ('SELECT COUNT(*)' . $sql); - $B = DB_fetchArray ($result_count, true); - - $plugin_results = new Plugin(); - $plugin_results->plugin_name = 'links'; - $plugin_results->searchlabel = $LANG_LINKS_SEARCH['results']; - $plugin_results->addSearchHeading ($LANG_LINKS_SEARCH['title']); - $plugin_results->addSearchHeading ($LANG_LINKS_SEARCH['date']); - $plugin_results->addSearchHeading ($LANG_LINKS_SEARCH['author']); - $plugin_results->addSearchHeading ($LANG_LINKS_SEARCH['hits']); - $plugin_results->num_searchresults = 0; - $plugin_results->num_itemssearched = $B[0]; - $plugin_results->supports_paging = true; - - // NOTE if any of your data items need to be links then add them here! - // make sure data elements are in an array and in the same order as your - // headings above! - for ($i = 0; $i < $mycount; $i++) { - $A = DB_fetchArray ($result); - - $thetime = COM_getUserDateTimeFormat ($A['day']); - $A['title'] = stripslashes ($A['title']); - $submitter = COM_getDisplayName ($A['owner_id']); - if ($A['owner_id'] > 1) { - $profile_url = $_CONF['site_url'] - . '/users.php?mode=profile&uid=' . $A['owner_id']; - $profile = COM_createLink($submitter, $profile_url); - } else { - $profile = $submitter; - } - $linkUrl = COM_buildUrl($_CONF['site_url'] - . '/links/portal.php?what=link&item=' - . $A['lid']); - $anchor = COM_createLink($A['title'], $linkUrl, - array('title' => $A['url'])); - $row = array ($anchor, $thetime[0], $profile, - COM_NumberFormat ($A['hits'])); - $plugin_results->addSearchResult ($row); - $plugin_results->num_searchresults++; - } - - return $plugin_results; + return $search; } From geeklog-cvs at lists.geeklog.net Sun Feb 8 12:04:47 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 08 Feb 2009 12:04:47 -0500 Subject: [geeklog-cvs] geeklog: Updated Search API for Staticpages plugin Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/44c2dab884c9 changeset: 6778:44c2dab884c9 user: Sami Barakat date: Sun Feb 08 17:03:27 2009 +0000 description: Updated Search API for Staticpages plugin diffstat: 1 file changed, 33 insertions(+), 119 deletions(-) plugins/staticpages/functions.inc | 152 ++++++++----------------------------- diffs (172 lines): diff -r 9e74946957b9 -r 44c2dab884c9 plugins/staticpages/functions.inc --- a/plugins/staticpages/functions.inc Sun Feb 08 17:03:14 2009 +0000 +++ b/plugins/staticpages/functions.inc Sun Feb 08 17:03:27 2009 +0000 @@ -566,135 +566,49 @@ * @param date $datestart Start date to get results for * @param date $dateend End date to get results for * @param string $topic The topic they were searching in -* @param string $type Type of items they are searching, or 'all' +* @param string $type Type of items they are searching, or 'all' (deprecated) * @param int $author Get all results by this author * @param string $keyType search key type: 'all', 'phrase', 'any' -* @param int $page page number of current search -* @param int $perpage number of results per page +* @param int $page page number of current search (deprecated) +* @param int $perpage number of results per page (deprecated) * */ function plugin_dopluginsearch_staticpages($query, $datestart, $dateend, $topic, $type, $author, $keyType, $page, $perpage) { - global $_CONF, $_TABLES, $LANG_STATIC; + global $_TABLES, $LANG_STATIC; - if (empty ($type)) { - $type = 'all'; + // Make sure the query is SQL safe + $query = trim(addslashes($query)); + + $sql = "SELECT sp.sp_id AS id, sp.sp_title AS title, sp.sp_content AS description, UNIX_TIMESTAMP(sp.sp_date) AS date, sp.sp_uid AS uid, sp.sp_hits AS hits, CONCAT('/staticpages/index.php?page=', sp.sp_id) AS url "; + $sql .= "FROM {$_TABLES['staticpage']} AS sp,{$_TABLES['users']} AS u "; + $sql .= "WHERE (sp.sp_uid = u.uid) AND (sp_php <> 1) "; + $sql .= COM_getPermSQL('AND') . COM_getLangSQL('sp_id', 'AND', 'sp') . ' '; + + if (!empty($datestart) && !empty($dateend)) + { + $delim = substr($datestart, 4, 1); + if (!empty($delim)) + { + $DS = explode($delim, $datestart); + $DE = explode($delim, $dateend); + $startdate = mktime(0,0,0,$DS[1],$DS[2],$DS[0]); + $enddate = mktime(23,59,59,$DE[1],$DE[2],$DE[0]); + $sql .= "AND (UNIX_TIMESTAMP(sp_date) BETWEEN '$startdate' AND '$enddate') "; + } + } + if (!empty ($author)) { + $sql .= "AND (sp_uid = '$author') "; } - // Bail if we aren't supppose to do our search - if ($type <> 'all' AND $type <> 'staticpages') { - $plugin_results = new Plugin(); - $plugin_results->plugin_name = 'staticpages'; - $plugin_results->searchlabel = $LANG_STATIC['results']; + $search = new SearchCriteria('staticpages', $LANG_STATIC['staticpages']); + $columns = array('sp_content','sp_title'); + list($sql,$ftsql) = $search->buildSearchSQL($keyType, $query, $columns, $sql); + $search->setSQL($sql); + $search->setFTSQL($ftsql); + $search->setRank(3); - return $plugin_results; - } - - // Build search SQL - exclude static PHP pages from search. - $select = "SELECT u.username,u.fullname,sp.sp_id,sp.sp_title,sp.sp_hits,sp.sp_uid,UNIX_TIMESTAMP(sp.sp_date) AS day"; - $sql = " FROM {$_TABLES['staticpage']} AS sp,{$_TABLES['users']} AS u WHERE (sp.sp_uid = u.uid) AND (sp_php <> 1)" . COM_getPermSQL ('AND') . COM_getLangSql ('sp_id', 'AND', 'sp'); - - if (!empty ($query)) { - if ($keyType == 'phrase') { - $mysearchterm = addslashes ($query); - $sql .= " AND ((sp_content LIKE '%$mysearchterm%')" - . " OR (sp_title LIKE '%$mysearchterm%'))"; - } else if ($keyType == 'all') { - $mywords = explode (' ', $query); - $sql .= ' AND ('; - $tmp = ''; - foreach ($mywords AS $mysearchterm) { - $mysearchterm = addslashes (trim ($mysearchterm)); - if (!empty ($mysearchterm)) { - $tmp .= "(sp_content LIKE '%$mysearchterm%')" - . " OR (sp_title LIKE '%$mysearchterm%') AND "; - } - } - $tmp = substr ($tmp, 0, strlen ($tmp) - 5); - $sql .= $tmp . ')'; - } else if ($keyType == 'any') { - $mywords = explode (' ', $query); - $sql .= ' AND ('; - $tmp = ''; - foreach ($mywords AS $mysearchterm) { - $mysearchterm = addslashes (trim ($mysearchterm)); - if (!empty ($mysearchterm)) { - $tmp .= "(sp_content LIKE '%$mysearchterm%')" - . " OR (sp_title LIKE '%$mysearchterm%') OR "; - } - } - $tmp = substr ($tmp, 0, strlen ($tmp) - 4); - $sql .= $tmp . ')'; - } else { - $mysearchterm = addslashes ($query); - $sql .= " AND ((sp_content LIKE '%$mysearchterm%')" - . " OR (sp_title LIKE '%$mysearchterm%'))"; - } - } - - if (!empty ($datestart) && !empty ($dateend)) { - $delim = substr ($datestart, 4, 1); - if (!empty($delim)) { - $DS = explode ($delim, $datestart); - $DE = explode ($delim, $dateend); - $startdate = mktime (0, 0, 0, $DS[1], $DS[2], $DS[0]); - $enddate = mktime (23, 59, 59, $DE[1], $DE[2], $DE[0]); - $sql .= " AND (UNIX_TIMESTAMP(sp_date) BETWEEN '$startdate' AND '$enddate')"; - } - } - - if (!empty ($author)) { - $sql .= "AND (sp_uid = '$author')"; - } - $sql .= " GROUP BY sp_date, u.username, u.fullname, sp.sp_id, sp.sp_title, sp.sp_hits, sp.sp_uid ORDER BY sp_date DESC "; - $l = ($perpage * $page) - $perpage; - $sql .= 'LIMIT ' . $l . ',' . $perpage; - - // Perform search - $result = DB_query ($select . $sql); - $mycount = DB_numRows ($result); - $result_count = DB_query ('SELECT COUNT(*)' . $sql); - $B = DB_fetchArray ($result_count, true); - - // OK, now return table header labels - $plugin_results = new Plugin(); - $plugin_results->plugin_name = 'staticpages'; - $plugin_results->searchlabel = $LANG_STATIC['results']; - $plugin_results->addSearchHeading ($LANG_STATIC['title']); - $plugin_results->addSearchHeading ($LANG_STATIC['date']); - $plugin_results->addSearchHeading ($LANG_STATIC['author']); - $plugin_results->addSearchHeading ($LANG_STATIC['hits']); - $plugin_results->num_searchresults = 0; - $plugin_results->num_itemssearched = $B[0]; - $plugin_results->supports_paging = true; - - // NOTE if any of your data items need to be links then add them here! - // make sure data elements are in an array and in the same order as your - // headings above! - for ($i = 0; $i < $mycount; $i++) { - $A = DB_fetchArray ($result); - - $thetime = COM_getUserDateTimeFormat ($A['day']); - $A['sp_title'] = stripslashes ($A['sp_title']); - $pageurl = COM_buildURL ($_CONF['site_url'] - . '/staticpages/index.php?page=' . $A['sp_id']); - if (isset ($_CONF['show_fullname']) && ($_CONF['show_fullname'] == 1) && - !empty ($A['fullname'])) { - $author = $A['fullname']; - } else { - $author = $A['username']; - } - $profile = $_CONF['site_url'] . '/users.php?mode=profile&uid=' - . $A['sp_uid']; - $row = array (COM_createLink($A['sp_title'], $pageurl), - $thetime[0], - COM_createLink($author, $profile), - COM_NumberFormat ($A['sp_hits'])); - $plugin_results->addSearchResult ($row); - $plugin_results->num_searchresults++; - } - - return $plugin_results; + return $search; } From geeklog-cvs at lists.geeklog.net Sun Feb 8 12:04:46 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 08 Feb 2009 12:04:46 -0500 Subject: [geeklog-cvs] geeklog: Updated Search API for Calendar plugin Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/b6ad992926a3 changeset: 6776:b6ad992926a3 user: Sami Barakat date: Sun Feb 08 17:02:59 2009 +0000 description: Updated Search API for Calendar plugin diffstat: 1 file changed, 36 insertions(+), 120 deletions(-) plugins/calendar/functions.inc | 156 +++++++++------------------------------- diffs (186 lines): diff -r e075a7435782 -r b6ad992926a3 plugins/calendar/functions.inc --- a/plugins/calendar/functions.inc Sun Feb 08 10:49:22 2009 +0100 +++ b/plugins/calendar/functions.inc Sun Feb 08 17:02:59 2009 +0000 @@ -1578,146 +1578,62 @@ * @param date $datestart Start date to get results for * @param date $dateend End date to get results for * @param string $topic The topic they were searching in -* @param string $type Type of items they are searching, or 'all' +* @param string $type Type of items they are searching, or 'all' (deprecated) * @param int $author Get all results by this author * @param string $keyType search key type: 'all', 'phrase', 'any' -* @param int $page page number of current search -* @param int $perpage number of results per page +* @param int $page page number of current search (deprecated) +* @param int $perpage number of results per page (deprecated) * @return object search result object * */ function plugin_dopluginsearch_calendar($query, $datestart, $dateend, $topic, $type, $author, $keyType, $page, $perpage) { - global $_CONF, $_TABLES, $LANG09, $LANG_CAL_1, $_LANG_CAL_SEARCH; + global $_TABLES, $LANG_CAL_1; - if (empty ($type)) { - $type = 'all'; - } + // Make sure the query is SQL safe + $query = trim(addslashes($query)); - // Bail if we aren't supppose to do our search - if ($type <> 'all' AND $type <> 'calendar') { - $event_results = new Plugin(); - $event_results->plugin_name = 'calendar'; - $event_results->num_itemssearched = 0; - $event_results->searchlabel = $_LANG_CAL_SEARCH['results']; + $sql_e = "SELECT eid AS id, title, description, UNIX_TIMESTAMP(datestart) AS date, owner_id AS uid, hits, CONCAT('/calendar/event.php?eid=',eid) AS url "; + $sql_e .= "FROM {$_TABLES['events']} WHERE 1=1 "; - return $event_results; - } + $sql_p = "SELECT eid AS id, title, description, UNIX_TIMESTAMP(datestart) AS date, owner_id AS uid, '0' AS hits, CONCAT('/calendar/event.php?eid=',eid) AS url "; + $sql_p .= "FROM {$_TABLES['personal_events']} WHERE 1=1 "; - $select = "SELECT eid,title,location,event_type,datestart,dateend,timestart,timeend,allday,UNIX_TIMESTAMP(datestart) AS day"; - $sql = " FROM {$_TABLES['events']} WHERE "; + $sql = COM_getPermSQL('AND') . ' '; - if($keyType == 'phrase') { - // do an exact phrase search (default) - $mywords[] = $query; - $mysearchterm = addslashes ($query); - $sql .= "(location LIKE '%$mysearchterm%' "; - $sql .= "OR description LIKE '%$mysearchterm%' "; - $sql .= "OR title LIKE '%$mysearchterm%') "; - } else if ($keyType == 'all') { - //must contain ALL of the keywords - $mywords = explode(' ', $query); - $tmp = ''; - foreach ($mywords AS $mysearchterm) { - $mysearchterm = addslashes (trim ($mysearchterm)); - $tmp .= "(location LIKE '%$mysearchterm%' OR "; - $tmp .= "description LIKE '%$mysearchterm%' OR "; - $tmp .= "title LIKE '%$mysearchterm%') AND "; - } - $tmp = substr($tmp, 0, strlen($tmp) - 4); - $sql .= $tmp; - } else if ($keyType == 'any') { - //must contain ANY of the keywords - $mywords = explode(' ', $query); - $tmp = ''; - foreach ($mywords AS $mysearchterm) { - $mysearchterm = addslashes (trim ($mysearchterm)); - $tmp .= "(location LIKE '%$mysearchterm%' OR "; - $tmp .= "description LIKE '%$mysearchterm%' OR "; - $tmp .= "title LIKE '%$mysearchterm%') OR "; - } - $tmp = substr($tmp, 0, strlen($tmp) - 3); - $sql .= "($tmp)"; - } else { - $mywords[] = $query; - $mysearchterm = addslashes ($query); - $sql .= "(location LIKE '%$mysearchterm%' "; - $sql .= "OR description LIKE '%$mysearchterm%' "; - $sql .= "OR title LIKE '%$mysearchterm%') "; - } - - if (!empty($datestart) AND !empty($dateend)) { + if (!empty($datestart) && !empty($dateend)) + { $delim = substr($datestart, 4, 1); - if (!empty($delim)) { + if (!empty($delim)) + { $DS = explode($delim, $datestart); $DE = explode($delim, $dateend); - $startdate = mktime(0, 0, 0, $DS[1], $DS[2], $DS[0]); - $enddate = mktime(23, 59, 59, $DE[1], $DE[2], $DE[0]); + $startdate = mktime(0,0,0,$DS[1],$DS[2],$DS[0]); + $enddate = mktime(23,59,59,$DE[1],$DE[2],$DE[0]); $sql .= "AND (UNIX_TIMESTAMP(datestart) BETWEEN '$startdate' AND '$enddate') "; } } - if (!empty($author)) { - $sql .= "AND (owner_id = '$author')"; - } - $sql .= COM_getPermSQL ('AND'); - $sql .= ' GROUP BY datestart, eid, title, description, location, dateend, timestart, timeend, allday, event_type ORDER BY datestart DESC '; - $l = ($perpage * $page) - $perpage; - $sql .= 'LIMIT ' . $l . ',' . $perpage; - - $result_events = DB_query ($select . $sql); - $result_count = DB_query ('SELECT COUNT(*)' . $sql); - $B = DB_fetchArray ($result_count, true); - - $event_results = new Plugin(); - $event_results->searchresults = array(); - $event_results->searchlabel = $_LANG_CAL_SEARCH['results']; - $event_results->addSearchHeading ($_LANG_CAL_SEARCH['title']); - $event_results->addSearchHeading ($_LANG_CAL_SEARCH['date_time']); - if (empty ($_LANG_CAL_SEARCH['event_type'])) { - $event_results->addSearchHeading ($LANG_CAL_1[37]); - } else { - $event_results->addSearchHeading ($_LANG_CAL_SEARCH['event_type']); - } - $event_results->num_searchresults = 0; - $event_results->num_itemssearched = $B[0]; - $event_results->supports_paging = true; - - // NOTE if any of your data items need to be events then add them - // here! Make sure data elements are in an array and in the same - // order as your headings above! - while ($A = DB_fetchArray ($result_events)) { - if ($A['allday'] == 0) { - if ($A['datestart'] == $A['dateend']) { - $fulldate = $A['datestart'] . ' ' . $A['timestart']; - if ($A['timestart'] != $A['timeend']) { - $fulldate .= ' - ' . $A['timeend']; - } - } else { - $fulldate = $A['datestart'] . ' ' . $A['timestart'] . ' - ' - . $A['dateend'] . ' ' . $A['timeend']; - } - } else { - if ($A['datestart'] <> $A['dateend']) { - $fulldate = $A['datestart'] . ' - ' . $A['dateend'] - . ' ' . $LANG09[35]; - } else { - $fulldate = $A['datestart'] . ' ' . $LANG09[35]; - } - } - $thetime = COM_getUserDateTimeFormat ($A['day']); - $A['title'] = stripslashes ($A['title']); - $A['title'] = str_replace ('$', '$', $A['title']); - $url = $_CONF['site_url'] . '/calendar/event.php?eid=' . $A['eid']; - if (!empty($query)) { - $url .= '&query=' . urlencode($query); - } - $link = COM_createLink($A['title'], $url); - $row = array ($link, $fulldate, stripslashes ($A['event_type'])); - $event_results->addSearchResult($row); - $event_results->num_searchresults++; + if (!empty ($author)) { + $sql .= "AND (owner_id = '$author') "; } - return $event_results; + // Search the public events + $search_e = new SearchCriteria('calendar', array($LANG_CAL_1[16],$LANG_CAL_1[24])); + $columns = array('location','description','title'); + list($sql_tmp,$ftsql_tmp) = $search_e->buildSearchSQL($keyType, $query, $columns, $sql_e . $sql); + $search_e->setSQL($sql_tmp); + $search_e->setFTSQL($ftsql_tmp); + $search_e->setRank(2); + + // Search personal events + $search_p = new SearchCriteria('calendar', array($LANG_CAL_1[16],$LANG_CAL_1[23])); + $columns = array('location','description','title'); + list($sql_tmp,$ftsql_tmp) = $search_p->buildSearchSQL($keyType, $query, $columns, $sql_p . $sql); + $search_p->setSQL($sql_tmp); + $search_p->setFTSQL($ftsql_tmp); + $search_p->setRank(2); + + return array($search_e,$search_p); } From geeklog-cvs at lists.geeklog.net Sun Feb 8 12:28:20 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 08 Feb 2009 12:28:20 -0500 Subject: [geeklog-cvs] geeklog: Added tag geeklog_1_5_2_stable for changeset 70c2ed57cfa5 Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/f8fe2b0d0c69 changeset: 6779:f8fe2b0d0c69 user: Dirk Haun date: Sun Feb 08 18:28:01 2009 +0100 description: Added tag geeklog_1_5_2_stable for changeset 70c2ed57cfa5 diffstat: 1 file changed, 1 insertion(+) .hgtags | 1 + diffs (8 lines): diff -r 70c2ed57cfa5 -r f8fe2b0d0c69 .hgtags --- a/.hgtags Sun Feb 08 10:49:22 2009 +0100 +++ b/.hgtags Sun Feb 08 18:28:01 2009 +0100 @@ -1,3 +1,4 @@ f51a1417bd7041bea96370434142498438d4e558 geeklog_1_5_0_stable 8abbb13ee513b6cf2c76d702273c3fa118f9bf5c geeklog_1_5_1_stable b3eeb545eec477cc120336f895e31a34fd64a486 geeklog_1_5_2rc1 +70c2ed57cfa5808ee0859f113dfa77d867720b5c geeklog_1_5_2_stable From geeklog-cvs at lists.geeklog.net Thu Feb 12 06:22:51 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Thu, 12 Feb 2009 06:22:51 -0500 Subject: [geeklog-cvs] geeklog: How the f*** did that happen? (profanity intended) Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/035f447a8da7 changeset: 6780:035f447a8da7 user: Dirk Haun date: Thu Feb 12 12:22:39 2009 +0100 description: How the f*** did that happen? (profanity intended) diffstat: 1 file changed, 2 insertions(+), 2 deletions(-) public_html/lib-common.php | 4 ++-- diffs (14 lines): diff -r 44c2dab884c9 -r 035f447a8da7 public_html/lib-common.php --- a/public_html/lib-common.php Sun Feb 08 17:03:27 2009 +0000 +++ b/public_html/lib-common.php Thu Feb 12 12:22:39 2009 +0100 @@ -3674,8 +3674,8 @@ /** * Syndication import function. Imports headline data to a portal block. * -* Rewritten December 19th 2004 by Michael Jervis (mike@*censored*ingbrit.com). Now -* utilises a Factory Pattern to open a URL and automaticaly retreive a feed +* Rewritten December 19th 2004 by Michael Jervis (mike AT fuckingbrit DOT com). +* Now utilises a Factory Pattern to open a URL and automaticaly retreive a feed * object populated with feed data. Then import it into the portal block. * * @param string $bid Block ID From geeklog-cvs at lists.geeklog.net Sun Feb 15 14:14:33 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 15 Feb 2009 14:14:33 -0500 Subject: [geeklog-cvs] geeklog: Set the page title when viewing a poll Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/9a83087b80b0 changeset: 6781:9a83087b80b0 user: Dirk Haun date: Sat Feb 14 17:02:00 2009 +0100 description: Set the page title when viewing a poll diffstat: 2 files changed, 6 insertions(+), 5 deletions(-) public_html/docs/history | 1 + public_html/polls/index.php | 10 +++++----- diffs (45 lines): diff -r 035f447a8da7 -r 9a83087b80b0 public_html/docs/history --- a/public_html/docs/history Thu Feb 12 12:22:39 2009 +0100 +++ b/public_html/docs/history Sat Feb 14 17:02:00 2009 +0100 @@ -58,6 +58,7 @@ Polls plugin ------------ +- Set the page title when viewing a poll [Dirk] - Added auto installation support [Dirk] - Added support for PLG_getItemInfo, PLG_itemSaved, PLG_itemDeleted [Dirk] - Extended length of poll IDs to 40 characters (feature request #0000754) [Dirk] diff -r 035f447a8da7 -r 9a83087b80b0 public_html/polls/index.php --- a/public_html/polls/index.php Thu Feb 12 12:22:39 2009 +0100 +++ b/public_html/polls/index.php Sat Feb 14 17:02:00 2009 +0100 @@ -143,7 +143,7 @@ $msg = COM_applyFilter($_REQUEST['msg'], true); } -if (isset($pid)) { +if (! empty($pid)) { $questions_sql = "SELECT question,qid FROM {$_TABLES['pollquestions']} " . "WHERE pid='$pid' ORDER BY qid"; $questions = DB_query($questions_sql); @@ -160,8 +160,9 @@ $_CONF['cookie_path'], $_CONF['cookiedomain'], $_CONF['cookiesecure']); $display .= COM_siteHeader() . POLLS_pollsave($pid, $aid); -} else if (isset($pid)) { - $display .= COM_siteHeader(); +} elseif (! empty($pid)) { + $topic = DB_getItem ($_TABLES['polltopics'], 'topic', "pid = '{$pid}'"); + $display .= COM_siteHeader('menu', $topic); if ($msg > 0) { $display .= COM_showMessage($msg, 'polls'); } @@ -169,8 +170,7 @@ $display .= COM_startBlock ( $LANG_POLLS['not_saved'], '', COM_getBlockTemplate ('_msg_block', 'header')) - . $LANG_POLLS['answer_all'] . ' "' - . DB_getItem ($_TABLES['polltopics'], 'topic', "pid = '{$pid}'") . '"' + . $LANG_POLLS['answer_all'] . ' "' . $topic . '"' . COM_endBlock (COM_getBlockTemplate ('_msg_block', 'footer')); } if (DB_getItem($_TABLES['polltopics'], 'is_open', "pid = '$pid'") != 1) { From geeklog-cvs at lists.geeklog.net Sun Feb 15 14:14:34 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 15 Feb 2009 14:14:34 -0500 Subject: [geeklog-cvs] geeklog: Use IN to exlude topics instead of a (possibly long) li... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/3a3d0cd63d7b changeset: 6782:3a3d0cd63d7b user: Dirk Haun date: Sun Feb 15 10:59:22 2009 +0100 description: Use IN to exlude topics instead of a (possibly long) list of ORs diffstat: 1 file changed, 14 insertions(+), 17 deletions(-) public_html/admin/story.php | 31 ++++++++++++++----------------- diffs (53 lines): diff -r 9a83087b80b0 -r 3a3d0cd63d7b public_html/admin/story.php --- a/public_html/admin/story.php Sat Feb 14 17:02:00 2009 +0100 +++ b/public_html/admin/story.php Sun Feb 15 10:59:22 2009 +0100 @@ -116,35 +116,32 @@ $current_topic = $LANG09[9]; } - if ($current_topic == $LANG09[9]) { + if ($current_topic == $LANG09[9]) { // "All" $excludetopics = ''; $seltopics = ''; - $topicsql = "SELECT tid,topic FROM {$_TABLES['topics']}" . COM_getPermSQL (); - $tresult = DB_query( $topicsql ); - $trows = DB_numRows( $tresult ); - if( $trows > 0 ) - { - $excludetopics .= ' ('; - for( $i = 1; $i <= $trows; $i++ ) { - $T = DB_fetchArray ($tresult); - if ($i > 1) { - $excludetopics .= ' OR '; - } - $excludetopics .= "tid = '{$T['tid']}'"; - $seltopics .= '