[geeklog-cvs] geeklog: Merge
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Tue Mar 9 19:08:53 EST 2010
changeset 7774:b62e11b8d65b
url: http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/b62e11b8d65b
user: Tom <websitemaster at cogeco.net>
date: Tue Mar 09 19:07:03 2010 -0500
description:
Merge
diffstat:
.hgignore | 1 +
language/english.php | 6 +-
plugins/polls/functions.inc | 9 +-
plugins/polls/sql/pgsql_install.php | 2 +-
plugins/polls/templates/admin/polleditor.thtml | 4 +-
plugins/staticpages/sql/pgsql_install.php | 19 ++--
plugins/staticpages/templates/admin/editor.thtml | 4 +-
plugins/staticpages/templates/admin/editor_advanced.thtml | 4 +-
public_html/admin/install/config-install.php | 1 +
public_html/admin/install/index.php | 2 +-
public_html/admin/install/lib-install.php | 10 ++
public_html/admin/install/lib-upgrade.php | 2 +
public_html/admin/sectest.php | 7 +-
public_html/docs/english/config.html | 4 +
public_html/docs/history | 5 +
public_html/layout/professional/admin/story/storyeditor.thtml | 4 +-
public_html/layout/professional/admin/story/storyeditor_advanced.thtml | 4 +-
sql/updates/mysql_1.6.1_to_1.6.2.php | 18 ++++
system/classes/listfactory.class.php | 32 +++++--
system/classes/search.class.php | 6 +-
system/classes/story.class.php | 5 +-
system/lib-comment.php | 8 +-
system/lib-security.php | 29 ++++--
23 files changed, 124 insertions(+), 62 deletions(-)
diffs (truncated from 521 to 300 lines):
diff -r b15e25c08b94 -r b62e11b8d65b .hgignore
--- a/.hgignore Tue Mar 09 18:54:04 2010 -0500
+++ b/.hgignore Tue Mar 09 19:07:03 2010 -0500
@@ -17,6 +17,7 @@
public_html/siteconfig.php
system/lib-custom.php
+public_html/.htaccess
public_html/sitemap.xml
config.php
diff -r b15e25c08b94 -r b62e11b8d65b language/english.php
--- a/language/english.php Tue Mar 09 18:54:04 2010 -0500
+++ b/language/english.php Tue Mar 09 19:07:03 2010 -0500
@@ -1905,7 +1905,8 @@
'search_show_sort' => "Allow User to Sort Results?",
'search_show_limit' => "Show Page Limits?",
'search_separator' => "Group Separator",
- 'search_def_keytype' => "Default Search Method"
+ 'search_def_keytype' => "Default Search Method",
+ 'search_def_sort' => "Default Sort Order"
);
$LANG_configsubgroups['Core'] = array(
@@ -1997,7 +1998,8 @@
23 => array('Disabled' => 0, 'Enabled' => 1, 'Enabled (Default for Homepage only)' => 2),
24 => array('Contribute' => 'contribute', 'Home' => 'home', 'Advanced Search' => 'search', 'Directory' => 'directory', 'My Account' => 'prefs', 'Plugin Entries' => 'plugins', 'Custom Entries' => 'custom', 'Site Statistics' => 'stats'),
25 => array('New Stories' => 'story', 'New Comments' => 'comment', 'New Trackbacks' => 'trackback', 'New Pingbacks' => 'pingback', 'New Users' => 'user'),
- 26 => array('G (General Audiences)' => 'G', 'PG (Parental Guidance)' => 'PG', 'R (Restricted)' => 'R', 'X (Explicit)' => 'X')
+ 26 => array('G (General Audiences)' => 'G', 'PG (Parental Guidance)' => 'PG', 'R (Restricted)' => 'R', 'X (Explicit)' => 'X'),
+ 27 => array('Hits (asc)' => 'hits|asc', 'Hits (desc)' => 'hits|desc', 'Date (asc)' => 'date|asc', 'Date (desc)' => 'date|desc', 'Title (asc)' => 'title|asc', 'Title (desc)' => 'title|desc', 'Author (asc)' => 'uid|asc', 'Author (desc)' => 'uid|desc')
);
?>
diff -r b15e25c08b94 -r b62e11b8d65b plugins/polls/functions.inc
--- a/plugins/polls/functions.inc Tue Mar 09 18:54:04 2010 -0500
+++ b/plugins/polls/functions.inc Tue Mar 09 19:07:03 2010 -0500
@@ -519,7 +519,7 @@
$access = SEC_hasAccess($P['owner_id'], $P['group_id'],
$P['perm_owner'], $P['perm_group'],
$P['perm_members'], $P['perm_anon']);
- if ($access == 3) {
+ if (($access == 3) && SEC_hasRights('polls.edit')) {
$editlink = COM_createLink($LANG25[27], $_CONF['site_admin_url']
. '/plugins/polls/index.php?mode=edit&pid=' . $pid);
$poll->set_var('edit_link', $editlink);
@@ -817,9 +817,10 @@
$poll->set_var('poll_id', $pid);
$poll->set_var('num_votes', COM_numberFormat($P['voters']));
$poll->set_var('lang_votes', $LANG_POLLS['votes']);
- $access = SEC_hasAccess($P['owner_id'],$P['group_id'],$P['perm_owner'],
- $P['perm_group'],$P['perm_members'],$P['perm_anon']);
- if ($access == 3) {
+ $access = SEC_hasAccess($P['owner_id'], $P['group_id'],
+ $P['perm_owner'], $P['perm_group'],
+ $P['perm_members'], $P['perm_anon']);
+ if (($access == 3) && SEC_hasRights('polls.edit')) {
$editlink = COM_createLink($LANG25[27], $_CONF['site_admin_url']
. '/plugins/polls/index.php?mode=edit&pid=' . $pid );
$poll->set_var('edit_link', $editlink);
diff -r b15e25c08b94 -r b62e11b8d65b plugins/polls/sql/pgsql_install.php
--- a/plugins/polls/sql/pgsql_install.php Tue Mar 09 18:54:04 2010 -0500
+++ b/plugins/polls/sql/pgsql_install.php Tue Mar 09 19:07:03 2010 -0500
@@ -74,7 +74,7 @@
perm_anon int NOT NULL default '2',
PRIMARY KEY (pid));
CREATE INDEX pollquestions_qid ON {$_TABLES['polltopics']}(pid);
- CREATE INDEX pollquestions_date ON {$_TABLES['polltopics']}(date);
+ CREATE INDEX pollquestions_created ON {$_TABLES['polltopics']}(created);
CREATE INDEX pollquestions_display ON {$_TABLES['polltopics']}(display);
CREATE INDEX pollquestions_commentcode ON {$_TABLES['polltopics']}(commentcode);
CREATE INDEX pollquestions_statuscode ON {$_TABLES['polltopics']}(statuscode);
diff -r b15e25c08b94 -r b62e11b8d65b plugins/polls/templates/admin/polleditor.thtml
--- a/plugins/polls/templates/admin/polleditor.thtml Tue Mar 09 18:54:04 2010 -0500
+++ b/plugins/polls/templates/admin/polleditor.thtml Tue Mar 09 19:07:03 2010 -0500
@@ -12,11 +12,11 @@
</tr>
<tr{hide_meta}>
<td valign="top" align="right">{lang_metadescription}:</td>
- <td><textarea name="meta_description" style="width:100%" rows="2">{meta_description}</textarea></td>
+ <td><textarea name="meta_description" cols="45" rows="2" style="width:100%">{meta_description}</textarea></td>
</tr>
<tr{hide_meta}>
<td valign="top" align="right">{lang_metakeywords}:</td>
- <td><textarea name="meta_keywords" style="width:100%" rows="2">{meta_keywords}</textarea></td>
+ <td><textarea name="meta_keywords" cols="45" rows="2" style="width:100%">{meta_keywords}</textarea></td>
</tr>
<tr>
<td align="right">{lang_mode}:</td>
diff -r b15e25c08b94 -r b62e11b8d65b plugins/staticpages/sql/pgsql_install.php
--- a/plugins/staticpages/sql/pgsql_install.php Tue Mar 09 18:54:04 2010 -0500
+++ b/plugins/staticpages/sql/pgsql_install.php Tue Mar 09 19:07:03 2010 -0500
@@ -2,16 +2,13 @@
/* Reminder: always indent with 4 spaces (no tabs). */
// +---------------------------------------------------------------------------+
-// | Static Pages Plugin 1.4.2 |
+// | Static Pages Plugin 1.6 |
// +---------------------------------------------------------------------------+
// | Installation SQL |
// +---------------------------------------------------------------------------+
-// | Copyright (C) 2000-2006 by the following authors: |
+// | Copyright (C) 2009-2010 by the following authors: |
// | |
-// | Authors: Tony Bibbs - tony AT tonybibbs DOT com |
-// | Tom Willett - twillett AT users DOT sourceforge DOT net |
-// | Blaine Lang - langmail AT sympatico DOT ca |
-// | Dirk Haun - dirk AT haun-online DOT de |
+// | Authors: Stansislav Palatnik - spalatnikk AT gmail DOT com |
// +---------------------------------------------------------------------------+
// | |
// | This program is licensed under the terms of the GNU General Public License|
@@ -28,8 +25,12 @@
// | Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
// | |
// +---------------------------------------------------------------------------+
-//
-// $Id: pgsql_install.php,v 1.1 2010/01/26 18:29:34 dhaun Exp $
+
+/**
+* PostgreSQL install data and tables
+*
+* @package StaticPages
+*/
$_SQL[] = "
CREATE TABLE {$_TABLES['staticpage']} (
@@ -61,7 +62,7 @@
postmode varchar(16) NOT NULL default 'html',
PRIMARY KEY (sp_id));
CREATE INDEX staticpage_sp_uid ON {$_TABLES['staticpage']}(sp_uid);
- CREATE INDEX staticpage_sp_date ON {$_TABLES['staticpage']}(sp_date);
+ CREATE INDEX staticpage_created ON {$_TABLES['staticpage']}(created);
CREATE INDEX staticpage_sp_onmenu ON {$_TABLES['staticpage']}(sp_onmenu);
CREATE INDEX staticpage_sp_centerblock ON {$_TABLES['staticpage']}(sp_centerblock);
CREATE INDEX staticpage_sp_tid ON {$_TABLES['staticpage']}(sp_tid);
diff -r b15e25c08b94 -r b62e11b8d65b plugins/staticpages/templates/admin/editor.thtml
--- a/plugins/staticpages/templates/admin/editor.thtml Tue Mar 09 18:54:04 2010 -0500
+++ b/plugins/staticpages/templates/admin/editor.thtml Tue Mar 09 19:07:03 2010 -0500
@@ -41,11 +41,11 @@
</tr>
<tr{hide_meta}>
<td valign="top" align="right">{lang_metadescription}:</td>
- <td><textarea name="meta_description" style="width:100%" rows="2">{meta_description}</textarea></td>
+ <td><textarea name="meta_description" style="width:100%" cols="45" rows="2">{meta_description}</textarea></td>
</tr>
<tr{hide_meta}>
<td valign="top" align="right">{lang_metakeywords}:</td>
- <td><textarea name="meta_keywords" style="width:100%" rows="2">{meta_keywords}</textarea></td>
+ <td><textarea name="meta_keywords" style="width:100%" cols="45" rows="2">{meta_keywords}</textarea></td>
</tr>
<tr>
<td valign="top" align="right">{lang_content}:</td>
diff -r b15e25c08b94 -r b62e11b8d65b plugins/staticpages/templates/admin/editor_advanced.thtml
--- a/plugins/staticpages/templates/admin/editor_advanced.thtml Tue Mar 09 18:54:04 2010 -0500
+++ b/plugins/staticpages/templates/admin/editor_advanced.thtml Tue Mar 09 19:07:03 2010 -0500
@@ -55,11 +55,11 @@
</tr>
<tr{hide_meta}>
<td valign="top" align="right">{lang_metadescription}:</td>
- <td><textarea name="meta_description" style="width:100%" rows="2">{meta_description}</textarea></td>
+ <td><textarea name="meta_description" style="width:100%" cols="45" rows="2">{meta_description}</textarea></td>
</tr>
<tr{hide_meta}>
<td valign="top" align="right">{lang_metakeywords}:</td>
- <td><textarea name="meta_keywords" style="width:100%" rows="2">{meta_keywords}</textarea></td>
+ <td><textarea name="meta_keywords" style="width:100%" cols="45" rows="2">{meta_keywords}</textarea></td>
</tr>
<tr>
<td colspan="2" style="vertical-align:top;padding-top:10px;">
diff -r b15e25c08b94 -r b62e11b8d65b public_html/admin/install/config-install.php
--- a/public_html/admin/install/config-install.php Tue Mar 09 18:54:04 2010 -0500
+++ b/public_html/admin/install/config-install.php Tue Mar 09 19:07:03 2010 -0500
@@ -98,6 +98,7 @@
$c->add('search_separator',' > ','text',0,6,NULL,668,TRUE);
$c->add('search_def_keytype','phrase','select',0,6,20,672,TRUE);
$c->add('search_use_fulltext',FALSE,'hidden',0,6); // 675
+ $c->add('search_def_sort','hits|desc','select',0,6,27,676,TRUE);
// Subgroup: Stories and Trackback
$c->add('sg_stories', NULL, 'subgroup', 1, 0, NULL, 0, TRUE);
diff -r b15e25c08b94 -r b62e11b8d65b public_html/admin/install/index.php
--- a/public_html/admin/install/index.php Tue Mar 09 18:54:04 2010 -0500
+++ b/public_html/admin/install/index.php Tue Mar 09 19:07:03 2010 -0500
@@ -163,7 +163,7 @@
<p><label class="' . $form_label_dir . '">' . $LANG_INSTALL[33] . ' ' . INST_helpLink('site_slogan') . '</label> <input type="text" name="site_slogan" value="' . htmlspecialchars($site_slogan) . '" size="40"' . XHTML . '></p>
<p><label class="' . $form_label_dir . '">' . $LANG_INSTALL[34] . ' ' . INST_helpLink('db_type') . '</label> <select name="db_type">'
- . INST_listOfSupportedDBs($gl_path, $db_selected,
+ . INST_listOfSupportedDBs($dbconfig_path, $db_selected,
($install_type == 'install' ? true : false)) .
'</select> ' . '</p>
diff -r b15e25c08b94 -r b62e11b8d65b public_html/admin/install/lib-install.php
--- a/public_html/admin/install/lib-install.php Tue Mar 09 18:54:04 2010 -0500
+++ b/public_html/admin/install/lib-install.php Tue Mar 09 19:07:03 2010 -0500
@@ -70,6 +70,12 @@
$_REQUEST = array_merge($_GET, $_POST);
+if (function_exists('date_default_timezone_get')) {
+ // this is not ideal but will stop PHP 5.3.0ff from complaining ...
+ $system_timezone = @date_default_timezone_get();
+ date_default_timezone_set($system_timezone);
+}
+
if (empty($LANG_DIRECTION)) {
$LANG_DIRECTION = 'ltr';
}
@@ -1225,6 +1231,10 @@
$retval = '';
+ if (substr($gl_path, -13) == 'db-config.php') {
+ $gl_path = dirname($gl_path);
+ }
+
$dbs = array(
'mysql' => array('file' => 'mysql',
'fn' => 'mysql_connect',
diff -r b15e25c08b94 -r b62e11b8d65b public_html/admin/install/lib-upgrade.php
--- a/public_html/admin/install/lib-upgrade.php Tue Mar 09 18:54:04 2010 -0500
+++ b/public_html/admin/install/lib-upgrade.php Tue Mar 09 19:07:03 2010 -0500
@@ -488,6 +488,8 @@
require_once $_CONF['path'] . 'sql/updates/' . $_DB_dbms . '_1.6.1_to_1.6.2.php';
INST_updateDB($_SQL);
+ update_ConfValuesFor162();
+
$current_gl_version = '1.6.2';
$_SQL = '';
break;
diff -r b15e25c08b94 -r b62e11b8d65b public_html/admin/sectest.php
--- a/public_html/admin/sectest.php Tue Mar 09 18:54:04 2010 -0500
+++ b/public_html/admin/sectest.php Tue Mar 09 19:07:03 2010 -0500
@@ -334,7 +334,7 @@
// Note: We're not testing the 'sql' and 'language' directories.
- if (($_CONF['allow_mysqldump'] == 1) && ($_DB_dbms == 'mysql') || $_DB_dbms=='pgsql') {
+ if (($_CONF['allow_mysqldump'] == 1) && ($_DB_dbms == 'mysql')) {
if (makeTempfile($_CONF['backup_path'] . 'test.txt')) {
$display .= doTest($url, 'backups/test.txt',
'backups ' . $LANG_SECTEST['directory']);
@@ -376,12 +376,11 @@
$display .= '<p class="warningsmall"><strong>'
. $LANG_SECTEST['please_fix'] . '</strong></p>';
- DB_query("UPDATE {$_TABLES['vars']} SET name='security_check', value ='0'");
+ DB_save($_TABLES['vars'], 'name,value', "'security_check','0'");
} else {
$display .= '<p>' . $LANG_SECTEST['please_note'] . '</p>';
- DB_query("UPDATE {$_TABLES['vars']} SET name='security_check', value ='1'");
-
+ DB_save($_TABLES['vars'], 'name,value', "'security_check','1'");
}
$ml = COM_createLink('geeklog-announce',
diff -r b15e25c08b94 -r b62e11b8d65b public_html/docs/english/config.html
--- a/public_html/docs/english/config.html Tue Mar 09 18:54:04 2010 -0500
+++ b/public_html/docs/english/config.html Tue Mar 09 19:07:03 2010 -0500
@@ -321,6 +321,10 @@
<li>'any': results may contain any of the search terms.</li>
<li>'phrase': search for the exact phrase as entered. (default)</li>
</ul></td></tr>
+<tr>
+ <td valign="top"><a name="desc_search_def_sort">search_def_sort</a></td>
+ <td valign="top">'Hits (desc)'</td>
+ <td valign="top">The default sort order for the search results.</td></tr>
</table>
diff -r b15e25c08b94 -r b62e11b8d65b public_html/docs/history
--- a/public_html/docs/history Tue Mar 09 18:54:04 2010 -0500
+++ b/public_html/docs/history Tue Mar 09 19:07:03 2010 -0500
@@ -3,6 +3,9 @@
Apr ??, 2010 (1.6.2)
------------
+- Since we can now re-authenticate expired security tokens, we don't need to
+ display the token expire notice any longer. Exception: Users who logged in
+ through OpenID can't re-authenticate and will still get the message [Dirk]
- Block Names can no longer be empty [Dirk]
- When you had more than 50 blocks per side, disabling a block on one page of
the block list would also disable all blocks on all the other pages of the
@@ -85,6 +88,8 @@
Polls Plugin
------------
+- Fixed display of the edit icon in the Poll block - didn't check for polls.edit
+ permissions (but wouldn't let you edit the poll) [Dirk]
- Fixed wrong "access denied" message when attempting to view comments on a poll
that the user is not allowed to view (bug #0001044) [Dirk]
- Fixed comment bar Refresh button (bug #0001044) [Dirk]
diff -r b15e25c08b94 -r b62e11b8d65b public_html/layout/professional/admin/story/storyeditor.thtml
--- a/public_html/layout/professional/admin/story/storyeditor.thtml Tue Mar 09 18:54:04 2010 -0500
+++ b/public_html/layout/professional/admin/story/storyeditor.thtml Tue Mar 09 19:07:03 2010 -0500
@@ -183,11 +183,11 @@
</tr>
More information about the geeklog-cvs
mailing list