Commit graph

12272 commits

Author SHA1 Message Date
Oleg Pudeyev
56a7038aa5 [feature/new-tz-handling] Removed DST options from templates.
PHPBB3-9558
2012-03-14 22:57:31 -04:00
Oleg Pudeyev
da8009603d [feature/new-tz-handling] Preselect a timezone in registration.
Use Javascript to obtain client's timezone offset and select the
first timezone in our list with that offset.

Changes for prosilver only. The javascript file should be shared
between styles.

PHPBB3-9558
2012-03-14 22:57:31 -04:00
Oleg Pudeyev
bb461c8daa [feature/new-tz-handling] Sort timezones in selector by offset.
Since the list of timezones is very long, and users are likely
to know their current offset but not necessarily which city
that is nearby is in the timezone database, sort the list of
timezones by offset.

UTC is specially handled to show up before other GMT+0 timezones.

PHPBB3-9558
2012-03-14 22:57:31 -04:00
Chris Smith
f17664a00c [feature/new-tz-handling] Correct a bug preventing multiple formats working.
PHPBB3-9558
2012-03-14 22:57:30 -04:00
Chris Smith
190b019fa2 [feature/new-tz-handling] Remove case mangling, the identifiers are correct.
PHPBB3-9558
2012-03-14 22:57:30 -04:00
Chris Smith
0f320a6c48 [feature/new-tz-handling] Update tz_select() to use the PHP timezone database.
tz_select() now uses the PHP timezone database to generate the timezone
selection box, it tries to use a translated language string otherwise falls
back to a label produced from the timezone identifier. I've done this so
new timezones are available immediately without a new language pack.

PHPBB3-9558
2012-03-14 22:57:30 -04:00
Chris Smith
1665434853 [feature/new-tz-handling] Remove code using legacy timezone properties.
Code accessing the legacy user::$timezone and user::$dst properties
has been removed and replaced with code utilising user::create_datetime().

Changed by Oleg:

in viewtopic, memberlist and index use getTimestamp() + getOffset().

We show members that have birthdays on the specified date.

getTimestamp() returns the current date in UTC. We add getOffset() to
obtain the current local time in the viewing user's timezone.
Then we find members having birthday on this date.

Changed by Oleg again:

Take leap year status out of the datetime object we have, this seems
like it should work as one would expect.

PHPBB3-9558
2012-03-14 22:57:30 -04:00
Chris Smith
af789040b8 [feature/new-tz-handling] Modify database schemas.
- Dropped the user_dst column which is no longer required.
- Modified the user_timezone column to take a string, max length 100.

PHPBB3-9558
2012-03-14 22:57:30 -04:00
Chris Smith
6e1278655f [feature/new-tz-handling] Removed line that was missed in cc312d8.
PHPBB3-9558
2012-03-14 22:57:30 -04:00
Chris Smith
e9fe9ea518 [feature/new-tz-handling] Fix bug from 3.0 formatting future dates.
Future dates can get formatted as 'less than a minute ago' if they
occur in the future on the same minute as the current minute.

PHPBB3-9558 PHPBB3-9712
2012-03-14 22:57:30 -04:00
Chris Smith
5dd7916c49 [feature/new-tz-handling] Check the is_short flag stored inside the format array.
Reuse the existing check store in the format array to determine if the date time
format supports relative formatting.

PHPBB3-9558
2012-03-14 22:57:30 -04:00
Chris Smith
8fe46175af [feature/new-tz-handling] Fix undefined variable.
PHPBB3-9558
2012-03-14 22:57:30 -04:00
Chris Smith
f085735ef8 [feature/new-tz-handling] Explained name of phpbb_datetime::getTimestamp()
phpbb_datetime::getTimestamp() exists purely to support PHP 5.2 which
does not implement the method.

PHPBB3-9558
2012-03-14 22:57:30 -04:00
Chris Smith
dba89a5341 [feature/new-tz-handling] Added phpbb_datetime::__toString().
New phpbb_datetime::__toString() magic method that formats the datetime
according to the users default settings.

PHPBB3-9558
2012-03-14 22:57:29 -04:00
Chris Smith
c521ef1591 [feature/new-tz-handling] Comment and optimise phpbb_datetime::format().
- Added comments explaining the complex time computations for rendering
  relative date times.

- Replaced some repeated method invokations with variables.

PHPBB3-9558
2012-03-14 22:57:29 -04:00
Chris Smith
522f65d079 [feature/new-tz-handling] Correct typo in member comment.
PHPBB3-9558
2012-03-14 22:57:29 -04:00
Chris Smith
2e7d9ec805 [feature/new-tz-handling] Fixed bug with signature of user::create_datetime().
First argument to user::create_datetime() should be optional.

PHPBB3-9558
2012-03-14 22:57:29 -04:00
Chris Smith
74be23a098 [feature/new-tz-handling] Added a user::create_datetime() method.
New method which handles instantiating new phpbb_datetime objects in
the context of the current user.

PHPBB3-9558
2012-03-14 22:57:29 -04:00
Chris Smith
6a783b843b [feature/new-tz-handling] Replace user::$timezone with user::$tz.
user::$tz will store the new DateTimeZone object representing the users
timezone instead of the existing user::$timezone and user::$dst combination.

PHPBB3-9558
2012-03-14 22:57:29 -04:00
Chris Smith
9e1812a0ca [feature/new-tz-handling] Remove old user::$dst property
PHPBB3-9558
2012-03-14 22:57:29 -04:00
Chris Smith
b2a812e36b [feature/new-tz-handling] Correct capitalisation of phpbb_datetime.
PHPBB3-9558
2012-03-14 22:57:29 -04:00
Chris Smith
3559d20624 [feature/new-tz-handling] Update user methods to use new date processing class.
user::setup() now stores a DateTimeZone object in user::$timezone representing
the users timezone. For backwards compatibility a numeric value in
user/board_timezone will be converted into one of the legacy Etc/GMT±X
timezones. This will be used until the user updates his/her timezone in the
UCP.

user::format_date() is now basically a legacy wrapper that transforms a UTC
UNIX timestamp into a formatted localised date using phpbb_datetime::format().

PHPBB3-9558
2012-03-14 22:57:29 -04:00
Chris Smith
a5c3ff3769 [feature/new-tz-handling] Renamed old variables and removed extra conditional.
PHPBB3-9558
2012-03-14 22:57:29 -04:00
Chris Smith
e8b60fc3d8 [feature/new-tz-handling] Use phpbb_datetime rather than phpbb_DateTime.
PHPBB3-9558
2012-03-14 22:57:29 -04:00
Chris Smith
6f7d095e3f [feature/new-tz-handling] Wrapper around DateTime for new date time handling.
Wrapped PHP's DateTime with some extensions for supporting phpBB's relative
date formats and provided the DateTime::getTimestamp() method to PHP < 5.3.

PHPBB3-9558
2012-03-14 22:57:28 -04:00
Nils Adermann
5e225d5d7a Merge branch 'develop-olympus' into develop
* develop-olympus:
  [ticket/10480] Add a build target for changelog building.
  [ticket/10480] Add a build script for exporting the changelog from tracker.
  [ticket/10502] Fix typo in changelog. 'red' should have been 'read'.
2011-12-01 22:21:57 +01:00
Nils Adermann
cafe74a88d Merge branch 'prep-release-3.0.10' into develop-olympus
* prep-release-3.0.10:
  [ticket/10480] Add a build target for changelog building.
  [ticket/10480] Add a build script for exporting the changelog from tracker.
  [ticket/10502] Fix typo in changelog. 'red' should have been 'read'.
2011-12-01 22:21:30 +01:00
Nils Adermann
7f8968595b Merge remote-tracking branch 'github-bantu/ticket/10480' into prep-release-3.0.10
* github-bantu/ticket/10480:
  [ticket/10480] Add a build target for changelog building.
  [ticket/10480] Add a build script for exporting the changelog from tracker.
2011-12-01 22:20:48 +01:00
Nils Adermann
29723c97c6 Merge remote-tracking branch 'github-bantu/ticket/10502' into prep-release-3.0.10
* github-bantu/ticket/10502:
  [ticket/10502] Fix typo in changelog. 'red' should have been 'read'.
2011-12-01 22:20:11 +01:00
Andreas Fischer
af867de77c Merge branch 'develop-olympus' into develop
* develop-olympus:
  [ticket/10501] Fix description of table prefixes
2011-11-29 20:09:51 +01:00
Andreas Fischer
050fb83dfe Merge branch 'prep-release-3.0.10' into develop-olympus
* prep-release-3.0.10:
  [ticket/10501] Fix description of table prefixes
2011-11-29 20:09:38 +01:00
Andreas Fischer
e596d2ca7e Merge remote-tracking branch 'nickvergessen/ticket/10501' into prep-release-3.0.10
* nickvergessen/ticket/10501:
  [ticket/10501] Fix description of table prefixes
2011-11-29 20:09:25 +01:00
Andreas Fischer
f351914137 [ticket/10480] Add a build target for changelog building.
PHPBB3-10480
2011-11-29 20:05:27 +01:00
Andreas Fischer
4cf059e38f [ticket/10480] Add a build script for exporting the changelog from tracker.
PHPBB3-10480
2011-11-29 20:05:21 +01:00
Andreas Fischer
8f1f42cc6c [ticket/10502] Fix typo in changelog. 'red' should have been 'read'.
PHPBB3-10502
2011-11-29 19:59:31 +01:00
Andreas Fischer
705730bfa7 Merge branch 'develop-olympus' into develop
* develop-olympus:
  [prep-release-3.0.10] Remove duplicate ticket PHPBB3-10490 from changelog.
2011-11-28 23:12:53 +01:00
Andreas Fischer
895501743d Merge branch 'prep-release-3.0.10' into develop-olympus
* prep-release-3.0.10:
  [prep-release-3.0.10] Remove duplicate ticket PHPBB3-10490 from changelog.
2011-11-28 23:12:44 +01:00
Andreas Fischer
593ac9ed43 [prep-release-3.0.10] Remove duplicate ticket PHPBB3-10490 from changelog. 2011-11-28 23:10:01 +01:00
Joas Schilling
cb4e72298b [ticket/10501] Fix description of table prefixes
They must start with a letter, not an alphanumeric character

PHPBB3-10501
2011-11-28 11:28:46 +01:00
Andreas Fischer
2b3319c239 Merge branch 'develop-olympus' into develop
* develop-olympus:
  [prep-release-3.0.10] Update Changelog for 3.0.10-RC2 release.
2011-11-27 16:24:02 +01:00
Andreas Fischer
fc47fa06a3 Merge branch 'prep-release-3.0.10' into develop-olympus
* prep-release-3.0.10:
  [prep-release-3.0.10] Update Changelog for 3.0.10-RC2 release.
2011-11-27 16:23:53 +01:00
Andreas Fischer
799be4469a [prep-release-3.0.10] Update Changelog for 3.0.10-RC2 release. 2011-11-27 16:23:15 +01:00
Andreas Fischer
6215740112 Merge branch 'develop-olympus' into develop
* develop-olympus:
  [ticket/10497] Fix SQL error when guest visits forum with unread topic
2011-11-27 16:13:18 +01:00
Andreas Fischer
ede3963951 Merge branch 'prep-release-3.0.10' into develop-olympus
* prep-release-3.0.10:
  [ticket/10497] Fix SQL error when guest visits forum with unread topic
2011-11-27 16:13:11 +01:00
Andreas Fischer
b89320ad39 Merge remote-tracking branch 'rxu/ticket/10497' into prep-release-3.0.10
* rxu/ticket/10497:
  [ticket/10497] Fix SQL error when guest visits forum with unread topic
2011-11-27 16:12:39 +01:00
rxu
77e00d14a1 [ticket/10497] Fix SQL error when guest visits forum with unread topic
Regression from the ticket PHPBB3-9008 fix.

When topic marking was enabled for guests, and a guest visited a forum with
a new topic which is marked unread, the built SQL missed an alias for a
TOPICS_TABLE which resulted in the following error:

Unknown column 't.topic_approved' in 'where clause' [1054]

The fix is to add an alias for the table.

PHPBB3-10497
PHPBB3-9008
2011-11-27 23:11:22 +08:00
Andreas Fischer
791464258f Merge branch 'develop-olympus' into develop
* develop-olympus:
  [prep-release-3.0.10] Bumping version number for 3.0.10-RC2.

Conflicts:
	phpBB/install/database_update.php
2011-11-26 22:26:59 +01:00
Andreas Fischer
7520b27639 Merge branch 'prep-release-3.0.10' into develop-olympus
* prep-release-3.0.10:
  [prep-release-3.0.10] Bumping version number for 3.0.10-RC2.

Conflicts:
	phpBB/includes/constants.php
	phpBB/install/database_update.php
	phpBB/install/schemas/schema_data.sql
2011-11-26 22:20:32 +01:00
Andreas Fischer
007457f182 [prep-release-3.0.10] Bumping version number for 3.0.10-RC2. 2011-11-26 22:17:43 +01:00
Andreas Fischer
c4e29bde23 Merge remote-tracking branch 'p/ticket/10481' into develop
* p/ticket/10481:
  [ticket/10481] Use phar:// url for requiring goutte.
  [ticket/10481] Skip functional tests if phar extension is missing.
2011-11-25 19:37:59 +01:00