From geeklog-cvs at lists.geeklog.net Wed Apr 1 16:22:11 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Wed, 01 Apr 2009 16:22:11 -0400 Subject: [geeklog-cvs] geeklog: cleaned up a couple phpdoc tags Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/81f6adbf7687 changeset: 6887:81f6adbf7687 user: jcarlson date: Wed Apr 01 15:21:52 2009 -0500 description: cleaned up a couple phpdoc tags diffstat: 1 file changed, 17 insertions(+), 12 deletions(-) system/classes/unpacker.class.php | 29 +++++++++++++++++------------ diffs (87 lines): diff -r 08364e03181e -r 81f6adbf7687 system/classes/unpacker.class.php --- a/system/classes/unpacker.class.php Wed Apr 01 00:39:22 2009 +0100 +++ b/system/classes/unpacker.class.php Wed Apr 01 15:21:52 2009 -0500 @@ -75,7 +75,7 @@ * Constructor * * @param string $file full path to archive - * @param string $optional_type mime type ( application/zip, /tar, etc ) + * @param string $mime_type mime type ( optional, application/zip, /tar, etc ) * @return bool $success result of loading archive passed */ function unpacker($file, $mime_type = null) { @@ -232,7 +232,7 @@ /** * return contents of archive (wrapper) * - * @return array(array('filename','size','etc')) archive contents + * @return array array(array('filename','size','etc')) archive contents */ function getlist() { @@ -255,7 +255,7 @@ /** * return contents of zip archive * - * @return array(array('filename','size','etc')) archive contents + * @return array array(array('filename','size','etc')) archive contents */ function list_zip() { @@ -298,7 +298,7 @@ /** * return contents of tar archive * - * @return array(array('filename','size','etc')) archive contents + * @return array array(array('filename','size','etc')) archive contents */ function list_tar() { @@ -413,9 +413,7 @@ /** * return the first directory name in the archive * - * @param string $target_path destination - * @param array $item_array array of specific path/file(s) - * @return mixed result + * @return mixed string directory name, or bool false */ function getdir() { @@ -432,11 +430,9 @@ /** * return the total unpacked size of the archive * - * @param string $target_path destination - * @param array $item_array array of specific path/file(s) - * @return bool result + * @return mixed (size in bytes or false on error) */ - function getunpackedsize($optional_calibration = null) { + function getunpackedsize() { if (is_null($this->u_size) === false) { return $this->u_size; @@ -457,6 +453,15 @@ } } + /** + * sets an error number and string to report if asked + * acts as a wrapper for return false, to set an error + * at the same time + * + * @param string $errorno error number ( anything goes ) + * @param string $error error text ( anything goes ) + * @return bool, always false + */ function setError($errorno, $error) { $this->errorno = $errorno; @@ -465,4 +470,4 @@ } } -?> +?> \ No newline at end of file From geeklog-cvs at lists.geeklog.net Sat Apr 4 13:50:15 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sat, 04 Apr 2009 13:50:15 -0400 Subject: [geeklog-cvs] geeklog: Fixed SQL injection in the session handling Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/0e10ca8cf00c changeset: 6888:0e10ca8cf00c user: Dirk Haun date: Sat Apr 04 16:25:45 2009 +0200 description: Fixed SQL injection in the session handling diffstat: 5 files changed, 21 insertions(+), 6 deletions(-) public_html/admin/install/index.php | 2 +- public_html/docs/changes.html | 7 +++++++ public_html/docs/history | 10 ++++++++++ public_html/siteconfig.php.dist | 2 +- system/lib-sessions.php | 6 ++---- diffs (89 lines): diff -r d7bb5b8d4145 -r 0e10ca8cf00c public_html/admin/install/index.php --- a/public_html/admin/install/index.php Mon Mar 30 20:42:58 2009 +0200 +++ b/public_html/admin/install/index.php Sat Apr 04 16:25:45 2009 +0200 @@ -48,7 +48,7 @@ define("LB", "\n"); } if (!defined('VERSION')) { - define('VERSION', '1.5.2sr1'); + define('VERSION', '1.5.2sr2'); } if (!defined('XHTML')) { define('XHTML', ' /'); diff -r d7bb5b8d4145 -r 0e10ca8cf00c public_html/docs/changes.html --- a/public_html/docs/changes.html Mon Mar 30 20:42:58 2009 +0200 +++ b/public_html/docs/changes.html Sat Apr 04 16:25:45 2009 +0200 @@ -15,6 +15,13 @@ and / or obvious changes. For a detailed list of changes, please consult the ChangeLog. The file docs/changed-files has a list of files that have been changed since the last release.

+ +

Geeklog 1.5.2sr2

+ +

Bookoo of the Nine Situations Group posted an SQL injection exploit for glFusion that also works with Geeklog. This issue allowed an attacker to extract the password hash for any account and is fixed with this release.

+ + +

Fernando Muñoz reported a possible XSS in the query form on most admin panels that we are fixing with this release.

Geeklog 1.5.2sr1

diff -r d7bb5b8d4145 -r 0e10ca8cf00c public_html/docs/history --- a/public_html/docs/history Mon Mar 30 20:42:58 2009 +0200 +++ b/public_html/docs/history Sat Apr 04 16:25:45 2009 +0200 @@ -1,4 +1,14 @@ Geeklog History/Changes: + +Apr 4, 2009 (1.5.2sr2) +----------- + +This release addresses the following security issue: + +Bookoo of the Nine Situations Group posted an SQL injection exploit for glFusion +that also works with Geeklog. This issue allowed an attacker to extract the +password hash for any account and is fixed with this release. + Mar 30, 2009 (1.5.2sr1) ------------ diff -r d7bb5b8d4145 -r 0e10ca8cf00c public_html/siteconfig.php.dist --- a/public_html/siteconfig.php.dist Mon Mar 30 20:42:58 2009 +0200 +++ b/public_html/siteconfig.php.dist Sat Apr 04 16:25:45 2009 +0200 @@ -38,7 +38,7 @@ define('LB',"\n"); } if (!defined('VERSION')) { - define('VERSION', '1.5.2sr1'); + define('VERSION', '1.5.2sr2'); } ?> diff -r d7bb5b8d4145 -r 0e10ca8cf00c system/lib-sessions.php --- a/system/lib-sessions.php Mon Mar 30 20:42:58 2009 +0200 +++ b/system/lib-sessions.php Sat Apr 04 16:25:45 2009 +0200 @@ -8,7 +8,7 @@ // | | // | Geeklog session 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 | @@ -29,8 +29,6 @@ // | Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | // | | // +---------------------------------------------------------------------------+ -// -// $Id: lib-sessions.php,v 1.47 2008/09/21 08:37:12 dhaun Exp $ /** * This is the session management library for Geeklog. Some of this code was @@ -397,7 +395,7 @@ if ($md5_based == 1) { $sql = "UPDATE {$_TABLES['sessions']} SET start_time=$newtime WHERE (md5_sess_id = '$sessid')"; } else { - $sql = "UPDATE {$_TABLES['sessions']} SET start_time=$newtime WHERE (sess_id = $sessid)"; + $sql = "UPDATE {$_TABLES['sessions']} SET start_time=$newtime WHERE (sess_id = '$sessid')"; } $result = DB_query($sql); From geeklog-cvs at lists.geeklog.net Sat Apr 4 13:50:16 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sat, 04 Apr 2009 13:50:16 -0400 Subject: [geeklog-cvs] geeklog: Added tag geeklog_1_5_2sr2 for changeset 0e10ca8cf00c Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/cb03b069c0f4 changeset: 6889:cb03b069c0f4 user: Dirk Haun date: Sat Apr 04 16:26:52 2009 +0200 description: Added tag geeklog_1_5_2sr2 for changeset 0e10ca8cf00c diffstat: 1 file changed, 1 insertion(+) .hgtags | 1 + diffs (8 lines): diff -r 0e10ca8cf00c -r cb03b069c0f4 .hgtags --- a/.hgtags Sat Apr 04 16:25:45 2009 +0200 +++ b/.hgtags Sat Apr 04 16:26:52 2009 +0200 @@ -3,3 +3,4 @@ b3eeb545eec477cc120336f895e31a34fd64a486 geeklog_1_5_2rc1 70c2ed57cfa5808ee0859f113dfa77d867720b5c geeklog_1_5_2_stable e8be41d4f5d184142659a2d74b15e400e8c542a7 geeklog_1_5_2sr1 +0e10ca8cf00c66e1fe3a91eae50b4a1c41f9f133 geeklog_1_5_2sr2 From geeklog-cvs at lists.geeklog.net Sat Apr 4 13:50:16 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sat, 04 Apr 2009 13:50:16 -0400 Subject: [geeklog-cvs] geeklog: Added tag geeklog_1_5_2sr2 for changeset 0e10ca8cf00c Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/cb03b069c0f4 changeset: 6889:cb03b069c0f4 user: Dirk Haun date: Sat Apr 04 16:26:52 2009 +0200 description: Added tag geeklog_1_5_2sr2 for changeset 0e10ca8cf00c diffstat: 1 file changed, 1 insertion(+) .hgtags | 1 + diffs (8 lines): diff -r 0e10ca8cf00c -r cb03b069c0f4 .hgtags --- a/.hgtags Sat Apr 04 16:25:45 2009 +0200 +++ b/.hgtags Sat Apr 04 16:26:52 2009 +0200 @@ -3,3 +3,4 @@ b3eeb545eec477cc120336f895e31a34fd64a486 geeklog_1_5_2rc1 70c2ed57cfa5808ee0859f113dfa77d867720b5c geeklog_1_5_2_stable e8be41d4f5d184142659a2d74b15e400e8c542a7 geeklog_1_5_2sr1 +0e10ca8cf00c66e1fe3a91eae50b4a1c41f9f133 geeklog_1_5_2sr2 From geeklog-cvs at lists.geeklog.net Sat Apr 4 15:43:04 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sat, 04 Apr 2009 15:43:04 -0400 Subject: [geeklog-cvs] tools: Geeklog 1.5.2sr2 is the current version now Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/cf915aa5cfed changeset: 29:cf915aa5cfed user: Dirk Haun date: Sat Apr 04 21:42:46 2009 +0200 description: Geeklog 1.5.2sr2 is the current version now diffstat: 1 file changed, 14 insertions(+), 13 deletions(-) versionchecker/versionchecker.php | 27 ++++++++++++++------------- diffs (45 lines): diff -r 63121fb1dc48 -r cf915aa5cfed versionchecker/versionchecker.php --- a/versionchecker/versionchecker.php Tue Mar 31 11:01:58 2009 +0200 +++ b/versionchecker/versionchecker.php Sat Apr 04 21:42:46 2009 +0200 @@ -9,7 +9,7 @@

'1.3.11sr7-1', '1.3.11sr7' => '1.3.11sr7-1', */ - '1.4.0' => '1.5.2sr1', - '1.4.0sr1' => '1.5.2sr1', - '1.4.0sr2' => '1.5.2sr1', - '1.4.0sr3' => '1.5.2sr1', - '1.4.0sr4' => '1.5.2sr1', - '1.4.0sr5' => '1.5.2sr1', - '1.4.0sr5-1' => '1.5.2sr1', - '1.4.0sr6' => '1.5.2sr1', - '1.4.1' => '1.5.2sr1', + '1.4.0' => '1.5.2sr2', + '1.4.0sr1' => '1.5.2sr2', + '1.4.0sr2' => '1.5.2sr2', + '1.4.0sr3' => '1.5.2sr2', + '1.4.0sr4' => '1.5.2sr2', + '1.4.0sr5' => '1.5.2sr2', + '1.4.0sr5-1' => '1.5.2sr2', + '1.4.0sr6' => '1.5.2sr2', + '1.4.1' => '1.5.2sr2', - '1.5.0' => '1.5.2sr1', - '1.5.1' => '1.5.2sr1', - '1.5.2' => '1.5.2sr1' + '1.5.0' => '1.5.2sr2', + '1.5.1' => '1.5.2sr2', + '1.5.2' => '1.5.2sr2', + '1.5.2sr1' => '1.5.2sr2' ); $v = explode ('.', $version); From geeklog-cvs at lists.geeklog.net Sat Apr 4 15:49:26 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sat, 04 Apr 2009 15:49:26 -0400 Subject: [geeklog-cvs] geeklog: Ported 1.5.2sr2 changes over from the branch Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/f588d8d5c7c0 changeset: 6890:f588d8d5c7c0 user: Dirk Haun date: Sat Apr 04 20:22:02 2009 +0200 description: Ported 1.5.2sr2 changes over from the branch diffstat: 3 files changed, 19 insertions(+), 6 deletions(-) public_html/docs/changes.html | 5 +++++ public_html/docs/history | 12 +++++++++++- system/lib-sessions.php | 8 +++----- diffs (80 lines): diff -r 81f6adbf7687 -r f588d8d5c7c0 public_html/docs/changes.html --- a/public_html/docs/changes.html Wed Apr 01 15:21:52 2009 -0500 +++ b/public_html/docs/changes.html Sat Apr 04 20:22:02 2009 +0200 @@ -35,6 +35,11 @@
  • The minimum PHP version required by Geeklog is now PHP 4.3.0. Given that the PHP team ended support for PHP 4 in August 2008, you should be looking into upgrading to PHP 5 anyway.
  • + + +

    Geeklog 1.5.2sr2

    + +

    Bookoo of the Nine Situations Group posted an SQL injection exploit for glFusion that also works with Geeklog. This issue allowed an attacker to extract the password hash for any account and is fixed with this release.

    Geeklog 1.5.2sr1

    diff -r 81f6adbf7687 -r f588d8d5c7c0 public_html/docs/history --- a/public_html/docs/history Wed Apr 01 15:21:52 2009 -0500 +++ b/public_html/docs/history Sat Apr 04 20:22:02 2009 +0200 @@ -1,6 +1,6 @@ Geeklog History/Changes: -Mar ??, 2009 (1.6.0) +Apr ??, 2009 (1.6.0) ------------ Geeklog 1.6.0 incorporates the following projects implemented during @@ -130,6 +130,16 @@ every other plugin and built-in function does (bug #0000644) [Dirk] +Apr 4, 2009 (1.5.2sr2) +----------- + +This release addresses the following security issue: + +Bookoo of the Nine Situations Group posted an SQL injection exploit for glFusion +that also works with Geeklog. This issue allowed an attacker to extract the +password hash for any account and is fixed with this release. + + Mar 30, 2009 (1.5.2sr1) ------------ diff -r 81f6adbf7687 -r f588d8d5c7c0 system/lib-sessions.php --- a/system/lib-sessions.php Wed Apr 01 15:21:52 2009 -0500 +++ b/system/lib-sessions.php Sat Apr 04 20:22:02 2009 +0200 @@ -2,13 +2,13 @@ /* Reminder: always indent with 4 spaces (no tabs). */ // +---------------------------------------------------------------------------+ -// | Geeklog 1.5 | +// | Geeklog 1.6 | // +---------------------------------------------------------------------------+ // | lib-sessions.php | // | | // | Geeklog session 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 | @@ -29,8 +29,6 @@ // | Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | // | | // +---------------------------------------------------------------------------+ -// -// $Id: lib-sessions.php,v 1.47 2008/09/21 08:37:12 dhaun Exp $ /** * This is the session management library for Geeklog. Some of this code was @@ -397,7 +395,7 @@ if ($md5_based == 1) { $sql = "UPDATE {$_TABLES['sessions']} SET start_time=$newtime WHERE (md5_sess_id = '$sessid')"; } else { - $sql = "UPDATE {$_TABLES['sessions']} SET start_time=$newtime WHERE (sess_id = $sessid)"; + $sql = "UPDATE {$_TABLES['sessions']} SET start_time=$newtime WHERE (sess_id = '$sessid')"; } $result = DB_query($sql); From geeklog-cvs at lists.geeklog.net Sat Apr 4 15:49:27 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sat, 04 Apr 2009 15:49:27 -0400 Subject: [geeklog-cvs] geeklog: Geeklog 2 -> AptitudeCMS Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/9715b970abbb changeset: 6891:9715b970abbb user: Dirk Haun date: Sat Apr 04 20:31:05 2009 +0200 description: Geeklog 2 -> AptitudeCMS diffstat: 1 file changed, 5 insertions(+), 7 deletions(-) public_html/docs/index.html | 12 +++++------- diffs (24 lines): diff -r f588d8d5c7c0 -r 9715b970abbb public_html/docs/index.html --- a/public_html/docs/index.html Sat Apr 04 20:22:02 2009 +0200 +++ b/public_html/docs/index.html Sat Apr 04 20:31:05 2009 +0200 @@ -113,15 +113,13 @@

    Geeklog was originally developed for the Security Geeks web site and was originally authored by Jason Whittenburg. In early 2001, Jason decided it was time to devote his time to other things and handed the project over to -Tony Bibbs who uses Geeklog to run Iowa -Outdoors. Tony is currently focusing on getting the next generation -Geeklog, dubbed GL2, off the ground, while Dirk Haun is now maintaining the -1.x branch.

    +Tony Bibbs. Tony is now focusing on getting AptitudeCMS (formerly Geeklog 2), a next generation CMS, off +the ground, while Dirk Haun is now acting as the Geeklog maintainer.

    Geeklog is bona fide open-source software and has been released under the -GNU GPLv2 for use by -others. Configuring Geeklog is meant to be an easy process though it will -require you to have access to several components of your system.

    +GNU GPLv2 +for use by others. Configuring Geeklog is meant to be an easy process though it +will require you to have access to several components of your system.

    This document is still evolving, so there may be unintended omissions or various steps may be over or under explained. It's assumed that you have From geeklog-cvs at lists.geeklog.net Sat Apr 4 15:49:27 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sat, 04 Apr 2009 15:49:27 -0400 Subject: [geeklog-cvs] geeklog: Geeklog 2 -> AptitudeCMS Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/9715b970abbb changeset: 6891:9715b970abbb user: Dirk Haun date: Sat Apr 04 20:31:05 2009 +0200 description: Geeklog 2 -> AptitudeCMS diffstat: 1 file changed, 5 insertions(+), 7 deletions(-) public_html/docs/index.html | 12 +++++------- diffs (24 lines): diff -r f588d8d5c7c0 -r 9715b970abbb public_html/docs/index.html --- a/public_html/docs/index.html Sat Apr 04 20:22:02 2009 +0200 +++ b/public_html/docs/index.html Sat Apr 04 20:31:05 2009 +0200 @@ -113,15 +113,13 @@

    Geeklog was originally developed for the Security Geeks web site and was originally authored by Jason Whittenburg. In early 2001, Jason decided it was time to devote his time to other things and handed the project over to -Tony Bibbs who uses Geeklog to run Iowa -Outdoors. Tony is currently focusing on getting the next generation -Geeklog, dubbed GL2, off the ground, while Dirk Haun is now maintaining the -1.x branch.

    +Tony Bibbs. Tony is now focusing on getting AptitudeCMS (formerly Geeklog 2), a next generation CMS, off +the ground, while Dirk Haun is now acting as the Geeklog maintainer.

    Geeklog is bona fide open-source software and has been released under the -GNU GPLv2 for use by -others. Configuring Geeklog is meant to be an easy process though it will -require you to have access to several components of your system.

    +GNU GPLv2 +for use by others. Configuring Geeklog is meant to be an easy process though it +will require you to have access to several components of your system.

    This document is still evolving, so there may be unintended omissions or various steps may be over or under explained. It's assumed that you have From geeklog-cvs at lists.geeklog.net Sun Apr 5 03:44:50 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 05 Apr 2009 03:44:50 -0400 Subject: [geeklog-cvs] geeklog: Wrong function name: STORY_doDeleteStoryNow -> STORY_do... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/f2425e08ba4c changeset: 6892:f2425e08ba4c user: Dirk Haun date: Sun Apr 05 09:34:05 2009 +0200 description: Wrong function name: STORY_doDeleteStoryNow -> STORY_doDeleteThisStoryNow diffstat: 1 file changed, 1 insertion(+), 1 deletion(-) system/lib-story.php | 2 +- diffs (12 lines): diff -r 9715b970abbb -r f2425e08ba4c system/lib-story.php --- a/system/lib-story.php Sat Apr 04 20:31:05 2009 +0200 +++ b/system/lib-story.php Sun Apr 05 09:34:05 2009 +0200 @@ -1336,7 +1336,7 @@ } } - STORY_doDeleteStoryNow($sid); + STORY_doDeleteThisStoryNow($sid); $output = COM_refresh($_CONF['site_admin_url'] . '/story.php?msg=10'); From geeklog-cvs at lists.geeklog.net Sun Apr 5 12:53:47 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 05 Apr 2009 12:53:47 -0400 Subject: [geeklog-cvs] geeklog: When upgrading, we can now rely on the 'database_versio... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/1677c239fcc6 changeset: 6893:1677c239fcc6 user: Dirk Haun date: Sun Apr 05 15:38:29 2009 +0200 description: When upgrading, we can now rely on the 'database_version' field to identify the db version. diffstat: 1 file changed, 30 insertions(+), 14 deletions(-) public_html/admin/install/lib-upgrade.php | 44 +++++++++++++++++++---------- diffs (107 lines): diff -r f2425e08ba4c -r 1677c239fcc6 public_html/admin/install/lib-upgrade.php --- a/public_html/admin/install/lib-upgrade.php Sun Apr 05 09:34:05 2009 +0200 +++ b/public_html/admin/install/lib-upgrade.php Sun Apr 05 15:38:29 2009 +0200 @@ -491,7 +491,7 @@ /** * Get the current installed version of Geeklog * - * @return Geeklog version in x.x.x format + * @return string Geeklog version in x.x.x format * */ function INST_identifyGeeklogVersion() @@ -499,6 +499,25 @@ global $_TABLES, $_DB, $_DB_dbms; $_DB->setDisplayError(true); + + $version = ''; + + /** + * First check for 'database_version' in gl_vars. If that exists, assume + * it's the correct version. Else, try some heuristics (below). + * Note: Need to handle 'sr1' etc. appendices. + */ + $db_v = DB_getItem($_TABLES['vars'], 'value', "name = 'database_version'"); + if (! empty($db_v)) { + $v = explode('.', $db_v); + if (count($v) == 3) { + $v[2] = (int) $v[2]; + $version = implode('.', $v); + + return $version; + } + } + // simple tests for the version of the database: // "DESCRIBE sometable somefield", '' @@ -509,13 +528,11 @@ // Should always include a test for the current version so that we can // warn the user if they try to run the update again. - switch ($_DB_dbms) { case 'mysql': $test = array( - '1.5.2' => array("SELECT value FROM {$_TABLES['vars']} WHERE name = 'database_version'", '1.5.2'), - '1.5.1' => array("SELECT name FROM {$_TABLES['vars']} WHERE name = 'database_version'", 'database_version'), + // as of 1.5.1, we should have the 'database_version' entry '1.5.0' => array("DESCRIBE {$_TABLES['storysubmission']} bodytext",''), '1.4.1' => array("SELECT ft_name FROM {$_TABLES['features']} WHERE ft_name = 'syndication.edit'", 'syndication.edit'), '1.4.0' => array("DESCRIBE {$_TABLES['users']} remoteusername",''), @@ -537,8 +554,7 @@ case 'mssql': $test = array( - '1.5.2' => array("SELECT value FROM {$_TABLES['vars']} WHERE name = 'database_version'", '1.5.2'), - '1.5.1' => array("SELECT name FROM {$_TABLES['vars']} WHERE name = 'database_version'", 'database_version'), + // as of 1.5.1, we should have the 'database_version' entry '1.5.0' => array("SELECT c.name FROM syscolumns c JOIN sysobjects o ON o.id = c.id WHERE c.name='bodytext' AND o.name='{$_TABLES['storysubmission']}'",'bodytext'), '1.4.1' => array("SELECT ft_name FROM {$_TABLES['features']} WHERE ft_name = 'syndication.edit'", 'syndication.edit') // 1.4.1 was the first version with MS SQL support @@ -553,8 +569,6 @@ break; } - - $version = ''; foreach ($test as $v => $qarray) { $result = DB_query($qarray[0], 1); @@ -660,11 +674,12 @@ * * Note: Needed for upgrades from old versions - don't remove. * -* @return 0 = not installed, -* 1 = original plugin, -* 2 = version by Phill or Tom, -* 3 = v1.3 (center block, etc.), -* 4 = v1.4 ('in block' flag) +* @return int indicates which version of the plugin we're dealing with: +* - 0 = not installed, +* - 1 = original plugin, +* - 2 = version by Phill or Tom, +* - 3 = v1.3 (center block, etc.), +* - 4 = v1.4 ('in block' flag) * */ function get_SP_ver() @@ -699,7 +714,7 @@ /** * Run all the database queries from the update file. * - * @param array $_SQL Array of queries + * @param array $_SQL Array of queries to perform * */ function INST_updateDB($_SQL) @@ -787,6 +802,7 @@ * process! * * @param boolean $migration whether the upgrade is part of a site migration +* @param array $old_conf old $_CONF values before the migration * @return int number of failed plugin updates (0 = everything's fine) * */ From geeklog-cvs at lists.geeklog.net Sun Apr 5 12:53:47 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 05 Apr 2009 12:53:47 -0400 Subject: [geeklog-cvs] geeklog: Zip::extract() returns an array on success and 0 on fai... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/4b8a086e07af changeset: 6894:4b8a086e07af user: Dirk Haun date: Sun Apr 05 18:16:08 2009 +0200 description: Zip::extract() returns an array on success and 0 on failure diffstat: 1 file changed, 9 insertions(+), 3 deletions(-) system/classes/unpacker.class.php | 12 +++++++++--- diffs (28 lines): diff -r 1677c239fcc6 -r 4b8a086e07af system/classes/unpacker.class.php --- a/system/classes/unpacker.class.php Sun Apr 05 15:38:29 2009 +0200 +++ b/system/classes/unpacker.class.php Sun Apr 05 18:16:08 2009 +0200 @@ -382,9 +382,15 @@ } else { if (is_array($item_array) === true) { - return $this->archive->extract(array('add_path' => $target_path, 'by_name' => $item_array)); + $result = $this->archive->extract(array('add_path' => $target_path, 'by_name' => $item_array)); } else { - return $this->archive->extract(array('add_path' => $target_path)); + $result = $this->archive->extract(array('add_path' => $target_path)); + } + // extract() returns an array on success and 0 on failure + if ($result === 0) { + return false; + } else { + return true; } } @@ -470,4 +476,4 @@ } } -?> \ No newline at end of file +?> From geeklog-cvs at lists.geeklog.net Sun Apr 5 12:53:48 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 05 Apr 2009 12:53:48 -0400 Subject: [geeklog-cvs] geeklog: Use our new unpacker class to unpack plugin tarballs an... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/72931c2ab9fe changeset: 6895:72931c2ab9fe user: Dirk Haun date: Sun Apr 05 18:35:52 2009 +0200 description: Use our new unpacker class to unpack plugin tarballs and ZIP files diffstat: 1 file changed, 30 insertions(+), 48 deletions(-) public_html/admin/plugins.php | 78 +++++++++++++++-------------------------- diffs (163 lines): diff -r 4b8a086e07af -r 72931c2ab9fe public_html/admin/plugins.php --- a/public_html/admin/plugins.php Sun Apr 05 18:16:08 2009 +0200 +++ b/public_html/admin/plugins.php Sun Apr 05 18:35:52 2009 +0200 @@ -33,6 +33,15 @@ // | | // +---------------------------------------------------------------------------+ +/** +* This is the plugin administration page. Here you can install, uninstall, +* enable, disable, and upload plugins. +* +*/ + +/** +* Geeklog common function library +*/ require_once '../lib-common.php'; require_once 'auth.inc.php'; @@ -158,9 +167,9 @@ } /** -* Toggle status of a plugin from enabled to disabled and back +* Toggle plugin status from enabled to disabled and back * -* @param string $pi_name name of the plugin +* @param array $pi_name_arr array of plugin states * @return void * */ @@ -239,7 +248,7 @@ /** * Creates list of uninstalled plugins (if any) and offers install link to them. * -* @param strint $token security token to use in list +* @param string $token Security token to use in list * @return string HTML containing list of uninstalled plugins * */ @@ -329,8 +338,8 @@ /** * Updates a plugin (call its upgrade function). * -* @param pi_name string name of the plugin to uninstall -* @return string HTML for error or success message +* @param string $pi_name name of the plugin to uninstall +* @return string HTML for error or success message * */ function do_update($pi_name) @@ -366,8 +375,8 @@ /** * Uninstall a plugin (call its uninstall function). * -* @param pi_name string name of the plugin to uninstall -* @return string HTML for error or success message +* @param string $pi_name name of the plugin to uninstall +* @return string HTML for error or success message * */ function do_uninstall($pi_name) @@ -398,10 +407,11 @@ /** * List available plugins * -* @return string formatted list of plugins +* @param string $token Security token +* @return string formatted list of plugins * */ -function listplugins ($token) +function listplugins($token) { global $_CONF, $_TABLES, $LANG32, $LANG_ADMIN, $_IMAGE_TYPE; @@ -519,7 +529,8 @@ /** * Display upload form * -* @return string HTML for the upload form +* @param string $token Security token +* @return string HTML for the upload form * */ function plugin_show_uploadform($token) @@ -572,22 +583,13 @@ } else { + require_once $_CONF['path_system'] . 'classes/unpacker.class.php'; + $plugin_file = $_CONF['path_data'] . $_FILES['plugin']['name']; // Name the plugin file - if ($_FILES['plugin']['type'] == 'application/zip') { - - // Zip - require_once 'Archive/Zip.php'; // import Archive_Zip library - $archive = new Archive_Zip($_FILES['plugin']['tmp_name']); // Use PEAR's Archive_Zip to extract the package - - } else { - - // Tarball - require_once 'Archive/Tar.php'; // import Archive_Tar library - $archive = new Archive_Tar($_FILES['plugin']['tmp_name']); // Use PEAR's Archive_Tar to extract the package - - } - $tmp = $archive->listContent(); // Grab the contents of the tarball to see what the plugin name is + $archive = new unpacker($_FILES['plugin']['tmp_name'], + $_FILES['plugin']['type']); + $tmp = $archive->getlist(); // Grab the contents of the tarball to see what the plugin name is $dirname = preg_replace('/\/.*$/', '', $tmp[0]['filename']); if (empty($dirname)) { // If $dirname is blank it's probably because the user uploaded a non Tarball file. @@ -650,18 +652,8 @@ */ // Extract the tarball to data so we can get the $pi_name name from admin/install.php - if ($_FILES['plugin']['type'] == 'application/zip') { - - // Zip - $archive->extract(array('add_path' => $_CONF['path'] . 'data/', - 'by_name' => $dirname . '/admin/install.php')); - - } else { - - // Tarball - $archive->extractList(array($dirname . '/admin/install.php'), $_CONF['path'] . 'data/'); - - } + $archive->unpack($_CONF['path'] . 'data/', + array($dirname . '/admin/install.php')); $plugin_inst = $_CONF['path'] . 'data/' . $dirname . '/admin/install.php'; $fdata = ''; $fhandle = @fopen($plugin_inst, 'r'); @@ -705,17 +697,7 @@ } // Extract the uploaded archive to the plugins directory - if ($_FILES['plugin']['type'] == 'application/zip') { - - // Zip - $upload_success = $archive->extract(array('add_path' => $_CONF['path'] . 'plugins/')); - - } else { - - // Tarball - $upload_success = $archive->extract($_CONF['path'] . 'plugins/'); - - } + $upload_success = $archive->unpack($_CONF['path'] . 'plugins/'); $plg_path = $_CONF['path'] . 'plugins/' . $pi_name . '/'; if ($upload_success) { @@ -890,7 +872,7 @@ * Do the actual plugin auto install * * @param string $plugin Plugin name -* @param array $inst_parm Installation parameters for the plugin +* @param array $inst_parms Installation parameters for the plugin * @param boolean $verbose true: enable verbose logging * @return boolean true on success, false otherwise * From geeklog-cvs at lists.geeklog.net Sun Apr 5 12:53:48 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 05 Apr 2009 12:53:48 -0400 Subject: [geeklog-cvs] geeklog: Cosmetics - no code changes Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/d3735195c25d changeset: 6896:d3735195c25d user: Dirk Haun date: Sun Apr 05 18:44:34 2009 +0200 description: Cosmetics - no code changes diffstat: 1 file changed, 79 insertions(+), 80 deletions(-) system/classes/unpacker.class.php | 159 ++++++++++++++++++------------------- diffs (truncated from 369 to 300 lines): diff -r 72931c2ab9fe -r d3735195c25d system/classes/unpacker.class.php --- a/system/classes/unpacker.class.php Sun Apr 05 18:35:52 2009 +0200 +++ b/system/classes/unpacker.class.php Sun Apr 05 18:44:34 2009 +0200 @@ -1,48 +1,47 @@ + * @author Justin Carlson, justin DOT carlson AT gmail DOT com * */ class unpacker { - + // mime types ( these are not very reliable, varies browser to browser ) // for the best results, pass the real filename as well as the mime type var $mime_def = array('application/zip' => 'zip', @@ -57,7 +56,7 @@ 'application/octet-stream' => 'tar', 'application/x-compress' => 'tar', 'application/x-compressed' => 'tar'); - + var $file = null; // archive name var $filesize = null; // archive size (in bytes) var $ext = null; // archive ext @@ -70,7 +69,7 @@ var $type = null; // archive type var $comp = null; // archive compression type (private) - + /** * Constructor * @@ -86,33 +85,33 @@ } else { $this->d_sep = '/'; } - + // if the file doesn't have it's path, assume local if (! strstr($file, $this->d_sep)) { $file = getcwd() . $this->d_sep . $file; } - + // make sure the file exists if (file_exists($file)) { - + // copy vars $this->file = $file; $this->filesize = filesize($file); $this->ext = strtolower(substr($file, - 4)); - + // if the type is passed, store it if ($mime_type != null) { - + if (isset($this->mime_def[$mime_type])) { $this->type = $this->mime_def[$mime_type]; } else { return $this->setError('400', 'Invalid MIME Type'); } - + } - + if ($this->type == null || $this->type == 'other') { - + // if a known mime type was not provided, expect real filename // mime types are not reliable so this is the reccommended way // for example: unpacker($_FILES['foo']['name'],$type); @@ -126,21 +125,21 @@ } else { $this->type = str_replace('.', '', $this->ext); } - + // see if we know of a mime type for this ext if (in_array($this->type, $this->mime_def) === false) { return $this->setError('400', 'Invalid File Extension'); } } - + // call the load wrapper, return result return $this->load_file(); - + } else { // file did not exist return false; } - + } /** @@ -191,24 +190,23 @@ function load_zip() { if (function_exists('zip_open')) { - + // Use PECL ZIP $this->archive = new ZipArchive(); $result = $this->archive->open($this->file); if ($result === false) { return $this->setError($result, 'ZipArchive Error'); } - + } else { - + // use Pear Archive_Zip require_once 'Archive/Zip.php'; $this->archive = new Archive_Zip($this->file); // unfortunately, we can't tell if it succeeded - } - + // return resource handle or result return true; } @@ -223,10 +221,10 @@ // use Pear Archive_Tar require_once 'Archive/Tar.php'; $this->archive = new Archive_Tar($this->file, $this->comp); - + // unfortunately, we can't tell if it succeeded return ($this->archive); - + } /** @@ -240,7 +238,7 @@ if (is_array($this->contents)) { return $this->contents; } - + // not cached, load and cache the content list $handler = 'list_' . $this->type; if (method_exists($this, $handler)) { @@ -249,7 +247,7 @@ } else { return $this->setError('405', 'Unpacker called getlist ' . 'with unknown handler.'); } - + } /** @@ -261,37 +259,37 @@ // using PECL::ZipArchive if (function_exists('zip_open')) { - + // catch empty archive if ($this->archive->numFiles < 1) { return $this->setError('411', 'Archive is empty.'); } - + // reset cache $this->contents = array(); for ($i = 0; $i < $this->archive->numFiles; $i ++) { - + // Make ZipArchive's info look like Archive_Zip's $zip_entry = $this->archive->statIndex($i); $this->contents[$i]['filename'] = $zip_entry['name']; $this->contents[$i]['size'] = $zip_entry['size']; $this->contents[$i]['compressed'] = $zip_entry['comp_size']; $this->contents[$i]['method'] = $zip_entry['comp_method']; - + } // return the contents list return $this->contents; - + // using PEAR::Archive_Zip } else { - + $this->contents = $this->archive->listContent(); if (is_array($this->contents)) { return $this->contents; } else { return $this->setError('411', 'Archive is empty.'); } - + } } @@ -323,12 +321,12 @@ if (is_writable($target_path) === false) { return $this->setError('403', 'Permission denied writing to path.'); } - + // make sure target ends with slash if (substr($target_path, - 1) != $this->d_sep) { $target_path .= $this->d_sep; } - + $handler = 'unpack_' . $this->type; if (method_exists($this, $handler)) { return $this->$handler($target_path, $item_array); @@ -348,39 +346,39 @@ // using PECL::ZipArchive if (function_exists('zip_open')) { - + if ($this->archive) { - + From geeklog-cvs at lists.geeklog.net Wed Apr 8 18:36:52 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Wed, 08 Apr 2009 18:36:52 -0400 Subject: [geeklog-cvs] geeklog: Changed form target to admin_site_url as $_SERVER['PHP_... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/a5e15a4ba045 changeset: 6897:a5e15a4ba045 user: jcarlson date: Wed Apr 08 17:36:00 2009 -0500 description: Changed form target to admin_site_url as $_SERVER['PHP_SELF'] is not reliable in all environments. diffstat: 1 file changed, 132 insertions(+), 132 deletions(-) public_html/admin/auth.inc.php | 264 ++++++++++++++++++++-------------------- diffs (268 lines): diff -r d3735195c25d -r a5e15a4ba045 public_html/admin/auth.inc.php --- a/public_html/admin/auth.inc.php Sun Apr 05 18:44:34 2009 +0200 +++ b/public_html/admin/auth.inc.php Wed Apr 08 17:36:00 2009 -0500 @@ -1,132 +1,132 @@ - 0) { - COM_displayMessageAndAbort($LANG04[112], '', 403, 'Access denied'); -} - -$uid = ''; -if (!empty($_POST['loginname']) && !empty($_POST['passwd'])) { - if ($_CONF['user_login_method']['standard']) { - $status = SEC_authenticate(COM_applyFilter($_POST['loginname']), - $_POST['passwd'], $uid); - } else { - $status = ''; - } -} else { - $status = ''; -} -$display = ''; - -if ($status == USER_ACCOUNT_ACTIVE) { - DB_change($_TABLES['users'], 'pwrequestid', "NULL", 'uid', $uid); - $_USER = SESS_getUserDataFromId($uid); - $sessid = SESS_newSession($_USER['uid'], $_SERVER['REMOTE_ADDR'], - $_CONF['session_cookie_timeout'], $_CONF['cookie_ip']); - SESS_setSessionCookie($sessid, $_CONF['session_cookie_timeout'], - $_CONF['cookie_session'], $_CONF['cookie_path'], - $_CONF['cookiedomain'], $_CONF['cookiesecure']); - PLG_loginUser($_USER['uid']); - - // Now that we handled session cookies, handle longterm cookie - - if (!isset($_COOKIE[$_CONF['cookie_name']])) { - - // Either their cookie expired or they are new - - $cooktime = COM_getUserCookieTimeout(); - - if (!empty($cooktime)) { - - // They want their cookie to persist for some amount of time so set it now - - setcookie($_CONF['cookie_name'], $_USER['uid'], - time() + $cooktime, $_CONF['cookie_path'], - $_CONF['cookiedomain'], $_CONF['cookiesecure']); - } - } - if (!SEC_hasRights('story.edit,block.edit,topic.edit,user.edit,plugin.edit,syndication.edit','OR')) { - $display .= COM_refresh($_CONF['site_admin_url'] . '/moderation.php'); - } else { - $display .= COM_refresh($_CONF['site_url'] . '/index.php'); - } - echo $display; - exit; -} else if (!SEC_hasRights('story.edit,block.edit,topic.edit,user.edit,plugin.edit,user.mail,syndication.edit','OR') && (count(PLG_getAdminOptions()) == 0)) { - COM_updateSpeedlimit('login'); - - $display .= COM_siteHeader('menu'); - $display .= COM_startBlock($LANG20[1]); - - if (!$_CONF['user_login_method']['standard']) { - $display .= '

    ' . $LANG_LOGIN[2] . '

    '; - } else { - - if (isset($_POST['warn'])) { - $display .= $LANG20[2] - . '' - . COM_accessLog($LANG20[3] . ' ' . $_POST['loginname']); - } - - $display .= '
    ' - .''.LB - .''.LB - .''.LB - .''.LB - .''.LB - .''.LB - .'' - .''.LB - .''.LB - .''.LB - .''.LB - .'
    '.$LANG20[4].' 
    '.$LANG20[5].' 
    '.$LANG20[6].'' - .'
    '; - } - - $display .= COM_endBlock() - . COM_siteFooter(); - echo $display; - exit; -} - -?> + 0) { + COM_displayMessageAndAbort($LANG04[112], '', 403, 'Access denied'); +} + +$uid = ''; +if (!empty($_POST['loginname']) && !empty($_POST['passwd'])) { + if ($_CONF['user_login_method']['standard']) { + $status = SEC_authenticate(COM_applyFilter($_POST['loginname']), + $_POST['passwd'], $uid); + } else { + $status = ''; + } +} else { + $status = ''; +} +$display = ''; + +if ($status == USER_ACCOUNT_ACTIVE) { + DB_change($_TABLES['users'], 'pwrequestid', "NULL", 'uid', $uid); + $_USER = SESS_getUserDataFromId($uid); + $sessid = SESS_newSession($_USER['uid'], $_SERVER['REMOTE_ADDR'], + $_CONF['session_cookie_timeout'], $_CONF['cookie_ip']); + SESS_setSessionCookie($sessid, $_CONF['session_cookie_timeout'], + $_CONF['cookie_session'], $_CONF['cookie_path'], + $_CONF['cookiedomain'], $_CONF['cookiesecure']); + PLG_loginUser($_USER['uid']); + + // Now that we handled session cookies, handle longterm cookie + + if (!isset($_COOKIE[$_CONF['cookie_name']])) { + + // Either their cookie expired or they are new + + $cooktime = COM_getUserCookieTimeout(); + + if (!empty($cooktime)) { + + // They want their cookie to persist for some amount of time so set it now + + setcookie($_CONF['cookie_name'], $_USER['uid'], + time() + $cooktime, $_CONF['cookie_path'], + $_CONF['cookiedomain'], $_CONF['cookiesecure']); + } + } + if (!SEC_hasRights('story.edit,block.edit,topic.edit,user.edit,plugin.edit,syndication.edit','OR')) { + $display .= COM_refresh($_CONF['site_admin_url'] . '/moderation.php'); + } else { + $display .= COM_refresh($_CONF['site_url'] . '/index.php'); + } + echo $display; + exit; +} else if (!SEC_hasRights('story.edit,block.edit,topic.edit,user.edit,plugin.edit,user.mail,syndication.edit','OR') && (count(PLG_getAdminOptions()) == 0)) { + COM_updateSpeedlimit('login'); + + $display .= COM_siteHeader('menu'); + $display .= COM_startBlock($LANG20[1]); + + if (!$_CONF['user_login_method']['standard']) { + $display .= '

    ' . $LANG_LOGIN[2] . '

    '; + } else { + + if (isset($_POST['warn'])) { + $display .= $LANG20[2] + . '' + . COM_accessLog($LANG20[3] . ' ' . $_POST['loginname']); + } + + $display .= '
    ' + .''.LB + .''.LB + .''.LB + .''.LB + .''.LB + .''.LB + .'' + .''.LB + .''.LB + .''.LB + .''.LB + .'
    '.$LANG20[4].' 
    '.$LANG20[5].' 
    '.$LANG20[6].'' + .'
    '; + } + + $display .= COM_endBlock() + . COM_siteFooter(); + echo $display; + exit; +} + +?> From geeklog-cvs at lists.geeklog.net Thu Apr 9 01:52:28 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Thu, 09 Apr 2009 01:52:28 -0400 Subject: [geeklog-cvs] geeklog: Fixed line endings (DOS vs. Unix) Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/9ffd281952bd changeset: 6898:9ffd281952bd user: Dirk Haun date: Thu Apr 09 07:52:18 2009 +0200 description: Fixed line endings (DOS vs. Unix) diffstat: 1 file changed, 130 insertions(+), 132 deletions(-) public_html/admin/auth.inc.php | 262 +++++++++++++++++++--------------------- diffs (266 lines): diff -r a5e15a4ba045 -r 9ffd281952bd public_html/admin/auth.inc.php --- a/public_html/admin/auth.inc.php Wed Apr 08 17:36:00 2009 -0500 +++ b/public_html/admin/auth.inc.php Thu Apr 09 07:52:18 2009 +0200 @@ -1,132 +1,130 @@ - 0) { - COM_displayMessageAndAbort($LANG04[112], '', 403, 'Access denied'); -} - -$uid = ''; -if (!empty($_POST['loginname']) && !empty($_POST['passwd'])) { - if ($_CONF['user_login_method']['standard']) { - $status = SEC_authenticate(COM_applyFilter($_POST['loginname']), - $_POST['passwd'], $uid); - } else { - $status = ''; - } -} else { - $status = ''; -} -$display = ''; - -if ($status == USER_ACCOUNT_ACTIVE) { - DB_change($_TABLES['users'], 'pwrequestid', "NULL", 'uid', $uid); - $_USER = SESS_getUserDataFromId($uid); - $sessid = SESS_newSession($_USER['uid'], $_SERVER['REMOTE_ADDR'], - $_CONF['session_cookie_timeout'], $_CONF['cookie_ip']); - SESS_setSessionCookie($sessid, $_CONF['session_cookie_timeout'], - $_CONF['cookie_session'], $_CONF['cookie_path'], - $_CONF['cookiedomain'], $_CONF['cookiesecure']); - PLG_loginUser($_USER['uid']); - - // Now that we handled session cookies, handle longterm cookie - - if (!isset($_COOKIE[$_CONF['cookie_name']])) { - - // Either their cookie expired or they are new - - $cooktime = COM_getUserCookieTimeout(); - - if (!empty($cooktime)) { - - // They want their cookie to persist for some amount of time so set it now - - setcookie($_CONF['cookie_name'], $_USER['uid'], - time() + $cooktime, $_CONF['cookie_path'], - $_CONF['cookiedomain'], $_CONF['cookiesecure']); - } - } - if (!SEC_hasRights('story.edit,block.edit,topic.edit,user.edit,plugin.edit,syndication.edit','OR')) { - $display .= COM_refresh($_CONF['site_admin_url'] . '/moderation.php'); - } else { - $display .= COM_refresh($_CONF['site_url'] . '/index.php'); - } - echo $display; - exit; -} else if (!SEC_hasRights('story.edit,block.edit,topic.edit,user.edit,plugin.edit,user.mail,syndication.edit','OR') && (count(PLG_getAdminOptions()) == 0)) { - COM_updateSpeedlimit('login'); - - $display .= COM_siteHeader('menu'); - $display .= COM_startBlock($LANG20[1]); - - if (!$_CONF['user_login_method']['standard']) { - $display .= '

    ' . $LANG_LOGIN[2] . '

    '; - } else { - - if (isset($_POST['warn'])) { - $display .= $LANG20[2] - . '' - . COM_accessLog($LANG20[3] . ' ' . $_POST['loginname']); - } - - $display .= '
    ' - .''.LB - .''.LB - .''.LB - .''.LB - .''.LB - .''.LB - .'' - .''.LB - .''.LB - .''.LB - .''.LB - .'
    '.$LANG20[4].' 
    '.$LANG20[5].' 
    '.$LANG20[6].'' - .'
    '; - } - - $display .= COM_endBlock() - . COM_siteFooter(); - echo $display; - exit; -} - -?> + 0) { + COM_displayMessageAndAbort($LANG04[112], '', 403, 'Access denied'); +} + +$uid = ''; +if (!empty($_POST['loginname']) && !empty($_POST['passwd'])) { + if ($_CONF['user_login_method']['standard']) { + $status = SEC_authenticate(COM_applyFilter($_POST['loginname']), + $_POST['passwd'], $uid); + } else { + $status = ''; + } +} else { + $status = ''; +} +$display = ''; + +if ($status == USER_ACCOUNT_ACTIVE) { + DB_change($_TABLES['users'], 'pwrequestid', "NULL", 'uid', $uid); + $_USER = SESS_getUserDataFromId($uid); + $sessid = SESS_newSession($_USER['uid'], $_SERVER['REMOTE_ADDR'], + $_CONF['session_cookie_timeout'], $_CONF['cookie_ip']); + SESS_setSessionCookie($sessid, $_CONF['session_cookie_timeout'], + $_CONF['cookie_session'], $_CONF['cookie_path'], + $_CONF['cookiedomain'], $_CONF['cookiesecure']); + PLG_loginUser($_USER['uid']); + + // Now that we handled session cookies, handle longterm cookie + + if (!isset($_COOKIE[$_CONF['cookie_name']])) { + + // Either their cookie expired or they are new + + $cooktime = COM_getUserCookieTimeout(); + + if (!empty($cooktime)) { + + // They want their cookie to persist for some amount of time so set it now + + setcookie($_CONF['cookie_name'], $_USER['uid'], + time() + $cooktime, $_CONF['cookie_path'], + $_CONF['cookiedomain'], $_CONF['cookiesecure']); + } + } + if (!SEC_hasRights('story.edit,block.edit,topic.edit,user.edit,plugin.edit,syndication.edit','OR')) { + $display .= COM_refresh($_CONF['site_admin_url'] . '/moderation.php'); + } else { + $display .= COM_refresh($_CONF['site_url'] . '/index.php'); + } + echo $display; + exit; +} else if (!SEC_hasRights('story.edit,block.edit,topic.edit,user.edit,plugin.edit,user.mail,syndication.edit','OR') && (count(PLG_getAdminOptions()) == 0)) { + COM_updateSpeedlimit('login'); + + $display .= COM_siteHeader('menu'); + $display .= COM_startBlock($LANG20[1]); + + if (!$_CONF['user_login_method']['standard']) { + $display .= '

    ' . $LANG_LOGIN[2] . '

    '; + } else { + + if (isset($_POST['warn'])) { + $display .= $LANG20[2] + . '' + . COM_accessLog($LANG20[3] . ' ' . $_POST['loginname']); + } + + $display .= '
    ' + .''.LB + .''.LB + .''.LB + .''.LB + .''.LB + .''.LB + .'' + .''.LB + .''.LB + .''.LB + .''.LB + .'
    '.$LANG20[4].' 
    '.$LANG20[5].' 
    '.$LANG20[6].'' + .'
    '; + } + + $display .= COM_endBlock() + . COM_siteFooter(); + echo $display; + exit; +} + +?> From geeklog-cvs at lists.geeklog.net Fri Apr 10 13:02:39 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Fri, 10 Apr 2009 13:02:39 -0400 Subject: [geeklog-cvs] geeklog: Merged changes from Jared's 2008 GSoC project - all cre... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/d1d8a0120489 changeset: 6899:d1d8a0120489 user: Dirk Haun date: Fri Apr 10 11:53:06 2009 +0200 description: Merged changes from Jared's 2008 GSoC project - all credits to Jared Wenerd and Michael Jervis diffstat: 17 files changed, 975 insertions(+), 121 deletions(-) public_html/admin/moderation.php | 59 public_html/admin/story.php | 47 public_html/article.php | 9 public_html/comment.php | 97 + public_html/layout/professional/admin/story/storyeditor.thtml | 49 public_html/layout/professional/admin/story/storyeditor_advanced.thtml | 37 public_html/layout/professional/comment/commentbar.thtml | 24 public_html/layout/professional/comment/commentform.thtml | 6 public_html/layout/professional/comment/commentform_advanced.thtml | 6 public_html/layout/professional/featuredstorytext.thtml | 2 public_html/layout/professional/storytext.thtml | 2 public_html/layout/professional/style.css | 3 sql/mysql_tableanddata.php | 41 system/classes/story.class.php | 106 + system/lib-comment.php | 602 ++++++++-- system/lib-database.php | 3 system/lib-story.php | 3 diffs (truncated from 1720 to 300 lines): diff -r 9ffd281952bd -r d1d8a0120489 public_html/admin/moderation.php --- a/public_html/admin/moderation.php Thu Apr 09 07:52:18 2009 +0200 +++ b/public_html/admin/moderation.php Fri Apr 10 11:53:06 2009 +0200 @@ -36,6 +36,7 @@ require_once 'auth.inc.php'; require_once $_CONF['path_system'] . 'lib-user.php'; require_once $_CONF['path_system'] . 'lib-story.php'; +require_once $_CONF['path_system'] . 'lib-comment.php'; // Uncomment the line below if you need to debug the HTTP variables being passed // to the script. This will sometimes cause errors but it will allow you to see @@ -219,6 +220,11 @@ $retval .= draftlist ($token); } } + + if (SEC_hasRights('comment.moderate')) { + $retval .= itemlist('comment', $token); + } + if ($_CONF['usersubmission'] == 1) { if (SEC_hasRights ('user.edit') && SEC_hasRights ('user.delete')) { $retval .= userlist ($token); @@ -249,7 +255,7 @@ $retval = ''; $isplugin = false; - if ((strlen ($type) > 0) && ($type <> 'story')) { + if ((strlen ($type) > 0) && ($type <> 'story') && ($type <> 'comment')) { $function = 'plugin_itemlist_' . $type; if (function_exists ($function)) { // Great, we found the plugin, now call its itemlist method @@ -264,11 +270,18 @@ $isplugin = true; } } - } else { // story submission + } elseif ( $type == 'story') { // story submission $sql = "SELECT sid AS id,title,date,tid FROM {$_TABLES['storysubmission']}" . COM_getTopicSQL ('WHERE') . " ORDER BY date ASC"; $H = array($LANG29[10],$LANG29[14],$LANG29[15]); $section_title = $LANG29[35]; $section_help = 'ccstorysubmission.html'; + } elseif ($type == 'comment') { + $sql = "SELECT cid AS id,title,comment,date,uid " + . "FROM {$_TABLES['commentsubmissions']} " + . "ORDER BY cid ASC"; + $H = array($LANG29[10],$LANG29[36], $LANG29[37]); + $section_title = $LANG29[41]; + $section_help = 'i do not know'; } // run SQL but this time ignore any errors @@ -289,6 +302,10 @@ if ($isplugin) { $A['edit'] = $_CONF['site_admin_url'] . '/plugins/' . $type . '/index.php?mode=editsubmission&id=' . $A[0]; + } elseif ($type == 'comment') { + $A['edit'] = $_CONF['site_url'] . '/comment.php' + . '?mode=editsubmission&cid=' . $A[0] . + '&' . CSRF_TOKEN . '=' . $token; } else { $A['edit'] = $_CONF['site_admin_url'] . '/' . $type . '.php?mode=editsubmission&id=' . $A[0]; @@ -298,6 +315,7 @@ $data_arr[$i] = $A; } + $header_arr = array( // display 'text' and use table field 'field' array('text' => $LANG_ADMIN['edit'], 'field' => 0), array('text' => $H[0], 'field' => 1), @@ -305,6 +323,13 @@ array('text' => $H[2], 'field' => 3), array('text' => $LANG29[2], 'field' => 'delete'), array('text' => $LANG29[1], 'field' => 'approve')); + if ($type == 'comment') { + //data for comment submission headers + $header_arr[6]['text'] = $LANG29[42]; + $header_arr[6]['field'] = 'uid'; + $header_arr[7]['text'] = $LANG29[43]; + $header_arr[7]['field'] = 'publishfuture'; + } $text_arr = array('has_menu' => false, 'title' => $section_title, @@ -485,6 +510,11 @@ $submissiontable = $_TABLES['storysubmission']; $fields = 'sid,uid,tid,title,introtext,date,postmode'; break; + case 'comment': + $id = 'cid'; + $submissiontable = $_TABLES['commentsubmissions']; + $sidArray[] = ''; + break; default: if (strlen($type) <= 0) { // something is terribly wrong, bail @@ -552,6 +582,11 @@ COM_rdfUpToDateCheck (); COM_olderStuff (); + } else if ($type == 'comment') { + $sid = CMT_approveModeration($mid[$i]); + if ( !in_array($sid, $sidArray) ) { + $sidArray[$i] = $sid; + } } else { // This is called in case this is a plugin. There may be some // plugin specific processing that needs to happen. @@ -559,6 +594,26 @@ $retval .= PLG_approveSubmission($type,$mid[$i]); } break; + } + } + + // after loop update comment tree and count for each story + if (isset($sidArray)) { + foreach($sidArray as $sid) { + CMT_rebuildTree($sid); + //update comment count of stories; + $comments = DB_count ($_TABLES['comments'], 'sid', $sid); + DB_change ($_TABLES['stories'], 'comments', $comments, 'sid', $sid); + } + } + + //Add new comment users to group comment.submit group + if (isset($_POST['publishfuture']) ) { + for ($i = 0; $i < count($_POST['publishfuture']); $i++ ) { + $uid = COM_applyFilter($_POST['publishfuture'][$i], true); + if ($uid > 1 && !SEC_inGroup('Comment Submitters', $uid) ) { + SEC_addUserToGroup($uid, 'Comment Submitters'); + } } } diff -r 9ffd281952bd -r d1d8a0120489 public_html/admin/story.php --- a/public_html/admin/story.php Thu Apr 09 07:52:18 2009 +0200 +++ b/public_html/admin/story.php Fri Apr 10 11:53:06 2009 +0200 @@ -572,7 +572,54 @@ $story_templates->set_var ('trackback_options', COM_optionList ($_TABLES['trackbackcodes'], 'code,name', $story->EditElements('trackbackcode'))); + // comment expire + $story_templates->set_var ('lang_cmt_disable', $LANG24[63]); + if ($story->EditElements('cmt_close') ) { + $story_templates->set_var('is_checked5', 'checked="checked"'); //check box if enabled + $story_templates->set_var('showcmtclosedisabled', 'false'); + } else { + $story_templates->set_var('showcmtclosedisabled', 'true'); + } + $month_options = COM_getMonthFormOptions($story->EditElements('cmt_close_month')); + $story_templates->set_var('cmt_close_month_options', $month_options); + + $day_options = COM_getDayFormOptions($story->EditElements('cmt_close_day')); + $story_templates->set_var('cmt_close_day_options', $day_options); + + $year_options = COM_getYearFormOptions($story->EditElements('cmt_close_year')); + $story_templates->set_var('cmt_close_year_options', $year_options); + + $cmt_close_ampm = ''; + $cmt_close_hour = $story->EditElements('cmt_close_hour'); + //correct hour + if ($cmt_close_hour >= 12) { + if ($cmt_close_hour > 12) { + $cmt_close_hour = $cmt_close_hour - 12; + } + $ampm = 'pm'; + } else { + $ampm = 'am'; + } + $ampm_select = COM_getAmPmFormSelection ('cmt_close_ampm', $ampm); + if (empty ($ampm_select)) { + // have a hidden field to 24 hour mode to prevent JavaScript errors + $ampm_select = ''; + } + $story_templates->set_var ('cmt_close_ampm_selection', $ampm_select); + + if ($_CONF['hour_mode'] == 24) { + $hour_options = COM_getHourFormOptions ($story->EditElements('cmt_close_hour'), 24); + } else { + $hour_options = COM_getHourFormOptions ($cmt_close_hour); + } + $story_templates->set_var('cmt_close_hour_options', $hour_options); + + $minute_options = COM_getMinuteFormOptions($story->EditElements('cmt_close_minute')); + $story_templates->set_var('cmt_close_minute_options', $minute_options); + + $story_templates->set_var('cmt_close_second', $story->EditElements('cmt_close_second')); + if (($_CONF['onlyrootfeatures'] == 1 && SEC_inGroup('Root')) or ($_CONF['onlyrootfeatures'] !== 1)) { $featured_options = "' . LB; - $selection .= COM_optionList ($_TABLES['cookiecodes'], 'cc_value,cc_descr', $cookietimeout, 0); - $selection .= ''; - $retval .= ' - Remember user for: - ' . $selection .' - '; - $retval .= ' - Custom Fields: - - '; - $retval .= ''; - - return $retval; -} - -/* Function called when saving the user profile. */ -/* This function can now update any extra fields */ -function CUSTOM_userSave($uid) -{ - global $_CONF, $_TABLES; - - $cooktime = 0; - if (isset ($_POST['cooktime'])) { - $cooktime = COM_applyFilter ($_POST['cooktime'], true); - if ($cooktime < 0) { - $cooktime = 0; - } - - DB_query("UPDATE {$_TABLES['users']} SET cookietimeout = $cooktime WHERE uid = $uid"); - } -} - - -/** -* Main Form used for Custom membership when member is registering -* -* Note: Requires a file custom/memberdetail.thtml in every theme that is -* installed on the site! -* -* @param string $msg an error message to display or the word 'new' -* @return string HTML for the registration form -* -*/ -function CUSTOM_userForm ($msg = '') -{ - global $_CONF, $_TABLES, $LANG04; - - if (!empty ($msg) && ($msg != 'new')) { - $retval .= COM_startBlock($LANG04[21]) . $msg . COM_endBlock(); - } - - $post_url = $_CONF['site_url'] . '/users.php'; - $postmode = 'create'; - $submitbutton = ''; - $message = "
    Please complete the application below. Once you have completed the application, click the Register Now! button and the application will be processed immediately.
    "; - - $user_templates = new Template ($_CONF['path_layout'] . 'custom'); - $user_templates->set_file('memberdetail', 'memberdetail.thtml'); - $user_templates->set_var( 'xhtml', XHTML ); - $user_templates->set_var('site_url', $_CONF['site_url']); - $user_templates->set_var('layout_url', $_CONF['layout_url']); - $user_templates->set_var('post_url', $post_url); - $user_templates->set_var('startblock', COM_startBlock("Custom Registration Example")); - $user_templates->set_var('message', $message); - - $user_templates->set_var('USERNAME', $LANG04[2]); - $user_templates->set_var('USERNAME_HELP', "Name to be used when accessing this site"); From geeklog-cvs at lists.geeklog.net Fri Apr 10 16:17:56 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Fri, 10 Apr 2009 16:17:56 -0400 Subject: [geeklog-cvs] geeklog: Ignore lib-custom.php Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/d07d5b87ddba changeset: 6906:d07d5b87ddba user: Dirk Haun date: Fri Apr 10 20:33:35 2009 +0200 description: Ignore lib-custom.php diffstat: 2 files changed, 3 insertions(+), 4 deletions(-) .hgignore | 1 + system/lib-custom.php.dist | 6 ++---- diffs (41 lines): diff -r df0c8f451f9a -r d07d5b87ddba .hgignore --- a/.hgignore Fri Apr 10 20:29:58 2009 +0200 +++ b/.hgignore Fri Apr 10 20:33:35 2009 +0200 @@ -15,6 +15,7 @@ db-config.php public_html/siteconfig.php +system/lib-custom.php config.php plugins/calendar/config.php diff -r df0c8f451f9a -r d07d5b87ddba system/lib-custom.php.dist --- a/system/lib-custom.php.dist Fri Apr 10 20:29:58 2009 +0200 +++ b/system/lib-custom.php.dist Fri Apr 10 20:33:35 2009 +0200 @@ -2,7 +2,7 @@ /* Reminder: always indent with 4 spaces (no tabs). */ // +---------------------------------------------------------------------------+ -// | Geeklog 1.5 | +// | Geeklog 1.6 | // +---------------------------------------------------------------------------+ // | lib-custom.php | // | | @@ -20,7 +20,7 @@ // | not include lib-common.php in this file. | // | | // +---------------------------------------------------------------------------+ -// | Copyright (C) 2000-2008 by the following authors: | +// | Copyright (C) 2000-2009 by the following authors: | // | | // | Authors: Tony Bibbs - tony AT tonybibbs DOT com | // | Blaine Lang - blaine AT portalparts DOT com | @@ -42,8 +42,6 @@ // | Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | // | | // +---------------------------------------------------------------------------+ -// -// $Id: lib-custom.php,v 1.43 2008/09/21 08:37:11 dhaun Exp $ if (strpos(strtolower($_SERVER['PHP_SELF']), 'lib-custom.php') !== false) { die('This file can not be used on its own!'); From geeklog-cvs at lists.geeklog.net Fri Apr 10 16:17:57 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Fri, 10 Apr 2009 16:17:57 -0400 Subject: [geeklog-cvs] geeklog: Reverted to an earlier version of commentbar.thtml (as ... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/d12ae9331d4d changeset: 6907:d12ae9331d4d user: Dirk Haun date: Fri Apr 10 20:43:59 2009 +0200 description: Reverted to an earlier version of commentbar.thtml (as shipped with 1.5.x) diffstat: 1 file changed, 12 insertions(+), 12 deletions(-) public_html/layout/professional/comment/commentbar.thtml | 24 +++++++------- diffs (41 lines): diff -r d07d5b87ddba -r d12ae9331d4d public_html/layout/professional/comment/commentbar.thtml --- a/public_html/layout/professional/comment/commentbar.thtml Fri Apr 10 20:33:35 2009 +0200 +++ b/public_html/layout/professional/comment/commentbar.thtml Fri Apr 10 20:43:59 2009 +0200 @@ -3,8 +3,17 @@
    {start_storylink_anchortag}{story_title}{end_storylink_anchortag} | {num_comments} {lang_comments} | {user_nullname} {lang_login_logout}
    -
    -
    +
    + +
    + + + + + +
    + +
    {hidden_field} {order_selector} @@ -13,16 +22,7 @@
    -
    -
    - - - - - -
    -
    - +
    {lang_disclaimer}
    From geeklog-cvs at lists.geeklog.net Fri Apr 10 16:17:58 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Fri, 10 Apr 2009 16:17:58 -0400 Subject: [geeklog-cvs] geeklog: Add number of comments waiting in the moderation queue ... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/727097e8a198 changeset: 6908:727097e8a198 user: Dirk Haun date: Fri Apr 10 21:04:16 2009 +0200 description: Add number of comments waiting in the moderation queue to the Submissions count; hide comment moderation list when disabled diffstat: 2 files changed, 30 insertions(+), 29 deletions(-) public_html/admin/moderation.php | 12 +++++---- public_html/lib-common.php | 47 ++++++++++++++++++-------------------- diffs (96 lines): diff -r d12ae9331d4d -r 727097e8a198 public_html/admin/moderation.php --- a/public_html/admin/moderation.php Fri Apr 10 20:43:59 2009 +0200 +++ b/public_html/admin/moderation.php Fri Apr 10 21:04:16 2009 +0200 @@ -215,18 +215,20 @@ $retval .= itemlist('story', $token); } - if (SEC_hasRights('story.edit')) { - if ($_CONF['listdraftstories'] == 1) { + if ($_CONF['listdraftstories'] == 1) { + if (SEC_hasRights('story.edit')) { $retval .= draftlist ($token); } } - if (SEC_hasRights('comment.moderate')) { - $retval .= itemlist('comment', $token); + if ($_CONF['commentsubmission'] == 1) { + if (SEC_hasRights('comment.moderate')) { + $retval .= itemlist('comment', $token); + } } if ($_CONF['usersubmission'] == 1) { - if (SEC_hasRights ('user.edit') && SEC_hasRights ('user.delete')) { + if (SEC_hasRights('user.edit') && SEC_hasRights('user.delete')) { $retval .= userlist ($token); } } diff -r d12ae9331d4d -r 727097e8a198 public_html/lib-common.php --- a/public_html/lib-common.php Fri Apr 10 20:43:59 2009 +0200 +++ b/public_html/lib-common.php Fri Apr 10 21:04:16 2009 +0200 @@ -2475,40 +2475,39 @@ } $modnum = 0; - if( SEC_hasRights( 'story.edit,story.moderate', 'OR' ) || (( $_CONF['usersubmission'] == 1 ) && SEC_hasRights( 'user.edit,user.delete' ))) - { - - if( SEC_hasRights( 'story.moderate' )) - { - if( empty( $topicsql )) - { - $modnum += DB_count( $_TABLES['storysubmission'] ); - } - else - { - $sresult = DB_query( "SELECT COUNT(*) AS count FROM {$_TABLES['storysubmission']} WHERE" . $topicsql ); - $S = DB_fetchArray( $sresult ); + if (SEC_hasRights('story.edit,story.moderate', 'OR') || + (($_CONF['commentsubmission'] == 1) && + SEC_hasRights('comment.moderate')) || + (($_CONF['usersubmission'] == 1) && + SEC_hasRights('user.edit,user.delete'))) { + + if (SEC_hasRights('story.moderate')) { + if (empty($topicsql)) { + $modnum += DB_count($_TABLES['storysubmission']); + } else { + $sresult = DB_query("SELECT COUNT(*) AS count FROM {$_TABLES['storysubmission']} WHERE" . $topicsql); + $S = DB_fetchArray($sresult); $modnum += $S['count']; } } - if(( $_CONF['listdraftstories'] == 1 ) && SEC_hasRights( 'story.edit' )) - { + if (($_CONF['listdraftstories'] == 1) && SEC_hasRights('story.edit')) { $sql = "SELECT COUNT(*) AS count FROM {$_TABLES['stories']} WHERE (draft_flag = 1)"; - if( !empty( $topicsql )) - { + if (!empty($topicsql)) { $sql .= ' AND' . $topicsql; } - $result = DB_query( $sql . COM_getPermSQL( 'AND', 0, 3 )); - $A = DB_fetchArray( $result ); + $result = DB_query($sql . COM_getPermSQL('AND', 0, 3)); + $A = DB_fetchArray($result); $modnum += $A['count']; } - if( $_CONF['usersubmission'] == 1 ) - { - if( SEC_hasRights( 'user.edit' ) && SEC_hasRights( 'user.delete' )) - { - $modnum += DB_count( $_TABLES['users'], 'status', '2' ); + if (($_CONF['commentsubmission'] == 1) && SEC_hasRights('comment.moderate')) { + $modnum += DB_count($_TABLES['commentsubmissions']); + } + + if ($_CONF['usersubmission'] == 1) { + if (SEC_hasRights('user.edit') && SEC_hasRights('user.delete')) { + $modnum += DB_count($_TABLES['users'], 'status', '2'); } } } From geeklog-cvs at lists.geeklog.net Fri Apr 10 16:18:00 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Fri, 10 Apr 2009 16:18:00 -0400 Subject: [geeklog-cvs] geeklog: Missing addslashes Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/a88a3b7c7064 changeset: 6910:a88a3b7c7064 user: Dirk Haun date: Fri Apr 10 21:31:57 2009 +0200 description: Missing addslashes diffstat: 1 file changed, 21 insertions(+), 15 deletions(-) system/lib-comment.php | 36 +++++++++++++++++++++--------------- diffs (75 lines): diff -r b5b303bd0f52 -r a88a3b7c7064 system/lib-comment.php --- a/system/lib-comment.php Fri Apr 10 21:11:06 2009 +0200 +++ b/system/lib-comment.php Fri Apr 10 21:31:57 2009 +0200 @@ -1640,50 +1640,56 @@ * @param int cid comment id * @copyright Jared Wenerd 2008 * @author Jared Wenerd, wenerd87 AT gmail DOT com + * @param string $cid comment id * @return string of story id */ function CMT_approveModeration($cid) { global $_TABLES; - $result = DB_query ("SELECT type, sid, date, title, comment, uid, name, pid, ipaddress" - . " FROM {$_TABLES['commentsubmissions']} WHERE cid = '$cid'"); - $A = DB_fetchArray ($result); + $result = DB_query("SELECT type, sid, date, title, comment, uid, name, pid, ipaddress FROM {$_TABLES['commentsubmissions']} WHERE cid = '$cid'"); + $A = DB_fetchArray($result); if ($A['pid'] > 0) { - //get indent+1 of parent - $indent = DB_getItem ( $_TABLES['comments'],'indent+1', "cid = '{$A['pid']}'"); + // get indent+1 of parent + $indent = DB_getItem($_TABLES['comments'], 'indent+1', + "cid = '{$A['pid']}'"); } else { $indent = 0; } + + $A['title'] = addslashes($A['title']); + $A['comment'] = addslashes($A['comment']); + if (isset($A['name'])) { - //insert data - DB_save ($_TABLES['comments'], 'type,sid,date,title,comment,uid,name,pid,ipaddress,indent', + // insert data + $A['name'] = addslashes($A['name']); + DB_save($_TABLES['comments'], 'type,sid,date,title,comment,uid,name,pid,ipaddress,indent', "'{$A['type']}','{$A['sid']}','{$A['date']}','{$A['title']}','{$A['comment']}','{$A['uid']}',". "'{$A['name']}','{$A['pid']}','{$A['ipaddress']}',$indent"); } else { - //insert data, null automatically goes into name column - DB_save ($_TABLES['comments'], 'type,sid,date,title,comment,uid,pid,ipaddress,indent', + // insert data, null automatically goes into name column + DB_save($_TABLES['comments'], 'type,sid,date,title,comment,uid,pid,ipaddress,indent', "'{$A['type']}','{$A['sid']}','{$A['date']}','{$A['title']}','{$A['comment']}','{$A['uid']}',". "'{$A['pid']}','{$A['ipaddress']}',$indent"); } $newcid = DB_insertId(); - DB_delete($_TABLES['commentsubmissions'],'cid',$cid); + DB_delete($_TABLES['commentsubmissions'], 'cid', $cid); - DB_query("UPDATE {$_TABLES['commentnotifications']} SET cid = $newcid WHERE mid = $cid"); + DB_change($_TABLES['commentnotifications'], 'cid', $newcid, 'mid', $cid); - //notify of new published comment + // notify of new published comment if ($_CONF['allow_reply_notifications'] == 1 && $A['pid'] > 1) { - $result = DB_query ("SELECT cid, uid, deletehash FROM {$_TABLES['commentnotifications']} WHERE " - . "cid = {$A['pid']}"); + $result = DB_query("SELECT cid, uid, deletehash FROM {$_TABLES['commentnotifications']} WHERE cid = {$A['pid']}"); $B = DB_fetchArray($result); if ($B <> false) { CMT_sendReplyNotification($B); } } - + return $A['sid']; } + /** * Sends a notification of new comment reply * From geeklog-cvs at lists.geeklog.net Fri Apr 10 16:17:59 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Fri, 10 Apr 2009 16:17:59 -0400 Subject: [geeklog-cvs] geeklog: Whoops, left in a COM_errorLog used for debugging Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/b5b303bd0f52 changeset: 6909:b5b303bd0f52 user: Dirk Haun date: Fri Apr 10 21:11:06 2009 +0200 description: Whoops, left in a COM_errorLog used for debugging diffstat: 1 file changed, 1 deletion(-) system/lib-syndication.php | 1 - diffs (11 lines): diff -r 727097e8a198 -r b5b303bd0f52 system/lib-syndication.php --- a/system/lib-syndication.php Fri Apr 10 21:04:16 2009 +0200 +++ b/system/lib-syndication.php Fri Apr 10 21:11:06 2009 +0200 @@ -403,7 +403,6 @@ $fulltext = PLG_replaceTags( $fulltext ); $storytext = SYND_truncateSummary( $fulltext, $contentLength ); $fulltext = trim( $fulltext ); -COM_errorLog($fulltext); $fulltext = str_replace(array("\015\012", "\015"), "\012", $fulltext); if( $row['postmode'] == 'plaintext' ) From geeklog-cvs at lists.geeklog.net Fri Apr 10 16:18:01 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Fri, 10 Apr 2009 16:18:01 -0400 Subject: [geeklog-cvs] geeklog: Fixed comment notification Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/981aa6e65333 changeset: 6911:981aa6e65333 user: Dirk Haun date: Fri Apr 10 22:17:24 2009 +0200 description: Fixed comment notification diffstat: 3 files changed, 7 insertions(+), 8 deletions(-) language/english.php | 3 +-- language/english_utf-8.php | 3 +-- system/lib-comment.php | 9 +++++---- diffs (55 lines): diff -r a88a3b7c7064 -r 981aa6e65333 language/english.php --- a/language/english.php Fri Apr 10 21:31:57 2009 +0200 +++ b/language/english.php Fri Apr 10 22:17:24 2009 +0200 @@ -217,8 +217,7 @@ 37 => 'New Comment Reply', 38 => 'Someone has replied to your comment.', 39 => 'You may view the comment thread at the following address: ', - 40 => 'If you wish to receive no further notifications of replies, visit the - following link: ' + 40 => 'If you wish to receive no further notifications of replies, visit the following link: ' ); ############################################################################### diff -r a88a3b7c7064 -r 981aa6e65333 language/english_utf-8.php --- a/language/english_utf-8.php Fri Apr 10 21:31:57 2009 +0200 +++ b/language/english_utf-8.php Fri Apr 10 22:17:24 2009 +0200 @@ -217,8 +217,7 @@ 37 => 'New Comment Reply', 38 => 'Someone has replied to your comment.', 39 => 'You may view the comment thread at the following address: ', - 40 => 'If you wish to receive no further notifications of replies, visit the - following link: ' + 40 => 'If you wish to receive no further notifications of replies, visit the following link: ' ); ############################################################################### diff -r a88a3b7c7064 -r 981aa6e65333 system/lib-comment.php --- a/system/lib-comment.php Fri Apr 10 21:31:57 2009 +0200 +++ b/system/lib-comment.php Fri Apr 10 22:17:24 2009 +0200 @@ -1132,9 +1132,9 @@ } - DB_unlockTable ($_TABLES['comments']); $cid = DB_insertId(); - + DB_unlockTable($_TABLES['comments']); + //notify of new comment if ($_CONF['allow_reply_notifications'] == 1 && $pid > 1 && $ret == 0) { $result = DB_query ("SELECT cid, uid, deletehash FROM {$_TABLES['commentnotifications']} WHERE " @@ -1674,10 +1674,11 @@ "'{$A['pid']}','{$A['ipaddress']}',$indent"); } $newcid = DB_insertId(); + DB_delete($_TABLES['commentsubmissions'], 'cid', $cid); - + DB_change($_TABLES['commentnotifications'], 'cid', $newcid, 'mid', $cid); - + // notify of new published comment if ($_CONF['allow_reply_notifications'] == 1 && $A['pid'] > 1) { $result = DB_query("SELECT cid, uid, deletehash FROM {$_TABLES['commentnotifications']} WHERE cid = {$A['pid']}"); From geeklog-cvs at lists.geeklog.net Fri Apr 10 16:45:35 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Fri, 10 Apr 2009 16:45:35 -0400 Subject: [geeklog-cvs] geeklog: Missing text: Disable Comments Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/6aa163a096ea changeset: 6912:6aa163a096ea user: Dirk Haun date: Fri Apr 10 22:31:05 2009 +0200 description: Missing text: Disable Comments diffstat: 2 files changed, 2 insertions(+), 2 deletions(-) language/english.php | 2 +- language/english_utf-8.php | 2 +- diffs (24 lines): diff -r 981aa6e65333 -r 6aa163a096ea language/english.php --- a/language/english.php Fri Apr 10 22:17:24 2009 +0200 +++ b/language/english.php Fri Apr 10 22:31:05 2009 +0200 @@ -792,7 +792,7 @@ 60 => '', 61 => 'Auto Archive', 62 => 'Auto Delete', - 63 => '', + 63 => 'Disable Comments', 64 => '', 65 => '', 66 => '', diff -r 981aa6e65333 -r 6aa163a096ea language/english_utf-8.php --- a/language/english_utf-8.php Fri Apr 10 22:17:24 2009 +0200 +++ b/language/english_utf-8.php Fri Apr 10 22:31:05 2009 +0200 @@ -792,7 +792,7 @@ 60 => '', 61 => 'Auto Archive', 62 => 'Auto Delete', - 63 => '', + 63 => 'Disable Comments', 64 => '', 65 => '', 66 => '', From geeklog-cvs at lists.geeklog.net Fri Apr 10 17:33:21 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Fri, 10 Apr 2009 17:33:21 -0400 Subject: [geeklog-cvs] geeklog: Added new tables, groups, and permissions to MS SQL fil... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/2a13f4520557 changeset: 6913:2a13f4520557 user: Dirk Haun date: Fri Apr 10 23:23:21 2009 +0200 description: Added new tables, groups, and permissions to MS SQL files - "only" need translation into MS SQL syntax ... diffstat: 4 files changed, 59 insertions(+), 12 deletions(-) sql/mssql_tableanddata.php | 47 ++++++++++++++++++++++++++++++++++ sql/mysql_tableanddata.php | 8 ++--- sql/updates/mssql_1.5.2_to_1.6.0.php | 8 ++--- sql/updates/mysql_1.5.2_to_1.6.0.php | 8 ++--- diffs (209 lines): diff -r 6aa163a096ea -r 2a13f4520557 sql/mssql_tableanddata.php --- a/sql/mssql_tableanddata.php Fri Apr 10 22:31:05 2009 +0200 +++ b/sql/mssql_tableanddata.php Fri Apr 10 23:23:21 2009 +0200 @@ -73,12 +73,35 @@ ) ON [PRIMARY] "; +/* FIXME - MySQL syntax +$_SQL[] = " +CREATE TABLE {$_TABLES['commentedits']} ( + cid int(10) NOT NULL, + uid mediumint(8) NOT NULL, + time datetime NOT NULL, + PRIMARY KEY (cid) +) TYPE=MyISAM +"; +*/ + $_SQL[] = " CREATE TABLE [dbo].[{$_TABLES['commentmodes']}] ( [mode] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , [name] [varchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ) ON [PRIMARY] "; + +/* FIXME - MySQL syntax +$_SQL[] = " +CREATE TABLE {$_TABLES['commentnotifications']} ( + cid int(10) default NULL, + uid mediumint(8) NOT NULL, + deletehash varchar(32) NOT NULL, + mid int(10) default NULL, + PRIMARY KEY (deletehash) +) TYPE=MyISAM +"; +*/ $_SQL[] = " CREATE TABLE [dbo].[{$_TABLES['comments']}] ( @@ -94,10 +117,29 @@ [lft] [numeric](10, 0) NULL , [rht] [numeric](10, 0) NULL , [indent] [numeric](10, 0) NULL , + [name] [varchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [uid] [int] NULL , [ipaddress] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ) ON [PRIMARY] "; + +/* FIXME - MySQL syntax +$_SQL[] = " +CREATE TABLE {$_TABLES['commentsubmissions']} ( + cid int(10) unsigned NOT NULL auto_increment, + type varchar(30) NOT NULL default 'article', + sid varchar(40) NOT NULL, + date datetime default NULL, + title varchar(128) default NULL, + comment text, + uid mediumint(8) NOT NULL default '1', + name varchar(32) default NULL, + pid int(10) NOT NULL default '0', + ipaddress varchar(15) NOT NULL, + PRIMARY KEY (cid) +) TYPE=MyISAM +"; +*/ $_SQL[] = " CREATE TABLE [dbo].[{$_TABLES['conf_values']}] ( @@ -249,6 +291,7 @@ [hits] [numeric](8, 0) NOT NULL , [numemails] [numeric](8, 0) NOT NULL , [comments] [numeric](8, 0) NOT NULL , + [comment_expire] [datetime] NULL , [trackbacks] [numeric](8, 0) NOT NULL , [related] [varchar] (5000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [featured] [tinyint] NOT NULL , @@ -1265,6 +1308,8 @@ INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (17,'plugin.install','Can install/uninstall plugins',1) INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (18,'plugin.upload','Can upload new plugins',1) INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (19,'group.assign','Ability to assign users to groups',1) +INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (20, 'comment.moderate', 'Ability to moderate comments', 1) +INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (21, 'comment.submit', 'Comments are automatically published', 1) set identity_insert {$_TABLES['features']} off "; @@ -1322,6 +1367,8 @@ INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (11,'Group Admin','Is a User Admin with access to groups, too',1) INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (12,'Mail Admin','Can use Mail Utility',1) INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (13,'Logged-in Users','All registered members',1) +INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (14, 'Comment Admin', 'Can moderate comments', 1) +INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (15, 'Comment Submitters', 'Can submit comments', 0) set identity_insert {$_TABLES['groups']} off "; diff -r 6aa163a096ea -r 2a13f4520557 sql/mysql_tableanddata.php --- a/sql/mysql_tableanddata.php Fri Apr 10 22:31:05 2009 +0200 +++ b/sql/mysql_tableanddata.php Fri Apr 10 23:23:21 2009 +0200 @@ -66,7 +66,7 @@ uid mediumint(8) NOT NULL, time datetime NOT NULL, PRIMARY KEY (cid) -) TYPE=MYISAM +) TYPE=MyISAM "; $_SQL[] = " @@ -84,7 +84,7 @@ deletehash varchar(32) NOT NULL, mid int(10) default NULL, PRIMARY KEY (deletehash) -) ENGINE=MyISAM +) TYPE=MyISAM "; $_SQL[] = " @@ -126,7 +126,7 @@ pid int(10) NOT NULL default '0', ipaddress varchar(15) NOT NULL, PRIMARY KEY (cid) -) ENGINE=MyISAM +) TYPE=MyISAM "; $_SQL[] = " @@ -616,7 +616,7 @@ $_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (17,'plugin.install','Can install/uninstall plugins',1) "; $_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (18,'plugin.upload','Can upload new plugins',1) "; $_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (19,'group.assign','Ability to assign users to groups',1) "; -$_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (20, 'comment.moderate', 'Ability to moderate comments', 1)"; +$_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (20, 'comment.moderate', 'Ability to moderate comments', 1)"; $_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (21, 'comment.submit', 'Comments are automatically published', 1)"; $_DATA[] = "INSERT INTO {$_TABLES['frontpagecodes']} (code, name) VALUES (0,'Show Only in Topic') "; diff -r 6aa163a096ea -r 2a13f4520557 sql/updates/mssql_1.5.2_to_1.6.0.php --- a/sql/updates/mssql_1.5.2_to_1.6.0.php Fri Apr 10 22:31:05 2009 +0200 +++ b/sql/updates/mssql_1.5.2_to_1.6.0.php Fri Apr 10 23:23:21 2009 +0200 @@ -19,7 +19,7 @@ uid mediumint(8) NOT NULL, time datetime NOT NULL, PRIMARY KEY (cid) -) TYPE=MYISAM +) TYPE=MyISAM "; $_SQL[] = " CREATE TABLE {$_TABLES['commentnotifications']} ( @@ -28,7 +28,7 @@ deletehash varchar(32) NOT NULL, mid int(10) default NULL, PRIMARY KEY (deletehash) -) ENGINE=MyISAM +) TYPE=MyISAM "; $_SQL[] = " CREATE TABLE {$_TABLES['commentsubmissions']} ( @@ -43,14 +43,14 @@ pid int(10) NOT NULL default '0', ipaddress varchar(15) NOT NULL, PRIMARY KEY (cid) -) ENGINE=MyISAM +) TYPE=MyISAM "; $_SQL[] = "ALTER TABLE {$_TABLES['stories']} ADD comment_expire datetime NOT NULL default '0000-00-00 00:00:00' AFTER comments"; $_SQL[] = "ALTER TABLE {$_TABLES['comments']} ADD name varchar(32) default NULL AFTER indent"; */ $_SQL[] = "INSERT INTO {$_TABLES['groups']} (grp_name, grp_descr, grp_gl_core) VALUES ('Comment Admin', 'Can moderate comments', 1)"; $_SQL[] = "INSERT INTO {$_TABLES['groups']} (grp_name, grp_descr, grp_gl_core) VALUES ('Comment Submitters', 'Can submit comments', 0);"; -$_SQL[] = "INSERT INTO {$_TABLES['features']} (ft_name, ft_descr, ft_gl_core) VALUES ('comment.moderate', 'Ability to moderate comments', 1)"; +$_SQL[] = "INSERT INTO {$_TABLES['features']} (ft_name, ft_descr, ft_gl_core) VALUES ('comment.moderate', 'Ability to moderate comments', 1)"; $_SQL[] = "INSERT INTO {$_TABLES['features']} (ft_name, ft_descr, ft_gl_core) VALUES ('comment.submit', 'Comments are automatically published', 1)"; /** diff -r 6aa163a096ea -r 2a13f4520557 sql/updates/mysql_1.5.2_to_1.6.0.php --- a/sql/updates/mysql_1.5.2_to_1.6.0.php Fri Apr 10 22:31:05 2009 +0200 +++ b/sql/updates/mysql_1.5.2_to_1.6.0.php Fri Apr 10 23:23:21 2009 +0200 @@ -19,7 +19,7 @@ uid mediumint(8) NOT NULL, time datetime NOT NULL, PRIMARY KEY (cid) -) TYPE=MYISAM +) TYPE=MyISAM "; $_SQL[] = " CREATE TABLE {$_TABLES['commentnotifications']} ( @@ -28,7 +28,7 @@ deletehash varchar(32) NOT NULL, mid int(10) default NULL, PRIMARY KEY (deletehash) -) ENGINE=MyISAM +) TYPE=MyISAM "; $_SQL[] = " CREATE TABLE {$_TABLES['commentsubmissions']} ( @@ -43,13 +43,13 @@ pid int(10) NOT NULL default '0', ipaddress varchar(15) NOT NULL, PRIMARY KEY (cid) -) ENGINE=MyISAM +) TYPE=MyISAM "; $_SQL[] = "ALTER TABLE {$_TABLES['stories']} ADD comment_expire datetime NOT NULL default '0000-00-00 00:00:00' AFTER comments"; $_SQL[] = "ALTER TABLE {$_TABLES['comments']} ADD name varchar(32) default NULL AFTER indent"; $_SQL[] = "INSERT INTO {$_TABLES['groups']} (grp_name, grp_descr, grp_gl_core) VALUES ('Comment Admin', 'Can moderate comments', 1)"; $_SQL[] = "INSERT INTO {$_TABLES['groups']} (grp_name, grp_descr, grp_gl_core) VALUES ('Comment Submitters', 'Can submit comments', 0);"; -$_SQL[] = "INSERT INTO {$_TABLES['features']} (ft_name, ft_descr, ft_gl_core) VALUES ('comment.moderate', 'Ability to moderate comments', 1)"; +$_SQL[] = "INSERT INTO {$_TABLES['features']} (ft_name, ft_descr, ft_gl_core) VALUES ('comment.moderate', 'Ability to moderate comments', 1)"; $_SQL[] = "INSERT INTO {$_TABLES['features']} (ft_name, ft_descr, ft_gl_core) VALUES ('comment.submit', 'Comments are automatically published', 1)"; /** From geeklog-cvs at lists.geeklog.net Fri Apr 10 17:33:22 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Fri, 10 Apr 2009 17:33:22 -0400 Subject: [geeklog-cvs] geeklog: Replace Wiki-style formatting in the Daily Digest and w... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/6566283deb9f changeset: 6914:6566283deb9f user: Dirk Haun date: Fri Apr 10 23:33:02 2009 +0200 description: Replace Wiki-style formatting in the Daily Digest and when emailing a story to a friend (bug #0000837, patch provided by Pawel Szczur) diffstat: 3 files changed, 22 insertions(+), 9 deletions(-) public_html/docs/history | 2 ++ public_html/lib-common.php | 12 ++++++++---- public_html/profiles.php | 17 ++++++++++++----- diffs (75 lines): diff -r 2a13f4520557 -r 6566283deb9f public_html/docs/history --- a/public_html/docs/history Fri Apr 10 23:23:21 2009 +0200 +++ b/public_html/docs/history Fri Apr 10 23:33:02 2009 +0200 @@ -11,6 +11,8 @@ + Comment moderation and editable comments, by Jared Wenerd Other changes: +- Replace Wiki-style formatting in the Daily Digest and when emailing a story + to a friend (bug #0000837, patch provided by Pawel Szczur) - New plugin API function PLG_configChange (feature request #0000694) [Dirk] - Fixed layout of Batch Add and Batch Admin options of the User Manager [Dirk] - On a login failure, the user registration form showed up even when new user diff -r 2a13f4520557 -r 6566283deb9f public_html/lib-common.php --- a/public_html/lib-common.php Fri Apr 10 23:23:21 2009 +0200 +++ b/public_html/lib-common.php Fri Apr 10 23:33:02 2009 +0200 @@ -4022,9 +4022,9 @@ $U = DB_fetchArray( $users ); $storysql = array(); - $storysql['mysql'] = "SELECT sid,uid,date AS day,title,introtext,bodytext"; - - $storysql['mssql'] = "SELECT sid,uid,date AS day,title,CAST(introtext AS text) AS introtext,CAST(bodytext AS text) AS introtext"; + $storysql['mysql'] = "SELECT sid,uid,date AS day,title,introtext,postmode"; + + $storysql['mssql'] = "SELECT sid,uid,date AS day,title,CAST(introtext AS text) AS introtext,postmode"; $commonsql = " FROM {$_TABLES['stories']} WHERE draft_flag = 0 AND date <= NOW() AND date >= '{$lastrun}'"; @@ -4100,7 +4100,11 @@ if( $_CONF['emailstorieslength'] > 0 ) { - $storytext = COM_undoSpecialChars( strip_tags( PLG_replaceTags( stripslashes( $S['introtext'] )))); + if($S['postmode']==='wikitext'){ + $storytext = COM_undoSpecialChars( strip_tags( COM_renderWikiText ( stripslashes( $S['introtext'] )))); + } else { + $storytext = COM_undoSpecialChars( strip_tags( PLG_replaceTags( stripslashes( $S['introtext'] )))); + } if( $_CONF['emailstorieslength'] > 1 ) { diff -r 2a13f4520557 -r 6566283deb9f public_html/profiles.php --- a/public_html/profiles.php Fri Apr 10 23:23:21 2009 +0200 +++ b/public_html/profiles.php Fri Apr 10 23:33:02 2009 +0200 @@ -300,7 +300,7 @@ return $retval; } - $sql = "SELECT uid,title,introtext,bodytext,commentcode,UNIX_TIMESTAMP(date) AS day FROM {$_TABLES['stories']} WHERE sid = '$sid'"; + $sql = "SELECT uid,title,introtext,bodytext,commentcode,UNIX_TIMESTAMP(date) AS day,postmode FROM {$_TABLES['stories']} WHERE sid = '$sid'"; $result = DB_query ($sql); $A = DB_fetchArray ($result); $shortmsg = COM_stripslashes ($shortmsg); @@ -325,10 +325,17 @@ $author = COM_getDisplayName ($A['uid']); $mailtext .= $LANG01[1] . ' ' . $author . LB; } - $mailtext .= LB - . COM_undoSpecialChars(stripslashes(strip_tags($A['introtext']))).LB.LB - . COM_undoSpecialChars(stripslashes(strip_tags($A['bodytext']))).LB.LB - . '------------------------------------------------------------'.LB; + if($A['postmode']==='wikitext'){ + $mailtext .= LB + . COM_undoSpecialChars(stripslashes(strip_tags(COM_renderWikiText($A['introtext'])))).LB.LB + . COM_undoSpecialChars(stripslashes(strip_tags(COM_renderWikiText($A['bodytext'])))).LB.LB + . '------------------------------------------------------------'.LB; + } else { + $mailtext .= LB + . COM_undoSpecialChars(stripslashes(strip_tags($A['introtext']))).LB.LB + . COM_undoSpecialChars(stripslashes(strip_tags($A['bodytext']))).LB.LB + . '------------------------------------------------------------'.LB; + } if ($A['commentcode'] == 0) { // comments allowed $mailtext .= $LANG08[24] . LB . COM_buildUrl ($_CONF['site_url'] . '/article.php?story=' From geeklog-cvs at lists.geeklog.net Sat Apr 11 05:25:49 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sat, 11 Apr 2009 05:25:49 -0400 Subject: [geeklog-cvs] tools: Leave copy of lib-custom.php for phpDocumentor Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/4a84799526d6 changeset: 30:4a84799526d6 user: Dirk Haun date: Sat Apr 11 11:25:40 2009 +0200 description: Leave copy of lib-custom.php for phpDocumentor diffstat: 1 file changed, 7 insertions(+), 3 deletions(-) cronjobs/nightly.sh | 10 +++++++--- diffs (42 lines): diff -r cf915aa5cfed -r 4a84799526d6 cronjobs/nightly.sh --- a/cronjobs/nightly.sh Sat Apr 04 21:42:46 2009 +0200 +++ b/cronjobs/nightly.sh Sat Apr 11 11:25:40 2009 +0200 @@ -13,13 +13,16 @@ cd /usr/home/geeklog2/nightly/geeklog-nightly +rm -f system/lib-custom.php + # update repository /usr/local/bin/hg -q pull > /dev/null 2>&1 /usr/local/bin/hg -q up > /dev/null 2>&1 -# fix config names +# fix names of .dist files mv db-config.php.dist db-config.php mv public_html/siteconfig.php.dist public_html/siteconfig.php +mv system/lib-custom.php.dist system/lib-custom.php # add PEAR classes cd system/pear @@ -43,7 +46,6 @@ rm -f plugins/spamx/ProjectHoneyPot.Examine.class.php # about time we clean up the install directory ... rm -f public_html/admin/install/addindex.php -rm -f system/lib-custom.php.dist # PEAR buildpackage files rm -f plugins/calendar/buildpackage.php @@ -76,9 +78,11 @@ tar cf geeklog-nightly.tar '--exclude=\.hg' geeklog-nightly gzip geeklog-nightly.tar -# rename config files back to their names in the repository +# rename .dist files back to their names in the repository mv geeklog-nightly/db-config.php geeklog-nightly/db-config.php.dist mv geeklog-nightly/public_html/siteconfig.php geeklog-nightly/public_html/siteconfig.php.dist +# leave copy of lib-custom.php for phpDocumentor +cp -p geeklog-nightly/system/lib-custom.php geeklog-nightly/system/lib-custom.php.dist mv geeklog-nightly.tar.gz /usr/www/users/geeklog2/www/nightly/ From geeklog-cvs at lists.geeklog.net Sat Apr 11 08:50:14 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sat, 11 Apr 2009 08:50:14 -0400 Subject: [geeklog-cvs] geeklog: Fixed one of the predefined date format strings (bug #0... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/bdf79bad8819 changeset: 6915:bdf79bad8819 user: Dirk Haun date: Sat Apr 11 14:42:39 2009 +0200 description: Fixed one of the predefined date format strings (bug #0000854) diffstat: 5 files changed, 9 insertions(+), 2 deletions(-) public_html/docs/history | 1 + sql/mssql_tableanddata.php | 2 +- sql/mysql_tableanddata.php | 2 +- sql/updates/mssql_1.5.2_to_1.6.0.php | 3 +++ sql/updates/mysql_1.5.2_to_1.6.0.php | 3 +++ diffs (61 lines): diff -r 6566283deb9f -r bdf79bad8819 public_html/docs/history --- a/public_html/docs/history Fri Apr 10 23:33:02 2009 +0200 +++ b/public_html/docs/history Sat Apr 11 14:42:39 2009 +0200 @@ -11,6 +11,7 @@ + Comment moderation and editable comments, by Jared Wenerd Other changes: +- Fixed one of the predefined date format strings (bug #0000854) - Replace Wiki-style formatting in the Daily Digest and when emailing a story to a friend (bug #0000837, patch provided by Pawel Szczur) - New plugin API function PLG_configChange (feature request #0000694) [Dirk] diff -r 6566283deb9f -r bdf79bad8819 sql/mssql_tableanddata.php --- a/sql/mssql_tableanddata.php Fri Apr 10 23:33:02 2009 +0200 +++ b/sql/mssql_tableanddata.php Sat Apr 11 14:42:39 2009 +0200 @@ -1272,7 +1272,7 @@ $_SQL[] = "INSERT INTO {$_TABLES['dateformats']} (dfid, format, description) VALUES (10,'%m-%d-%y %H:%M','3-21-99 22:00')"; $_SQL[] = "INSERT INTO {$_TABLES['dateformats']} (dfid, format, description) VALUES (11,'%d-%m-%y %H:%M','21-3-99 22:00')"; $_SQL[] = "INSERT INTO {$_TABLES['dateformats']} (dfid, format, description) VALUES (12,'%m-%d-%y %I:%M%p','3-21-99 10:00PM')"; -$_SQL[] = "INSERT INTO {$_TABLES['dateformats']} (dfid, format, description) VALUES (13,'%I:%M%p %B %D, %Y','10:00PM March 21st, 1999')"; +$_SQL[] = "INSERT INTO {$_TABLES['dateformats']} (dfid, format, description) VALUES (13,'%I:%M%p %B %e, %Y','10:00PM March 21, 1999')"; $_SQL[] = "INSERT INTO {$_TABLES['dateformats']} (dfid, format, description) VALUES (14,'%a %b %d, ''%y %I:%M%p','Sun Mar 21, ''99 10:00PM')"; $_SQL[] = "INSERT INTO {$_TABLES['dateformats']} (dfid, format, description) VALUES (15,'Day %j, %I ish','Day 80, 10 ish')"; $_SQL[] = "INSERT INTO {$_TABLES['dateformats']} (dfid, format, description) VALUES (16,'%y-%m-%d %I:%M','99-03-21 10:00')"; diff -r 6566283deb9f -r bdf79bad8819 sql/mysql_tableanddata.php --- a/sql/mysql_tableanddata.php Fri Apr 10 23:33:02 2009 +0200 +++ b/sql/mysql_tableanddata.php Sat Apr 11 14:42:39 2009 +0200 @@ -587,7 +587,7 @@ $_DATA[] = "INSERT INTO {$_TABLES['dateformats']} (dfid, format, description) VALUES (10,'%m-%d-%y %H:%M','3-21-99 22:00') "; $_DATA[] = "INSERT INTO {$_TABLES['dateformats']} (dfid, format, description) VALUES (11,'%d-%m-%y %H:%M','21-3-99 22:00') "; $_DATA[] = "INSERT INTO {$_TABLES['dateformats']} (dfid, format, description) VALUES (12,'%m-%d-%y %I:%M%p','3-21-99 10:00PM') "; -$_DATA[] = "INSERT INTO {$_TABLES['dateformats']} (dfid, format, description) VALUES (13,'%I:%M%p %B %D, %Y','10:00PM March 21st, 1999') "; +$_DATA[] = "INSERT INTO {$_TABLES['dateformats']} (dfid, format, description) VALUES (13,'%I:%M%p %B %e, %Y','10:00PM March 21, 1999') "; $_DATA[] = "INSERT INTO {$_TABLES['dateformats']} (dfid, format, description) VALUES (14,'%a %b %d, \'%y %I:%M%p','Sun Mar 21, \'99 10:00PM') "; $_DATA[] = "INSERT INTO {$_TABLES['dateformats']} (dfid, format, description) VALUES (15,'Day %j, %I ish','Day 80, 10 ish') "; $_DATA[] = "INSERT INTO {$_TABLES['dateformats']} (dfid, format, description) VALUES (16,'%y-%m-%d %I:%M','99-03-21 10:00') "; diff -r 6566283deb9f -r bdf79bad8819 sql/updates/mssql_1.5.2_to_1.6.0.php --- a/sql/updates/mssql_1.5.2_to_1.6.0.php Fri Apr 10 23:33:02 2009 +0200 +++ b/sql/updates/mssql_1.5.2_to_1.6.0.php Sat Apr 11 14:42:39 2009 +0200 @@ -52,6 +52,9 @@ $_SQL[] = "INSERT INTO {$_TABLES['groups']} (grp_name, grp_descr, grp_gl_core) VALUES ('Comment Submitters', 'Can submit comments', 0);"; $_SQL[] = "INSERT INTO {$_TABLES['features']} (ft_name, ft_descr, ft_gl_core) VALUES ('comment.moderate', 'Ability to moderate comments', 1)"; $_SQL[] = "INSERT INTO {$_TABLES['features']} (ft_name, ft_descr, ft_gl_core) VALUES ('comment.submit', 'Comments are automatically published', 1)"; + +// fix date format string +$_SQL[] = "UPDATE {$_TABLES['dateformats']} SET format = '%I:%M%p %B %e, %Y', description = '10:00PM March 21, 1999' WHERE dfid = 13"; /** * Add new config options diff -r 6566283deb9f -r bdf79bad8819 sql/updates/mysql_1.5.2_to_1.6.0.php --- a/sql/updates/mysql_1.5.2_to_1.6.0.php Fri Apr 10 23:33:02 2009 +0200 +++ b/sql/updates/mysql_1.5.2_to_1.6.0.php Sat Apr 11 14:42:39 2009 +0200 @@ -51,6 +51,9 @@ $_SQL[] = "INSERT INTO {$_TABLES['groups']} (grp_name, grp_descr, grp_gl_core) VALUES ('Comment Submitters', 'Can submit comments', 0);"; $_SQL[] = "INSERT INTO {$_TABLES['features']} (ft_name, ft_descr, ft_gl_core) VALUES ('comment.moderate', 'Ability to moderate comments', 1)"; $_SQL[] = "INSERT INTO {$_TABLES['features']} (ft_name, ft_descr, ft_gl_core) VALUES ('comment.submit', 'Comments are automatically published', 1)"; + +// fix date format string +$_SQL[] = "UPDATE {$_TABLES['dateformats']} SET format = '%I:%M%p %B %e, %Y', description = '10:00PM March 21, 1999' WHERE dfid = 13"; /** * Add new config options From geeklog-cvs at lists.geeklog.net Sat Apr 11 09:50:54 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sat, 11 Apr 2009 09:50:54 -0400 Subject: [geeklog-cvs] geeklog: Fresh installs + MySQL only: Changed some tinyint field... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/2fcb4527bb04 changeset: 6916:2fcb4527bb04 user: Dirk Haun date: Sat Apr 11 15:35:58 2009 +0200 description: Fresh installs + MySQL only: Changed some tinyint fields that are only used as flags to tinyint(1) from tinyint(3) (bug #0000857) diffstat: 2 files changed, 9 insertions(+), 7 deletions(-) public_html/docs/history | 4 +++- sql/mysql_tableanddata.php | 12 ++++++------ diffs (77 lines): diff -r bdf79bad8819 -r 2fcb4527bb04 public_html/docs/history --- a/public_html/docs/history Sat Apr 11 14:42:39 2009 +0200 +++ b/public_html/docs/history Sat Apr 11 15:35:58 2009 +0200 @@ -1,6 +1,6 @@ Geeklog History/Changes: -Apr ??, 2009 (1.6.0) +Apr 20, 2009 (1.6.0) ------------ Geeklog 1.6.0 incorporates the following projects implemented during @@ -11,6 +11,8 @@ + Comment moderation and editable comments, by Jared Wenerd Other changes: +- Fresh installs + MySQL only: Changed some tinyint fields that are only used + as flags to tinyint(1) from tinyint(3) (bug #0000857) - Fixed one of the predefined date format strings (bug #0000854) - Replace Wiki-style formatting in the Daily Digest and when emailing a story to a friend (bug #0000837, patch provided by Pawel Szczur) diff -r bdf79bad8819 -r 2fcb4527bb04 sql/mysql_tableanddata.php --- a/sql/mysql_tableanddata.php Sat Apr 11 14:42:39 2009 +0200 +++ b/sql/mysql_tableanddata.php Sat Apr 11 15:35:58 2009 +0200 @@ -33,7 +33,7 @@ rdf_last_modified varchar(40) default NULL, rdf_etag varchar(40) default NULL, rdflimit smallint(5) unsigned NOT NULL default '0', - onleft tinyint(3) unsigned NOT NULL default '1', + onleft tinyint(1) unsigned NOT NULL default '1', phpblockfn varchar(128) default '', help varchar(255) default '', owner_id mediumint(8) unsigned NOT NULL default '1', @@ -235,7 +235,7 @@ pi_name varchar(30) NOT NULL default '', pi_version varchar(20) NOT NULL default '', pi_gl_version varchar(20) NOT NULL default '', - pi_enabled tinyint(3) unsigned NOT NULL default '1', + pi_enabled tinyint(1) unsigned NOT NULL default '1', pi_homepage varchar(128) NOT NULL default '', INDEX plugins_enabled(pi_enabled), PRIMARY KEY (pi_name) @@ -296,7 +296,7 @@ CREATE TABLE {$_TABLES['stories']} ( sid varchar(40) NOT NULL default '', uid mediumint(8) NOT NULL default '1', - draft_flag tinyint(3) unsigned default '0', + draft_flag tinyint(1) unsigned default '0', tid varchar(20) NOT NULL default 'General', date datetime default NULL, title varchar(128) default NULL, @@ -308,7 +308,7 @@ comment_expire datetime NOT NULL default '0000-00-00 00:00:00', trackbacks mediumint(8) unsigned NOT NULL default '0', related text, - featured tinyint(3) unsigned NOT NULL default '0', + featured tinyint(1) unsigned NOT NULL default '0', show_topic_icon tinyint(1) unsigned NOT NULL default '1', commentcode tinyint(4) NOT NULL default '0', trackbackcode tinyint(4) NOT NULL default '0', @@ -316,7 +316,7 @@ expire DATETIME NOT NULL default '0000-00-00 00:00:00', postmode varchar(10) NOT NULL default 'html', advanced_editor_mode tinyint(1) unsigned default '0', - frontpage tinyint(3) unsigned default '1', + frontpage tinyint(1) unsigned default '1', owner_id mediumint(8) NOT NULL default '1', group_id mediumint(8) NOT NULL default '2', perm_owner tinyint(1) unsigned NOT NULL default '3', @@ -477,7 +477,7 @@ $_SQL[] = " CREATE TABLE {$_TABLES['userprefs']} ( uid mediumint(8) NOT NULL default '1', - noicons tinyint(3) unsigned NOT NULL default '0', + noicons tinyint(1) unsigned NOT NULL default '0', willing tinyint(3) unsigned NOT NULL default '1', dfid tinyint(3) unsigned NOT NULL default '0', tzid varchar(125) NOT NULL default '', From geeklog-cvs at lists.geeklog.net Sat Apr 11 09:50:55 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sat, 11 Apr 2009 09:50:55 -0400 Subject: [geeklog-cvs] geeklog: Call finish() on the header template so that undefined ... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/c0cb15eefe17 changeset: 6917:c0cb15eefe17 user: Dirk Haun date: Sat Apr 11 15:48:10 2009 +0200 description: Call finish() on the header template so that undefined variables are removed (as done in the footer) diffstat: 1 file changed, 1 insertion(+), 1 deletion(-) public_html/lib-common.php | 2 +- diffs (12 lines): diff -r 2fcb4527bb04 -r c0cb15eefe17 public_html/lib-common.php --- a/public_html/lib-common.php Sat Apr 11 15:35:58 2009 +0200 +++ b/public_html/lib-common.php Sat Apr 11 15:48:10 2009 +0200 @@ -1226,7 +1226,7 @@ // prove useful at times ... // Don't use PHP in templates if you can live without it! - $tmp = $header->parse( 'index_header', 'header' ); + $tmp = $header->finish($header->parse('index_header', 'header')); $xml_declaration = ''; if ( get_cfg_var('short_open_tag') == '1' ) From geeklog-cvs at lists.geeklog.net Sat Apr 11 13:45:16 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sat, 11 Apr 2009 13:45:16 -0400 Subject: [geeklog-cvs] geeklog: Make the name of the 'anon-name' cookie configurable an... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/1014d42f9fa7 changeset: 6918:1014d42f9fa7 user: Dirk Haun date: Sat Apr 11 16:59:56 2009 +0200 description: Make the name of the 'anon-name' cookie configurable and keep it alive for longer diffstat: 7 files changed, 30 insertions(+), 11 deletions(-) language/english.php | 1 language/english_utf-8.php | 1 public_html/admin/install/config-install.php | 1 public_html/docs/config.html | 5 ++++ sql/updates/mssql_1.5.2_to_1.6.0.php | 3 ++ sql/updates/mysql_1.5.2_to_1.6.0.php | 3 ++ system/lib-comment.php | 27 +++++++++++++++----------- diffs (128 lines): diff -r c0cb15eefe17 -r 1014d42f9fa7 language/english.php --- a/language/english.php Sat Apr 11 15:48:10 2009 +0200 +++ b/language/english.php Sat Apr 11 16:59:56 2009 +0200 @@ -1683,6 +1683,7 @@ 'cookie_theme' => "Theme Cookie Name", 'cookie_language' => "Language Cookie Name", 'cookie_tzid' => "Timezone Cookie Name", + 'cookie_anon_name' => 'Anon. Username Cookie Name', 'cookie_ip' => "Cookies embed IP?", 'default_perm_cookie_timeout' => "Permanent Timeout", 'session_cookie_timeout' => "Session Timeout", diff -r c0cb15eefe17 -r 1014d42f9fa7 language/english_utf-8.php --- a/language/english_utf-8.php Sat Apr 11 15:48:10 2009 +0200 +++ b/language/english_utf-8.php Sat Apr 11 16:59:56 2009 +0200 @@ -1683,6 +1683,7 @@ 'cookie_theme' => "Theme Cookie Name", 'cookie_language' => "Language Cookie Name", 'cookie_tzid' => "Timezone Cookie Name", + 'cookie_anon_name' => 'Anon. Username Cookie Name', 'cookie_ip' => "Cookies embed IP?", 'default_perm_cookie_timeout' => "Permanent Timeout", 'session_cookie_timeout' => "Session Timeout", diff -r c0cb15eefe17 -r 1014d42f9fa7 public_html/admin/install/config-install.php --- a/public_html/admin/install/config-install.php Sat Apr 11 15:48:10 2009 +0200 +++ b/public_html/admin/install/config-install.php Sat Apr 11 16:59:56 2009 +0200 @@ -301,6 +301,7 @@ $c->add('cookie_theme','theme','text',7,30,NULL,560,TRUE); $c->add('cookie_language','language','text',7,30,NULL,570,TRUE); $c->add('cookie_tzid','timezone','text',7,30,NULL,575,TRUE); + $c->add('cookie_anon_name','anon_name','text',7,30,NULL,577,TRUE); $c->add('cookie_ip',0,'select',7,30,0,580,TRUE); $c->add('default_perm_cookie_timeout',28800,'text',7,30,NULL,590,TRUE); $c->add('session_cookie_timeout',7200,'text',7,30,NULL,600,TRUE); diff -r c0cb15eefe17 -r 1014d42f9fa7 public_html/docs/config.html --- a/public_html/docs/config.html Sat Apr 11 15:48:10 2009 +0200 +++ b/public_html/docs/config.html Sat Apr 11 16:59:56 2009 +0200 @@ -1253,6 +1253,11 @@ timezone Name of the timezone cookie. + cookie_anon_name + anon_name + Name of the cookie to store the username of anonymous + users. + cookie_ip 0 Session ID to contain IP address of user as well as random number. This is more secure but will more than likely require dialed up users to login each and every time. (0=no, 1=yes) diff -r c0cb15eefe17 -r 1014d42f9fa7 sql/updates/mssql_1.5.2_to_1.6.0.php --- a/sql/updates/mssql_1.5.2_to_1.6.0.php Sat Apr 11 15:48:10 2009 +0200 +++ b/sql/updates/mssql_1.5.2_to_1.6.0.php Sat Apr 11 16:59:56 2009 +0200 @@ -109,6 +109,9 @@ $c->add('comment_close_rec_stories',0,'text',4,21,NULL,1688,TRUE); $c->add('allow_reply_notifications',0,'select',4,21,0, 1689, TRUE); + // cookie to store name of anonymous commenters + $c->add('cookie_anon_name','anon_name','text',7,30,NULL,577,TRUE); + return true; } diff -r c0cb15eefe17 -r 1014d42f9fa7 sql/updates/mysql_1.5.2_to_1.6.0.php --- a/sql/updates/mysql_1.5.2_to_1.6.0.php Sat Apr 11 15:48:10 2009 +0200 +++ b/sql/updates/mysql_1.5.2_to_1.6.0.php Sat Apr 11 16:59:56 2009 +0200 @@ -108,6 +108,9 @@ $c->add('comment_close_rec_stories',0,'text',4,21,NULL,1688,TRUE); $c->add('allow_reply_notifications',0,'select',4,21,0, 1689, TRUE); + // cookie to store name of anonymous commenters + $c->add('cookie_anon_name','anon_name','text',7,30,NULL,577,TRUE); + return true; } diff -r c0cb15eefe17 -r 1014d42f9fa7 system/lib-comment.php --- a/system/lib-comment.php Sat Apr 11 15:48:10 2009 +0200 +++ b/system/lib-comment.php Sat Apr 11 16:59:56 2009 +0200 @@ -401,10 +401,12 @@ $template->set_var( 'sid', $A['sid'] ); $template->set_var( 'type', $A['type'] ); - //COMMENT edit rights - if ( $_USER['uid'] == $A['uid'] && $_CONF['comment_edit'] == 1 - && (time() - $A['nice_date']) < $_CONF['comment_edittime'] && - DB_getItem($_TABLES['comments'], 'COUNT(*)', "pid = {$A['cid']}") == 0) { + // COMMENT edit rights + if (isset($A['uid']) && isset($_USER['uid']) + && ($_USER['uid'] == $A['uid']) && ($_CONF['comment_edit'] == 1) + && ((time() - $A['nice_date']) < $_CONF['comment_edittime']) + && (DB_getItem($_TABLES['comments'], 'COUNT(*)', + "pid = {$A['cid']}") == 0)) { $edit_option = true; if ( empty($token)) { $token = SEC_createToken(); @@ -900,15 +902,16 @@ $comment_template->set_var('lang_logoutorcreateaccount', $LANG03[03]); } else { - //Anonymous user + // Anonymous user $comment_template->set_var('uid', 1); - if ( isset($A['username']) ) { - $name = $A['username']; //for preview - } elseif (isset($_COOKIE['anon-name'])) { + if (isset($A['username'])) { + $name = $A['username']; // for preview + } elseif (isset($_COOKIE[$_CONF['cookie_anon_name']])) { + //stored as cookie, name used before $name = htmlspecialchars(COM_checkWords(strip_tags( - COM_stripslashes($_COOKIE['anon-name'])))); //stored as cookie, name used before + COM_stripslashes($_COOKIE[$_CONF['cookie_anon_name']])))); } else { - $name = $LANG03[24]; //anonymous user + $name = $LANG03[24]; // anonymous user } $usernameblock = ''; @@ -1064,7 +1067,9 @@ if (isset($_POST['username']) && strcmp($_POST['username'],$LANG03[24]) != 0 && $uid == 1) { $name = COM_checkWords(strip_tags(COM_stripslashes($_POST['username']))); - setcookie('anon-name', $name); + setcookie($_CONF['cookie_anon_name'], $name, time() + 31536000, + $_CONF['cookie_path'], $_CONF['cookiedomain'], + $_CONF['cookiesecure']); $name = addslashes($name); } From geeklog-cvs at lists.geeklog.net Sat Apr 11 13:45:16 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sat, 11 Apr 2009 13:45:16 -0400 Subject: [geeklog-cvs] geeklog: Remove ProjectHoneyPot module for Spam-X (we never ship... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/63d54d84c058 changeset: 6919:63d54d84c058 user: Dirk Haun date: Sat Apr 11 17:00:38 2009 +0200 description: Remove ProjectHoneyPot module for Spam-X (we never shipped it anyway) diffstat: 1 file changed, 195 deletions(-) plugins/spamx/ProjectHoneyPot.Examine.class.php | 195 ----------------------- diffs (199 lines): diff -r 1014d42f9fa7 -r 63d54d84c058 plugins/spamx/ProjectHoneyPot.Examine.class.php --- a/plugins/spamx/ProjectHoneyPot.Examine.class.php Sat Apr 11 16:59:56 2009 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,195 +0,0 @@ - | -// +---------------------------------------------------------------------------+ -// | Copyright (C) 2007 by the following authors: | -// | | -// | Authors: Michael Jervis - mike at fuckingbrit.com | -// +---------------------------------------------------------------------------+ -// | | -// | This program is free software; you can redistribute it and/or | -// | modify it under the terms of the GNU General Public License | -// | as published by the Free Software Foundation; either version 2 | -// | of the License, or (at your option) any later version. | -// | | -// | This program is distributed in the hope that it will be useful, | -// | but WITHOUT ANY WARRANTY; without even the implied warranty of | -// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | -// | GNU General Public License for more details. | -// | | -// | You should have received a copy of the GNU General Public License | -// | along with this program; if not, write to the Free Software Foundation, | -// | Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | -// | | -// +---------------------------------------------------------------------------+ - -/** -* @package Spam-X -* @subpackage Modules -*/ - -if (strpos(strtolower($_SERVER['PHP_SELF']), 'ProjectHoneyPot.Examine.class.php') !== false) { - die('This file can not be used on its own!'); -} - -/** -* Include Abstract Examine Class -*/ -require_once $_CONF['path'] . 'plugins/spamx/' . 'BaseCommand.class.php'; - -define('HTTP_BL_SEARCH_ENGINE', 0); -define('HTTP_BL_SUSPICIOUS', 1); -define('HTTP_BL_HARVESTER', 2); -define('HTTP_BL_SUSPICIOUS_HARVESTER', 3); -define('HTTP_BL_COMMENT_SPAMMER', 4); -define('HTTP_BL_SUSPICIOUS_COMMENT', 5); -define('HTTP_BL_HARVESTER_COMMENT', 6); -define('HTTP_BL_ALL', 7); - -/* - * The following settings all relate to the ProjectHoneyPot.org http:BL - * examine module. In order to use this, you *MUST* register with - * ProjectHoneyPot. You *MUST* install a Honey Pot. You *MUST* accept the - * terms of use of the http:BL and acquire your own http:BL access key. - */ -$_SPX_CONF['http_bl_enable'] = true; // Whether or not to use the http:BL, true or false. -// You can get your access key from: http://www.projecthoneypot.org/httpbl_configure.php -// regardless of http_bl_enable, if you don't have a key, this won't work. -$_SPX_CONF['http_bl_access_key'] = 'NOT.CONFIGURED.RIGHT'; -// Whether or not to use TCP (Virtual Circuits) instead of UDP. If set to false, -// UDP will be used unless TCP is required. TCP is required for questions or -// responses greater than 512 bytes. -$_SPX_CONF['http_bl_use_tcp'] = true; -// DNS Servers to use, in my development environment, I found that the examine -// failed without configuring this. Must be an array of IP addresses, or false: -$_SPX_CONF['http_bl_dns_servers'] = false; -// example of array with dummy values: $_SPX_CONF['http_bl_dns_servers'] = array('ip1','ip2'); - - -/* - * Debug settings: - * - * HTTP_BL_VERBOSE_LOGGING if set to 1 will increase the amount of logging - * performed to logs/spamx.log, this is helpful when you are trying to set up - * your nameservers and http:BL access key. You /really/ want to set this to 0. - * - * HTTP_BL_DEBUG_MODE is purely for testing, if set to 1, rather than using - * the IP address of the person posting comment/request will use HTTP_BL_TEST_IP - * this allows you to test and confirm that it is functioning correctly and - * trapping all real blacklisted ip types. For a list of valid test values see: - * http://www.projecthoneypot.org/httpbl_api.php - */ -define('HTTP_BL_VERBOSE_LOGGING', 0); -define('HTTP_BL_DEBUG_MODE', 0); -define('HTTP_BL_TEST_IP', '127.1.1.1'); - - -/** -* Examines the IP address of the poster using the http:BL available to users of -* ProjectHoneyPot.org. This involves performing a special DNS query using a -* special Project Honey Pot access key. See this plugins config.php for use. -* -* @author Mike Jervis, mike AT fuckingbrit DOT com -* @package Spam-X -* -*/ -class ProjectHoneyPot extends BaseCommand { - /** - * Here we do the work - */ - function execute($comment) - { - global $_SPX_CONF; - $ans = 0; - //$_CONF, $_TABLES, $_USER, $LANG_SX00, $result; - if (isset ($_SPX_CONF['http_bl_access_key']) && $_SPX_CONF['http_bl_enable']) { - /* - * We query for accesskey.reversedipaddress.dnsbl.httpbl.org - */ - if (HTTP_BL_DEBUG_MODE == 1) { - $targetip = explode('.', HTTP_BL_TEST_IP); - } else { - $targetip = explode('.', $_SERVER['REMOTE_ADDR']); - } - $querydomain = $_SPX_CONF['http_bl_access_key']; - for($i = 3; $i >= 0; $i--) { - $querydomain .= ".{$targetip[$i]}"; - } - $querydomain .= '.dnsbl.httpbl.org'; - require_once('Net/DNS.php'); - $resolver = new Net_DNS_Resolver(); - if ($_SPX_CONF['http_bl_use_tcp']) { - $resolver->usevc = 1; - } - if (is_array($_SPX_CONF['http_bl_dns_servers'])) { - $resolver->nameservers = $_SPX_CONF['http_bl_dns_servers']; - } - if (HTTP_BL_VERBOSE_LOGGING == 1) { - SPAMX_Log("Performing http:BL query for $querydomain"); - } - $response = $resolver->query($querydomain); - if ($response) { - $result = $response->answer[0]->address; - $resultArray = explode('.', $result); - if (($resultArray[0] == 127) && ($resultArray[3] > HTTP_BL_SEARCH_ENGINE)) { - // Valid, and not a search engine. - $days = $resultArray[1]; - $threat = $resultArray[2]; - switch($resultArray[3]) { - case HTTP_BL_SUSPICIOUS: // suspicious - $type = '"Suspicious"'; - break; - case HTTP_BL_HARVESTER: // harvester - $type = '"Harvester"'; - break; - case HTTP_BL_SUSPICIOUS_HARVESTER: // suspicious harvester - $type = '"Suspicious" and "Harvester"'; - break; - case HTTP_BL_COMMENT_SPAMMER: // comment spammer - $type = '"Comment Spammer"'; - break; - case HTTP_BL_SUSPICIOUS_COMMENT: // suspicious & comment spammer - $type = '"Suspicious" and "Comment Spammer"'; - break; - case HTTP_BL_HARVESTER_COMMENT: // harvester & comment spammer - $type = '"Harvester" and "Comment Spammer"'; - break; - case HTTP_BL_ALL: // suspicious, harvesting comment spammer - $type = '"Suspicious", "Harvester" and "Comment Spammer"'; - break; - } - SPAMX_Log("http:BL reports {$_SERVER['REMOTE_ADDR']} as a $type of threat level $threat. Activity was last seen $days day(s) ago."); - $ans = 1; - } else { - // Either invalid query, or, a search engine. - if (!($resultArray[3] == HTTP_BL_SEARCH_ENGINE)) { - SPAMX_Log('Invalid response from http:BL queried: "' . - $querydomain . '". Received: "' . $result . '"'); - } - $ans = 0; - } - } - } else { - if (HTTP_BL_VERBOSE_LOGGING == 1) { - SPAMX_Log('No response received from http:BL for '.$queryDomain); - } - $ans = 0; - } - - - return $ans; - } -} - -?> From geeklog-cvs at lists.geeklog.net Sat Apr 11 13:45:16 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sat, 11 Apr 2009 13:45:16 -0400 Subject: [geeklog-cvs] geeklog: Make the CIDR check not trip over Mac OS X's use of ::1... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/add909bdec43 changeset: 6920:add909bdec43 user: Dirk Haun date: Sat Apr 11 17:03:12 2009 +0200 description: Make the CIDR check not trip over Mac OS X's use of ::1 for localhost diffstat: 1 file changed, 10 insertions(+), 8 deletions(-) plugins/spamx/IP.Examine.class.php | 18 ++++++++++-------- diffs (30 lines): diff -r 63d54d84c058 -r add909bdec43 plugins/spamx/IP.Examine.class.php --- a/plugins/spamx/IP.Examine.class.php Sat Apr 11 17:00:38 2009 +0200 +++ b/plugins/spamx/IP.Examine.class.php Sat Apr 11 17:03:12 2009 +0200 @@ -99,16 +99,18 @@ // here's our highest int $high = $i | (~$mask & 0xFFFFFFFF); - // now split the ip were checking against up into classes - list($a, $b, $c, $d) = explode('.', $iptocheck); + // now split the ip we're checking against up into classes + $ex = explode('.', $iptocheck); - // now convert the ip we're checking against to an int - $check = ($a << 24) + ($b << 16) + ($c << 8) + $d; + if (count($ex) == 4) { + // now convert the ip we're checking against to an int + $check = ($ex[0] << 24) + ($ex[1] << 16) + ($ex[2] << 8) + $ex[3]; - // if the ip is within the range, including - // highest/lowest values, then it's witin the CIDR range - if (($check >= $low) && ($check <= $high)) { - return true; + // if the ip is within the range, including + // highest/lowest values, then it's witin the CIDR range + if (($check >= $low) && ($check <= $high)) { + return true; + } } return false; From geeklog-cvs at lists.geeklog.net Sat Apr 11 13:45:18 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sat, 11 Apr 2009 13:45:18 -0400 Subject: [geeklog-cvs] geeklog: Changed PLG_configChange to also notify plugins of conf... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/5dd79ca26230 changeset: 6921:5dd79ca26230 user: Dirk Haun date: Sat Apr 11 17:55:09 2009 +0200 description: Changed PLG_configChange to also notify plugins of config changes in other plugins but without providing details (plugins should not depend on internals of other plugins). diffstat: 1 file changed, 17 insertions(+), 13 deletions(-) system/lib-plugins.php | 30 +++++++++++++++++------------- diffs (51 lines): diff -r add909bdec43 -r 5dd79ca26230 system/lib-plugins.php --- a/system/lib-plugins.php Sat Apr 11 17:03:12 2009 +0200 +++ b/system/lib-plugins.php Sat Apr 11 17:55:09 2009 +0200 @@ -2519,8 +2519,9 @@ /** * Inform plugins of configuration changes * -* NOTE: Plugins will only be notified of 'Core' changes and changes in their -* own configuration. Changes in other plugins will not be sent. +* NOTE: Plugins will only be notified of details of changes in 'Core' and in +* their own configuration. For other plugins, they will only be notified +* of the fact that something in the other plugin's config changed. * * @param string $group plugin name or 'Core' for $_CONF changes * @param array $changes names of config values that changed @@ -2533,21 +2534,24 @@ { global $_PLUGINS; - $args[1] = $group; - $args[2] = $changes; + foreach ($_PLUGINS as $pi_name) { + $args = array(); + $args[1] = $group; - if ($group == 'Core') { - foreach ($_PLUGINS as $pi_name) { - PLG_callFunctionForOnePlugin('plugin_configchange_' . $pi_name, - $args); + if (($group == 'Core') || ($group == $pi_name)) { + $args[2] = $changes; } - $function = 'CUSTOM_configchange'; - if (function_exists($function)) { - $function('Core', $changes); + PLG_callFunctionForOnePlugin('plugin_configchange_' . $pi_name, $args); + } + + $function = 'CUSTOM_configchange'; + if (function_exists($function)) { + if ($group == 'Core') { + $function($group, $changes); + } else { + $function($group); } - } else { - PLG_callFunctionForOnePlugin('plugin_configchange_' . $group, $args); } } From geeklog-cvs at lists.geeklog.net Sat Apr 11 13:45:19 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sat, 11 Apr 2009 13:45:19 -0400 Subject: [geeklog-cvs] geeklog: New plugin API function PLG_getDocumentationUrl (featur... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/e7a542a82561 changeset: 6922:e7a542a82561 user: Dirk Haun date: Sat Apr 11 18:52:02 2009 +0200 description: New plugin API function PLG_getDocumentationUrl (feature request #0000848) diffstat: 8 files changed, 165 insertions(+), 18 deletions(-) plugins/calendar/functions.inc | 25 +++++++++++++++++++++++++ plugins/links/functions.inc | 25 +++++++++++++++++++++++++ plugins/polls/functions.inc | 25 +++++++++++++++++++++++++ plugins/spamx/functions.inc | 25 +++++++++++++++++++++++++ plugins/staticpages/functions.inc | 25 +++++++++++++++++++++++++ public_html/docs/history | 2 ++ system/classes/config.class.php | 25 ++++++++++++++----------- system/lib-plugins.php | 31 ++++++++++++++++++++++++------- diffs (289 lines): diff -r 5dd79ca26230 -r e7a542a82561 plugins/calendar/functions.inc --- a/plugins/calendar/functions.inc Sat Apr 11 17:55:09 2009 +0200 +++ b/plugins/calendar/functions.inc Sat Apr 11 18:52:02 2009 +0200 @@ -1899,4 +1899,29 @@ return $retval; } +/** +* Provide URL of a documentation file +* +* @param string $file documentation file being requested, e.g. 'config' +* @return mixed URL or false when not available +* +*/ +function plugin_getdocumentationurl_calendar($file) +{ + global $_CONF; + + switch ($file) { + case 'index': + case 'config': + $retval = $_CONF['site_url'] . '/docs/calendar.html'; + break; + + default: + $retval = false; + break; + } + + return $retval; +} + ?> diff -r 5dd79ca26230 -r e7a542a82561 plugins/links/functions.inc --- a/plugins/links/functions.inc Sat Apr 11 17:55:09 2009 +0200 +++ b/plugins/links/functions.inc Sat Apr 11 18:52:02 2009 +0200 @@ -1626,4 +1626,29 @@ return $categorysql; } +/** +* Provide URL of a documentation file +* +* @param string $file documentation file being requested, e.g. 'config' +* @return mixed URL or false when not available +* +*/ +function plugin_getdocumentationurl_links($file) +{ + global $_CONF; + + switch ($file) { + case 'index': + case 'config': + $retval = $_CONF['site_url'] . '/docs/links.html'; + break; + + default: + $retval = false; + break; + } + + return $retval; +} + ?> diff -r 5dd79ca26230 -r e7a542a82561 plugins/polls/functions.inc --- a/plugins/polls/functions.inc Sat Apr 11 17:55:09 2009 +0200 +++ b/plugins/polls/functions.inc Sat Apr 11 18:52:02 2009 +0200 @@ -1321,4 +1321,29 @@ return $retval; } +/** +* Provide URL of a documentation file +* +* @param string $file documentation file being requested, e.g. 'config' +* @return mixed URL or false when not available +* +*/ +function plugin_getdocumentationurl_polls($file) +{ + global $_CONF; + + switch ($file) { + case 'index': + case 'config': + $retval = $_CONF['site_url'] . '/docs/polls.html'; + break; + + default: + $retval = false; + break; + } + + return $retval; +} + ?> diff -r 5dd79ca26230 -r e7a542a82561 plugins/spamx/functions.inc --- a/plugins/spamx/functions.inc Sat Apr 11 17:55:09 2009 +0200 +++ b/plugins/spamx/functions.inc Sat Apr 11 18:52:02 2009 +0200 @@ -390,4 +390,29 @@ return $out; } +/** +* Provide URL of a documentation file +* +* @param string $file documentation file being requested, e.g. 'config' +* @return mixed URL or false when not available +* +*/ +function plugin_getdocumentationurl_spamx($file) +{ + global $_CONF; + + switch ($file) { + case 'index': + case 'config': + $retval = $_CONF['site_url'] . '/docs/spamx.html'; + break; + + default: + $retval = false; + break; + } + + return $retval; +} + ?> diff -r 5dd79ca26230 -r e7a542a82561 plugins/staticpages/functions.inc --- a/plugins/staticpages/functions.inc Sat Apr 11 17:55:09 2009 +0200 +++ b/plugins/staticpages/functions.inc Sat Apr 11 18:52:02 2009 +0200 @@ -1327,4 +1327,29 @@ return $retval; } +/** +* Provide URL of a documentation file +* +* @param string $file documentation file being requested, e.g. 'config' +* @return mixed URL or false when not available +* +*/ +function plugin_getdocumentationurl_staticpages($file) +{ + global $_CONF; + + switch ($file) { + case 'index': + // TBD: case 'config': + $retval = $_CONF['site_url'] . '/docs/staticpages.html'; + break; + + default: + $retval = false; + break; + } + + return $retval; +} + ?> diff -r 5dd79ca26230 -r e7a542a82561 public_html/docs/history --- a/public_html/docs/history Sat Apr 11 17:55:09 2009 +0200 +++ b/public_html/docs/history Sat Apr 11 18:52:02 2009 +0200 @@ -11,6 +11,8 @@ + Comment moderation and editable comments, by Jared Wenerd Other changes: +- New plugin API function PLG_getDocumentationUrl (feature request #0000848) + [Dirk] - Fresh installs + MySQL only: Changed some tinyint fields that are only used as flags to tinyint(1) from tinyint(3) (bug #0000857) - Fixed one of the predefined date format strings (bug #0000854) diff -r 5dd79ca26230 -r e7a542a82561 system/classes/config.class.php --- a/system/classes/config.class.php Sat Apr 11 17:55:09 2009 +0200 +++ b/system/classes/config.class.php Sat Apr 11 18:52:02 2009 +0200 @@ -2,13 +2,13 @@ /* Reminder: always indent with 4 spaces (no tabs). */ // +---------------------------------------------------------------------------+ -// | Geeklog 1.5 | +// | Geeklog 1.6 | // +---------------------------------------------------------------------------+ // | config.class.php | // | | // | Controls the UI and database for configuration settings | // +---------------------------------------------------------------------------+ -// | Copyright (C) 2007-2008 by the following authors: | +// | Copyright (C) 2007-2009 by the following authors: | // | | // | Authors: Aaron Blankstein - kantai AT gmail DOT com | // +---------------------------------------------------------------------------+ @@ -28,8 +28,6 @@ // | Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | // | | // +---------------------------------------------------------------------------+ -// -// $Id: config.class.php,v 1.50 2008/08/31 19:17:39 dhaun Exp $ class config { var $dbconfig_file; @@ -640,18 +638,23 @@ $on = $name; } if (! is_numeric($on)) { - if (!empty($GLOBALS['_CONF']['site_url'])) { - $baseUrl = $GLOBALS['_CONF']['site_url']; + if ($group == 'Core') { + if (!empty($GLOBALS['_CONF']['site_url'])) { + $baseUrl = $GLOBALS['_CONF']['site_url']; + } else { + $baseUrl = 'http://www.geeklog.net'; + } + $descUrl = $baseUrl . '/docs/config.html#desc_' . $o; } else { - $baseUrl = 'http://www.geeklog.net'; + $descUrl = PLG_getDocumentationUrl($group, 'config'); + if (! empty($descUrl)) { + $descUrl .= '#desc_' . $o; + } } - if ($group == 'Core') { - $descUrl = $baseUrl . '/docs/config.html#desc_' . $o; + if (! empty($descUrl)) { $t->set_var('doc_url', $descUrl); $t->set_var('doc_link', '(?)'); - } else { - // TBD: link to description of plugin option } } } diff -r 5dd79ca26230 -r e7a542a82561 system/lib-plugins.php --- a/system/lib-plugins.php Sat Apr 11 17:55:09 2009 +0200 +++ b/system/lib-plugins.php Sat Apr 11 18:52:02 2009 +0200 @@ -2362,7 +2362,7 @@ . $type . '.gif'; $fh = @fopen ($icon, 'r'); if ($fh === false) { - // give up and us a generic icon + // give up and use a generic icon $retval = $_CONF['site_url'] . '/images/icons/plugins.gif'; } else { $retval = $icon; @@ -2380,12 +2380,12 @@ /** * Invoke a service * - * @param string type The plugin type whose service is to be called - * @param string action The service action to be performed - * @param array args The arguments to be passed to the service invoked - * @param array output The output variable that will contain the output after invocation - * @param array svc_msg The output variable that will contain the service messages - * @return int The result of the invocation + * @param string $type The plugin type whose service is to be called + * @param string $action The service action to be performed + * @param array $args The arguments to be passed to the service invoked + * @param array $output The output variable that will contain the output after invocation + * @param array $svc_msg The output variable that will contain the service messages + * @return int The result of the invocation * @link http://wiki.geeklog.net/index.php/Webservices_API * */ @@ -2555,4 +2555,21 @@ } } +/** +* Ask plugin for the URL to its documentation +* +* @param string $type plugin name +* @param string $file documentation file being requested, e.g. 'config' +* @return mixed URL or false / empty string when not available +* @since Geeklog 1.6.0 +* +*/ +function PLG_getDocumentationUrl($type, $file) +{ + $args[1] = $file; + $function = 'plugin_getdocumentationurl_' . $type; + + return PLG_callFunctionForOnePlugin($function, $args); +} + ?> From geeklog-cvs at lists.geeklog.net Sat Apr 11 13:45:19 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sat, 11 Apr 2009 13:45:19 -0400 Subject: [geeklog-cvs] geeklog: Added description of the Static Pages config options an... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/8c489120d27e changeset: 6923:8c489120d27e user: Dirk Haun date: Sat Apr 11 19:44:23 2009 +0200 description: Added description of the Static Pages config options and enabled links from the Configuration panel diffstat: 4 files changed, 89 insertions(+), 2 deletions(-) plugins/staticpages/functions.inc | 2 public_html/docs/spamx.html | 2 public_html/docs/staticpages.html | 86 +++++++++++++++++++++++++++++++++++++ system/lib-plugins.php | 1 diffs (131 lines): diff -r e7a542a82561 -r 8c489120d27e plugins/staticpages/functions.inc --- a/plugins/staticpages/functions.inc Sat Apr 11 18:52:02 2009 +0200 +++ b/plugins/staticpages/functions.inc Sat Apr 11 19:44:23 2009 +0200 @@ -1340,7 +1340,7 @@ switch ($file) { case 'index': - // TBD: case 'config': + case 'config': $retval = $_CONF['site_url'] . '/docs/staticpages.html'; break; diff -r e7a542a82561 -r 8c489120d27e public_html/docs/spamx.html --- a/public_html/docs/spamx.html Sat Apr 11 18:52:02 2009 +0200 +++ b/public_html/docs/spamx.html Sat Apr 11 19:44:23 2009 +0200 @@ -269,7 +269,7 @@ href="config.html#desc_check_trackback_link">documentation for the configuration for more information.

    -

    Configuration File

    +

    Configuration

    The Spam-X plugin's configuration can be changed from the Configuration admin panel:

    diff -r e7a542a82561 -r 8c489120d27e public_html/docs/staticpages.html --- a/public_html/docs/staticpages.html Sat Apr 11 18:52:02 2009 +0200 +++ b/public_html/docs/staticpages.html Sat Apr 11 19:44:23 2009 +0200 @@ -141,6 +141,92 @@

    In the Configuration admin panel for the static pages plugin, you can set the "Delete Pages with Owner?" option to either "False" (which is also the default), meaning that static pages will not be deleted withtheir owner, but assigned to a member of the Root group instead (the user withthe lowest user ID, most likely the Admin). Setting the option to "True" means that static pages will be deleted when their owner's account is deleted.

    +

    Configuration

    + +

    The configuration options for the Static Pages plugin can be changed from +the Configuration admin panel:

    + +

    Static Pages Main Settings

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    VariableDefault ValueDescription
    allow_phptrueAllows you to globally allow or disallow the use of PHP + in static pages, i.e. it overrides the setting on individual pages.
    sort_by'id'Define sort order when more than one static page is displayed in + centerblocks. Allows sorting by page ID, page title, and date of last + change.
    sort_menu_by'label'Define sort order for static pages in the site's menu. Allows sorting by + page label, page ID, page title, and date of last change.
    delete_pagesfalseSpecify what should happen to a static page when its owner (i.e. the user + who created the page) is deleted. 'True' would delete the page, 'False' + will assign it to a user in the "Root" group (usually the user with the + lowest user ID).
    in_blocktrueWhether to display the content of static pages inside a block template or + not. This is the default setting and can be overridden per page.
    show_hitstrueWhether to show the number of hits for a static page.
    show_datetrueWhether to show the date and time of the last change to a static page.
    filter_htmlfalseWhether HTML in static pages should be run through Geeklog's HTML filter + option.
    censorfalseWhether the content of the static page should be run through Geeklog's + "bad words" filter.
    aftersave'list'Which page to go to after a static page has been saved: +
      +
    • 'item': display the page
    • +
    • 'list': show admin's list of static pages (default)
    • +
    • 'home': display the site's homepage
    • +
    • 'admin': go to the "Admin Home" page, i.e. Command & Control
    • +
    atom_max_items10Max. number of static pages returned when an Atom feed is requested + through the webservices API.
    + - + {captcha} diff -r 30016d8c4d9c -r e585b2e59749 public_html/layout/professional/comment/commentform_advanced.thtml --- a/public_html/layout/professional/comment/commentform_advanced.thtml Mon Apr 13 11:36:37 2009 +0200 +++ b/public_html/layout/professional/comment/commentform_advanced.thtml Mon Apr 13 11:52:14 2009 +0200 @@ -40,7 +40,7 @@ - {allowed_html} + {allowed_html} {captcha} diff -r 30016d8c4d9c -r e585b2e59749 public_html/layout/professional/submit/submitstory.thtml --- a/public_html/layout/professional/submit/submitstory.thtml Mon Apr 13 11:36:37 2009 +0200 +++ b/public_html/layout/professional/submit/submitstory.thtml Mon Apr 13 11:52:14 2009 +0200 @@ -30,7 +30,7 @@ - {allowed_html} + {allowed_html} {captcha} diff -r 30016d8c4d9c -r e585b2e59749 public_html/layout/professional/submit/submitstory_advanced.thtml --- a/public_html/layout/professional/submit/submitstory_advanced.thtml Mon Apr 13 11:36:37 2009 +0200 +++ b/public_html/layout/professional/submit/submitstory_advanced.thtml Mon Apr 13 11:52:14 2009 +0200 @@ -38,7 +38,7 @@ - {allowed_html} + {allowed_html} {captcha} From geeklog-cvs at lists.geeklog.net Mon Apr 13 12:05:18 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Mon, 13 Apr 2009 12:05:18 -0400 Subject: [geeklog-cvs] geeklog: Re-introduced function get_SPX_Ver in the install scrip... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/0bea4f397e63 changeset: 6940:0bea4f397e63 user: Dirk Haun date: Sun Apr 12 09:30:19 2009 +0200 description: Re-introduced function get_SPX_Ver in the install script, which is still needed when upgrading from old Geeklog releases (reported by Sheila) diffstat: 1 file changed, 22 insertions(+) public_html/admin/install/index.php | 22 ++++++++++++++++++++++ diffs (32 lines): diff -r cb03b069c0f4 -r 0bea4f397e63 public_html/admin/install/index.php --- a/public_html/admin/install/index.php Sat Apr 04 16:26:52 2009 +0200 +++ b/public_html/admin/install/index.php Sun Apr 12 09:30:19 2009 +0200 @@ -136,6 +136,28 @@ break; } } + } + + return $retval; +} + + +/** +* Check if the Spam-X plugin is already installed +* +* Note: Needed for upgrades from old versions - don't remove. +* +* @return int 1 = is installed, 0 = not installed +* +*/ +function get_SPX_Ver() +{ + global $_TABLES; + + $retval = 0; + + if (DB_count($_TABLES['plugins'], 'pi_name', 'spamx') == 1) { + $retval = 1; } return $retval; From geeklog-cvs at lists.geeklog.net Mon Apr 13 12:05:18 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Mon, 13 Apr 2009 12:05:18 -0400 Subject: [geeklog-cvs] geeklog: Filter username in webservices authentication Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/5d4ce27e033e changeset: 6941:5d4ce27e033e user: Dirk Haun date: Mon Apr 13 15:20:33 2009 +0200 description: Filter username in webservices authentication diffstat: 1 file changed, 3 insertions(+), 2 deletions(-) system/lib-webservices.php | 5 +++-- diffs (29 lines): diff -r 0bea4f397e63 -r 5d4ce27e033e system/lib-webservices.php --- a/system/lib-webservices.php Sun Apr 12 09:30:19 2009 +0200 +++ b/system/lib-webservices.php Mon Apr 13 15:20:33 2009 +0200 @@ -782,7 +782,7 @@ $status = -1; if (isset($_SERVER['PHP_AUTH_USER'])) { - $username = $_SERVER['PHP_AUTH_USER']; + $username = COM_applyBasicFilter($_SERVER['PHP_AUTH_USER']); $password = $_SERVER['PHP_AUTH_PW']; if ($WS_VERBOSE) { @@ -815,7 +815,7 @@ $key = trim($key); $val = trim($val, "\x22\x27"); if ($key == 'Username') { - $username = $val; + $username = COM_applyBasicFilter($val); } elseif ($key == 'PasswordDigest') { $pwdigest = $val; } elseif ($key == 'Created') { @@ -858,6 +858,7 @@ list($auth_type, $auth_data) = explode(' ', $_SERVER['REMOTE_USER']); list($username, $password) = explode(':', base64_decode($auth_data)); + $username = COM_applyBasicFilter($username); if ($WS_VERBOSE) { COM_errorLog("WS: Attempting to log in user '$username' (via \$_SERVER['REMOTE_USER'])"); From geeklog-cvs at lists.geeklog.net Mon Apr 13 12:05:19 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Mon, 13 Apr 2009 12:05:19 -0400 Subject: [geeklog-cvs] geeklog: Updated version numbers and list of changes Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/bd0dc0217703 changeset: 6942:bd0dc0217703 user: Dirk Haun date: Mon Apr 13 15:57:21 2009 +0200 description: Updated version numbers and list of changes diffstat: 4 files changed, 22 insertions(+), 4 deletions(-) public_html/admin/install/index.php | 2 +- public_html/docs/changes.html | 7 +++++-- public_html/docs/history | 15 +++++++++++++++ public_html/siteconfig.php.dist | 2 +- diffs (68 lines): diff -r 5d4ce27e033e -r bd0dc0217703 public_html/admin/install/index.php --- a/public_html/admin/install/index.php Mon Apr 13 15:20:33 2009 +0200 +++ b/public_html/admin/install/index.php Mon Apr 13 15:57:21 2009 +0200 @@ -48,7 +48,7 @@ define("LB", "\n"); } if (!defined('VERSION')) { - define('VERSION', '1.5.2sr2'); + define('VERSION', '1.5.2sr3'); } if (!defined('XHTML')) { define('XHTML', ' /'); diff -r 5d4ce27e033e -r bd0dc0217703 public_html/docs/changes.html --- a/public_html/docs/changes.html Mon Apr 13 15:20:33 2009 +0200 +++ b/public_html/docs/changes.html Mon Apr 13 15:57:21 2009 +0200 @@ -16,12 +16,15 @@ ChangeLog. The file docs/changed-files has a list of files that have been changed since the last release.

    +

    Geeklog 1.5.2sr3

    + +

    Bookoo of the Nine Situations Group posted another SQL injection exploit, this time targetting the webservices API. As with the previous issue, this allowed an attacker to extract the password hash for any account and is fixed with this release. + +

    Geeklog 1.5.2sr2

    Bookoo of the Nine Situations Group posted an SQL injection exploit for glFusion that also works with Geeklog. This issue allowed an attacker to extract the password hash for any account and is fixed with this release.

    - -

    Fernando Muñoz reported a possible XSS in the query form on most admin panels that we are fixing with this release.

    Geeklog 1.5.2sr1

    diff -r 5d4ce27e033e -r bd0dc0217703 public_html/docs/history --- a/public_html/docs/history Mon Apr 13 15:20:33 2009 +0200 +++ b/public_html/docs/history Mon Apr 13 15:57:21 2009 +0200 @@ -1,4 +1,19 @@ Geeklog History/Changes: + +Apr 13, 2009 (1.5.2sr3) +------------ + +This release addresses the following security issue: + +Bookoo of the Nine Situations Group posted another SQL injection exploit, this +time targetting the webservices API. As with the previous issue, this allowed +an attacker to extract the password hash for any account and is fixed with this +release. + +Not security-related: +- Re-introduced function get_SPX_Ver in the install script, which is still + needed when upgrading from old Geeklog releases (reported by Sheila) [Dirk] + Apr 4, 2009 (1.5.2sr2) ----------- diff -r 5d4ce27e033e -r bd0dc0217703 public_html/siteconfig.php.dist --- a/public_html/siteconfig.php.dist Mon Apr 13 15:20:33 2009 +0200 +++ b/public_html/siteconfig.php.dist Mon Apr 13 15:57:21 2009 +0200 @@ -38,7 +38,7 @@ define('LB',"\n"); } if (!defined('VERSION')) { - define('VERSION', '1.5.2sr2'); + define('VERSION', '1.5.2sr3'); } ?> From geeklog-cvs at lists.geeklog.net Mon Apr 13 12:05:19 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Mon, 13 Apr 2009 12:05:19 -0400 Subject: [geeklog-cvs] geeklog: Added tag geeklog_1_5_2sr3 for changeset bd0dc0217703 Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/fd8a6d903a70 changeset: 6943:fd8a6d903a70 user: Dirk Haun date: Mon Apr 13 16:46:20 2009 +0200 description: Added tag geeklog_1_5_2sr3 for changeset bd0dc0217703 diffstat: 1 file changed, 1 insertion(+) .hgtags | 1 + diffs (8 lines): diff -r bd0dc0217703 -r fd8a6d903a70 .hgtags --- a/.hgtags Mon Apr 13 15:57:21 2009 +0200 +++ b/.hgtags Mon Apr 13 16:46:20 2009 +0200 @@ -4,3 +4,4 @@ 70c2ed57cfa5808ee0859f113dfa77d867720b5c geeklog_1_5_2_stable e8be41d4f5d184142659a2d74b15e400e8c542a7 geeklog_1_5_2sr1 0e10ca8cf00c66e1fe3a91eae50b4a1c41f9f133 geeklog_1_5_2sr2 +bd0dc021770325e55175a9caf131c4db336c7924 geeklog_1_5_2sr3 From geeklog-cvs at lists.geeklog.net Mon Apr 13 12:08:24 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Mon, 13 Apr 2009 12:08:24 -0400 Subject: [geeklog-cvs] geeklog: Filter username in webservices authentication Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/8e5d4241718e changeset: 6944:8e5d4241718e user: Dirk Haun date: Mon Apr 13 15:20:33 2009 +0200 description: Filter username in webservices authentication diffstat: 1 file changed, 3 insertions(+), 2 deletions(-) system/lib-webservices.php | 5 +++-- diffs (29 lines): diff -r e585b2e59749 -r 8e5d4241718e system/lib-webservices.php --- a/system/lib-webservices.php Mon Apr 13 11:52:14 2009 +0200 +++ b/system/lib-webservices.php Mon Apr 13 15:20:33 2009 +0200 @@ -790,7 +790,7 @@ $status = -1; if (isset($_SERVER['PHP_AUTH_USER'])) { - $username = $_SERVER['PHP_AUTH_USER']; + $username = COM_applyBasicFilter($_SERVER['PHP_AUTH_USER']); $password = $_SERVER['PHP_AUTH_PW']; if ($WS_VERBOSE) { @@ -823,7 +823,7 @@ $key = trim($key); $val = trim($val, "\x22\x27"); if ($key == 'Username') { - $username = $val; + $username = COM_applyBasicFilter($val); } elseif ($key == 'PasswordDigest') { $pwdigest = $val; } elseif ($key == 'Created') { @@ -866,6 +866,7 @@ list($auth_type, $auth_data) = explode(' ', $_SERVER['REMOTE_USER']); list($username, $password) = explode(':', base64_decode($auth_data)); + $username = COM_applyBasicFilter($username); if ($WS_VERBOSE) { COM_errorLog("WS: Attempting to log in user '$username' (via \$_SERVER['REMOTE_USER'])"); From geeklog-cvs at lists.geeklog.net Mon Apr 13 12:08:25 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Mon, 13 Apr 2009 12:08:25 -0400 Subject: [geeklog-cvs] geeklog: Sync list of changes with 1.5.2sr3 Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/23beb1e0bbb1 changeset: 6945:23beb1e0bbb1 user: Dirk Haun date: Mon Apr 13 18:08:11 2009 +0200 description: Sync list of changes with 1.5.2sr3 diffstat: 2 files changed, 20 insertions(+), 2 deletions(-) public_html/docs/changes.html | 5 +++++ public_html/docs/history | 17 +++++++++++++++-- diffs (49 lines): diff -r 8e5d4241718e -r 23beb1e0bbb1 public_html/docs/changes.html --- a/public_html/docs/changes.html Mon Apr 13 15:20:33 2009 +0200 +++ b/public_html/docs/changes.html Mon Apr 13 18:08:11 2009 +0200 @@ -35,6 +35,11 @@
  • The minimum PHP version required by Geeklog is now PHP 4.3.0. Given that the PHP team ended support for PHP 4 in August 2008, you should be looking into upgrading to PHP 5 anyway.
  • + + +

    Geeklog 1.5.2sr3

    + +

    Bookoo of the Nine Situations Group posted another SQL injection exploit, this time targetting the webservices API. As with the previous issue, this allowed an attacker to extract the password hash for any account and is fixed with this release.

    Geeklog 1.5.2sr2

    diff -r 8e5d4241718e -r 23beb1e0bbb1 public_html/docs/history --- a/public_html/docs/history Mon Apr 13 15:20:33 2009 +0200 +++ b/public_html/docs/history Mon Apr 13 18:08:11 2009 +0200 @@ -16,8 +16,6 @@ - Use a more efficient implementation of Story::hasContent (bug #0000858, patch provided by Maciej Cupial) - Make sure formerly optional config items can be disabled (bug #0000846) [Dirk] -- Re-introduced function get_SPX_Ver in the install script, which is still - needed when upgrading from old Geeklog releases (reported by Sheila) [Dirk] - New plugin API function PLG_getDocumentationUrl (feature request #0000848) [Dirk] - Fresh installs + MySQL only: Changed some tinyint fields that are only used @@ -142,6 +140,21 @@ now [Dirk] - Display "successfully saved" and "successfully deleted" messages, just like every other plugin and built-in function does (bug #0000644) [Dirk] + + +Apr 13, 2009 (1.5.2sr3) +------------ + +This release addresses the following security issue: + +Bookoo of the Nine Situations Group posted another SQL injection exploit, this +time targetting the webservices API. As with the previous issue, this allowed +an attacker to extract the password hash for any account and is fixed with this +release. + +Not security-related: +- Re-introduced function get_SPX_Ver in the install script, which is still + needed when upgrading from old Geeklog releases (reported by Sheila) [Dirk] Apr 4, 2009 (1.5.2sr2) From geeklog-cvs at lists.geeklog.net Mon Apr 13 13:34:24 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Mon, 13 Apr 2009 13:34:24 -0400 Subject: [geeklog-cvs] geeklog: Fixed dropdown for the "censor mode", which has more th... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/ee900b120ca7 changeset: 6946:ee900b120ca7 user: Dirk Haun date: Mon Apr 13 19:31:28 2009 +0200 description: Fixed dropdown for the "censor mode", which has more than the two options offered previously (bug #0000692) diffstat: 4 files changed, 9 insertions(+), 1 deletion(-) public_html/admin/install/config-install.php | 2 +- public_html/docs/history | 2 ++ sql/updates/mssql_1.5.2_to_1.6.0.php | 3 +++ sql/updates/mysql_1.5.2_to_1.6.0.php | 3 +++ diffs (50 lines): diff -r 23beb1e0bbb1 -r ee900b120ca7 public_html/admin/install/config-install.php --- a/public_html/admin/install/config-install.php Mon Apr 13 18:08:11 2009 +0200 +++ b/public_html/admin/install/config-install.php Mon Apr 13 19:31:28 2009 +0200 @@ -331,7 +331,7 @@ $c->add('allowed_protocols',array('http','ftp','https'),'%text',7,34,NULL,1740,TRUE); $c->add('fs_censoring', NULL, 'fieldset', 7, 35, NULL, 0, TRUE); - $c->add('censormode',1,'select',7,35,0,1760,TRUE); + $c->add('censormode',1,'select',7,35,18,1760,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); diff -r 23beb1e0bbb1 -r ee900b120ca7 public_html/docs/history --- a/public_html/docs/history Mon Apr 13 18:08:11 2009 +0200 +++ b/public_html/docs/history Mon Apr 13 19:31:28 2009 +0200 @@ -11,6 +11,8 @@ + Comment moderation and editable comments, by Jared Wenerd Other changes: +- Fixed dropdown for the "censor mode", which has more than the two options + offered previously (bug #0000692) [Mike, Maciej Cupial] - Slightly faster template class (feature request #0000760, patches provided by dengen and mystral-kk) - Use a more efficient implementation of Story::hasContent (bug #0000858, patch diff -r 23beb1e0bbb1 -r ee900b120ca7 sql/updates/mssql_1.5.2_to_1.6.0.php --- a/sql/updates/mssql_1.5.2_to_1.6.0.php Mon Apr 13 18:08:11 2009 +0200 +++ b/sql/updates/mssql_1.5.2_to_1.6.0.php Mon Apr 13 19:31:28 2009 +0200 @@ -74,6 +74,9 @@ // 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'"); + + // fix censormode dropdown + DB_query("UPDATE {$_TABLES['conf_values']} SET selectionArray = 18 WHERE name = 'censormode'"); $c = config::get_instance(); diff -r 23beb1e0bbb1 -r ee900b120ca7 sql/updates/mysql_1.5.2_to_1.6.0.php --- a/sql/updates/mysql_1.5.2_to_1.6.0.php Mon Apr 13 18:08:11 2009 +0200 +++ b/sql/updates/mysql_1.5.2_to_1.6.0.php Mon Apr 13 19:31:28 2009 +0200 @@ -73,6 +73,9 @@ // 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'"); + + // fix censormode dropdown + DB_query("UPDATE {$_TABLES['conf_values']} SET selectionArray = 18 WHERE name = 'censormode'"); $c = config::get_instance(); From geeklog-cvs at lists.geeklog.net Mon Apr 13 15:15:52 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Mon, 13 Apr 2009 15:15:52 -0400 Subject: [geeklog-cvs] tools: Geeklog 1.5.2sr3 is the current version now Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/489a17895656 changeset: 31:489a17895656 user: Dirk Haun date: Mon Apr 13 21:15:39 2009 +0200 description: Geeklog 1.5.2sr3 is the current version now diffstat: 1 file changed, 15 insertions(+), 14 deletions(-) versionchecker/versionchecker.php | 29 +++++++++++++++-------------- diffs (47 lines): diff -r 4a84799526d6 -r 489a17895656 versionchecker/versionchecker.php --- a/versionchecker/versionchecker.php Sat Apr 11 11:25:40 2009 +0200 +++ b/versionchecker/versionchecker.php Mon Apr 13 21:15:39 2009 +0200 @@ -9,7 +9,7 @@

    '1.3.11sr7-1', '1.3.11sr7' => '1.3.11sr7-1', */ - '1.4.0' => '1.5.2sr2', - '1.4.0sr1' => '1.5.2sr2', - '1.4.0sr2' => '1.5.2sr2', - '1.4.0sr3' => '1.5.2sr2', - '1.4.0sr4' => '1.5.2sr2', - '1.4.0sr5' => '1.5.2sr2', - '1.4.0sr5-1' => '1.5.2sr2', - '1.4.0sr6' => '1.5.2sr2', - '1.4.1' => '1.5.2sr2', + '1.4.0' => '1.5.2sr3', + '1.4.0sr1' => '1.5.2sr3', + '1.4.0sr2' => '1.5.2sr3', + '1.4.0sr3' => '1.5.2sr3', + '1.4.0sr4' => '1.5.2sr3', + '1.4.0sr5' => '1.5.2sr3', + '1.4.0sr5-1' => '1.5.2sr3', + '1.4.0sr6' => '1.5.2sr3', + '1.4.1' => '1.5.2sr3', - '1.5.0' => '1.5.2sr2', - '1.5.1' => '1.5.2sr2', - '1.5.2' => '1.5.2sr2', - '1.5.2sr1' => '1.5.2sr2' + '1.5.0' => '1.5.2sr3', + '1.5.1' => '1.5.2sr3', + '1.5.2' => '1.5.2sr3', + '1.5.2sr1' => '1.5.2sr3', + '1.5.2sr2' => '1.5.2sr3' ); $v = explode ('.', $version); From geeklog-cvs at lists.geeklog.net Thu Apr 16 09:38:10 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Thu, 16 Apr 2009 09:38:10 -0400 Subject: [geeklog-cvs] geeklog: New plugin API function PLG_pluginStateChange Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/deca272b55c8 changeset: 6947:deca272b55c8 user: Dirk Haun date: Wed Apr 15 20:24:04 2009 +0200 description: New plugin API function PLG_pluginStateChange diffstat: 3 files changed, 56 insertions(+), 5 deletions(-) public_html/admin/plugins.php | 23 ++++++++++++++++++----- public_html/docs/history | 1 + system/lib-plugins.php | 37 +++++++++++++++++++++++++++++++++++++ diffs (152 lines): diff -r ee900b120ca7 -r deca272b55c8 public_html/admin/plugins.php --- a/public_html/admin/plugins.php Mon Apr 13 19:31:28 2009 +0200 +++ b/public_html/admin/plugins.php Wed Apr 15 20:24:04 2009 +0200 @@ -35,7 +35,7 @@ /** * This is the plugin administration page. Here you can install, uninstall, -* enable, disable, and upload plugins. +* upgrade, enable, disable, and upload plugins. * */ @@ -186,10 +186,12 @@ PLG_enableStateChange($P['pi_name'], true); DB_change($_TABLES['plugins'], 'pi_enabled', 1, 'pi_name', $P['pi_name']); + PLG_pluginStateChange($P['pi_name'], 'enabled'); } elseif (!isset($pi_name_arr[$P['pi_name']]) && $P['pi_enabled'] == 1) { // disable it PLG_enableStateChange($P['pi_name'], false); DB_change($_TABLES['plugins'], 'pi_enabled', 0, 'pi_name', $P['pi_name']); + PLG_pluginStateChange($P['pi_name'], 'disabled'); } } } @@ -223,13 +225,18 @@ $pi_gl_version = addslashes ($pi_gl_version); $pi_homepage = addslashes ($pi_homepage); - $currentState = DB_getItem ($_TABLES['plugins'], 'pi_enabled', - "pi_name= '{$pi_name}' LIMIT 1"); + $currentState = DB_getItem($_TABLES['plugins'], 'pi_enabled', + "pi_name= '{$pi_name}' LIMIT 1"); if ($currentState != $enabled) { - PLG_enableStateChange ($pi_name, ($enabled == 1) ? true : false); + PLG_enableStateChange($pi_name, ($enabled == 1) ? true : false); } - DB_save ($_TABLES['plugins'], 'pi_name, pi_version, pi_gl_version, pi_enabled, pi_homepage', "'$pi_name', '$pi_version', '$pi_gl_version', $enabled, '$pi_homepage'"); + DB_save($_TABLES['plugins'], 'pi_name, pi_version, pi_gl_version, pi_enabled, pi_homepage', "'$pi_name', '$pi_version', '$pi_gl_version', $enabled, '$pi_homepage'"); + + if ($currentState != $enabled) { + PLG_pluginStateChange($pi_name, + ($enabled == 1) ? 'enabled' : 'disabled'); + } $retval = COM_refresh($_CONF['site_admin_url'] . '/plugins.php?msg=28'); } else { @@ -357,6 +364,7 @@ $result = PLG_upgrade($pi_name); if ($result > 0 ) { if ($result === TRUE) { // Catch returns that are just true/false + PLG_pluginStateChange($pi_name, 'upgraded'); $retval .= COM_refresh($_CONF['site_admin_url'] . '/plugins.php?msg=60'); } else { // Plugin returned a message number @@ -396,6 +404,8 @@ } if (PLG_uninstall($pi_name)) { + PLG_pluginStateChange($pi_name, 'uninstalled'); + $retval = 45; // success msg } else { $retval = 95; // error msg @@ -749,6 +759,7 @@ ($code_version != $pi_version)) { $result = PLG_upgrade($dirname); if ($result === true) { + PLG_pluginStateChange($dirname, 'upgraded'); $msg = 60; // successfully updated } else { $msg_with_plugin_name = true; @@ -763,6 +774,7 @@ } elseif (file_exists($plg_path . 'autoinstall.php')) { // if the plugin has an autoinstall.php, install it now if (plugin_autoinstall($pi_name)) { + PLG_pluginStateChange($pi_name, 'installed'); $msg = 44; // successfully installed } else { $msg = 72; // an error occured while installing the plugin @@ -1207,6 +1219,7 @@ $plugin = COM_applyFilter($_GET['plugin']); } if (plugin_autoinstall($plugin)) { + PLG_pluginStateChange($plugin, 'installed'); $display .= COM_refresh($_CONF['site_admin_url'] . '/plugins.php?msg=44'); } else { diff -r ee900b120ca7 -r deca272b55c8 public_html/docs/history --- a/public_html/docs/history Mon Apr 13 19:31:28 2009 +0200 +++ b/public_html/docs/history Wed Apr 15 20:24:04 2009 +0200 @@ -11,6 +11,7 @@ + Comment moderation and editable comments, by Jared Wenerd Other changes: +- New plugin API function PLG_pluginStateChange [Dirk] - Fixed dropdown for the "censor mode", which has more than the two options offered previously (bug #0000692) [Mike, Maciej Cupial] - Slightly faster template class (feature request #0000760, patches provided diff -r ee900b120ca7 -r deca272b55c8 system/lib-plugins.php --- a/system/lib-plugins.php Mon Apr 13 19:31:28 2009 +0200 +++ b/system/lib-plugins.php Wed Apr 15 20:24:04 2009 +0200 @@ -353,6 +353,7 @@ * @param string $type Plugin name * @param boolean $enable true if enabling, false if disabling * @return boolean Returns true on success otherwise false +* @see PLG_pluginStateChange * */ function PLG_enableStateChange ($type, $enable) @@ -2575,4 +2576,40 @@ return PLG_callFunctionForOnePlugin($function, $args); } +/** +* Inform plugins when another plugin's state changed +* +* Unlike PLG_enableStateChange, this function is called after the state +* change. +* +* NOTE: You can not rely on being informed of state changes for 'installed', +* 'uninstalled', and 'upgraded', as these may happen in the plugin's install +* script, outside of Geeklog's control. +* +* @param string $type plugin name +* @param string $status new status: 'enabled', 'disabled', 'installed', 'uninstalled', 'upgraded' +* @return void +* @see PLG_enableStateChange +* @since Geeklog 1.6.0 +* +*/ +function PLG_pluginStateChange($type, $status) +{ + global $_PLUGINS; + + $args[1] = $type; + $args[2] = $status; + foreach ($_PLUGINS as $pi_name) { + if ($pi_name != $type) { + $function = 'plugin_pluginstatechange_' . $pi_name; + PLG_callFunctionForOnePlugin($function, $args); + } + } + + $function = 'CUSTOM_pluginstatechange'; + if (function_exists($function)) { + $function($type, $status); + } +} + ?> From geeklog-cvs at lists.geeklog.net Thu Apr 16 14:37:43 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Thu, 16 Apr 2009 14:37:43 -0400 Subject: [geeklog-cvs] geeklog: Fixed create tables in MSSQL Mode. Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/b01aaa1858c2 changeset: 6948:b01aaa1858c2 user: Mike Jervis date: Thu Apr 16 19:37:23 2009 +0100 description: Fixed create tables in MSSQL Mode. diffstat: 1 file changed, 39 insertions(+), 32 deletions(-) sql/mssql_tableanddata.php | 71 ++++++++++++++++++++++++-------------------- diffs (101 lines): diff -r deca272b55c8 -r b01aaa1858c2 sql/mssql_tableanddata.php --- a/sql/mssql_tableanddata.php Wed Apr 15 20:24:04 2009 +0200 +++ b/sql/mssql_tableanddata.php Thu Apr 16 19:37:23 2009 +0100 @@ -73,16 +73,18 @@ ) ON [PRIMARY] "; -/* FIXME - MySQL syntax $_SQL[] = " -CREATE TABLE {$_TABLES['commentedits']} ( - cid int(10) NOT NULL, - uid mediumint(8) NOT NULL, - time datetime NOT NULL, - PRIMARY KEY (cid) -) TYPE=MyISAM +CREATE TABLE [dbo].[{$_TABLES['commentedits']}] ( + [cid] [int] NOT NULL, + [uid] [int] NOT NULL, + [time] [datetime] NOT NULL, +) ON [PRIMARY] "; -*/ + +$_SQL[] = " +ALTER TABLE [dbo].[{$_TABLES['commentedits']}] ADD CONSTRAINT +[PK_{$_TABLES['commentedits']}] PRIMARY KEY CLUSTERED ([cid]) ON [PRIMARY] +"; $_SQL[] = " CREATE TABLE [dbo].[{$_TABLES['commentmodes']}] ( @@ -91,17 +93,20 @@ ) ON [PRIMARY] "; -/* FIXME - MySQL syntax $_SQL[] = " -CREATE TABLE {$_TABLES['commentnotifications']} ( - cid int(10) default NULL, - uid mediumint(8) NOT NULL, - deletehash varchar(32) NOT NULL, - mid int(10) default NULL, - PRIMARY KEY (deletehash) -) TYPE=MyISAM +CREATE TABLE [dbo].[{$_TABLES['commentnotifications']}]( + [cid] [INT] NOT NULL, + [uid] [INT] NOT NULL, + [deletehash] [varchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, + [mid] [INT] DEFAULT NULL +) ON [PRIMARY] "; -*/ + +$_SQL[] = " +ALTER TABLE [dbo].[{$_TABLES['commentnotifications']}] ADD CONSTRAINT +[PK_{$_TABLES['commentnotifications']}] PRIMARY KEY CLUSTERED ([cid]) ON [PRIMARY] +"; + $_SQL[] = " CREATE TABLE [dbo].[{$_TABLES['comments']}] ( @@ -123,23 +128,25 @@ ) ON [PRIMARY] "; -/* FIXME - MySQL syntax $_SQL[] = " -CREATE TABLE {$_TABLES['commentsubmissions']} ( - cid int(10) unsigned NOT NULL auto_increment, - type varchar(30) NOT NULL default 'article', - sid varchar(40) NOT NULL, - date datetime default NULL, - title varchar(128) default NULL, - comment text, - uid mediumint(8) NOT NULL default '1', - name varchar(32) default NULL, - pid int(10) NOT NULL default '0', - ipaddress varchar(15) NOT NULL, - PRIMARY KEY (cid) -) TYPE=MyISAM +CREATE TABLE [dbo].[{$_TABLES['commentsubmissions']}] ( + [cid] [int] IDENTITY (1,1) NOT NULL, + [type] [varchar] (30) NOT NULL default 'article', + [sid] [varchar](40) NOT NULL, + [date] [datetime] default NULL, + [title] [varchar] (128) default NULL, + [comment] [NTEXT], + [uid] [INT] NOT NULL default '1', + [name] [varchar] (32) default NULL, + [pid] [INT] NOT NULL default '0', + [ipaddress] [varchar](15) NOT NULL +) ON [PRIMARY] "; -*/ + +$_SQL[] = " +ALTER TABLE [dbo].[{$_TABLES['commentsubmissions']}] ADD CONSTRAINT +[PK_{$_TABLES['commentsubmissions']}] PRIMARY KEY CLUSTERED ([cid]) ON [PRIMARY] +"; $_SQL[] = " CREATE TABLE [dbo].[{$_TABLES['conf_values']}] ( From geeklog-cvs at lists.geeklog.net Thu Apr 16 14:43:30 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Thu, 16 Apr 2009 14:43:30 -0400 Subject: [geeklog-cvs] geeklog: Upgrade MSSQL support Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/c55adbf4e2d4 changeset: 6949:c55adbf4e2d4 user: Mike Jervis date: Thu Apr 16 19:43:08 2009 +0100 description: Upgrade MSSQL support diffstat: 1 file changed, 43 insertions(+), 30 deletions(-) sql/updates/mssql_1.5.2_to_1.6.0.php | 73 ++++++++++++++++++++-------------- diffs (89 lines): diff -r b01aaa1858c2 -r c55adbf4e2d4 sql/updates/mssql_1.5.2_to_1.6.0.php --- a/sql/updates/mssql_1.5.2_to_1.6.0.php Thu Apr 16 19:37:23 2009 +0100 +++ b/sql/updates/mssql_1.5.2_to_1.6.0.php Thu Apr 16 19:43:08 2009 +0100 @@ -12,42 +12,55 @@ $_SQL[] = "INSERT INTO {$_TABLES['features']} (ft_name, ft_descr, ft_gl_core) VALUES ('group.assign','Ability to assign users to groups',1)"; // new comment tables, groups, and permissions -/* FIXME: MySQL syntax ... + $_SQL[] = " -CREATE TABLE {$_TABLES['commentedits']} ( - cid int(10) NOT NULL, - uid mediumint(8) NOT NULL, - time datetime NOT NULL, - PRIMARY KEY (cid) -) TYPE=MyISAM +CREATE TABLE [dbo].[{$_TABLES['commentedits']}] ( + [cid] [int] NOT NULL, + [uid] [int] NOT NULL, + [time] [datetime] NOT NULL, +) ON [PRIMARY] "; + $_SQL[] = " -CREATE TABLE {$_TABLES['commentnotifications']} ( - cid int(10) default NULL, - uid mediumint(8) NOT NULL, - deletehash varchar(32) NOT NULL, - mid int(10) default NULL, - PRIMARY KEY (deletehash) -) TYPE=MyISAM +ALTER TABLE [dbo].[{$_TABLES['commentedits']}] ADD CONSTRAINT +[PK_{$_TABLES['commentedits']}] PRIMARY KEY CLUSTERED ([cid]) ON [PRIMARY] "; + $_SQL[] = " -CREATE TABLE {$_TABLES['commentsubmissions']} ( - cid int(10) unsigned NOT NULL auto_increment, - type varchar(30) NOT NULL default 'article', - sid varchar(40) NOT NULL, - date datetime default NULL, - title varchar(128) default NULL, - comment text, - uid mediumint(8) NOT NULL default '1', - name varchar(32) default NULL, - pid int(10) NOT NULL default '0', - ipaddress varchar(15) NOT NULL, - PRIMARY KEY (cid) -) TYPE=MyISAM +CREATE TABLE [dbo].[{$_TABLES['commentnotifications']}]( + [cid] [INT] NOT NULL, + [uid] [INT] NOT NULL, + [deletehash] [varchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, + [mid] [INT] DEFAULT NULL +) ON [PRIMARY] "; -$_SQL[] = "ALTER TABLE {$_TABLES['stories']} ADD comment_expire datetime NOT NULL default '0000-00-00 00:00:00' AFTER comments"; -$_SQL[] = "ALTER TABLE {$_TABLES['comments']} ADD name varchar(32) default NULL AFTER indent"; -*/ + +$_SQL[] = " +ALTER TABLE [dbo].[{$_TABLES['commentnotifications']}] ADD CONSTRAINT +[PK_{$_TABLES['commentnotifications']}] PRIMARY KEY CLUSTERED ([cid]) ON [PRIMARY] +"; + +$_SQL[] = " +CREATE TABLE [dbo].[{$_TABLES['commentsubmissions']}] ( + [cid] [int] IDENTITY (1,1) NOT NULL, + [type] [varchar] (30) NOT NULL default 'article', + [sid] [varchar](40) NOT NULL, + [date] [datetime] default NULL, + [title] [varchar] (128) default NULL, + [comment] [NTEXT], + [uid] [INT] NOT NULL default '1', + [name] [varchar] (32) default NULL, + [pid] [INT] NOT NULL default '0', + [ipaddress] [varchar](15) NOT NULL +) ON [PRIMARY] +"; + +$_SQL[] = " +ALTER TABLE [dbo].[{$_TABLES['commentsubmissions']}] ADD CONSTRAINT +[PK_{$_TABLES['commentsubmissions']}] PRIMARY KEY CLUSTERED ([cid]) ON [PRIMARY] +"; +$_SQL[] = "ALTER TABLE {$_TABLES['stories']} ADD comment_expire datetime NOT NULL default '1901-01-01 00:00:00.000'"; +$_SQL[] = "ALTER TABLE {$_TABLES['comments']} ADD name varchar(32) default NULL "; $_SQL[] = "INSERT INTO {$_TABLES['groups']} (grp_name, grp_descr, grp_gl_core) VALUES ('Comment Admin', 'Can moderate comments', 1)"; $_SQL[] = "INSERT INTO {$_TABLES['groups']} (grp_name, grp_descr, grp_gl_core) VALUES ('Comment Submitters', 'Can submit comments', 0);"; $_SQL[] = "INSERT INTO {$_TABLES['features']} (ft_name, ft_descr, ft_gl_core) VALUES ('comment.moderate', 'Ability to moderate comments', 1)"; From geeklog-cvs at lists.geeklog.net Fri Apr 17 01:42:27 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Fri, 17 Apr 2009 01:42:27 -0400 Subject: [geeklog-cvs] geeklog: Updated article.php to use a page number from $_GET or ... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/be9bbaaa4bf8 changeset: 6950:be9bbaaa4bf8 user: vinny date: Thu Apr 16 23:39:31 2009 -0600 description: Updated article.php to use a page number from $_GET or $_POST instead of assuming register globals. diffstat: 1 file changed, 7 insertions(+) public_html/article.php | 7 +++++++ diffs (31 lines): diff -r c55adbf4e2d4 -r be9bbaaa4bf8 public_html/article.php --- a/public_html/article.php Thu Apr 16 19:43:08 2009 +0100 +++ b/public_html/article.php Thu Apr 16 23:39:31 2009 -0600 @@ -64,6 +64,7 @@ $order = ''; $query = ''; $reply = ''; +$page = 0; if (isset ($_POST['mode'])) { $sid = COM_applyFilter ($_POST['story']); $mode = COM_applyFilter ($_POST['mode']); @@ -75,6 +76,9 @@ } if (isset ($_POST['reply'])) { $reply = COM_applyFilter ($_POST['reply']); + } + if (isset ($_POST['page'])) { + $page = COM_applyFilter ($_REQUEST['page'], true); } } else { COM_setArgNames (array ('story', 'mode')); @@ -88,6 +92,9 @@ } if (isset ($_GET['reply'])) { $reply = COM_applyFilter ($_GET['reply']); + } + if (isset ($_GET['page'])) { + $page = COM_applyFilter ($_REQUEST['page'], true); } } From geeklog-cvs at lists.geeklog.net Fri Apr 17 16:44:25 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Fri, 17 Apr 2009 16:44:25 -0400 Subject: [geeklog-cvs] geeklog: Fixed SQL injection exploit in usersettings.php Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/71e0b093375c changeset: 6951:71e0b093375c user: vinny date: Fri Apr 17 14:42:28 2009 -0600 description: Fixed SQL injection exploit in usersettings.php See: http://www.milw0rm.com/exploits/8448 diffstat: 1 file changed, 16 insertions(+), 6 deletions(-) public_html/usersettings.php | 22 ++++++++++++++++------ diffs (51 lines): diff -r be9bbaaa4bf8 -r 71e0b093375c public_html/usersettings.php --- a/public_html/usersettings.php Thu Apr 16 23:39:31 2009 -0600 +++ b/public_html/usersettings.php Fri Apr 17 14:42:28 2009 -0600 @@ -1372,23 +1372,33 @@ } } - $TIDS = @array_values($A[$_TABLES['topics']]); - $AIDS = @array_values($A['selauthors']); - $BOXES = @array_values($A["{$_TABLES['blocks']}"]); - $ETIDS = @array_values($A['etids']); + $TIDS = @array_values($A[$_TABLES['topics']]); // array of strings + $AIDS = @array_values($A['selauthors']); // array of integers + $BOXES = @array_values($A["{$_TABLES['blocks']}"]); // array of integers + $ETIDS = @array_values($A['etids']); // array of strings + $AETIDS = USER_getAllowedTopics(); // array of strings (fetched, needed to "clean" $TIDS and $ETIDS) $tids = ''; if (sizeof ($TIDS) > 0) { - $tids = addslashes (implode (' ', $TIDS)); + // the array_intersect mitigates the need to scrub the TIDS input + $tids = addslashes (implode (' ', array_intersect ($AETIDS, $TIDS)); } $aids = ''; if (sizeof ($AIDS) > 0) { + // Scrub the AIDS array to prevent SQL injection and bad values + foreach ($AIDS as $key => $val) { + $AIDS[$key] = COM_applyFilter($val, true); + } $aids = addslashes (implode (' ', $AIDS)); } $selectedblocks = ''; if (count ($BOXES) > 0) { + // Scrub the BOXES array to prevent SQL injection and bad values + foreach ($BOXES as $key => $val) { + $BOXES[$key] = COM_applyFilter($val, true); + } $boxes = addslashes (implode (',', $BOXES)); $blockresult = DB_query("SELECT bid,name FROM {$_TABLES['blocks']} WHERE bid NOT IN ($boxes)"); @@ -1406,7 +1416,7 @@ $etids = ''; if (sizeof ($ETIDS) > 0) { - $AETIDS = USER_getAllowedTopics(); + // the array_intersect mitigates the need to scrub the ETIDS input $etids = addslashes (implode (' ', array_intersect ($AETIDS, $ETIDS))); } From geeklog-cvs at lists.geeklog.net Fri Apr 17 16:50:27 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Fri, 17 Apr 2009 16:50:27 -0400 Subject: [geeklog-cvs] geeklog: Fixed syntax error in usersettings.php Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/317c2bc8e5a5 changeset: 6952:317c2bc8e5a5 user: vinny date: Fri Apr 17 14:50:21 2009 -0600 description: Fixed syntax error in usersettings.php diffstat: 1 file changed, 1 insertion(+), 1 deletion(-) public_html/usersettings.php | 2 +- diffs (12 lines): diff -r 71e0b093375c -r 317c2bc8e5a5 public_html/usersettings.php --- a/public_html/usersettings.php Fri Apr 17 14:42:28 2009 -0600 +++ b/public_html/usersettings.php Fri Apr 17 14:50:21 2009 -0600 @@ -1381,7 +1381,7 @@ $tids = ''; if (sizeof ($TIDS) > 0) { // the array_intersect mitigates the need to scrub the TIDS input - $tids = addslashes (implode (' ', array_intersect ($AETIDS, $TIDS)); + $tids = addslashes (implode (' ', array_intersect ($AETIDS, $TIDS))); } $aids = ''; From geeklog-cvs at lists.geeklog.net Sat Apr 18 07:23:25 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sat, 18 Apr 2009 07:23:25 -0400 Subject: [geeklog-cvs] geeklog: Fixed SQL injection exploit in usersettings.php Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/bf1cdc081217 changeset: 6953:bf1cdc081217 user: vinny date: Fri Apr 17 14:42:28 2009 -0600 description: Fixed SQL injection exploit in usersettings.php diffstat: 1 file changed, 16 insertions(+), 6 deletions(-) public_html/usersettings.php | 22 ++++++++++++++++------ diffs (51 lines): diff -r fd8a6d903a70 -r bf1cdc081217 public_html/usersettings.php --- a/public_html/usersettings.php Mon Apr 13 16:46:20 2009 +0200 +++ b/public_html/usersettings.php Fri Apr 17 14:42:28 2009 -0600 @@ -1345,23 +1345,33 @@ } } - $TIDS = @array_values($A[$_TABLES['topics']]); - $AIDS = @array_values($A['selauthors']); - $BOXES = @array_values($A["{$_TABLES['blocks']}"]); - $ETIDS = @array_values($A['etids']); + $TIDS = @array_values($A[$_TABLES['topics']]); // array of strings + $AIDS = @array_values($A['selauthors']); // array of integers + $BOXES = @array_values($A["{$_TABLES['blocks']}"]); // array of integers + $ETIDS = @array_values($A['etids']); // array of strings + $AETIDS = USER_getAllowedTopics(); // array of strings (fetched, needed to "clean" $TIDS and $ETIDS) $tids = ''; if (sizeof ($TIDS) > 0) { - $tids = addslashes (implode (' ', $TIDS)); + // the array_intersect mitigates the need to scrub the TIDS input + $tids = addslashes (implode (' ', array_intersect ($AETIDS, $TIDS))); } $aids = ''; if (sizeof ($AIDS) > 0) { + // Scrub the AIDS array to prevent SQL injection and bad values + foreach ($AIDS as $key => $val) { + $AIDS[$key] = COM_applyFilter($val, true); + } $aids = addslashes (implode (' ', $AIDS)); } $selectedblocks = ''; if (count ($BOXES) > 0) { + // Scrub the BOXES array to prevent SQL injection and bad values + foreach ($BOXES as $key => $val) { + $BOXES[$key] = COM_applyFilter($val, true); + } $boxes = addslashes (implode (',', $BOXES)); $blockresult = DB_query("SELECT bid,name FROM {$_TABLES['blocks']} WHERE bid NOT IN ($boxes)"); @@ -1379,7 +1389,7 @@ $etids = ''; if (sizeof ($ETIDS) > 0) { - $AETIDS = USER_getAllowedTopics(); + // the array_intersect mitigates the need to scrub the ETIDS input $etids = addslashes (implode (' ', array_intersect ($AETIDS, $ETIDS))); } From geeklog-cvs at lists.geeklog.net Sat Apr 18 07:23:26 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sat, 18 Apr 2009 07:23:26 -0400 Subject: [geeklog-cvs] geeklog: Updated version numbers and list of changes Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/c8ee796a9cb9 changeset: 6954:c8ee796a9cb9 user: Dirk Haun date: Sat Apr 18 09:58:24 2009 +0200 description: Updated version numbers and list of changes diffstat: 4 files changed, 19 insertions(+), 3 deletions(-) public_html/admin/install/index.php | 2 +- public_html/docs/changes.html | 7 ++++++- public_html/docs/history | 11 +++++++++++ public_html/siteconfig.php.dist | 2 +- diffs (62 lines): diff -r bf1cdc081217 -r c8ee796a9cb9 public_html/admin/install/index.php --- a/public_html/admin/install/index.php Fri Apr 17 14:42:28 2009 -0600 +++ b/public_html/admin/install/index.php Sat Apr 18 09:58:24 2009 +0200 @@ -48,7 +48,7 @@ define("LB", "\n"); } if (!defined('VERSION')) { - define('VERSION', '1.5.2sr3'); + define('VERSION', '1.5.2sr4'); } if (!defined('XHTML')) { define('XHTML', ' /'); diff -r bf1cdc081217 -r c8ee796a9cb9 public_html/docs/changes.html --- a/public_html/docs/changes.html Fri Apr 17 14:42:28 2009 -0600 +++ b/public_html/docs/changes.html Sat Apr 18 09:58:24 2009 +0200 @@ -16,9 +16,14 @@ ChangeLog. The file docs/changed-files has a list of files that have been changed since the last release.

    +

    Geeklog 1.5.2sr4

    + +

    Bookoo of the Nine Situations Group posted another SQL injection exploit, targetting an old bug in usersettings.php. As with the previous issues, this allowed an attacker to extract the password hash for any account and is fixed with this release.

    + +

    Geeklog 1.5.2sr3

    -

    Bookoo of the Nine Situations Group posted another SQL injection exploit, this time targetting the webservices API. As with the previous issue, this allowed an attacker to extract the password hash for any account and is fixed with this release. +

    Bookoo of the Nine Situations Group posted another SQL injection exploit, this time targetting the webservices API. As with the previous issue, this allowed an attacker to extract the password hash for any account and is fixed with this release.

    Geeklog 1.5.2sr2

    diff -r bf1cdc081217 -r c8ee796a9cb9 public_html/docs/history --- a/public_html/docs/history Fri Apr 17 14:42:28 2009 -0600 +++ b/public_html/docs/history Sat Apr 18 09:58:24 2009 +0200 @@ -1,4 +1,15 @@ Geeklog History/Changes: + +Apr 18, 2009 (1.5.2sr4) +------------ + +This release addresses the following security issue: + +Bookoo of the Nine Situations Group posted another SQL injection exploit, +targetting an old bug in usersettings.php. As with the previous issues, this +allowed an attacker to extract the password hash for any account and is fixed +with this release. + Apr 13, 2009 (1.5.2sr3) ------------ diff -r bf1cdc081217 -r c8ee796a9cb9 public_html/siteconfig.php.dist --- a/public_html/siteconfig.php.dist Fri Apr 17 14:42:28 2009 -0600 +++ b/public_html/siteconfig.php.dist Sat Apr 18 09:58:24 2009 +0200 @@ -38,7 +38,7 @@ define('LB',"\n"); } if (!defined('VERSION')) { - define('VERSION', '1.5.2sr3'); + define('VERSION', '1.5.2sr4'); } ?> From geeklog-cvs at lists.geeklog.net Sat Apr 18 07:23:26 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sat, 18 Apr 2009 07:23:26 -0400 Subject: [geeklog-cvs] geeklog: Added tag geeklog_1_5_2sr4 for changeset c8ee796a9cb9 Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/5ff40e9528d9 changeset: 6955:5ff40e9528d9 user: Dirk Haun date: Sat Apr 18 10:00:36 2009 +0200 description: Added tag geeklog_1_5_2sr4 for changeset c8ee796a9cb9 diffstat: 1 file changed, 1 insertion(+) .hgtags | 1 + diffs (8 lines): diff -r c8ee796a9cb9 -r 5ff40e9528d9 .hgtags --- a/.hgtags Sat Apr 18 09:58:24 2009 +0200 +++ b/.hgtags Sat Apr 18 10:00:36 2009 +0200 @@ -5,3 +5,4 @@ e8be41d4f5d184142659a2d74b15e400e8c542a7 geeklog_1_5_2sr1 0e10ca8cf00c66e1fe3a91eae50b4a1c41f9f133 geeklog_1_5_2sr2 bd0dc021770325e55175a9caf131c4db336c7924 geeklog_1_5_2sr3 +c8ee796a9cb98bf61c9714c7b49733a003ea6ef7 geeklog_1_5_2sr4 From geeklog-cvs at lists.geeklog.net Sat Apr 18 07:24:54 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sat, 18 Apr 2009 07:24:54 -0400 Subject: [geeklog-cvs] tools: Geeklog 1.5.2sr4 is the current version now Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/03daab5f96b0 changeset: 32:03daab5f96b0 user: Dirk Haun date: Sat Apr 18 13:24:44 2009 +0200 description: Geeklog 1.5.2sr4 is the current version now diffstat: 1 file changed, 16 insertions(+), 15 deletions(-) versionchecker/versionchecker.php | 31 ++++++++++++++++--------------- diffs (49 lines): diff -r 489a17895656 -r 03daab5f96b0 versionchecker/versionchecker.php --- a/versionchecker/versionchecker.php Mon Apr 13 21:15:39 2009 +0200 +++ b/versionchecker/versionchecker.php Sat Apr 18 13:24:44 2009 +0200 @@ -9,7 +9,7 @@

    '1.3.11sr7-1', '1.3.11sr7' => '1.3.11sr7-1', */ - '1.4.0' => '1.5.2sr3', - '1.4.0sr1' => '1.5.2sr3', - '1.4.0sr2' => '1.5.2sr3', - '1.4.0sr3' => '1.5.2sr3', - '1.4.0sr4' => '1.5.2sr3', - '1.4.0sr5' => '1.5.2sr3', - '1.4.0sr5-1' => '1.5.2sr3', - '1.4.0sr6' => '1.5.2sr3', - '1.4.1' => '1.5.2sr3', + '1.4.0' => '1.5.2sr4', + '1.4.0sr1' => '1.5.2sr4', + '1.4.0sr2' => '1.5.2sr4', + '1.4.0sr3' => '1.5.2sr4', + '1.4.0sr4' => '1.5.2sr4', + '1.4.0sr5' => '1.5.2sr4', + '1.4.0sr5-1' => '1.5.2sr4', + '1.4.0sr6' => '1.5.2sr4', + '1.4.1' => '1.5.2sr4', - '1.5.0' => '1.5.2sr3', - '1.5.1' => '1.5.2sr3', - '1.5.2' => '1.5.2sr3', - '1.5.2sr1' => '1.5.2sr3', - '1.5.2sr2' => '1.5.2sr3' + '1.5.0' => '1.5.2sr4', + '1.5.1' => '1.5.2sr4', + '1.5.2' => '1.5.2sr4', + '1.5.2sr1' => '1.5.2sr4', + '1.5.2sr2' => '1.5.2sr4', + '1.5.2sr3' => '1.5.2sr4' ); $v = explode ('.', $version); From geeklog-cvs at lists.geeklog.net Sat Apr 18 07:28:04 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sat, 18 Apr 2009 07:28:04 -0400 Subject: [geeklog-cvs] geeklog: Synced list of changes with 1.5.2sr4 Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/c576291f3575 changeset: 6956:c576291f3575 user: Dirk Haun date: Sat Apr 18 13:27:50 2009 +0200 description: Synced list of changes with 1.5.2sr4 diffstat: 2 files changed, 16 insertions(+) public_html/docs/changes.html | 5 +++++ public_html/docs/history | 11 +++++++++++ diffs (36 lines): diff -r 317c2bc8e5a5 -r c576291f3575 public_html/docs/changes.html --- a/public_html/docs/changes.html Fri Apr 17 14:50:21 2009 -0600 +++ b/public_html/docs/changes.html Sat Apr 18 13:27:50 2009 +0200 @@ -35,6 +35,11 @@
  • The minimum PHP version required by Geeklog is now PHP 4.3.0. Given that the PHP team ended support for PHP 4 in August 2008, you should be looking into upgrading to PHP 5 anyway.
  • + + +

    Geeklog 1.5.2sr4

    + +

    Bookoo of the Nine Situations Group posted another SQL injection exploit, targetting an old bug in usersettings.php. As with the previous issues, this allowed an attacker to extract the password hash for any account and is fixed with this release.

    Geeklog 1.5.2sr3

    diff -r 317c2bc8e5a5 -r c576291f3575 public_html/docs/history --- a/public_html/docs/history Fri Apr 17 14:50:21 2009 -0600 +++ b/public_html/docs/history Sat Apr 18 13:27:50 2009 +0200 @@ -143,6 +143,17 @@ now [Dirk] - Display "successfully saved" and "successfully deleted" messages, just like every other plugin and built-in function does (bug #0000644) [Dirk] + + +Apr 18, 2009 (1.5.2sr4) +------------ + +This release addresses the following security issue: + +Bookoo of the Nine Situations Group posted another SQL injection exploit, +targetting an old bug in usersettings.php. As with the previous issues, this +allowed an attacker to extract the password hash for any account and is fixed +with this release. Apr 13, 2009 (1.5.2sr3) From geeklog-cvs at lists.geeklog.net Sat Apr 18 13:51:03 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sat, 18 Apr 2009 13:51:03 -0400 Subject: [geeklog-cvs] geeklog: Can't think of a good reason to index usersettings.php Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/39ae3400a1ae changeset: 6957:39ae3400a1ae user: Dirk Haun date: Sat Apr 18 14:02:32 2009 +0200 description: Can't think of a good reason to index usersettings.php diffstat: 1 file changed, 1 insertion(+) public_html/robots.txt | 1 + diffs (8 lines): diff -r c576291f3575 -r 39ae3400a1ae public_html/robots.txt --- a/public_html/robots.txt Sat Apr 18 13:27:50 2009 +0200 +++ b/public_html/robots.txt Sat Apr 18 14:02:32 2009 +0200 @@ -3,3 +3,4 @@ Disallow: /pingback.php Disallow: /submit.php Disallow: /trackback.php +Disallow: /usersettings.php From geeklog-cvs at lists.geeklog.net Sat Apr 18 13:51:04 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sat, 18 Apr 2009 13:51:04 -0400 Subject: [geeklog-cvs] geeklog: Moved documentation to docs/english so that it can be t... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/0774a19f037c changeset: 6958:0774a19f037c user: Dirk Haun date: Sat Apr 18 19:46:23 2009 +0200 description: Moved documentation to docs/english so that it can be translated (feature request #0000770) diffstat: 83 files changed, 6910 insertions(+), 6751 deletions(-) INSTALL | 2 plugins/calendar/functions.inc | 15 plugins/links/functions.inc | 15 plugins/polls/functions.inc | 15 plugins/spamx/functions.inc | 15 plugins/staticpages/functions.inc | 15 plugins/staticpages/language/czech.php | 4 plugins/staticpages/language/czech_utf-8.php | 4 plugins/staticpages/language/danish.php | 4 plugins/staticpages/language/danish_utf-8.php | 4 plugins/staticpages/language/dutch.php | 4 plugins/staticpages/language/dutch_utf-8.php | 4 plugins/staticpages/language/english.php | 2 plugins/staticpages/language/english_utf-8.php | 2 plugins/staticpages/language/estonian.php | 4 plugins/staticpages/language/estonian_utf-8.php | 4 plugins/staticpages/language/french_canada.php | 4 plugins/staticpages/language/french_canada_utf-8.php | 4 plugins/staticpages/language/german.php | 4 plugins/staticpages/language/german_formal.php | 4 plugins/staticpages/language/german_formal_utf-8.php | 4 plugins/staticpages/language/german_utf-8.php | 4 plugins/staticpages/language/hebrew_utf-8.php | 4 plugins/staticpages/language/italian.php | 4 plugins/staticpages/language/italian_utf-8.php | 4 plugins/staticpages/language/japanese_utf-8.php | 4 plugins/staticpages/language/korean.php | 4 plugins/staticpages/language/korean_utf-8.php | 4 plugins/staticpages/language/polish.php | 4 plugins/staticpages/language/polish_utf-8.php | 4 plugins/staticpages/language/portuguese_brazil.php | 4 plugins/staticpages/language/portuguese_brazil_utf-8.php | 4 plugins/staticpages/language/slovenian.php | 4 plugins/staticpages/language/slovenian_utf-8.php | 4 plugins/staticpages/language/spanish.php | 4 plugins/staticpages/language/spanish_utf-8.php | 4 plugins/staticpages/language/swedish.php | 4 plugins/staticpages/language/swedish_utf-8.php | 4 plugins/staticpages/language/turkish.php | 4 plugins/staticpages/language/turkish_utf-8.php | 4 plugins/staticpages/language/ukrainian.php | 4 plugins/staticpages/language/ukrainian_koi8-u.php | 4 plugins/staticpages/language/ukrainian_utf-8.php | 4 public_html/admin/install/configinfo.php | 4 public_html/admin/install/index.php | 4 public_html/admin/moderation.php | 16 public_html/admin/plugins/spamx/index.php | 2 public_html/admin/sectest.php | 6 public_html/admin/trackback.php | 78 public_html/docs/calendar.html | 131 - public_html/docs/changes.html | 1306 ----------- public_html/docs/config.html | 1616 -------------- public_html/docs/english/calendar.html | 131 + public_html/docs/english/changes.html | 1306 +++++++++++ public_html/docs/english/config.html | 1616 ++++++++++++++ public_html/docs/english/index.html | 137 + public_html/docs/english/install.html | 237 ++ public_html/docs/english/links.html | 167 + public_html/docs/english/plugin.html | 567 ++++ public_html/docs/english/polls.html | 133 + public_html/docs/english/spamx.html | 332 ++ public_html/docs/english/staticpages.html | 235 ++ public_html/docs/english/support.html | 104 public_html/docs/english/theme.html | 1105 +++++++++ public_html/docs/english/themevars.html | 418 +++ public_html/docs/english/trackback.html | 110 public_html/docs/history | 2 public_html/docs/index.html | 137 - public_html/docs/install.html | 237 -- public_html/docs/links.html | 167 - public_html/docs/plugin.html | 567 ---- public_html/docs/polls.html | 133 - public_html/docs/spamx.html | 332 -- public_html/docs/staticpages.html | 235 -- public_html/docs/support.html | 104 public_html/docs/theme.html | 1105 --------- public_html/docs/themevars.html | 418 --- public_html/docs/trackback.html | 110 public_html/lib-common.php | 44 readme | 19 sql/mssql_tableanddata.php | 4 sql/mysql_tableanddata.php | 4 system/classes/config.class.php | 61 diffs (truncated from 14652 to 300 lines): diff -r 39ae3400a1ae -r 0774a19f037c INSTALL --- a/INSTALL Sat Apr 18 14:02:32 2009 +0200 +++ b/INSTALL Sat Apr 18 19:46:23 2009 +0200 @@ -1,7 +1,7 @@ Installation instructions for Geeklog can be found in the docs directory, specifically in - public_html/docs/install.html + public_html/docs/english/install.html That document also includes a section on common installation problems. diff -r 39ae3400a1ae -r 0774a19f037c plugins/calendar/functions.inc --- a/plugins/calendar/functions.inc Sat Apr 18 14:02:32 2009 +0200 +++ b/plugins/calendar/functions.inc Sat Apr 18 19:46:23 2009 +0200 @@ -1912,10 +1912,23 @@ { global $_CONF; + static $docurl; + switch ($file) { case 'index': case 'config': - $retval = $_CONF['site_url'] . '/docs/calendar.html'; + if (isset($docurl)) { + $retval = $docurl; + } else { + $doclang = COM_getLanguageName(); + $docs = 'docs/' . $doclang . '/calendar.html'; + if (file_exists($_CONF['path_html'] . $docs)) { + $retval = $_CONF['site_url'] . '/' . $docs; + } else { + $retval = $_CONF['site_url'] . '/docs/english/calendar.html'; + } + $docurl = $retval; + } break; default: diff -r 39ae3400a1ae -r 0774a19f037c plugins/links/functions.inc --- a/plugins/links/functions.inc Sat Apr 18 14:02:32 2009 +0200 +++ b/plugins/links/functions.inc Sat Apr 18 19:46:23 2009 +0200 @@ -1639,10 +1639,23 @@ { global $_CONF; + static $docurl; + switch ($file) { case 'index': case 'config': - $retval = $_CONF['site_url'] . '/docs/links.html'; + if (isset($docurl)) { + $retval = $docurl; + } else { + $doclang = COM_getLanguageName(); + $docs = 'docs/' . $doclang . '/links.html'; + if (file_exists($_CONF['path_html'] . $docs)) { + $retval = $_CONF['site_url'] . '/' . $docs; + } else { + $retval = $_CONF['site_url'] . '/docs/english/links.html'; + } + $docurl = $retval; + } break; default: diff -r 39ae3400a1ae -r 0774a19f037c plugins/polls/functions.inc --- a/plugins/polls/functions.inc Sat Apr 18 14:02:32 2009 +0200 +++ b/plugins/polls/functions.inc Sat Apr 18 19:46:23 2009 +0200 @@ -1332,10 +1332,23 @@ { global $_CONF; + static $docurl; + switch ($file) { case 'index': case 'config': - $retval = $_CONF['site_url'] . '/docs/polls.html'; + if (isset($docurl)) { + $retval = $docurl; + } else { + $doclang = COM_getLanguageName(); + $docs = 'docs/' . $doclang . '/polls.html'; + if (file_exists($_CONF['path_html'] . $docs)) { + $retval = $_CONF['site_url'] . '/' . $docs; + } else { + $retval = $_CONF['site_url'] . '/docs/english/polls.html'; + } + $docurl = $retval; + } break; default: diff -r 39ae3400a1ae -r 0774a19f037c plugins/spamx/functions.inc --- a/plugins/spamx/functions.inc Sat Apr 18 14:02:32 2009 +0200 +++ b/plugins/spamx/functions.inc Sat Apr 18 19:46:23 2009 +0200 @@ -401,10 +401,23 @@ { global $_CONF; + static $docurl; + switch ($file) { case 'index': case 'config': - $retval = $_CONF['site_url'] . '/docs/spamx.html'; + if (isset($docurl)) { + $retval = $docurl; + } else { + $doclang = COM_getLanguageName(); + $docs = 'docs/' . $doclang . '/spamx.html'; + if (file_exists($_CONF['path_html'] . $docs)) { + $retval = $_CONF['site_url'] . '/' . $docs; + } else { + $retval = $_CONF['site_url'] . '/docs/english/spamx.html'; + } + $docurl = $retval; + } break; default: diff -r 39ae3400a1ae -r 0774a19f037c plugins/staticpages/functions.inc --- a/plugins/staticpages/functions.inc Sat Apr 18 14:02:32 2009 +0200 +++ b/plugins/staticpages/functions.inc Sat Apr 18 19:46:23 2009 +0200 @@ -1342,10 +1342,23 @@ { global $_CONF; + static $docurl; + switch ($file) { case 'index': case 'config': - $retval = $_CONF['site_url'] . '/docs/staticpages.html'; + if (isset($docurl)) { + $retval = $docurl; + } else { + $doclang = COM_getLanguageName(); + $docs = 'docs/' . $doclang . '/staticpages.html'; + if (file_exists($_CONF['path_html'] . $docs)) { + $retval = $_CONF['site_url'] . '/' . $docs; + } else { + $retval = $_CONF['site_url'] . '/docs/english/staticpages.html'; + } + $docurl = $retval; + } break; default: diff -r 39ae3400a1ae -r 0774a19f037c plugins/staticpages/language/czech.php --- a/plugins/staticpages/language/czech.php Sat Apr 18 14:02:32 2009 +0200 +++ b/plugins/staticpages/language/czech.php Sat Apr 18 19:46:23 2009 +0200 @@ -102,7 +102,7 @@ 'select_php_none' => 'do not execute PHP', 'select_php_return' => 'execute PHP (return)', 'select_php_free' => 'execute PHP', - 'php_not_activated' => "The use of PHP in static pages is not activated. Please see the documentation for details.", + 'php_not_activated' => "The use of PHP in static pages is not activated. Please see the documentation for details.", 'printable_format' => 'Printable Format', 'copy' => 'Copy', 'limit_results' => 'Limit Results', @@ -157,4 +157,4 @@ 12 => array('No access' => 0, 'Read-Only' => 2, 'Read-Write' => 3) ); -?> \ No newline at end of file +?> diff -r 39ae3400a1ae -r 0774a19f037c plugins/staticpages/language/czech_utf-8.php --- a/plugins/staticpages/language/czech_utf-8.php Sat Apr 18 14:02:32 2009 +0200 +++ b/plugins/staticpages/language/czech_utf-8.php Sat Apr 18 19:46:23 2009 +0200 @@ -102,7 +102,7 @@ 'select_php_none' => 'do not execute PHP', 'select_php_return' => 'execute PHP (return)', 'select_php_free' => 'execute PHP', - 'php_not_activated' => "The use of PHP in static pages is not activated. Please see the documentation for details.", + 'php_not_activated' => "The use of PHP in static pages is not activated. Please see the documentation for details.", 'printable_format' => 'Printable Format', 'copy' => 'Copy', 'limit_results' => 'Limit Results', @@ -157,4 +157,4 @@ 12 => array('No access' => 0, 'Read-Only' => 2, 'Read-Write' => 3) ); -?> \ No newline at end of file +?> diff -r 39ae3400a1ae -r 0774a19f037c plugins/staticpages/language/danish.php --- a/plugins/staticpages/language/danish.php Sat Apr 18 14:02:32 2009 +0200 +++ b/plugins/staticpages/language/danish.php Sat Apr 18 19:46:23 2009 +0200 @@ -103,7 +103,7 @@ 'select_php_none' => 'do not execute PHP', 'select_php_return' => 'execute PHP (return)', 'select_php_free' => 'execute PHP', - 'php_not_activated' => "The use of PHP in static pages is not activated. Please see the documentation for details.", + 'php_not_activated' => "The use of PHP in static pages is not activated. Please see the documentation for details.", 'printable_format' => 'Printable Format', 'copy' => 'Copy', 'limit_results' => 'Limit Results', @@ -158,4 +158,4 @@ 12 => array('No access' => 0, 'Read-Only' => 2, 'Read-Write' => 3) ); -?> \ No newline at end of file +?> diff -r 39ae3400a1ae -r 0774a19f037c plugins/staticpages/language/danish_utf-8.php --- a/plugins/staticpages/language/danish_utf-8.php Sat Apr 18 14:02:32 2009 +0200 +++ b/plugins/staticpages/language/danish_utf-8.php Sat Apr 18 19:46:23 2009 +0200 @@ -103,7 +103,7 @@ 'select_php_none' => 'do not execute PHP', 'select_php_return' => 'execute PHP (return)', 'select_php_free' => 'execute PHP', - 'php_not_activated' => "The use of PHP in static pages is not activated. Please see the documentation for details.", + 'php_not_activated' => "The use of PHP in static pages is not activated. Please see the documentation for details.", 'printable_format' => 'Printable Format', 'copy' => 'Copy', 'limit_results' => 'Limit Results', @@ -158,4 +158,4 @@ 12 => array('No access' => 0, 'Read-Only' => 2, 'Read-Write' => 3) ); -?> \ No newline at end of file +?> diff -r 39ae3400a1ae -r 0774a19f037c plugins/staticpages/language/dutch.php --- a/plugins/staticpages/language/dutch.php Sat Apr 18 14:02:32 2009 +0200 +++ b/plugins/staticpages/language/dutch.php Sat Apr 18 19:46:23 2009 +0200 @@ -104,7 +104,7 @@ 'select_php_none' => 'maak het uitvoeren van PHP onmogelijk', 'select_php_return' => 'uitvoeren van PHP (return)', 'select_php_free' => 'voer PHP uit', - 'php_not_activated' => "Het gebruik van PHP in Static Pages is niet geactiveerd. Bekijk de documentatie voor meer bijzonderheden.", + 'php_not_activated' => "Het gebruik van PHP in Static Pages is niet geactiveerd. Bekijk de documentatie voor meer bijzonderheden.", 'printable_format' => 'Printbare versie', 'copy' => 'Copy', 'limit_results' => 'Limit Results', @@ -159,4 +159,4 @@ 12 => array('No access' => 0, 'Read-Only' => 2, 'Read-Write' => 3) ); -?> \ No newline at end of file +?> diff -r 39ae3400a1ae -r 0774a19f037c plugins/staticpages/language/dutch_utf-8.php --- a/plugins/staticpages/language/dutch_utf-8.php Sat Apr 18 14:02:32 2009 +0200 +++ b/plugins/staticpages/language/dutch_utf-8.php Sat Apr 18 19:46:23 2009 +0200 @@ -104,7 +104,7 @@ 'select_php_none' => 'maak het uitvoeren van PHP onmogelijk', 'select_php_return' => 'uitvoeren van PHP (return)', 'select_php_free' => 'voer PHP uit', - 'php_not_activated' => "Het gebruik van PHP in Static Pages is niet geactiveerd. Bekijk de documentatie voor meer bijzonderheden.", + 'php_not_activated' => "Het gebruik van PHP in Static Pages is niet geactiveerd. Bekijk de documentatie voor meer bijzonderheden.", 'printable_format' => 'Printbare versie', 'copy' => 'Copy', 'limit_results' => 'Limit Results', @@ -159,4 +159,4 @@ 12 => array('No access' => 0, 'Read-Only' => 2, 'Read-Write' => 3) ); -?> \ No newline at end of file +?> diff -r 39ae3400a1ae -r 0774a19f037c plugins/staticpages/language/english.php --- a/plugins/staticpages/language/english.php Sat Apr 18 14:02:32 2009 +0200 +++ b/plugins/staticpages/language/english.php Sat Apr 18 19:46:23 2009 +0200 @@ -102,7 +102,7 @@ 'select_php_none' => 'do not execute PHP', 'select_php_return' => 'execute PHP (return)', 'select_php_free' => 'execute PHP', - 'php_not_activated' => 'The use of PHP in static pages is not activated. Please see the documentation for details.', + 'php_not_activated' => 'The use of PHP in static pages is not activated. Please see the documentation for details.', 'printable_format' => 'Printable Format', 'edit' => 'Edit', 'copy' => 'Copy', diff -r 39ae3400a1ae -r 0774a19f037c plugins/staticpages/language/english_utf-8.php --- a/plugins/staticpages/language/english_utf-8.php Sat Apr 18 14:02:32 2009 +0200 +++ b/plugins/staticpages/language/english_utf-8.php Sat Apr 18 19:46:23 2009 +0200 @@ -102,7 +102,7 @@ 'select_php_none' => 'do not execute PHP', 'select_php_return' => 'execute PHP (return)', 'select_php_free' => 'execute PHP', - 'php_not_activated' => 'The use of PHP in static pages is not activated. Please see the documentation for details.', + 'php_not_activated' => 'The use of PHP in static pages is not activated. Please see the documentation for details.', 'printable_format' => 'Printable Format', 'edit' => 'Edit', 'copy' => 'Copy', diff -r 39ae3400a1ae -r 0774a19f037c plugins/staticpages/language/estonian.php --- a/plugins/staticpages/language/estonian.php Sat Apr 18 14:02:32 2009 +0200 +++ b/plugins/staticpages/language/estonian.php Sat Apr 18 19:46:23 2009 +0200 @@ -104,7 +104,7 @@ 'select_php_none' => '?ra k?ivita PHP', 'select_php_return' => 'k?ivita PHP (return)', 'select_php_free' => 'k?ivita PHP', - 'php_not_activated' => "Staatilistel lehtedel pole PHP kasutamine sisse l?litatud. T?psemat infot palun vaata dokumentatsioonist.", + 'php_not_activated' => "Staatilistel lehtedel pole PHP kasutamine sisse l?litatud. T?psemat infot palun vaata dokumentatsioonist.", 'printable_format' => 'Prinditaval kujul', From geeklog-cvs at lists.geeklog.net Sat Apr 18 15:10:53 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sat, 18 Apr 2009 15:10:53 -0400 Subject: [geeklog-cvs] geeklog: More missing finish() calls (cf. bug #0000855) Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/a9694bc60a1a changeset: 6959:a9694bc60a1a user: Dirk Haun date: Sat Apr 18 21:10:04 2009 +0200 description: More missing finish() calls (cf. bug #0000855) diffstat: 5 files changed, 42 insertions(+), 19 deletions(-) public_html/admin/plugins.php | 6 +++++- public_html/admin/user.php | 23 ++++++++++++++++++++--- public_html/docs/history | 2 ++ public_html/lib-common.php | 20 ++++++++++---------- system/lib-comment.php | 10 +++++----- diffs (159 lines): diff -r 0774a19f037c -r a9694bc60a1a public_html/admin/plugins.php --- a/public_html/admin/plugins.php Sat Apr 18 19:46:23 2009 +0200 +++ b/public_html/admin/plugins.php Sat Apr 18 21:10:04 2009 +0200 @@ -43,6 +43,10 @@ * Geeklog common function library */ require_once '../lib-common.php'; + +/** +* Security check to ensure user even belongs on this page +*/ require_once 'auth.inc.php'; // Uncomment the line below if you need to debug the HTTP variables being passed @@ -161,7 +165,7 @@ $plg_templates->set_var('end_block', COM_endBlock (COM_getBlockTemplate ('_admin_block', 'footer'))); - $retval .= $plg_templates->parse('output', 'editor'); + $retval .= $plg_templates->finish($plg_templates->parse('output', 'editor')); return $retval; } diff -r 0774a19f037c -r a9694bc60a1a public_html/admin/user.php --- a/public_html/admin/user.php Sat Apr 18 19:46:23 2009 +0200 +++ b/public_html/admin/user.php Sat Apr 18 21:10:04 2009 +0200 @@ -33,10 +33,25 @@ // +---------------------------------------------------------------------------+ /** +* User administration: Manage users (create, delete, import) and their +* group membership. +* +*/ + +/** * Geeklog common function library */ require_once '../lib-common.php'; + +/** +* Security check to ensure user even belongs on this page +*/ + require_once 'auth.inc.php'; + +/** +* User-related functions +*/ require_once $_CONF['path_system'] . 'lib-user.php'; // Set this to true to get various debug messages from this script @@ -819,7 +834,7 @@ $user_templates->set_var('action_reminder', $LANG28[78]); $user_templates->parse('test', 'reminder'); - $form_arr['top'] = $user_templates->get_var('test'); + $form_arr['top'] = $user_templates->finish($user_templates->get_var('test')); $token = SEC_createToken(); $form_arr['bottom'] = ""; @@ -911,8 +926,8 @@ $template->set_var ('name', COM_getDisplayName ($uid)); $template->set_var ('lastlogin', $lasttime[0]); - $template->parse ('output', 'mail'); - $mailtext = $template->get_var ('output'); + $template->parse('output', 'mail'); + $mailtext = $template->finish($template->get_var('output')); } else { if ($lastlogin == 0) { $mailtext = $LANG28[83] . "\n\n"; @@ -1094,6 +1109,8 @@ global $_CONF, $LANG28, $LANG_ADMIN, $_IMAGE_TYPE; require_once $_CONF['path_system'] . 'lib-admin.php'; + + $retval = ''; $token = SEC_createToken(); $retval .= COM_siteHeader('menu', $LANG28[24]); diff -r 0774a19f037c -r a9694bc60a1a public_html/docs/history --- a/public_html/docs/history Sat Apr 18 19:46:23 2009 +0200 +++ b/public_html/docs/history Sat Apr 18 21:10:04 2009 +0200 @@ -11,6 +11,8 @@ + Comment moderation and editable comments, by Jared Wenerd Other changes: +- Added missing finish() calls for some templates, e.g. header.thtml + (bug #0000855) [Dirk] - Moved documentation to docs/english so that it can be translated (feature request #0000770) [Dirk] - New plugin API function PLG_pluginStateChange [Dirk] diff -r 0774a19f037c -r a9694bc60a1a public_html/lib-common.php --- a/public_html/lib-common.php Sat Apr 18 19:46:23 2009 +0200 +++ b/public_html/lib-common.php Sat Apr 18 21:10:04 2009 +0200 @@ -2313,8 +2313,8 @@ $usermenu->set_var( 'option_label', $LANG01[19] ); $usermenu->set_var( 'option_count', '' ); $usermenu->set_var( 'option_url', $url ); - $retval .= $usermenu->parse( 'item', 'option' ); - $retval .= COM_endBlock( COM_getBlockTemplate( 'user_block', 'footer', $position )); + $retval .= $usermenu->finish($usermenu->parse('item', 'option')); + $retval .= COM_endBlock(COM_getBlockTemplate('user_block', 'footer', $position)); } else { @@ -2387,8 +2387,8 @@ $login->set_var('openid_login', ''); } - $retval .= $login->parse( 'output', 'form' ); - $retval .= COM_endBlock( COM_getBlockTemplate( 'user_block', 'footer', $position )); + $retval .= $login->finish($login->parse('output', 'form')); + $retval .= COM_endBlock( COM_getBlockTemplate('user_block', 'footer', $position)); } return $retval; @@ -2745,12 +2745,12 @@ } $url = $_CONF['site_admin_url'] . '/moderation.php'; - $adminmenu->set_var( 'option_url', $url ); - $adminmenu->set_var( 'option_label', $LANG01[10] ); - $adminmenu->set_var( 'option_count', COM_numberFormat( $modnum )); - $menu_item = $adminmenu->parse( 'item', - ( $thisUrl == $url ) ? 'current' : 'option' ); - $link_array = array( $menu_item ) + $link_array; + $adminmenu->set_var('option_url', $url); + $adminmenu->set_var('option_label', $LANG01[10]); + $adminmenu->set_var('option_count', COM_numberFormat($modnum)); + $menu_item = $adminmenu->finish($adminmenu->parse('item', + ($thisUrl == $url) ? 'current' : 'option')); + $link_array = array($menu_item) + $link_array; foreach( $link_array as $link ) { diff -r 0774a19f037c -r a9694bc60a1a system/lib-comment.php --- a/system/lib-comment.php Sat Apr 18 19:46:23 2009 +0200 +++ b/system/lib-comment.php Sat Apr 18 21:10:04 2009 +0200 @@ -712,13 +712,13 @@ $delete_option, false, $ccode ); // Pagination - $tot_pages = ceil( $count / $limit ); + $tot_pages = ceil($count / $limit); $pLink = $_CONF['site_url'] . "/article.php?story=$sid&type=$type&order=$order&mode=$mode"; - $template->set_var( 'pagenav', - COM_printPageNavigation($pLink, $page, $tot_pages)); + $template->set_var('pagenav', + COM_printPageNavigation($pLink, $page, $tot_pages)); - $template->set_var( 'comments', $thecomments ); - $retval = $template->parse( 'output', 'commentarea' ); + $template->set_var('comments', $thecomments); + $retval = $template->finish($template->parse('output', 'commentarea')); } return $retval; From geeklog-cvs at lists.geeklog.net Sat Apr 18 16:46:29 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sat, 18 Apr 2009 16:46:29 -0400 Subject: [geeklog-cvs] geeklog: Fixed wrong use of COM_allowedHTML and COM_checkHTML in... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/2e3298a69f73 changeset: 6960:2e3298a69f73 user: Dirk Haun date: Sat Apr 18 22:10:44 2009 +0200 description: Fixed wrong use of COM_allowedHTML and COM_checkHTML in plugins (bug #0000785) diffstat: 9 files changed, 73 insertions(+), 51 deletions(-) plugins/staticpages/services.inc.php | 2 public_html/admin/plugins/calendar/index.php | 27 +++++----- public_html/admin/plugins/links/category.php | 6 +- public_html/admin/plugins/links/index.php | 7 +- public_html/admin/plugins/staticpages/index.php | 9 ++- public_html/admin/story.php | 3 - public_html/docs/history | 4 + system/classes/story.class.php | 4 - system/lib-comment.php | 62 ++++++++++++----------- diffs (truncated from 307 to 300 lines): diff -r a9694bc60a1a -r 2e3298a69f73 plugins/staticpages/services.inc.php --- a/plugins/staticpages/services.inc.php Sat Apr 18 21:10:04 2009 +0200 +++ b/plugins/staticpages/services.inc.php Sat Apr 18 22:10:44 2009 +0200 @@ -353,7 +353,7 @@ $sp_title = COM_checkWords ($sp_title); } if ($_SP_CONF['filter_html'] == 1) { - $sp_content = COM_checkHTML ($sp_content); + $sp_content = COM_checkHTML($sp_content, 'staticpages.edit'); } $sp_title = strip_tags ($sp_title); $sp_label = strip_tags ($sp_label); diff -r a9694bc60a1a -r 2e3298a69f73 public_html/admin/plugins/calendar/index.php --- a/public_html/admin/plugins/calendar/index.php Sat Apr 18 21:10:04 2009 +0200 +++ b/public_html/admin/plugins/calendar/index.php Sat Apr 18 22:10:44 2009 +0200 @@ -87,7 +87,8 @@ $event_templates->set_var('site_url', $_CONF['site_url']); $event_templates->set_var('site_admin_url', $_CONF['site_admin_url']); $event_templates->set_var('layout_url',$_CONF['layout_url']); - $event_templates->set_var('lang_allowed_html', COM_allowedHTML()); + $event_templates->set_var('lang_allowed_html', + COM_allowedHTML('calendar.edit')); $event_templates->set_var('lang_postmode', $LANG_CAL_ADMIN[3]); if ($mode <> 'editsubmission' AND !empty($A['eid'])) { @@ -463,20 +464,22 @@ // clean 'em up if ($postmode == 'html') { - $description = COM_checkHTML (COM_checkWords ($description)); + $description = COM_checkHTML(COM_checkWords($description), + 'calendar.edit'); } else { $postmode = 'plaintext'; - $description = htmlspecialchars (COM_checkWords ($description)); + $description = htmlspecialchars(COM_checkWords($description)); } - $description = addslashes ($description); - $title = addslashes (COM_checkHTML (COM_checkWords ($title))); - $location = addslashes (COM_checkHTML (COM_checkWords ($location))); - $address1 = addslashes (COM_checkHTML (COM_checkWords ($address1))); - $address2 = addslashes (COM_checkHTML (COM_checkWords ($address2))); - $city = addslashes (COM_checkHTML (COM_checkWords ($city))); - $zipcode = addslashes (COM_checkHTML (COM_checkWords ($zipcode))); - $event_type = addslashes (strip_tags (COM_checkWords ($event_type))); - $url = addslashes (strip_tags ($url)); + $description = addslashes($description); + $title = addslashes(strip_tags(COM_checkWords($title))); + $location = addslashes(COM_checkHTML(COM_checkWords($location), + 'calendar.edit')); + $address1 = addslashes(strip_tags(COM_checkWords($address1))); + $address2 = addslashes(strip_tags(COM_checkWords($address2))); + $city = addslashes(strip_tags(COM_checkWords($city))); + $zipcode = addslashes(strip_tags(COM_checkWords($zipcode))); + $event_type = addslashes(strip_tags(COM_checkWords($event_type))); + $url = addslashes(strip_tags($url)); if ($allday == 0) { // Add 12 to make time on 24 hour clock if needed diff -r a9694bc60a1a -r 2e3298a69f73 public_html/admin/plugins/links/category.php --- a/public_html/admin/plugins/links/category.php Sat Apr 18 21:10:04 2009 +0200 +++ b/public_html/admin/plugins/links/category.php Sat Apr 18 22:10:44 2009 +0200 @@ -316,8 +316,10 @@ } // clean 'em up - $description = addslashes(COM_checkHTML(COM_checkWords($description))); - $category = addslashes(COM_checkHTML(COM_checkWords($category))); + $description = addslashes(COM_checkHTML(COM_checkWords($description), + 'links.edit')); + $category = addslashes(COM_checkHTML(COM_checkWords($category), + 'links.edit')); $pid = addslashes(strip_tags($pid)); $cid = addslashes(strip_tags($cid)); $old_cid = addslashes(strip_tags($old_cid)); diff -r a9694bc60a1a -r 2e3298a69f73 public_html/admin/plugins/links/index.php --- a/public_html/admin/plugins/links/index.php Sat Apr 18 21:10:04 2009 +0200 +++ b/public_html/admin/plugins/links/index.php Sat Apr 18 22:10:44 2009 +0200 @@ -254,9 +254,10 @@ } // clean 'em up - $description = addslashes (COM_checkHTML (COM_checkWords ($description))); - $title = addslashes (COM_checkHTML (COM_checkWords ($title))); - $cid = addslashes ($cid); + $description = addslashes(COM_checkHTML(COM_checkWords($description), + 'links.edit')); + $title = addslashes(strip_tags(COM_checkWords($title))); + $cid = addslashes($cid); if (empty ($owner_id)) { // this is new link from admin, set default values diff -r a9694bc60a1a -r 2e3298a69f73 public_html/admin/plugins/staticpages/index.php --- a/public_html/admin/plugins/staticpages/index.php Sat Apr 18 21:10:04 2009 +0200 +++ b/public_html/admin/plugins/staticpages/index.php Sat Apr 18 22:10:44 2009 +0200 @@ -362,9 +362,11 @@ } $sp_template->set_var('sp_content', $content); if ($_SP_CONF['filter_html'] == 1) { - $sp_template->set_var('lang_allowedhtml', COM_allowedHTML()); + $sp_template->set_var('lang_allowedhtml', + COM_allowedHTML('staticpages.edit')); } else { - $sp_template->set_var('lang_allowedhtml', $LANG_STATIC['all_html_allowed']); + $sp_template->set_var('lang_allowedhtml', + $LANG_STATIC['all_html_allowed']); } $sp_template->set_var ('lang_hits', $LANG_STATIC['hits']); if (empty ($A['sp_hits'])) { @@ -476,7 +478,8 @@ if (empty ($A['unixdate'])) { $A['unixdate'] = time (); } - $A['sp_content'] = COM_checkHTML (COM_checkWords ($A['sp_content'])); + $A['sp_content'] = COM_checkHTML(COM_checkWords($A['sp_content']), + 'staticpages.edit'); } if (isset ($A['sp_title'])) { $A['sp_title'] = strip_tags ($A['sp_title']); diff -r a9694bc60a1a -r 2e3298a69f73 public_html/admin/story.php --- a/public_html/admin/story.php Sat Apr 18 21:10:04 2009 +0200 +++ b/public_html/admin/story.php Sat Apr 18 22:10:44 2009 +0200 @@ -660,7 +660,8 @@ } } $story_templates->set_var('post_options',$post_options ); - $story_templates->set_var('lang_allowed_html', COM_allowedHTML()); + $story_templates->set_var('lang_allowed_html', + COM_allowedHTML('story.edit')); $fileinputs = ''; $saved_images = ''; if ($_CONF['maximagesperarticle'] > 0) { diff -r a9694bc60a1a -r 2e3298a69f73 public_html/docs/history --- a/public_html/docs/history Sat Apr 18 21:10:04 2009 +0200 +++ b/public_html/docs/history Sat Apr 18 22:10:44 2009 +0200 @@ -11,6 +11,10 @@ + Comment moderation and editable comments, by Jared Wenerd Other changes: +- Fixed wrong use of COM_allowedHTML and COM_checkHTML in plugins: Functions + were called without specific permissions, so they defaulted to 'story.edit'. + I.e. as a Story Admin, you could use the admin_html set in events, but as a + Calendar admin, you could not ... (bug #0000785) [Dirk] - Added missing finish() calls for some templates, e.g. header.thtml (bug #0000855) [Dirk] - Moved documentation to docs/english so that it can be translated diff -r a9694bc60a1a -r 2e3298a69f73 system/classes/story.class.php --- a/system/classes/story.class.php Sat Apr 18 21:10:04 2009 +0200 +++ b/system/classes/story.class.php Sat Apr 18 22:10:44 2009 +0200 @@ -1908,8 +1908,8 @@ } $this->_title = htmlspecialchars(strip_tags(COM_checkWords($title))); - $this->_introtext = COM_checkHTML(COM_checkWords($intro)); - $this->_bodytext = COM_checkHTML(COM_checkWords($body)); + $this->_introtext = COM_checkHTML(COM_checkWords($intro), 'story.edit'); + $this->_bodytext = COM_checkHTML(COM_checkWords($body), 'story.edit'); } diff -r a9694bc60a1a -r 2e3298a69f73 system/lib-comment.php --- a/system/lib-comment.php Sat Apr 18 21:10:04 2009 +0200 +++ b/system/lib-comment.php Sat Apr 18 22:10:44 2009 +0200 @@ -52,7 +52,7 @@ * * @param string $sid ID of item in question * @param string $title Title of item -* @param string $type Type of item (i.e. story, photo, etc) +* @param string $type Type of item (i.e. article, photo, etc) * @param string $order Order that comments are displayed in * @param string $mode Mode (nested, flat, etc.) * @param int $ccode Comment code: -1=no comments, 0=allowed, 1=closed @@ -813,9 +813,10 @@ $fakepostmode = $postmode; if ($postmode == 'html') { - $comment = COM_checkWords (COM_checkHTML (COM_stripslashes ($comment))); + $html_perm = ($type == 'article') ? 'story.edit' : "$type.edit"; + $comment = COM_checkWords(COM_checkHTML(COM_stripslashes($comment), $html_perm)); } else { - $comment = htmlspecialchars (COM_checkWords (COM_stripslashes ($comment))); + $comment = htmlspecialchars(COM_checkWords(COM_stripslashes($comment))); $newcomment = COM_makeClickableLinks ($comment); if (strcmp ($comment, $newcomment) != 0) { $comment = nl2br ($newcomment); @@ -832,12 +833,12 @@ $_POST['title'] = $title; $newcomment = $comment; - if ($mode == $LANG03[28] ) { //for preview - $newcomment = CMT_prepareText($comment, $postmode, true, $cid); + if ($mode == $LANG03[28] ) { // for preview + $newcomment = CMT_prepareText($comment, $postmode, $type, true, $cid); } elseif ($mode == $LANG03[34]) { - $newcomment = CMT_prepareText($comment, $postmode, true); + $newcomment = CMT_prepareText($comment, $postmode, $type, true); } else { - $newcomment = CMT_prepareText($comment, $postmode); + $newcomment = CMT_prepareText($comment, $postmode, $type); } $_POST['comment'] = $newcomment; @@ -982,8 +983,11 @@ $comment_template->set_var('lang_comment', $LANG03[9]); $comment_template->set_var('comment', $commenttext); $comment_template->set_var('lang_postmode', $LANG03[2]); - $comment_template->set_var('postmode_options', COM_optionList($_TABLES['postmodes'],'code,name',$postmode)); - $comment_template->set_var('allowed_html', COM_allowedHTML()); + $comment_template->set_var('postmode_options', + COM_optionList($_TABLES['postmodes'], 'code,name', $postmode)); + $comment_template->set_var('allowed_html', + COM_allowedHTML($type == 'article' + ? 'story.edit' : "$type.edit")); $comment_template->set_var('lang_importantstuff', $LANG03[18]); $comment_template->set_var('lang_instr_line1', $LANG03[19]); $comment_template->set_var('lang_instr_line2', $LANG03[20]); @@ -1108,7 +1112,7 @@ return $someError; } - $comment = addslashes(CMT_prepareText($comment, $postmode)); + $comment = addslashes(CMT_prepareText($comment, $postmode, $type)); $title = addslashes(COM_checkWords(strip_tags($title))); if (isset($_POST['username']) && strcmp($_POST['username'],$LANG03[24]) != 0 && $uid == 1) { @@ -1513,10 +1517,10 @@ $display = ''; - $type = COM_applyFilter ($_POST['type']); - $sid = COM_applyFilter ($_POST['sid']); - $cid = COM_applyFilter ($_POST['cid']); - $postmode = COM_applyFilter ($_POST['postmode']); + $type = COM_applyFilter($_POST['type']); + $sid = COM_applyFilter($_POST['sid']); + $cid = COM_applyFilter($_POST['cid']); + $postmode = COM_applyFilter($_POST['postmode']); $commentuid = DB_getItem ($_TABLES['comments'], 'uid', "cid = '$cid'"); if ( empty($_USER['uid'])) { @@ -1525,11 +1529,10 @@ $uid = $_USER['uid']; } - //check for bad input - if (empty ($sid) || empty ($_POST['title']) || empty ($_POST['comment']) || !is_numeric ($cid) - || $cid < 1 ) { - COM_errorLog("CMT_handleEditSubmit(): {{$_USER['uid']} from {$_SERVER['REMOTE_ADDR']} tried " - . 'to edit a comment with one or more missing values.'); + // check for bad input + if (empty($sid) || empty($_POST['title']) || empty($_POST['comment']) || + !is_numeric($cid) || ($cid < 1)) { + COM_errorLog("CMT_handleEditSubmit(): {{$_USER['uid']} from {$_SERVER['REMOTE_ADDR']} tried to edit a comment with one or more missing values."); return COM_refresh($_CONF['site_url'] . '/index.php'); } elseif ( $uid != $commentuid && !SEC_hasRights( 'comment.moderate' ) ) { //check permissions @@ -1538,7 +1541,7 @@ return COM_refresh($_CONF['site_url'] . '/index.php'); } - $comment = CMT_prepareText($_POST['comment'], $postmode); + $comment = CMT_prepareText($_POST['comment'], $postmode, $type); $title = COM_checkWords (strip_tags (COM_stripslashes ($_POST['title']))); if ($mode == $LANG03[35]) { @@ -1573,7 +1576,9 @@ . 'to submit a comment with invalid $title and/or $comment.'); return COM_refresh($_CONF['site_url'] . '/index.php'); } - return COM_refresh (COM_buildUrl ($_CONF['site_url'] . "/article.php?story=$sid")); + + return COM_refresh(COM_buildUrl($_CONF['site_url'] + . "/article.php?story=$sid")); } /** @@ -1581,21 +1586,24 @@ * * @copyright Jared Wenerd 2008 * @author Jared Wenerd, wenerd87 AT gmail DOT com - * @param string $comment comment text - * @param string $postmode ('html', 'plaintext',..) + * @param string $comment comment text + * @param string $postmode ('html', 'plaintext', ...) + * @param string $type Type of item (article, poll, etc.) * @param bool $edit if true append edit tag * @param int $cid commentid if editing comment (for proper sig) * @return string of comment text */ -function CMT_prepareText($comment, $postmode, $edit = false, $cid = null) +function CMT_prepareText($comment, $postmode, $type, $edit = false, $cid = null) { global $_USER, $_TABLES, $LANG03, $_CONF; if ($postmode == 'html') { - $comment = COM_checkWords (COM_checkHTML (COM_stripslashes ($comment))); + $html_perm = ($type == 'article') ? 'story.edit' : "$type.edit"; + $comment = COM_checkWords(COM_checkHTML(COM_stripslashes($comment), + $html_perm)); } else { From geeklog-cvs at lists.geeklog.net Sat Apr 18 16:46:30 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sat, 18 Apr 2009 16:46:30 -0400 Subject: [geeklog-cvs] geeklog: Added colons (for consistency) Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/1f91c5b92808 changeset: 6961:1f91c5b92808 user: Dirk Haun date: Sat Apr 18 22:26:05 2009 +0200 description: Added colons (for consistency) diffstat: 1 file changed, 5 insertions(+), 5 deletions(-) plugins/links/templates/admin/categoryeditor.thtml | 10 +++++----- diffs (32 lines): diff -r 2e3298a69f73 -r 1f91c5b92808 plugins/links/templates/admin/categoryeditor.thtml --- a/plugins/links/templates/admin/categoryeditor.thtml Sat Apr 18 22:10:44 2009 +0200 +++ b/plugins/links/templates/admin/categoryeditor.thtml Sat Apr 18 22:26:05 2009 +0200 @@ -3,23 +3,23 @@
    From geeklog-cvs at lists.geeklog.net Mon Apr 13 06:47:46 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Mon, 13 Apr 2009 06:47:46 -0400 Subject: [geeklog-cvs] geeklog: Fixed E_ALL error when permanent cookie expired Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/9974c9c57e3c changeset: 6937:9974c9c57e3c user: Dirk Haun date: Mon Apr 13 11:34:54 2009 +0200 description: Fixed E_ALL error when permanent cookie expired diffstat: 1 file changed, 9 insertions(+), 8 deletions(-) system/lib-sessions.php | 17 +++++++++-------- diffs (38 lines): diff -r 135118e76d96 -r 9974c9c57e3c system/lib-sessions.php --- a/system/lib-sessions.php Mon Apr 13 11:30:14 2009 +0200 +++ b/system/lib-sessions.php Mon Apr 13 11:34:54 2009 +0200 @@ -130,12 +130,13 @@ $userid = COM_applyFilter ($userid, true); $cookie_password = ''; $userpass = ''; - if ($userid > 1) { + if (($userid > 1) && + isset($_COOKIE[$_CONF['cookie_password']])) { $cookie_password = $_COOKIE[$_CONF['cookie_password']]; - $userpass = DB_getItem ($_TABLES['users'], 'passwd', - "uid = $userid"); + $userpass = DB_getItem($_TABLES['users'], 'passwd', + "uid = $userid"); } - if (empty ($cookie_password) || ($cookie_password <> $userpass)) { + if (empty($cookie_password) || ($cookie_password <> $userpass)) { // User may have modified their UID in cookie, ignore them } else if ($userid > 1) { // Check user status @@ -175,12 +176,12 @@ $userid = COM_applyFilter ($userid, true); $cookie_password = ''; $userpass = ''; - if ($userid > 1) { - $userpass = DB_getItem ($_TABLES['users'], 'passwd', - "uid = $userid"); + if (($userid > 1) && isset($_COOKIE[$_CONF['cookie_password']])) { + $userpass = DB_getItem($_TABLES['users'], 'passwd', + "uid = $userid"); $cookie_password = $_COOKIE[$_CONF['cookie_password']]; } - if (empty ($cookie_password) || ($cookie_password <> $userpass)) { + if (empty($cookie_password) || ($cookie_password <> $userpass)) { // User could have modified UID in cookie, don't do shit } else if ($userid > 1) { // Check user status From geeklog-cvs at lists.geeklog.net Mon Apr 13 06:47:47 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Mon, 13 Apr 2009 06:47:47 -0400 Subject: [geeklog-cvs] geeklog: Comment signature and edit notes should be in
    not... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/30016d8c4d9c changeset: 6938:30016d8c4d9c user: Dirk Haun date: Mon Apr 13 11:36:37 2009 +0200 description: Comment signature and edit notes should be in
    not diffstat: 2 files changed, 20 insertions(+), 14 deletions(-) public_html/layout/professional/style.css | 5 +++++ system/lib-comment.php | 29 +++++++++++++++-------------- diffs (79 lines): diff -r 9974c9c57e3c -r 30016d8c4d9c public_html/layout/professional/style.css --- a/public_html/layout/professional/style.css Mon Apr 13 11:34:54 2009 +0200 +++ b/public_html/layout/professional/style.css Mon Apr 13 11:36:37 2009 +0200 @@ -411,6 +411,11 @@ } .comment-edit { font-style: italic; + padding-top:1ex; +} +.comment-sig { + color:#666666; + padding-top:1ex; } /******************************************************************************/ .edit-perm-down { diff -r 9974c9c57e3c -r 30016d8c4d9c system/lib-comment.php --- a/system/lib-comment.php Mon Apr 13 11:34:54 2009 +0200 +++ b/system/lib-comment.php Mon Apr 13 11:36:37 2009 +0200 @@ -299,10 +299,10 @@ "uid={$B['uid']}"); } // add edit info to text - $A['comment'] .= LB . '' . $LANG03[30] - . ' ' . strftime($_CONF['date'], $B['time']) . ' ' + $A['comment'] .= '
    ' . $LANG03[30] . ' ' + . strftime($_CONF['date'], $B['time']) . ' ' . $LANG03[31] . ' ' . $editname - . ''; + . '
    '; } // determines indentation for current comment @@ -503,10 +503,11 @@ } //and finally: format the actual text of the comment, but check only the text, not sig or edit - $text = str_replace('', '', $A['comment']); - $text = str_replace('', '', $text); - $text = str_replace('', '', $text); - $text = str_replace('', '', $text); + $text = str_replace('
    ', '', + $A['comment']); + $text = str_replace('
    ', '', $text); + $text = str_replace('
    ', '', $text); + $text = str_replace('
    ', '', $text); if( preg_match( '/<.*>/', $text ) == 0 ) { $A['comment'] = nl2br( $A['comment'] ); } @@ -1602,9 +1603,9 @@ } if ($edit) { - $comment .= LB . '' . $LANG03[30] . ' ' - . strftime( $_CONF['date'], time() ) . ' ' .$LANG03[31] .' ' - . $_USER['username'] . ''; + $comment .= '
    ' . $LANG03[30] . ' ' + . strftime($_CONF['date'], time()) . ' ' .$LANG03[31] .' ' + . $_USER['username'] . '
    '; $text = $comment; } @@ -1622,13 +1623,13 @@ if ($uid > 1) { $sig = DB_getItem ($_TABLES['users'], 'sig', "uid = '$uid'"); if (!empty ($sig)) { - $comment .= ''; + $comment .= '
    '; if ( $postmode == 'html') { - $comment .= '

    ---' . nl2br ($sig); + $comment .= '---' . nl2br($sig); } else { - $comment .= LB . LB . '---' . LB . $sig; + $comment .= '---' . LB . $sig; } - $comment .= ''; + $comment .= '

    '; } } From geeklog-cvs at lists.geeklog.net Mon Apr 13 06:47:48 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Mon, 13 Apr 2009 06:47:48 -0400 Subject: [geeklog-cvs] geeklog: Too many nested and
    tags Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/e585b2e59749 changeset: 6939:e585b2e59749 user: Dirk Haun date: Mon Apr 13 11:52:14 2009 +0200 description: Too many nested and
    tags diffstat: 4 files changed, 4 insertions(+), 4 deletions(-) public_html/layout/professional/comment/commentform.thtml | 2 +- public_html/layout/professional/comment/commentform_advanced.thtml | 2 +- public_html/layout/professional/submit/submitstory.thtml | 2 +- public_html/layout/professional/submit/submitstory_advanced.thtml | 2 +- diffs (48 lines): diff -r 30016d8c4d9c -r e585b2e59749 public_html/layout/professional/comment/commentform.thtml --- a/public_html/layout/professional/comment/commentform.thtml Mon Apr 13 11:36:37 2009 +0200 +++ b/public_html/layout/professional/comment/commentform.thtml Mon Apr 13 11:52:14 2009 +0200 @@ -26,7 +26,7 @@ - {allowed_html} + {allowed_html}
    - + - + - + - + - + From geeklog-cvs at lists.geeklog.net Sat Apr 18 17:41:53 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sat, 18 Apr 2009 17:41:53 -0400 Subject: [geeklog-cvs] geeklog: Bad design decision: COM_checkList would use the table ... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/41c7d6494b98 changeset: 6962:41c7d6494b98 user: Dirk Haun date: Sat Apr 18 23:37:42 2009 +0200 description: Bad design decision: COM_checkList would use the table name in the HTML. Added a new parameter for the name to use instead. diffstat: 3 files changed, 34 insertions(+), 24 deletions(-) public_html/docs/history | 3 +++ public_html/lib-common.php | 30 ++++++++++++++++++------------ public_html/usersettings.php | 25 +++++++++++++------------ diffs (119 lines): diff -r 1f91c5b92808 -r 41c7d6494b98 public_html/docs/history --- a/public_html/docs/history Sat Apr 18 22:26:05 2009 +0200 +++ b/public_html/docs/history Sat Apr 18 23:37:42 2009 +0200 @@ -11,6 +11,9 @@ + Comment moderation and editable comments, by Jared Wenerd Other changes: +- COM_checkList would use the table name for the name of the checkbox array in + the HTML(!) - added a new parameter for the name (pointed out by Bookoo in + the exploit for usersettings.php, cf. Geeklog 1.5.2sr4) [Dirk] - Fixed wrong use of COM_allowedHTML and COM_checkHTML in plugins: Functions were called without specific permissions, so they defaulted to 'story.edit'. I.e. as a Story Admin, you could use the admin_html set in events, but as a diff -r 1f91c5b92808 -r 41c7d6494b98 public_html/lib-common.php --- a/public_html/lib-common.php Sat Apr 18 22:26:05 2009 +0200 +++ b/public_html/lib-common.php Sat Apr 18 23:37:42 2009 +0200 @@ -88,7 +88,7 @@ * Configuration Include: * You do NOT need to modify anything here any more! */ -require_once 'siteconfig.php' ; +require_once 'siteconfig.php'; /** * Configuration class @@ -1703,16 +1703,16 @@ * * Creates a group of checkbox form fields with given arguments * -* @param string $table DB Table to pull data from -* @param string $selection Comma delimited list of fields to pull from table -* @param string $where Where clause of SQL statement -* @param string $selected Value to set to CHECKED -* @see function COM_optionList -* @return string HTML with Checkbox code -* -*/ - -function COM_checkList( $table, $selection, $where='', $selected='' ) +* @param string $table DB Table to pull data from +* @param string $selection Comma delimited list of fields to pull from table +* @param string $where Where clause of SQL statement +* @param string $selected Value to set to CHECKED +* @param string $fieldname Name to use for the checkbox array +* @return string HTML with Checkbox code +* @see COM_optionList +* +*/ +function COM_checkList($table, $selection, $where = '', $selected = '', $fieldname = '') { global $_TABLES, $_COM_VERBOSE; @@ -1755,9 +1755,15 @@ $access = false; } + if (empty($fieldname)) { + // Not a good idea, as that will expose our table name and prefix! + // Make sure you pass a distinct field name! + $fieldname = $table; + } + if( $access ) { - $retval .= '
  • set_var ('exclude_topic_checklist', - COM_checkList($_TABLES['topics'],'tid,topic',$permissions,$A['tids'])); + COM_checkList($_TABLES['topics'], 'tid,topic', $permissions, $A['tids'], + 'topics')); if (($_CONF['contributedbyline'] == 1) && ($_CONF['hide_author_exclusion'] == 0)) { @@ -639,13 +640,13 @@ } elseif ($user_etids == '-') { // this means "no topics" $user_etids = ''; } - $tmp = COM_checkList ($_TABLES['topics'], 'tid,topic', $permissions, - $user_etids); - $preferences->set_var ('email_topic_checklist', - str_replace ($_TABLES['topics'], 'etids', $tmp)); - $preferences->parse ('digest_block', 'digest', true); + $tmp = COM_checkList($_TABLES['topics'], 'tid,topic', $permissions, + $user_etids, 'topics'); + $preferences->set_var('email_topic_checklist', + str_replace($_TABLES['topics'], 'etids', $tmp)); + $preferences->parse('digest_block', 'digest', true); } else { - $preferences->set_var ('digest_block', ''); + $preferences->set_var('digest_block', ''); } // boxes block @@ -1372,11 +1373,11 @@ } } - $TIDS = @array_values($A[$_TABLES['topics']]); // array of strings - $AIDS = @array_values($A['selauthors']); // array of integers - $BOXES = @array_values($A["{$_TABLES['blocks']}"]); // array of integers - $ETIDS = @array_values($A['etids']); // array of strings - $AETIDS = USER_getAllowedTopics(); // array of strings (fetched, needed to "clean" $TIDS and $ETIDS) + $TIDS = @array_values($A['topics']); // array of strings + $AIDS = @array_values($A['selauthors']); // array of integers + $BOXES = @array_values($A['blocks']); // array of integers + $ETIDS = @array_values($A['etids']); // array of strings + $AETIDS = USER_getAllowedTopics(); // array of strings (fetched, needed to "clean" $TIDS and $ETIDS) $tids = ''; if (sizeof ($TIDS) > 0) { From geeklog-cvs at lists.geeklog.net Sat Apr 18 20:58:18 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sat, 18 Apr 2009 20:58:18 -0400 Subject: [geeklog-cvs] geeklog: Added nicer install script buttons, removed functions u... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/6443b6740a09 changeset: 6963:6443b6740a09 user: Matt West date: Sat Apr 18 20:56:36 2009 -0400 description: Added nicer install script buttons, removed functions used during install script development diffstat: 5 files changed, 131 insertions(+), 156 deletions(-) public_html/admin/install/index.php | 102 ++++++++++++------------- public_html/admin/install/install-plugins.php | 8 - public_html/admin/install/layout/style.css | 27 ++++++ public_html/admin/install/lib-install.php | 54 ------------- public_html/admin/install/migrate.php | 96 +++++++++++------------ diffs (truncated from 569 to 300 lines): diff -r 41c7d6494b98 -r 6443b6740a09 public_html/admin/install/index.php --- a/public_html/admin/install/index.php Sat Apr 18 23:37:42 2009 +0200 +++ b/public_html/admin/install/index.php Sat Apr 18 20:56:36 2009 -0400 @@ -29,8 +29,8 @@ // | Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | // | | // +---------------------------------------------------------------------------+ -// | You don't need to change anything in this file. Please read | -// | docs/english/install.html which describes how to install Geeklog. | +// | You don't need to change anything in this file. | +// | Please read docs/install.html which describes how to install Geeklog. | // +---------------------------------------------------------------------------+ require_once 'lib-install.php'; @@ -181,8 +181,8 @@ $display .=' - - + + ' . LB; break; @@ -303,7 +303,7 @@ ' . $hidden_fields . ' - + @@ -313,7 +313,7 @@ ' . $hidden_fields . ' - + ' . LB; @@ -361,7 +361,7 @@ } $display .= '

    - + ' . LB; $curv = $old_versions[count($old_versions) - 1]; @@ -425,11 +425,11 @@
    - + - + @@ -438,7 +438,7 @@ - + @@ -697,7 +697,7 @@ -

    +

    '; return $display; @@ -938,7 +938,7 @@ } $display .= ' - + '; } $display .= ' @@ -975,7 +975,7 @@ $dbconfig_path = ''; $dbconfig_file = 'db-config.php'; - $display .= INST_printTab(2) . '

    ' . $LANG_INSTALL[3] . '

    ' . LB; + $display .= '

    ' . $LANG_INSTALL[3] . '

    ' . LB; if (!file_exists($gl_path . $dbconfig_file) && !file_exists($gl_path . 'public_html/' . $dbconfig_file)) { // If the file/directory is not located in the default location @@ -1002,7 +1002,7 @@ ' . $form_fields . ' - + ' . LB; $display .= '

    ' . $LANG_INSTALL[94] . '

    ' . LB . '

    • ' . $LANG_INSTALL[95] . '' . LB @@ -1038,16 +1038,16 @@ // The path to db-config.php is what we'll use to generate our /path/to/geeklog so // we want to make sure it's valid and exists before we continue and create problems. if (!file_exists($_PATH['db-config.php'])) { - $display .= INST_printTab(2) . '

      ' . $LANG_INSTALL[3] . '

      ' . LB - . INST_printTab(3) . '

      ' . $LANG_INSTALL[38] . '' . LB - . INST_printTab(3) . $LANG_INSTALL[84] . '' . $_PATH['db-config.php'] . '' . $LANG_INSTALL[85] . LB - . INST_printTab(3) . '

      ' . LB - . INST_printTab(3) . '
      ' . LB - . INST_printTab(3) . '
      ' . LB - . INST_printTab(3) . '' . LB - . INST_printTab(3) . '' . LB - . INST_printTab(3) . '' . LB - . INST_printTab(3) . '
      ' . LB; + $display .= '

      ' . $LANG_INSTALL[3] . '

      ' . LB + . '

      ' . $LANG_INSTALL[38] . '' . LB + . $LANG_INSTALL[84] . '' . $_PATH['db-config.php'] . '' . $LANG_INSTALL[85] . LB + . '

      ' . LB + . '
      ' . LB + . '
      ' . LB + . '' . LB + . '' . LB + . '' . LB + . '
      ' . LB; } else { require_once $_PATH['db-config.php']; // We need db-config.php the current DB information @@ -1055,8 +1055,8 @@ $gl_path = str_replace('db-config.php', '', $_PATH['db-config.php']); $num_wrong = 0; // number of files with wrong permissions - $display_permissions = INST_printTab(4) . '

      ' . LB - . INST_printTab(5) . '' . $LANG_INSTALL[11] . '

      ' . LB; + $display_permissions = '

      ' . LB + . '' . $LANG_INSTALL[11] . '

      ' . LB; $chmod_string = 'chmod -R 777 '; // Files to check if writable $file_list = array( $_PATH['db-config.php'], @@ -1075,8 +1075,8 @@ foreach ($file_list as $file) { if (!is_writable($file)) { $permission = sprintf("%3o", @fileperms($file) & 0777); - $display_permissions .= INST_printTab(4) . '

      ' . LB - . INST_printTab(5) . ' ' . $LANG_INSTALL[12] . ' 777 (' + $display_permissions .= '

      ' . LB + . ' ' . $LANG_INSTALL[12] . ' 777 (' . $LANG_INSTALL[13] . ' ' . $permission . ')

      ' . LB ; $chmod_string .= $file . ' ' ; $num_wrong++; @@ -1091,27 +1091,27 @@ if ($num_wrong) { // If any files have incorrect permissions. - $display .= INST_printTab(2) . '

      ' . $LANG_INSTALL[101] . ' ' . $display_step . ' - ' . $LANG_INSTALL[97] . '

      ' . LB; + $display .= '

      ' . $LANG_INSTALL[101] . ' ' . $display_step . ' - ' . $LANG_INSTALL[97] . '

      ' . LB; $display_step++; if (isset($_GET['install_type'])) { // If the user tried to start an installation before setting file permissions - $display .= INST_printTab(3) . '

      ' . $LANG_INSTALL[38] . ' ' + $display .= '

      ' . $LANG_INSTALL[38] . ' ' . $LANG_INSTALL[21] . '

      ' . LB; } else { // The first page that is displayed during the "check_permissions" step - $display .= INST_printTab(3) . '

      ' . $LANG_INSTALL[9] . '

      ' . LB - . INST_printTab(3) . '

      ' . $LANG_INSTALL[19] . '

      ' . LB; + $display .= '

      ' . $LANG_INSTALL[9] . '

      ' . LB + . '

      ' . $LANG_INSTALL[19] . '

      ' . LB; } // List the files that have incorrect permissions and also what the permissions should be // Also, list the auto-generated chmod command for advanced users - $display .= INST_printTab(3) . '
      ' . LB - . $display_permissions . INST_printTab(3) . '
      ' . LB - . INST_printTab(3) . '

      ' . $LANG_INSTALL[98] . '

      ' . LB - . INST_printTab(3) . '

      ' . $LANG_INSTALL[99] . '

      ' . LB - . INST_printTab(3) . '

      ' . $chmod_string . LB - . INST_printTab(3) . '


      ' . LB; + $display .= '
      ' . LB + . $display_permissions . '
      ' . LB + . '

      ' . $LANG_INSTALL[98] . '

      ' . LB + . '

      ' . $LANG_INSTALL[99] . '

      ' . LB + . '

      ' . $chmod_string . LB + . '


      ' . LB; $step++; } else { @@ -1149,16 +1149,16 @@ // Show the "Select your installation method" buttons $upgr_class = ($LANG_DIRECTION == 'rtl') ? 'upgrade-rtl' : 'upgrade' ; - $display .= INST_printTab(2) . '

      ' . $LANG_INSTALL[101] . ' ' . $display_step . ' - ' . $LANG_INSTALL[23] . '

      ' . LB - . INST_printTab(3) . '

      ' . LB - . INST_printTab(3) . '' . LB - . INST_printTab(3) . '' . LB - . INST_printTab(3) . '' . LB - . INST_printTab(3) . '' . LB - . INST_printTab(3) . '' . LB - . INST_printTab(3) . '' . LB - . INST_printTab(3) . '' . LB - . INST_printTab(3) . '

      ' . LB; + $display .= '

      ' . $LANG_INSTALL[101] . ' ' . $display_step . ' - ' . $LANG_INSTALL[23] . '

      ' . LB + . '

      ' . LB + . '' . LB + . '' . LB + . '' . LB + . '' . LB + . '' . LB + . '' . LB + . '' . LB + . '

      ' . LB; } break; @@ -1236,9 +1236,9 @@ } // end if (php_v()) -$display .= INST_printTab(3) . '' . LB - . INST_printTab(2) . '
      ' . LB - . INST_printTab(1) . '' . LB +$display .= '' . LB + . '' . LB + . '' . LB . '' . LB . ''; diff -r 41c7d6494b98 -r 6443b6740a09 public_html/admin/install/install-plugins.php --- a/public_html/admin/install/install-plugins.php Sat Apr 18 23:37:42 2009 +0200 +++ b/public_html/admin/install/install-plugins.php Sat Apr 18 20:56:36 2009 -0400 @@ -247,7 +247,7 @@ . '' . LB . '

      ' . LB . '

      ' . LB - . '

      ' . LB + . '

      ' . LB . '' . LB; } @@ -457,15 +457,15 @@ // Form footer $display .= '
  • {lang_parent}{lang_parent}:
    {lang_category}{lang_category}:
    {lang_cid}{lang_cid}:
    {lang_description}{lang_description}:
    {lang_topic}{lang_topic}: {topic_selection}
    ' . LB - . '' . LB - . '' . LB + . '' . LB + . '' . LB . '

    ' . LB; } else { $display .= '

    ' . $LANG_PLUGINS[20] . '

    ' . LB . '
    ' . LB - . '' . LB + . '' . LB . '

    ' . LB; } diff -r 41c7d6494b98 -r 6443b6740a09 public_html/admin/install/layout/style.css --- a/public_html/admin/install/layout/style.css Sat Apr 18 23:37:42 2009 +0200 +++ b/public_html/admin/install/layout/style.css Sat Apr 18 20:56:36 2009 -0400 @@ -59,9 +59,7 @@ color:#FF0000 } body { -/* width:99%; */ width:800px; -/* background:#FFFFFF; */ background:#1A3955; color:#000000; font:.8em arial,sans-serif,verdana,tahoma,helvetica; @@ -469,3 +467,28 @@ margin-left:1em; margin-right:1em; } + +.button { + background-color: #1A3955; + border: 0px; + color: white; + text-align: center; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; +} + +.button:hover { + background-color: #295a86; +} + From geeklog-cvs at lists.geeklog.net Sun Apr 19 03:31:56 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 19 Apr 2009 03:31:56 -0400 Subject: [geeklog-cvs] geeklog: No need to even look at $ETIDS when the Daily Digest is... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/0fa486c53e02 changeset: 6964:0fa486c53e02 user: Dirk Haun date: Sun Apr 19 00:05:27 2009 +0200 description: No need to even look at $ETIDS when the Daily Digest is disabled diffstat: 1 file changed, 1 insertion(+), 1 deletion(-) public_html/usersettings.php | 2 +- diffs (12 lines): diff -r 41c7d6494b98 -r 0fa486c53e02 public_html/usersettings.php --- a/public_html/usersettings.php Sat Apr 18 23:37:42 2009 +0200 +++ b/public_html/usersettings.php Sun Apr 19 00:05:27 2009 +0200 @@ -1416,7 +1416,7 @@ } $etids = ''; - if (sizeof ($ETIDS) > 0) { + if (($_CONF['emailstories'] == 1) && (sizeof($ETIDS) > 0)) { // the array_intersect mitigates the need to scrub the ETIDS input $etids = addslashes (implode (' ', array_intersect ($AETIDS, $ETIDS))); } From geeklog-cvs at lists.geeklog.net Sun Apr 19 03:31:56 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 19 Apr 2009 03:31:56 -0400 Subject: [geeklog-cvs] geeklog: We'd better filter the Spam-X command, just in case Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/729132c4527b changeset: 6965:729132c4527b user: Dirk Haun date: Sun Apr 19 00:23:45 2009 +0200 description: We'd better filter the Spam-X command, just in case diffstat: 1 file changed, 32 insertions(+), 28 deletions(-) public_html/admin/plugins/spamx/index.php | 60 +++++++++++++++-------------- diffs (94 lines): diff -r 0fa486c53e02 -r 729132c4527b public_html/admin/plugins/spamx/index.php --- a/public_html/admin/plugins/spamx/index.php Sun Apr 19 00:05:27 2009 +0200 +++ b/public_html/admin/plugins/spamx/index.php Sun Apr 19 00:23:45 2009 +0200 @@ -3,9 +3,9 @@ // +---------------------------------------------------------------------------+ // | Spam-X plugin 1.2 | // +---------------------------------------------------------------------------+ -// | admin/index.php | +// | index.php | // | | -// | Administration page. | +// | Spam-X administration page. | // +---------------------------------------------------------------------------+ // | Copyright (C) 2002-2009 by the following authors: | // | | @@ -65,48 +65,52 @@ * Main */ -$display = COM_siteHeader ('menu', $LANG_SX00['plugin_name']); -$T = new Template ($_CONF['path'] . 'plugins/spamx/templates'); -$T->set_file ('admin', 'admin.thtml'); -$T->set_var ( 'xhtml', XHTML ); -$T->set_var ('site_url', $_CONF['site_url']); -$T->set_var ('site_admin_url', $_CONF['site_admin_url']); -$T->set_var ('header', $LANG_SX00['admin']); -$T->set_var ('plugin_name', $LANG_SX00['plugin_name']); -$T->set_var ('plugin', 'spamx'); -$T->parse ('output', 'admin'); -$display .= $T->finish ($T->get_var ('output')); +$display = COM_siteHeader('menu', $LANG_SX00['plugin_name']); +$T = new Template($_CONF['path'] . 'plugins/spamx/templates'); +$T->set_file('admin', 'admin.thtml'); +$T->set_var('xhtml', XHTML); +$T->set_var('site_url', $_CONF['site_url']); +$T->set_var('site_admin_url', $_CONF['site_admin_url']); +$T->set_var('layout_url', $_CONF['layout_url']); +$T->set_var('header', $LANG_SX00['admin']); +$T->set_var('plugin_name', $LANG_SX00['plugin_name']); +$T->set_var('plugin', 'spamx'); +$T->parse('output', 'admin'); +$display .= $T->finish($T->get_var('output')); -$files = array (); -if ($dir = @opendir ($_CONF['path'] . 'plugins/spamx/')) { - while (($file = readdir ($dir)) !== false) { - if (is_file ($_CONF['path'] . 'plugins/spamx/' . $file)) - { - if (substr ($file, -16) == '.Admin.class.php') { - $tmp = str_replace ('.Admin.class.php', '', $file); - array_push ($files, $tmp); +$files = array(); +if ($dir = @opendir($_CONF['path'] . 'plugins/spamx/')) { + while (($file = readdir($dir)) !== false) { + if (is_file($_CONF['path'] . 'plugins/spamx/' . $file)) { + if (substr($file, -16) == '.Admin.class.php') { + $tmp = str_replace('.Admin.class.php', '', $file); + array_push($files, $tmp); } } } - closedir ($dir); + closedir($dir); } $display .= '

    ' . $LANG_SX00['adminc'] . '

      '; foreach ($files as $file) { - require_once ($_CONF['path'] . 'plugins/spamx/' . $file . '.Admin.class.php'); + require_once $_CONF['path'] . 'plugins/spamx/' . $file . '.Admin.class.php'; + $CM = new $file; - $display .= '
    • ' . COM_createLink($CM->link (), $_CONF['site_admin_url'] + $display .= '
    • ' . COM_createLink($CM->link(), $_CONF['site_admin_url'] . '/plugins/spamx/index.php?command=' . $file) . '
    • '; } $display .= '
    • ' . COM_createLink($LANG_SX00['documentation'], plugin_getdocumentationurl_spamx('index')) . '
    • '; $display .= '
    '; -if (isset ($_REQUEST['command'])) { - $CM = new $_REQUEST['command']; - $display .= $CM->display (); +if (isset($_REQUEST['command'])) { + $cmd = COM_applyFilter($_REQUEST['command']); + if (!empty($cmd) && in_array($cmd, $files)) { + $CM = new $cmd; + $display .= $CM->display(); + } } -$display .= COM_siteFooter (true); +$display .= COM_siteFooter(true); echo $display; From geeklog-cvs at lists.geeklog.net Sun Apr 19 03:31:57 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 19 Apr 2009 03:31:57 -0400 Subject: [geeklog-cvs] geeklog: Merging branches Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/1f89a4c2396a changeset: 6966:1f89a4c2396a user: Dirk Haun date: Sun Apr 19 09:20:39 2009 +0200 description: Merging branches diffstat: 5 files changed, 129 insertions(+), 154 deletions(-) public_html/admin/install/index.php | 98 ++++++++++++------------- public_html/admin/install/install-plugins.php | 8 +- public_html/admin/install/layout/style.css | 27 ++++++ public_html/admin/install/lib-install.php | 54 ------------- public_html/admin/install/migrate.php | 96 ++++++++++++------------ diffs (truncated from 558 to 300 lines): diff -r 729132c4527b -r 1f89a4c2396a public_html/admin/install/index.php --- a/public_html/admin/install/index.php Sun Apr 19 00:23:45 2009 +0200 +++ b/public_html/admin/install/index.php Sun Apr 19 09:20:39 2009 +0200 @@ -181,8 +181,8 @@ $display .=' - - + + ' . LB; break; @@ -303,7 +303,7 @@ ' . $hidden_fields . ' - +
    @@ -313,7 +313,7 @@ ' . $hidden_fields . ' - + ' . LB; @@ -361,7 +361,7 @@ } $display .= '

    - + ' . LB; $curv = $old_versions[count($old_versions) - 1]; @@ -425,11 +425,11 @@
    - + - +
    @@ -438,7 +438,7 @@ - + @@ -697,7 +697,7 @@ -

    +

    '; return $display; @@ -938,7 +938,7 @@ } $display .= ' - + '; } $display .= ' @@ -975,7 +975,7 @@ $dbconfig_path = ''; $dbconfig_file = 'db-config.php'; - $display .= INST_printTab(2) . '

    ' . $LANG_INSTALL[3] . '

    ' . LB; + $display .= '

    ' . $LANG_INSTALL[3] . '

    ' . LB; if (!file_exists($gl_path . $dbconfig_file) && !file_exists($gl_path . 'public_html/' . $dbconfig_file)) { // If the file/directory is not located in the default location @@ -1002,7 +1002,7 @@ ' . $form_fields . ' - + ' . LB; $display .= '

    ' . $LANG_INSTALL[94] . '

    ' . LB . '

    • ' . $LANG_INSTALL[95] . '' . LB @@ -1038,16 +1038,16 @@ // The path to db-config.php is what we'll use to generate our /path/to/geeklog so // we want to make sure it's valid and exists before we continue and create problems. if (!file_exists($_PATH['db-config.php'])) { - $display .= INST_printTab(2) . '

      ' . $LANG_INSTALL[3] . '

      ' . LB - . INST_printTab(3) . '

      ' . $LANG_INSTALL[38] . '' . LB - . INST_printTab(3) . $LANG_INSTALL[84] . '' . $_PATH['db-config.php'] . '' . $LANG_INSTALL[85] . LB - . INST_printTab(3) . '

      ' . LB - . INST_printTab(3) . '
      ' . LB - . INST_printTab(3) . '
      ' . LB - . INST_printTab(3) . '' . LB - . INST_printTab(3) . '' . LB - . INST_printTab(3) . '
      ' . LB - . INST_printTab(3) . '
      ' . LB; + $display .= '

      ' . $LANG_INSTALL[3] . '

      ' . LB + . '

      ' . $LANG_INSTALL[38] . '' . LB + . $LANG_INSTALL[84] . '' . $_PATH['db-config.php'] . '' . $LANG_INSTALL[85] . LB + . '

      ' . LB + . '
      ' . LB + . '
      ' . LB + . '' . LB + . '' . LB + . '
      ' . LB + . '
      ' . LB; } else { require_once $_PATH['db-config.php']; // We need db-config.php the current DB information @@ -1055,8 +1055,8 @@ $gl_path = str_replace('db-config.php', '', $_PATH['db-config.php']); $num_wrong = 0; // number of files with wrong permissions - $display_permissions = INST_printTab(4) . '

      ' . LB - . INST_printTab(5) . '' . $LANG_INSTALL[11] . '

      ' . LB; + $display_permissions = '

      ' . LB + . '' . $LANG_INSTALL[11] . '

      ' . LB; $chmod_string = 'chmod -R 777 '; // Files to check if writable $file_list = array( $_PATH['db-config.php'], @@ -1075,8 +1075,8 @@ foreach ($file_list as $file) { if (!is_writable($file)) { $permission = sprintf("%3o", @fileperms($file) & 0777); - $display_permissions .= INST_printTab(4) . '

      ' . LB - . INST_printTab(5) . ' ' . $LANG_INSTALL[12] . ' 777 (' + $display_permissions .= '

      ' . LB + . ' ' . $LANG_INSTALL[12] . ' 777 (' . $LANG_INSTALL[13] . ' ' . $permission . ')

      ' . LB ; $chmod_string .= $file . ' ' ; $num_wrong++; @@ -1091,27 +1091,27 @@ if ($num_wrong) { // If any files have incorrect permissions. - $display .= INST_printTab(2) . '

      ' . $LANG_INSTALL[101] . ' ' . $display_step . ' - ' . $LANG_INSTALL[97] . '

      ' . LB; + $display .= '

      ' . $LANG_INSTALL[101] . ' ' . $display_step . ' - ' . $LANG_INSTALL[97] . '

      ' . LB; $display_step++; if (isset($_GET['install_type'])) { // If the user tried to start an installation before setting file permissions - $display .= INST_printTab(3) . '

      ' . $LANG_INSTALL[38] . ' ' + $display .= '

      ' . $LANG_INSTALL[38] . ' ' . $LANG_INSTALL[21] . '

      ' . LB; } else { // The first page that is displayed during the "check_permissions" step - $display .= INST_printTab(3) . '

      ' . $LANG_INSTALL[9] . '

      ' . LB - . INST_printTab(3) . '

      ' . $LANG_INSTALL[19] . '

      ' . LB; + $display .= '

      ' . $LANG_INSTALL[9] . '

      ' . LB + . '

      ' . $LANG_INSTALL[19] . '

      ' . LB; } // List the files that have incorrect permissions and also what the permissions should be // Also, list the auto-generated chmod command for advanced users - $display .= INST_printTab(3) . '
      ' . LB - . $display_permissions . INST_printTab(3) . '
      ' . LB - . INST_printTab(3) . '

      ' . $LANG_INSTALL[98] . '

      ' . LB - . INST_printTab(3) . '

      ' . $LANG_INSTALL[99] . '

      ' . LB - . INST_printTab(3) . '

      ' . $chmod_string . LB - . INST_printTab(3) . '


      ' . LB; + $display .= '
      ' . LB + . $display_permissions . '
      ' . LB + . '

      ' . $LANG_INSTALL[98] . '

      ' . LB + . '

      ' . $LANG_INSTALL[99] . '

      ' . LB + . '

      ' . $chmod_string . LB + . '


      ' . LB; $step++; } else { @@ -1149,16 +1149,16 @@ // Show the "Select your installation method" buttons $upgr_class = ($LANG_DIRECTION == 'rtl') ? 'upgrade-rtl' : 'upgrade' ; - $display .= INST_printTab(2) . '

      ' . $LANG_INSTALL[101] . ' ' . $display_step . ' - ' . $LANG_INSTALL[23] . '

      ' . LB - . INST_printTab(3) . '

      ' . LB - . INST_printTab(3) . '' . LB - . INST_printTab(3) . '' . LB - . INST_printTab(3) . '' . LB - . INST_printTab(3) . '' . LB - . INST_printTab(3) . '' . LB - . INST_printTab(3) . '' . LB - . INST_printTab(3) . '' . LB - . INST_printTab(3) . '

      ' . LB; + $display .= '

      ' . $LANG_INSTALL[101] . ' ' . $display_step . ' - ' . $LANG_INSTALL[23] . '

      ' . LB + . '

      ' . LB + . '' . LB + . '' . LB + . '' . LB + . '' . LB + . '' . LB + . '' . LB + . '' . LB + . '

      ' . LB; } break; @@ -1236,9 +1236,9 @@ } // end if (php_v()) -$display .= INST_printTab(3) . '' . LB - . INST_printTab(2) . '
      ' . LB - . INST_printTab(1) . '' . LB +$display .= '' . LB + . '' . LB + . '' . LB . '' . LB . ''; diff -r 729132c4527b -r 1f89a4c2396a public_html/admin/install/install-plugins.php --- a/public_html/admin/install/install-plugins.php Sun Apr 19 00:23:45 2009 +0200 +++ b/public_html/admin/install/install-plugins.php Sun Apr 19 09:20:39 2009 +0200 @@ -247,7 +247,7 @@ . '' . LB . '

      ' . LB . '

      ' . LB - . '

      ' . LB + . '

      ' . LB . '' . LB; } @@ -457,15 +457,15 @@ // Form footer $display .= '' . LB - . '' . LB - . '' . LB + . '' . LB + . '' . LB . '

      ' . LB; } else { $display .= '

      ' . $LANG_PLUGINS[20] . '

      ' . LB . '
      ' . LB - . '' . LB + . '' . LB . '

      ' . LB; } diff -r 729132c4527b -r 1f89a4c2396a public_html/admin/install/layout/style.css --- a/public_html/admin/install/layout/style.css Sun Apr 19 00:23:45 2009 +0200 +++ b/public_html/admin/install/layout/style.css Sun Apr 19 09:20:39 2009 +0200 @@ -59,9 +59,7 @@ color:#FF0000 } body { -/* width:99%; */ width:800px; -/* background:#FFFFFF; */ background:#1A3955; color:#000000; font:.8em arial,sans-serif,verdana,tahoma,helvetica; @@ -469,3 +467,28 @@ margin-left:1em; margin-right:1em; } + +.button { + background-color: #1A3955; + border: 0px; + color: white; + text-align: center; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; +} + +.button:hover { + background-color: #295a86; +} + +.big-button { + font-size:14px; + margin: 2px; + padding: 5px; +} + +.language-button { + font-size: 13px; + margin: 2px; + padding: 2px; +} From geeklog-cvs at lists.geeklog.net Sun Apr 19 04:36:45 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 19 Apr 2009 04:36:45 -0400 Subject: [geeklog-cvs] geeklog: Added an option to send a copy of the email to a user t... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/f07d1ab4b996 changeset: 6967:f07d1ab4b996 user: Dirk Haun date: Sun Apr 19 10:35:57 2009 +0200 description: Added an option to send a copy of the email to a user to self (feature request #0000771, based on a patch by Roshan Singh) diffstat: 6 files changed, 42 insertions(+), 14 deletions(-) language/english.php | 5 + language/english_utf-8.php | 5 + public_html/docs/english/theme.html | 2 public_html/docs/history | 2 public_html/layout/professional/profiles/contactuserform.thtml | 4 + public_html/profiles.php | 38 ++++++---- diffs (137 lines): diff -r 1f89a4c2396a -r f07d1ab4b996 language/english.php --- a/language/english.php Sun Apr 19 09:20:39 2009 +0200 +++ b/language/english.php Sun Apr 19 10:35:57 2009 +0200 @@ -451,7 +451,10 @@ 32 => 'Date', 33 => 'Read the full article at', 34 => 'End of Message', - 35 => 'Sorry, this user prefers not to receive any emails.' + 35 => 'Sorry, this user prefers not to receive any emails.', + 36 => 'Copy:', + 37 => 'Send me a copy of this email', + 38 => "This is a copy of the email that you sent to %s from <{$_CONF['site_url']}>:" ); ############################################################################### diff -r 1f89a4c2396a -r f07d1ab4b996 language/english_utf-8.php --- a/language/english_utf-8.php Sun Apr 19 09:20:39 2009 +0200 +++ b/language/english_utf-8.php Sun Apr 19 10:35:57 2009 +0200 @@ -451,7 +451,10 @@ 32 => 'Date', 33 => 'Read the full article at', 34 => 'End of Message', - 35 => 'Sorry, this user prefers not to receive any emails.' + 35 => 'Sorry, this user prefers not to receive any emails.', + 36 => 'Copy:', + 37 => 'Send me a copy of this email', + 38 => "This is a copy of the email that you sent to %s from <{$_CONF['site_url']}>:" ); ############################################################################### diff -r 1f89a4c2396a -r f07d1ab4b996 public_html/docs/english/theme.html --- a/public_html/docs/english/theme.html Sun Apr 19 09:20:39 2009 +0200 +++ b/public_html/docs/english/theme.html Sun Apr 19 10:35:57 2009 +0200 @@ -231,6 +231,8 @@
    • New template file admin/lists/inline.thtml, used when embedding lists into an existing HTML <form> (e.g. the new Groups editor).
    • +
    • Added a "send copy to myself" option to + profiles/contactuserform.thtml

    Plugins

    diff -r 1f89a4c2396a -r f07d1ab4b996 public_html/docs/history --- a/public_html/docs/history Sun Apr 19 09:20:39 2009 +0200 +++ b/public_html/docs/history Sun Apr 19 10:35:57 2009 +0200 @@ -11,6 +11,8 @@ + Comment moderation and editable comments, by Jared Wenerd Other changes: +- Added an option to send a copy of the email to a user to self (feature request + #0000771, based on a patch by Roshan Singh) - COM_checkList would use the table name for the name of the checkbox array in the HTML(!) - added a new parameter for the name (pointed out by Bookoo in the exploit for usersettings.php, cf. Geeklog 1.5.2sr4) [Dirk] diff -r 1f89a4c2396a -r f07d1ab4b996 public_html/layout/professional/profiles/contactuserform.thtml --- a/public_html/layout/professional/profiles/contactuserform.thtml Sun Apr 19 09:20:39 2009 +0200 +++ b/public_html/layout/professional/profiles/contactuserform.thtml Sun Apr 19 10:35:57 2009 +0200 @@ -10,6 +10,10 @@ {lang_useremail} + + + {lang_cc} +  {lang_cc_description} {lang_subject} diff -r 1f89a4c2396a -r f07d1ab4b996 public_html/profiles.php --- a/public_html/profiles.php Sun Apr 19 09:20:39 2009 +0200 +++ b/public_html/profiles.php Sun Apr 19 10:35:57 2009 +0200 @@ -2,7 +2,7 @@ /* Reminder: always indent with 4 spaces (no tabs). */ // +---------------------------------------------------------------------------+ -// | Geeklog 1.5 | +// | Geeklog 1.6 | // +---------------------------------------------------------------------------+ // | profiles.php | // | | @@ -33,6 +33,9 @@ // | | // +---------------------------------------------------------------------------+ +/** +* Geeklog common function library +*/ require_once 'lib-common.php'; /** @@ -125,6 +128,15 @@ $from = COM_formatEmailAddress ($author, $authoremail); $sent = COM_mail($to, $subject, $message, $from); + + if ($sent && isset($_POST['cc']) && ($_POST['cc'] == 'on')) { + $ccmessage = sprintf($LANG08[38], COM_getDisplayName($uid, + $A['username'], $A['fullname'])); + $ccmessage .= "\n------------------------------------------------------------\n\n" . $message; + + $sent = COM_mail($from, $subject, $ccmessage, $from); + } + COM_updateSpeedlimit('mail'); $retval .= COM_refresh($_CONF['site_url'] @@ -228,17 +240,19 @@ } else { $mail_template->set_var ('useremail', $_USER['email']); } - $mail_template->set_var ('lang_subject', $LANG08[13]); - $mail_template->set_var ('subject', $subject); - $mail_template->set_var ('lang_message', $LANG08[14]); - $mail_template->set_var ('message', $message); - $mail_template->set_var ('lang_nohtml', $LANG08[15]); - $mail_template->set_var ('lang_submit', $LANG08[16]); - $mail_template->set_var ('uid', $uid); - PLG_templateSetVars ('contact', $mail_template); - $mail_template->parse ('output', 'form'); - $retval .= $mail_template->finish ($mail_template->get_var ('output')); - $retval .= COM_endBlock (); + $mail_template->set_var('lang_cc', $LANG08[36]); + $mail_template->set_var('lang_cc_description', $LANG08[37]); + $mail_template->set_var('lang_subject', $LANG08[13]); + $mail_template->set_var('subject', $subject); + $mail_template->set_var('lang_message', $LANG08[14]); + $mail_template->set_var('message', $message); + $mail_template->set_var('lang_nohtml', $LANG08[15]); + $mail_template->set_var('lang_submit', $LANG08[16]); + $mail_template->set_var('uid', $uid); + PLG_templateSetVars('contact', $mail_template); + $mail_template->parse('output', 'form'); + $retval .= $mail_template->finish($mail_template->get_var('output')); + $retval .= COM_endBlock(); } else { $retval = COM_startBlock ($LANG08[10] . ' ' . $displayname, '', COM_getBlockTemplate ('_msg_block', 'header')); From geeklog-cvs at lists.geeklog.net Sun Apr 19 06:22:04 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 19 Apr 2009 06:22:04 -0400 Subject: [geeklog-cvs] geeklog: Moved hard-coded texts from admin/sectest.php to the la... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/a9b4ce455fdf changeset: 6968:a9b4ce455fdf user: Dirk Haun date: Sun Apr 19 12:16:59 2009 +0200 description: Moved hard-coded texts from admin/sectest.php to the language files (bug #0000716) diffstat: 4 files changed, 165 insertions(+), 92 deletions(-) language/english.php | 25 +++++ language/english_utf-8.php | 25 +++++ public_html/admin/sectest.php | 205 ++++++++++++++++++++++------------------- public_html/docs/history | 2 diffs (truncated from 468 to 300 lines): diff -r f07d1ab4b996 -r a9b4ce455fdf language/english.php --- a/language/english.php Sun Apr 19 10:35:57 2009 +0200 +++ b/language/english.php Sun Apr 19 12:16:59 2009 +0200 @@ -1464,6 +1464,31 @@ 'no_articles' => 'No articles.' ); +############################################################################### +# admin/sectest.php + +$LANG_SECTEST = array( + 'sectest' => 'Geeklog Security Check', + 'results' => 'Results of the Security Check', + 'okay' => 'Everything seems to be in order.', + 'please_fix' => 'Please fix the above issues before using your site!', + 'please_note' => 'Please note that no site is ever 100% secure. This script can only test for obvious security issues.', + 'stay_informed' => 'To stay informed about new Geeklog releases and possible security issues, we suggest that you subscribe to the (low-traffic) %s mailing list and/or use the %s option in your Admin menu from time to time to check for available updates.', + 'public_html' => '"public_html" should never be part of your site\'s URL. Please read the part about public_html in the %s again and change your setup accordingly before you proceed.', + 'installation' => 'installation instructions', + 'directory' => 'directory', + 'failed_bak' => 'Failed to create a temporary file in your data directory. Check your directory permissions!', + 'fix_it' => 'This is a security risk and should be fixed!', + 'reachable' => 'Your %s is reachable from the web.', + 'not_reachable' => 'Good! Your %s is not reachable from the web.', + 'not_sure' => 'Got an HTTP result code %s when trying to test your %s. Not sure what to make of it ...', + 'remove_inst' => 'You should really remove the install directory %s once you have your site up and running without any errors.', + 'remove_inst2' => 'Keeping it around would allow malicious users the ability to destroy your current install, take over your site, or retrieve sensitive information.', + 'inst_removed' => 'Good! You seem to have removed the install directory already.', + 'fix_password' => 'You still have not changed the default password from "password" on %s Root user account(s).', + 'password_okay' => 'Good! You seem to have changed the default account password already.' +); + ################################################################################ # "What's New" Time Strings diff -r f07d1ab4b996 -r a9b4ce455fdf language/english_utf-8.php --- a/language/english_utf-8.php Sun Apr 19 10:35:57 2009 +0200 +++ b/language/english_utf-8.php Sun Apr 19 12:16:59 2009 +0200 @@ -1464,6 +1464,31 @@ 'no_articles' => 'No articles.' ); +############################################################################### +# admin/sectest.php + +$LANG_SECTEST = array( + 'sectest' => 'Geeklog Security Check', + 'results' => 'Results of the Security Check', + 'okay' => 'Everything seems to be in order.', + 'please_fix' => 'Please fix the above issues before using your site!', + 'please_note' => 'Please note that no site is ever 100% secure. This script can only test for obvious security issues.', + 'stay_informed' => 'To stay informed about new Geeklog releases and possible security issues, we suggest that you subscribe to the (low-traffic) %s mailing list and/or use the %s option in your Admin menu from time to time to check for available updates.', + 'public_html' => '"public_html" should never be part of your site\'s URL. Please read the part about public_html in the %s again and change your setup accordingly before you proceed.', + 'installation' => 'installation instructions', + 'directory' => 'directory', + 'failed_bak' => 'Failed to create a temporary file in your data directory. Check your directory permissions!', + 'fix_it' => 'This is a security risk and should be fixed!', + 'reachable' => 'Your %s is reachable from the web.', + 'not_reachable' => 'Good! Your %s is not reachable from the web.', + 'not_sure' => 'Got an HTTP result code %s when trying to test your %s. Not sure what to make of it ...', + 'remove_inst' => 'You should really remove the install directory %s once you have your site up and running without any errors.', + 'remove_inst2' => 'Keeping it around would allow malicious users the ability to destroy your current install, take over your site, or retrieve sensitive information.', + 'inst_removed' => 'Good! You seem to have removed the install directory already.', + 'fix_password' => 'You still have not changed the default password from "password" on %s Root user account(s).', + 'password_okay' => 'Good! You seem to have changed the default account password already.' +); + ################################################################################ # "What's New" Time Strings diff -r f07d1ab4b996 -r a9b4ce455fdf public_html/admin/sectest.php --- a/public_html/admin/sectest.php Sun Apr 19 10:35:57 2009 +0200 +++ b/public_html/admin/sectest.php Sun Apr 19 12:16:59 2009 +0200 @@ -30,7 +30,21 @@ // | | // +---------------------------------------------------------------------------+ +/** +* This script does a few quick and simple checks to ensure that you have +* installed Geeklog in a (relatively) secure fashion. It also gives tips on +* how to fix issues. +* +*/ + +/** +* Geeklog common function library +*/ require_once '../lib-common.php'; + +/** +* Security check to ensure user even belongs on this page +*/ require_once 'auth.inc.php'; $display = ''; @@ -51,23 +65,23 @@ * Send an HTTP HEAD request for the given URL * * @param string $url URL to request -* @param string $errmsg error message, if any (on return) +* @param string &$errmsg error message, if any (on return) * @return int HTTP response code or 777 on error * */ -function doHeadRequest ($url, &$errmsg) +function doHeadRequest($url, &$errmsg) { - require_once ('HTTP/Request.php'); + require_once 'HTTP/Request.php'; - $req = new HTTP_Request ($url); - $req->setMethod (HTTP_REQUEST_METHOD_HEAD); - $req->addHeader ('User-Agent', 'Geeklog/' . VERSION); - $response = $req->sendRequest (); - if (PEAR::isError ($response)) { + $req = new HTTP_Request($url); + $req->setMethod(HTTP_REQUEST_METHOD_HEAD); + $req->addHeader('User-Agent', 'Geeklog/' . VERSION); + $response = $req->sendRequest(); + if (PEAR::isError($response)) { $errmsg = $response->getMessage(); return 777; } else { - return $req->getResponseCode (); + return $req->getResponseCode(); } } @@ -85,26 +99,26 @@ if ($_CONF['path'] == $_CONF['path_html']) { // not good ... $url = $_CONF['site_url']; - } else if (substr ($_CONF['path'], 0, strlen ($_CONF['path_html'])) == $_CONF['path_html']) { + } elseif (substr($_CONF['path'], 0, strlen($_CONF['path_html'])) == $_CONF['path_html']) { // "geeklog" dir in the document root - $rest = substr ($_CONF['path'], -(strlen ($_CONF['path']) - strlen ($_CONF['path_html']))); + $rest = substr($_CONF['path'], -(strlen($_CONF['path']) - strlen($_CONF['path_html']))); $url = $_CONF['site_url'] . '/' . $rest; } else { // check for sites like www.example.com/geeklog $u = $_CONF['site_url']; - if (substr ($u, -1) == '/') { - $u = substr ($u, 0, -1); + if (substr($u, -1) == '/') { + $u = substr($u, 0, -1); } - $pos = strpos ($u, ':'); + $pos = strpos($u, ':'); if ($pos !== false) { - $u2 = substr ($u, $pos + 3); + $u2 = substr($u, $pos + 3); } else { $u2 = $u; } - $p = explode ('/', $u2); - if (count ($p) > 1) { - $cut = strlen ($p[count ($p) - 1]) + 1; - $url = substr ($u, 0, -$cut) . '/'; + $p = explode('/', $u2); + if (count($p) > 1) { + $cut = strlen($p[count($p) - 1]) + 1; + $url = substr($u, 0, -$cut) . '/'; } } @@ -119,22 +133,24 @@ * @return string text explaining the result of the test * */ -function interpretResult ($retcode, $msg) +function interpretResult($retcode, $msg) { - global $failed_tests; + global $LANG_SECTEST, $failed_tests; $retval = ''; if ($retcode == 200) { - $retval = 'Your ' . $msg . ' is reachable from the web.This is a security risk and should be fixed!'; + $retval .= sprintf($LANG_SECTEST['reachable'], + '' . $msg . '') + . '' . $LANG_SECTEST['fix_it'] . ''; $failed_tests++; } elseif (($retcode == 401) || ($retcode == 403) || ($retcode == 404)) { - $retval = 'Good! Your ' . $msg . ' is not reachable from the web.'; - } else if (is_numeric ($retcode)) { - $retval = 'Got an HTTP result code ' . $retcode . ' when trying to test your ' . $msg . '. Not sure what to make of it ...'; + $retval .= sprintf($LANG_SECTEST['not_reachable'], $msg); + } elseif (is_numeric($retcode)) { + $retval .= sprintf($LANG_SECTEST['not_sure'], $retval, $msg); $failed_tests++; } else { - $retval = $retcode; + $retval .= $retcode; } return $retval; @@ -147,14 +163,14 @@ * @return boolean true: success; false: file creation failed * */ -function makeTempfile ($file) +function makeTempfile($file) { $retval = false; - $tempfile = @fopen ($file, 'w'); + $tempfile = @fopen($file, 'w'); if ($tempfile) { $retval = true; - fclose ($tempfile); + fclose($tempfile); } return $retval; @@ -169,19 +185,19 @@ * @return string test result as a list item * */ -function doTest ($baseurl, $urltocheck, $what) +function doTest($baseurl, $urltocheck, $what) { global $failed_tests; $retval = ''; $retval .= '
  • '; - $retcode = doHeadRequest ($baseurl . $urltocheck, $errmsg); + $retcode = doHeadRequest($baseurl . $urltocheck, $errmsg); if ($retcode == 777) { $retval .= $errmsg; $failed_tests++; } else { - $retval .= interpretResult ($retcode, $what); + $retval .= interpretResult($retcode, $what); } $retval .= '
  • ' . LB; @@ -196,33 +212,34 @@ * @return string text explaining the result of the test * */ -function checkInstallDir () +function checkInstallDir() { - global $_CONF, $failed_tests; + global $_CONF, $LANG_SECTEST, $failed_tests; $retval = ''; // we don't have the path to the admin directory, so try to figure it out // from $_CONF['site_admin_url'] $adminurl = $_CONF['site_admin_url']; - if (strrpos ($adminurl, '/') == strlen ($adminurl)) { - $adminurl = substr ($adminurl, 0, -1); + if (strrpos($adminurl, '/') == strlen($adminurl)) { + $adminurl = substr($adminurl, 0, -1); } - $pos = strrpos ($adminurl, '/'); + $pos = strrpos($adminurl, '/'); if ($pos === false) { // only guessing ... $installdir = $_CONF['path_html'] . 'admin/install'; } else { - $installdir = $_CONF['path_html'] . substr ($adminurl, $pos + 1) + $installdir = $_CONF['path_html'] . substr($adminurl, $pos + 1) . '/install'; } - if (is_dir ($installdir)) { - $retval .= '
  • You should really remove the install directory ' . $installdir .' once you have your site up and running without any errors.'; - $retval .= ' Keeping it around would allow malicious users the ability to destroy your current install, take over your site, or retrieve sensitive information.
  • '; + if (is_dir($installdir)) { + $retval .= '
  • ' . sprintf($LANG_SECTEST['remove_inst'], + '' . $installdir . '') . ' ' + . $LANG_SECTEST['remove_inst2'] . '
  • '; $failed_tests++; } else { - $retval .= '
  • Good! You seem to have removed the install directory already.
  • '; + $retval .= '
  • ' . $LANG_SECTEST['inst_removed'] . '
  • '; } return $retval; @@ -237,9 +254,9 @@ * @return string text explaining the result of the test * */ -function checkDefaultPassword () +function checkDefaultPassword() { - global $_TABLES, $failed_tests; + global $_TABLES, $LANG_SECTEST, $failed_tests; $retval = ''; @@ -259,76 +276,87 @@ } } if ($pwdRoot > 0) { - $retval .= '
  • You still have not changed the default password from "password" on ' . $pwdRoot . ' Root user account(s).'; From geeklog-cvs at lists.geeklog.net Sun Apr 19 06:22:40 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 19 Apr 2009 06:22:40 -0400 Subject: [geeklog-cvs] tools: Added $LANG_SECTEST Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/d60e486139e8 changeset: 33:d60e486139e8 user: Dirk Haun date: Sun Apr 19 12:22:27 2009 +0200 description: Added $LANG_SECTEST diffstat: 2 files changed, 4 insertions(+), 1 deletion(-) lm/README | 3 ++- lm/include/core.inc | 2 ++ diffs (34 lines): diff -r 03daab5f96b0 -r d60e486139e8 lm/README --- a/lm/README Sat Apr 18 13:24:44 2009 +0200 +++ b/lm/README Sun Apr 19 12:22:27 2009 +0200 @@ -1,4 +1,4 @@ -lm.php v1.0.2 +lm.php v1.0.3 This script merges a Geeklog (foreign) language file with the english.php language file, so that new strings added to english.php are automatically added @@ -61,4 +61,5 @@ 1.0 now supports core language files and all 5 default plugins 1.0.1 fixed handling of
    tags and fixed accidentally created tags 1.0.2 added support for install script language files +1.0.3 added $LANG_SECTEST diff -r 03daab5f96b0 -r d60e486139e8 lm/include/core.inc --- a/lm/include/core.inc Sat Apr 18 13:24:44 2009 +0200 +++ b/lm/include/core.inc Sun Apr 19 12:22:27 2009 +0200 @@ -85,6 +85,7 @@ $ENGLO = $LANG_LOGIN; $ENGTB = $LANG_TRB; $ENGDI = $LANG_DIR; +$ENGSEC = $LANG_SECTEST; $ENGWN = $LANG_WHATSNEW; $ENGMO = $LANG_MONTH; $ENGWK = $LANG_WEEK; @@ -187,6 +188,7 @@ mergeArrays($ENGLO, $LANG_LOGIN, 'LANG_LOGIN', 'login form'); mergeArrays($ENGTB, $LANG_TRB, 'LANG_TRB', 'trackback.php'); mergeArrays($ENGDI, $LANG_DIR, 'LANG_DIR', 'directory.php'); +mergeArrays($ENGSEC, $LANG_SECTEST, 'LANG_SECTEST', 'admin/sectest.php'); mergeArrays($ENGWN, $LANG_WHATSNEW, 'LANG_WHATSNEW', "\"What's New\" Time Strings\n\nFor the first two strings, you can use the following placeholders.\nOrder them so it makes sense in your language:\n%i item, \"Stories\"\n%n amount, \"2\", \"20\" etc.\n%t time, \"2\" (weeks)\n%s scale, \"hrs\", \"weeks\""); mergeArrays($ENGMO, $LANG_MONTH, 'LANG_MONTH', 'Month names'); mergeArrays($ENGWK, $LANG_WEEK, 'LANG_WEEK', 'Weekdays'); From geeklog-cvs at lists.geeklog.net Mon Apr 20 08:13:43 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Mon, 20 Apr 2009 08:13:43 -0400 Subject: [geeklog-cvs] geeklog: Added canonical link for article directory Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/5f138083df5a changeset: 6969:5f138083df5a user: Dirk Haun date: Sun Apr 19 13:50:33 2009 +0200 description: Added canonical link for article directory diffstat: 1 file changed, 36 insertions(+), 6 deletions(-) public_html/directory.php | 42 ++++++++++++++++++++++++++++++++++++------ diffs (78 lines): diff -r a9b4ce455fdf -r 5f138083df5a public_html/directory.php --- a/public_html/directory.php Sun Apr 19 12:16:59 2009 +0200 +++ b/public_html/directory.php Sun Apr 19 13:50:33 2009 +0200 @@ -51,7 +51,7 @@ COM_getBlockTemplate ('_msg_block', 'header')); $login = new Template ($_CONF['path_layout'] . 'submit'); $login->set_file (array ('login' => 'submitloginrequired.thtml')); - $login->set_var ( 'xhtml', XHTML ); + $login->set_var ('xhtml', XHTML); $login->set_var ('site_url', $_CONF['site_url']); $login->set_var ('layout_url', $_CONF['layout_url']); $login->set_var ('login_message', $LANG_LOGIN[2]); @@ -449,6 +449,35 @@ return $retval; } +/** +* Return a canonical link +* +* @param string $topic current topic or 'all' +* @param int $year current year +* @param int $month current month +* @return string tag +* +*/ +function DIR_canonicalLink($topic, $year = 0, $month = 0) +{ + global $_CONF; + + $script = $_CONF['site_url'] . '/' . THIS_SCRIPT; + + $tp = '?topic=' . urlencode($topic); + $parts = ''; + if (($year != 0) && ($month != 0)) { + $parts .= "&year=$year&month=$month"; + } elseif ($year != 0) { + $parts .= "&year=$year"; + } elseif ($topic == 'all') { + $tp = ''; + } + $url = COM_buildUrl($script . $tp . $parts); + + return '' . LB; +} + // MAIN $display = ''; @@ -487,7 +516,8 @@ if ($topic != 'all') { $title .= ': ' . $topicName; } - $display .= COM_siteHeader ('menu', $title); + $display .= COM_siteHeader('menu', $title, + DIR_canonicalLink($topic, $year, $month)); $display .= DIR_displayMonth ($topic, $year, $month, true); $display .= DIR_navBar ($topic, $year, $month); } else if ($year != 0) { @@ -495,15 +525,15 @@ if ($topic != 'all') { $title .= ': ' . $topicName; } - $display .= COM_siteHeader ('menu', $title); - $display .= DIR_displayYear ($topic, $year, true); - $display .= DIR_navBar ($topic, $year); + $display .= COM_siteHeader('menu', $title, DIR_canonicalLink($topic, $year)); + $display .= DIR_displayYear($topic, $year, true); + $display .= DIR_navBar($topic, $year); } else { $title = $LANG_DIR['title']; if ($topic != 'all') { $title .= ': ' . $topicName; } - $display .= COM_siteHeader('menu', $title); + $display .= COM_siteHeader('menu', $title, DIR_canonicalLink($topic)); $display .= DIR_displayAll($topic, $conf_list_current_month); } From geeklog-cvs at lists.geeklog.net Mon Apr 20 08:13:45 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Mon, 20 Apr 2009 08:13:45 -0400 Subject: [geeklog-cvs] geeklog: Experimental feature: Optionally compress output before... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/ebf565e1c06f changeset: 6970:ebf565e1c06f user: Dirk Haun date: Sun Apr 19 16:57:27 2009 +0200 description: Experimental feature: Optionally compress output before sending it to the browser (disabled by default) diffstat: 44 files changed, 172 insertions(+), 119 deletions(-) language/english.php | 1 language/english_utf-8.php | 1 public_html/404.php | 30 +++++++-------- public_html/admin/auth.inc.php | 4 +- public_html/admin/block.php | 5 +- public_html/admin/configuration.php | 2 - public_html/admin/database.php | 4 +- public_html/admin/group.php | 4 +- public_html/admin/install/config-install.php | 1 public_html/admin/mail.php | 4 +- public_html/admin/moderation.php | 2 - public_html/admin/plugins.php | 4 +- public_html/admin/plugins/calendar/index.php | 5 +- public_html/admin/plugins/links/category.php | 4 +- public_html/admin/plugins/links/index.php | 6 +-- public_html/admin/plugins/polls/index.php | 6 +-- public_html/admin/plugins/spamx/index.php | 4 +- public_html/admin/plugins/staticpages/index.php | 4 +- public_html/admin/sectest.php | 4 +- public_html/admin/story.php | 10 ++--- public_html/admin/syndication.php | 10 ++--- public_html/admin/topic.php | 8 ++-- public_html/admin/trackback.php | 4 +- public_html/admin/user.php | 6 +-- public_html/article.php | 2 - public_html/calendar/event.php | 6 +-- public_html/calendar/index.php | 10 ++--- public_html/comment.php | 2 - public_html/directory.php | 4 +- public_html/docs/english/config.html | 10 +++++ public_html/docs/history | 2 + public_html/index.php | 4 +- public_html/lib-common.php | 44 +++++++++++++++++++++++ public_html/links/index.php | 8 ++-- public_html/polls/index.php | 2 - public_html/profiles.php | 6 +-- public_html/search.php | 12 ++---- public_html/staticpages/index.php | 2 - public_html/stats.php | 14 +++---- public_html/submit.php | 12 ++---- public_html/users.php | 4 +- public_html/usersettings.php | 8 ++-- sql/updates/mssql_1.5.2_to_1.6.0.php | 3 + sql/updates/mysql_1.5.2_to_1.6.0.php | 3 + diffs (truncated from 1111 to 300 lines): diff -r 5f138083df5a -r ebf565e1c06f language/english.php --- a/language/english.php Sun Apr 19 13:50:33 2009 +0200 +++ b/language/english.php Sun Apr 19 16:57:27 2009 +0200 @@ -1835,6 +1835,7 @@ 'skip_html_filter_for_root' => "Skip HTML Filter for Root?", 'allowed_protocols' => "Allowed Protocols", 'disable_autolinks' => "Disable Autolinks?", + 'compressed_output' => 'Send compressed output?', 'censormode' => "Censor Mode?", 'censorreplace' => "Censor Replace Text", 'censorlist' => "Censor List", diff -r 5f138083df5a -r ebf565e1c06f language/english_utf-8.php --- a/language/english_utf-8.php Sun Apr 19 13:50:33 2009 +0200 +++ b/language/english_utf-8.php Sun Apr 19 16:57:27 2009 +0200 @@ -1835,6 +1835,7 @@ 'skip_html_filter_for_root' => "Skip HTML Filter for Root?", 'allowed_protocols' => "Allowed Protocols", 'disable_autolinks' => "Disable Autolinks?", + 'compressed_output' => 'Send compressed output?', 'censormode' => "Censor Mode?", 'censorreplace' => "Censor Replace Text", 'censorlist' => "Censor List", diff -r 5f138083df5a -r ebf565e1c06f public_html/404.php --- a/public_html/404.php Sun Apr 19 13:50:33 2009 +0200 +++ b/public_html/404.php Sun Apr 19 16:57:27 2009 +0200 @@ -2,13 +2,13 @@ /* Reminder: always indent with 4 spaces (no tabs). */ // +---------------------------------------------------------------------------+ -// | Geeklog 1.3 | +// | Geeklog 1.6 | // +---------------------------------------------------------------------------+ // | 404.php | // | | // | Geeklog "404 Not Found" page | // +---------------------------------------------------------------------------+ -// | Copyright (C) 2000-2005 by the following authors: | +// | Copyright (C) 2000-2009 by the following authors: | // | | // | Authors: Tony Bibbs - tony AT tonybibbs DOT com | // | Jason Whittenburg - jwhitten AT securitygeeks DOT com | @@ -30,29 +30,27 @@ // | Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | // | | // +---------------------------------------------------------------------------+ -// -// $Id: 404.php,v 1.10 2005/06/23 08:06:09 dhaun Exp $ -require_once ('lib-common.php'); +require_once 'lib-common.php'; -$display = COM_siteHeader ('menu', $LANG_404[1]); -$display .= COM_startBlock ($LANG_404[1]); -if (isset ($_SERVER['SCRIPT_URI'])) { - $url = strip_tags ($_SERVER['SCRIPT_URI']); +$display = COM_siteHeader('menu', $LANG_404[1]); +$display .= COM_startBlock($LANG_404[1]); +if (isset($_SERVER['SCRIPT_URI'])) { + $url = strip_tags($_SERVER['SCRIPT_URI']); } else { - $pos = strpos ($_SERVER['REQUEST_URI'], '?'); + $pos = strpos($_SERVER['REQUEST_URI'], '?'); if ($pos === false) { $request = $_SERVER['REQUEST_URI']; } else { - $request = substr ($_SERVER['REQUEST_URI'], 0, $pos); + $request = substr($_SERVER['REQUEST_URI'], 0, $pos); } - $url = 'http://' . $_SERVER['HTTP_HOST'] . strip_tags ($request); + $url = 'http://' . $_SERVER['HTTP_HOST'] . strip_tags($request); } -$display .= sprintf ($LANG_404[2], $url); +$display .= sprintf($LANG_404[2], $url); $display .= $LANG_404[3]; -$display .= COM_endBlock (); -$display .= COM_siteFooter (); +$display .= COM_endBlock(); +$display .= COM_siteFooter(); -echo $display +COM_output($display); ?> diff -r 5f138083df5a -r ebf565e1c06f public_html/admin/auth.inc.php --- a/public_html/admin/auth.inc.php Sun Apr 19 13:50:33 2009 +0200 +++ b/public_html/admin/auth.inc.php Sun Apr 19 16:57:27 2009 +0200 @@ -39,7 +39,7 @@ // MAIN COM_clearSpeedlimit($_CONF['login_speedlimit'], 'login'); if (COM_checkSpeedlimit('login', $_CONF['login_attempts']) > 0) { - COM_displayMessageAndAbort($LANG04[112], '', 403, 'Access denied'); + COM_outputMessageAndAbort($LANG04[112], '', 403, 'Access denied'); } $uid = ''; @@ -123,7 +123,7 @@ $display .= COM_endBlock() . COM_siteFooter(); - echo $display; + COM_output($display); exit; } diff -r 5f138083df5a -r ebf565e1c06f public_html/admin/block.php --- a/public_html/admin/block.php Sun Apr 19 13:50:33 2009 +0200 +++ b/public_html/admin/block.php Sun Apr 19 16:57:27 2009 +0200 @@ -48,7 +48,7 @@ . COM_showMessageText($MESSAGE[29], $MESSAGE[30]) . COM_siteFooter(); COM_accessLog("User {$_USER['username']} tried to illegally access the block administration screen"); - echo $display; + COM_output($display); exit; } @@ -848,5 +848,6 @@ $display .= COM_siteFooter(); } -echo $display; +COM_output($display); + ?> diff -r 5f138083df5a -r ebf565e1c06f public_html/admin/configuration.php --- a/public_html/admin/configuration.php Sun Apr 19 13:50:33 2009 +0200 +++ b/public_html/admin/configuration.php Sun Apr 19 16:57:27 2009 +0200 @@ -119,6 +119,6 @@ ? $_POST['subgroup'] : null); } -echo $display; +COM_output($display); ?> diff -r 5f138083df5a -r ebf565e1c06f public_html/admin/database.php --- a/public_html/admin/database.php Sun Apr 19 13:50:33 2009 +0200 +++ b/public_html/admin/database.php Sun Apr 19 16:57:27 2009 +0200 @@ -43,7 +43,7 @@ . COM_showMessageText($MESSAGE[29], $MESSAGE[30]) . COM_siteFooter(); COM_accessLog("User {$_USER['username']} tried to illegally access the database backup screen."); - echo $display; + COM_output($display); exit; } @@ -322,6 +322,6 @@ $display .= COM_siteFooter(); -echo $display; +COM_output($display); ?> diff -r 5f138083df5a -r ebf565e1c06f public_html/admin/group.php --- a/public_html/admin/group.php Sun Apr 19 13:50:33 2009 +0200 +++ b/public_html/admin/group.php Sun Apr 19 16:57:27 2009 +0200 @@ -62,7 +62,7 @@ . COM_showMessageText($MESSAGE[29], $MESSAGE[30]) . COM_siteFooter(); COM_accessLog("User {$_USER['username']} tried to illegally access the group administration screen."); - echo $display; + COM_output($display); exit; } @@ -1086,6 +1086,6 @@ $display .= COM_siteFooter(); } -echo $display; +COM_output($display); ?> diff -r 5f138083df5a -r ebf565e1c06f public_html/admin/install/config-install.php --- a/public_html/admin/install/config-install.php Sun Apr 19 13:50:33 2009 +0200 +++ b/public_html/admin/install/config-install.php Sun Apr 19 16:57:27 2009 +0200 @@ -313,6 +313,7 @@ $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); + $c->add('compressed_output',0,'select',7,31,1,1755,TRUE); $c->add('fs_debug', NULL, 'fieldset', 7, 32, NULL, 0, TRUE); $c->add('rootdebug',FALSE,'select',7,32,1,520,TRUE); diff -r 5f138083df5a -r ebf565e1c06f public_html/admin/mail.php --- a/public_html/admin/mail.php Sun Apr 19 13:50:33 2009 +0200 +++ b/public_html/admin/mail.php Sun Apr 19 16:57:27 2009 +0200 @@ -41,7 +41,7 @@ . COM_showMessageText($MESSAGE[29], $MESSAGE[30]) . COM_siteFooter(); COM_accessLog("User {$_USER['username']} tried to illegally access the mail administration screen."); - echo $display; + COM_output($display); exit; } @@ -237,6 +237,6 @@ $display .= COM_siteFooter (); -echo $display; +COM_output($display); ?> diff -r 5f138083df5a -r ebf565e1c06f public_html/admin/moderation.php --- a/public_html/admin/moderation.php Sun Apr 19 13:50:33 2009 +0200 +++ b/public_html/admin/moderation.php Sun Apr 19 16:57:27 2009 +0200 @@ -765,6 +765,6 @@ $display .= COM_siteFooter(); -echo $display; +COM_output($display); ?> diff -r 5f138083df5a -r ebf565e1c06f public_html/admin/plugins.php --- a/public_html/admin/plugins.php Sun Apr 19 13:50:33 2009 +0200 +++ b/public_html/admin/plugins.php Sun Apr 19 16:57:27 2009 +0200 @@ -66,7 +66,7 @@ . COM_showMessageText($MESSAGE[29], $MESSAGE[30]) . COM_siteFooter(); COM_accessLog("User {$_USER['username']} tried to illegally access the plugin administration screen."); - echo $display; + COM_output($display); exit; } @@ -1243,6 +1243,6 @@ } -echo $display; +COM_output($display); ?> diff -r 5f138083df5a -r ebf565e1c06f public_html/admin/plugins/calendar/index.php --- a/public_html/admin/plugins/calendar/index.php Sun Apr 19 13:50:33 2009 +0200 +++ b/public_html/admin/plugins/calendar/index.php Sun Apr 19 16:57:27 2009 +0200 @@ -51,7 +51,7 @@ // Log attempt to access.log COM_accessLog("User {$_USER['username']} tried to illegally access the event administration screen."); - echo $display; + COM_output($display); exit; } @@ -684,6 +684,7 @@ $display .= CALENDAR_listevents(); $display .= COM_siteFooter (); } -echo $display; + +COM_output($display); ?> diff -r 5f138083df5a -r ebf565e1c06f public_html/admin/plugins/links/category.php --- a/public_html/admin/plugins/links/category.php Sun Apr 19 13:50:33 2009 +0200 +++ b/public_html/admin/plugins/links/category.php Sun Apr 19 16:57:27 2009 +0200 @@ -68,7 +68,7 @@ . COM_showMessageText($MESSAGE[29], $MESSAGE[30]) . COM_siteFooter(); COM_accessLog("User {$_USER['username']} tried to illegally access the link category administration screen."); - echo $display; + COM_output($display); exit; } @@ -564,6 +564,6 @@ $display .= COM_siteFooter(); } -echo $display; +COM_output($display); ?> diff -r 5f138083df5a -r ebf565e1c06f public_html/admin/plugins/links/index.php --- a/public_html/admin/plugins/links/index.php Sun Apr 19 13:50:33 2009 +0200 +++ b/public_html/admin/plugins/links/index.php Sun Apr 19 16:57:27 2009 +0200 @@ -68,7 +68,7 @@ . COM_showMessageText($MESSAGE[29], $MESSAGE[30]) . COM_siteFooter(); COM_accessLog("User {$_USER['username']} tried to illegally access the links administration screen."); - echo $display; + COM_output($display); exit; } @@ -309,7 +309,7 @@ . COM_showMessageText($MESSAGE[29], $MESSAGE[30]) . COM_siteFooter(); COM_accessLog("User {$_USER['username']} tried to illegally submit or edit link $lid."); - echo $display; + COM_output($display); exit; } elseif (!empty($title) && !empty($description) && !empty($url)) { @@ -551,6 +551,6 @@ From geeklog-cvs at lists.geeklog.net Mon Apr 20 08:13:45 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Mon, 20 Apr 2009 08:13:45 -0400 Subject: [geeklog-cvs] geeklog: Some documentation updates Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/005ae6dbbba0 changeset: 6971:005ae6dbbba0 user: Dirk Haun date: Sun Apr 19 18:39:22 2009 +0200 description: Some documentation updates diffstat: 5 files changed, 49 insertions(+), 44 deletions(-) public_html/docs/english/changes.html | 1 public_html/docs/english/config.html | 4 +- public_html/docs/english/index.html | 60 ++++++++++++++++----------------- public_html/docs/english/install.html | 24 +++++++------ public_html/docs/english/support.html | 4 +- diffs (207 lines): diff -r ebf565e1c06f -r 005ae6dbbba0 public_html/docs/english/changes.html --- a/public_html/docs/english/changes.html Sun Apr 19 16:57:27 2009 +0200 +++ b/public_html/docs/english/changes.html Sun Apr 19 18:39:22 2009 +0200 @@ -34,6 +34,7 @@
    • The minimum PHP version required by Geeklog is now PHP 4.3.0. Given that the PHP team ended support for PHP 4 in August 2008, you should be looking into upgrading to PHP 5 anyway.
    • +
    • Includes FCKeditor 2.6.4
    diff -r ebf565e1c06f -r 005ae6dbbba0 public_html/docs/english/config.html --- a/public_html/docs/english/config.html Sun Apr 19 16:57:27 2009 +0200 +++ b/public_html/docs/english/config.html Sun Apr 19 18:39:22 2009 +0200 @@ -895,8 +895,8 @@ wikitext_editor false - Allow using wiki syntax in stories. This adds a third - option, "Wiki-style format", to the Post Mode dropdown in the story editor + Allow using wiki syntax in stories. This adds a third option, + "Wiki-style format", to the Post Mode dropdown in the story editor (implemented using the PEAR::Text_Wiki package). diff -r ebf565e1c06f -r 005ae6dbbba0 public_html/docs/english/index.html --- a/public_html/docs/english/index.html Sun Apr 19 16:57:27 2009 +0200 +++ b/public_html/docs/english/index.html Sun Apr 19 18:39:22 2009 +0200 @@ -60,52 +60,52 @@

    Blog/CMS Features

      -
    • Create, Schedule, Post and Edit articles in multiple topics -
    • Save story drafts until they are ready for publishing. -
    • Control over formatting used in articles (HTML whitelists) -
    • Control over acceptable content (filtering of offensive language) -
    • Embed images or other content in articles -
    • Multiple Authors can post -
    • Submissions from users -
    • Support for comments, trackbacks and pingbacks -
    • Export and import in all common syndication formats (RSS/RDF/Atom etc) -
    • Spam detection and rejection -
    • Robust calendar feature with support for personalized calendars. -
    • Support for OpenID and other remote authentication methods. -
    • Extendible via numerous Open Source plugins. +
    • Create, Schedule, Post and Edit articles in multiple topics
    • +
    • Save story drafts until they are ready for publishing.
    • +
    • Control over formatting used in articles (HTML whitelists)
    • +
    • Control over acceptable content (filtering of offensive language)
    • +
    • Embed images or other content in articles
    • +
    • Multiple Authors can post
    • +
    • Submissions from users
    • +
    • Support for comments, trackbacks and pingbacks
    • +
    • Export and import in all common syndication formats (RSS/RDF/Atom etc)
    • +
    • Spam detection and rejection
    • +
    • Robust calendar feature with support for personalized calendars.
    • +
    • Support for OpenID and other remote authentication methods.
    • +
    • Extendible via numerous Open Source plugins.

    Administration Features

      -
    • Easy to install with a new automated installer in 1.5 -
    • Fully support for internationalization and localization -
    • Easy to use admin interface -
    • Admin interface has complete configurability for all Geeklog Functions. -
    • User-specified theming engine for custom look and feel. +
    • Easy to install with an automated installer
    • +
    • Fully support for internationalization and localization
    • +
    • Easy to use admin interface
    • +
    • Admin interface has complete configurability for all Geeklog functions.
    • +
    • User-specified theming engine for custom look and feel.

    Security Features

      -
    • User accounts and access controls. +
    • User accounts and access controls.
    • Robust *nix-like security model for all objects which can be extended for - use in plugins -
    • Access can be defined for each article, topic etc -
    • All passwords are stored encrypted. -
    • All admin access is logged. -
    • All errors are logged. -
    • Complete error logging on all forms and SQL calls. + use in plugins
    • +
    • Access can be defined for each article, topic etc
    • +
    • All passwords are stored encrypted.
    • +
    • All admin access is logged.
    • +
    • All errors are logged.
    • +
    • Complete error logging on all forms and SQL calls.

    Developer Features

      -
    • Plugin support with API for developers. -
    • A fully configurable block system, with php-in-block support. -
    • Well organized codebase, use of PHP's Object-Oriented features. -
    • Thin database abstraction layer allowing Geeklog to be ported to DBMS's - other than the defaults (MySQL and MSSQL supported directly). +
    • Plugin support with API for developers.
    • +
    • A fully configurable block system, with php-in-block support.
    • +
    • Well organized codebase, use of PHP's Object-Oriented features.
    • +
    • Thin database abstraction layer allowing Geeklog to be ported to DBMS's
    • + other than the defaults (MySQL and MSSQL supported directly).

    Introduction

    diff -r ebf565e1c06f -r 005ae6dbbba0 public_html/docs/english/install.html --- a/public_html/docs/english/install.html Sun Apr 19 16:57:27 2009 +0200 +++ b/public_html/docs/english/install.html Sun Apr 19 18:39:22 2009 +0200 @@ -28,7 +28,8 @@
    • Directory: Same as a folder.
    • -
    • Path: A physical location on a server that describes where files and directories are. On Windows paths begin with the drive letter (c:/inetpub/wwwroot/), on *nix paths start at root (/) like (/var/www/)
    • +
    • Path: A physical location on a server that describes where files and directories are. On Windows paths begin with the drive letter (c:/inetpub/wwwroot/), on *nix paths start at root (/) like (/var/www/)
    • +
    • public_html: Common name for the directory on a webserver that contains all files that are accessible via a URL (other common names: htdocs, www)
    • URL: Uniform Resource Locator, the address of a specific piece of information on the web (http://www.foo.com/)
    @@ -37,7 +38,7 @@

    Required Software

    -

    To install and use Geeklog you will need to have a server running Apache or Microsoft IIS with PHP 4.1.0 or higher installed. You will also need either MySQL 3.23.2 or greater or Microsoft SQL Server 2000 or newer.

    +

    To install and use Geeklog you will need to have a server running Apache or Microsoft IIS with PHP 4.3.0 or higher installed. You will also need either MySQL 3.23.2 or greater or Microsoft SQL Server 2000 or newer.

    Things You Should Know

    @@ -58,7 +59,7 @@
  • Unpack the downloaded tarball file by running:

    -

    tar -zxvf geeklog-1.5.1.tar.gz

    +

    tar -zxvf geeklog-1.6.0.tar.gz

    Note: Some users have reported that WinZip corrupts certain Geeklog files during decompression. This will cause errors during the installation process. You are strongly urged not to use WinZip. Try 7-Zip or WinRAR if you must decompress the file locally.

  • @@ -66,9 +67,9 @@

    Create a blank MySQL or Microsoft SQL database and a user account with privileges to modify it. Your hosting provider may have already set up a database and account for you, contact them if you need assistance with this step.

  • -

    Place the contents of geeklog-1.5.1/public_html/ into your web root directory on your web server. The web root directory is often named "public_html", "htdocs", or "www".

    +

    Place the contents of geeklog-1.6.0/public_html/ into your web root directory on your web server. The web root directory is often named "public_html", "htdocs", or "www".

    -

    Next, place the remaining contents of geeklog-1.5.1/ into either the parent directory of your root web directory (recommended) or any other non public folder and the installation wizard will attempt to locate them automatically. If it cannot you will be asked to specify their paths during installation. This is done as a security measure to prevent access to Geeklog system files by Internet users.

    +

    Next, place the remaining contents of geeklog-1.6.0/ into either the parent directory of your root web directory (recommended) or any other non public folder and the installation wizard will attempt to locate them automatically. If it cannot you will be asked to specify their paths during installation. This is done as a security measure to prevent access to Geeklog system files by Internet users.

    Note: If your hosting provider does not allow you to place files outside of your root web directory:

      @@ -106,12 +107,12 @@
    • Unpack the downloaded tarball file by running:

      -

      tar -zxvf geeklog-1.5.1.tar.gz

      +

      tar -zxvf geeklog-1.6.0.tar.gz

      Note: Some users have reported that WinZip corrupts certain Geeklog files during decompression. This will cause errors during the installation process. You are strongly urged not to use WinZip. Try 7-Zip or WinRAR if you must decompress the file locally.

    • -

      Place the contents of geeklog-1.5.1/ into the same directory your old installation was located. For instance, if your old Geeklog was in /usr/home/www/geeklog/, then your new installation should also be in /usr/home/www/geeklog/.

      +

      Place the contents of geeklog-1.6.0/ into the same directory your old installation was located. For instance, if your old Geeklog was in /usr/home/www/geeklog/, then your new installation should also be in /usr/home/www/geeklog/.

    • Depending on the version you're upgrading from:
        @@ -213,16 +214,19 @@

        If you still have problems, please do one or more of the following:

        1. -

          Go to http://www.geeklog.net and check out the Support section. The Support section includes a FAQ and a search system (try searching for the error message, if you get one).

          +

          Go to http://www.geeklog.net and check out the Support section. The Support section includes a FAQ, forums, and a search system (try searching for the error message, if you get one).

        2. -

          Visit the mailing list archives at http://lists.geeklog.net/pipermail/geeklog-users/. You can also subscribe to the mailing list and post your question to the Geeklog community.

          +

          Visit the mailing list archives at http://lists.geeklog.net/pipermail/geeklog-users/. You can also subscribe to the mailing list and post your question to the Geeklog community.

        3. -

          Try the chat room at irc.freenode.net, channel #geeklog. Please have all your path information in siteconfig.php and lib-common.php readily available.

          +

          Try the chat room at irc.freenode.net, channel #geeklog. Please have all your path and database information in siteconfig.php and db-config.php readily available.

        4. Try entering the text of the error message on Google. Chances are you will find someone else who had the same problem and fixed it. And sometimes searching for a specific error will cause Google to bring up broken pages that have the same error.

          +
        5. +
        6. +

          Even more support options are listed elswhere in this documentation.

        diff -r ebf565e1c06f -r 005ae6dbbba0 public_html/docs/english/support.html --- a/public_html/docs/english/support.html Sun Apr 19 16:57:27 2009 +0200 +++ b/public_html/docs/english/support.html Sun Apr 19 18:39:22 2009 +0200 @@ -53,9 +53,9 @@

        Development

        -

        Want to develop a plugin or some other add-on? Read the Plugins Developer's Guide and join the geeklog-modules and geeklog-devel mailing lists.

        +

        Want to develop a plugin or some other add-on? Read the Plugins Developer's Guide and join the geeklog-modules and geeklog-devel mailing lists.

        -

        Want to help in Geeklog development? See this story for suggestions on how to get started. And if you already made a modification, why not submit a patch? +

        Want to help in Geeklog development? See this story for suggestions on how to get started. And if you already made a modification, why not submit a patch?

        Security Issues

        From geeklog-cvs at lists.geeklog.net Mon Apr 20 08:13:45 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Mon, 20 Apr 2009 08:13:45 -0400 Subject: [geeklog-cvs] geeklog: Changed some default settings Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/1e5dde053c54 changeset: 6972:1e5dde053c54 user: Dirk Haun date: Sun Apr 19 19:34:29 2009 +0200 description: Changed some default settings diffstat: 3 files changed, 17 insertions(+), 10 deletions(-) public_html/admin/install/config-install.php | 8 ++++---- public_html/docs/english/config.html | 14 ++++++++------ public_html/docs/history | 5 +++++ diffs (103 lines): diff -r 005ae6dbbba0 -r 1e5dde053c54 public_html/admin/install/config-install.php --- a/public_html/admin/install/config-install.php Sun Apr 19 18:39:22 2009 +0200 +++ b/public_html/admin/install/config-install.php Sun Apr 19 19:34:29 2009 +0200 @@ -154,7 +154,7 @@ $c->add('link_versionchecker',1,'select',3,12,0,1160,TRUE); $c->add('fs_topics_block', NULL, 'fieldset', 3, 13, NULL, 0, TRUE); - $c->add('sortmethod','sortnum','select',3,13,15,870,TRUE); + $c->add('sortmethod','alpha','select',3,13,15,870,TRUE); $c->add('showstorycount',1,'select',3,13,0,880,TRUE); $c->add('showsubmissioncount',1,'select',3,13,0,890,TRUE); $c->add('hide_home_link',0,'select',3,13,0,900,TRUE); @@ -225,7 +225,7 @@ $c->add('fs_comments', NULL, 'fieldset', 4, 21, NULL, 0, TRUE); $c->add('commentspeedlimit',45,'text',4,21,NULL,1640,TRUE); $c->add('comment_limit',100,'text',4,21,NULL,1650,TRUE); - $c->add('comment_mode','threaded','select',4,21,11,1660,TRUE); + $c->add('comment_mode','nested','select',4,21,11,1660,TRUE); $c->add('comment_code',0,'select',4,21,17,1670,TRUE); $c->add('comment_edit',0,'select',4,21,0,1680,TRUE); $c->add('commentsubmission',0,'select',4,21,0, 1682, TRUE); @@ -311,7 +311,7 @@ $c->add('fs_misc', NULL, 'fieldset', 7, 31, NULL, 0, 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('cron_schedule_interval',0,'text',7,31,NULL,860,TRUE); $c->add('disable_autolinks',0,'select',7,31,0,1750,TRUE); $c->add('compressed_output',0,'select',7,31,1,1755,TRUE); @@ -349,7 +349,7 @@ $c->add('default_permissions_block',array(3, 2, 2, 2),'@select',7,39,12,1810,TRUE); $c->add('fs_webservices', NULL, 'fieldset', 7, 40, NULL, 0, TRUE); - $c->add('disable_webservices', 0, 'select', 7, 40, 0, 1840, TRUE); + $c->add('disable_webservices', 1, 'select', 7, 40, 0, 1840, TRUE); $c->add('restrict_webservices', 0, 'select', 7, 40, 0, 1850, TRUE); $c->add('atom_max_stories', 10, 'text', 7, 40, 0, 1860, TRUE); } diff -r 005ae6dbbba0 -r 1e5dde053c54 public_html/docs/english/config.html --- a/public_html/docs/english/config.html Sun Apr 19 18:39:22 2009 +0200 +++ b/public_html/docs/english/config.html Sun Apr 19 19:34:29 2009 +0200 @@ -583,8 +583,9 @@ Description sortmethod - sortnum - alpha = Sort topics in topic list alphabetically
        sortnum = Sort topics in topic list by sort number + alpha + alpha = Sort topics in topic list alphabetically
        + sortnum = Sort topics in topic list by the given sort number showstorycount 1 @@ -916,7 +917,7 @@ Most number of comments to show at any one time comment_mode - threaded + nested How to display comments (threaded, nested, flat or nocomments) comment_code @@ -1304,12 +1305,13 @@ comments. cron_schedule_interval - 86400 + 0 Geeklog can emulate a cronjob, i.e. trigger a certain action at a given time. The code to be executed can be provided by a plugin or through the CUSTOM_runScheduledTask function in your lib-custom.php. The value given is in seconds and specifies the - interval in which the code should be executed.
        + interval in which the code should be executed (e.g. 86400 for daily + activation).
        Please note that to trigger this action, you will need to have someone visit your site at around the specified time. On a site with few visitors, the code may only be executed with considerable delay.
        @@ -1328,7 +1330,7 @@ (usually between 20% and 25%, compared to the uncompressed output). It may, however, result in slightly more load on the webserver.
        For now, this feature should be considered experimental and - hasn't been implemented for all HTML output yet. + hasn't been implemented for all HTML output yet.

        Miscellaneous: Debug

        diff -r 005ae6dbbba0 -r 1e5dde053c54 public_html/docs/history --- a/public_html/docs/history Sun Apr 19 18:39:22 2009 +0200 +++ b/public_html/docs/history Sun Apr 19 19:34:29 2009 +0200 @@ -11,6 +11,11 @@ + Comment moderation and editable comments, by Jared Wenerd Other changes: +- Changed some default settings: + * Webservices are now disabled + * Cronjob emulation is off + * Default sort for topics is alphabetically + * Default comment mode is nested - Experimental: Compress HTML output before sending it to the browser (disabled by default; has to be supported by both the browser and the webserver) [Dirk] - Moved hard-coded texts from admin/sectest.php to the language files (bug From geeklog-cvs at lists.geeklog.net Mon Apr 20 08:13:48 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Mon, 20 Apr 2009 08:13:48 -0400 Subject: [geeklog-cvs] geeklog: Added missing description of the new comment settings Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/f0f43376dda6 changeset: 6973:f0f43376dda6 user: Dirk Haun date: Sun Apr 19 19:56:11 2009 +0200 description: Added missing description of the new comment settings diffstat: 1 file changed, 31 insertions(+) public_html/docs/english/config.html | 31 +++++++++++++++++++++++++++++++ diffs (41 lines): diff -r 1e5dde053c54 -r f0f43376dda6 public_html/docs/english/config.html --- a/public_html/docs/english/config.html Sun Apr 19 19:34:29 2009 +0200 +++ b/public_html/docs/english/config.html Sun Apr 19 19:56:11 2009 +0200 @@ -923,6 +923,37 @@ comment_code 0 Default value for new stories: Comments enabled (0) or disabled (-1) + + comment_edit + 0 + Whether to allow users and admins to edit comments. + + commentsubmission + 0 + Enable (1) or disable (0) comment submission queue. + + comment_edittime + 1800 + How long (in seconds) a comment is editable for the user who + submitted it. Requires that comments are editable (see above). Anonymous users (those that did not register an account) can + never edit their comments while admins can always edit comments. + + article_comment_close_days + 30 + Number of days after which a story is automatically closed + for comments, i.e. no new comments can be posted after that many days. + + comment_close_rec_stories + 0 + Number of most recent stories for which comment posting is + allowed. Posting a new story will automatically close comments for the + oldest of these stories. + + allow_reply_notifications + 0 + Allow (1) or disallow (0) subscribing to comment + notifications. Registered users can get an email notifying them of direct + replies to comments they left. From geeklog-cvs at lists.geeklog.net Mon Apr 20 08:13:52 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Mon, 20 Apr 2009 08:13:52 -0400 Subject: [geeklog-cvs] geeklog: Forgot the language file addition for the clickable lin... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/10ee0d905977 changeset: 6975:10ee0d905977 user: Dirk Haun date: Sun Apr 19 22:23:01 2009 +0200 description: Forgot the language file addition for the clickable links option diffstat: 2 files changed, 2 insertions(+) language/english.php | 1 + language/english_utf-8.php | 1 + diffs (22 lines): diff -r c9bf3ef501e3 -r 10ee0d905977 language/english.php --- a/language/english.php Sun Apr 19 21:45:18 2009 +0200 +++ b/language/english.php Sun Apr 19 22:23:01 2009 +0200 @@ -1835,6 +1835,7 @@ 'skip_html_filter_for_root' => "Skip HTML Filter for Root?", 'allowed_protocols' => "Allowed Protocols", 'disable_autolinks' => "Disable Autolinks?", + 'clickable_links' => 'Make URLs clickable?', 'compressed_output' => 'Send compressed output?', 'censormode' => "Censor Mode?", 'censorreplace' => "Censor Replace Text", diff -r c9bf3ef501e3 -r 10ee0d905977 language/english_utf-8.php --- a/language/english_utf-8.php Sun Apr 19 21:45:18 2009 +0200 +++ b/language/english_utf-8.php Sun Apr 19 22:23:01 2009 +0200 @@ -1835,6 +1835,7 @@ 'skip_html_filter_for_root' => "Skip HTML Filter for Root?", 'allowed_protocols' => "Allowed Protocols", 'disable_autolinks' => "Disable Autolinks?", + 'clickable_links' => 'Make URLs clickable?', 'compressed_output' => 'Send compressed output?', 'censormode' => "Censor Mode?", 'censorreplace' => "Censor Replace Text", From geeklog-cvs at lists.geeklog.net Mon Apr 20 08:13:53 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Mon, 20 Apr 2009 08:13:53 -0400 Subject: [geeklog-cvs] geeklog: Removed duplicate code (already handled in CMT_prepareT... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/3040521a0550 changeset: 6976:3040521a0550 user: Dirk Haun date: Sun Apr 19 22:24:03 2009 +0200 description: Removed duplicate code (already handled in CMT_prepareText) diffstat: 1 file changed, 12 deletions(-) system/lib-comment.php | 12 ------------ diffs (22 lines): diff -r 10ee0d905977 -r 3040521a0550 system/lib-comment.php --- a/system/lib-comment.php Sun Apr 19 22:23:01 2009 +0200 +++ b/system/lib-comment.php Sun Apr 19 22:24:03 2009 +0200 @@ -811,18 +811,6 @@ $commenttext = htmlspecialchars (COM_stripslashes ($comment)); - $fakepostmode = $postmode; - if ($postmode == 'html') { - $html_perm = ($type == 'article') ? 'story.edit' : "$type.edit"; - $comment = COM_checkWords(COM_checkHTML(COM_stripslashes($comment), $html_perm)); - } else { - $comment = htmlspecialchars(COM_checkWords(COM_stripslashes($comment))); - $newcomment = COM_makeClickableLinks ($comment); - if (strcmp ($comment, $newcomment) != 0) { - $comment = nl2br ($newcomment); - $fakepostmode = 'html'; - } - } // Replace $, {, and } with special HTML equivalents $commenttext = str_replace('$','$',$commenttext); $commenttext = str_replace('{','{',$commenttext); From geeklog-cvs at lists.geeklog.net Mon Apr 20 08:13:54 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Mon, 20 Apr 2009 08:13:54 -0400 Subject: [geeklog-cvs] geeklog: Keep redundant data and the password hash out of $_USER Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/13162f373fa7 changeset: 6977:13162f373fa7 user: Dirk Haun date: Sun Apr 19 23:12:48 2009 +0200 description: Keep redundant data and the password hash out of $_USER diffstat: 1 file changed, 15 insertions(+), 10 deletions(-) system/lib-sessions.php | 25 +++++++++++++++---------- diffs (47 lines): diff -r 3040521a0550 -r 13162f373fa7 system/lib-sessions.php --- a/system/lib-sessions.php Sun Apr 19 22:24:03 2009 +0200 +++ b/system/lib-sessions.php Sun Apr 19 23:12:48 2009 +0200 @@ -455,28 +455,33 @@ * * Gets user's data based on their user id * -* @param int $userid User ID of user to get data for -* @return array returns user'd data in an array +* @param int $userid User ID of user to get data for +* @return array returns user's data in an array * */ function SESS_getUserDataFromId($userid) { global $_TABLES; - $sql = "SELECT *,format FROM {$_TABLES['dateformats']},{$_TABLES["users"]},{$_TABLES['userprefs']} " + $sql = "SELECT *,format FROM {$_TABLES['dateformats']},{$_TABLES['users']},{$_TABLES['userprefs']} " . "WHERE {$_TABLES['dateformats']}.dfid = {$_TABLES['userprefs']}.dfid AND " . "{$_TABLES['userprefs']}.uid = $userid AND {$_TABLES['users']}.uid = $userid"; - if(!$result = DB_query($sql)) { - $userdata = array("error" => "1"); - return ($userdata); + if (!$result = DB_query($sql)) { + $userdata = array('error' => '1'); + return $userdata; } - if(!$myrow = DB_fetchArray($result)) { - $userdata = array("error" => "1"); - return ($userdata); + if (!$myrow = DB_fetchArray($result, false)) { + $userdata = array('error' => '1'); + return $userdata; } - return($myrow); + + if (isset($myrow['passwd'])) { + unset($myrow['passwd']); + } + + return $myrow; } ?> From geeklog-cvs at lists.geeklog.net Mon Apr 20 08:13:50 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Mon, 20 Apr 2009 08:13:50 -0400 Subject: [geeklog-cvs] geeklog: Added a config option to enable/disable clickable links Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/c9bf3ef501e3 changeset: 6974:c9bf3ef501e3 user: Dirk Haun date: Sun Apr 19 21:45:18 2009 +0200 description: Added a config option to enable/disable clickable links diffstat: 6 files changed, 24 insertions(+), 4 deletions(-) public_html/admin/install/config-install.php | 3 ++- public_html/docs/english/config.html | 5 +++++ public_html/docs/history | 4 +++- public_html/lib-common.php | 6 ++++++ sql/updates/mssql_1.5.2_to_1.6.0.php | 5 ++++- sql/updates/mysql_1.5.2_to_1.6.0.php | 5 ++++- diffs (90 lines): diff -r f0f43376dda6 -r c9bf3ef501e3 public_html/admin/install/config-install.php --- a/public_html/admin/install/config-install.php Sun Apr 19 19:56:11 2009 +0200 +++ b/public_html/admin/install/config-install.php Sun Apr 19 21:45:18 2009 +0200 @@ -313,7 +313,8 @@ $c->add('notification',array(),'%text',7,31,NULL,800,TRUE); $c->add('cron_schedule_interval',0,'text',7,31,NULL,860,TRUE); $c->add('disable_autolinks',0,'select',7,31,0,1750,TRUE); - $c->add('compressed_output',0,'select',7,31,1,1755,TRUE); + $c->add('clickable_links',1,'select',7,31,1,1753,TRUE); + $c->add('compressed_output',0,'select',7,31,1,1757,TRUE); $c->add('fs_debug', NULL, 'fieldset', 7, 32, NULL, 0, TRUE); $c->add('rootdebug',FALSE,'select',7,32,1,520,TRUE); diff -r f0f43376dda6 -r c9bf3ef501e3 public_html/docs/english/config.html --- a/public_html/docs/english/config.html Sun Apr 19 19:56:11 2009 +0200 +++ b/public_html/docs/english/config.html Sun Apr 19 21:45:18 2009 +0200 @@ -1353,6 +1353,11 @@ If set to 1, disables the autolinks. I.e. links using the [story:] etc. syntax are not interpreted any more. + clickable_links + true + Whether or not URLs in plain-text posting should + automatically be turned into clickable links. + disable_compressed_output false If enabled and supported by both the browser and the diff -r f0f43376dda6 -r c9bf3ef501e3 public_html/docs/history --- a/public_html/docs/history Sun Apr 19 19:56:11 2009 +0200 +++ b/public_html/docs/history Sun Apr 19 21:45:18 2009 +0200 @@ -11,7 +11,9 @@ + Comment moderation and editable comments, by Jared Wenerd Other changes: -- Changed some default settings: +- Added a config option to enable/disable automatically turning URLs in text + postings into clickable URLs [Dirk] +- Changed some default settings [Dirk]: * Webservices are now disabled * Cronjob emulation is off * Default sort for topics is alphabetically diff -r f0f43376dda6 -r c9bf3ef501e3 public_html/lib-common.php --- a/public_html/lib-common.php Sun Apr 19 19:56:11 2009 +0200 +++ b/public_html/lib-common.php Sun Apr 19 21:45:18 2009 +0200 @@ -5742,6 +5742,12 @@ */ function COM_makeClickableLinks( $text ) { + global $_CONF; + + if (! $_CONF['clickable_links']) { + return $text; + } + // These regular expressions will work for this purpuse, but // they should NOT be used for validating links. diff -r f0f43376dda6 -r c9bf3ef501e3 sql/updates/mssql_1.5.2_to_1.6.0.php --- a/sql/updates/mssql_1.5.2_to_1.6.0.php Sun Apr 19 19:56:11 2009 +0200 +++ b/sql/updates/mssql_1.5.2_to_1.6.0.php Sun Apr 19 21:45:18 2009 +0200 @@ -128,8 +128,11 @@ // cookie to store name of anonymous commenters $c->add('cookie_anon_name','anon_name','text',7,30,NULL,577,TRUE); + // enable/disable clickable links + $c->add('clickable_links',1,'select',7,31,1,1753,TRUE); + // experimental: compress output before sending it to the browser - $c->add('compressed_output',0,'select',7,31,1,1755,TRUE); + $c->add('compressed_output',0,'select',7,31,1,1757,TRUE); return true; } diff -r f0f43376dda6 -r c9bf3ef501e3 sql/updates/mysql_1.5.2_to_1.6.0.php --- a/sql/updates/mysql_1.5.2_to_1.6.0.php Sun Apr 19 19:56:11 2009 +0200 +++ b/sql/updates/mysql_1.5.2_to_1.6.0.php Sun Apr 19 21:45:18 2009 +0200 @@ -114,8 +114,11 @@ // cookie to store name of anonymous commenters $c->add('cookie_anon_name','anon_name','text',7,30,NULL,577,TRUE); + // enable/disable clickable links + $c->add('clickable_links',1,'select',7,31,1,1753,TRUE); + // experimental: compress output before sending it to the browser - $c->add('compressed_output',0,'select',7,31,1,1755,TRUE); + $c->add('compressed_output',0,'select',7,31,1,1757,TRUE); return true; } From geeklog-cvs at lists.geeklog.net Mon Apr 20 08:13:55 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Mon, 20 Apr 2009 08:13:55 -0400 Subject: [geeklog-cvs] geeklog: Cosmetic change to the mail form to make the look more ... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/04bf6514d64c changeset: 6978:04bf6514d64c user: Dirk Haun date: Mon Apr 20 11:01:39 2009 +0200 description: Cosmetic change to the mail form to make the look more consistent with the other admin panels diffstat: 3 files changed, 65 insertions(+), 40 deletions(-) public_html/admin/mail.php | 93 ++++++++----- public_html/docs/english/theme.html | 4 public_html/layout/professional/admin/mail/mailform.thtml | 8 - diffs (159 lines): diff -r 13162f373fa7 -r 04bf6514d64c public_html/admin/mail.php --- a/public_html/admin/mail.php Sun Apr 19 23:12:48 2009 +0200 +++ b/public_html/admin/mail.php Mon Apr 20 11:01:39 2009 +0200 @@ -30,7 +30,19 @@ // | | // +---------------------------------------------------------------------------+ +/** +* Simple email form that lets you send emails to certain groups of users. +* +*/ + +/** +* Geeklog common function library +*/ require_once '../lib-common.php'; + +/** +* Security check to ensure user even belongs on this page +*/ require_once 'auth.inc.php'; $display = ''; @@ -54,22 +66,36 @@ */ function display_mailform () { - global $_CONF, $_TABLES, $_USER, $LANG31; + global $_CONF, $LANG31, $LANG_ADMIN, $_IMAGE_TYPE; + + require_once $_CONF['path_system'] . 'lib-admin.php'; $retval = ''; - $mail_templates = new Template ($_CONF['path_layout'] . 'admin/mail'); - $mail_templates->set_file (array ('form' => 'mailform.thtml')); - $mail_templates->set_var ('site_url', $_CONF['site_url']); - $mail_templates->set_var ('site_admin_url', $_CONF['site_admin_url']); - $mail_templates->set_var ('layout_url', $_CONF['layout_url']); - $mail_templates->set_var ('startblock_email', COM_startBlock ($LANG31[1], - '', COM_getBlockTemplate ('_admin_block', 'header'))); - $mail_templates->set_var ('php_self', $_CONF['site_admin_url'] - . '/mail.php'); - $mail_templates->set_var ('lang_note', $LANG31[19]); - $mail_templates->set_var ('lang_to', $LANG31[18]); - $mail_templates->set_var ('lang_selectgroup', $LANG31[25]); + $retval .= COM_startBlock($LANG31[1], '', + COM_getBlockTemplate('_admin_block', 'header')); + + $menu_arr = array( + array('url' => $_CONF['site_admin_url'], + 'text' => $LANG_ADMIN['admin_home']) + ); + + $desc = '

        ' . $LANG31[19] . '

        '; + $icon = $_CONF['layout_url'] . '/images/icons/mail.' . $_IMAGE_TYPE; + $retval .= ADMIN_createMenu($menu_arr, $desc, $icon); + + $mail_templates = new Template($_CONF['path_layout'] . 'admin/mail'); + $mail_templates->set_file(array('form' => 'mailform.thtml')); + $mail_templates->set_var('site_url', $_CONF['site_url']); + $mail_templates->set_var('site_admin_url', $_CONF['site_admin_url']); + $mail_templates->set_var('layout_url', $_CONF['layout_url']); + $mail_templates->set_var('startblock_email', COM_startBlock($LANG31[1], + '', COM_getBlockTemplate('_admin_block', 'header'))); + $mail_templates->set_var('php_self', $_CONF['site_admin_url'] + . '/mail.php'); + $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'); @@ -81,28 +107,31 @@ } } - $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']); - $mail_templates->set_var ('lang_replyto', $LANG31[3]); - $mail_templates->set_var ('site_mail', $_CONF['site_mail']); - $mail_templates->set_var ('lang_subject', $LANG31[4]); - $mail_templates->set_var ('lang_body', $LANG31[5]); - $mail_templates->set_var ('lang_sendto', $LANG31[6]); - $mail_templates->set_var ('lang_allusers', $LANG31[7]); - $mail_templates->set_var ('lang_admin', $LANG31[8]); - $mail_templates->set_var ('lang_options', $LANG31[9]); - $mail_templates->set_var ('lang_HTML', $LANG31[10]); - $mail_templates->set_var ('lang_urgent', $LANG31[11]); - $mail_templates->set_var ('lang_ignoreusersettings', $LANG31[14]); - $mail_templates->set_var ('lang_send', $LANG31[12]); - $mail_templates->set_var ('end_block', COM_endBlock (COM_getBlockTemplate ('_admin_block', 'footer'))); - $mail_templates->set_var ('xhtml', XHTML); + $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']); + $mail_templates->set_var('lang_replyto', $LANG31[3]); + $mail_templates->set_var('site_mail', $_CONF['site_mail']); + $mail_templates->set_var('lang_subject', $LANG31[4]); + $mail_templates->set_var('lang_body', $LANG31[5]); + $mail_templates->set_var('lang_sendto', $LANG31[6]); + $mail_templates->set_var('lang_allusers', $LANG31[7]); + $mail_templates->set_var('lang_admin', $LANG31[8]); + $mail_templates->set_var('lang_options', $LANG31[9]); + $mail_templates->set_var('lang_HTML', $LANG31[10]); + $mail_templates->set_var('lang_urgent', $LANG31[11]); + $mail_templates->set_var('lang_ignoreusersettings', $LANG31[14]); + $mail_templates->set_var('lang_send', $LANG31[12]); + $mail_templates->set_var('end_block', + COM_endBlock(COM_getBlockTemplate('_admin_block', 'footer'))); + $mail_templates->set_var('xhtml', XHTML); $mail_templates->set_var('gltoken_name', CSRF_TOKEN); $mail_templates->set_var('gltoken', SEC_createToken()); - $mail_templates->parse ('output', 'form'); - $retval = $mail_templates->finish ($mail_templates->get_var ('output')); + $mail_templates->parse('output', 'form'); + $retval .= $mail_templates->finish($mail_templates->get_var('output')); + + $retval .= COM_endBlock(COM_getBlockTemplate('_admin_block', 'footer')); return $retval; } diff -r 13162f373fa7 -r 04bf6514d64c public_html/docs/english/theme.html --- a/public_html/docs/english/theme.html Sun Apr 19 23:12:48 2009 +0200 +++ b/public_html/docs/english/theme.html Mon Apr 20 11:01:39 2009 +0200 @@ -233,6 +233,10 @@ editor).
      • Added a "send copy to myself" option to profiles/contactuserform.thtml
      • +
      • Cosmetic changes to the admin/mail/mailform.thtml template file: + Removed {startblock_email} and {endblock_email} + and the top table. These elements are now added automatically to make the + the mail form look more consistent with the other admin panels.

      Plugins

      diff -r 13162f373fa7 -r 04bf6514d64c public_html/layout/professional/admin/mail/mailform.thtml --- a/public_html/layout/professional/admin/mail/mailform.thtml Sun Apr 19 23:12:48 2009 +0200 +++ b/public_html/layout/professional/admin/mail/mailform.thtml Mon Apr 20 11:01:39 2009 +0200 @@ -1,11 +1,4 @@
      - {startblock_email} - - - - - -
      {lang_note}
      @@ -55,5 +48,4 @@
      {lang_to}:
      - {end_block}
      From geeklog-cvs at lists.geeklog.net Mon Apr 20 08:13:58 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Mon, 20 Apr 2009 08:13:58 -0400 Subject: [geeklog-cvs] geeklog: Only count the number of enabled plugins in the admin b... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/f2083187ce9a changeset: 6979:f2083187ce9a user: Dirk Haun date: Mon Apr 20 11:23:37 2009 +0200 description: Only count the number of enabled plugins in the admin block diffstat: 1 file changed, 9 insertions(+), 9 deletions(-) public_html/lib-common.php | 18 +++++++++--------- diffs (29 lines): diff -r 04bf6514d64c -r f2083187ce9a public_html/lib-common.php --- a/public_html/lib-common.php Mon Apr 20 11:01:39 2009 +0200 +++ b/public_html/lib-common.php Mon Apr 20 11:23:37 2009 +0200 @@ -2666,16 +2666,16 @@ $link_array[$LANG01[116]] = $menu_item; } - if( SEC_hasRights( 'plugin.edit' )) - { + if (SEC_hasRights('plugin.edit')) { $url = $_CONF['site_admin_url'] . '/plugins.php'; - $adminmenu->set_var( 'option_url', $url ); - $adminmenu->set_var( 'option_label', $LANG01[77] ); - $adminmenu->set_var( 'option_count', - COM_numberFormat( DB_count( $_TABLES['plugins'] ))); - - $menu_item = $adminmenu->parse( 'item', - ( $thisUrl == $url ) ? 'current' : 'option' ); + $adminmenu->set_var('option_url', $url); + $adminmenu->set_var('option_label', $LANG01[77]); + $adminmenu->set_var('option_count', + COM_numberFormat(DB_count($_TABLES['plugins'], + 'pi_enabled', 1))); + + $menu_item = $adminmenu->parse('item', + ($thisUrl == $url) ? 'current' : 'option'); $link_array[$LANG01[77]] = $menu_item; } From geeklog-cvs at lists.geeklog.net Mon Apr 20 08:13:59 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Mon, 20 Apr 2009 08:13:59 -0400 Subject: [geeklog-cvs] geeklog: Enable URL rewrite in static pages search results Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/815b2faf521b changeset: 6980:815b2faf521b user: Dirk Haun date: Mon Apr 20 11:46:36 2009 +0200 description: Enable URL rewrite in static pages search results diffstat: 1 file changed, 1 insertion(+) plugins/staticpages/functions.inc | 1 + diffs (11 lines): diff -r f2083187ce9a -r 815b2faf521b plugins/staticpages/functions.inc --- a/plugins/staticpages/functions.inc Mon Apr 20 11:23:37 2009 +0200 +++ b/plugins/staticpages/functions.inc Mon Apr 20 11:46:36 2009 +0200 @@ -627,6 +627,7 @@ $search->setSQL($sql); $search->setFTSQL($ftsql); $search->setRank(3); + $search->setURLRewrite(true); return $search; } From geeklog-cvs at lists.geeklog.net Mon Apr 20 08:14:03 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Mon, 20 Apr 2009 08:14:03 -0400 Subject: [geeklog-cvs] geeklog: E_ALL fix Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/d0bb412e546c changeset: 6981:d0bb412e546c user: Dirk Haun date: Mon Apr 20 12:30:10 2009 +0200 description: E_ALL fix diffstat: 1 file changed, 2 insertions(+), 1 deletion(-) system/classes/search.class.php | 3 ++- diffs (13 lines): diff -r 815b2faf521b -r d0bb412e546c system/classes/search.class.php --- a/system/classes/search.class.php Mon Apr 20 11:46:36 2009 +0200 +++ b/system/classes/search.class.php Mon Apr 20 12:30:10 2009 +0200 @@ -716,7 +716,8 @@ if ($row['url'] != '#') { $row['url'] = ($row['url'][0] == '/' ? $_CONF['site_url'] : '') . $row['url']; - if ($this->_url_rewrite[$row[SQL_NAME]]) { + if (isset($this->_url_rewrite[$row[SQL_NAME]]) && + $this->_url_rewrite[$row[SQL_NAME]]) { $row['url'] = COM_buildUrl($row['url']); } $row['url'] .= (strpos($row['url'],'?') ? '&' : '?') . 'query=' . urlencode($this->_query); From geeklog-cvs at lists.geeklog.net Mon Apr 20 12:48:18 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Mon, 20 Apr 2009 12:48:18 -0400 Subject: [geeklog-cvs] geeklog: Need to simulate stripos on PHP 4 Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/0f4255abb760 changeset: 6982:0f4255abb760 user: Dirk Haun date: Mon Apr 20 16:07:41 2009 +0200 description: Need to simulate stripos on PHP 4 diffstat: 1 file changed, 18 insertions(+), 1 deletion(-) system/classes/search.class.php | 19 ++++++++++++++++++- diffs (36 lines): diff -r d0bb412e546c -r 0f4255abb760 system/classes/search.class.php --- a/system/classes/search.class.php Mon Apr 20 12:30:10 2009 +0200 +++ b/system/classes/search.class.php Mon Apr 20 16:07:41 2009 +0200 @@ -765,7 +765,7 @@ } $rt = ''; - $pos = stripos($text, $keyword); + $pos = $this->_stripos($text, $keyword); if ($pos !== false) { $pos_space = strpos($text, ' ', $pos); @@ -868,6 +868,23 @@ } return $sql; } + + /** + * Helper function: Simulate stripos on PHP 4 + * + * @param string $haystack string to search in + * @param string $needle string to search for + * @return mixed first pos of $needle in $haystack, or false + * + */ + function _stripos($haystack, $needle) + { + if (function_exists('stripos')) { + return stripos($haystack, $needle); + } else { + return strpos(strtolower($haystack), strtolower($needle)); + } + } } ?> From geeklog-cvs at lists.geeklog.net Mon Apr 20 12:48:18 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Mon, 20 Apr 2009 12:48:18 -0400 Subject: [geeklog-cvs] geeklog: Just a quick hack to make sure people don't lock themse... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/40a4e43583a5 changeset: 6983:40a4e43583a5 user: Dirk Haun date: Mon Apr 20 17:58:10 2009 +0200 description: Just a quick hack to make sure people don't lock themselves out of their site too easily diffstat: 1 file changed, 10 insertions(+) system/classes/config.class.php | 10 ++++++++++ diffs (20 lines): diff -r 0f4255abb760 -r 40a4e43583a5 system/classes/config.class.php --- a/system/classes/config.class.php Mon Apr 20 16:07:41 2009 +0200 +++ b/system/classes/config.class.php Mon Apr 20 17:58:10 2009 +0200 @@ -385,6 +385,16 @@ if (! empty($this->config_array['Core']['site_url'])) { $this->config_array['Core']['layout_url'] = $this->config_array['Core']['site_url'] . '/layout/' . $theme; } + } + + if (!$this->config_array['Core']['user_login_method']['standard'] && + !$this->config_array['Core']['user_login_method']['openid'] && + !$this->config_array['Core']['user_login_method']['3rdparty']) { + // just to make sure people don't lock themselves out of their site + $this->config_array['Core']['user_login_method']['standard'] = true; + + // TBD: ensure that we have a Root user able to log in with the + // enabled login method(s) } } From geeklog-cvs at lists.geeklog.net Mon Apr 20 12:48:22 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Mon, 20 Apr 2009 12:48:22 -0400 Subject: [geeklog-cvs] geeklog: Synced language files with english.php Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/85968eb69eb3 changeset: 6984:85968eb69eb3 user: Dirk Haun date: Mon Apr 20 18:45:41 2009 +0200 description: Synced language files with english.php diffstat: 70 files changed, 4950 insertions(+), 968 deletions(-) language/afrikaans.php | 85 ++++++++++++++++++++++++++------ language/afrikaans_utf-8.php | 85 ++++++++++++++++++++++++++------ language/bosnian.php | 85 ++++++++++++++++++++++++++------ language/bosnian_utf-8.php | 85 ++++++++++++++++++++++++++------ language/bulgarian.php | 85 ++++++++++++++++++++++++++------ language/bulgarian_utf-8.php | 85 ++++++++++++++++++++++++++------ language/catalan.php | 85 ++++++++++++++++++++++++++------ language/catalan_utf-8.php | 85 ++++++++++++++++++++++++++------ language/chinese_simplified_utf-8.php | 85 ++++++++++++++++++++++++++------ language/chinese_traditional_utf-8.php | 85 ++++++++++++++++++++++++++------ language/croatian.php | 85 ++++++++++++++++++++++++++------ language/croatian_utf-8.php | 85 ++++++++++++++++++++++++++------ language/czech.php | 85 ++++++++++++++++++++++++++------ language/czech_utf-8.php | 85 ++++++++++++++++++++++++++------ language/danish.php | 85 ++++++++++++++++++++++++++------ language/danish_utf-8.php | 85 ++++++++++++++++++++++++++------ language/dutch.php | 85 ++++++++++++++++++++++++++------ language/dutch_utf-8.php | 85 ++++++++++++++++++++++++++------ language/estonian.php | 85 ++++++++++++++++++++++++++------ language/estonian_utf-8.php | 85 ++++++++++++++++++++++++++------ language/farsi_utf-8.php | 85 ++++++++++++++++++++++++++------ language/finnish.php | 85 ++++++++++++++++++++++++++------ language/finnish_utf-8.php | 85 ++++++++++++++++++++++++++------ language/french_canada.php | 85 ++++++++++++++++++++++++++------ language/french_canada_utf-8.php | 85 ++++++++++++++++++++++++++------ language/french_france.php | 85 ++++++++++++++++++++++++++------ language/french_france_utf-8.php | 85 ++++++++++++++++++++++++++------ language/german.php | 77 ++++++++++++++++++++++++---- language/german_formal.php | 77 ++++++++++++++++++++++++---- language/german_formal_utf-8.php | 77 ++++++++++++++++++++++++---- language/german_utf-8.php | 77 ++++++++++++++++++++++++---- language/hebrew_utf-8.php | 85 ++++++++++++++++++++++++++------ language/hellenic.php | 85 ++++++++++++++++++++++++++------ language/hellenic_utf-8.php | 85 ++++++++++++++++++++++++++------ language/indonesian.php | 85 ++++++++++++++++++++++++++------ language/indonesian_utf-8.php | 85 ++++++++++++++++++++++++++------ language/italian.php | 85 ++++++++++++++++++++++++++------ language/italian_utf-8.php | 85 ++++++++++++++++++++++++++------ language/japanese_utf-8.php | 85 ++++++++++++++++++++++++++------ language/korean.php | 85 ++++++++++++++++++++++++++------ language/korean_utf-8.php | 85 ++++++++++++++++++++++++++------ language/norwegian.php | 85 ++++++++++++++++++++++++++------ language/norwegian_utf-8.php | 85 ++++++++++++++++++++++++++------ language/polish.php | 85 ++++++++++++++++++++++++++------ language/polish_utf-8.php | 85 ++++++++++++++++++++++++++------ language/portuguese.php | 85 ++++++++++++++++++++++++++------ language/portuguese_brazil.php | 85 ++++++++++++++++++++++++++------ language/portuguese_brazil_utf-8.php | 85 ++++++++++++++++++++++++++------ language/portuguese_utf-8.php | 85 ++++++++++++++++++++++++++------ language/romanian.php | 85 ++++++++++++++++++++++++++------ language/romanian_utf-8.php | 85 ++++++++++++++++++++++++++------ language/russian.php | 85 ++++++++++++++++++++++++++------ language/russian_utf-8.php | 85 ++++++++++++++++++++++++++------ language/serbian.php | 85 ++++++++++++++++++++++++++------ language/serbian_utf-8.php | 85 ++++++++++++++++++++++++++------ language/slovak.php | 85 ++++++++++++++++++++++++++------ language/slovak_utf-8.php | 85 ++++++++++++++++++++++++++------ language/slovenian.php | 85 ++++++++++++++++++++++++++------ language/slovenian_utf-8.php | 85 ++++++++++++++++++++++++++------ language/spanish.php | 85 ++++++++++++++++++++++++++------ language/spanish_argentina.php | 85 ++++++++++++++++++++++++++------ language/spanish_argentina_utf-8.php | 85 ++++++++++++++++++++++++++------ language/spanish_utf-8.php | 85 ++++++++++++++++++++++++++------ language/swedish.php | 85 ++++++++++++++++++++++++++------ language/swedish_utf-8.php | 85 ++++++++++++++++++++++++++------ language/turkish.php | 85 ++++++++++++++++++++++++++------ language/turkish_utf-8.php | 85 ++++++++++++++++++++++++++------ language/ukrainian.php | 85 ++++++++++++++++++++++++++------ language/ukrainian_koi8-u.php | 85 ++++++++++++++++++++++++++------ language/ukrainian_utf-8.php | 85 ++++++++++++++++++++++++++------ diffs (truncated from 13546 to 300 lines): diff -r 40a4e43583a5 -r 85968eb69eb3 language/afrikaans.php --- a/language/afrikaans.php Mon Apr 20 17:58:10 2009 +0200 +++ b/language/afrikaans.php Mon Apr 20 18:45:41 2009 +0200 @@ -45,10 +45,10 @@ 2 => 'lees verder', 3 => 'kommentaar', 4 => 'Wysig', - 5 => 'Stem', - 6 => 'Resultaat', + 5 => '', + 6 => '', 7 => '', - 8 => 'stemme', + 8 => '', 9 => 'Admin Funksies:', 10 => 'Bydraes', 11 => 'Artikels', @@ -203,7 +203,23 @@ 24 => 'Anonieme Gebruiker', 25 => 'Is jy seker dat jy hierdie plasing aan die werf admin wil rapporteer?', 26 => '%s het die volgende beledigende plasing of misbruik gerapporteer:', - 27 => 'Misbruikverslag' + 27 => 'Misbruikverslag', + 28 => 'Preview Changes', + 29 => 'Submit Changes', + 30 => 'Edited on', + 31 => 'by', + 32 => 'Editing a Comment', + 33 => 'Editing a Comment Submission', + 34 => 'Preview Submission Changes', + 35 => 'Save Changes to Queue', + 36 => 'Notify me of new replies', + 37 => 'New Comment Reply', + 38 => 'A reply has been made to your comment \'%s\'.', + 39 => 'You may view the comment thread at the following address:', + 40 => 'If you wish to receive no further notifications of replies, visit the following link:', + 41 => 'Hello %s,', + 42 => 'Unsubscribe', + 43 => 'Unsubscribe from reply notifications' ); ############################################################################### @@ -434,7 +450,10 @@ 32 => 'Datum', 33 => 'Lees die volledige artikel by', 34 => 'Einde van Boodskap', - 35 => 'Jammer, hierdie gebruiker verkies om nie epos te ontvang nie.' + 35 => 'Jammer, hierdie gebruiker verkies om nie epos te ontvang nie.', + 36 => 'Copy:', + 37 => 'Send me a copy of this email', + 38 => "This is a copy of the email that you sent to %s from <{$_CONF['site_url']}>:" ); ############################################################################### @@ -778,7 +797,7 @@ 60 => '', 61 => 'Outo-argief', 62 => 'Outo-verwydering', - 63 => '', + 63 => 'Disable Comments', 64 => '', 65 => '', 66 => '', @@ -953,11 +972,14 @@ 18 => 'Epos', 34 => 'Bestuur en Beheer', 35 => 'Artikel Bydraes', - 36 => '', + 36 => 'Comment', 37 => '', 38 => 'Stuur', 39 => 'Daar is geen bydraes op hierdie tydstip wat aksie vereis nie', - 40 => 'Gebruikersbydraes' + 40 => 'Gebruikersbydraes', + 41 => 'Comment Submissions', + 42 => 'User Name', + 43 => 'Auto-publish Comments?' ); ############################################################################### @@ -1123,8 +1145,8 @@ 12 => 'Die blok is suksesvol verwyder.', 13 => 'U onderwerp is suksesvol gestoor.', 14 => 'Die onderwerp en al sy artikels en blokke is suksesvol verwyder.', - 15 => '', - 16 => '', + 15 => 'Your comment has been submitted for review and will be published when approved by a moderator.', + 16 => 'You have been unsubscribed. You will no longer be notified of new replies.', 17 => '', 18 => '', 19 => '', @@ -1435,6 +1457,31 @@ ); ############################################################################### +# admin/sectest.php + +$LANG_SECTEST = array( + 'sectest' => 'Geeklog Security Check', + 'results' => 'Results of the Security Check', + 'okay' => 'Everything seems to be in order.', + 'please_fix' => 'Please fix the above issues before using your site!', + 'please_note' => 'Please note that no site is ever 100% secure. This script can only test for obvious security issues.', + 'stay_informed' => 'To stay informed about new Geeklog releases and possible security issues, we suggest that you subscribe to the (low-traffic) %s mailing list and/or use the %s option in your Admin menu from time to time to check for available updates.', + 'public_html' => '"public_html" should never be part of your site\'s URL. Please read the part about public_html in the %s again and change your setup accordingly before you proceed.', + 'installation' => 'installation instructions', + 'directory' => 'directory', + 'failed_bak' => 'Failed to create a temporary file in your data directory. Check your directory permissions!', + 'fix_it' => 'This is a security risk and should be fixed!', + 'reachable' => 'Your %s is reachable from the web.', + 'not_reachable' => 'Good! Your %s is not reachable from the web.', + 'not_sure' => 'Got an HTTP result code %s when trying to test your %s. Not sure what to make of it ...', + 'remove_inst' => 'You should really remove the install directory %s once you have your site up and running without any errors.', + 'remove_inst2' => 'Keeping it around would allow malicious users the ability to destroy your current install, take over your site, or retrieve sensitive information.', + 'inst_removed' => 'Good! You seem to have removed the install directory already.', + 'fix_password' => 'You still have not changed the default password from "password" on %s Root user account(s).', + 'password_okay' => 'Good! You seem to have changed the default account password already.' +); + +############################################################################### # "What's New" Time Strings # # For the first two strings, you can use the following placeholders. @@ -1521,7 +1568,8 @@ 'records_found' => 'Records found', 'addchild' => 'Add child', 'list' => 'list', - 'list_all' => 'List all' + 'list_all' => 'List all', + 'na' => 'N/A' ); # Localisation of the texts for the various drop-down menus that are actually @@ -1625,6 +1673,7 @@ 'mysqldump_options' => 'MySQL Dump Options', 'mysqldump_filename_mask' => 'Backup File Name Mask', 'theme' => 'Theme', + 'doctype' => 'DOCTYPE Declaration', 'menu_elements' => 'Menu Elements', 'path_themes' => 'Themes Path', 'disable_new_user_registration' => 'Disable New Registrations', @@ -1663,6 +1712,7 @@ 'cookie_theme' => 'Theme Cookie Name', 'cookie_language' => 'Language Cookie Name', 'cookie_tzid' => 'Timezone Cookie Name', + 'cookie_anon_name' => 'Anon. Username Cookie Name', 'cookie_ip' => 'Cookies embed IP?', 'default_perm_cookie_timeout' => 'Permanent Timeout', 'session_cookie_timeout' => 'Session Timeout', @@ -1771,6 +1821,9 @@ 'comment_limit' => 'Comment Limit', 'comment_mode' => 'Comment Mode', 'comment_code' => 'Comment Default', + 'comment_edit' => 'Allow Comment Edit?', + 'comment_edittime' => 'Comment Edit Time (seconds)', + 'commentsubmission' => 'Queue Comment Submissions', 'passwordspeedlimit' => 'Password Speed Limit', 'login_attempts' => 'Max. Login Attempts', 'login_speedlimit' => 'Login Speed Limit', @@ -1780,6 +1833,8 @@ 'skip_html_filter_for_root' => 'Skip HTML Filter for Root?', 'allowed_protocols' => 'Allowed Protocols', 'disable_autolinks' => 'Disable Autolinks?', + 'clickable_links' => 'Make URLs clickable?', + 'compressed_output' => 'Send compressed output?', 'censormode' => 'Censor Mode?', 'censorreplace' => 'Censor Replace Text', 'censorlist' => 'Censor List', @@ -1791,12 +1846,13 @@ 'atom_max_stories' => 'Max. Stories in Webservices Feed', 'disable_webservices' => 'Disable Webservices?', 'restrict_webservices' => 'Restrict Webservices?', + 'article_comment_close_days' => 'Days to close comments (default)', + 'comment_close_rec_stories' => 'Number of most recent stories enabled for comments', + 'allow_reply_notifications' => 'Allow comment reply notifications?', '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', @@ -1880,7 +1936,8 @@ 17 => array('Comments Enabled' => 0, 'Comments Disabled' => -1), 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') + 20 => array('Exact Phrase' => 'phrase', 'All of The Words' => 'all', 'Any of The Words' => 'any'), + 21 => array('HTML 4.01 Transitional' => 'html401transitional', 'HTML 4.01 Strict' => 'html401strict', 'XHTML 1.0 Transitional' => 'xhtml10transitional', 'XHTML 1.0 Strict' => 'xhtml10strict') ); ?> \ No newline at end of file diff -r 40a4e43583a5 -r 85968eb69eb3 language/afrikaans_utf-8.php --- a/language/afrikaans_utf-8.php Mon Apr 20 17:58:10 2009 +0200 +++ b/language/afrikaans_utf-8.php Mon Apr 20 18:45:41 2009 +0200 @@ -45,10 +45,10 @@ 2 => 'lees verder', 3 => 'kommentaar', 4 => 'Wysig', - 5 => 'Stem', - 6 => 'Resultaat', + 5 => '', + 6 => '', 7 => '', - 8 => 'stemme', + 8 => '', 9 => 'Admin Funksies:', 10 => 'Bydraes', 11 => 'Artikels', @@ -203,7 +203,23 @@ 24 => 'Anonieme Gebruiker', 25 => 'Is jy seker dat jy hierdie plasing aan die werf admin wil rapporteer?', 26 => '%s het die volgende beledigende plasing of misbruik gerapporteer:', - 27 => 'Misbruikverslag' + 27 => 'Misbruikverslag', + 28 => 'Preview Changes', + 29 => 'Submit Changes', + 30 => 'Edited on', + 31 => 'by', + 32 => 'Editing a Comment', + 33 => 'Editing a Comment Submission', + 34 => 'Preview Submission Changes', + 35 => 'Save Changes to Queue', + 36 => 'Notify me of new replies', + 37 => 'New Comment Reply', + 38 => 'A reply has been made to your comment \'%s\'.', + 39 => 'You may view the comment thread at the following address:', + 40 => 'If you wish to receive no further notifications of replies, visit the following link:', + 41 => 'Hello %s,', + 42 => 'Unsubscribe', + 43 => 'Unsubscribe from reply notifications' ); ############################################################################### @@ -434,7 +450,10 @@ 32 => 'Datum', 33 => 'Lees die volledige artikel by', 34 => 'Einde van Boodskap', - 35 => 'Jammer, hierdie gebruiker verkies om nie epos te ontvang nie.' + 35 => 'Jammer, hierdie gebruiker verkies om nie epos te ontvang nie.', + 36 => 'Copy:', + 37 => 'Send me a copy of this email', + 38 => "This is a copy of the email that you sent to %s from <{$_CONF['site_url']}>:" ); ############################################################################### @@ -778,7 +797,7 @@ 60 => '', 61 => 'Outo-argief', 62 => 'Outo-verwydering', - 63 => '', + 63 => 'Disable Comments', 64 => '', 65 => '', 66 => '', @@ -953,11 +972,14 @@ 18 => 'Epos', 34 => 'Bestuur en Beheer', 35 => 'Artikel Bydraes', - 36 => '', + 36 => 'Comment', 37 => '', 38 => 'Stuur', 39 => 'Daar is geen bydraes op hierdie tydstip wat aksie vereis nie', - 40 => 'Gebruikersbydraes' + 40 => 'Gebruikersbydraes', + 41 => 'Comment Submissions', + 42 => 'User Name', + 43 => 'Auto-publish Comments?' ); ############################################################################### @@ -1123,8 +1145,8 @@ 12 => 'Die blok is suksesvol verwyder.', 13 => 'U onderwerp is suksesvol gestoor.', 14 => 'Die onderwerp en al sy artikels en blokke is suksesvol verwyder.', - 15 => '', - 16 => '', + 15 => 'Your comment has been submitted for review and will be published when approved by a moderator.', + 16 => 'You have been unsubscribed. You will no longer be notified of new replies.', 17 => '', 18 => '', 19 => '', @@ -1435,6 +1457,31 @@ ); ############################################################################### +# admin/sectest.php + +$LANG_SECTEST = array( + 'sectest' => 'Geeklog Security Check', + 'results' => 'Results of the Security Check', + 'okay' => 'Everything seems to be in order.', + 'please_fix' => 'Please fix the above issues before using your site!', + 'please_note' => 'Please note that no site is ever 100% secure. This script can only test for obvious security issues.', + 'stay_informed' => 'To stay informed about new Geeklog releases and possible security issues, we suggest that you subscribe to the (low-traffic) %s mailing list and/or use the %s option in your Admin menu from time to time to check for available updates.', + 'public_html' => '"public_html" should never be part of your site\'s URL. Please read the part about public_html in the %s again and change your setup accordingly before you proceed.', From geeklog-cvs at lists.geeklog.net Wed Apr 22 18:35:50 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Wed, 22 Apr 2009 18:35:50 -0400 Subject: [geeklog-cvs] geeklog: Better search compatibility for older plugins Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/fcd486b533bc changeset: 6985:fcd486b533bc user: Sami Barakat date: Wed Apr 22 22:48:06 2009 +0100 description: Better search compatibility for older plugins diffstat: 1 file changed, 6 insertions(+), 2 deletions(-) system/classes/search.class.php | 8 ++++++-- diffs (22 lines): diff -r 85968eb69eb3 -r fcd486b533bc system/classes/search.class.php --- a/system/classes/search.class.php Mon Apr 20 18:45:41 2009 +0200 +++ b/system/classes/search.class.php Wed Apr 22 22:48:06 2009 +0100 @@ -592,12 +592,16 @@ $col_hits = $this->_findColumn($result->searchheading, array($LANG09[50],$LANG09[23],'Downloads','Clicks'));//'Hits','Views' $label = str_replace($LANG09[59], '', $result->searchlabel); - $num_results += $result->num_itemssearched; // Extract the results - foreach ($result->searchresults as $old_row) + for ($i = 0; $i < 5; $i++) { + $j = ($i + ($page * 5)) - 5; + if ($j >= count($result->searchresults)) + break; + + $old_row = $result->searchresults[$j]; if ($col_date != -1) { // Convert the date back to a timestamp From geeklog-cvs at lists.geeklog.net Thu Apr 23 18:03:26 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Thu, 23 Apr 2009 18:03:26 -0400 Subject: [geeklog-cvs] geeklog: Added option to search by titles only (feature request ... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/b2c7a634bafe changeset: 6986:b2c7a634bafe user: Sami Barakat date: Thu Apr 23 22:58:11 2009 +0100 description: Added option to search by titles only (feature request #0000840) diffstat: 8 files changed, 38 insertions(+), 21 deletions(-) language/english.php | 3 +- language/english_utf-8.php | 3 +- plugins/calendar/functions.inc | 4 +- plugins/links/functions.inc | 2 - plugins/staticpages/functions.inc | 2 - public_html/layout/professional/search/searchform.thtml | 15 ++++++---- system/classes/search.class.php | 9 +++--- system/classes/searchcriteria.class.php | 21 +++++++++++---- diffs (168 lines): diff -r fcd486b533bc -r b2c7a634bafe language/english.php --- a/language/english.php Wed Apr 22 22:48:06 2009 +0100 +++ b/language/english.php Thu Apr 23 22:58:11 2009 +0100 @@ -528,7 +528,8 @@ 65 => 'Story', 66 => 'Comment', 67 => 'Show %d Results', - 68 => 'Sort By' + 68 => 'Sort By', + 69 => 'Titles Only' ); ############################################################################### diff -r fcd486b533bc -r b2c7a634bafe language/english_utf-8.php --- a/language/english_utf-8.php Wed Apr 22 22:48:06 2009 +0100 +++ b/language/english_utf-8.php Thu Apr 23 22:58:11 2009 +0100 @@ -528,7 +528,8 @@ 65 => 'Story', 66 => 'Comment', 67 => 'Show %d Results', - 68 => 'Sort By' + 68 => 'Sort By', + 69 => 'Titles Only' ); ############################################################################### diff -r fcd486b533bc -r b2c7a634bafe plugins/calendar/functions.inc --- a/plugins/calendar/functions.inc Wed Apr 22 22:48:06 2009 +0100 +++ b/plugins/calendar/functions.inc Thu Apr 23 22:58:11 2009 +0100 @@ -1645,7 +1645,7 @@ // Search the public events $search_e = new SearchCriteria('calendar', array($LANG_CAL_1[16],$LANG_CAL_1[24])); - $columns = array('location','description','title'); + $columns = array('location', 'description', 'title' => '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); @@ -1653,7 +1653,7 @@ // Search personal events $search_p = new SearchCriteria('calendar', array($LANG_CAL_1[16],$LANG_CAL_1[23])); - $columns = array('location','description','title'); + $columns = array('location', 'description','title' => '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); diff -r fcd486b533bc -r b2c7a634bafe plugins/links/functions.inc --- a/plugins/links/functions.inc Wed Apr 22 22:48:06 2009 +0100 +++ b/plugins/links/functions.inc Thu Apr 23 22:58:11 2009 +0100 @@ -384,7 +384,7 @@ } $search = new SearchCriteria('links', $LANG_LINKS[14]); - $columns = array('description','title'); + $columns = array('description', 'title' => 'title'); list($sql,$ftsql) = $search->buildSearchSQL($keyType, $query, $columns, $sql); $search->setSQL($sql); $search->setFTSQL($ftsql); diff -r fcd486b533bc -r b2c7a634bafe plugins/staticpages/functions.inc --- a/plugins/staticpages/functions.inc Wed Apr 22 22:48:06 2009 +0100 +++ b/plugins/staticpages/functions.inc Thu Apr 23 22:58:11 2009 +0100 @@ -622,7 +622,7 @@ } $search = new SearchCriteria('staticpages', $LANG_STATIC['staticpages']); - $columns = array('sp_content','sp_title'); + $columns = array('sp_content', 'title' => 'sp_title'); list($sql,$ftsql) = $search->buildSearchSQL($keyType, $query, $columns, $sql); $search->setSQL($sql); $search->setFTSQL($ftsql); diff -r fcd486b533bc -r b2c7a634bafe public_html/layout/professional/search/searchform.thtml --- a/public_html/layout/professional/search/searchform.thtml Wed Apr 22 22:48:06 2009 +0100 +++ b/public_html/layout/professional/search/searchform.thtml Thu Apr 23 22:58:11 2009 +0100 @@ -3,12 +3,15 @@ - + diff -r fcd486b533bc -r b2c7a634bafe system/classes/search.class.php --- a/system/classes/search.class.php Wed Apr 22 22:48:06 2009 +0100 +++ b/system/classes/search.class.php Thu Apr 23 22:58:11 2009 +0100 @@ -237,6 +237,7 @@ $searchform->set_var('lang_exact_phrase', $LANG09[43]); $searchform->set_var('lang_all_words', $LANG09[44]); $searchform->set_var('lang_any_word', $LANG09[45]); + $searchform->set_var('lang_titles', $LANG09[69]); $searchform->set_var ('query', htmlspecialchars ($this->_query)); $searchform->set_var ('datestart', $this->_dateStart); @@ -374,8 +375,8 @@ } $search = new SearchCriteria('stories', $LANG09[65]); - $columns = array('introtext','bodytext','title'); - list( $sql, $ftsql ) = $search->buildSearchSQL( $this->_keyType, $query, $columns, $sql ); + $columns = array('introtext', 'bodytext', 'title' => 'title'); + list($sql, $ftsql) = $search->buildSearchSQL($this->_keyType, $query, $columns, $sql); $search->setSQL($sql); $search->setFTSQL($ftsql); $search->setRank(5); @@ -434,8 +435,8 @@ } $search = new SearchCriteria('comments', $LANG09[66]); - $columns = array('comment','c.title'); - list( $sql, $ftsql ) = $search->buildSearchSQL( $this->_keyType, $query, $columns, $sql ); + $columns = array('comment', 'title' => 'c.title'); + list($sql, $ftsql) = $search->buildSearchSQL($this->_keyType, $query, $columns, $sql); $search->setSQL($sql); $search->setFTSQL($ftsql); $search->setRank(2); diff -r fcd486b533bc -r b2c7a634bafe system/classes/searchcriteria.class.php --- a/system/classes/searchcriteria.class.php Wed Apr 22 22:48:06 2009 +0100 +++ b/system/classes/searchcriteria.class.php Thu Apr 23 22:58:11 2009 +0100 @@ -139,7 +139,14 @@ $ftwords['mssql'] = '"' . $query . '"'; } - $strcol = implode(',',$columns); + $titles = (isset($_GET['title']) && isset($columns['title'])) ? true : false; + + if ($titles) { + $strcol = $columns['title']; + } else { + $strcol = implode(',', $columns); + } + $ftsql['mysql'] = $sql . "AND MATCH($strcol) AGAINST ('{$ftwords['mysql']}' IN BOOLEAN MODE)"; $ftsql['mssql'] = $sql . "AND CONTAINS(($strcol), '{$ftwords['mssql']}')"; @@ -148,11 +155,15 @@ { $word = trim($word); $tmp .= '('; - foreach ($columns AS $col) { - $tmp .= "$col LIKE '%$word%' OR "; + + if ($titles) { + $tmp .= $columns['title'] . " LIKE '%$word%' OR "; + } else { + foreach ($columns AS $col) { + $tmp .= "$col LIKE '%$word%' OR "; + } } - - $tmp = substr($tmp,0,-4) . ") $sep "; + $tmp = substr($tmp, 0, -4) . ") $sep "; } $sql .= substr($tmp, 0, -5) . ') '; From geeklog-cvs at lists.geeklog.net Fri Apr 24 17:09:48 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Fri, 24 Apr 2009 17:09:48 -0400 Subject: [geeklog-cvs] geeklog: {xhtml} correction Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/00d085c4c02c changeset: 6987:00d085c4c02c user: Dirk Haun date: Fri Apr 24 22:09:40 2009 +0100 description: {xhtml} correction diffstat: 1 file changed, 1 insertion(+), 1 deletion(-) public_html/layout/professional/search/searchform.thtml | 2 +- diffs (12 lines): diff -r b2c7a634bafe -r 00d085c4c02c public_html/layout/professional/search/searchform.thtml --- a/public_html/layout/professional/search/searchform.thtml Thu Apr 23 22:58:11 2009 +0100 +++ b/public_html/layout/professional/search/searchform.thtml Fri Apr 24 22:09:40 2009 +0100 @@ -10,7 +10,7 @@ - {lang_titles} + {lang_titles} From geeklog-cvs at lists.geeklog.net Sun Apr 26 06:14:21 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 26 Apr 2009 06:14:21 -0400 Subject: [geeklog-cvs] geeklog: Synced language files with english.php Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/1e6d44ff18e6 changeset: 6988:1e6d44ff18e6 user: Dirk Haun date: Sun Apr 26 11:34:29 2009 +0200 description: Synced language files with english.php diffstat: 70 files changed, 140 insertions(+), 70 deletions(-) language/afrikaans.php | 3 ++- language/afrikaans_utf-8.php | 3 ++- language/bosnian.php | 3 ++- language/bosnian_utf-8.php | 3 ++- language/bulgarian.php | 3 ++- language/bulgarian_utf-8.php | 3 ++- language/catalan.php | 3 ++- language/catalan_utf-8.php | 3 ++- language/chinese_simplified_utf-8.php | 3 ++- language/chinese_traditional_utf-8.php | 3 ++- language/croatian.php | 3 ++- language/croatian_utf-8.php | 3 ++- language/czech.php | 3 ++- language/czech_utf-8.php | 3 ++- language/danish.php | 3 ++- language/danish_utf-8.php | 3 ++- language/dutch.php | 3 ++- language/dutch_utf-8.php | 3 ++- language/estonian.php | 3 ++- language/estonian_utf-8.php | 3 ++- language/farsi_utf-8.php | 3 ++- language/finnish.php | 3 ++- language/finnish_utf-8.php | 3 ++- language/french_canada.php | 3 ++- language/french_canada_utf-8.php | 3 ++- language/french_france.php | 3 ++- language/french_france_utf-8.php | 3 ++- language/german.php | 3 ++- language/german_formal.php | 3 ++- language/german_formal_utf-8.php | 3 ++- language/german_utf-8.php | 3 ++- language/hebrew_utf-8.php | 3 ++- language/hellenic.php | 3 ++- language/hellenic_utf-8.php | 3 ++- language/indonesian.php | 3 ++- language/indonesian_utf-8.php | 3 ++- language/italian.php | 3 ++- language/italian_utf-8.php | 3 ++- language/japanese_utf-8.php | 3 ++- language/korean.php | 3 ++- language/korean_utf-8.php | 3 ++- language/norwegian.php | 3 ++- language/norwegian_utf-8.php | 3 ++- language/polish.php | 3 ++- language/polish_utf-8.php | 3 ++- language/portuguese.php | 3 ++- language/portuguese_brazil.php | 3 ++- language/portuguese_brazil_utf-8.php | 3 ++- language/portuguese_utf-8.php | 3 ++- language/romanian.php | 3 ++- language/romanian_utf-8.php | 3 ++- language/russian.php | 3 ++- language/russian_utf-8.php | 3 ++- language/serbian.php | 3 ++- language/serbian_utf-8.php | 3 ++- language/slovak.php | 3 ++- language/slovak_utf-8.php | 3 ++- language/slovenian.php | 3 ++- language/slovenian_utf-8.php | 3 ++- language/spanish.php | 3 ++- language/spanish_argentina.php | 3 ++- language/spanish_argentina_utf-8.php | 3 ++- language/spanish_utf-8.php | 3 ++- language/swedish.php | 3 ++- language/swedish_utf-8.php | 3 ++- language/turkish.php | 3 ++- language/turkish_utf-8.php | 3 ++- language/ukrainian.php | 3 ++- language/ukrainian_koi8-u.php | 3 ++- language/ukrainian_utf-8.php | 3 ++- diffs (truncated from 910 to 300 lines): diff -r 00d085c4c02c -r 1e6d44ff18e6 language/afrikaans.php --- a/language/afrikaans.php Fri Apr 24 22:09:40 2009 +0100 +++ b/language/afrikaans.php Sun Apr 26 11:34:29 2009 +0200 @@ -527,7 +527,8 @@ 65 => 'Story', 66 => 'Comment', 67 => 'Show %d Results', - 68 => 'Sort By' + 68 => 'Sort By', + 69 => 'Titles Only' ); ############################################################################### diff -r 00d085c4c02c -r 1e6d44ff18e6 language/afrikaans_utf-8.php --- a/language/afrikaans_utf-8.php Fri Apr 24 22:09:40 2009 +0100 +++ b/language/afrikaans_utf-8.php Sun Apr 26 11:34:29 2009 +0200 @@ -527,7 +527,8 @@ 65 => 'Story', 66 => 'Comment', 67 => 'Show %d Results', - 68 => 'Sort By' + 68 => 'Sort By', + 69 => 'Titles Only' ); ############################################################################### diff -r 00d085c4c02c -r 1e6d44ff18e6 language/bosnian.php --- a/language/bosnian.php Fri Apr 24 22:09:40 2009 +0100 +++ b/language/bosnian.php Sun Apr 26 11:34:29 2009 +0200 @@ -531,7 +531,8 @@ 65 => 'Story', 66 => 'Comment', 67 => 'Show %d Results', - 68 => 'Sort By' + 68 => 'Sort By', + 69 => 'Titles Only' ); ############################################################################### diff -r 00d085c4c02c -r 1e6d44ff18e6 language/bosnian_utf-8.php --- a/language/bosnian_utf-8.php Fri Apr 24 22:09:40 2009 +0100 +++ b/language/bosnian_utf-8.php Sun Apr 26 11:34:29 2009 +0200 @@ -531,7 +531,8 @@ 65 => 'Story', 66 => 'Comment', 67 => 'Show %d Results', - 68 => 'Sort By' + 68 => 'Sort By', + 69 => 'Titles Only' ); ############################################################################### diff -r 00d085c4c02c -r 1e6d44ff18e6 language/bulgarian.php --- a/language/bulgarian.php Fri Apr 24 22:09:40 2009 +0100 +++ b/language/bulgarian.php Sun Apr 26 11:34:29 2009 +0200 @@ -527,7 +527,8 @@ 65 => 'Story', 66 => 'Comment', 67 => 'Show %d Results', - 68 => 'Sort By' + 68 => 'Sort By', + 69 => 'Titles Only' ); ############################################################################### diff -r 00d085c4c02c -r 1e6d44ff18e6 language/bulgarian_utf-8.php --- a/language/bulgarian_utf-8.php Fri Apr 24 22:09:40 2009 +0100 +++ b/language/bulgarian_utf-8.php Sun Apr 26 11:34:29 2009 +0200 @@ -527,7 +527,8 @@ 65 => 'Story', 66 => 'Comment', 67 => 'Show %d Results', - 68 => 'Sort By' + 68 => 'Sort By', + 69 => 'Titles Only' ); ############################################################################### diff -r 00d085c4c02c -r 1e6d44ff18e6 language/catalan.php --- a/language/catalan.php Fri Apr 24 22:09:40 2009 +0100 +++ b/language/catalan.php Sun Apr 26 11:34:29 2009 +0200 @@ -525,7 +525,8 @@ 65 => 'Story', 66 => 'Comment', 67 => 'Show %d Results', - 68 => 'Sort By' + 68 => 'Sort By', + 69 => 'Titles Only' ); ############################################################################### diff -r 00d085c4c02c -r 1e6d44ff18e6 language/catalan_utf-8.php --- a/language/catalan_utf-8.php Fri Apr 24 22:09:40 2009 +0100 +++ b/language/catalan_utf-8.php Sun Apr 26 11:34:29 2009 +0200 @@ -525,7 +525,8 @@ 65 => 'Story', 66 => 'Comment', 67 => 'Show %d Results', - 68 => 'Sort By' + 68 => 'Sort By', + 69 => 'Titles Only' ); ############################################################################### diff -r 00d085c4c02c -r 1e6d44ff18e6 language/chinese_simplified_utf-8.php --- a/language/chinese_simplified_utf-8.php Fri Apr 24 22:09:40 2009 +0100 +++ b/language/chinese_simplified_utf-8.php Sun Apr 26 11:34:29 2009 +0200 @@ -530,7 +530,8 @@ 65 => 'Story', 66 => 'Comment', 67 => 'Show %d Results', - 68 => 'Sort By' + 68 => 'Sort By', + 69 => 'Titles Only' ); ############################################################################### diff -r 00d085c4c02c -r 1e6d44ff18e6 language/chinese_traditional_utf-8.php --- a/language/chinese_traditional_utf-8.php Fri Apr 24 22:09:40 2009 +0100 +++ b/language/chinese_traditional_utf-8.php Sun Apr 26 11:34:29 2009 +0200 @@ -530,7 +530,8 @@ 65 => 'Story', 66 => 'Comment', 67 => 'Show %d Results', - 68 => 'Sort By' + 68 => 'Sort By', + 69 => 'Titles Only' ); ############################################################################### diff -r 00d085c4c02c -r 1e6d44ff18e6 language/croatian.php --- a/language/croatian.php Fri Apr 24 22:09:40 2009 +0100 +++ b/language/croatian.php Sun Apr 26 11:34:29 2009 +0200 @@ -527,7 +527,8 @@ 65 => 'Story', 66 => 'Comment', 67 => 'Show %d Results', - 68 => 'Sort By' + 68 => 'Sort By', + 69 => 'Titles Only' ); ############################################################################### diff -r 00d085c4c02c -r 1e6d44ff18e6 language/croatian_utf-8.php --- a/language/croatian_utf-8.php Fri Apr 24 22:09:40 2009 +0100 +++ b/language/croatian_utf-8.php Sun Apr 26 11:34:29 2009 +0200 @@ -529,7 +529,8 @@ 65 => 'Story', 66 => 'Comment', 67 => 'Show %d Results', - 68 => 'Sort By' + 68 => 'Sort By', + 69 => 'Titles Only' ); ############################################################################### diff -r 00d085c4c02c -r 1e6d44ff18e6 language/czech.php --- a/language/czech.php Fri Apr 24 22:09:40 2009 +0100 +++ b/language/czech.php Sun Apr 26 11:34:29 2009 +0200 @@ -526,7 +526,8 @@ 65 => 'Story', 66 => 'Comment', 67 => 'Show %d Results', - 68 => 'Sort By' + 68 => 'Sort By', + 69 => 'Titles Only' ); ############################################################################### diff -r 00d085c4c02c -r 1e6d44ff18e6 language/czech_utf-8.php --- a/language/czech_utf-8.php Fri Apr 24 22:09:40 2009 +0100 +++ b/language/czech_utf-8.php Sun Apr 26 11:34:29 2009 +0200 @@ -526,7 +526,8 @@ 65 => 'Story', 66 => 'Comment', 67 => 'Show %d Results', - 68 => 'Sort By' + 68 => 'Sort By', + 69 => 'Titles Only' ); ############################################################################### diff -r 00d085c4c02c -r 1e6d44ff18e6 language/danish.php --- a/language/danish.php Fri Apr 24 22:09:40 2009 +0100 +++ b/language/danish.php Sun Apr 26 11:34:29 2009 +0200 @@ -526,7 +526,8 @@ 65 => 'Story', 66 => 'Comment', 67 => 'Show %d Results', - 68 => 'Sort By' + 68 => 'Sort By', + 69 => 'Titles Only' ); ############################################################################### diff -r 00d085c4c02c -r 1e6d44ff18e6 language/danish_utf-8.php --- a/language/danish_utf-8.php Fri Apr 24 22:09:40 2009 +0100 +++ b/language/danish_utf-8.php Sun Apr 26 11:34:29 2009 +0200 @@ -526,7 +526,8 @@ 65 => 'Story', 66 => 'Comment', 67 => 'Show %d Results', - 68 => 'Sort By' + 68 => 'Sort By', + 69 => 'Titles Only' ); ############################################################################### diff -r 00d085c4c02c -r 1e6d44ff18e6 language/dutch.php --- a/language/dutch.php Fri Apr 24 22:09:40 2009 +0100 +++ b/language/dutch.php Sun Apr 26 11:34:29 2009 +0200 @@ -533,7 +533,8 @@ 65 => 'Story', 66 => 'Comment', 67 => 'Show %d Results', - 68 => 'Sort By' + 68 => 'Sort By', + 69 => 'Titles Only' ); ############################################################################### diff -r 00d085c4c02c -r 1e6d44ff18e6 language/dutch_utf-8.php --- a/language/dutch_utf-8.php Fri Apr 24 22:09:40 2009 +0100 +++ b/language/dutch_utf-8.php Sun Apr 26 11:34:29 2009 +0200 @@ -533,7 +533,8 @@ 65 => 'Story', 66 => 'Comment', 67 => 'Show %d Results', - 68 => 'Sort By' + 68 => 'Sort By', + 69 => 'Titles Only' ); ############################################################################### diff -r 00d085c4c02c -r 1e6d44ff18e6 language/estonian.php --- a/language/estonian.php Fri Apr 24 22:09:40 2009 +0100 +++ b/language/estonian.php Sun Apr 26 11:34:29 2009 +0200 @@ -528,7 +528,8 @@ 65 => 'Story', 66 => 'Comment', 67 => 'Show %d Results', - 68 => 'Sort By' + 68 => 'Sort By', + 69 => 'Titles Only' ); ############################################################################### diff -r 00d085c4c02c -r 1e6d44ff18e6 language/estonian_utf-8.php --- a/language/estonian_utf-8.php Fri Apr 24 22:09:40 2009 +0100 +++ b/language/estonian_utf-8.php Sun Apr 26 11:34:29 2009 +0200 @@ -528,7 +528,8 @@ 65 => 'Story', 66 => 'Comment', 67 => 'Show %d Results', - 68 => 'Sort By' + 68 => 'Sort By', + 69 => 'Titles Only' ); ############################################################################### diff -r 00d085c4c02c -r 1e6d44ff18e6 language/farsi_utf-8.php --- a/language/farsi_utf-8.php Fri Apr 24 22:09:40 2009 +0100 +++ b/language/farsi_utf-8.php Sun Apr 26 11:34:29 2009 +0200 @@ -515,7 +515,8 @@ 65 => 'Story', 66 => 'Comment', 67 => 'Show %d Results', - 68 => 'Sort By' + 68 => 'Sort By', + 69 => 'Titles Only' ); ############################################################################### diff -r 00d085c4c02c -r 1e6d44ff18e6 language/finnish.php --- a/language/finnish.php Fri Apr 24 22:09:40 2009 +0100 +++ b/language/finnish.php Sun Apr 26 11:34:29 2009 +0200 @@ -528,7 +528,8 @@ 65 => 'Story', 66 => 'Comment', 67 => 'Show %d Results', - 68 => 'Sort By' + 68 => 'Sort By', + 69 => 'Titles Only' ); ############################################################################### diff -r 00d085c4c02c -r 1e6d44ff18e6 language/finnish_utf-8.php --- a/language/finnish_utf-8.php Fri Apr 24 22:09:40 2009 +0100 +++ b/language/finnish_utf-8.php Sun Apr 26 11:34:29 2009 +0200 @@ -530,7 +530,8 @@ 65 => 'Story', 66 => 'Comment', 67 => 'Show %d Results', - 68 => 'Sort By' + 68 => 'Sort By', + 69 => 'Titles Only' ); ############################################################################### diff -r 00d085c4c02c -r 1e6d44ff18e6 language/french_canada.php From geeklog-cvs at lists.geeklog.net Sun Apr 26 06:14:21 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 26 Apr 2009 06:14:21 -0400 Subject: [geeklog-cvs] geeklog: Updated documentation Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/ef93e28c7bca changeset: 6989:ef93e28c7bca user: Dirk Haun date: Sun Apr 26 11:57:49 2009 +0200 description: Updated documentation diffstat: 2 files changed, 4 insertions(+), 1 deletion(-) public_html/docs/english/theme.html | 2 ++ public_html/docs/history | 3 ++- diffs (31 lines): diff -r 1e6d44ff18e6 -r ef93e28c7bca public_html/docs/english/theme.html --- a/public_html/docs/english/theme.html Sun Apr 26 11:34:29 2009 +0200 +++ b/public_html/docs/english/theme.html Sun Apr 26 11:57:49 2009 +0200 @@ -237,6 +237,8 @@ Removed {startblock_email} and {endblock_email} and the top table. These elements are now added automatically to make the the mail form look more consistent with the other admin panels. +
    • A new checkbox has been added to search/searchform.thtml to allow + for a search in the title only.
    • Plugins

      diff -r 1e6d44ff18e6 -r ef93e28c7bca public_html/docs/history --- a/public_html/docs/history Sun Apr 26 11:34:29 2009 +0200 +++ b/public_html/docs/history Sun Apr 26 11:57:49 2009 +0200 @@ -1,6 +1,6 @@ Geeklog History/Changes: -Apr 20, 2009 (1.6.0) +Apr ??, 2009 (1.6.0) ------------ Geeklog 1.6.0 incorporates the following projects implemented during @@ -11,6 +11,7 @@ + Comment moderation and editable comments, by Jared Wenerd Other changes: +- Added option to search by titles only (feature request #0000840) [Sami] - Added a config option to enable/disable automatically turning URLs in text postings into clickable URLs [Dirk] - Changed some default settings [Dirk]: From geeklog-cvs at lists.geeklog.net Sun Apr 26 06:14:22 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 26 Apr 2009 06:14:22 -0400 Subject: [geeklog-cvs] geeklog: Document where CUSTOM_templateSetVars is actually calle... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/cbedc66a434c changeset: 6990:cbedc66a434c user: Dirk Haun date: Sun Apr 26 12:14:06 2009 +0200 description: Document where CUSTOM_templateSetVars is actually called from (bug #0000862) diffstat: 3 files changed, 41 insertions(+), 10 deletions(-) public_html/docs/history | 2 ++ system/lib-custom.php.dist | 39 +++++++++++++++++++++++++++++++++------ system/lib-plugins.php | 10 ++++++---- diffs (86 lines): diff -r ef93e28c7bca -r cbedc66a434c public_html/docs/history --- a/public_html/docs/history Sun Apr 26 11:57:49 2009 +0200 +++ b/public_html/docs/history Sun Apr 26 12:14:06 2009 +0200 @@ -11,6 +11,8 @@ + Comment moderation and editable comments, by Jared Wenerd Other changes: +- Document where CUSTOM_templateSetVars is actually called from (bug #0000862) + [Dirk] - Added option to search by titles only (feature request #0000840) [Sami] - Added a config option to enable/disable automatically turning URLs in text postings into clickable URLs [Dirk] diff -r ef93e28c7bca -r cbedc66a434c system/lib-custom.php.dist --- a/system/lib-custom.php.dist Sun Apr 26 11:57:49 2009 +0200 +++ b/system/lib-custom.php.dist Sun Apr 26 12:14:06 2009 +0200 @@ -113,14 +113,41 @@ /** * Include any code in this function to add custom template variables. -* Initially, this function is only called in the COM_siteHeader function to set -* header.thtml variables +* +* Called from within Geeklog for: +* - 'header' (site header) +* - 'footer' (site footer) +* - 'storytext', 'featuredstorytext', 'archivestorytext' (story templates) +* - 'story' (story submission) +* - 'comment' (comments) +* - 'registration' (user registration form) +* - 'contact' (email user form) +* - 'emailstory' (email story to a friend) +* +* This function is called whenever PLG_templateSetVars is called, i.e. in +* addition to the templates listed here, it may also be called from plugins. +* +* @param string $templatename name of the template, e.g. 'header' +* @param ref &$template reference to the template +* @return void +* @see PLG_templateSetVars +* */ -function CUSTOM_templateSetVars ($templatename, &$template) +function CUSTOM_templateSetVars($templatename, &$template) { - if ($templatename == 'header') { - // define a {hello_world} variable which displays "Hello, world!" - $template->set_var ('hello_world', 'Hello, world!'); + // define a {hello_world} variable available in header.thtml and + // a {hello_again} variable available in the story templates + + switch ($templatename) { + case 'header': + $template->set_var('hello_world', 'Hello, world!'); + break; + + case 'storytext': + case 'featuredstorytext': + case 'archivestorytext': + $template->set_var('hello_again', 'Hello (again)!'); + break; } } diff -r ef93e28c7bca -r cbedc66a434c system/lib-plugins.php --- a/system/lib-plugins.php Sun Apr 26 11:57:49 2009 +0200 +++ b/system/lib-plugins.php Sun Apr 26 12:14:06 2009 +0200 @@ -1434,13 +1434,15 @@ /** * This function can be called to check if an plugin wants to set a template * variable +* * Example in COM_siteHeader, the API call is now added -* A plugin can now check for templatename == 'header' and then set additional +* A plugin can check for $templatename == 'header' and then set additional * template variables * -* @param string $templatename Name of calling template - used as test in plugin function -* @param ref $template reference for the Template -* @return void +* @param string $templatename Name of calling template +* @param ref &$template reference for the Template +* @return void +* @see CUSTOM_templateSetVars * */ function PLG_templateSetVars($templatename, &$template) From geeklog-cvs at lists.geeklog.net Sun Apr 26 12:50:13 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 26 Apr 2009 12:50:13 -0400 Subject: [geeklog-cvs] geeklog: HTML fixes Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/2fdc03ea2fb6 changeset: 6991:2fdc03ea2fb6 user: Dirk Haun date: Sun Apr 26 17:47:55 2009 +0200 description: HTML fixes diffstat: 4 files changed, 12 insertions(+), 12 deletions(-) public_html/layout/professional/search/resultauthdatehits.thtml | 8 +++--- public_html/layout/professional/search/resultrowenhanced.thtml | 12 +++++----- public_html/layout/professional/search/resultsummary.thtml | 2 - public_html/layout/professional/search/resulttitle.thtml | 2 - diffs (51 lines): diff -r cbedc66a434c -r 2fdc03ea2fb6 public_html/layout/professional/search/resultauthdatehits.thtml --- a/public_html/layout/professional/search/resultauthdatehits.thtml Sun Apr 26 12:14:06 2009 +0200 +++ b/public_html/layout/professional/search/resultauthdatehits.thtml Sun Apr 26 17:47:55 2009 +0200 @@ -1,5 +1,5 @@
      - - - - \ No newline at end of file + + + + diff -r cbedc66a434c -r 2fdc03ea2fb6 public_html/layout/professional/search/resultrowenhanced.thtml --- a/public_html/layout/professional/search/resultrowenhanced.thtml Sun Apr 26 12:14:06 2009 +0200 +++ b/public_html/layout/professional/search/resultrowenhanced.thtml Sun Apr 26 17:47:55 2009 +0200 @@ -1,12 +1,12 @@ - - \ No newline at end of file + diff -r cbedc66a434c -r 2fdc03ea2fb6 public_html/layout/professional/search/resultsummary.thtml --- a/public_html/layout/professional/search/resultsummary.thtml Sun Apr 26 12:14:06 2009 +0200 +++ b/public_html/layout/professional/search/resultsummary.thtml Sun Apr 26 17:47:55 2009 +0200 @@ -1,1 +1,1 @@ - \ No newline at end of file + diff -r cbedc66a434c -r 2fdc03ea2fb6 public_html/layout/professional/search/resulttitle.thtml --- a/public_html/layout/professional/search/resulttitle.thtml Sun Apr 26 12:14:06 2009 +0200 +++ b/public_html/layout/professional/search/resulttitle.thtml Sun Apr 26 17:47:55 2009 +0200 @@ -1,1 +1,1 @@ - \ No newline at end of file + From geeklog-cvs at lists.geeklog.net Sun Apr 26 12:50:13 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 26 Apr 2009 12:50:13 -0400 Subject: [geeklog-cvs] geeklog: {xhtml} fix Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/7245918d517d changeset: 6992:7245918d517d user: Dirk Haun date: Sun Apr 26 18:20:01 2009 +0200 description: {xhtml} fix diffstat: 1 file changed, 1 insertion(+), 1 deletion(-) public_html/layout/professional/lists/inline/item_row.thtml | 2 +- diffs (9 lines): diff -r 2fdc03ea2fb6 -r 7245918d517d public_html/layout/professional/lists/inline/item_row.thtml --- a/public_html/layout/professional/lists/inline/item_row.thtml Sun Apr 26 17:47:55 2009 +0200 +++ b/public_html/layout/professional/lists/inline/item_row.thtml Sun Apr 26 18:20:01 2009 +0200 @@ -1,4 +1,4 @@
      {item_field}
      -
      + From geeklog-cvs at lists.geeklog.net Sun Apr 26 12:50:14 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 26 Apr 2009 12:50:14 -0400 Subject: [geeklog-cvs] geeklog: E_ALL fix when disabling the last plugin Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/5d3fc8a52629 changeset: 6993:5d3fc8a52629 user: Dirk Haun date: Sun Apr 26 18:20:43 2009 +0200 description: E_ALL fix when disabling the last plugin diffstat: 1 file changed, 5 insertions(+), 1 deletion(-) public_html/admin/plugins.php | 6 +++++- diffs (16 lines): diff -r 7245918d517d -r 5d3fc8a52629 public_html/admin/plugins.php --- a/public_html/admin/plugins.php Sun Apr 26 18:20:01 2009 +0200 +++ b/public_html/admin/plugins.php Sun Apr 26 18:20:43 2009 +0200 @@ -1155,7 +1155,11 @@ // MAIN $display = ''; if (isset($_POST['pluginenabler']) && SEC_checkToken()) { - changePluginStatus($_POST['enabledplugins']); + if (isset($_POST['enabledplugins'])) { + changePluginStatus($_POST['enabledplugins']); + } else { + changePluginStatus(array()); + } // force a refresh so that the information of the plugin that was just // enabled / disabled (menu entries, etc.) is displayed properly From geeklog-cvs at lists.geeklog.net Sun Apr 26 16:25:59 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 26 Apr 2009 16:25:59 -0400 Subject: [geeklog-cvs] geeklog: Correction: 'comment' is actually the comment submissio... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/b788cc04edbe changeset: 6994:b788cc04edbe user: Dirk Haun date: Sun Apr 26 22:25:47 2009 +0200 description: Correction: 'comment' is actually the comment submission form (thanks, cordiste) diffstat: 1 file changed, 1 insertion(+), 1 deletion(-) system/lib-custom.php.dist | 2 +- diffs (12 lines): diff -r 5d3fc8a52629 -r b788cc04edbe system/lib-custom.php.dist --- a/system/lib-custom.php.dist Sun Apr 26 18:20:43 2009 +0200 +++ b/system/lib-custom.php.dist Sun Apr 26 22:25:47 2009 +0200 @@ -119,7 +119,7 @@ * - 'footer' (site footer) * - 'storytext', 'featuredstorytext', 'archivestorytext' (story templates) * - 'story' (story submission) -* - 'comment' (comments) +* - 'comment' (comment submission form) * - 'registration' (user registration form) * - 'contact' (email user form) * - 'emailstory' (email story to a friend) From geeklog-cvs at lists.geeklog.net Wed Apr 29 06:16:27 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Wed, 29 Apr 2009 06:16:27 -0400 Subject: [geeklog-cvs] geeklog: Don't allow to add/remove users to/from the All Users a... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/8761e07824a3 changeset: 6996:8761e07824a3 user: Dirk Haun date: Wed Apr 29 12:16:17 2009 +0200 description: Don't allow to add/remove users to/from the All Users and Logged-in Users groups via the group editor (bugs #0000863 and #0000864) diffstat: 3 files changed, 69 insertions(+), 57 deletions(-) public_html/admin/group.php | 12 +++- public_html/docs/history | 2 system/lib-admin.php | 112 ++++++++++++++++++++++--------------------- diffs (161 lines): diff -r f716802f814b -r 8761e07824a3 public_html/admin/group.php --- a/public_html/admin/group.php Tue Apr 28 21:43:52 2009 +0200 +++ b/public_html/admin/group.php Wed Apr 29 12:16:17 2009 +0200 @@ -899,14 +899,18 @@ $retval = ''; + $grp_name = DB_getItem($_TABLES['groups'], 'grp_name', "grp_id = $group"); + $thisUsersGroups = SEC_getUserGroups(); $groupName = DB_getItem($_TABLES['groups'], 'grp_name', "grp_id='$group'"); - if (!empty($group) && ($group > 0) && !in_array($group, $thisUsersGroups) && - !SEC_groupIsRemoteUserAndHaveAccess($group, $thisUsersGroups)) { + if ((!empty($group) && ($group > 0) && + !in_array($group, $thisUsersGroups) && + !SEC_groupIsRemoteUserAndHaveAccess($group, $thisUsersGroups)) + || (($grp_name == 'All Users') || + ($grp_name == 'Logged-in Users'))) { $retval .= COM_startBlock($LANG_ACCESS['usergroupadmin'], '', COM_getBlockTemplate('_msg_block', 'header')); - if (!SEC_inGroup('Root') && (DB_getItem($_TABLES['groups'], - 'grp_name', "grp_id = $group") == 'Root')) { + if (!SEC_inGroup('Root') && ($grp_name == 'Root')) { $retval .= $LANG_ACCESS['canteditroot']; COM_accessLog("User {$_USER['username']} tried to edit the Root group with insufficient privileges."); } else { diff -r f716802f814b -r 8761e07824a3 public_html/docs/history --- a/public_html/docs/history Tue Apr 28 21:43:52 2009 +0200 +++ b/public_html/docs/history Wed Apr 29 12:16:17 2009 +0200 @@ -11,6 +11,8 @@ + Comment moderation and editable comments, by Jared Wenerd Other changes: +- Don't allow to add/remove users to/from the All Users and Logged-in Users + groups via the group editor (bugs #0000863 and #0000864) [Dirk] - Cosmetic changes to the form to add/remove users to/from groups, for consistency with the other admin panels [Dirk] - Document where CUSTOM_templateSetVars is actually called from (bug #0000862) diff -r f716802f814b -r 8761e07824a3 system/lib-admin.php --- a/system/lib-admin.php Tue Apr 28 21:43:52 2009 +0200 +++ b/system/lib-admin.php Wed Apr 29 12:16:17 2009 +0200 @@ -703,60 +703,66 @@ $show_all_groups = true; } - if (in_array ($A['grp_id'], $thisUsersGroups ) || - SEC_groupIsRemoteUserAndHaveAccess( $A['grp_id'], $thisUsersGroups )) { + if (in_array($A['grp_id'], $thisUsersGroups) || + SEC_groupIsRemoteUserAndHaveAccess($A['grp_id'], $thisUsersGroups)) { switch($fieldname) { - case 'edit': - if ($show_all_groups) { - $retval = COM_createLink($icon_arr['edit'], - "{$_CONF['site_admin_url']}/group.php?mode=edit&grp_id={$A['grp_id']}&chk_showall=1"); - } else { - $retval = COM_createLink($icon_arr['edit'], - "{$_CONF['site_admin_url']}/group.php?mode=edit&grp_id={$A['grp_id']}"); - } - break; - case 'grp_gl_core': - if ($A['grp_gl_core'] == 1) { - $retval = $LANG_ACCESS['yes']; - } else { - $retval = $LANG_ACCESS['no']; - } - break; - case 'list': - if ($show_all_groups) { - $retval = COM_createLink($icon_arr['list'], - "{$_CONF['site_admin_url']}/group.php?mode=listusers&grp_id={$A['grp_id']}&chk_showall=1") - ."  " - . COM_createLink($icon_arr['edit'], - "{$_CONF['site_admin_url']}/group.php?mode=editusers&grp_id={$A['grp_id']}&chk_showall=1"); - } else { - $retval = COM_createLink($icon_arr['list'], - "{$_CONF['site_admin_url']}/group.php?mode=listusers&grp_id={$A['grp_id']}") - ."  " - . COM_createLink($icon_arr['edit'], - "{$_CONF['site_admin_url']}/group.php?mode=editusers&grp_id={$A['grp_id']}"); - } - break; - case 'checkbox': - $retval = ''; - break; - case 'disabled-checkbox': - $retval = '' - . ''; - break; - case 'grp_name': - $retval = ucwords($fieldvalue); - break; - default: - $retval = $fieldvalue; - break; + case 'edit': + $url = $_CONF['site_admin_url'] . '/group.php?mode=edit&grp_id=' + . $A['grp_id']; + if ($show_all_groups) { + $url .= '&chk_showall=1'; + } + $retval = COM_createLink($icon_arr['edit'], $url); + break; + + case 'grp_gl_core': + if ($A['grp_gl_core'] == 1) { + $retval = $LANG_ACCESS['yes']; + } else { + $retval = $LANG_ACCESS['no']; + } + break; + + case 'list': + $url = $_CONF['site_admin_url'] . '/group.php?mode='; + if ($show_all_groups) { + $param = '&grp_id=' . $A['grp_id'] . '&chk_showall=1'; + } else { + $param = '&grp_id=' . $A['grp_id']; + } + + $retval = COM_createLink($icon_arr['list'], + $url . 'listusers' . $param); + if (($A['grp_name'] != 'All Users') && + ($A['grp_name'] != 'Logged-in Users')) { + $retval .= '  ' . COM_createLink($icon_arr['edit'], + $url . 'editusers' . $param); + } + break; + + case 'checkbox': + $retval = ''; + break; + + case 'disabled-checkbox': + $retval = '' + . ''; + break; + + case 'grp_name': + $retval = ucwords($fieldvalue); + break; + + default: + $retval = $fieldvalue; + break; } } From geeklog-cvs at lists.geeklog.net Thu Apr 30 15:41:03 2009 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Thu, 30 Apr 2009 15:41:03 -0400 Subject: [geeklog-cvs] geeklog: Identify groups by name, not by grp_id Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/16108f33a49b changeset: 6997:16108f33a49b user: Dirk Haun date: Wed Apr 29 12:46:40 2009 +0200 description: Identify groups by name, not by grp_id diffstat: 1 file changed, 1 insertion(+), 1 deletion(-) public_html/admin/group.php | 2 +- diffs (12 lines): diff -r 8761e07824a3 -r 16108f33a49b public_html/admin/group.php --- a/public_html/admin/group.php Wed Apr 29 12:16:17 2009 +0200 +++ b/public_html/admin/group.php Wed Apr 29 12:46:40 2009 +0200 @@ -829,7 +829,7 @@ $filter .= '
      {lang_keywords}: - + + + {lang_titles} +
      {lang_date}:
      {data}{data2}{data3}
      {data}{data2}{data3}
      - - {data_cols} -
      + + {data_cols} +
      -   + +  
      {data}
      {data}
      {data}
      {data}