1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-02-24 12:03:21 +01:00

165 Commits

Author SHA1 Message Date
Nathan Guse
2afb8b9df8 [ticket/11103] Create user loader class, update for DIC
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
2012-11-20 22:54:16 -06:00
Nathaniel Guse
106daa09eb [ticket/11103] Fix failed automerge
PHPBB3-11103
2012-11-10 11:20:06 -06:00
Nathaniel Guse
68363e362d Merge branch 'develop' of github.com:EXreaction/phpbb3 into ticket/11103
Conflicts:
	phpBB/install/schemas/mssql_schema.sql
	phpBB/report.php
	phpBB/styles/prosilver/template/ucp_prefs_personal.html
	phpBB/styles/subsilver2/template/ucp_prefs_personal.html
2012-11-10 10:58:44 -06:00
Oleg Pudeyev
87ea50948e Merge remote-tracking branch 'upstream/develop' into feature/prune-users
* 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
2012-11-06 11:11:27 -05:00
Nathan Guse
94d682f774 [ticket/11103] Use the full class name as the item_type/method
This is going to require you recreate the db tables.

PHPBB3-11103
2012-10-20 20:58:53 -05:00
Nathan Guse
ae670cc87d [ticket/11103] Remove unnecessary comments
Comments that are not needed because the actions are completely
self-explanatory

PHPBB3-11103
2012-10-18 18:32:13 -05:00
Nathan Guse
b9bc65eed8 [ticket/11103] Make $phpbb_notifications a global and use it everywhere
Do not use phpbb_container everywhere (makes testing difficult)

PHPBB3-11103
2012-10-04 14:47:13 -05:00
Nathan Guse
8e977544fb [ticket/11103] Normalization of $phpbb_notifications variable name
Use $phpbb_notifications instead of $notifications everywhere for
consistency and conflict prevention.

PHPBB3-11103
2012-09-14 17:01:08 -05:00
Nathan Guse
1ab0c469e2 [ticket/11103] Delete notifications for PMs deleted by phpbb_delete_user_pms
PHPBB3-11103
2012-09-14 16:24:50 -05:00
Nathan Guse
40bc3b1f19 [ticket/11103] Mark Private Messages as read
PHPBB3-11103
2012-09-14 16:20:15 -05:00
Nathan Guse
4b4ea7c5cd [ticket/11103] The service now handles all user loading itself
Delete pm notifications when pms are deleted

PHPBB3-11103
2012-09-09 10:19:46 -05:00
Nathan Guse
86b801df73 [ticket/11103] Some fixes for the email method
PHPBB3-11103
2012-09-08 16:12:20 -05:00
Nathan Guse
7fee0cfdf6 [ticket/11103] Work on the pm type and email method
PHPBB3-11103
2012-09-08 15:48:46 -05:00
Nils Adermann
147a125f69 Merge pull request #914 from EXreaction/ticket/10990
Ticket/10990
2012-07-22 16:25:17 -07:00
Nathan
67665f5957 [ticket/10990] Use $user->lang['COMMA_SEPARATOR'] when appropriate
PHPBB3-10990
2012-07-22 14:32:03 -05:00
Nils Adermann
f7f78adeb9 Merge branch 'develop-olympus' into develop
* 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.
2012-07-21 16:15:42 +02:00
Joas Schilling
3036db481a [ticket/10950] Fix grammar in comments
PHPBB3-10950
2012-07-20 18:03:06 +02:00
Joas Schilling
a3517232f9 [ticket/10950] Delete PMs for users that have not yet read the pm
PHPBB3-10950
2012-07-20 17:11:20 +02:00
Joas Schilling
d9a32ce614 [ticket/10950] Update undelivered pm counts in batches not 1 by 1 for each user
PHPBB3-10950
2012-07-16 17:22:10 +02:00
Joas Schilling
e68c1fb9e4 [ticket/10950] Use database count() and group by instead of doing that in php
PHPBB3-10950
2012-07-11 12:58:57 +02:00
Joas Schilling
338d29072f [ticket/10950] Check $delete_ids to be not empty
PHPBB3-10950
2012-07-04 13:14:19 +02:00
Joas Schilling
5c8c7b1352 [ticket/10950] Recreated the behaviour of phpbb_delete_user_pms()
- 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
2012-07-04 13:10:15 +02:00
Andreas Fischer
49afc1f2dc [ticket/10950] Correct comment for the second query.
Only undelivered messages are handled.

PHPBB3-10950
2012-06-23 11:16:38 +02:00
Andreas Fischer
30475856c4 [ticket/10950] Add empty line to make unset() call more visible.
PHPBB3-10950
2012-06-23 10:47:26 +02:00
Andreas Fischer
fce385e5bc [ticket/10950] Select the correct columns in SQL queries.
PHPBB3-10950
2012-06-23 10:45:36 +02:00
Andreas Fischer
9c2930178f [ticket/10950] Use a variable for the private message id.
PHPBB3-10950
2012-06-23 10:43:43 +02:00
Andreas Fischer
a50d1a3576 [ticket/10950] Move array initialisation to the front.
PHPBB3-10950
2012-06-23 10:32:16 +02:00
Andreas Fischer
2a76b7e869 [ticket/10950] Remove redundant if statement.
We already know author_id and folder_id.

PHPBB3-10950
2012-06-23 10:30:09 +02:00
Andreas Fischer
35b18676cd [ticket/10950] Fix SQL coding style (indentation) in second SQL query.
PHPBB3-10950
2012-06-23 10:28:13 +02:00
Andreas Fischer
ac8ebfabc7 [ticket/10950] Use proper ' in order to fix comment.
PHPBB3-10950
2012-06-23 10:26:48 +02:00
Nils Adermann
edefd11087 Merge remote-tracking branch 'github-bantu/ticket/10790' into develop
By Andreas Fischer
via Andreas Fischer
* github-bantu/ticket/10790:
  [ticket/10790] Remove a (kind of) dead code section from submit_pm().
2012-05-31 15:50:32 +02:00
Andreas Fischer
ee875c0a43 [ticket/10790] Remove a (kind of) dead code section from submit_pm().
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
2012-05-22 02:24:31 +02:00
Andreas Fischer
f3d33bf9d7 Merge branch 'develop-olympus' into develop
* 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
2012-05-14 00:40:20 +02:00
Andreas Fischer
86fa185a1b Merge branch 'ticket/10605' into develop-olympus
* 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
2012-05-14 00:38:54 +02:00
Joas Schilling
4b6b41a1e5 [ticket/10605] Add parameter documentation to phpbb_delete_user_pms
PHPBB3-10605
2012-04-13 16:26:41 +02:00
Igor Wiedler
9236dd4c47 [feature/class-prefix] Rename auth => phpbb_auth
PHPBB3-10609
2012-03-31 18:14:11 +02:00
Joas Schilling
b9324577ac [ticket/10605] Reset user´s pm count to 0 when deleting his PMs
PHPBB3-10605
2012-03-27 17:32:55 +02:00
Joas Schilling
0397b46217 [ticket/10605] Split query to be able to use indexes
PHPBB3-10605
2012-03-27 17:29:03 +02:00
Andreas Fischer
9c8aab4d32 [ticket/10605] Rename $delete_rows to $delete_ids.
PHPBB3-10605
2012-03-27 02:02:17 +02:00
Andreas Fischer
ad073d22b9 [ticket/10605] Break long comment into multiple lines 80 chars short.
PHPBB3-10605
2012-03-27 01:43:09 +02:00
Andreas Fischer
dd53d0576d [ticket/10605] Remove unnecessary $delete_ids array.
PHPBB3-10605
2012-03-27 01:39:49 +02:00
Andreas Fischer
9040f18d7c [ticket/10605] Remove unnecessary array_keys calls on $delete_rows.
PHPBB3-10605
2012-03-27 01:35:01 +02:00
Andreas Fischer
dbc7a69ad2 [ticket/10605] Remove unused variable declarations.
PHPBB3-10605
2012-03-27 01:30:52 +02:00
Andreas Fischer
2203bc204e [ticket/10605] Turn $undelivered_user into a real array of counters.
PHPBB3-10605
2012-03-27 01:29:29 +02:00
Andreas Fischer
e8830f605f [ticket/10605] Use unset() instead of checking user_id over and over again.
PHPBB3-10605
2012-03-27 01:18:02 +02:00
Andreas Fischer
cc13bac412 Merge branch 'develop-olympus' into develop
* 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
2012-03-22 18:15:10 +01:00
rxu
5a9dd1994f [ticket/10684] Adjust function and parameter name, minor changes.
PHPBB3-10684
2012-03-22 21:19:01 +08: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
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