Create a very basic user loader class to handle querying/storing
user data in a centralized location.
Use DIC collection service for notification types/methods.
Cleanup unused dependencies.
Fix some other issues.
PHPBB3-11103
* upstream/develop: (2171 commits)
[ticket/11164] Update composer.phar
[ticket/10933] Use inheritDoc, eliminate copy pasted docblocks.
[ticket/10933] Dependency inject template context.
[ticket/10933] Expanded prose documentation for phpbb_extension_provider.
[ticket/10933] Specify empty template path for absolute includephp test.
[ticket/10933] Useful documentation for template locate function
[ticket/10933] Typo fixes
[ticket/10933] Initialize template context when template is constructed.
[ticket/11099] Mark acp_ban::display_ban_options() as static.
[ticket/11158] Require acl_u_sig for ucp signature module.
[ticket/11158] Revert old fix in PHPBB3-10186.
[ticket/11159] static public is the currently approved order.
[ticket/11157] static public is the currently approved order.
[ticket/11157] Fix remaining captcha spam.
[ticket/11157] get_captcha_types is an instance method.
[ticket/11156] Delete "Misc" tab of forum based permissions + move items
[ticket/10848] Move include up.
[ticket/11014] Fix old pagination assignment
[ticket/11018] Fix several paginations in ACP
[ticket/11014] Fix IF statements for new template pagination
...
Conflicts:
phpBB/includes/functions_user.php
* develop-olympus:
[ticket/10950] Fix grammar in comments
[ticket/10950] Delete PMs for users that have not yet read the pm
[ticket/10950] Fix unit tests to fit the new pm deleting behaviour
[ticket/10950] Update undelivered pm counts in batches not 1 by 1 for each user
[ticket/10950] Remove deleted entries in tests instead of commenting them out
[ticket/10950] Use database count() and group by instead of doing that in php
[ticket/10950] Check $delete_ids to be not empty
[ticket/10950] Recreated the behaviour of phpbb_delete_user_pms()
[ticket/10950] Fix unit tests to reflect desired behaviour
[ticket/10950] Add some first and simple unit tests for phpbb_delete_user_pms()
[ticket/10950] Correct comment for the second query.
[ticket/10950] Add empty line to make unset() call more visible.
[ticket/10950] Select the correct columns in SQL queries.
[ticket/10950] Use a variable for the private message id.
[ticket/10950] Move array initialisation to the front.
[ticket/10950] Remove redundant if statement.
[ticket/10950] Fix SQL coding style (indentation) in second SQL query.
[ticket/10950] Use proper ' in order to fix comment.
- Get delete_ids, pms of the user as receipt
- Get undelivered_msg, pms of the user as sender
- Delete undelivered_msg, if there are only NO_BOX, OUTBOX and SENTBOX links
- Correct the _new and _unread user values for the receipts
- Delete delete_ids, if there are no links to them anymore
- Reset _new and _unread values for the user we delete
PHPBB3-10950
The type of $user->data['user_id'] is (almost) guranteed to be integer
since session::session_create() casts it to integer.
The type of $row['user_id'] is only an integer if the DB driver adjusts the
PHP type according to the DB type. This is only done by some of our
not-so-popular DB drivers and is not the case for MySQL.
As such this comparison is (almost) never true and a PM is also sent to the
author itself when it is sent to a group the author is also a member of.
Since this behaviour seems to have been accepted by the communty, the dead
code is removed and current behaviour is kept.
Also, checking this in the loop seems to be a rather bad idea.
Introduced by 78b1c4caaa17cc8760b685ad41c19f15f9d89b68.
PHPBB3-10790
* develop-olympus:
[ticket/10605] Use database updater function _sql() instead of $db->sql_query()
[ticket/10605] Put end of array on its own line because start of array is too.
[ticket/10605] Add parameter documentation to phpbb_delete_user_pms
[ticket/10605] Fix left join usage.
[ticket/10605] Add a section for updating from 3.0.10 to schema updates.
[ticket/10605] Fix syntax error in database updater.
[ticket/10605] Reset user´s pm count to 0 when deleting his PMs
[ticket/10605] Split query to be able to use indexes
[ticket/10605] Rename $delete_rows to $delete_ids.
[ticket/10605] Break long comment into multiple lines 80 chars short.
[ticket/10605] Remove unnecessary $delete_ids array.
[ticket/10605] Remove unnecessary array_keys calls on $delete_rows.
[ticket/10605] Remove unused variable declarations.
[ticket/10605] Turn $undelivered_user into a real array of counters.
[ticket/10605] Use unset() instead of checking user_id over and over again.
[ticket/10605] Prefix function with phpbb_ and use true instead of 1
[ticket/10605] Delete orphan private messages on update
[ticket/10605] Check for orphan privmsgs when deleting a user
* ticket/10605:
[ticket/10605] Use database updater function _sql() instead of $db->sql_query()
[ticket/10605] Put end of array on its own line because start of array is too.
[ticket/10605] Add parameter documentation to phpbb_delete_user_pms
[ticket/10605] Fix left join usage.
[ticket/10605] Add a section for updating from 3.0.10 to schema updates.
[ticket/10605] Fix syntax error in database updater.
[ticket/10605] Reset user´s pm count to 0 when deleting his PMs
[ticket/10605] Split query to be able to use indexes
[ticket/10605] Rename $delete_rows to $delete_ids.
[ticket/10605] Break long comment into multiple lines 80 chars short.
[ticket/10605] Remove unnecessary $delete_ids array.
[ticket/10605] Remove unnecessary array_keys calls on $delete_rows.
[ticket/10605] Remove unused variable declarations.
[ticket/10605] Turn $undelivered_user into a real array of counters.
[ticket/10605] Use unset() instead of checking user_id over and over again.
[ticket/10605] Prefix function with phpbb_ and use true instead of 1
[ticket/10605] Delete orphan private messages on update
[ticket/10605] Check for orphan privmsgs when deleting a user
Conflicts:
phpBB/install/database_update.php
* develop-olympus:
[ticket/10684] Adjust function and parameter name, minor changes.
[ticket/10684] Rename function phpbb_get_banned_users_ids() parameter
[ticket/10684] Remove intval mapping for array keys
[ticket/10684] Adjust pm_notifications() to handle stale bans
[ticket/10684] Cast user_id to integer
[ticket/10684] Refactor $sql_ignore_users array update
[ticket/10684] Remove isset() for $sql_ignore_users update
[ticket/10684] Fix 2 typos in comment lines.
[ticket/10684] Send notifications for users with stale bans
Conflicts:
phpBB/includes/functions_user.php
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