[geeklog-cvs] geeklog: An attempt to fix sorting of stories by author when $_C...
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Sun Nov 29 16:03:34 EST 2009
changeset 7500:a1af6656a356
url: http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/a1af6656a356
user: Dirk Haun <dirk at haun-online.de>
date: Sun Nov 29 20:13:22 2009 +0100
description:
An attempt to fix sorting of stories by author when $_CONF['show_fullname'] is enabled. Really only works when all users entered their full name.
diffstat:
public_html/admin/story.php | 21 +++++++++++++--------
system/lib-admin.php | 1 +
2 files changed, 14 insertions(+), 8 deletions(-)
diffs (57 lines):
diff -r 5b5c1a258833 -r a1af6656a356 public_html/admin/story.php
--- a/public_html/admin/story.php Sun Nov 29 19:37:05 2009 +0100
+++ b/public_html/admin/story.php Sun Nov 29 20:13:22 2009 +0100
@@ -162,13 +162,18 @@
. $alltopics . $seltopics . '</select>';
$header_arr = array(
- array('text' => $LANG_ADMIN['edit'], 'field' => 'edit', 'sort' => false));
+ array('text' => $LANG_ADMIN['edit'], 'field' => 'edit', 'sort' => false),
+ array('text' => $LANG_ADMIN['title'], 'field' => 'title', 'sort' => true),
- $header_arr[] = array('text' => $LANG_ADMIN['title'], 'field' => 'title', 'sort' => true);
- $header_arr[] = array('text' => $LANG_ACCESS['access'], 'field' => 'access', 'sort' => false);
- $header_arr[] = array('text' => $LANG24[34], 'field' => 'draft_flag', 'sort' => true);
- $header_arr[] = array('text' => $LANG24[7], 'field' => 'username', 'sort' => true); //author
- $header_arr[] = array('text' => $LANG24[15], 'field' => 'unixdate', 'sort' => true); //date
+ array('text' => $LANG_ACCESS['access'], 'field' => 'access', 'sort' => false),
+ array('text' => $LANG24[34], 'field' => 'draft_flag', 'sort' => true)
+ );
+ if ($_CONF['show_fullname'] == 1) {
+ $header_arr[] = array('text' => $LANG24[7], 'field' => 'fullname', 'sort' => true); // author
+ } else {
+ $header_arr[] = array('text' => $LANG24[7], 'field' => 'username', 'sort' => true); // author
+ }
+ $header_arr[] = array('text' => $LANG24[15], 'field' => 'unixdate', 'sort' => true); // date
$header_arr[] = array('text' => $LANG_ADMIN['topic'], 'field' => 'tid', 'sort' => true);
$header_arr[] = array('text' => $LANG24[32], 'field' => 'featured', 'sort' => true);
@@ -185,7 +190,7 @@
);
$menu_arr[] = array('url' => $_CONF['site_admin_url'],
- 'text' => $LANG_ADMIN['admin_home']);
+ 'text' => $LANG_ADMIN['admin_home']);
$retval .= COM_startBlock($LANG24[22], '',
COM_getBlockTemplate('_admin_block', 'header'));
@@ -212,7 +217,7 @@
'table' => 'stories',
'sql' => $sql,
'query_fields' => array('title', 'introtext', 'bodytext', 'sid', 'tid'),
- 'default_filter' => $excludetopics . COM_getPermSQL ('AND')
+ 'default_filter' => $excludetopics . COM_getPermSQL('AND')
);
$retval .= ADMIN_list('story', 'ADMIN_getListField_stories', $header_arr,
diff -r 5b5c1a258833 -r a1af6656a356 system/lib-admin.php
--- a/system/lib-admin.php Sun Nov 29 19:37:05 2009 +0100
+++ b/system/lib-admin.php Sun Nov 29 20:13:22 2009 +0100
@@ -968,6 +968,7 @@
break;
case 'username':
+ case 'fullname':
$retval = COM_getDisplayName($A['uid'], $A['username'], $A['fullname']);
break;
More information about the geeklog-cvs
mailing list