[geeklog-cvs] geeklog: Limit sorting of Type and Date, patch provided by LWC (...
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Sat Nov 7 11:22:15 EST 2009
changeset 7449:ad0616900bdb
url: http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/ad0616900bdb
user: Sami Barakat <sami at sbarakat.co.uk>
date: Sat Nov 07 16:20:34 2009 +0000
description:
Limit sorting of Type and Date, patch provided by LWC (feature request #0000910)
diffstat:
system/classes/search.class.php | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (22 lines):
diff -r 16c9168c8360 -r ad0616900bdb system/classes/search.class.php
--- a/system/classes/search.class.php Sat Nov 07 14:57:12 2009 +0100
+++ b/system/classes/search.class.php Sat Nov 07 16:20:34 2009 +0000
@@ -482,14 +482,16 @@
else if ($style == 'google')
{
$sort_uid = $this->_author == '' ? true : false;
+ $sort_date = empty($this->_dateStart) || empty($this->_dateEnd) || $this->_dateStart != $this->_dateEnd ? true : false;
+ $sort_type = $this->_type == 'all' ? true : false;
$obj->setStyle('inline');
$obj->setField('', LF_ROW_NUMBER, $show_num, false, '<b>%d.</b>');
$obj->setField($LANG09[16], 'title', true, true, '%s<br' . XHTML . '>');
$obj->setField('', 'description', true, false, '%s<br' . XHTML . '>');
$obj->setField('', '_html', true, false, '<span style="color:green;">');
$obj->setField($LANG09[18], 'uid', $show_user, $sort_uid, $LANG01[104].' %s ');
- $obj->setField($LANG09[17], 'date', true, true, $LANG01[36].' %s');
- $obj->setField($LANG09[5], LF_SOURCE_TITLE,$show_type, true, ' - %s');
+ $obj->setField($LANG09[17], 'date', true, $sort_date, $LANG01[36].' %s');
+ $obj->setField($LANG09[5], LF_SOURCE_TITLE,$show_type, $sort_type, ' - %s');
$obj->setField($LANG09[50], 'hits', $show_hits, true, ' - %s '.$LANG09[50]);
$obj->setField('', '_html', true, false, '</span>');
$this->_wordlength = 50;
More information about the geeklog-cvs
mailing list