]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/commit - themes/default/templates/userprefs.tmpl
Cleanup/refactor time-zone offset preference and relative date
authordairiki <dairiki@96ab9672-09ca-45d6-a79d-3d69d39ca109>
Fri, 8 Feb 2002 22:03:04 +0000 (22:03 +0000)
committerdairiki <dairiki@96ab9672-09ca-45d6-a79d-3d69d39ca109>
Fri, 8 Feb 2002 22:03:04 +0000 (22:03 +0000)
commitbfac0beff7dcb44a509f0d50d5f5d9e52bd660f0
treeb75b37c304a99385e4e16bbdb6e8751df662d21d
parent57171483f6e68e4105a5a44f678d6ab0ff742dab
Cleanup/refactor time-zone offset preference and relative date
preference handling.

Time-zone offsets: the allowable range has to be at least [-24,24]
hours (maybe a bit more, depending on daylight savings, etc...)
Also note that there are some 1/4 hour time zones.
I think its really much cleaner just to use a text input to enter
the time zone offset.

Relative Dates:  Unified code for generating "Last edited on" message.
(This logic was replicated in various places, and was buggy...)

Theme:
 formatDateTime() now always gives you a Date and Time.
 formatDate() now always gives you a Date.
 use getDay() if you want a (possibly) relative date.
 use getLastModifiedMessage() to get the "Last edited on" message.

These modifications slightly alter the markup of the last edited
dates in the Portland theme, and the stardates in the WikiTrek theme.
(But I think the gains in code reuse and simplicity are wroth the
sacrifice.)

git-svn-id: svn://svn.code.sf.net/p/phpwiki/code/trunk@1942 96ab9672-09ca-45d6-a79d-3d69d39ca109
17 files changed:
lib/Theme.php
lib/diff.php
lib/main.php
lib/plugin/RecentChanges.php
lib/stdlib.php
themes/Hawaiian/themeinfo.php
themes/MacOSX/themeinfo.php
themes/Portland/templates/actionbar.tmpl
themes/Portland/templates/viewsource.tmpl
themes/Portland/themeinfo.php
themes/Sidebar/themeinfo.php
themes/WikiTrek/themeinfo.php
themes/default/templates/body.tmpl
themes/default/templates/browse.tmpl
themes/default/templates/userprefs.tmpl
themes/default/templates/viewsource.tmpl
themes/default/themeinfo.php