Re: Change in User Note Order
| From: | Sara Golemon | Date: | Tue, 03 Jun 2003 19:27:56 +0000 |
| Subject: | Re: Change in User Note Order | ||
| References: | 1 2 | Groups: | php.mirrors |
| Request: | Send a blank email to php-mirrors+get-18468@lists.php.net to get a copy of this message | ||
Time to play secretary.... per our conversation in IRC:
I'll paraphase with a CVS diff:
Index: shared-manual.inc
===================================================================
RCS file: /repository/phpweb/include/shared-manual.inc,v
retrieving revision 1.192
diff -u -r1.192 shared-manual.inc
--- shared-manual.inc 2 Jun 2003 09:49:46 -0000 1.192
+++ shared-manual.inc 3 Jun 2003 19:19:27 -0000
@@ -254,6 +254,10 @@
echo 'There are no user contributed notes for this page.';
echo '</td></tr>';
} else {
+ if (strtoupper($_COOKIE['NOTES_ORDER']) == 'ASC') {
+ $notes = array_reverse($notes);
+ }
+
foreach($notes as $note) {
makeEntry($note['xwhen'], $note['user'], $note['note'],
$note['id']);
}
This is of course incomplete as it doesn't include anyway to set the cookie
(and it doesn't bear in mind BC with mirrors running older versions), but
the idea is simple enough. Let the user choose the sort order at a
not-horrible cost in processing time. For those who don't change their sort
order the cost is one comparison. For those who do choose to change their
sort order, there is a (potentially large) array to be reversed, but that
presumably small population has specifically stated they want that order and
it'd be nice to give it to them.
That said, I'd personnaly like to see the default sort order put back to
ascending, with descending being the option. This avoids backlash at the
volume of changes to the website.
-Sara