Bug fix: correct date problems and now use bModifed field instead of former bDatetime one (in bookmarks table)
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@200 b3834d28-1941-0410-a4f8-b48e95affb8f
This commit is contained in:
parent
d6889066c0
commit
c5fd601870
2 changed files with 11 additions and 11 deletions
|
@ -127,7 +127,7 @@ class BookmarkService {
|
||||||
|
|
||||||
// Note that if date is NULL, then it's added with a date and time of now, and if it's present,
|
// Note that if date is NULL, then it's added with a date and time of now, and if it's present,
|
||||||
// it's expected to be a string that's interpretable by strtotime().
|
// it's expected to be a string that's interpretable by strtotime().
|
||||||
if (is_null($date))
|
if (is_null($date) || $date == '')
|
||||||
$time = time();
|
$time = time();
|
||||||
else
|
else
|
||||||
$time = strtotime($date);
|
$time = strtotime($date);
|
||||||
|
@ -286,7 +286,7 @@ class BookmarkService {
|
||||||
|
|
||||||
switch($sortOrder) {
|
switch($sortOrder) {
|
||||||
case 'date_asc':
|
case 'date_asc':
|
||||||
$query_5.= ' ORDER BY B.bDatetime ASC ';
|
$query_5.= ' ORDER BY B.bModified ASC ';
|
||||||
break;
|
break;
|
||||||
case 'title_desc':
|
case 'title_desc':
|
||||||
$query_5.= ' ORDER BY B.bTitle DESC ';
|
$query_5.= ' ORDER BY B.bTitle DESC ';
|
||||||
|
@ -301,7 +301,7 @@ class BookmarkService {
|
||||||
$query_5.= ' ORDER BY B.bAddress ASC ';
|
$query_5.= ' ORDER BY B.bAddress ASC ';
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
$query_5.= ' ORDER BY B.bDatetime DESC ';
|
$query_5.= ' ORDER BY B.bModified DESC ';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handle the parts of the query that depend on any tags that are present.
|
// Handle the parts of the query that depend on any tags that are present.
|
||||||
|
|
|
@ -197,7 +197,7 @@ if(isset($currenttag) && $currenttag!= '') {
|
||||||
echo '<div class="address">'.shortenString($address).'</div>';
|
echo '<div class="address">'.shortenString($address).'</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
echo '<div class="meta">'. date($GLOBALS['shortdate'], strtotime($row['bDatetime'])) . $cats . $copy . $edit ."</div>\n";
|
echo '<div class="meta">'. date($GLOBALS['shortdate'], strtotime($row['bModified'])) . $cats . $copy . $edit ."</div>\n";
|
||||||
|
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue