Commit graph

13626 commits

Author SHA1 Message Date
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
Vjacheslav Trushkin
39944a08b9 [feature/merging-style-components] New acp_styles template
New acp_styles.html, completely rewritten

PHPBB3-10632
2012-03-15 00:20:11 +02:00
Vjacheslav Trushkin
e35a20f957 [feature/merging-style-components] New acp_styles
New acp_styles, completely rewritten

PHPBB3-10632
2012-03-14 23:47:57 +02:00
Vjacheslav Trushkin
0c6955e73c [feature/merging-style-components] Adding new language variables
Adding new language variables for acp_styles and removing some unused variables

PHPBB3-10632
2012-03-14 23:45:54 +02:00
Vjacheslav Trushkin
ce215658eb [feature/merging-style-components] Adjusting unit tests
Adjusting unit tests for new styles table structure

PHPBB3-10632
2012-03-14 23:45:02 +02:00
Vjacheslav Trushkin
f32cc3ae8f [feature/merging-style-components] Admin.css additions for acp_styles
Adding background colors for row iterations and font color for disabled rows to admin control panel css.

PHPBB3-10632
2012-03-14 23:45:01 +02:00
Vjacheslav Trushkin
95a69639fd [feature/merging-style-components] Adding template information to style.cfg
Adding template data to style.cfg and removing obsolete comments

PHPBB3-10632
2012-03-14 23:26:23 +02:00
Vjacheslav Trushkin
1cc9f60f95 [feature/merging-style-components] Removing theme.cfg and template.cfg
Removing theme.cfg and template.cfg

PHPBB3-10632
2012-03-14 23:26:01 +02:00
Vjacheslav Trushkin
68336ab137 [feature/merging-style-components] Updating coding guidelines
Updating template inheritance section in coding guidelines

PHPBB3-10632
2012-03-14 23:25:07 +02:00
Vjacheslav Trushkin
ae7d290a22 [feature/merging-style-components] Updating PHP files
Removing theme and template entries in all files, except for acp styles section

PHPBB3-10632
2012-03-14 23:24:16 +02:00
Joas Schilling
33dce916e2 [ticket/10690] Fix undefined UNAPPROVED_POSTS_ZERO_TOTAL in queue
PHPBB3-10690
2012-03-14 22:22:22 +01:00
Vjacheslav Trushkin
234e5d6402 [feature/merging-style-components] Implementing unlimited parent templates
Implementing possibility of unlimited levels of parent templates. Paths are stored in style_parent_tree, entries are separated by /

PHPBB3-10632
2012-03-14 23:22:02 +02:00
Vjacheslav Trushkin
ae3b0f736d [feature/merging-style-components] Updating database and acp modules
Removing theme and template tables, adding new columns to styles table, deleting acp modules, deleting code that updates theme in updater

PHPBB3-10632
2012-03-14 23:18:18 +02:00
Vjacheslav Trushkin
b7d84a586c [feature/merging-style-components] Renaming template classes
Changing template classes prefixes from phpbb_template to phpbb_style (for classes that will work with styles) or phpbb_style_template (for classes that are specific to templates)

PHPBB3-10632
2012-03-14 23:12:11 +02:00
Vjacheslav Trushkin
7d414d04ca [feature/merging-style-components] Moving template classes to style
Moving includes/template/ to includes/style/, adding template_ prefix to classes that deal only with templates

PHPBB3-10632
2012-03-14 22:57:58 +02:00
Joas Schilling
ba6943a6a0 [ticket/10605] Prefix function with phpbb_ and use true instead of 1
PHPBB3-10605
2012-03-12 10:11:52 +01:00
Joas Schilling
3b7a6a3efa [ticket/10689] Fix "First character"-option in "Find a member"-search
PHPBB3-10689
2012-03-12 00:39:12 +01:00
rxu
ff8d523768 [ticket/10684] Rename function phpbb_get_banned_users_ids() parameter
PHPBB3-10684
2012-03-12 01:57:51 +08:00
rxu
da395edbca [ticket/10684] Remove intval mapping for array keys
PHP manual for arrays http://php.net/manual/en/language.types.array.php states
that the following key cast will occur: Strings containing valid integers will
be cast to the integer type. E.g. the key "8" will actually be stored under 8.
Thus, no intval mapping for numeric array keys is needed.

PHPBB3-10684
2012-03-12 01:47:28 +08:00
rxu
321d0d9b56 [ticket/10684] Adjust pm_notifications() to handle stale bans
- Add parameter (array) to the function phpbb_get_banned_users_ids()
- Fix function pm_notification() to handle users with stale bans

PHPBB3-10684
2012-03-12 01:44:00 +08:00
David King
7dfb8d7c20 Merge branch 'develop-olympus' into develop 2012-03-11 12:59:52 -04:00
David King
b652e1a1bb Merge branch 'unknownbliss/ticket/10697' into develop-olympus 2012-03-11 12:58:55 -04:00
Igor Wiedler
ae984025f0 Merge branch 'develop' into feature/event-dispatcher
* develop: (95 commits)
  [ticket/9084] Explain the logic.
  [ticket/10653] Call get_row_count of base class in mysql get_estimated_row_count
  [ticket/9813] Only get posts table row count if we detected a fulltext index.
  [feature/append_var] Adding test case
  [ticket/7432] Delete redundant reference to "appropriate menu item".
  [ticket/10618] Change phpBB 3 to phpBB 3.1.
  [ticket/10685] Refactor template test defaults for php 5.4 compatibility.
  [feature/append_var] Adding append_var template class function
  [ticket/9813] Also use estimated row count of posts table for fulltext mysql.
  [ticket/10653] Fix parameter to substr() in unit tests. Should be 1, not -1.
  [ticket/10653] Unit tests for get_row_count() and get_estimated_row_count().
  [ticket/10653] Add ability to count table rows to database abstraction layer.
  [ticket/9813] Use table status row count only if greater than 100000 or exact.
  [ticket/9813] Use SHOW TABLE STATUS to get search stats for native on MySQL.
  [ticket/8652] Comment for also updating forum watch table in user_notification.
  [ticket/8652] Sending 2 emails on 2 replies
  [ticket/10680] Add /phpBB/ext/* to .gitignore
  [ticket/10672] Fix total post count language string in statistics and feed
  [ticket/9220] Remove margin on table.table1 so it's centered in the blue box.
  [ticket/10453] Fixing spacing
  ...

Conflicts:
	tests/bootstrap.php
2012-03-11 15:18:33 +01:00
Igor Wiedler
e02d92ac62 [feature/event-dispatcher] Use real EventDispatcher through composer
* replace the copy-pasta EventDispatcher with the real one from Symfony2
* use composer for managing this dependency, use composer autoloading

PHPBB3-9550
2012-03-11 15:15:33 +01:00
Igor Wiedler
5dd5df46a4 [feature/event-dispatcher] Remove copied EventDispatcher code
PHPBB3-9550
2012-03-11 14:55:30 +01:00
Michael Cullum
24f1896b3c [ticket/10697] Updating gitignore to match develop branch
PHPBB3-10697
2012-03-11 09:42:56 +00:00
rxu
a79b3490c2 [ticket/10684] Cast user_id to integer
PHPBB3-10684
2012-03-11 00:56:07 +08:00
Michael Cullum
668c61686b [ticket/10694] Adjusting details link to 5.3 announcement
PHPBB3-10694
2012-03-10 16:47:07 +00:00
Andreas Fischer
3850b05fbb Merge branch 'develop-olympus' into develop
* develop-olympus:
  [ticket/7432] Delete redundant reference to "appropriate menu item".
  [ticket/7432] Explain what users are inactive in more detail.
2012-03-09 23:43:11 +01:00
Andreas Fischer
aee79c6cdb Merge remote-tracking branch 'p/ticket/7432' into develop-olympus
* p/ticket/7432:
  [ticket/7432] Delete redundant reference to "appropriate menu item".
  [ticket/7432] Explain what users are inactive in more detail.
2012-03-09 23:41:43 +01:00
rxu
89a6cb2886 [ticket/10684] Refactor $sql_ignore_users array update
PHPBB3-10684
2012-03-10 00:17:39 +08:00