Part of request #2928950: Add config option to allow sorting by bookmark creation date instead of modification date
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@594 b3834d28-1941-0410-a4f8-b48e95affb8f
This commit is contained in:
parent
b009bdb07c
commit
991ef5c1bf
3 changed files with 14 additions and 2 deletions
|
@ -378,6 +378,16 @@ $defaultRecentDays = 14;
|
|||
*/
|
||||
$defaultOrderBy = 'date_desc';
|
||||
|
||||
/**
|
||||
* Database field to use when sorting by date.
|
||||
* Options here are 'bModified' to sort after
|
||||
* modification date, and 'bDatetime' to sort
|
||||
* after creation date
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
$dateOrderField = 'bModified';
|
||||
|
||||
/**
|
||||
* Number of entries that are shown in
|
||||
* the RSS feed by default.
|
||||
|
|
|
@ -7,6 +7,8 @@ ChangeLog for SemantiScuttle
|
|||
- Implement part of request #2928950:
|
||||
- User adjustable entry count: rss.php?count=20
|
||||
- Fix HTTP content type header for RSS
|
||||
- Add config option to allow sorting by bookmark creation date
|
||||
instead of modification date
|
||||
|
||||
0.95.1 - 2009-11-16
|
||||
-------------------
|
||||
|
|
|
@ -693,7 +693,7 @@ class SemanticScuttle_Service_Bookmark extends SemanticScuttle_DbService
|
|||
|
||||
switch($sortOrder) {
|
||||
case 'date_asc':
|
||||
$query_5 .= ' ORDER BY B.bModified ASC ';
|
||||
$query_5 .= ' ORDER BY B.' . $GLOBALS['dateOrderField'] . ' ASC ';
|
||||
break;
|
||||
case 'title_desc':
|
||||
$query_5 .= ' ORDER BY B.bTitle DESC ';
|
||||
|
@ -714,7 +714,7 @@ class SemanticScuttle_Service_Bookmark extends SemanticScuttle_DbService
|
|||
$query_5 .= ' ORDER BY B.bAddress ASC ';
|
||||
break;
|
||||
default:
|
||||
$query_5 .= ' ORDER BY B.bModified DESC ';
|
||||
$query_5 .= ' ORDER BY B.' . $GLOBALS['dateOrderField'] . ' DESC ';
|
||||
}
|
||||
|
||||
// Handle the parts of the query that depend on any tags that are present.
|
||||
|
|
Loading…
Reference in a new issue