1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-09-10 08:10:44 +02:00

Compare commits

...

1331 Commits

Author SHA1 Message Date
Joas Schilling
8f5d761112 [prep-release-3.1.5] Add migration for 3.1.5 2015-06-14 16:14:07 +02:00
Joas Schilling
38a1442d40 [prep-release-3.1.5] Update version for final 3.1.5 release 2015-06-14 16:11:22 +02:00
Joas Schilling
f688bc6160 Merge branch 'ticket/13938' into prep-release-3.1.5 2015-06-14 07:44:58 +02:00
cyberalien
e6407907e2 [ticket/13938] Fix inconsistencies between <link> tags
PHPBB3-13938
2015-06-14 07:43:19 +02:00
cyberalien
8eb4ec29ee [ticket/13938] Remove type and / from <link> elements
PHPBB3-13938
2015-06-14 07:43:02 +02:00
cyberalien
338abf77e3 [ticket/13938] Change web font code in simple_header
Apply ticket 13876 to simple_header.html

PHPBB3-13938
2015-06-14 07:42:37 +02:00
cyberalien
f9c50a8db3 [ticket/13938] Remove link to print.css in simple_header.html
Remaining fixes for ticket 13873: remove link to print.css and
remove type and media from other links.

PHPBB3-13938
2015-06-14 07:42:23 +02:00
Joas Schilling
e59b96e968 Merge pull request #3706 from marc1706/ticket/13942
[ticket/13942] Check if path to language file contains language path
2015-06-14 07:22:57 +02:00
Marc Alexander
714533d12e [ticket/13942] Check if path to language file contains language path
PHPBB3-13942
2015-06-13 17:15:28 +02:00
Joas Schilling
a50e2c0c47 Merge branch 'ticket/13939' into prep-release-3.1.5 2015-06-13 15:42:42 +02:00
cyberalien
5170cd67fb [ticket/13939] Check if loadingIndicator exists before accessing it
PHPBB3-13939
2015-06-13 15:42:30 +02:00
Joas Schilling
2c65b9b133 Merge pull request #3699 from nickvergessen/ticket/13823
[ticket/13823] Move the part of the query, so the update will get it …
2015-06-10 22:26:16 +02:00
Joas Schilling
dfb7bb1de1 Merge branch '3.0.x' into prep-release-3.1.5 2015-06-10 22:23:34 +02:00
Joas Schilling
0d349a82ca Merge pull request #3700 from Nicofuma/ticket/13823
[ticket/13823] Change diff options while packaging to not ignore all whitespaces
2015-06-10 22:22:52 +02:00
Tristan Darricau
cdf580ee37 [ticket/13823] Change diff options while packaging to not ignore all whitespaces
Removed:
    -w, --ignore-all-space       Ignore white space when comparing lines.

Added:
    -Z, --ignore-trailing-space  Ignore white space at line end.
    -b, --ignore-space-change    Ignore changes in the amount of white space.

PHPBB3-13823
2015-06-10 14:15:10 +02:00
Joas Schilling
3d18d6dc77 [ticket/13823] Move the part of the query, so the update will get it correctly
PHPBB3-13823
2015-06-09 23:11:26 +02:00
Joas Schilling
790f7ded5b [prep-release-3.1.5] Add changelog for 3.1.5-RC1 2015-06-09 20:45:37 +02:00
Joas Schilling
23a45fcace [prep-release-3.1.5] Add migration for 3.1.5-RC1 2015-06-09 20:32:15 +02:00
Joas Schilling
d2a2c183ed [prep-release-3.1.5] Update version to 3.1.5-RC1 2015-06-09 20:30:40 +02:00
Joas Schilling
832c9f64e0 Merge pull request #3551 from rxu/ticket/13779
[ticket/13779] Set new auth options to the role only if matching the role type
2015-06-09 20:23:08 +02:00
Marc Alexander
405681f138 Merge pull request #3486 from brunoais/ticket/13693
[ticket/13693] Allow modifying the MySQL author search query
2015-06-09 17:21:54 +02:00
Marc Alexander
b7db12a593 Merge pull request #3485 from brunoais/ticket/13694
[ticket/13694] Allow modifying the Postgres native author search query for results
2015-06-09 17:19:42 +02:00
Marc Alexander
4143f65b46 Merge pull request #3484 from brunoais/ticket/13691
[ticket/13691] Allow modifying the fulltext native search query for total results for author
2015-06-09 17:18:04 +02:00
Marc Alexander
5f7fa4c89c Merge pull request #3483 from brunoais/ticket/13686
[ticket/13686] Allow modify query used for counting in fulltext_native
2015-06-09 17:14:23 +02:00
Marc Alexander
83d8ea013b Merge pull request #3481 from brunoais/ticket/13689
[ticket/13689] Allow modifying the query for postgres native fulltext search

Conflicts:
	phpBB/develop/search_fill.php
	phpBB/includes/acp/acp_main.php
	phpBB/includes/acp/acp_search.php
	phpBB/includes/functions_admin.php
	phpBB/includes/functions_posting.php
	phpBB/includes/mcp/mcp_main.php
	phpBB/includes/mcp/mcp_post.php
	phpBB/install/install_convert.php
	phpBB/install/install_install.php
	phpBB/phpbb/search/fulltext_mysql.php
	phpBB/phpbb/search/fulltext_native.php
	phpBB/phpbb/search/fulltext_postgres.php
	phpBB/phpbb/search/fulltext_sphinx.php
	phpBB/search.php
	tests/search/mysql_test.php
	tests/search/native_test.php
	tests/search/postgres_test.php
2015-06-09 17:10:44 +02:00
Marc Alexander
072f4c9260 Merge pull request #3479 from brunoais/ticket/13685
[ticket/13685] Allow modifying the query for mysql native fulltext search
2015-06-09 14:27:13 +02:00
brunoais
3ac95f48f8 [ticket/13685] phpBB, not PhpBB
PHPBB3-13685
2015-06-09 12:55:27 +01:00
brunoais
6e8da5a424 [ticket/13685] This should take care of the rest
PHPBB3-13685
2015-06-08 18:09:48 +01:00
Marc Alexander
1214210864 Merge branch '3.0.x' into 3.1.x 2015-06-08 17:58:09 +02:00
Marc Alexander
abce057467 Merge pull request #3663 from Elsensee/ticket/13833
[ticket/13833] Prevent flooding if type="submit" doesn't exist
2015-06-08 17:58:08 +02:00
Marc Alexander
88d16b47a4 Merge pull request #3697 from Elsensee/ticket/13833-30x
[ticket/13833] Prevent flooding if type=submit doesn't exist
2015-06-08 17:52:31 +02:00
Oliver Schramm
c2d254ea41 Merge branch 'ticket/13833-30x' into ticket/13833
Conflicts:
        phpBB/posting.php

PHPBB3-13833
2015-06-08 17:19:11 +02:00
Oliver Schramm
2c6369c5d9 [ticket/13833] Prevent flooding if type=submit doesn't exist
PHPBB3-13833
2015-06-08 17:01:52 +02:00
Andreas Fischer
f94bbcb4fe Merge pull request #3691 from CHItA/ticket/13888
[ticket/13888] Fix sql_freeresult() error on author searches

* CHItA/ticket/13888:
  [ticket/13888] Fix sql_freeresult() error on author searches
2015-06-08 01:59:08 +02:00
brunoais
823783773c [ticket/13685] BUMP version to 3.1.5-dev
PHPBB3-13685
2015-06-07 18:40:50 +01:00
brunoais
94aff53e3f [ticket/13685] Allow modifying the query for mysql native fulltext search
PHPBB3-13685
2015-06-07 18:40:49 +01:00
brunoais
3cb86cb6f1 [ticket/13685] Fix tests for fulltext search
PHPBB3-13685
2015-06-07 18:40:49 +01:00
brunoais
1e45a05000 [ticket/13685] Add phpbb_dispatcher to fulltext search constructors
PHPBB3-13685
2015-06-07 18:40:44 +01:00
Tristan Darricau
25c4c481d7 Merge pull request #3693 from nickvergessen/ticket/13823
[ticket/13823] Remove the unnecessary brackets
2015-06-07 18:02:31 +02:00
Joas Schilling
17b94b8f9c [ticket/13823] Remove the unnecessary brackets
This changes the line with non-whitespace changes, so the packaging script
should correctly detect them as changed and put the file into the update.

PHPBB3-13823
2015-06-07 17:54:38 +02:00
CHItA
29cda5f2ad [ticket/13888] Fix sql_freeresult() error on author searches
PHPBB3-13888
2015-06-07 17:41:17 +02:00
Joas Schilling
91212d5453 Merge pull request #3692 from CHItA/ticket/sec-184
[ticket/sec-184] Fix tests
2015-06-07 17:10:49 +02:00
CHItA
32a2546c5d [ticket/sec-184] Fix tests
SECURITY-184
2015-06-07 16:43:27 +02:00
Marc Alexander
bac02a348e Merge pull request #22 from phpbb/ticket/sec-184
[ticket/sec-184] Do not output passwords to HTML
2015-06-07 14:57:06 +02:00
Tristan Darricau
99d3995548 Merge pull request #23 from phpbb/ticket/13913
[ticket/13913] Correctly check the forum_password and read permissions
2015-06-06 18:12:36 +02:00
Tristan Darricau
774582876c Merge pull request #3671 from marc1706/ticket/9563
[ticket/9563] Do not show empty categories on index
2015-06-06 12:02:04 +02:00
Tristan Darricau
bed8df20d2 Merge pull request #3680 from marc1706/ticket/13917
[ticket/13917] Use hash_equals() if possible in password driver helper
2015-06-06 11:45:22 +02:00
Tristan Darricau
593c7ed0e4 Merge pull request #3681 from marc1706/ticket/13200
[ticket/13200] Disable autocomplete for sensitive input fields
2015-06-06 11:40:18 +02:00
rxu
c221571963 [ticket/13779] Add permission set tests
PHPBB3-13779
2015-06-06 15:15:17 +07:00
Marc Alexander
20b16fda4f Merge pull request #3684 from CHItA/ticket/13841
[ticket/13841] Fix tests on 3.1 and master branch
2015-06-05 10:05:44 +02:00
CHItA
2b0acdcea4 [ticket/13841] Fix tests on 3.1 and master branch
PHPBB3-13841
2015-06-05 07:33:40 +02:00
Marc Alexander
eebab029fd [ticket/13200] Disable autocomplete for sensitive input fields
PHPBB3-13200
2015-06-04 19:01:46 +02:00
Joas Schilling
7a55bcc0f3 Merge pull request #3611 from Alf007/ticket/13841
Ticket/13841
2015-06-04 18:03:19 +02:00
Joas Schilling
51831924c5 Merge pull request #3567 from javiexin/ticket/13795
[ticket/13795] Modify core event in posting to include poll data
2015-06-04 17:51:00 +02:00
Joas Schilling
bb7f843344 Merge pull request #3558 from javiexin/ticket/13786
[ticket/13786] Add events to add MCP post options
2015-06-04 17:45:21 +02:00
Joas Schilling
9005711ad7 Merge pull request #3502 from marc1706/ticket/13564
[ticket/13564] Unlink user accounts upon deleting user
2015-06-04 17:30:09 +02:00
Marc Alexander
fb94bd11fb [ticket/13917] Do not pass non-string variables to hash_equals()
PHPBB3-13917
2015-06-04 17:16:22 +02:00
Marc Alexander
852337cacd [ticket/13917] Use hash_equals() if it's available
PHPBB3-13917
2015-06-04 16:52:08 +02:00
Joas Schilling
e8f9458a21 [ticket/13913] Correctly check the forum_password and read permissions
We need to check them on the forum the post is in, rather than the forum row
we are displaying.

PHPBB3-13913
2015-06-04 16:48:58 +02:00
Joas Schilling
78b0c938a2 [ticket/sec-184] Do not output LDAP password to HTML
SECURITY-184
2015-06-04 14:29:03 +02:00
Joas Schilling
9c84b3b5fb [ticket/sec-184] Do not output Jabber password to HTML
SECURITY-184
2015-06-04 14:13:07 +02:00
Joas Schilling
6ca3a30576 [ticket/sec-184] Do not output config passwords to the HTML page
SECURITY-184
2015-06-04 14:06:35 +02:00
Cesar G
db3782e491 Merge remote-tracking branch 'callumacrae/ticket/13905' into 3.1.x
* callumacrae/ticket/13905:
  [ticket/13905] Don't load loading.gif until needed.
2015-05-31 16:56:44 +02:00
Marc Alexander
189d94e897 Merge pull request #3668 from callumacrae/js-linting
[ticket/13898] js coding standards
2015-05-31 14:15:17 +02:00
Callum Macrae
cfbd051d52 [ticket/13898] Moved jshint and jscs rcs to correct dir.
PHPBB3-13898
2015-05-31 13:50:48 +02:00
Callum Macrae
d978564600 [ticket/13905] Don't load loading.gif until needed.
PHPBB3-13905
2015-05-31 13:46:30 +02:00
Marc Alexander
2e20bae695 [ticket/9563] Do not show empty categories on index
PHPBB3-9563
2015-05-31 11:08:00 +02:00
alf007
1f385b536a [ticket/13841] Add core event on functions_admin for topics move
Event added for the function move_topics() in
includes/functions_admin.php, so that you can insert any extension's table(s)
to be updated when topics are moved between forums
Added parameters topic_ids, forum_id, forum_ids and auto_sync

PHPBB3-13841
2015-05-30 17:48:18 +02:00
Callum Macrae
27a70f573f [ticket/13898] Fixed all the forum_fn.js violations I understood
PHPBB3-13898
2015-05-30 15:03:56 +02:00
Callum Macrae
a39a421acb [ticket/13898] Allow underscores :(
PHPBB3-13898
2015-05-30 14:55:42 +02:00
Callum Macrae
bafd649eea [ticket/13898] 4 spaces, not 2
PHPBB3-13898
2015-05-30 14:50:35 +02:00
Callum Macrae
e3090e04c3 [ticket/13898] js coding standaaards
PHPBB3-13898
2015-05-30 14:44:48 +02:00
Oliver Schramm
049f584111 Merge pull request #3638 from naderman/ticket/13874
[ticket/13874] Add master to sami API docs
2015-05-30 12:54:27 +02:00
Marc Alexander
d6cd90d325 Merge pull request #3658 from callumacrae/js-refactoring-again
JS Refactoring
2015-05-30 12:40:46 +02:00
Marc Alexander
df4b391baa Merge pull request #3545 from VSEphpbb/ticket/13771
[ticket/13771] Allow AJAX errors to support exceptions messages
2015-05-30 11:33:48 +02:00
Nils Adermann
01073ffcbf Merge pull request #3560 from Nicofuma/ticket/13790
[ticket/13790] Update phpcs
2015-05-30 10:53:47 +02:00
Andreas Fischer
b5fed65fe3 Merge branch '3.0.x' into 3.1.x
* 3.0.x:
  [ticket/13875] Ignore cache, ext, and store folder in lint test

Conflicts:
	tests/lint_test.php
2015-05-29 22:46:28 +02:00
Andreas Fischer
fedd0ae7f3 Merge pull request #3639 from marc1706/ticket/13875
[ticket/13875] Ignore cache, ext, and store folder in lint test

* marc1706/ticket/13875:
  [ticket/13875] Ignore cache, ext, and store folder in lint test
2015-05-29 22:31:41 +02:00
Callum Macrae
da6f751cef [ticket/13887] Made readable code DRY
PHPBB3-13887
2015-05-29 13:08:31 +02:00
Callum Macrae
0fc6816be6 [ticket/13887] Made unreadable code readable
PHPBB3-13887
2015-05-29 13:01:33 +02:00
Callum Macrae
143578ad09 [ticket/13887] Minor JS refactoring
PHPBB3-13887
2015-05-29 12:51:28 +02:00
Callum Macrae
2a83290e7c [ticket/13887] Use correct JSDoc syntax
PHPBB3-13887
2015-05-29 12:09:19 +02:00
Marc Alexander
518902ef51 Merge pull request #3640 from callumacrae/ticket/13876
[ticket/13876] Use webfontloader asyncronously.
2015-05-28 16:25:26 +02:00
Marc Alexander
f5801320b7 Merge pull request #3634 from prototech/ticket/13858
[ticket/13858] Make Plupload uploader available in the global namespace.
2015-05-28 16:03:22 +02:00
Callum Macrae
44fcdd007f [ticket/13876] set webfont async to true
PHPBB3-13876
2015-05-28 16:01:47 +02:00
Cesar G
182312010b Merge remote-tracking branch 'marc1706/ticket/13878' into 3.1.x
* marc1706/ticket/13878:
  [ticket/13878] Display background images when printing topic in webkit
2015-05-28 15:34:43 +02:00
Marc Alexander
3ec3dfcf3a [ticket/13878] Display background images when printing topic in webkit
PHPBB3-13878
2015-05-28 14:58:46 +02:00
Callum Macrae
35e5dc46c7 [ticket/13876] Use webfontloader asyncronously.
This PR adds typekit and Google's webfontloader and calls it
asyncronously, removing the SPOF in the header. Now, if google
goes down, some buttons display with a different font.

https://github.com/typekit/webfontloader

PHPBB3-13876
2015-05-28 14:55:27 +02:00
javiexin
e80bb565ce [ticket/13795] Modify core event in posting to include poll data
Modified the core.posting_modify_template_vars event in posting.php
to extend the content of the page_data array to include poll data.
That required moving the event and merging the new set of template vars.
Also include the poll variable in the parameter list for event
core.posting_modify_submission_errors, as it was missing, and any
modification here on post_data for poll related data is silently
ignored.  Added correct @change tags to both events.

PHPBB3-13795
2015-05-28 14:39:22 +02:00
javiexin
9951458ebf [ticket/13786] Add events to add MCP post options
Three new events are included:
1) Core event to perform new moderator action in includes/mcp/mcp_post.php
2) Core event to add/modify template data in includes/mcp/mcp_post.php
3) Template event to present new options in template/mcp_post.html
Remove extra template variable around the new event.

PHPBB3-13786
2015-05-28 14:28:41 +02:00
Marc Alexander
45d7e18f6b Merge pull request #3637 from callumacrae/ticket/13873
[ticket/13873] Removed broken print stylesheet.
2015-05-28 14:18:18 +02:00
Marc Alexander
ef39f3a9ab Merge pull request #3633 from nickvergessen/ticket/13872
[ticket/13872] Allow template events to have a changed version
2015-05-28 14:16:08 +02:00
Cesar G
f1e11414e8 Merge remote-tracking branch 'marc1706/ticket/12542' into 3.1.x
* marc1706/ticket/12542:
  [ticket/12542] Use more specific CSS for drag-n-drop
  [ticket/12542] Do not use browser specific css for outline
  [ticket/12542] Properly check if textarea is undefined or null
  [ticket/12542] Use extended CSS for all browsers
  [ticket/12542] Rename javascript method and add doc block
  [ticket/12542] Add different outline colors for body & textarea
  [ticket/12542] Add initial drag-n-drop animation
2015-05-28 13:36:15 +02:00
Marc Alexander
ba205a6bce [ticket/13875] Ignore cache, ext, and store folder in lint test
PHPBB3-13875
2015-05-28 13:35:32 +02:00
Nils Adermann
d589142c0b [ticket/13874] Add master to sami API docs
PHPBB3-13874
2015-05-28 13:19:52 +02:00
Joas Schilling
75dd91412b Merge pull request #3469 from brunoais/ticket/13672
[ticket/13672] Allow changing the data from the user-submitted report

* brunoais/ticket/13672:
  [ticket/13672] Removed bogus sting concatenation
  [ticket/13672] BUMP version to 3.1.5-dev
  [ticket/13672] Allow changing the data from the user-submitted report
2015-05-28 12:58:58 +02:00
Joas Schilling
cf93c6503a Merge pull request #3468 from brunoais/ticket/13668
[ticket/13668] Allow changing the query to obtain the user-submitted report

* brunoais/ticket/13668:
  [ticket/13668] Removed bogus sting concatenation
  [ticket/13668] BUMP version to 3.1.5-dev
  [ticket/13668] Allow changing the query to obtain the user-submitted report.
  [ticket/13668] Convert the mcp report_details query to a built query
2015-05-28 12:55:31 +02:00
Joas Schilling
b1d829c232 Merge pull request #3457 from brunoais/ticket/13661
[ticket/13661] Add event to allow editing the queries used to get the logs

* brunoais/ticket/13661:
  [ticket/13661] BUMP version to 3.1.5-dev
  [ticket/13661] Brackets in their own line
  [ticket/13661] Re-Fixed  $log_type -> $log_time
  [ticket/13661] Wrong event @since version
  [ticket/13661] Removed superfluous whitespace
  [ticket/13661] bugfix: The conditional is the log_time, not log_type
  [ticket/13661] Fixed the "FROM" in the built query.
  [ticket/13661] Add event to allow editing the queries used to get the logs
  [ticket/13661] Transform queries to get logs and log count into built queries
2015-05-28 12:52:19 +02:00
Callum Macrae
39cd228e06 [ticket/13873] Removed broken print stylesheet.
PHPBB3-13873
2015-05-28 12:46:19 +02:00
Marc Alexander
16deefa7f8 Merge pull request #3635 from nickvergessen/ticket/13808
[ticket/13808] Fix version
2015-05-28 12:40:29 +02:00
Joas Schilling
0daa999fd0 [ticket/13808] Fix version
PHPBB3-13808
2015-05-28 12:34:21 +02:00
Cesar G
30f256102f [ticket/13858] Make Plupload uploader available in the global namespace.
PHPBB3-13858
2015-05-28 12:25:43 +02:00
Joas Schilling
b00b504343 [ticket/13872] Allow template events to have a changed version
PHPBB3-13872
2015-05-28 12:23:24 +02:00
Cesar G
080690073a Merge remote-tracking branch 'Wolfsblvt/ticket/13787' into 3.1.x
* Wolfsblvt/ticket/13787:
  [ticket/13787] Remove duplicate entry of poll_delete in prosilver template
2015-05-28 11:16:22 +02:00
Joas Schilling
8fda16527e Merge pull request #3600 from dragosvr92/ticket/13808
[ticket/13808] search_body_form_before
2015-05-28 11:05:32 +02:00
Marc Alexander
abef078ab9 [ticket/12542] Use more specific CSS for drag-n-drop
Otherwise the CSS gets overwritten by other CSS rules.

PHPBB3-12542
2015-05-28 11:04:22 +02:00
Joas Schilling
7580798a5a Merge pull request #3435 from rxu/ticket/13648
[ticket/13648] Allow extensions using custom bbcode validation methods
2015-05-28 10:49:33 +02:00
Marc Alexander
cc134d5fed Merge pull request #3631 from rxu/ticket/13868
[ticket/13868] Correctly handle acp/mcp/ucp modules lang files for extensions
2015-05-28 10:42:40 +02:00
rxu
33239183ae [ticket/13868] Correctly handle acp/mcp/ucp modules lang files for extensions
PHPBB3-13868
2015-05-27 02:15:12 +07:00
alf007
6025c40cab Merge pull request #1 from phpbb/develop-ascraeus
Develop ascraeus
2015-05-25 00:14:48 +02:00
Marc Alexander
622d5b2643 [ticket/12542] Do not use browser specific css for outline
Also, the CSS selector for the drag'n'drop was simplified to only use the
class.

PHPBB3-12542
2015-05-23 10:51:04 +02:00
Marc Alexander
5ca77df084 Merge pull request #3624 from VSEphpbb/ticket/13861
[ticket/13861] Fix undefined variables in style update migration
2015-05-22 11:49:07 +02:00
Matt Friedman
67502c0d22 [ticket/13861] Fix undefined variables in style update migration
PHPBB3-13861
2015-05-21 15:23:17 -07:00
Marc Alexander
b7a89187b5 [ticket/12542] Properly check if textarea is undefined or null
PHPBB3-12542
2015-05-20 15:47:26 +02:00
Tristan Darricau
a462f14aa3 [ticket/13790] Update phpcs
PHPBB3-13790
2015-05-19 22:19:18 +02:00
Tristan Darricau
1d2a127144 Merge pull request #3619 from javiexin/ticket/13852
[ticket/13852] Consistent tab navigation when login in
2015-05-19 09:43:29 +02:00
javiexin
cb12a065df [ticket/13852] Consistent tab navigation when login in
Added tabindex attribute to input elements in index_body.html to make
tab navigation consistent with that of login_body.html.

PHPBB3-13852
2015-05-18 19:38:48 +02:00
Nicofuma
309a6b9313 Merge pull request #3601 from nickvergessen/ticket/13827
[ticket/13827] Correctly return JSON instead of HTML when valled from AJAX
2015-05-17 20:01:18 +02:00
Joas Schilling
e52bc2d022 Merge pull request #3606 from Nicofuma/ticket/13838
[ticket/13838] Check braces for control structures
2015-05-16 13:39:45 +02:00
Oliver Schramm
1c0c9c1bca Merge pull request #3563 from rxu/ticket/13791
[ticket/13791] Add more post buttons template events to viewtopic_body.html
2015-05-15 17:52:44 +02:00
Marc Alexander
dcb36d572d Merge pull request #3607 from Nicofuma/ticket/13830
[ticket/13830] Fix unsused used statements and catch blocks
2015-05-14 18:14:26 +02:00
Joas Schilling
502214bf06 [ticket/13827] Use JsonResponse instead of our hacky json_response with exit()
PHPBB3-13827
2015-05-14 17:13:47 +02:00
Nicofuma
3bc2b54128 [ticket/13830] Fix unsused used statements and catch blocks
PHPBB3-13830
2015-05-14 16:02:05 +02:00
Marc Alexander
d004a1c6b8 Merge pull request #3540 from RMcGirr83/ticket/13699
[ticket/13699] Add event before and after forum title in viewforum
2015-05-14 15:56:05 +02:00
Nicofuma
62e13e945c [ticket/13838] Fix coding style
PHPBB3-13838
2015-05-14 15:43:44 +02:00
Nicofuma
e4b30c474b [ticket/13838] Check braces for control structures
PHPBB3-13838
2015-05-14 15:40:52 +02:00
Marc Alexander
4527789e50 Merge pull request #3605 from Nicofuma/ticket/13830
[ticket/13830] Check class used in catch statements
2015-05-14 12:53:29 +02:00
Nicofuma
084aa56777 [ticket/13830] Check class used in catch statements
PHPBB3-13830
2015-05-10 21:13:36 +02:00
Joas Schilling
66279e1a57 [ticket/13827] Correctly return JSON instead of HTML when valled from AJAX
PHPBB3-13827
2015-05-09 20:48:14 +02:00
dragosvr92
345c25c367 [ticket/13808] search_body_form_before
Extensions may be designed to add secondary search options,
such as Google search in the search_body.html.
There are no events in the searchbody, so this should be merged.

PHPBB3-13808
2015-05-09 16:41:18 +03:00
brunoais
4119be5a3d [ticket/13672] Removed bogus sting concatenation
PHPBB3-13672
2015-05-08 10:43:48 +01:00
brunoais
d4fb3996d3 [ticket/13668] Removed bogus sting concatenation
PHPBB3-13668
2015-05-08 10:41:42 +01:00
Marc Alexander
b3b7f8e925 Merge pull request #3530 from VSEphpbb/ticket/13753
[ticket/13753] Add template events to forum category row headers
2015-05-08 11:19:53 +02:00
Marc Alexander
7f5f5c216b Merge pull request #3529 from rxu/ticket/13752
[ticket/13752] Add viewonline.php core event to allow modifying forum data SQL
2015-05-08 11:16:40 +02:00
Marc Alexander
d741ab57a8 Merge pull request #3526 from rxu/ticket/13750
[ticket/13750] Add core event to allow modifying navlinks text
2015-05-08 11:14:17 +02:00
Marc Alexander
7a478b27dd Merge pull request #3459 from brunoais/ticket/13664
[ticket/13664] Add event to allow changing number of unapproved posts in mcp_front
2015-05-08 11:07:50 +02:00
Marc Alexander
4fc6e7dbc7 Merge pull request #3598 from VSEphpbb/ticket/13822
[ticket/13822] Correctly display softdelete and post detail perms
2015-05-08 10:59:40 +02:00
Matt Friedman
350786c969 [ticket/13822] Correctly display softdelete and post detail perms
PHPBB3-13822
2015-05-07 21:10:16 -07:00
Marc Alexander
1e28748c0c Merge pull request #3455 from brunoais/ticket/13660
[ticket/13660] Allow changing the query for total reports in mcp_front
2015-05-08 00:17:10 +02:00
rxu
aa1b427e45 [ticket/13648] Allow extensions using custom bbcode validation methods
PHPBB3-13648
2015-05-07 22:01:10 +07:00
rxu
a67db63a18 [ticket/13750] Add core event to allow modifying navlinks text
Add generate_forum_nav() core event in includes/functions_display.php
to allow modifying navlinks text. Use case example: extension(s) implementing
multilanguage boards including translated forum names and so on.

PHPBB3-13750
2015-05-07 21:57:27 +07:00
brunoais
603726371c [ticket/13660] BUMP version to 3.1.5-RC1
PHPBB3-13660
2015-05-06 23:08:07 +01:00
brunoais
c701e8a131 [ticket/13694] BUMP version to 3.1.5-dev
PHPBB3-13694
2015-05-06 23:05:30 +01:00
brunoais
5465c594ca [ticket/13691] BUMP version to 3.1.5-dev
PHPBB3-13691
2015-05-06 23:03:23 +01:00
brunoais
f2fb8e339d [ticket/13686] BUMP version to 3.1.5-dev
PHPBB3-13686
2015-05-06 23:02:21 +01:00
brunoais
9833eb4f13 [ticket/13672] BUMP version to 3.1.5-dev
PHPBB3-13672
2015-05-06 23:00:26 +01:00
brunoais
b8a31241a3 [ticket/13689] BUMP version to 3.1.5-dev
PHPBB3-13689
2015-05-06 22:59:05 +01:00
brunoais
9e06beb48d [ticket/13668] BUMP version to 3.1.5-dev
PHPBB3-13668
2015-05-06 22:56:22 +01:00
brunoais
70cbe67105 [ticket/13664] BUMP version to 3.1.5-dev
PHPBB3-13664
2015-05-06 22:55:30 +01:00
brunoais
684a050916 [ticket/13661] BUMP version to 3.1.5-dev
PHPBB3-13661
2015-05-06 22:53:43 +01:00
brunoais
59a1f4e8ac [ticket/13693] BUMP version to 3.1.5-dev
PHPBB3-13693
2015-05-06 22:50:52 +01:00
Marc Alexander
a8c033f655 Merge pull request #3521 from rxu/ticket/13745
[ticket/13745] Add viewtopic.php core event to allow manipulating poll data
2015-05-06 21:47:07 +02:00
Nicofuma
5e99c09abe Merge pull request #3583 from nickvergessen/ticket/13807
Ticket/13807 Allow building changesets for the event list
2015-05-06 01:13:33 +02:00
Andreas Fischer
65b40f15f5 Merge pull request #3595 from marc1706/ticket/13819
[ticket/13819] Add missing sql_freeresult() to files in includes/

* marc1706/ticket/13819:
  [ticket/13819] Add missing sql_freeresult() to files in includes/
2015-05-06 00:46:57 +02:00
Marc Alexander
de90dd25b2 [ticket/13819] Add missing sql_freeresult() to files in includes/
PHPBB3-13819
2015-05-05 23:55:13 +02:00
Richard McGirr
c2b4636008 [ticket/13699] Add event before and after forum title in viewforum
PHPBB3-13699
2015-05-05 13:37:46 -04:00
Joas Schilling
740be0507e [ticket/13807] Add version to the usage output
PHPBB3-13807
2015-05-05 18:35:57 +02:00
Nicofuma
ab3e4b8abc Merge pull request #3564 from VSEphpbb/ticket/13516
[ticket/13516] Do not search ICC profiles in extension vendors
2015-05-04 22:52:28 +02:00
javiexin
6e0d12094a [ticket/13795] Modify core event in posting to include poll data
Modified the core.posting_modify_template_vars event in posting.php
to extend the content of the page_data array to include poll data.
That required moving the event and merging the new set of template vars.
Also include the poll variable in the parameter list for event
core.posting_modify_submission_errors, as it was missing, and any
modification here on post_data for poll related data is silently
ignored.

PHPBB3-13795
2015-05-04 20:34:54 +02:00
Matt Friedman
5a107d9dc1 [ticket/13516] Update image search script
PHPBB3-13516
2015-05-04 10:33:14 -07:00
Matt Friedman
c7a0b4479d [ticket/13771] Only handle valid JQHXR response objects
PHPBB3-13771
2015-05-04 10:27:11 -07:00
Tristan Darricau
0e7448e2b3 Merge pull request #3562 from VSEphpbb/ticket/11521
[ticket/11521] Add missing lang strings for migration exceptions
2015-05-04 10:56:41 +02:00
Nicofuma
1b75411e81 Merge pull request #3588 from nickvergessen/ticket/13809-asc
[ticket/13809] Perform the lint test prior to normal tests
2015-05-03 22:43:57 +02:00
Joas Schilling
923fdb0aa0 [ticket/13809] Test each file individually
PHPBB3-13809
2015-05-03 20:08:02 +02:00
Joas Schilling
b73b9f1dec [ticket/13809] Perform the lint test prior to normal tests
PHPBB3-13809
2015-05-03 20:07:51 +02:00
Joas Schilling
f42a737419 Merge branch 'prep-release-3.1.4' into 3.1.x
Conflicts:
	build/build.xml
	phpBB/includes/constants.php
	phpBB/install/schemas/schema_data.sql
2015-05-03 18:44:01 +02:00
Joas Schilling
005c27e73d [prep-release-3.1.4] Add security issue to changelog 2015-05-03 17:14:55 +02:00
Joas Schilling
429b99922e [prep-release-3.1.4] Add migration 2015-05-03 17:12:12 +02:00
Joas Schilling
199d823f7a [prep-release-3.1.4] Update version to 3.1.4 2015-05-03 17:07:35 +02:00
Andreas Fischer
713fe496ce Merge branch '3.0.x' into 3.1.x
* 3.0.x:

Conflicts:
	build/build.xml
	phpBB/includes/constants.php
	phpBB/install/database_update.php
	phpBB/install/schemas/schema_data.sql
2015-05-03 16:44:55 +02:00
Andreas Fischer
cfeb2bec80 Merge branch 'prep-release-3.1.4' into 3.1.x
* prep-release-3.1.4:
  [prep-release-3.0.14] Add security relevant changes to CHANGELOG.html.
  [prep-release-3.0.14] Bump version numbers for 3.0.14 release.

Conflicts:
	build/build.xml
2015-05-03 16:43:32 +02:00
Andreas Fischer
52aafb4dea Merge branch 'prep-release-3.0.14' into 3.0.x
* prep-release-3.0.14:
  [prep-release-3.0.14] Add security relevant changes to CHANGELOG.html.
  [prep-release-3.0.14] Bump version numbers for 3.0.14 release.

Conflicts:
	build/build.xml
	phpBB/includes/constants.php
	phpBB/install/database_update.php
	phpBB/install/schemas/schema_data.sql
2015-05-03 16:41:58 +02:00
Andreas Fischer
dde72c58b0 Merge branch 'prep-release-3.0.14' into prep-release-3.1.4
* prep-release-3.0.14:
  [prep-release-3.0.14] Add security relevant changes to CHANGELOG.html.
  [prep-release-3.0.14] Bump version numbers for 3.0.14 release.

Conflicts:
	build/build.xml
	phpBB/includes/constants.php
	phpBB/install/database_update.php
	phpBB/install/schemas/schema_data.sql
2015-05-03 16:39:51 +02:00
Andreas Fischer
11242dd07d [prep-release-3.0.14] Add security relevant changes to CHANGELOG.html. 2015-05-03 16:22:28 +02:00
Andreas Fischer
5382552fc8 [prep-release-3.0.14] Bump version numbers for 3.0.14 release. 2015-05-03 14:40:50 +02:00
Joas Schilling
45baaf6022 [ticket/13807] Only output the header for diff
PHPBB3-13807
2015-05-02 17:29:55 +02:00
Joas Schilling
34141b576e [ticket/13807] Fix minor coding flaws
PHPBB3-13807
2015-05-02 16:55:35 +02:00
Joas Schilling
2226043325 [ticket/13807] Fix "changed version" to match our version numbering
PHPBB3-13807
2015-05-02 14:41:59 +02:00
Joas Schilling
96d97ae2d2 [ticket/13807] Add an option to generate a diff for the release highlights
PHPBB3-13807
2015-05-02 14:41:59 +02:00
Joas Schilling
bdad879508 [ticket/13807] Allow filtering template events
PHPBB3-13807
2015-05-02 14:35:26 +02:00
Joas Schilling
e0180991bf [ticket/13807] Allow filtering events by phpBB version
PHPBB3-13807
2015-05-02 14:35:18 +02:00
Tristan Darricau
af3cde98f4 Merge branch '3.0.x' into 3.1.x 2015-05-02 11:54:09 +02:00
Tristan Darricau
9c320ccdce Merge pull request #3575 from marc1706/ticket/13792
[ticket/13792] Use hhvm instead of manually installing nightlys for now
2015-05-02 11:45:05 +02:00
Marc Alexander
7f820ee962 [ticket/13792] Use hhvm instead of manually installing nightlys for now
Nightly builds are currently not supported because packages for precise
no longer exist and travis is still running on it.

PHPBB3-13792
2015-05-01 15:45:40 +02:00
rxu
aef5be3d17 [ticket/13791] Add more post buttons template events to viewtopic_body.html
The purpose is to allow adding custom post buttons outside of original post
buttons conditionals/list in prosilver (for subsilver2 it's not the issue).

PHPBB3-13791
2015-05-01 10:59:18 +07:00
javiexin
34602037dc [ticket/13795] Modify core event in posting to include poll data
Modified the core.posting_modify_template_vars event in posting.php
to extend the content of the page_data array to include poll data.
That required moving the event and merging the new set of template vars.

PHPBB3-13795
2015-04-29 20:15:20 +02:00
Joas Schilling
9cd0295dd8 Merge branch 'prep-release-3.1.4' into 3.1.x
Conflicts:
	build/build.xml
	phpBB/includes/constants.php
	phpBB/install/schemas/schema_data.sql
2015-04-29 17:15:56 +02:00
Marc Alexander
818df0ec68 [ticket/12542] Use extended CSS for all browsers
PHPBB3-12542
2015-04-29 12:30:35 +02:00
Marc Alexander
c018b3bbc7 [ticket/12542] Rename javascript method and add doc block
PHPBB3-12542
2015-04-29 12:24:12 +02:00
Joas Schilling
1ad09d9c8b [prep-release-3.1.4] Increase version number to 3.1.4-RC2 2015-04-29 09:59:40 +02:00
Marc Alexander
ae8129b699 [ticket/12542] Add different outline colors for body & textarea
PHPBB3-12542
2015-04-29 00:12:55 +02:00
Andreas Fischer
95add752b7 Merge branch '3.0.x' into 3.1.x
* 3.0.x:
2015-04-28 22:17:44 +02:00
Andreas Fischer
aa0c55ed8f Merge branch 'prep-release-3.1.4' into 3.1.x
* prep-release-3.1.4:
  [ticket/security-180] Use language variable for redirect error in 3.1+
  [ticket/security-180] Merge if statement with previous one in 3.1.x
  [ticket/security-180] Add tests for redirecting to main URL
  [ticket/security-180] Always fail when redirecting to an insecure URL
  [ticket/security-180] Make sure that redirect goes to full URL plus slash
  [ticket/security-180] Check if redirect URL contains board URL
2015-04-28 22:17:37 +02:00
Andreas Fischer
c1702b8e19 Merge remote-tracking branch 'phpbb-security/ticket/security-180-asc' into prep-release-3.1.4
* phpbb-security/ticket/security-180-asc:
  [ticket/security-180] Use language variable for redirect error in 3.1+
  [ticket/security-180] Merge if statement with previous one in 3.1.x
  [ticket/security-180] Add tests for redirecting to main URL
  [ticket/security-180] Always fail when redirecting to an insecure URL
  [ticket/security-180] Make sure that redirect goes to full URL plus slash
  [ticket/security-180] Check if redirect URL contains board URL
2015-04-28 22:17:11 +02:00
Matt Friedman
acaa10de52 [ticket/13516] Do not search ICC profiles in extension vendors
PHPBB3-13516
2015-04-28 13:12:48 -07:00
Marc Alexander
d7c96cc60c [ticket/security-180] Use language variable for redirect error in 3.1+
SECURITY-180
2015-04-28 22:12:04 +02:00
Marc Alexander
416728fc17 Merge branch 'ticket/security-180' into ticket/security-180-asc
Conflicts:
	tests/security/redirect_test.php
2015-04-28 22:12:03 +02:00
Marc Alexander
ec207d0a71 [ticket/security-180] Merge if statement with previous one in 3.1.x
SECURITY-180
2015-04-28 22:08:19 +02:00
Marc Alexander
89723b17d9 Merge branch 'ticket/security-180' into ticket/security-180-asc
Conflicts:
	tests/security/redirect_test.php
2015-04-28 22:08:15 +02:00
Andreas Fischer
2fb7ef2668 Merge branch 'prep-release-3.0.14' into 3.0.x
* prep-release-3.0.14:
  [ticket/security-180] Add tests for redirecting to main URL
  [ticket/security-180] Always fail when redirecting to an insecure URL
  [ticket/security-180] Make sure that redirect goes to full URL plus slash
  [ticket/security-180] Check if redirect URL contains board URL
2015-04-28 21:55:15 +02:00
Andreas Fischer
1a3350619f Merge remote-tracking branch 'phpbb-security/ticket/security-180' into prep-release-3.0.14
* phpbb-security/ticket/security-180:
  [ticket/security-180] Add tests for redirecting to main URL
  [ticket/security-180] Always fail when redirecting to an insecure URL
  [ticket/security-180] Make sure that redirect goes to full URL plus slash
  [ticket/security-180] Check if redirect URL contains board URL
2015-04-28 21:54:50 +02:00
Andreas Fischer
98c9734db4 Merge branch '3.0.x' into 3.1.x
* 3.0.x:
  [3.0.x] Increment version number to 3.0.15-dev.

Conflicts:
	build/build.xml
	phpBB/includes/constants.php
	phpBB/install/database_update.php
	phpBB/install/schemas/schema_data.sql
2015-04-28 21:48:42 +02:00
Andreas Fischer
62abead26d Merge branch 'prep-release-3.1.4' into 3.1.x
* prep-release-3.1.4:
  [3.0.x] Add changelog for 3.0.14 release.
  [3.0.x] Bump version numbers for 3.0.14-RC1 release.
  [3.0.x] Bumping version numbers to final for 3.0.14 releases.
2015-04-28 21:42:39 +02:00
Andreas Fischer
969718fc91 Merge branch 'prep-release-3.0.14' into prep-release-3.1.4
* prep-release-3.0.14:
  [3.0.x] Add changelog for 3.0.14 release.
  [3.0.x] Bump version numbers for 3.0.14-RC1 release.
  [3.0.x] Bumping version numbers to final for 3.0.14 releases.

Conflicts:
	build/build.xml
	phpBB/docs/CHANGELOG.html
	phpBB/docs/INSTALL.html
	phpBB/includes/constants.php
	phpBB/install/convertors/convert_phpbb20.php
	phpBB/install/database_update.php
	phpBB/install/schemas/schema_data.sql
	phpBB/styles/prosilver/imageset/imageset.cfg
	phpBB/styles/prosilver/style.cfg
	phpBB/styles/prosilver/template/template.cfg
	phpBB/styles/prosilver/theme/theme.cfg
	phpBB/styles/subsilver2/imageset/imageset.cfg
	phpBB/styles/subsilver2/style.cfg
	phpBB/styles/subsilver2/template/template.cfg
	phpBB/styles/subsilver2/theme/theme.cfg
2015-04-28 21:40:23 +02:00
Andreas Fischer
6d8df7332c [3.0.x] Increment version number to 3.0.15-dev. 2015-04-28 20:40:20 +02:00
Andreas Fischer
d833f29069 [3.0.x] Add changelog for 3.0.14 release. 2015-04-28 18:57:03 +02:00
Marc Alexander
46a789de5c [ticket/12542] Add initial drag-n-drop animation
PHPBB3-12542
2015-04-28 16:12:58 +02:00
Matt Friedman
c818873d48 [ticket/11521] Add missing lang strings for migration exceptions
PHPBB3-11521
2015-04-28 00:02:42 -07:00
Andreas Fischer
ce74a0bd6c [3.0.x] Bump version numbers for 3.0.14-RC1 release. 2015-04-27 23:22:44 +02:00
Andreas Fischer
cd6c0427fb [3.0.x] Bumping version numbers to final for 3.0.14 releases. 2015-04-27 23:13:56 +02:00
Andreas Fischer
0bc352ea7e Merge pull request #3557 from VSEphpbb/ticket/13778
[ticket/13778] Update wording of the reCaptcha instructions

* VSEphpbb/ticket/13778:
  [ticket/13778] Update wording of the reCaptcha instructions
2015-04-27 22:56:35 +02:00
Andreas Fischer
78c0221855 Merge pull request #3555 from akoeplinger/ticket/12101
[ticket/12101] Remove HTML redirect workaround for Microsoft/IIS webserver

* akoeplinger/ticket/12101:
  [ticket/12101] Remove HTML redirect workaround for Microsoft/IIS webserver
2015-04-27 22:15:56 +02:00
javiexin
f80dc9dc16 [ticket/13786] Add events to add MCP post options
Three new events are included:
1) Core event to perform new moderator action in includes/mcp/mcp_post.php
2) Core event to add/modify template data in includes/mcp/mcp_post.php
3) Template event to present new options in template/mcp_post.html
Fix another typo.

PHPBB3-13786
2015-04-27 17:36:43 +02:00
javiexin
18e8f281be [ticket/13786] Add events to add MCP post options
Three new events are included:
1) Core event to perform new moderator action in includes/mcp/mcp_post.php
2) Core event to add/modify template data in includes/mcp/mcp_post.php
3) Template event to present new options in template/mcp_post.html
Fix typo.

PHPBB3-13786
2015-04-27 15:35:09 +02:00
javiexin
e98a5afd07 [ticket/13786] Add events to add MCP post options
Three new events are included:
1) Core event to perform new moderator action in includes/mcp/mcp_post.php
2) Core event to add/modify template data in includes/mcp/mcp_post.php
3) Template event to present new options in template/mcp_post.html

PHPBB3-13786
2015-04-27 13:21:23 +02:00
Matt Friedman
281661c23e [ticket/13778] Update wording of the reCaptcha instructions
PHPBB3-13778
2015-04-26 20:57:56 -07:00
Wolfsblvt
55a3d88793 [ticket/13787] Remove duplicate entry of poll_delete in prosilver template
When options are shown and poll delete is allowed, the option to
delete
polls is shown twice. This is fixed here by moving the if poll
delete
check out of the outer if, wich makes it also more consistent
with the
new event.

PHPBB3-13787
2015-04-27 02:27:29 +02:00
Alexander Köplinger
e25e411e2b [ticket/12101] Remove HTML redirect workaround for Microsoft/IIS webserver
The code was added as a workaround for bugs in very old versions of IIS,
dating back to 2002: see commit 849d766974.

Newer IIS versions handle the 'Location' header just fine, so we can avoid
the unnecessary HTML page for redirects. Given that it seems to work fine
since IIS 6.0 (on WinServer 2003), I don't think it's worth adding a special
check for earlier versions as they are no longer supported by MS as well.

PHPBB3-12101
2015-04-26 22:10:06 +02:00
Marc Alexander
59a178f3cb Merge pull request #3532 from prototech/ticket/13755
[ticket/13755] Ignore dots in path when determining file extension.
2015-04-26 09:24:03 +02:00
rxu
2308472eb0 [ticket/13779] Set new auth options to the role only if matching the role type
Migrations' permission tool allows setting permissions to the role which
doesn't match the role type, e.g. m_ permissions for u_ role types and so on.
As one of side effects, this may lead to granting users moderative/admin
permissions silently.
With this patch the only new permissions matching the role type will be set.

PHPBB3-13779
2015-04-26 11:57:02 +07:00
Andreas Fischer
887f83589f Merge branch 'prep-release-3.1.4' into 3.1.x
* prep-release-3.1.4:
2015-04-25 18:19:43 +02:00
Andreas Fischer
eae592691c Merge pull request #3550 from bantu/ticket/13765-3.1.4
[ticket/13765] Verify SERVER_PROTOCOL has the expected format before using it.

* bantu/ticket/13765-3.1.4:
  [ticket/13765] Verify SERVER_PROTOCOL has the expected format before using it.
2015-04-25 18:19:24 +02:00
Andreas Fischer
196eb98ba8 Merge branch '3.0.x' into 3.1.x
* 3.0.x:
2015-04-25 18:11:12 +02:00
Andreas Fischer
0fc70d4b15 Merge pull request #3550 from bantu/ticket/13765-3.1.4
[ticket/13765] Verify SERVER_PROTOCOL has the expected format before using it.

* bantu/ticket/13765-3.1.4:
  [ticket/13765] Verify SERVER_PROTOCOL has the expected format before using it.
2015-04-25 18:11:07 +02:00
Andreas Fischer
4d63032024 Merge pull request #3549 from bantu/ticket/13765
[ticket/13765] Verify SERVER_PROTOCOL has the expected format before using it.

* bantu/ticket/13765:
  [ticket/13765] Verify SERVER_PROTOCOL has the expected format before using it.
2015-04-25 18:10:45 +02:00
Andreas Fischer
901875a1fb Merge branch 'ticket/13765' into ticket/13765-3.1.4
* ticket/13765:
  [ticket/13765] Verify SERVER_PROTOCOL has the expected format before using it.

Conflicts:
	phpBB/includes/functions.php
	phpBB/includes/startup.php
2015-04-25 17:41:17 +02:00
Joas Schilling
463c62df18 [ticket/13765] Verify SERVER_PROTOCOL has the expected format before using it.
PHPBB3-13765
2015-04-25 17:22:10 +02:00
Marc Alexander
c5178a19b2 [ticket/13564] Add tests for unlinking account upon deleting user
PHPBB3-13564
2015-04-25 15:48:24 +02:00
Marc Alexander
18fc621d73 [ticket/security-180] Add tests for redirecting to main URL
SECURITY-180
2015-04-23 15:27:30 +02:00
Andreas Fischer
552f35952a Merge pull request #3546 from brunoais/ticket/13772
[ticket/13772] Fix typo in phpbb\passwords\manager::__construct()

* brunoais/ticket/13772:
  [ticket/13772] Fix typo in phpbb\passwords\manager::__construct()
2015-04-22 15:15:08 +02:00
brunoais
8769f185f5 [ticket/13772] Fix typo in phpbb\passwords\manager::__construct()
PHPBB3-13772
2015-04-21 10:00:30 +01:00
Matt Friedman
4a7f905c6a [ticket/13771] Allow AJAX errors to support exceptions messages
PHPBB3-13771
2015-04-21 00:19:41 -07:00
Andreas Fischer
c46024bfa2 Merge pull request #3537 from RMcGirr83/ticket/13763
[ticket/13763] Fix typo in extension lang file

* RMcGirr83/ticket/13763:
  [ticket/13763] Fix typo in extension lang file
2015-04-16 13:38:48 +02:00
Richard McGirr
60f31d48e2 [ticket/13763] Fix typo in extension lang file
PHPBB3-13763
2015-04-15 07:35:42 -04:00
rxu
615e5c1076 [ticket/13745] Add viewtopic.php core events to allow manipulating poll data
PHPBB3-13745
2015-04-15 14:12:49 +07:00
Dhruv Goel
ba1e3fd661 Merge pull request #3533 from Elsensee/ticket/13756
[ticket/13756] Fix resize after upload with plupload
2015-04-14 09:09:14 +05:30
Oliver Schramm
366dfce846 [ticket/13756] Add test for generate_resize_string()
PHPBB3-13756
2015-04-12 14:20:07 +02:00
Oliver Schramm
70c74df009 [ticket/13756] Fix resize after upload with plupload
PHPBB3-13756
2015-04-11 23:08:45 +02:00
Joas Schilling
ee658bfe7b [ticket/security-180] Always fail when redirecting to an insecure URL
SECURITY-180
2015-04-11 17:08:28 +02:00
Marc Alexander
bca1b96b2e [ticket/security-180] Make sure that redirect goes to full URL plus slash
SECURITY-180
2015-04-11 16:41:20 +02:00
Cesar G
47514ca2df [ticket/13755] Ignore dots in path when determining file extension.
PHPBB3-13755
2015-04-10 16:23:51 -07:00
Marc Alexander
eed355b798 [ticket/security-180] Check if redirect URL contains board URL
SECURITY-180
2015-04-10 18:10:32 +02:00
Joas Schilling
a151ad912a [3.1.x] Update development version to 3.1.5-dev 2015-04-10 09:56:20 +02:00
Joas Schilling
fcc7e7d333 Merge branch 'prep-release-3.1.4' into 3.1.x 2015-04-10 09:53:58 +02:00
Joas Schilling
073f3e4470 [prep-release-3.1.4] Add changelog for 3.1.4-RC1 2015-04-09 21:11:08 +02:00
Matt Friedman
ef0838e931 [ticket/13753] Fix event documentation
PHPBB3-13753
2015-04-09 12:00:33 -07:00
Joas Schilling
bc04581b80 [prep-release-3.1.4] Add migration for 3.1.4-RC1 2015-04-09 20:28:28 +02:00
Joas Schilling
313a224c68 Update version to 3.1.4-RC1 2015-04-09 20:26:12 +02:00
Matt Friedman
96339b7c86 [ticket/13753] Add template events to forum category row headers
PHPBB3-13753
2015-04-09 11:04:25 -07:00
rxu
b0f5ef0b1a [ticket/13752] Add viewonline.php core event to allow modifying forum data SQL
PHPBB3-13752
2015-04-09 23:20:07 +07:00
Oliver Schramm
17620bba46 Merge pull request #3525 from marc1706/ticket/13749
[ticket/13749] Add missing slash to base uri in helper route tests
2015-04-06 23:54:27 +02:00
Marc Alexander
9d181daa71 [ticket/13749] Add missing slash to base uri in helper route tests
PHPBB3-13749
2015-04-06 22:59:34 +02:00
Joas Schilling
53ed8a3cd9 Merge pull request #3392 from marc1706/ticket/13493
[ticket/13493] Append page name to base url if it doesn't contain it
2015-04-06 16:54:35 +02:00
Joas Schilling
02202b1503 Merge pull request #3492 from RMcGirr83/ticket/13710
[ticket/13710] Allow template events near smilies display
2015-04-06 14:44:37 +02:00
Joas Schilling
b16a56394b Merge pull request #3488 from Crizz0/ticket/13701
[ticket/13701] Adds two new events to posting_pm_layout.html

Conflicts:
	phpBB/docs/events.md
2015-04-06 14:42:59 +02:00
Joas Schilling
7d08bf5b3e Merge pull request #3517 from Wolfsblvt/ticket/13739
[ticket/13739] Add template core event posting_poll_body_options_after
2015-04-06 14:26:35 +02:00
Joas Schilling
84df225038 Merge pull request #3523 from Nicofuma/ticket/13747
[ticket/13747] Add assertions to test_validate_path_linux
2015-04-06 14:21:47 +02:00
Tristan Darricau
8575cc69d1 [ticket/13747] Add assertions to test_validate_path_linux
PHPBB3-13747
2015-04-06 13:09:07 +02:00
Tristan Darricau
73a0988f59 Merge pull request #3458 from nickvergessen/ticket/8494
[ticket/8494] Ignore errors from the database schema preparation
2015-04-06 11:47:46 +02:00
Joas Schilling
90025ae3e7 Merge pull request #3437 from marc1706/ticket/12368
[ticket/12368] Correctly check if avatars migration is installed
2015-04-06 11:36:00 +02:00
Joas Schilling
23db98276f Merge pull request #3409 from Senky/ticket/11424
[ticket/11424] Quick-Mod Tools race condition results in NO_MODE
2015-04-06 11:31:53 +02:00
Joas Schilling
c60497f009 Merge pull request #3402 from brunoais/ticket/13621
[ticket/13621] Prepend $where_sql and postpend closing bracket on statements with return
2015-04-06 11:13:33 +02:00
Joas Schilling
009a8cb2d5 Merge pull request #3333 from marc1706/ticket/13522
[ticket/13522] Remove empty answers from possible answers in Q&A
2015-04-06 11:04:35 +02:00
Joas Schilling
9ab27fe129 Merge pull request #3284 from Elsensee/ticket/13469
[ticket/13469] Fall back to soft_delete if no permissions for delete
2015-04-06 10:59:33 +02:00
Tristan Darricau
d49f70fbc7 Merge pull request #3520 from rxu/ticket/13743
[ticket/13743] Add $phpbb_root_path and $phpEx definitions in message_parser.php
2015-04-05 23:14:05 +02:00
rxu
3521e74939 [ticket/13743] Add $phpbb_root_path and $phpEx definitions in message_parser.php
message_parser.php performs include of bbcode.php at the very start using
$phpbb_root_path and $phpEx vars, so there's a possibility those can be
undefined at that point, especially when message_parser.php is being included
in event listener or another extension file where $phpbb_root_path and $phpEx
don't exist. This can be fixed by adding the appropriate vars definitions.

PHPBB3-13743
2015-04-05 18:48:43 +07:00
Marc Alexander
558d604d83 Merge pull request #3518 from marc1706/ticket/13703
[ticket/13703] Use correct avatar path for PHPBB_USE_BOARD_URL_PATH
2015-04-04 11:04:29 +02:00
Marc Alexander
55907c1724 Merge pull request #3519 from marc1706/ticket/13742
[ticket/13742] Use correct avatar path for local avatar
2015-04-04 11:02:03 +02:00
Kevin Roy
ddff81c21f [ticket/13742] Use correct avatar path for local avatar
Prior to this change, the path might have been incorrect when using
PHPBB_USE_BOARD_URL_PATH.

PHPBB3-13742
2015-04-03 23:08:26 +02:00
Kevin Roy
a875802c06 [ticket/13703] Use correct avatar path for PHPBB_USE_BOARD_URL_PATH
This change makes the uploaded avatars use the PHPBB_USE_BOARD_URL_PATH
constant, which is needed when trying to use the get_user_avatar()
function in a listener for index changes.

PHPBB3-13703
2015-04-03 23:04:52 +02:00
Wolfsblvt
1d34968967 [ticket/13739] Add template core event posting_poll_body_options_after
Fixing order of if statement and event

PHPBB3-13739
2015-04-03 19:20:16 +02:00
Wolfsblvt
284a5671c5 [ticket/13739] Add template core event posting_poll_body_options_after
Fixing if else construct in prosilver so that the event is placed correctly

PHPBB3-13739
2015-04-03 18:56:53 +02:00
Joas Schilling
71177c38dc Merge pull request #3515 from cyberalien/ticket/13741
Ticket/13741 Remove outdated comments and references in css files
2015-04-03 18:56:15 +02:00
Joas Schilling
81c92a7de9 Merge branch '3.0.x' into 3.1.x 2015-04-03 18:42:06 +02:00
Joas Schilling
35d2467c94 Merge pull request #3512 from bantu/ticket/13738
[ticket/13738] Use new branch names in sami-all.conf.php.
2015-04-03 18:41:41 +02:00
Wolfsblvt
d5021aeda4 [ticket/13739] Add template core event posting_poll_body_options_after
Template event added for the poll options while posting a topic
so that you may add additional options for polls.

PHPBB3-13739
2015-04-03 17:02:43 +02:00
Marc Alexander
55f6329c1d Merge pull request #3467 from dragosvr92/patch-5
[ticket/13602] Adding a new event overall_header_navbar_before
2015-04-03 16:48:26 +02:00
cyberalien
e120e6ac97 [ticket/13741] Remove outdated references to tweaks.css
PHPBB3-13741
2015-04-03 11:14:20 +03:00
cyberalien
9f54d2b590 [ticket/13741] Remove reference to unused body font-size declaration
Remove reference to font-size declaration that is no longer used in prosilver

PHPBB3-13741
2015-04-03 11:04:47 +03:00
cyberalien
6c308d81bd [ticket/13741] Remove reference to oudated rollover code that no longer exists
Rollover code referenced in that comment has been removed in 3.1

PHPBB3-13741
2015-04-03 11:03:47 +03:00
Marc Alexander
418aabb46e Merge pull request #3508 from cyberalien/ticket/13726
[ticket/13726] Fix function that calculates responsive breadcrumbs width
2015-04-02 21:22:12 +02:00
Marc Alexander
335520fc45 Merge pull request #3509 from cyberalien/ticket/13727
[ticket/13727] Fix JS that resizes breadcrumbs
2015-04-02 20:01:47 +02:00
Oliver Schramm
bbd0a8985c [ticket/13469] Extract test to new method
PHPBB3-13469
2015-04-02 16:36:09 +02:00
Andreas Fischer
5fc92a03b2 Merge pull request #3513 from bantu/ticket/13736
[ticket/13736] Missing four colon in Contact us page

* bantu/ticket/13736:
  [ticket/13736] Missing four colon in Contact us page
2015-04-02 13:31:31 +02:00
Raphaël M
40c79f2a26 [ticket/13736] Missing four colon in Contact us page
Replacing of four ```:``` with four {L_COLON} in Contact us page.

PHPBB3-13736
2015-04-02 12:48:31 +02:00
Andreas Fischer
d6d9ff51b2 [ticket/13738] Use new branch names in sami-all.conf.php.
PHPBB3-13738
2015-04-02 12:30:39 +02:00
Marc Alexander
42d831f472 Merge pull request #3510 from Nicofuma/ticket/13732
[ticket/13732] Update composer to be php7 compliant
2015-04-01 15:51:26 +02:00
Tristan Darricau
be472cc7bb [ticket/13732] Update composer to be php7 compliant
Updated to Composer version 1.0-dev
(f10c71475167a4661225b14560ca0a400d730829) 2015-03-29 14:37:42

PHPBB3-13732
2015-03-30 21:48:28 +02:00
Nicofuma
1a484f08bb Merge branch '3.0.x' into 3.1.x 2015-03-29 19:50:38 +02:00
Nicofuma
d9f4964d91 Merge pull request #3376 from marc1706/ticket/13568-asc
[ticket/13568] Validate imagick path as readable absolute path

closes #3376
2015-03-29 19:50:19 +02:00
Nicofuma
b9db47e3f5 Merge pull request #3359 from marc1706/ticket/13568
[ticket/13568] Validate imagick path as readable absolute path

closes #3359
2015-03-29 19:41:13 +02:00
cyberalien
0b52eb2298 [ticket/13727] Fix JS that resizes breadcrumbs
PHPBB3-13727
2015-03-28 19:59:38 +02:00
cyberalien
90b82d1a5f [ticket/13726] Fix function that calculates responsive breadcrumbs width
Do not calculate width of hidden elements.
Set minimum width to make sure breadcrumbs are always shown.

PHPBB3-13726
2015-03-28 11:36:15 +02:00
Andreas Fischer
499088b62f Merge branch '3.0.x' into 3.1.x
* 3.0.x:
  [ticket/13555] Render poll options separately when previewing.
2015-03-26 11:15:37 +01:00
Andreas Fischer
1efbb5b3bb Merge pull request #3493 from prototech/ticket/13555
[ticket/13555] Render poll options separately when previewing.

* prototech/ticket/13555:
  [ticket/13555] Render poll options separately when previewing.
2015-03-26 11:15:36 +01:00
Marc Alexander
9eab4ba740 [ticket/12368] Fix comment in docblock
PHPBB3-12368
2015-03-26 11:01:22 +01:00
Oliver Schramm
9d75f3fca8 Merge branch '3.0.x' into 3.1.x 2015-03-25 21:49:11 +01:00
Oliver Schramm
407b9d3c6b Merge pull request #3506 from Nicofuma/ticket/13723-31x
[ticket/13723-Ascraeus] Add Elsensee to authors list
2015-03-25 21:48:05 +01:00
Oliver Schramm
84d77d6cd5 Merge pull request #3505 from Nicofuma/ticket/13723
[ticket/13723] Add Elsensee to authors list
2015-03-25 21:44:09 +01:00
Nicofuma
7f2b932a1b [ticket/13723] Merge branch 'ticket/13723' into ticket/13723-31x
Conflicts:
	phpBB/docs/AUTHORS

PHPBB3-13723
2015-03-25 21:40:12 +01:00
Nicofuma
44540b6112 [ticket/13723] Add Elsensee to authors list
PHPBB3-13723
2015-03-25 21:31:50 +01:00
Nicofuma
50b3c2b49e Merge pull request #3398 from marc1706/ticket/13612
[ticket/13612] Run meta refresh until extension is fully enabled
2015-03-24 23:32:29 +01:00
Nicofuma
4a08d74571 Merge pull request #3501 from prototech/ticket/13698
[ticket/13698] Pass parameters for link in LOGIN_ERROR_PASSWORD error message.
2015-03-24 23:19:46 +01:00
Nicofuma
285e35992a Merge pull request #3410 from Senky/ticket/13467
[ticket/13467] Add a CONTRIBUTING file to the project on Github
2015-03-24 22:35:34 +01:00
Marc Alexander
2e7a60d986 [ticket/13564] Try to unlink user account for every auth provider
PHPBB3-13564
2015-03-24 17:09:52 +01:00
Marc Alexander
4d7cb7ca73 [ticket/13564] Use user_id from link_data for unlinking account in oauth
PHPBB3-13564
2015-03-24 17:08:55 +01:00
Marc Alexander
ca883f1196 [ticket/13564] Allow to specify user id for retrieving auth link data
PHPBB3-13564
2015-03-24 17:08:55 +01:00
Marc Alexander
3d0153de60 Merge pull request #3499 from Elsensee/ticket/13721
[ticket/13271] Fix URL Rewriting on IIS7
2015-03-24 11:00:26 +01:00
Cesar G
0bc2f9f242 [ticket/13698] Pass parameters for link in LOGIN_ERROR_PASSWORD error message.
LOGIN_ERROR_PASSWORD may be returned as the message if the password is invalid
while hitting the LOGIN_ERROR_ATTEMPTS error.

PHPBB3-13698
2015-03-23 17:52:17 -07:00
Oliver Schramm
476b762542 [ticket/13271] Fix URL Rewriting on IIS7
PHPBB3-13271
2015-03-23 18:23:12 +01:00
Cesar G
a32f4869de Merge remote-tracking branch 'brunoais/ticket/13719' into 3.1.x
* brunoais/ticket/13719:
  [ticket/13719] Remove superfluous $search_options in acp_search.
2015-03-23 09:43:27 -07:00
brunoais
754b5d6349 [ticket/13719] Remove superfluous $search_options in acp_search.
PHPBB3-13719
2015-03-23 12:58:05 +00:00
Oliver Schramm
eca0128d0a [ticket/13469] Add tests
PHPBB3-13469
2015-03-22 21:30:05 +01:00
JoshyPHP
1df97c205d [ticket/13555] Render poll options separately when previewing.
This prevents an option from being split into two when a line break is present
inside of it.

PHPBB3-13555
2015-03-19 15:32:31 -07:00
RMcGirr83
d4ca81f23f [ticket/13710] Allow template events near smilies display
PHPBB3-13710
2015-03-19 07:25:45 -04:00
Cesar G
4276f49efa Merge remote-tracking branch 'Senky/ticket/9457' into 3.1.x
* Senky/ticket/9457:
  [ticket/9457] Add WAI-ARIA landmarks to the Prosilver template files
2015-03-18 19:37:29 -07:00
Marc Alexander
ee70b364c7 Merge pull request #3490 from prototech/ticket/13550
[ticket/13550] Improve checks for Plupload temp directory writability
2015-03-16 14:43:19 +01:00
Cesar G
7f7d8d9101 [ticket/13550] Check that the Plupload temp directory is writable before moving
This prevents a PHP warning from being issued that results in an invalid JSON
response being returned to the user.

PHPBB3-13550
2015-03-15 16:06:35 -07:00
Dhruv
faf267c419 Merge branch 'ticket/13702' into 3.1.x 2015-03-15 16:59:21 +08:00
Dhruv Goel
f0619b481f Merge pull request #3476 from brunoais/ticket/13674
[ticket/13674] Change MySQL native total search results calculation
2015-03-14 23:28:31 +08:00
cyberalien
7e8274c345 [ticket/13702] Add initial-scale to viewport in page header
PHPBB3-13702
2015-03-14 10:00:28 +02:00
Crizzo
0a52d732e4 [ticket/13701] Adds two new events to posting_pm_layout.html
These events wrap the includes of posting_pm_header.html to add some
content before and after it.

PHPBB3-13701
2015-03-13 23:37:07 +01:00
brunoais
cfdaf2d63f [ticket/13694] Allow modifying the Postgres native author search query
PHPBB3-13694
2015-03-12 22:14:20 +00:00
brunoais
29ccbd8098 [ticket/13693] Allow modifying the MySQL author search query
PHPBB3-13693
2015-03-12 12:23:53 +00:00
brunoais
1a001fc233 [ticket/13691] Allow changing query to search for posts by author in native
PHPBB3-13691
2015-03-12 12:23:29 +00:00
brunoais
d5dd9c929d [ticket/13689] Allow modifying the query for postgres native fulltext search
PHPBB3-13689
2015-03-12 12:22:45 +00:00
brunoais
3bda9a3c11 [ticket/13686] Allow modify query used for counting in fulltext_native
PHPBB3-13686
2015-03-12 12:22:07 +00:00
brunoais
7112058d7b [ticket/13685] Fix tests for fulltext search
PHPBB3-13685
2015-03-12 12:21:29 +00:00
brunoais
c3a0e09ddb [ticket/13685] Add phpbb_dispatcher to fulltext search constructors
PHPBB3-13685
2015-03-12 12:21:15 +00:00
Marc Alexander
e132e9ba76 Merge pull request #3428 from prototech/ticket/13463
[ticket/13463] Correctly position notification mark read icon in RTL.
2015-03-11 13:49:42 +01:00
brunoais
94da39cd88 [ticket/13660] Fix @since version.
PHPBB3-13660
2015-03-10 15:42:07 +00:00
Marc Alexander
5b9fe33b1b Merge pull request #3477 from n-aleha/ticket/13679
[ticket/13679] Add template event overall_header_searchbox_before
2015-03-10 15:23:27 +01:00
Marc Alexander
3cb1907e76 Merge pull request #3445 from RMcGirr83/ticket/13650
[ticket/13650] Move core event
2015-03-10 15:20:26 +01:00
n-aleha
aeafb90208 [ticket/13679] Add template event overall_header_searchbox_before
PHPBB3-13679
2015-03-08 21:54:01 +02:00
Marc Alexander
2348580255 Merge pull request #3452 from RobertHeim/ticket/13658
[ticket/13658] add event before and after topics are deleted
2015-03-07 21:23:57 +01:00
brunoais
9b030fd174 [ticket/13674] Missing space after "if"
PHPBB3-13674
2015-03-07 14:57:42 +00:00
brunoais
f4c423cea1 [ticket/13674] Change MySQL native total search results calculation
This changes how the native FULLTEXT search calculates the total
match number for MySQL.
This should improve performance as there is one less query being made
and it is being searched using the technique mentioned in the manual

PHPBB3-13674
2015-03-06 22:23:45 +00:00
Dragos-Valentin Radulescu
4ccba99047 [ticket/13602] Adding event overall_header_navbar_before
PHPBB3-13602
2015-03-06 19:41:02 +02:00
Marc Alexander
d7f4715b96 Merge pull request #3473 from RMcGirr83/ticket/13675
[ticket/13675] Add validate to acp_profile event and add template events
2015-03-06 14:36:20 +01:00
Marc Alexander
3d7def4196 Merge pull request #3450 from brunoais/ticket/13142
[ticket/13142] Before query to get the total number of reports
2015-03-06 14:30:11 +01:00
Marc Alexander
d087d85618 Merge pull request #3426 from kinerity/ticket/13637
[ticket/13637] Add core.ucp_pm_compose_alter_vars PHP event
2015-03-06 13:50:18 +01:00
Marc Alexander
d5a79ad555 Merge pull request #3405 from brunoais/ticket/13625
[ticket/13625] Adding multiple variables to core.viewforum_get_topic_data
2015-03-06 13:42:26 +01:00
Richard McGirr
6b87e06292 [ticket/13675] Add validate to acp_profile event and add template events
for acp users profile

PHPBB3-13675
2015-03-06 07:26:35 -05:00
Cesar G
f3ab7aae9e Merge remote-tracking branch 'marc1706/ticket/13666' into 3.1.x
* marc1706/ticket/13666:
  [ticket/13666] Remove data-clicked attribute from all of form's submit buttons
2015-03-05 15:08:04 -08:00
brunoais
52b83bd5e9 [ticket/13625] Added forum_id to allow more flexibility and possibilities.
PHPBB3-13625
2015-03-05 22:52:03 +00:00
Marc Alexander
bbfbb3f1fa [ticket/13666] Remove data-clicked attribute from all of form's submit buttons
PHPBB3-13666
2015-03-05 22:26:13 +01:00
brunoais
4cdcb6d5d3 [ticket/13672] Allow changing the data from the user-submitted report
PHPBB3-13672
2015-03-05 18:31:11 +00:00
Kailey Truscott
0f13635fb8 [ticket/13637] Update msg_id docblock
Change topic_id to post_id

PHPBB3-13637
2015-03-05 13:28:19 -05:00
Andreas Fischer
323167bb94 Merge pull request #3466 from marc1706/ticket/13670
[ticket/13670] Modify variable-variable syntax in common avatar test for PHP/

* marc1706/ticket/13670:
  [ticket/13670] Modify variable-variable syntax in common avatar test for PHP7
2015-03-05 19:06:28 +01:00
Cesar G
c0104d0243 Merge remote-tracking branch 'cyberalien/ticket/13667' into 3.1.x
* cyberalien/ticket/13667:
  [ticket/13667] Fix buttons alignment in Chrome for Windows
2015-03-05 08:41:33 -08:00
brunoais
8a6d55520d [ticket/13668] Allow changing the query to obtain the user-submitted report.
PHPBB3-13668
2015-03-05 16:21:23 +00:00
brunoais
fa474c4378 [ticket/13668] Convert the mcp report_details query to a built query
PHPBB3-13668
2015-03-05 16:19:36 +00:00
Marc Alexander
d0ab101c32 Merge pull request #3453 from RMcGirr83/ticket/13477
[ticket/13477] Update file cache driver for extension paths
2015-03-05 16:02:46 +01:00
Marc Alexander
8f09ff210f Merge pull request #3413 from kasimi/ticket/13540
[ticket/13540] Add topic info and total posts count to mcp_topic_review_modify_row event
2015-03-05 15:46:33 +01:00
Andreas Fischer
149a2dd91a Merge pull request #3465 from marc1706/ticket/13657
[ticket/13657] Run travis builds on PHP 7.0

* marc1706/ticket/13657:
  [ticket/13657] Run travis builds on PHP 7.0
2015-03-05 15:42:47 +01:00
Marc Alexander
33738fa3db [ticket/13670] Modify variable-variable syntax in common avatar test for PHP7
PHPBB3-13670
2015-03-05 15:10:37 +01:00
Marc Alexander
70f1741331 Merge pull request #3454 from RMcGirr83/ticket/13590
[ticket/13590] Headers of remember me login keys are not centered
2015-03-05 13:56:01 +01:00
Marc Alexander
160ff3471d [ticket/13657] Run travis builds on PHP 7.0
PHPBB3-13657
2015-03-05 11:26:53 +01:00
RMcGirr83
4618a3e2f8 [ticket/13477] rename function and fix doc blocks
PHPBB3-13477
2015-03-04 14:20:27 -05:00
RMcGirr83
c3720739cb [ticket/13590] Headers of remember me login keys are not centered
Corrected a few other files as well

PHPBB3-13590
2015-03-04 06:00:27 -05:00
cyberalien
5d8bea9060 [ticket/13667] Fix buttons alignment in Chrome for Windows
PHPBB3-13667
2015-03-03 16:47:30 +02:00
RMcGirr83
5cd4941c55 [ticket/13477] Update file cache driver for filenames
Replace slashes on file name

PHPBB3-13477
2015-03-03 09:31:30 -05:00
brunoais
134a5e0391 [ticket/13661] Brackets in their own line
I didn't even notice that I used my own coding guidelines there...
Thanks to MGaetan89 for pointing it out.

PHPBB3-13661
2015-03-02 12:06:24 +00:00
brunoais
c7cc8a098e [ticket/13661] Re-Fixed $log_type -> $log_time
Thanks to goof for pointing it out...

PHPBB3-13661
2015-03-01 21:17:06 +00:00
brunoais
21cc1fda85 [ticket/13664] Added alias to table to make modding easier.
PHPBB3-13664
2015-03-01 20:57:06 +00:00
brunoais
d53b584c9a [ticket/13661] Wrong event @since version
PHPBB3-13661
2015-03-01 20:44:30 +00:00
brunoais
5fa6871ebf [ticket/13664] Add event to allow changing number of unapproved posts listed
PHPBB3-13664
2015-03-01 20:26:12 +00:00
brunoais
772bbdfeae [ticket/13661] Removed superfluous whitespace
PHPBB3-13661
2015-03-01 19:58:57 +00:00
brunoais
5ad69bbecf [ticket/13664] From string query in mcp_front unapproved posts to built query
PHPBB3-13664
2015-03-01 19:55:43 +00:00
brunoais
d0a1650a04 [ticket/13661] bugfix: The conditional is the log_time, not log_type
I mistakenly made the log_type the conditional instead of log_time.
Thankfully, the automated tests helped finding this mistake.

PHPBB3-13661
2015-03-01 18:41:20 +00:00
Joas Schilling
fb71e6dde6 [ticket/8494] Ignore errors from the database schema preparation
This allows installing phpBB twice in the same database with a different
prefix

PHPBB3-8494
2015-03-01 17:37:26 +01:00
brunoais
c887eedaa5 [ticket/13661] Fixed the "FROM" in the built query.
I was doing it wrong by giving a string to the FROM clause in the built query.

PHPBB3-13661
2015-03-01 14:07:32 +00:00
brunoais
d66a53a531 [ticket/13661] Add event to allow editing the queries used to get the logs
PHPBB3-13661
2015-03-01 11:56:38 +00:00
brunoais
dbc09bf0d4 [ticket/13661] Transform queries to get logs and log count into built queries
PHPBB3-13661
2015-02-28 20:34:25 +00:00
brunoais
8b23272c33 [ticket/13660] Allow changing the query for total reports in mcp_front
PHPBB3-13660
2015-02-28 08:57:43 +00:00
brunoais
c37d5f9b7c [ticket/13142] Default $total to -1 before the event for more flexibility
PHPBB3-13142
2015-02-27 22:51:32 +00:00
Joas Schilling
18de60c0e0 Merge branch '3.0.x' into 3.1.x 2015-02-27 22:44:13 +01:00
Joas Schilling
8abf259273 Merge pull request #3444 from naderman/ticket/13617-ascraeus
[ticket/13617] Enforce column size limit for session_forum_id
2015-02-27 22:44:04 +01:00
Joas Schilling
62973faf4b Merge pull request #3443 from naderman/ticket/13617
[ticket/13617] Enforce column size limit for session_forum_id
2015-02-27 22:43:32 +01:00
Marc Alexander
a7b1b71921 Merge pull request #3451 from RMcGirr83/ticket/13510
[ticket/13510] Add template even viewtopic_body_pagination_after
2015-02-27 22:08:51 +01:00
Robert Heim
2ad87c662f [ticket/13658] renamed events and added table_ary parameter
- added suffix '_query' to event names
- added table_ary to before event

PHPBB3-13658
2015-02-27 21:04:08 +01:00
RobertHeim
71828ee8df [ticket/13658] add event before and after topics are deleted
PHPBB3-13658
2015-02-27 18:01:26 +01:00
Marc Alexander
e15b9dc782 Merge pull request #3388 from rxu/ticket/13596
[ticket/13596] Add display_forums() event to allow modifying forums list data
2015-02-27 12:20:50 +01:00
Marc Alexander
0daf148aaa Merge pull request #3384 from brunoais/ticket/13592
[ticket/13592] Allow changing get_visibility_sql's result
2015-02-27 12:00:09 +01:00
brunoais
df9331084b [ticket/13142] Removed surperfulous space
PHPBB3-13142
2015-02-27 10:42:27 +00:00
brunoais
1e73f8d5ea [ticket/13142] Removed surperfulous new line
PHPBB3-13142
2015-02-27 08:34:28 +00:00
RMcGirr83
8c73f63529 [ticket/13510] Add template even viewtopic_body_pagination_after
PHPBB3-13510
2015-02-26 18:29:02 -05:00
Joas Schilling
c814ecc143 Merge pull request #3449 from prototech/ticket/13649
[ticket/13649] Fix incorrect subforum tooltip title when unread.
2015-02-26 22:53:06 +01:00
Joas Schilling
4928afedc6 Merge pull request #3447 from brunoais/ticket/13143
[ticket/13652] Added $phpbb_dispatcher from global to phpbb_mcp_sorting()
2015-02-26 22:47:51 +01:00
Joas Schilling
ea4b993516 Merge pull request #2992 from prototech/ticket/12599
[ticket/12599] Update documentation style
2015-02-26 22:34:05 +01:00
Joas Schilling
6647d390b0 Merge pull request #3448 from prototech/ticket/13563
[ticket/13563] Remove PM column from subsilver2's memberlist_body.html.
2015-02-26 22:32:03 +01:00
Jakub Senko
6b1cd2d312 [ticket/13467] Add coding guidelines link
PHPBB3-13467
2015-02-26 20:51:36 +01:00
brunoais
ec855f1817 [ticket/13142] Place the event in the most meaningful place
The event now has nearly all variables and it is in the place where it can
most influence this method's outcome without requiring the extension
to re-process phpBB's code.

PHPBB3-13142
2015-02-26 13:07:35 +00:00
brunoais
3e451cbe75 [ticket/13142] Delete event in order to move it.
PHPBB3-13142
2015-02-26 10:05:12 +00:00
Cesar G
4df853abcc [ticket/12599] Remove empty line at end of code boxes.
PHPBB3-12599
2015-02-25 20:08:08 -08:00
Cesar G
a07b29c1df [ticket/12599] Place standalone text in a box.
PHPBB3-12599
2015-02-25 20:08:03 -08:00
Cesar G
6e5f33e5fb [ticket/12599] Get the font sizes under control.
PHPBB3-12599
2015-02-25 20:02:40 -08:00
Cesar G
62f69224a4 [ticket/12599] Add padding on the sides of the inline code boxes.
PHPBB3-12599
2015-02-25 20:02:28 -08:00
Cesar G
5cd3e7627c [ticket/12599] Use the back to top icon instead of text.
PHPBB3-12599
2015-02-25 20:02:16 -08:00
Cesar G
14fecb2f02 [ticket/12599] Move images to assets/ and update the phpBB logo.
PHPBB3-12599
2015-02-25 20:02:06 -08:00
Cesar G
4565cac049 [ticket/12599] Move documentation stylesheet to assets directory.
PHPBB3-12599
2015-02-25 20:01:53 -08:00
Cesar G
e29e0e5018 [ticket/12599] Remove corner images from documentation style.
PHPBB3-12599
2015-02-25 20:01:25 -08:00
Cesar G
335d88cdbb [ticket/13649] Fix incorrect subforum tooltip title when unread.
PHPBB3-13649
2015-02-25 19:36:28 -08:00
Cesar G
37b919142f [ticket/13563] Remove PM column from subsilver2's memberlist_body.html.
The PM link was intentionally dropped due to excessive query requirements,
thus the column is without purpose now. See PHPBB3-13229

PHPBB3-13563
2015-02-25 19:15:11 -08:00
brunoais
c8be24fd5e [ticket/13652] Added $phpbb_dispatcher from global to phpbb_mcp_sorting()
PHPBB3-13652
2015-02-25 23:28:42 +00:00
RMcGirr83
0442957420 [ticket/13650] Move core event
PHPBB3-13650
2015-02-25 11:28:00 -05:00
Nils Adermann
106bc1c232 [ticket/13617] Document magic number for forum_id
PHPBB3-13617
2015-02-25 17:00:22 +01:00
Nils Adermann
c5a15c0635 [ticket/13617] Use request->variable instead of request_var
PHPBB3-13617
2015-02-25 16:58:38 +01:00
Nils Adermann
d08d988df4 Merge branch 'ticket/13617' into ticket/13617-ascraeus
* ticket/13617:
  [ticket/13617] Enforce column size limit for session_forum_id

Conflicts:
	phpBB/phpbb/session.php
2015-02-25 16:25:20 +01:00
Nils Adermann
6f3f6282d1 [ticket/13617] Enforce column size limit for session_forum_id
PHPBB3-13617
2015-02-25 16:20:50 +01:00
Joas Schilling
3ac583271f Merge pull request #3381 from rxu/ticket/13591
[ticket/13591] Add core events to the function obtain_users_online_string()
2015-02-24 21:56:34 +01:00
Joas Schilling
9f9e392c7d Merge pull request #3436 from RMcGirr83/ticket/13650
[ticket/13650] Validate ucp profile data changes
2015-02-24 21:53:01 +01:00
Joas Schilling
56cbff720d Merge pull request #3439 from RMcGirr83/ticket/13587
[ticket/13587] SQL syntax errors in get_prune_users()
2015-02-24 20:44:15 +01:00
RMcGirr83
80e1c233d9 [ticket/13587] SQL syntax errors in get_prune_users()
PHPBB3-13587
2015-02-24 13:28:47 -05:00
Marc Alexander
b650f45d55 [ticket/12368] Correctly check if avatars migration is installed
Try to set the avatar type to string value to check if new avatar
types are supported.

PHPBB3-12368
2015-02-24 11:43:33 +01:00
Richard McGirr
03ded5853b [ticket/13650] Validate ucp profile data changes
PHPBB3-13650
2015-02-23 21:19:10 -05:00
Andreas Fischer
525a62f72e Merge pull request #3433 from Nicofuma/ticket/13643
[ticket/13643] Change the priority of kernel_terminate_subscriber to -10000

* Nicofuma/ticket/13643:
  [ticket/13643] Change the priority of kernel_terminate_subscriber to PHP_INT_MIN
2015-02-22 23:44:42 +01:00
Joas Schilling
269dee4189 Merge pull request #3415 from RMcGirr83/ticket/13578
[ticket/13578] Add ucp_register.php core events
2015-02-22 22:27:41 +01:00
Nicofuma
ffc5a73a0c [ticket/13643] Change the priority of kernel_terminate_subscriber to PHP_INT_MIN
PHP_INT_MIN isn't a defined constant but it can be calculed by
~PHP_INT_MAX (two's complement of PHP_INT_MAX)

PHPBB3-13643
2015-02-22 21:53:05 +01:00
Andreas Fischer
d152bbc727 Merge pull request #3427 from prototech/ticket/13551
[ticket/13551] Fix incorrectly named template variable: AUTH_LDAP_DN

* prototech/ticket/13551:
  [ticket/13551] Fix incorrectly named template variable: AUTH_LDAP_DN
2015-02-22 18:57:35 +01:00
Andreas Fischer
702a51b01c Merge pull request #3431 from Nicofuma/ticket/13644
[ticket/13644] Always type hint dispatch_interface

* Nicofuma/ticket/13644:
  [ticket/13644] Always type hint dispatch_interface
2015-02-22 17:39:45 +01:00
Nicofuma
9b5493372d [ticket/13644] Always type hint dispatch_interface
PHPBB3-13644
2015-02-22 17:01:37 +01:00
RMcGirr83
7bfb8686d9 [ticket/13578] Add ucp_register.php core events
PHPBB3-13578
2015-02-22 08:52:19 -05:00
Marc Alexander
c63bc6ee93 [ticket/13522] Fix QA tests for request_var() use
PHPBB3-13522
2015-02-21 17:53:25 +01:00
Marc Alexander
94b72cfbdb [ticket/13522] Add captcha to test file class name
PHPBB3-13522
2015-02-21 17:46:39 +01:00
Marc Alexander
8e737e483e [ticket/13522] Remove unneeded variables and correctly output input on error
PHPBB3-13522
2015-02-21 17:46:37 +01:00
Marc Alexander
4167be1e2c [ticket/13522] Add tests for acp_get_question_input and set/get name
PHPBB3-13522
2015-02-21 17:45:20 +01:00
Marc Alexander
5bfcc7e707 [ticket/13522] Add test file for Q&A captcha
PHPBB3-13522
2015-02-21 17:45:20 +01:00
Marc Alexander
d15e5372ca [ticket/13522] Use acp_get_question_input() for retrieving input data
PHPBB3-13522
2015-02-21 17:45:17 +01:00
Marc Alexander
12fe882741 [ticket/13522] Trim array elements before processing further
PHPBB3-13522
2015-02-21 17:43:15 +01:00
Kailey Truscott
b8c388f184 [ticket/13637] Update event name and docblock
Update the event name to core.ucp_pm_compose_modify_data
Change description of to_group_id and submit dockblock

PHPBB3-13637
2015-02-20 20:36:17 -05:00
Joas Schilling
379eae1a92 Merge pull request #3418 from brunoais/ticket/13631
[ticket/13631] Fix wrong variable in get_global_visibility_sql()'s event
2015-02-20 22:26:39 +01:00
Joas Schilling
e6e7d7040a Merge pull request #3423 from RMcGirr83/ticket/13635
[ticket/13635] Add sql_ary to ucp profile event
2015-02-20 21:00:39 +01:00
Joas Schilling
059790f386 Merge pull request #3425 from dragosvr92/patch-4
Update colours.css
2015-02-20 20:55:23 +01:00
Joas Schilling
835ee2ba63 Merge pull request #3380 from n-aleha/ticket/13586
[ticket/13586] Allow '0' as username with Jabber notifications
2015-02-20 20:52:54 +01:00
Joas Schilling
5e215aef26 Merge pull request #3369 from marc1706/ticket/13577
[ticket/13577] Skip tests requiring fileinfo if not enabled
2015-02-20 20:50:10 +01:00
Joas Schilling
461ce3f892 Merge branch 'Wolfsblvt-ticket/13533' into 3.1.x 2015-02-20 20:41:55 +01:00
Wolfsblvt
cba12aca2a [ticket/13533] Add template core event to search results
PHPBB3-13533
2015-02-20 20:41:17 +01:00
Joas Schilling
c24a840048 Merge pull request #3277 from dhruvgoel92/ticket/13472
[ticket/13472] Delete admin activation notification when deleting user
2015-02-20 20:29:05 +01:00
Joas Schilling
8a06f21ea9 Merge branch 'ticket/13640' into 3.1.x 2015-02-20 20:22:03 +01:00
Dragos-Valentin Radulescu
5c3ca7404d [ticket/13640] Rearrange css in a better order
PHPBB3-13640
2015-02-20 20:21:31 +01:00
Joas Schilling
31ae574830 Merge pull request #3197 from brunoais/ticket/13142
[ticket/13142] Before query to list unapproved and deleted posts
2015-02-20 19:54:02 +01:00
Dragos-Valentin Radulescu
eff928c29b [ticket/13639] Update colours.css
The rule is a left over from development. it should be removed from colours.css

.icon-search-advanced { background-image: url("./images/icon_search_adv.gif");}

Area21 ticket: https://area51.phpbb.com/phpBB/viewtopic.php?f=81&p=275166

PHPBB3-13639
2015-02-20 20:26:33 +02:00
Scout4all
3f4dcc6920 [ticket/13463] Correctly position notification mark read icon in RTL.
PHPBB3-13463
2015-02-19 19:07:07 -08:00
Cesar G
71d3ddc623 [ticket/13551] Fix incorrectly named template variable: AUTH_LDAP_DN
PHPBB3-13551
2015-02-19 18:38:35 -08:00
Kailey Truscott
d28d90bd90 [ticket/13637] Add core.ucp_pm_compose_alter_vars PHP event
Add a new PHP event to ucp_pm_compose to alter the default vars

PHPBB3-13637
2015-02-19 20:50:51 -05:00
Jakub Senko
8d6ab63fea [ticket/11424] Add space between control flow keywords and parenthesis
PHPBB3-11424
2015-02-19 22:07:26 +01:00
Andreas Fischer
3db7ac0aad Merge pull request #3422 from VSEphpbb/ticket/13634-3.0.x
[ticket/13634] Update branch names on README

* VSEphpbb/ticket/13634-3.0.x:
  [ticket/13634] Update links to travis build icons
  [ticket/13634] Update branch names on README
2015-02-19 19:27:14 +01:00
Andreas Fischer
e4b4428173 Merge branch '3.0.x' into 3.1.x
* 3.0.x:
  [ticket/13634] Update links to travis build icons
  [ticket/13634] Update branch names on README
2015-02-19 19:27:14 +01:00
RMcGirr83
1f345a8cf9 [ticket/13635] Add sql_ary to ucp profile event
PHPBB3-13635
2015-02-19 05:45:10 -05:00
Marc Alexander
7fd3767bbd Merge pull request #3417 from nickvergessen/ticket/13600
[ticket/13600] Allow extensions to create a custom help page
2015-02-18 21:10:43 +01:00
Marc Alexander
098854a822 Merge pull request #3395 from s9e/ticket/13595
[ticket/13595] Remove unused instances of the bbcode class
2015-02-18 18:02:23 +01:00
Matt Friedman
bbf4bcc986 [ticket/13634] Update links to travis build icons
PHPBB3-13634
2015-02-18 08:42:14 -08:00
Matt Friedman
03f9c69e60 [ticket/13634] Update branch names on README
PHPBB3-13634
2015-02-18 08:37:36 -08:00
Marc Alexander
60f60acea3 Merge pull request #3420 from marc1706/ticket/13628
[ticket/13628] Allow ability for extension to add entries to user's profile
2015-02-18 17:30:13 +01:00
RMcGirr83
153d1691ae [ticket/13628] Allow ability for extension to add entries to user's profile
PHPBB3-13628
2015-02-18 16:35:10 +01:00
brunoais
f0850f1915 [ticket/13631] Better, more explicit comment explanation
PHPBB3-13631
2015-02-18 10:36:29 +00:00
brunoais
997b229723 [ticket/13631] Fix wrong variable in get_global_visibility_sql()'s event
I don't get this... I was positive I, at some point, had it right... I don't get
what happened...

PHPBB3-13631
2015-02-18 10:33:49 +00:00
Marc Alexander
13948718c6 Merge pull request #3414 from rxu/ticket/13433
[ticket/13433] Fix parsing of email addresses
2015-02-18 00:03:25 +01:00
Joas Schilling
02d28c28cd [ticket/13600] Allow extensions to create a custom help page
PHPBB3-13600
2015-02-17 23:57:30 +01:00
Andreas Fischer
f3d332b78f Merge pull request #3411 from Senky/ticket/13570
[ticket/13570] Mysqli extension supports persistent connection since PHP 5.3.0

* Senky/ticket/13570:
  [ticket/13570] Remove unnecessary ternary condition from mysqli driver
2015-02-17 22:24:15 +01:00
rxu
950c72a8a5 [ticket/13433] Add make_clickable() test for emails
PHPBB3-13433
2015-02-18 01:03:07 +07:00
Marc Alexander
6322970766 Merge pull request #3412 from Senky/ticket/13618
[ticket/13618] Small grammatical typo in the English FAQ
2015-02-17 17:13:13 +01:00
rxu
fa1c61f608 [ticket/13433] Fix parsing of email addresses
Currently email addresses are parsed incorrectly due to the regex structure.
Namely, if localpart consists of several dot separated parts, only the last
part with the trailing dot will be captured.
The patch change this behavior to capture the whole localpart.

PHPBB3-13433
2015-02-17 17:24:30 +07:00
kasimi
c7ce6cd26f [ticket/13540] Add total post count to mcp_topic_review_modify_row event
PHPBB3-13540
2015-02-17 00:48:04 +01:00
Jakub Senko
ec8aeaf2cd [ticket/13618] Fix typo in English FAQ
PHPBB3-13618
2015-02-16 20:27:52 +01:00
Jakub Senko
f23d2ec42f [ticket/13570] Remove unnecessary ternary condition from mysqli driver
PHPBB3-13570
2015-02-16 20:25:11 +01:00
Jakub Senko
e31720bb6e [ticket/13467] Add a CONTRIBUTING file
PHPBB3-13467
2015-02-16 20:17:33 +01:00
kasimi
f9d34a16dd [ticket/13540] Add topic_info to mcp_topic_review_modify_row event
PHPBB3-13540
2015-02-16 20:11:19 +01:00
Jakub Senko
6f56dc8568 [ticket/11424] Handle race condition properly for Quick-Mod Tools
PHPBB3-11424
2015-02-16 19:51:09 +01:00
Jakub Senko
bf86553daa [ticket/9457] Add WAI-ARIA landmarks to the Prosilver template files
PHPBB3-9457
2015-02-16 18:02:16 +01:00
brunoais
b934617a3b [ticket/13625] Adding multiple variables to core.viewforum_get_topic_data
Added topics_count, sort_days, sort_key and sort_dir to
core.viewforum_get_topic_data and adjusted the event's comment explaining
it's possible extended purpose now that it has more variables.

PHPBB3-13625
2015-02-16 11:31:05 +00:00
brunoais
957b23765f [ticket/13621] Prepend $where_sql and postpend closing parentheses on return
Prepend $where_sql and postpend closing parentheses on statements with return

PHPBB3-13621
2015-02-15 18:50:13 +00:00
Marc Alexander
088907fe8e Merge pull request #3403 from marc1706/ticket/13615
[ticket/13615] Correctly display images for gallery avatar in subsilver2
2015-02-15 18:50:58 +01:00
kamijoutouma
4398a51dc6 [ticket/13615] Correctly display images for gallery avatar in subsilver2
Avatar Gallery shows categories but no images in subsilver2.
The ID was not specified in the template. Also, the correct parent template
loop is called avatar_local_row and not avatar_local_col.

PHPBB3-13615
2015-02-15 18:18:56 +01:00
Marc Alexander
27cfda74fc [ticket/13612] Always display success message if extension was enabled
An error will already be triggered if enable_step() is not successful.
Redirecting for no obvious reason will just confuse users.

PHPBB3-13612
2015-02-14 23:41:53 +01:00
Marc Alexander
8314ce6871 [ticket/13612] Run meta refresh until extension is fully enabled
PHPBB3-13612
2015-02-14 17:59:59 +01:00
JoshyPHP
4559aca723 [ticket/13595] Removed unused code
PHPBB3-13595
2015-02-13 22:55:04 +01:00
Marc Alexander
9e3bc9a3f9 Merge branch 'develop-olympus' into develop-ascraeus
Conflicts:
	.travis.yml
	travis/phpunit-mysqli-travis.xml
2015-02-13 12:06:07 +01:00
Marc Alexander
877774a296 Merge pull request #3393 from bantu/ticket/13599
[ticket/13599] Remove Travis CI PHP 5.2 environment. No longer supported.
2015-02-13 12:02:25 +01:00
Andreas Fischer
0a775e0433 [ticket/13599] Remove Travis CI PHP 5.2 environment. No longer supported.
PHPBB3-13599
2015-02-12 22:12:32 +01:00
Andreas Fischer
39a3f4f6c8 Merge pull request #3391 from marc1706/ticket/13597
[ticket/13597] Modify variable-variable syntax to be compatible with PHP7

* marc1706/ticket/13597:
  [ticket/13597] Modify variable-variable syntax to be compatible with PHP7
2015-02-11 16:53:25 +01:00
Marc Alexander
25b54791f9 [ticket/13493] Append page name to base url if it doesn't contain it
PHPBB3-13493
2015-02-11 13:03:22 +01:00
brunoais
93185574b5 [ticket/13142] BUMPed version
PHPBB3-13142
2015-02-11 11:42:43 +00:00
Marc Alexander
3df25babce [ticket/13597] Modify variable-variable syntax to be compatible with PHP7
PHPBB3-13597
2015-02-11 12:03:54 +01:00
brunoais
bf20fb03ef [ticket/13592] The name didn't make proper sense
PHPBB3-13592
2015-02-11 10:56:36 +00:00
rxu
67a963ac42 [ticket/13596] Add display_forums() event to allow modifying forums list data
Add display_forums() core event in includes/functions_display.php to allow
modifying forums list data before the list is being generated and dumped
to the template.

PHPBB3-13596
2015-02-10 10:05:44 +07:00
brunoais
74385b8fce [ticket/13592] Empty line before event comment block.
I had forgotten this one

PHPBB3-13592
2015-02-09 11:58:35 +00:00
brunoais
6111f5fa74 [ticket/13592] Removed unwanted space in self line.
PHPBB3-13592
2015-02-09 11:56:53 +00:00
brunoais
bb7d294190 [ticket/13592] Allow full override of get_visibility_sql()
PHPBB3-13592
2015-02-09 10:44:12 +00:00
brunoais
8a4df90dac [ticket/13592] Allow changing get_visibility_sql's result
PHPBB3-13592
2015-02-09 08:42:37 +00:00
brunoais
1bcce75633 [ticket/13592] Allow changing get_visibility_sql's result
PHPBB3-13592
2015-02-08 23:52:27 +00:00
rxu
072df2217c [ticket/13591] Add core events to the function obtain_users_online_string()
Add functions.php core events to the function obtain_users_online_string()
to allow extensions adding/modifying online users data.

PHPBB3-13591
2015-02-08 12:28:28 +07:00
n-aleha
e1eac80b8f [ticket/13586] Allow '0' as username with Jabber notifications
PHPBB3-13586
2015-02-07 19:33:19 +02:00
Joas Schilling
c6a371531b Merge pull request #3379 from Crizz0/ticket/13588
[ticket/13588] Fixes wrong message in info fsockopen() disabled
2015-02-07 14:33:34 +01:00
Crizzo
fbc603861d [ticket/13588] Fixes wrong message in info fsockopen() disabled
PHPBB3-13588
2015-02-07 13:50:08 +01:00
Marc Alexander
1da6b30cf0 [ticket/13568] Add unit tests for validating absolute path
PHPBB3-13568
2015-02-06 10:39:55 +01:00
Marc Alexander
cd85f1b632 Merge branch 'ticket/13568' into ticket/13568-asc
Conflicts:
	phpBB/adm/index.php
	phpBB/includes/acp/acp_attachments.php
2015-02-06 10:19:39 +01:00
Marc Alexander
7c5d872344 [ticket/13568] Also check if absolute_path_writable is writable
PHPBB3-13568
2015-02-06 10:15:36 +01:00
Marc Alexander
48b64b0a61 [ticket/13577] Skip filespec test requiring mimetype check on windows
PHPBB3-13577
2015-02-05 13:37:34 +01:00
Marc Alexander
c1d644769f [ticket/13577] Skip functional tests requiring fileinfo if not enabled
PHPBB3-13577
2015-02-04 15:24:25 +01:00
Andreas Fischer
1e4853507a Merge branch 'develop-olympus' into develop-ascraeus
* develop-olympus:
2015-02-03 20:36:46 +01:00
Andreas Fischer
8832851b8e Merge pull request #3366 from marc1706/ticket/13348
[ticket/13348] Use close method to free feed query result handle

* marc1706/ticket/13348:
  [ticket/13348] Remove unnecessary global $cache
  [ticket/13348] Use close method to free query result handle
2015-02-03 20:36:41 +01:00
Andreas Fischer
2787e799e1 Merge pull request #3365 from marc1706/ticket/13348-olympus
[ticket/13348] Use close method to free query result handle

* marc1706/ticket/13348-olympus:
  [ticket/13348] Remove unnecessary global $cache
  [ticket/13348] Use close method to free query result handle
2015-02-03 20:36:27 +01:00
Marc Alexander
a09d022d5e Merge branch 'ticket/13348-olympus' into ticket/13348
Conflicts:
	phpBB/feed.php
2015-02-03 18:30:45 +01:00
Marc Alexander
4e06ab16f0 [ticket/13348] Remove unnecessary global $cache
$cache is not used in the method get_item().

PHPBB3-13348
2015-02-03 18:24:16 +01:00
Marc Alexander
1f2cb69c8a [ticket/13348] Use close method to free query result handle
PHPBB3-13348
2015-02-03 18:23:13 +01:00
Andreas Fischer
5347eac69c Merge pull request #3328 from marc1706/ticket/13538
[ticket/13538] Add tests for pagination in nested loops

* marc1706/ticket/13538:
  [ticket/13538] Add tests for double nested pagination loop
  [ticket/13538] Fix tests for pagination in nested loop
  [ticket/13538] Add test for pagination in nested loop
2015-02-03 17:53:46 +01:00
Andreas Fischer
2864e77d6c Merge pull request #3361 from marc1706/ticket/13569
[ticket/13569] Add missing sql_freeresults and remove unneeded results

* marc1706/ticket/13569:
  [ticket/13569] Add missing sql_freeresults and remove unneeded results
2015-02-03 17:38:00 +01:00
Marc Alexander
a3be531020 [ticket/13568] Use correct data provider on windows
PHPBB3-13568
2015-02-03 16:34:41 +01:00
Andreas Fischer
427d2de3ea Merge branch 'develop-olympus' into develop-ascraeus
* develop-olympus:
  [ticket/13572] Update composer to version 1.0.0-alpha9
2015-02-03 10:30:03 +01:00
Andreas Fischer
e86b7ce562 Merge pull request #3363 from Nicofuma/ticket/13572
[ticket/13572] Update composer to version 1.0.0-alpha9

* Nicofuma/ticket/13572:
  [ticket/13572] Update composer to version 1.0.0-alpha9
2015-02-03 10:30:02 +01:00
Nicofuma
f4f983c0f6 [ticket/13572] Update composer to version 1.0.0-alpha9
PHPBB3-13572
2015-02-03 10:25:39 +01:00
Joas Schilling
bbb6d6a452 Merge pull request #3330 from kasimi/ticket/13540
[ticket/13540] Add core event for modifying topic review block data
2015-02-02 23:30:06 +01:00
Joas Schilling
efee422707 Merge pull request #3326 from Wolfsblvt-Test/ticket/13537
Add core events on mcp_queue for approval and disapproval
2015-02-02 23:25:53 +01:00
Joas Schilling
7330c0afd3 Merge pull request #3325 from rxu/ticket/13536
[ticket/13536] Add ACP/UCP core events to allow modifying user profile data on editing
2015-02-02 23:22:23 +01:00
Joas Schilling
6678570f49 Merge pull request #3324 from rxu/ticket/13336
[ticket/13336] Add core events to the function user_active_flip()
2015-02-02 23:19:44 +01:00
Joas Schilling
e9eafece3f Merge pull request #3323 from rxu/ticket/13535
[ticket/13535] Add core event to allow modifying account settings on editing
2015-02-02 23:18:15 +01:00
Joas Schilling
0e6cd94fb4 Merge pull request #3317 from Wolfsblvt/ticket/13532
Add core event to get_unread_topics() in functions.php
2015-02-02 23:12:42 +01:00
Joas Schilling
0aea283ab0 Merge pull request #3305 from Wolfsblvt/ticket/13518
Add core event to markread() in functions.php
2015-02-02 23:09:34 +01:00
Joas Schilling
b1336ae016 Merge pull request #3302 from rxu/ticket/13512
[ticket/13512] Add template events before/after the post details
2015-02-02 23:05:50 +01:00
Joas Schilling
7254a52812 Merge pull request #3282 from Elsensee/ticket/13313
[ticket/13313] Add event core.acp_email_display
2015-02-02 23:00:29 +01:00
Marc Alexander
5182d02da5 Merge pull request #3334 from paul999/ticket/13542
[ticket/13542] Update core.ucp_prefs_personal_data to include $error
2015-02-02 21:05:44 +01:00
Marc Alexander
ffe0e46e82 [ticket/13568] Add imagick tests for windows
PHPBB3-13568
2015-02-02 20:39:58 +01:00
Marc Alexander
d50cec998c [ticket/13568] Correctly check rpath and rwpath validation options
PHPBB3-13568
2015-02-02 18:44:48 +01:00
Marc Alexander
b53fd867be [ticket/13568] Add more test cases for imagick path
PHPBB3-13568
2015-02-02 18:33:53 +01:00
Marc Alexander
a93df0e511 [ticket/13568] Use more descriptive validation names and merge with path block
PHPBB3-13568
2015-02-02 18:30:05 +01:00
Marc Alexander
a166f6f42c [ticket/13569] Add missing sql_freeresults and remove unneeded results
PHPBB3-13569
2015-02-02 17:36:39 +01:00
Marc Alexander
99574cf5e5 [ticket/13568] Add functional test for imagick path setting
PHPBB3-13568
2015-02-02 16:11:00 +01:00
Marc Alexander
19421fcdef [ticket/13568] Validate imagick path as readable absolute path
PHPBB3-13568
2015-02-02 15:59:52 +01:00
Joas Schilling
9f59aa59d9 Merge branch 'prep-release-3.1.3' into develop-ascraeus
Conflicts:
	build/build.xml
	phpBB/includes/constants.php
	phpBB/install/schemas/schema_data.sql
2015-02-01 20:23:16 +01:00
Joas Schilling
7f99e1c857 [prep-release-3.1.3] Add migration for 3.1.3 2015-02-01 19:18:30 +01:00
Joas Schilling
036b5c4244 [prep-release-3.1.3] Update version to 3.1.3 2015-02-01 19:15:42 +01:00
Joas Schilling
3c23242bfe Merge branch 'prep-release-3.1.3' into develop-ascraeus 2015-01-31 12:11:43 +01:00
Joas Schilling
be30d8251a [prep-release-3.1.3] Add changelog for 3.1.3-RC2 2015-01-31 01:08:29 +01:00
Joas Schilling
9232367b35 [prep-release-3.1.3] Add migration for 3.1.3-RC2 2015-01-31 01:06:23 +01:00
Joas Schilling
dd182c5433 [prep-release-3.1.3] Update version to 3.1.3-RC2 2015-01-31 01:03:55 +01:00
Joas Schilling
67478a0f94 Merge branch 'prep-release-3.1.3' into develop-ascraeus 2015-01-31 00:57:25 +01:00
Joas Schilling
e72c1540cb Merge branch 'ticket/13553' into prep-release-3.1.3 2015-01-31 00:57:15 +01:00
Matt Friedman
e6bbde2bff [ticket/13553] Use defined title value in page headers too
PHPBB3-13553
2015-01-31 00:56:59 +01:00
Matt Friedman
ab4b1afd98 [ticket/13553] Make title var accept a lang key var
PHPBB3-13553
2015-01-31 00:56:54 +01:00
Matt Friedman
7127d08c8f [ticket/13553] Message helper should accept a lang key var
PHPBB3-13553
2015-01-31 00:56:47 +01:00
Joas Schilling
b16854ab8c Merge branch 'prep-release-3.1.3' into develop-ascraeus 2015-01-31 00:43:20 +01:00
Joas Schilling
bb4287ab2d Merge pull request #3355 from nickvergessen/ticket/13557
[ticket/13557] Add migrations for 3.0.13 and 3.0.13-PL1
2015-01-31 00:43:04 +01:00
Joas Schilling
9628e8df3b [ticket/13557] Add migrations for 3.0.13 and 3.0.13-PL1
PHPBB3-13557
2015-01-30 22:57:15 +01:00
Andreas Fischer
2690038d40 Merge branch 'prep-release-3.1.3' into develop-ascraeus
* prep-release-3.1.3:
  [ticket/13556] Fix exception translation with filedownloader
2015-01-30 19:00:15 +01:00
Andreas Fischer
3fef570950 Merge pull request #3354 from nickvergessen/ticket/13556
[ticket/13556] Fix exception translation with filedownloader

* nickvergessen/ticket/13556:
  [ticket/13556] Fix exception translation with filedownloader
2015-01-30 19:00:15 +01:00
Joas Schilling
69450c7152 [ticket/13556] Fix exception translation with filedownloader
PHPBB3-13556
2015-01-30 18:05:13 +01:00
Joas Schilling
3e710fe393 Merge branch 'prep-release-3.1.3' into develop-ascraeus 2015-01-30 17:48:45 +01:00
Joas Schilling
e5f2eee167 Merge pull request #3341 from brunoais/ticket/13544
[ticket/13544] Fixing wrong SQL query for permission_unset() for roles
2015-01-30 17:45:21 +01:00
Andreas Fischer
899173eebd Merge branch 'develop-olympus' into develop-ascraeus
* develop-olympus:

Conflicts:
	build/build.xml
	phpBB/includes/constants.php
	phpBB/install/database_update.php
	phpBB/install/schemas/schema_data.sql
2015-01-30 13:43:05 +01:00
Andreas Fischer
7273591560 Merge branch 'prep-release-3.0.13' into develop-olympus
* prep-release-3.0.13:
  [prep-release-3.0.13] Correct changelog link to 3.0.13 changes.
  [prep-release-3.0.13] Also update version in references to files.
  [prep-release-3.0.13] Add changelog for 3.0.13-PL1 release.
  [prep-release-3.0.13] Get rid of roman numbers in CHANGELOG.html.
  [prep-release-3.0.13] Bump version numbers for 3.0.13-PL1 release.

Conflicts:
	build/build.xml
	phpBB/includes/constants.php
	phpBB/install/database_update.php
	phpBB/install/schemas/schema_data.sql
2015-01-30 13:40:44 +01:00
Andreas Fischer
c46a6443be Merge branch 'prep-release-3.1.3' into develop-ascraeus
* prep-release-3.1.3:
  [prep-release-3.0.13] Correct changelog link to 3.0.13 changes.
  [prep-release-3.0.13] Also update version in references to files.
  [prep-release-3.0.13] Add changelog for 3.0.13-PL1 release.
  [prep-release-3.0.13] Get rid of roman numbers in CHANGELOG.html.
  [prep-release-3.0.13] Bump version numbers for 3.0.13-PL1 release.
2015-01-30 13:36:20 +01:00
Andreas Fischer
b6786f8ba1 Merge branch 'prep-release-3.0.13' into prep-release-3.1.3
* prep-release-3.0.13:
  [prep-release-3.0.13] Correct changelog link to 3.0.13 changes.
  [prep-release-3.0.13] Also update version in references to files.
  [prep-release-3.0.13] Add changelog for 3.0.13-PL1 release.
  [prep-release-3.0.13] Get rid of roman numbers in CHANGELOG.html.
  [prep-release-3.0.13] Bump version numbers for 3.0.13-PL1 release.
  [ticket/13549] Do not exit when ORIG_PATH_INFO just contains SCRIPT_NAME.
  [ticket/12933] Handle case when * is last character of word
  [ticket/13554] Show feature release upgrades in blue rather than red.

Conflicts:
	build/build.xml
	phpBB/adm/style/acp_update.html
	phpBB/docs/CHANGELOG.html
	phpBB/docs/INSTALL.html
	phpBB/includes/constants.php
	phpBB/includes/startup.php
	phpBB/install/database_update.php
	phpBB/install/schemas/schema_data.sql
	tests/security/trailing_path_test.php
2015-01-30 13:34:40 +01:00
Dhruv
ab07be8157 Merge branch 'prep-release-3.1.3' into develop-ascraeus 2015-01-30 13:10:38 +05:30
Dhruv Goel
c130165bfa Merge pull request #3353 from nickvergessen/ticket/13553
[ticket/13553] Add a method to the controller helper to display a message
2015-01-30 13:09:14 +05:30
Andreas Fischer
5f237a0426 [prep-release-3.0.13] Correct changelog link to 3.0.13 changes. 2015-01-30 01:32:34 +01:00
Andreas Fischer
1e94b0ae71 [prep-release-3.0.13] Also update version in references to files. 2015-01-29 23:32:05 +01:00
Andreas Fischer
5fea945b5b [prep-release-3.0.13] Add changelog for 3.0.13-PL1 release. 2015-01-29 23:27:12 +01:00
Andreas Fischer
05d8264de6 Merge branch 'develop-olympus' into develop-ascraeus
* develop-olympus:
  [ticket/13554] Show feature release upgrades in blue rather than red.

Conflicts:
	phpBB/adm/style/acp_update.html
2015-01-29 23:21:59 +01:00
Andreas Fischer
208923563e [prep-release-3.0.13] Get rid of roman numbers in CHANGELOG.html. 2015-01-29 23:16:34 +01:00
Joas Schilling
afe99f9050 [ticket/13553] Add a method to the controller helper to display a message
PHPBB3-13553
2015-01-29 19:08:32 +01:00
Andreas Fischer
40e676ad03 [prep-release-3.0.13] Bump version numbers for 3.0.13-PL1 release. 2015-01-29 18:17:29 +01:00
Dhruv
cc210b1842 Merge remote-tracking branch 'upstream/prep-release-3.0.13' into develop-olympus 2015-01-29 11:51:33 +05:30
Dhruv Goel
36f8fb2b37 Merge pull request #3347 from bantu/ticket/13554
[ticket/13554] Show feature release upgrades in blue rather than red.
2015-01-29 11:47:37 +05:30
Andreas Fischer
5b96d30540 Merge branch 'develop-olympus' into develop-ascraeus
* develop-olympus:
  [ticket/13549] Do not exit when ORIG_PATH_INFO just contains SCRIPT_NAME.

Conflicts:
	phpBB/includes/startup.php
	tests/security/trailing_path_test.php
2015-01-29 00:09:12 +01:00
Andreas Fischer
6f5524de26 Merge branch 'prep-release-3.0.13' into develop-olympus
* prep-release-3.0.13:
  [ticket/13549] Do not exit when ORIG_PATH_INFO just contains SCRIPT_NAME.
2015-01-29 00:08:23 +01:00
Andreas Fischer
872caf805c Merge pull request #3348 from bantu/ticket/13549
[ticket/13549] Do not exit when ORIG_PATH_INFO just contains SCRIPT_NAME...

* bantu/ticket/13549:
  [ticket/13549] Do not exit when ORIG_PATH_INFO just contains SCRIPT_NAME.
2015-01-29 00:06:00 +01:00
Andreas Fischer
ef10b02f78 Merge branch 'develop-olympus' into develop-ascraeus
* develop-olympus:
  [ticket/12933] Handle case when * is last character of word
2015-01-29 00:03:31 +01:00
Andreas Fischer
f48cc8bbe9 Merge branch 'prep-release-3.0.13' into develop-olympus
* prep-release-3.0.13:
  [ticket/12933] Handle case when * is last character of word
2015-01-29 00:03:16 +01:00
Andreas Fischer
8da3a6f117 Merge pull request #3349 from bantu/ticket/12933
[ticket/12933] Handle case when * is last character of word

* bantu/ticket/12933:
  [ticket/12933] Handle case when * is last character of word
2015-01-29 00:03:05 +01:00
Andreas Fischer
f0f88c287c Merge pull request #3338 from dhruvgoel92/ticket/12933
[ticket/12933] Handle *wildcard character in native search

* dhruvgoel92/ticket/12933:
  [ticket/12933] Add test cases for * wildcard searches
  [ticket/12933] Handle case when * is last character of word
2015-01-29 00:02:41 +01:00
Marc Alexander
7495055907 [ticket/13549] Do not exit when ORIG_PATH_INFO just contains SCRIPT_NAME.
The ORIG_PATH_INFO on IIS also contains the script name. Only use that
for killing the script after removing the script name from ORIG_PATH_INFO.

PHPBB3-13549
2015-01-28 22:07:16 +01:00
Dhruv
5eb0d422c8 [ticket/12933] Handle case when * is last character of word
PHPBB3-12933
2015-01-28 21:59:58 +01:00
Andreas Fischer
dff1ea6b85 [ticket/13554] Show feature release upgrades in blue rather than red.
PHPBB3-13554
2015-01-28 21:59:03 +01:00
Andreas Fischer
e3e427fa24 Merge branch 'develop-olympus' into develop-ascraeus
* develop-olympus:
  [ticket/13414] Set Content-Length header only if status is not 304

Conflicts:
	phpBB/download/file.php
2015-01-28 19:56:47 +01:00
Andreas Fischer
9d72463824 Merge pull request #3343 from marc1706/ticket/13414
[ticket/13414] Set Content-Length header only if status is not 304

* marc1706/ticket/13414:
  [ticket/13414] Set Content-Length header only if status is not 304
2015-01-28 19:48:42 +01:00
Dhruv
35edd7a043 [ticket/12933] Add test cases for * wildcard searches
PHPBB3-12933
2015-01-28 21:46:38 +05:30
Dhruv
252018b813 Merge branch 'ticket/12933-olympus' into ticket/12933 2015-01-28 21:41:24 +05:30
Dhruv
be90e97452 [ticket/12933] Handle case when * is last character of word
PHPBB3-12933
2015-01-28 21:37:03 +05:30
Marc Alexander
a9fa20bb91 [ticket/13414] Set Content-Length header only if status is not 304
PHPBB3-13414
2015-01-28 15:50:48 +01:00
brunoais
4b16add055 [ticket/13544] Use integer case because $role_id is an int
PHPBB3-13544
2015-01-26 22:00:20 +00:00
brunoais
73d1bf9fea [ticket/13544] Fixing wrong SQL query for permission_unset for roles
PHPBB3-13544
2015-01-26 19:21:22 +00:00
Joas Schilling
b2b5addd09 [prep-release-3.1.3] Add changelog for 3.1.3-RC1 2015-01-26 20:09:46 +01:00
Joas Schilling
513b2f8296 [prep-release-3.1.3] Prepare Changelog 2015-01-26 20:00:11 +01:00
Joas Schilling
32b25d7b11 [prep-release-3.1.3] Add migration for 3.1.3-RC1 2015-01-26 19:43:36 +01:00
Joas Schilling
acfb9b9539 [prep-release-3.1.3] Update version to 3.1.2-RC1 2015-01-26 19:42:06 +01:00
Nils Adermann
1c6ebcf02b Merge branch 'develop-olympus' into develop-ascraeus
* develop-olympus:
  [prep-release-3.0.13] Bump version numbers for 3.0.13 release
  [prep-release-3.0.13] Highlight security relevant changes

Conflicts:
	build/build.xml
	phpBB/install/database_update.php
2015-01-26 19:01:34 +01:00
Nils Adermann
ebd5aace3f Merge branch 'prep-release-3.0.13' into develop-olympus
* prep-release-3.0.13:
  [prep-release-3.0.13] Bump version numbers for 3.0.13 release
  [prep-release-3.0.13] Highlight security relevant changes

Conflicts:
	build/build.xml
	phpBB/includes/constants.php
	phpBB/install/database_update.php
	phpBB/install/schemas/schema_data.sql
2015-01-26 18:57:06 +01:00
Nils Adermann
5ce89ae82f [prep-release-3.0.13] Bump version numbers for 3.0.13 release 2015-01-26 18:08:31 +01:00
Nils Adermann
4b42589cfa [prep-release-3.0.13] Highlight security relevant changes 2015-01-26 17:53:43 +01:00
Andreas Fischer
ffbe8cdc96 Merge branch 'develop-olympus' into develop-ascraeus
* develop-olympus:
  [ticket/12089] Add assert message on HTTP status code check
2015-01-26 02:47:38 +01:00
Andreas Fischer
4c11ea97d5 Merge pull request #3339 from nickvergessen/ticket/12089
[ticket/12089] Add assert message on HTTP status code check

* nickvergessen/ticket/12089:
  [ticket/12089] Add assert message on HTTP status code check
2015-01-26 02:47:36 +01:00
Joas Schilling
ed2d080551 [ticket/12089] Add assert message on HTTP status code check
PHPBB3-12089
2015-01-25 23:06:56 +01:00
kasimi
33d7eb69ef [ticket/13540] Added var row to both events
PHPBB3-13540
2015-01-25 13:01:02 +01:00
Marc Alexander
a2fbde44c0 Merge pull request #3336 from nickvergessen/ticket/13543
Ticket/13543
2015-01-24 21:52:56 +01:00
Joas Schilling
b2674cf1f6 [ticket/13543] Fix broken slow test
PHPBB3-13543
2015-01-24 21:10:53 +01:00
Joas Schilling
c423038587 [ticket/13543] Add slow tests to travis matrix
PHPBB3-13543
2015-01-24 21:10:35 +01:00
paulsohier
0cfa977953 [ticket/13542] Added sentenence of what is changed in the event
PHPBB3-13542
2015-01-24 20:26:51 +01:00
kasimi
12fba95892 [ticket/13540] Add core event for MCP topic review block data
Similar to the previous event, this event triggers for each post in the
MCP topic review.

PHPBB3-13540
2015-01-24 19:41:27 +01:00
paulsohier
c86e5e8514 [ticket/13542] Merge result of validation into existing $error
Because extensions can set a entry in $error, the result of the validate
needs to be merged into it.

PHPBB3-13542
2015-01-24 19:04:26 +01:00
paulsohier
b0383a90e1 [ticket/13542] Update core.ucp_prefs_personal_data to include $error
Update the event so extensions will be able to validate (and deny) changes.

PHPBB3-13542
2015-01-24 18:53:33 +01:00
Marc Alexander
a5c65449de [ticket/13538] Add tests for double nested pagination loop
PHPBB3-13538
2015-01-24 14:35:49 +01:00
Marc Alexander
ee03b4f1ef [ticket/13538] Fix tests for pagination in nested loop
PHPBB3-13538
2015-01-24 14:27:04 +01:00
Marc Alexander
874f3584e2 [ticket/13522] Remove unused variables and unexpected returns
PHPBB3-13522
2015-01-24 13:40:42 +01:00
Marc Alexander
9a03b3aab6 [ticket/13522] Remove empty answers from possible answers in Q&A
PHPBB3-13522
2015-01-24 13:09:00 +01:00
kasimi
a35fbdb3e9 [ticket/13540] Updated @since version to 3.4.1-RC1, fixed @var indentations
PHPBB3-13540
2015-01-24 12:23:10 +01:00
kasimi
40798ae616 [ticket/13540] Add core event for modifying topic review block data
Added event core.topic_review_modify_row in function topic_review() in
functions_posting for modifying template data blocks for topic reviews.

PHPBB3-13540
2015-01-24 02:09:29 +01:00
Joas Schilling
9cdbb69f9e Merge pull request #3321 from marc1706/ticket/13282
[ticket/13282] Use 0 as default for integer type columns in postgresql
2015-01-23 17:32:28 +01:00
Wolfsblvt
8a0c227bf9 [ticket/13537] Add core events on mcp_queue for approval and disapproval
Events added for the functions approve_posts(), approve_topics()
and disapprove_posts() in mcp_queue.php, so that you can send notifications
during approval and disapproval.

PHPBB3-13537
2015-01-23 13:01:34 +01:00
Wolfsblvt
b88b8305fd [ticket/13518] Add core event to markread() in functions.php
Adding core event core.markread_before to to funtion markread()
in functions.php, so that you now are able to add additional
stuff inside the markread process, for example notifications designed
in extensions.

PHPBB3-13518
2015-01-23 12:53:46 +01:00
Wolfsblvt
1dce9576e9 [ticket/13532] Add core event to get_unread_topics() in functions.php
Adding core event core.get_unread_topics_modify_sql to to funtion
get_unread_topics() in functions.php, so that you now are able to modify
the sql query that retrieves the unread topics.

PHPBB3-13532
2015-01-23 12:48:57 +01:00
Marc Alexander
7014d824f0 [ticket/13538] Add test for pagination in nested loop
PHPBB3-13538
2015-01-23 11:48:05 +01:00
rxu
25b013f781 [ticket/13336] Add core events to the function user_active_flip()
Add core events to the function user_active_flip() in
includes/functions_user.php to allow checking/modifying data while
activating/deactivating users.

PHPBB3-13336
2015-01-23 08:20:00 +07:00
Marc Alexander
eb4594d8ee [ticket/13282] Add unit test for adding integer column with default null
PHPBB3-13282
2015-01-22 23:17:59 +01:00
rxu
be1b114114 [ticket/13536] Add core events to allow modifying user profile data on editing
Event request: http://area51.phpbb.com/phpBB/viewtopic.php?f=111&t=33744

PHPBB3-13536
2015-01-23 00:35:02 +07:00
rxu
e08cd70a89 [ticket/13535] Add core event to allow modifying account settings on editing
Add ucp_profile.php core event to allow modifying account settings on editing.

PHPBB3-13535
2015-01-22 23:10:05 +07:00
Nils Adermann
40ab75478e Merge pull request #3173 from Nicofuma/ticket/13361
[ticket/13361] Improve the exception listener
2015-01-22 16:16:21 +01:00
Marc Alexander
47f04d7620 [ticket/13282] Add functional tests for adding profilefields
PHPBB3-13282
2015-01-22 10:30:24 +01:00
Marc Alexander
816465bfe9 [ticket/13282] Use strpos() instead of preg_match()
PHPBB3-13282
2015-01-22 10:11:08 +01:00
Marc Alexander
1367fc234f [ticket/13282] Use 0 as default for integer type columns in postgresql
PHPBB3-13282
2015-01-22 00:06:48 +01:00
Andreas Fischer
a737eeb6ce Merge pull request #3320 from marc1706/ticket/13534
[ticket/13534] Set imagick path to empty string to prevent failing path ...

* marc1706/ticket/13534:
  [ticket/13534] Set imagick path to empty string to prevent failing path check
2015-01-21 16:59:26 +01:00
Andreas Fischer
7ed065a630 Merge branch 'develop-olympus' into develop-ascraeus
* develop-olympus:
  [develop-olympus] Increment version number to 3.0.14-dev.
  [develop-olympus] Add changelog for 3.0.13 release.
  [develop-olympus] Bump version numbers for 3.0.13-RC1 release.
  [develop-olympus] Bumping version numbers to final for 3.0.13 releases.

Conflicts:
	build/build.xml
	phpBB/docs/CHANGELOG.html
	phpBB/docs/INSTALL.html
	phpBB/includes/constants.php
	phpBB/install/convertors/convert_phpbb20.php
	phpBB/install/database_update.php
	phpBB/install/schemas/schema_data.sql
	phpBB/styles/prosilver/imageset/imageset.cfg
	phpBB/styles/prosilver/style.cfg
	phpBB/styles/prosilver/template/template.cfg
	phpBB/styles/prosilver/theme/theme.cfg
	phpBB/styles/subsilver2/imageset/imageset.cfg
	phpBB/styles/subsilver2/style.cfg
	phpBB/styles/subsilver2/template/template.cfg
	phpBB/styles/subsilver2/theme/theme.cfg
2015-01-21 16:07:12 +01:00
Marc Alexander
7d6fdcfaa5 [ticket/13534] Set imagick path to empty string to prevent failing path check
The imagick path defaults to /usr/bin. If it doesn't exist for some reason,
for example on travis, the form won't be submitted and the settings won't be
changed.

PHPBB3-13534
2015-01-21 15:18:25 +01:00
Andreas Fischer
14585fcb4f [develop-olympus] Increment version number to 3.0.14-dev. 2015-01-21 15:15:30 +01:00
Tristan Darricau
7fef91afd2 [ticket/13361] Rename exception to runtime_exception
PHPBB3-13361
2015-01-21 08:41:02 +01:00
Andreas Fischer
2c9e178a42 [develop-olympus] Add changelog for 3.0.13 release. 2015-01-21 01:45:23 +01:00
Andreas Fischer
9f7f366573 [develop-olympus] Bump version numbers for 3.0.13-RC1 release. 2015-01-21 01:32:18 +01:00
Andreas Fischer
c09023d1db [develop-olympus] Bumping version numbers to final for 3.0.13 releases. 2015-01-21 01:25:50 +01:00
Nils Adermann
ddeb696b25 Merge branch 'develop-olympus' into develop-ascraeus
* develop-olympus:
  [ticket/13531] Send 404 Not Found.
  [ticket/13531] Explicitly disallow trailing paths (e.g. PATH_INFO).
2015-01-21 01:07:30 +01:00
Nils Adermann
eaeb88133f Merge pull request #3316 from bantu/ticket/13531
[ticket/13531] Explicitly disallow trailing paths (e.g. PATH_INFO).
2015-01-21 01:05:13 +01:00
Andreas Fischer
e34b92882a [ticket/13531] Send 404 Not Found.
PHPBB3-13531
2015-01-21 01:02:16 +01:00
Marc Alexander
4b9434bf1b [ticket/13531] Explicitly disallow trailing paths (e.g. PATH_INFO).
PHPBB3-13531
2015-01-21 01:02:08 +01:00
Tristan Darricau
08e186af8e Merge pull request #3314 from VSEphpbb/ticket/13133
[ticket/13133] Fix variable name in set_custom_style()

* VSEphpbb/ticket/13133:
  [ticket/13133] Fix variable name in set_custom_style()
2015-01-20 23:47:44 +01:00
Tristan Darricau
f6057c5eab Merge pull request #3315 from nickvergessen/ticket/13530
[ticket/13530] Fix undefined variables

* nickvergessen/ticket/13530:
  [ticket/13530] Fix undefined variables
2015-01-20 23:43:57 +01:00
Joas Schilling
ed6b8f84ad [ticket/13530] Fix undefined variables
PHPBB3-13530
2015-01-20 23:36:45 +01:00
Tristan Darricau
9334100cb3 Merge pull request #3313 from nickvergessen/ticket/13528
[ticket/13528] Return correct translation instead of is_set()

* nickvergessen/ticket/13528:
  [ticket/13528] Return correct translation instead of is_set()
2015-01-20 23:36:23 +01:00
Joas Schilling
a5fae1b1f0 Merge pull request #3293 from Nicofuma/ticket/13489
[ticket/13489] Disable the event dispatcher in the migrator
2015-01-20 23:27:54 +01:00
Matt Friedman
41966c481f [ticket/13133] Fix variable name in set_custom_style()
PHPBB3-13133
2015-01-20 14:21:02 -08:00
Andreas Fischer
d0e5c0a187 Merge branch 'develop-olympus' into develop-ascraeus
* develop-olympus:
  [ticket/13527] Apply htmlspecialchars() to data from version server.
  [ticket/13527] Remove two unused variables.

Conflicts:
	phpBB/includes/acp/acp_update.php
2015-01-20 23:15:21 +01:00
Andreas Fischer
d17904884e Merge pull request #3312 from bantu/ticket/13527
[ticket/13527] Escape information received from version server

* bantu/ticket/13527:
  [ticket/13527] Apply htmlspecialchars() to data from version server.
  [ticket/13527] Remove two unused variables.
2015-01-20 23:14:38 +01:00
Andreas Fischer
6e00529f36 Merge branch 'develop-olympus' into develop-ascraeus
* develop-olympus:
  [ticket/13526] Correctly validate the ucp_pm_options form key.
2015-01-20 23:12:53 +01:00
Andreas Fischer
a8027c542f Merge pull request #3311 from bantu/ticket/13526
[ticket/13526] Correctly validate the ucp_pm_options form key.

* bantu/ticket/13526:
  [ticket/13526] Correctly validate the ucp_pm_options form key.
2015-01-20 23:12:00 +01:00
Andreas Fischer
4d0b04a397 Merge branch 'develop-olympus' into develop-ascraeus
* develop-olympus:
  [ticket/13519] Correctly validate imagick path as path and not string

Conflicts:
	phpBB/includes/acp/acp_attachments.php
2015-01-20 23:11:29 +01:00
Andreas Fischer
3134b6b70e Merge pull request #3306 from marc1706/ticket/13519
[ticket/13519] Correctly validate imagick path as path and not string

* marc1706/ticket/13519:
  [ticket/13519] Correctly validate imagick path as path and not string
2015-01-20 23:10:19 +01:00
Joas Schilling
d1bff80dd1 [ticket/13528] Return correct translation instead of is_set()
PHPBB3-13528
2015-01-20 22:56:33 +01:00
Joas Schilling
f02dc44a23 Merge pull request #3138 from prototech/ticket/12642
[ticket/12642] Ensure CPF type specific options are set when editing booleans.
2015-01-20 22:46:08 +01:00
Andreas Fischer
92b5222295 [ticket/13527] Apply htmlspecialchars() to data from version server.
PHPBB3-13527
2015-01-20 22:40:39 +01:00
Andreas Fischer
251868dd7e [ticket/13527] Remove two unused variables.
PHPBB3-13527
2015-01-20 22:34:14 +01:00
Joas Schilling
23069a13e2 [ticket/13526] Correctly validate the ucp_pm_options form key.
PHPBB3-13526
2015-01-20 22:16:24 +01:00
Joas Schilling
40006376f2 Merge pull request #3226 from prototech/ticket/13420
[ticket/13420] Correctly filter by lt/gt/equal to 0 posts when pruning users.
2015-01-20 20:58:12 +01:00
Joas Schilling
e66a28eb14 Merge branch 'develop-olympus' into develop-ascraeus
Conflicts:
	.travis.yml
2015-01-20 20:49:45 +01:00
Joas Schilling
03e3ee7f16 Merge pull request #3310 from bantu/ticket/13523
[ticket/13523] Install PHPUnit manually instead of from PEAR.
2015-01-20 20:47:36 +01:00
Andreas Fischer
0beb9128f9 [ticket/13523] Install PHPUnit manually instead of from PEAR.
The pear.phpunit.de channel has been shut down in 2014.

PHPBB3-13523
2015-01-20 20:31:08 +01:00
Joas Schilling
d99cd2d02e Merge pull request #3278 from rxu/ticket/13492
[ticket/13492] Fix IDN support for custom BBCode URL tokens
2015-01-20 17:31:06 +01:00
Tristan Darricau
dab0728357 [ticket/13489] Fix service configuration
PHPBB3-13489
2015-01-20 14:19:55 +01:00
rxu
8002af7526 [ticket/13492] Add the migration to update custom bbcodes with IDN regexps
Also fix the $utf8 checking regexp removing the curly braces.

PHPBB3-13492
2015-01-20 08:47:56 +07:00
Andreas Fischer
38c5ee6eec Merge pull request #3308 from nickvergessen/ticket/13504
[ticket/13504] Fix invalid variable $user

* nickvergessen/ticket/13504:
  [ticket/13504] Fix invalid variable $user
2015-01-19 23:23:57 +01:00
Nils Adermann
e4a041fedb Merge branch 'develop-olympus' into develop-ascraeus
* develop-olympus:
  [ticket/10985] Add fix to properly inherit style during update process

Conflicts:
	phpBB/includes/bbcode.php
2015-01-19 22:29:38 +01:00
Nils Adermann
ebbe6a7791 Merge pull request #2990 from Senky/ticket/10985
[ticket/10985] Error bbcode.html not found when updating with custom style inheriting from prosilver
2015-01-19 22:27:14 +01:00
Joas Schilling
7e8bb68999 [ticket/13504] Fix invalid variable $user
PHPBB3-13504
2015-01-19 21:42:22 +01:00
Joas Schilling
ff39ffacf6 Merge pull request #3296 from PayBas/ticket/13431
[ticket/13431] Fix responsive RTL media queries for <IE11
2015-01-19 21:37:14 +01:00
Joas Schilling
c29db8e7a4 Merge pull request #3294 from PayBas/ticket/13507
[ticket/13507] Fix horizontal scrollbar for large images in posts
2015-01-19 21:13:41 +01:00
Marc Alexander
6564446b0f [ticket/13519] Correctly validate imagick path as path and not string
PHPBB3-13519
2015-01-19 20:47:47 +01:00
Tristan Darricau
add3d3e760 Merge pull request #3055 from marc1706/ticket/13192
[ticket/13192] Add method for generating valid user page links based on mod_rewrite

* marc1706/ticket/13192:
  [ticket/13192] Add test for app.php in external subfolder
  [ticket/13192] Use ltrim() instead of preg_replace()
  [ticket/13192] Order test cases consistently
  [ticket/13192] Remove app.php on mod rewrite even if app.php is outside root
  [ticket/13192] Pass correct parameters and rename method to get_valid_page
  [ticket/13192] Use get_valid_user_page in confirm_box() and cleanup globals
  [ticket/13192] Use get_valid_user_page method in build_url function
  [ticket/13192] Add method for generating valid user page links
2015-01-19 16:45:43 +01:00
Marc Alexander
da189a105b [ticket/13192] Add test for app.php in external subfolder
PHPBB3-13192
2015-01-19 16:10:32 +01:00
rxu
10c67fe12a [ticket/13512] Add template events before/after the post details
Add template events to viewtopic_body.html to allow extensions adding content
before/after the post details.

PHPBB3-13512
2015-01-17 16:40:09 +07:00
Andreas Fischer
9d2c6b6ed6 Merge pull request #3299 from Nicofuma/ticket/13511
[ticket/13511] Call the check() method with the phpcsFile object

* Nicofuma/ticket/13511:
  [ticket/13511] Call the check() method with the phpcsFile object
2015-01-17 01:20:40 +01:00
Tristan Darricau
6b92fccd06 [ticket/13511] Call the check() method with the phpcsFile object
PHPBB3-13511
2015-01-17 00:09:06 +01:00
PayBas
4e5e356555 [ticket/13431] Fix responsive RTL media queries for <IE11
PHPBB3-13431
2015-01-16 19:25:45 +01:00
PayBas
9e38e9dc6f [ticket/13507] Fix horizontal scrollbar for large images in posts
PHPBB3-13507
2015-01-16 19:10:04 +01:00
Oliver Schramm
c6557e3800 [ticket/13313] Update version in @since tag of event
PHPBB3-13313
2015-01-15 22:08:10 +01:00
Tristan Darricau
ce47170c29 [ticket/13489] Update migrations
PHPBB3-13489
2015-01-14 12:16:24 +01:00
Tristan Darricau
4df125625c [ticket/13489] Fix tests
PHPBB3-13489
2015-01-14 12:04:30 +01:00
Tristan Darricau
8ef238ea73 [ticket/13361] Fix the JsonResponse in the exception listener
PHPBB3-13361
2015-01-14 11:13:28 +01:00
Tristan Darricau
c99ed64473 [ticket/13489] Disable the event dispatcher in the migrator
PHPBB3-13489
2015-01-14 11:09:44 +01:00
Joas Schilling
e3e16a0166 Merge pull request #3234 from brunoais/ticket/13154
[ticket/13154] Event to edit user list for notification in notifications
2015-01-13 23:31:28 +01:00
Joas Schilling
2a08c60a62 Merge pull request #3233 from brunoais/ticket/13160
[ticket/13160] Viewtopic; before viewing permissions event
2015-01-13 23:27:30 +01:00
Joas Schilling
b27c0ab992 Merge pull request #3283 from Elsensee/ticket/13490
[ticket/13490] Allow multibyte characters in edit reason
2015-01-12 23:56:35 +01:00
Oliver Schramm
3bfd87cda4 [ticket/13313] Add event core.acp_email_display
PHPBB3-13313
2015-01-11 20:55:00 +01:00
Oliver Schramm
53169b1303 [ticket/13469] Fall back to soft_delete if no permissions for delete
PHPBB3-13469
2015-01-11 20:46:32 +01:00
brunoais
1d49ccd920 [ticket/13160] New line before comment block
PHPBB3-13160
2015-01-11 19:12:08 +00:00
Oliver Schramm
f075fb78f6 [ticket/13490] Allow multibyte characters in edit reason
PHPBB3-13490
2015-01-11 19:29:33 +01:00
rxu
17f4dce0fc [ticket/13492] Add IDN support for custom BBCode URL tokens
Custom BBCode URL tokens does not support IDN.
Custom BBCodes added earlier than IDN has been applied are unaffected.

PHPBB3-13492
2015-01-11 20:36:22 +07:00
Tristan Darricau
1f4bb2c149 [ticket/13361] Add tests
PHPBB3-13361
2015-01-11 11:28:45 +01:00
Dhruv Goel
e8464d7fe2 Merge pull request #3276 from nickvergessen/ticket/13272
[ticket/13272] Add vendor/ folder to "changed files" package
2015-01-11 15:42:58 +05:30
Dhruv Goel
fbf7726642 Merge pull request #3176 from Senky/ticket/13346
[ticket/13346] Fix indentation, spacing and missing divs
2015-01-11 14:42:40 +05:30
Dhruv
ff59240748 [ticket/13472] Delete admin activation notification when deleting user
PHPBB3-13472
2015-01-11 14:09:59 +05:30
Joas Schilling
bfba52781b Merge pull request #3210 from brunoais/ticket/13147
[ticket/13147] Change get_global_visibility_sql()'s results
2015-01-10 22:00:07 +01:00
Joas Schilling
659e15656f [ticket/13272] Add vendor/ folder to "changed files" package
PHPBB3-13272
2015-01-10 21:17:16 +01:00
Jakub Senko
10e72a36a3 [ticket/13346] Remove unnecessary divs
PHPBB3-13346
2015-01-10 21:05:30 +01:00
brunoais
e0733ae435 [ticket/13147] New line before comment block
PHPBB3-13147
2015-01-10 17:15:54 +00:00
brunoais
ef9abd7165 [ticket/13147] Override variable name changed by request
PHPBB3-13147
2015-01-10 17:15:22 +00:00
brunoais
9cc4d60b88 [ticket/13146] Remove empty line
PHPBB3-13146
2015-01-10 17:08:46 +00:00
brunoais
ec749a2b39 [ticket/13146] "Make it" -> "Set it to"
PHPBB3-13146
2015-01-10 17:08:46 +00:00
brunoais
6d3fca9a41 [ticket/13146] Forced line feed on long line
PHPBB3-13146
2015-01-10 17:08:45 +00:00
brunoais
9cbb9b4253 [ticket/13146] Fixed wrong tab + space into only tab
PHPBB3-13146
2015-01-10 17:08:44 +00:00
brunoais
fce1be2684 [ticket/13160] Appending "_check" to override variable names
PHPBB3-13160
2015-01-10 17:08:43 +00:00
brunoais
f02e3a4076 [ticket/13160] lowercase null
PHPBB3-13160
2015-01-10 17:08:43 +00:00
brunoais
3d8aaf6aaf [ticket/13160] Wrong variable types fixed
PHPBB3-13160
2015-01-10 17:08:42 +00:00
brunoais
ffb7d618ac [ticket/13160] Removed an unwanted tab char.
PHPBB3-13160
2015-01-10 17:08:41 +00:00
brunoais
11269fe62a [ticket/13160] Allow override topic_tracking_info
PHPBB3-13160
2015-01-10 17:08:40 +00:00
brunoais
a5a6855a0d [ticket/13160] Allow override f_read and forum password
Adds a couple of variables to the event that allows  extension authors to
bypass the f_read and forum password checks as if the user had those permissions
whether or not he actually has them.

PHPBB3-13160
2015-01-10 17:08:40 +00:00
brunoais
a0287a62c1 [ticket/13160] Viewtopic; before viewing permissions event
An event before the f_Read permissions check in viewtopic

PHPBB3-13160
2015-01-10 17:08:39 +00:00
brunoais
2b76d7dc7c [ticket/13154] Don't assign dispatcher to a variable. Just the obj param.
PHPBB3-13154
2015-01-10 17:06:51 +00:00
Tristan Darricau
74e8f9bd4e [ticket/13361] Support ajax request (send a json response)
PHPBB3-13361
2015-01-10 17:14:14 +01:00
Marc Alexander
a415a4ec2b Merge pull request #3274 from nickvergessen/ticket/13486
[ticket/13486] Fix typo in method name
2015-01-10 16:25:27 +01:00
Joas Schilling
f756632185 [ticket/13486] Fix typo in method name
PHPBB3-13486
2015-01-10 15:14:58 +01:00
Marc Alexander
c28ef9afdd Merge pull request #3195 from nickvergessen/ticket/13238-asc
[ticket/13238] Do not drop indexes that do not exist from fulltext search
2015-01-10 13:17:59 +01:00
Marc Alexander
ba477f77c7 Merge pull request #3272 from nickvergessen/ticket/13307
[ticket/13307] Update mysql_upgrader.php to work without the schema_data...
2015-01-10 13:06:46 +01:00
brunoais
8ed5a047ec [ticket/13147] Wrong extra new line
PHPBB3-13147
2015-01-10 11:48:01 +00:00
Marc Alexander
e6509aaf60 [ticket/13192] Use ltrim() instead of preg_replace()
PHPBB3-13192
2015-01-10 12:46:40 +01:00
brunoais
9caec668af [ticket/13147] Renaming content_replaced->get_global_visibility_sql_overwrite
Renamed content_replaced to get_global_visibility_sql_overwrite in order to
follow the convention in other events' variables that have the same basic
function

PHPBB3-13147
2015-01-10 11:44:55 +00:00
brunoais
a09c38f1cc [ticket/13147] Removing globals and using injection
Using globals is NG. Using a parameter instead.

PHPBB3-13147
2015-01-10 11:44:54 +00:00
brunoais
0f6a0d820e [ticket/13147] Using $phpbb_dispatcher global var
PHPBB3-13147
2015-01-10 11:44:54 +00:00
brunoais
8f5e3d5efb [ticket/13147] Allow changing the result of calling get_global_visibility_sql
PHPBB3-13147
2015-01-10 11:44:52 +00:00
Marc Alexander
67c987f0d0 Merge pull request #3166 from nickvergessen/Senky-ticket/12866
[ticket/12866] Wrong profile field validation options
2015-01-10 12:36:49 +01:00
Joas Schilling
bf59d8dd74 Merge pull request #3209 from brunoais/ticket/13146
[ticket/13146] Allow changing the result of calling get_forums_visibility_sql
2015-01-10 12:29:48 +01:00
brunoais
cea35c486c [ticket/13146] Removed stray empty line
PHPBB3-13146
2015-01-10 09:55:43 +00:00
brunoais
b64d8c59b0 [ticket/13146] dispatcher, not phpbb_dispatcher
PHPBB3-13146
2015-01-10 09:18:03 +00:00
brunoais
349aaab6ac [ticket/13146] Even more missing phpbb_mock_event_dispatcher()
PHPBB3-13146
2015-01-10 08:32:22 +00:00
brunoais
da9ac2da72 [ticket/13146] Last missing phpbb_mock_event_dispatcher()
Thank you nickvergessen

PHPBB3-13146
2015-01-10 08:11:51 +00:00
Joas Schilling
8ae1b0c52e Merge pull request #3189 from rxu/ticket/12926
[ticket/12926] Support for IDN (IRI)
2015-01-10 00:09:57 +01:00
Joas Schilling
58d8ea5b0b Merge pull request #3265 from tas2580/develop-ascraeus
[ticket/13453] Sort param in Canonical URL
2015-01-09 21:41:19 +01:00
rxu
d86bdcb2a7 [ticket/12926] Get rid of the $scheme and $inline vars, fix regex_idn.php
Get rid of the $scheme and $inline vars, fix regex_idn.php to generate
both common and inline mode regexes all at once.

PHPBB3-12926
2015-01-10 03:21:36 +07:00
Joas Schilling
d2a4d6624f [ticket/13307] Update mysql_upgrader.php to work without the schema_data.php
The file has been delete quite some time ago.

PHPBB3-13307
2015-01-09 19:46:14 +01:00
Joas Schilling
d9bdd05c80 Merge pull request #3128 from omniError/ticket/13306
[ticket/13306] add error level to collector
2015-01-09 18:39:11 +01:00
Joas Schilling
3350df131f Merge pull request #3227 from prototech/ticket/13366
[ticket/13366] Ensure plupload_last_gc config entry is dynamic.
2015-01-09 18:11:41 +01:00
Joas Schilling
9ce8b62894 Merge pull request #3242 from lavigor/ticket/13442
[ticket/13442] UTF-8 symbols for database host
2015-01-09 18:07:00 +01:00
Joas Schilling
65ffc76e2f Merge pull request #3258 from marc1706/ticket/13385
[ticket/13385] Free result in \phpbb\config\db::set_atomic()
2015-01-09 18:03:21 +01:00
Joas Schilling
b64da23fe1 Merge pull request #3267 from Elsensee/ticket/13478
[ticket/13478] Add event core.bbcode_cache_init_end
2015-01-09 17:47:46 +01:00
Joas Schilling
67c9f4d064 Merge pull request #3268 from Elsensee/ticket/13470
[ticket/13470] Fix non-empty username array if no usernames are given
2015-01-09 17:41:42 +01:00
Joas Schilling
d4c078cc78 Merge pull request #3271 from marc1706/ticket/13432
[ticket/13432] Make sure to add language file when including acp_modules
2015-01-09 17:36:07 +01:00
Marc Alexander
9d9c57f334 [ticket/13432] Make sure to add language file when including acp_modules
PHPBB3-13432
2015-01-09 13:47:36 +01:00
Marc Alexander
38f184ad6b [ticket/13385] Remove unneeded $result in \phpbb\config\db::set_atomic()
PHPBB3-13385
2015-01-09 13:41:36 +01:00
Marc Alexander
7ba1a96427 [ticket/13192] Order test cases consistently
PHPBB3-13192
2015-01-09 13:38:52 +01:00
Oliver Schramm
e3571fc6eb [ticket/13470] Fix non-empty username array if no usernames are given
PHPBB3-13470
2015-01-08 22:17:05 +01:00
Oliver Schramm
953a98dc0b [ticket/13478] Add event core.bbcode_cache_init_end
PHPBB3-13478
2015-01-08 00:13:58 +01:00
Tobi Schäfer
de3d7aca16 [ticket/13453] Sort param in Canonical URL
PHPBB3-13453
2015-01-06 15:31:27 +01:00
brunoais
346f654b2e [ticket/13146] Use the correct phpbb_mock_event_dispatcher, instead of builder
PHPBB3-13146
2015-01-06 12:58:01 +00:00
Joas Schilling
87578e90eb Merge pull request #3262 from Elsensee/ticket/13466
[ticket/13466] Add bitfield and uid to event core.message_parser_check_message
2015-01-06 11:29:11 +01:00
Joas Schilling
874356e57f Merge pull request #3243 from kinerity/ticket/13437
[ticket/13437] Add template event viewtopic_body_post_author_before/after
2015-01-06 11:24:25 +01:00
Joas Schilling
26bf79425c Merge pull request #3231 from rxu/ticket/13435
[ticket/13435] Add core event to modify submit_post() sql data
2015-01-06 11:08:01 +01:00
Joas Schilling
d36b0452bd Merge pull request #3230 from omniError/ticket/13430
[ticket/13430] Add event core.prune_sql
2015-01-06 11:05:08 +01:00
Joas Schilling
64d880a15c Merge branch 'Wolfsblvt-ticket/13428' into develop-ascraeus 2015-01-06 11:01:40 +01:00
Wolfsblvt
387e4b942b [ticket/13428] Add core events to memberlist.php for teampage
PHPBB3-13428
2015-01-06 11:01:18 +01:00
Joas Schilling
6fd8f1b835 Merge pull request #3221 from MasterShredder/ticket/13422
[ticket/13422] New events for save custom cookies and set custom ban type
2015-01-06 10:48:14 +01:00
Joas Schilling
2dab3c8c52 Merge pull request #3211 from brunoais/ticket/13148
[ticket/13148] Creating a final way to modify edit logs output
2015-01-06 10:25:10 +01:00
Joas Schilling
35b7f94754 Merge pull request #3070 from brunoais/ticket/13141
[Event] Allow applying additional permissions to MCP access besides f_read
2015-01-06 10:04:51 +01:00
Oliver Schramm
2532583765 [ticket/13466] Add bitfield and uid to event core.message_parser_check_message
PHPBB3-13466
2015-01-05 22:15:56 +01:00
Joas Schilling
7a34bf9bf5 Merge pull request #3244 from rxu/ticket/13449
[ticket/13449] Add viewforum event after the topic's been assigned to template
2015-01-05 20:39:58 +01:00
Marc Alexander
281cc53532 [ticket/13192] Remove app.php on mod rewrite even if app.php is outside root
PHPBB3-13192
2015-01-04 17:41:02 +01:00
Marc Alexander
3638b2ff64 Merge pull request #3254 from VSEphpbb/ticket/13440
[ticket/13440] Update event version to 3.1.3-RC1
2015-01-04 12:21:09 +01:00
Marc Alexander
8c27c7f10b Merge pull request #3253 from VSEphpbb/ticket/13439
[ticket/13439] Update event version to 3.1.3-RC1
2015-01-04 11:25:43 +01:00
Matt Friedman
88034ea2f0 [ticket/13440] Update event version to 3.1.3-RC1
PHPBB3-13440
2015-01-04 01:40:18 -08:00
Matt Friedman
86f66b5f72 [ticket/13439] Update event version to 3.1.3-RC1
PHPBB3-13439
2015-01-04 01:38:50 -08:00
Marc Alexander
838b1250f6 Merge pull request #3249 from VSEphpbb/ticket/13440
[ticket/13440] Add event core.login_box_failed
2015-01-04 00:43:11 +01:00
Marc Alexander
4da3d41083 Merge pull request #3248 from VSEphpbb/ticket/13439
[ticket/13439] Add event core.acp_users_overview_before
2015-01-04 00:25:20 +01:00
Matt Friedman
9d9b8139d0 [ticket/13440] Add event core.login_box_failed
PHPBB3-13440
2015-01-03 15:23:50 -08:00
Matt Friedman
179a7a4c71 [ticket/13439] Add event core.acp_users_overview_before
PHPBB3-13439
2015-01-03 15:21:47 -08:00
rxu
970ed40b09 [ticket/13449] Add viewforum event after the topic's been assigned to template
PHPBB3-13449
2015-01-03 20:12:47 +07:00
Gaëtan Muller
0e0c649477 [ticket/13441] Functions_convert fails to set global moderators default group
PHPBB3-13441
2015-01-03 13:45:52 +01:00
brunoais
b3bcc1b501 [ticket/13146] Missing delete post test mock
PHPBB3-13146
2015-01-02 19:26:05 +00:00
Kailey Truscott
652a7630bb [ticket/13437] Change "View" to "view"
PHPBB3-13437
2015-01-02 10:38:56 -05:00
Kailey Truscott
7dad863a41 Fix events.md event name
PHPBB3-13437
2015-01-02 10:20:36 -05:00
Kailey Truscott
c61fa1aaa1 [ticket/13437] Add template event viewtopic_body_post_author_before/after
PHPBB3-13437
2015-01-02 10:00:01 -05:00
brunoais
8376a027a1 [ticket/13146] Setup mocks for tests with dispatcher
PHPBB3-13146
2015-01-02 11:46:03 +00:00
lavigor
d769e59090 [ticket/13442] UTF-8 symbols for database host
Added support for cyrillic domains as database hosts.

PHPBB3-13442
2015-01-02 14:21:05 +03:00
brunoais
abc5dbcd71 [ticket/13146] Realign variables and descriptions in event
PHPBB3-13146
2014-12-29 08:42:13 +00:00
brunoais
59ab09273f [ticket/13146] Improved $get_forums_visibility_sql_overwrite's clarity
PHPBB3-13146
2014-12-29 08:40:23 +00:00
brunoais
92d7c16782 [ticket/13148] Wrong version num; copy & paste fail
PHPBB3-13148
2014-12-29 08:23:31 +00:00
brunoais
0104188074 [ticket/13148] Fixed my error
PHPBB3-13148
2014-12-28 20:35:16 +00:00
brunoais
d455dd68f6 [ticket/13148] Fixed syntax error
PHPBB3-13148
2014-12-28 20:25:36 +00:00
brunoais
cf036ea0e8 [ticket/13148] Added more variables as requested
Added more variables as requested and some extra that may be of use.

PHPBB3-13148
2014-12-28 19:52:58 +00:00
MasterShredder
655d95002c [ticket/13422] Renamed event
PHPBB3-13422
2014-12-28 13:20:04 +04:00
MasterShredder
0a1f8388d0 [ticket/13422] Changed some spaces to tabs
PHPBB3-13422
2014-12-28 03:44:07 +04:00
MasterShredder
3f88be6527 [ticket/13422] Changed variable descriptions
PHPBB3-13422
2014-12-28 03:35:21 +04:00
MasterShredder
50ed202aac [ticket/13422] Renamed "continue" variable to "retain_cookie" for the event core.ucp_save_custom_cookies
PHPBB3-13422
2014-12-27 17:43:30 +04:00
Joas Schilling
a92589436a Merge pull request #3213 from brunoais/ticket/13158
[ticket/13158] Allow adding extra auth checks when the user is posting
2014-12-27 14:22:48 +01:00
Joas Schilling
b0f1a0f4bb Merge pull request #3229 from n-aleha/ticket/13098
[ticket/13098] Repair Yahoo contact field
2014-12-27 14:16:55 +01:00
Joas Schilling
6ff0aaaa70 Merge pull request #3225 from prototech/ticket/13302
[ticket/13302] Fix incorrect links to phpBB.com resources
2014-12-27 14:12:23 +01:00
Joas Schilling
ffbe1d424b Merge pull request #3224 from prototech/ticket/13427
[ticket/13427] Add several before/after template events to mcp_front.html
2014-12-27 14:08:51 +01:00
Joas Schilling
a5922a0e8b Merge pull request #3223 from prototech/ticket/13370
[ticket/13370] Allow calling class method in convertor framework directly
2014-12-27 14:07:37 +01:00
Joas Schilling
fa06c7967e Merge pull request #3218 from rxu/ticket/13419
[ticket/13419] Add the lowermost template event
2014-12-27 14:02:39 +01:00
Joas Schilling
d5f99e0478 Merge pull request #3216 from kinerity/ticket/13409
[ticket/13409] Add event core.search_modify_param_before
2014-12-27 14:01:05 +01:00
Joas Schilling
7b43d5c54e Merge pull request #3214 from brunoais/ticket/13159
[ticket/13159] Allow to do extra auth checks on report posting
2014-12-27 13:58:49 +01:00
Joas Schilling
3ba62628dc Merge pull request #3205 from rxu/ticket/13406
[ticket/13406] Add a space between the index name and columns list
2014-12-27 13:51:24 +01:00
Joas Schilling
faad779cf6 Merge pull request #3202 from Nicofuma/ticket/13402
[ticket/13402] Code sniffer, unused use, check the function doc blocks
2014-12-27 13:49:50 +01:00
Joas Schilling
f6b21a2789 Merge pull request #3191 from Elsensee/ticket/13312
[ticket/13312] Add event core.acp_email_send_before
2014-12-27 13:46:32 +01:00
Joas Schilling
867a45138c Merge pull request #3175 from Senky/ticket/13368
[ticket/13368] Add $forum_data to viewforum_get_topic_ids_data event
2014-12-27 13:38:19 +01:00
Joas Schilling
aea67c8e37 Merge pull request #3168 from Senky/ticket/11033
[ticket/11033] FULLTEXT_SPHINX_NO_CONFIG_DATA references unrequired field
2014-12-27 13:37:04 +01:00
Joas Schilling
d2334ab3e0 Merge pull request #3167 from Senky/ticket/12924
[ticket/12924] Make meta tags self-closing
2014-12-27 13:34:48 +01:00
Joas Schilling
5b1c9831c2 Merge pull request #3099 from Senky/ticket/13266
[ticket/13266] Enabling twig dump function if DEBUG is defined
2014-12-27 13:31:01 +01:00
Joas Schilling
a66e4770c1 Merge pull request #3159 from Crizz0/ticket/13357
[ticket/13357] Adds missing LOG_MOVED_TOPIC for 3.0.12 left-over entries
2014-12-27 13:29:04 +01:00
brunoais
0929267e72 [ticket/13154] Wrong variable name in the comment block
PHPBB3-13154
2014-12-19 11:23:23 +00:00
brunoais
dd9c415020 [ticket/13154] space before @var
Not a tab.

PHPBB3-13154
2014-12-19 10:03:57 +00:00
brunoais
dd6efdad59 [ticket/13154] Fix submit_post_test() test group
PHPBB3-13154
2014-12-18 14:56:58 +00:00
brunoais
13320a08ef [ticket/13154] Forgot the $this->
PHPBB3-13154
2014-12-17 23:17:12 +00:00
brunoais
8098d313e6 [ticket/13154] Adjusting phpBB tests for the dispatcher
PHPBB3-13154
2014-12-17 23:11:14 +00:00
brunoais
458f9cade6 [ticket/13154] Adding phpBB dispatcher to notifications manager
PHPBB3-13154
2014-12-17 23:10:54 +00:00
brunoais
7512efed9e [ticket/13154] Allow filtering the list of users to be notified
PHPBB3-13154
2014-12-17 15:17:44 +00:00
rxu
2929f28243 [ticket/13435] Add core event to modify submit_post() sql data
PHPBB3-13435
2014-12-13 21:08:01 +07:00
omniError
7b0cabc416 [ticket/13430] update event version
https://tracker.phpbb.com/browse/PHPBB3-13430

PHPBB3-13430
2014-12-12 17:39:30 -06:00
n-aleha
6463354a39 [ticket/13098] Repair Yahoo contact field
Update the Yahoo link of the yahoo profile field.

PHPBB3-13098
2014-12-12 13:54:35 +02:00
omniError
9f1493ce73 [ticket/13430] Add event core.prune_sql
https://tracker.phpbb.com/browse/PHPBB3-13430

PHPBB3-13430
2014-12-11 16:58:29 -06:00
Jakub Senko
91dc002c31 [ticket/13368] Update version
PHPBB3-13368
2014-12-11 14:11:43 +01:00
Cesar G
54b5ee5806 [ticket/13366] Ensure plupload_last_gc config entry is dynamic.
PHPBB3-13366
2014-12-09 18:50:29 -08:00
Cesar G
75780d7fc8 [ticket/13420] Correctly filter by lt/gt/equal to 0 posts when pruning users.
PHPBB3-13420
2014-12-09 18:27:04 -08:00
Cesar G
61df1ac2b3 Merge remote-tracking branch 'Senky/ticket/12567' into develop-ascraeus
* Senky/ticket/12567:
  [ticket/12567] wrap to top
2014-12-09 17:58:43 -08:00
Cesar G
46384adf00 Merge remote-tracking branch 'Senky/ticket/13319' into develop-ascraeus
* Senky/ticket/13319:
  [ticket/13319] Add missing table tags
2014-12-09 17:50:14 -08:00
Cesar G
719aa66224 [ticket/13302] Fix incorrect link to extensions database.
PHPBB3-13302
2014-12-09 17:10:08 -08:00
Cesar G
15507ffc16 [ticket/13302] Update translations forum link to 3.1.
PHPBB3-13302
2014-12-09 17:10:08 -08:00
Cesar G
bb4b3d2731 [ticket/13302] Update documentation and support forum links to 3.1 versions.
PHPBB3-13302
2014-12-09 17:10:03 -08:00
Cesar G
4dab281da1 [ticket/13427] Add several before/after template events to mcp_front.html.
PHPBB3-13427
2014-12-09 16:26:32 -08:00
Cesar G
1aea572aca [ticket/13370] Allow calling class method in convertor framework directly.
This change allows the usage of array($class, 'method')) directly instead of
having to use the functionX syntax as follows:
array('function1' => array($class, 'method')))

PHPBB3-13370
2014-12-09 15:59:05 -08:00
MasterShredder
fda5d8d637 [ticket/13422] Deleted event core.session_check_user_session 2014-12-08 21:37:07 +03:00
MasterShredder
1896825f39 [ticket/13422] Add new event core.session_set_custom_ban
PHPBB3-13422
2014-12-07 05:59:20 +04:00
MasterShredder
566510769b [ticket/13422] Add new event core.session_check_user_session
PHPBB3-13422
2014-12-07 05:57:07 +04:00
MasterShredder
4700b44125 [ticket/13422] Add new event core.ucp_save_custom_cookies
PHPBB3-13422
2014-12-07 05:52:24 +04:00
Joas Schilling
641a9e5441 Merge pull request #3208 from prototech/ticket/13396
[ticket/13396] Normalize multibyte characters in attachment file names.
2014-12-06 14:22:49 +01:00
Joas Schilling
7fbf5649eb Merge branch 'ticket/13400' into develop-ascraeus 2014-12-06 13:42:24 +01:00
kochi
dfbc109b59 [ticket/13400] Information text if the server load id high at search
PHPBB3-13400
2014-12-06 13:42:16 +01:00
rxu
0a419781c2 [ticket/13419] Add the lowermost template event
PHPBB3-13419
2014-12-06 16:36:33 +07:00
Kailey Truscott
0795b6bd6c [ticket/13409] Change search_id type and release version
PHPBB3-13409
2014-12-05 05:53:59 -05:00
Kailey Truscott
ddd1937655 [ticket/13409] Fix event name
PHPBB3-13409
2014-12-04 21:04:58 -05:00
Kailey Truscott
3bf55c0b4d [ticket/13409] Add event core.search_modify_param_before
PHPBB3-13409
2014-12-04 20:30:16 -05:00
brunoais
a8d3cbe53b [ticket/13159] Allow to do extra auth checks on report posting
PHPBB3-13159
2014-12-03 17:53:10 +00:00
brunoais
96a734b012 [ticket/13158] Allow adding extra auth checks when the user is posting
PHPBB3-13158
2014-12-03 17:34:35 +00:00
brunoais
b7f83b2cfc [ticket/13148] Creating a final way to modify edit logs output
PHPBB3-13148
2014-12-03 16:04:32 +00:00
brunoais
bfecae1d60 [ticket/13146] Forgot delete_post_test.php
PHPBB3-13146
2014-12-03 15:43:27 +00:00
brunoais
1c02f7e032 [ticket/13146] Adding required tests modifications for the new constructor
PHPBB3-13146
2014-12-03 15:10:32 +00:00
brunoais
f045744606 [ticket/13146] FIxed wrong order in config/content.yml
PHPBB3-13146
2014-12-03 14:26:25 +00:00
brunoais
10a4f79135 [ticket/13146] Fixed variable name for the override
PHPBB3-13146
2014-12-03 14:00:00 +00:00
brunoais
4159bb1340 [ticket/13146] Wrong usage of tabs in .yml
PHPBB3-13146
2014-12-03 13:56:50 +00:00
brunoais
ac8a4b05b4 [ticket/13146] Fixing what merging broke
Merging added content I didn't expect it to add. This fixes back to what it is supposed to be.

PHPBB3-13146
2014-12-03 13:55:53 +00:00
brunoais
80a7f6930c [ticket/13146] Adding eventDispatcher to the list
PHPBB3-13146
2014-12-03 13:55:53 +00:00
brunoais
614f975e68 [ticket/13146] $contentReplaced -> $content_replaced
PHPBB3-13146
2014-12-03 13:55:52 +00:00
brunoais
df3447b725 [ticket/13146] Extra line for clarity
Added an extra line after the "if ($contentReplaced)"  to help reading the code

PHPBB3-13146
2014-12-03 13:55:52 +00:00
brunoais
e9cb9baedb [ticket/13146] $phpbb_dispatcher was missing
Added $phpbb_dispatcher to the globals list for this function.

PHPBB3-13146
2014-12-03 13:55:51 +00:00
brunoais
e279a779fc [ticket/13146] Typo on the returning variable
PHPBB3-13146
2014-12-03 13:55:50 +00:00
brunoais
e596d0b6ce [ticket/13147] Adding $approve_forums to the list of the event's variables
PHPBB3-13147
2014-12-03 13:55:50 +00:00
brunoais
0388d82504 [ticket/13146] Adding $content_replaced to allow even more flexibility
PHPBB3-13146
2014-12-03 13:55:49 +00:00
brunoais
909bb523bf [ticket/13146] Allow changing the result of calling get_forums_visibility_sql
PHPBB3-13146
2014-12-03 13:55:48 +00:00
Cesar G
589394e80b [ticket/13396] Normalize multibyte characters in attachment file names.
PHPBB3-13396
2014-12-02 16:23:40 -08:00
Tristan Darricau
7f7f60698c [ticket/13402] Handle arrays and multiples types
PHPBB3-13402
2014-11-30 20:55:29 +01:00
Tristan Darricau
13d4394844 [ticket/13402] Refactor unused use Sniff
PHPBB3-13402
2014-11-30 19:18:18 +01:00
Tristan Darricau
70483d6088 Merge pull request #3204 from rxu/ticket/13405
[ticket/13405] Fix a typo in phpbb/migration/data/v310/style_update_p1.php

* rxu/ticket/13405:
  [ticket/13405] Fix a typo in phpbb/migration/data/v310/style_update_p1.php
2014-11-30 19:07:14 +01:00
rxu
2f92bc38e6 [ticket/13406] Add a space between the index name and columns list
Currently there's no space between the index name and columns list
when generating ADD INDEX sql query for MySQL DBMSes. This may cause errors
on earlier MySQL versions like 3.23.

PHPBB3-13406
2014-11-30 16:52:36 +07:00
rxu
499c1467df [ticket/13405] Fix a typo in phpbb/migration/data/v310/style_update_p1.php
PHPBB3-13405
2014-11-30 11:27:47 +07:00
Tristan Darricau
c5227ab2a5 [ticket/13402] Code sniffer, unused use, check the function doc blocks
PHPBB3-13402
2014-11-29 19:17:52 +01:00
brunoais
fe1f7beaf8 [ticket/13142] Extra space before the comment block
PHPBB3-13142
2014-11-29 10:40:35 +00:00
Joas Schilling
ac8b07ddd9 Merge pull request #3192 from Elsensee/ticket/13393
[ticket/13393] Call user->lang function directly
2014-11-29 09:08:51 +01:00
Joas Schilling
aab98b8626 [ticket/13238] Do not drop indexes that do not exist from fulltext search
PHPBB3-13238
2014-11-28 20:13:49 +01:00
Joas Schilling
1145af71bf [ticket/12866] Update existing profile fields with the new validation
PHPBB3-12866
2014-11-28 20:00:49 +01:00
Jakub Senko
b7f69edaa2 [ticket/12866] Assume underscore is part of \w
PHPBB3-12866
2014-11-28 20:00:48 +01:00
Joas Schilling
8f1a1874a9 Merge pull request #3194 from Nicofuma/ticket/13381
[ticket/13381] Allow ' *' in the doc blocks (especially the header files)
2014-11-28 19:58:56 +01:00
brunoais
6f52873636 [ticket/13142] Fix typo: unaproved -> unapproved
PHPBB3-13142
2014-11-28 16:28:01 +00:00
brunoais
aa10bc2059 [ticket/13142] BUMPing version
PHPBB3-13142
2014-11-28 15:06:46 +00:00
brunoais
dfba919db8 [ticket/13142] Adding core.mcp_sorting_unapproved_deleted_posts_query_before
PHPBB3-13142
2014-11-28 15:06:11 +00:00
brunoais
bc7db0ae16 [ticket/13141] BUMPing version to 3.1.3
PHPBB3-13141
2014-11-28 15:05:20 +00:00
brunoais
88798b3514 [ticket/13141] Adding more variables to the event
Adding action, forum_id, mode, module and quickmod to
core.mcp_global_f_read_auth_after

PHPBB3-13141
2014-11-28 15:04:31 +00:00
Tristan Darricau
79ce924bc1 [ticket/13381] Allow ' *' in the doc blocks (especially the header files)
PHPBB3-13381
2014-11-27 11:20:26 +01:00
Tristan Darricau
d43e8c94f5 Merge branch 'develop-olympus' into develop-ascraeus
* develop-olympus:
  [ticket/11613] Allow cookies to work on netbios domains
2014-11-27 10:39:11 +01:00
Tristan Darricau
b54dbe0df6 Merge pull request #3188 from marc1706/ticket/11613
[ticket/11613] Allow cookies for domains without dots

* marc1706/ticket/11613:
  [ticket/11613] Allow cookies to work on netbios domains
2014-11-27 10:38:45 +01:00
Cesar G
79a1495f66 Merge remote-tracking branch 'Prosk8er/ticket/13391' into develop-ascraeus
* Prosk8er/ticket/13391:
  [ticket/13391] subsilver2 poll options must have a setting of 1 when editing a post
2014-11-26 18:43:24 -08:00
Oliver Schramm
893e4b3067 [ticket/13393] Call user->lang function directly
PHPBB3-13393
2014-11-27 00:55:01 +01:00
Oliver Schramm
a349db54d6 [ticket/13312] Use empty for usernames array
PHPBB3-13312
2014-11-26 23:10:02 +01:00
Oliver Schramm
41d0b5d3a2 [ticket/13312] Add event core.acp_email_send_before
PHPBB3-13312
2014-11-26 23:01:58 +01:00
Prosk8er
a5a18fb6dd [ticket/13391] subsilver2 poll options must have a setting of 1 when editing a post
PHPBB3-13391
2014-11-26 14:09:07 -05:00
rxu
a8c62e707a [ticket/12926] Support for IDN (IRI)
Add international domain name support for URLs.

PHPBB3-12926
2014-11-27 01:18:49 +07:00
Jakub Senko
b67b67f2df [ticket/11613] Allow cookies to work on netbios domains
PHPBB3-11613
2014-11-26 14:58:33 +01:00
Marc Alexander
ee90d227c2 Merge pull request #3187 from Nicofuma/ticket/13362
[ticket/13362] Fix cache paths in .gitignore
2014-11-26 13:37:02 +01:00
Marc Alexander
51f46a8f91 Merge pull request #3185 from Nicofuma/ticket/13389
[ticket/13389] Replace pattern with path
2014-11-26 13:30:03 +01:00
Marc Alexander
6ac088ea2f Merge pull request #3075 from Senky/ticket/11613
[ticket/11613] Cookies do not work for netbios domain
2014-11-26 13:20:36 +01:00
Tristan Darricau
6a4179cef5 [ticket/13362] Fix cache paths in .gitignore
PHPBB3-13362
2014-11-26 12:38:02 +01:00
Tristan Darricau
90012c86e8 [ticket/13389] Replace pattern with path
PHPBB3-13389
2014-11-26 12:24:50 +01:00
Marc Alexander
aa3a46a35f Merge remote-tracking branch 'nickvergessen/ticket/13381' into develop-ascraeus 2014-11-25 23:15:03 +01:00
Joas Schilling
2e7ae40d49 Merge pull request #3183 from Nicofuma/ticket/13362
[ticket/13362] Ignore the whole cache directory in git
2014-11-25 22:45:23 +01:00
Joas Schilling
eb83bd5797 [ticket/13381] Fix header intendation of v312.php
PHPBB3-13381
2014-11-25 22:42:52 +01:00
Tristan Darricau
f46057ca02 [ticket/13362] Ignore the whole cache directory in git
PHPBB3-13362
2014-11-25 18:00:07 +01:00
Joas Schilling
f4898b9258 Merge branch 'prep-release-3.1.2' into develop-ascraeus 2014-11-25 16:44:57 +01:00
Joas Schilling
9c9623e47f [prep-release-3.1.2] Update the development version to 3.1.3-RC1-dev 2014-11-25 16:43:43 +01:00
Joas Schilling
1ad0dd28f1 Merge branch 'develop-olympus' into prep-release-3.1.2 2014-11-25 16:36:32 +01:00
Joas Schilling
ff9b541070 Merge pull request #3180 from naderman/ticket/13376
[ticket/13376] Revert unnecessary change for cookies called GLOBALS 92f554e3
2014-11-25 16:36:18 +01:00
Nils Adermann
965042d015 [ticket/13376] Revert unnecessary change for cookies called GLOBALS 92f554e3
Also introduce a clear cookie message hardcoded just in case.

PHPBB3-13376
2014-11-25 15:57:12 +01:00
Joas Schilling
9264d7c758 [prep-release-3.1.2] Update Changelog with 13376 2014-11-25 15:44:39 +01:00
Joas Schilling
0fbe8e8e69 [prep-release-3.1.2] Add migration to update version to 3.1.2 2014-11-24 21:32:17 +01:00
Joas Schilling
3862b60094 [prep-release-3.1.2] Increase version number to 3.1.2 2014-11-24 21:31:49 +01:00
Jakub Senko
b8ecd1a656 [ticket/13368] Add @changed entry
PHPBB3-13368
2014-11-24 21:30:42 +01:00
Jakub Senko
bb4b04f89a [ticket/13319] Add missing table tags
PHPBB3-13319
2014-11-24 20:48:15 +01:00
Jakub Senko
d24fa2e777 [ticket/13346] Fix indentation, spacing and missing divs
PHPBB3-13346
2014-11-24 20:41:01 +01:00
Jakub Senko
9348b0c4f2 [ticket/13368] Add $forum_data to viewforum_get_topic_ids_data event
PHPBB3-13368
2014-11-24 20:28:47 +01:00
Tristan Darricau
b00d02496e [ticket/13361] Improve the exception listener
PHPBB3-13361
2014-11-23 03:15:50 +01:00
Joas Schilling
5f3dffa820 [prep-release-3.1.2] Add changelog for 3.1.2-RC1 2014-11-22 19:35:24 +01:00
Joas Schilling
18d5ca9ce5 [prep-release-3.1.2] Prepare Changelog 2014-11-22 19:32:36 +01:00
Joas Schilling
dcd0f200d6 [prep-release-3.1.2] Add migration for 3.1.2-RC1 2014-11-22 19:27:34 +01:00
Joas Schilling
a5b3393bb0 [prep-release-3.1.2] Update version to 3.1.2-RC1 2014-11-22 19:22:40 +01:00
Jakub Senko
595f9c132b [ticket/12924] Remove newlines at the EOF
PHPBB3-12924
2014-11-22 19:19:08 +01:00
Joas Schilling
5c3b6a8559 Merge pull request #10 from phpbb/ticket/security-171
[ticket/security-171] Use type cast helper for json data
2014-11-22 17:48:37 +01:00
Joas Schilling
a3b18d87dd Merge pull request #8 from phpbb/ticket/security-169
[ticket/security-169] Stop loop through referer dir in top directory
2014-11-22 15:51:48 +01:00
Marc Alexander
0f06b88ee7 [ticket/security-171] Remove duplicate semicolon from tests
SECURITY-171
2014-11-22 15:48:09 +01:00
Joas Schilling
fd993cbaf2 Merge pull request #3157 from marc1706/ticket/13358
[ticket/13358] Add class for retrieving remote file data
2014-11-22 15:42:37 +01:00
Marc Alexander
ab69c79d07 Merge branch 'ticket/13358' into ticket/security-171 2014-11-22 15:24:27 +01:00
Marc Alexander
f3ae5e4cb2 [ticket/13358] Correctly create version_helper in acp_extensions
The full namespace for the file_downloader is now also being used in
version_helper.

PHPBB3-13358
2014-11-22 15:23:26 +01:00
Jakub Senko
b9289340d9 [ticket/12567] wrap to top
PHPBB3-12567
2014-11-22 12:37:31 +01:00
Joas Schilling
8b71103836 Merge pull request #3123 from Elsensee/ticket/13310
[ticket/13310] Add event core.acp_email_modify_sql
2014-11-22 12:21:24 +01:00
Joas Schilling
ea101f7932 Merge pull request #3160 from PayBas/ticket/13228
[ticket/13228] Fix codebox "select all" font-size in UCP and MCP
2014-11-22 12:18:00 +01:00
Joas Schilling
7700f31213 Merge pull request #3116 from rxu/ticket/13297
[ticket/13297] Add unicode modifier to url/email regular expression patterns
2014-11-22 12:13:39 +01:00
Jakub Senko
a609c9db82 [ticket/12924] Make meta tags self-closing
PHPBB3-12924
2014-11-22 12:12:13 +01:00
Joas Schilling
a83b952f63 Merge pull request #3158 from prototech/ticket/13354
[ticket/13354] Fix incorrect column name when deleting all topic logs.
2014-11-22 12:08:33 +01:00
Jakub Senko
86b3c54c77 [ticket/11033] Update string to reflect real requirements
PHPBB3-11033
2014-11-22 11:56:52 +01:00
Joas Schilling
e283611dc2 Merge pull request #3161 from Crizz0/ticket/12885
[ticket/12885] New if for Index-page - board-index-text switch
2014-11-22 11:35:51 +01:00
Joas Schilling
8489e0bdc2 Merge branch 'develop-olympus' into develop-ascraeus 2014-11-22 11:31:41 +01:00
Joas Schilling
a415b8e37b Merge pull request #3164 from Crizz0/ticket/10442
[ticket/10442] Adds <dd>&nbsp;</dd> to <dl> for xhtml correctness
2014-11-22 11:31:31 +01:00
Jakub Senko
30f292f5a2 [ticket/11613] Allow cookies to work on netbios domains
PHPBB3-11613
2014-11-22 11:29:57 +01:00
PayBas
2c15388520 [ticket/13228] Gotta use !important after all. Too bad
PHPBB3-13228
2014-11-22 02:42:25 +01:00
Crizzo
867bfa3f9e [ticket/10442] Adds <dd>&nbsp;</dd> to <dl> for xhtml correctness
PHPBB3-10442
2014-11-22 01:08:14 +01:00
Crizzo
4cb930c2c1 [ticket/12885] New if for Index-page - board-index-text switch
PHPBB3-12885
2014-11-22 00:09:38 +01:00
Marc Alexander
70692dd522 Merge pull request #3094 from nickvergessen/ticket/10744
Ticket/10744 Prevent installing styles with reserved names
2014-11-22 00:00:22 +01:00
Joas Schilling
c174862b7e [ticket/10744] Fix some doc blocks
PHPBB3-10744
2014-11-21 23:59:29 +01:00
Joas Schilling
7c683608ab [ticket/10744] Type hint objects for IDE usages
PHPBB3-10744
2014-11-21 23:58:53 +01:00
Joas Schilling
7f8c4d877a [ticket/10744] Prevent installing styles with reserved names
PHPBB3-10744
2014-11-21 23:55:48 +01:00
Marc Alexander
f648fe88d5 [ticket/security-171] Modify tests for new file_downloader class
SECURITY-171
2014-11-21 23:49:54 +01:00
Marc Alexander
9649d78fa4 Merge branch 'ticket/13358' into ticket/security-171 2014-11-21 23:37:17 +01:00
PayBas
16c43b6a7d [ticket/13228] Fix codebox "select all" font-size in UCP and MCP
PHPBB3-13228
2014-11-21 23:35:33 +01:00
Joas Schilling
2e2ab7b485 Merge pull request #3127 from omniError/ticket/13323
[ticket/13323] empty auth option in posting.php
2014-11-21 23:33:45 +01:00
Marc Alexander
6d3ac29aee [ticket/13358] Use protected and public keywords where applicable
PHPBB3-13358
2014-11-21 23:30:47 +01:00
Crizzo
f930a75471 [ticket/13357] Adds missing LOG_MOVED_TOPIC for 3.0.12 left-over entries
PHPBB3-13357
2014-11-21 23:18:42 +01:00
Marc Alexander
171837eefe [ticket/13358] Do not pass variables by reference
PHPBB3-13358
2014-11-21 23:16:22 +01:00
Joas Schilling
0017fad554 Merge pull request #3108 from Elsensee/ticket/13284
[ticket/13284] Message body not included in email
2014-11-21 23:10:00 +01:00
Joas Schilling
c98cceaf22 Merge pull request #3068 from marc1706/ticket/13204
[ticket/13204] Tell user that password was incorrect when exceeding attempts
2014-11-21 22:52:24 +01:00
Joas Schilling
dd7e09d092 Merge pull request #3064 from marc1706/ticket/13197
[ticket/13197] Also delete group avatar from users that have it set
2014-11-21 22:41:17 +01:00
Marc Alexander
4ee05b1c17 [ticket/security-171] Add tests for retrieved remote data in version_helper
SECURITY-171
2014-11-21 22:32:28 +01:00
Marc Alexander
34004612ac [ticket/security-171] Sanitize data from composer.json
SECURITY-171
2014-11-21 22:32:28 +01:00
Marc Alexander
da1888a7fa [ticket/security-171] Use type cast helper for json data
SECURITY-171
2014-11-21 22:32:28 +01:00
Joas Schilling
d7d4f681ca Merge pull request #3156 from prototech/ticket/13316
[ticket/13316] Ensure Recaptcha image uses https when necessary.
2014-11-21 22:29:02 +01:00
Cesar G
8d8c2930d2 [ticket/13354] Fix incorrect column name when deleting all topic logs.
PHPBB3-13354
2014-11-21 12:48:26 -08:00
Marc Alexander
352648f173 [ticket/13358] Fix tests and use exceptions instead of user object
PHPBB3-13358
2014-11-21 21:37:43 +01:00
Marc Alexander
f6e7a94bd5 [ticket/13358] Use file_downloader in get_remote_file()
get_remote_file() has been marked as deprecated.

PHPBB3-13358
2014-11-21 21:37:43 +01:00
Marc Alexander
2793f9c078 [ticket/13358] Add file_downloader to version_helper
PHPBB3-13358
2014-11-21 21:37:43 +01:00
Marc Alexander
a080173010 [ticket/13358] Add file_downloader as replacement for get_remote_file
PHPBB3-13358
2014-11-21 21:37:43 +01:00
Cesar G
f3373e1e32 [ticket/13316] Ensure Recaptcha image uses https when necessary.
PHPBB3-13316
2014-11-21 12:17:04 -08:00
Joas Schilling
f719803fdc Merge pull request #3144 from marc1706/ticket/13337
[ticket/13337] Do not use SQL IN comparison with empty array
2014-11-21 21:04:11 +01:00
Joas Schilling
d56da0d68f Merge pull request #3044 from Elsensee/ticket/13100
[ticket/13100] Display only confirmation buttons when deleting shadow topic
2014-11-21 20:59:22 +01:00
Joas Schilling
1689191f29 Merge pull request #3023 from Nicofuma/ticket/13133
[ticket/13133] Allow @vendor_name for includecss
2014-11-21 20:36:41 +01:00
Joas Schilling
973c2a9a3a Merge pull request #2765 from Elsensee/ticket/11863
[ticket/11863] Set require_activation to none if emails are disabled
2014-11-21 20:18:15 +01:00
Joas Schilling
707a85b6c1 Merge pull request #3043 from rxu/ticket/13182
[ticket/13182] Add posting.php core event to allow modifying the message text
2014-11-21 20:14:36 +01:00
Joas Schilling
71a015557f Merge pull request #3150 from omniError/ticket/13347
[ticket/13347] missing acp_forums template events

Conflicts:
	phpBB/docs/events.md
2014-11-21 20:09:13 +01:00
Joas Schilling
bc52a84998 Merge pull request #3131 from omniError/ticket/13328
[ticket/13328] add core.mcp_view_forum_modify_sql
2014-11-21 20:05:19 +01:00
Joas Schilling
d6e8cce44b Merge pull request #3130 from omniError/ticket/13326
[ticket/13326] add viewtopic_url to event
2014-11-21 19:58:43 +01:00
Joas Schilling
2d6734cb0a Merge pull request #3126 from VSEphpbb/ticket/13290
[ticket/13290] Add EVENT index_body_forumlist_body_after
2014-11-21 19:53:15 +01:00
Joas Schilling
7bc1917908 Merge pull request #3122 from Elsensee/ticket/13309
[ticket/13309] Add event acp_email_options_after
2014-11-21 19:42:14 +01:00
rxu
bb75cd40f5 [ticket/13182] Add posting.php core event to allow modifying the message text
posting.php core event to allow modifying the message before parsing
would be needed for some extensions, like for adding topic title to the
topic URL etc.
Also removed 'delete' var from core.posting_modify_template_vars and
core.modify_posting_parameters as it does not exist.

PHPBB3-13182
2014-11-22 01:33:12 +07:00
Joas Schilling
4bf3dcbebd Merge pull request #3114 from rxu/ticket/13294
[ticket/13294] Add function parse() core event for additional message checks
2014-11-21 19:28:07 +01:00
Joas Schilling
c31b53942d Merge pull request #3071 from rxu/ticket/13220
[ticket/13220] Add template events to memberlist_search.html
2014-11-21 19:23:10 +01:00
rxu
1e867ce52b [ticket/13294] Add function parse() core event for additional message checks
Add core event to the function parse() in includes/message_parser.php to allow
additional handling message before parsing (i.e. perform custom message
checks, cleanup etc.).

PHPBB3-13294
2014-11-20 00:47:51 +07:00
Tristan Darricau
acfe6dd37d Merge pull request #3149 from prototech/ticket/13342
[ticket/13342] Fix invalid resetting of CAPTCHA plugin when using Recaptcha

* prototech/ticket/13342:
  [ticket/13342] Fix invalid resetting of CAPTCHA plugin when using Recaptcha.
2014-11-18 16:28:59 +01:00
Tristan Darricau
0019039bc1 Merge pull request #3148 from prototech/ticket/13315
[ticket/13315] Fix loss of CAPTCHA plugin config value.

* prototech/ticket/13315:
  [ticket/13315] Check for the includes/captcha/plugins/ directory instead.
  [ticket/13315] Fix loss of CAPTCHA plugin config value.
2014-11-18 15:11:07 +01:00
Marc Alexander
ba3e4da853 Merge pull request #3154 from cyberalien/ticket/13349
[ticket/13349] Fix breadcrumb arrow entity
2014-11-18 15:00:45 +01:00
cyberalien
795fd75d60 [ticket/13349] Fix breadcrumb arrow entity
PHPBB3-13349
2014-11-18 14:13:07 +02:00
Marc Alexander
b84d151afa Merge pull request #3151 from nickvergessen/ticket/13298
[ticket/13298] Add missing $db->freeresult(); calls in functions_admin.php
2014-11-18 13:11:55 +01:00
Marc Alexander
17d76de7b8 Merge pull request #3152 from prototech/ticket/13277
[ticket/13277] Force IE to not cache AJAX requests.
2014-11-18 13:08:58 +01:00
Cesar G
052fdcc8d9 Merge remote-tracking branch 'Nicofuma/ticket/13023' into develop-ascraeus
* Nicofuma/ticket/13023:
  [ticket/13023] Add template event posting_editor_buttons_custom_tags_before
2014-11-18 01:30:06 -08:00
Cesar G
266755bd82 [ticket/13277] Force IE to not cache AJAX requests.
Caching causes problems, such as the inability to move a forum/CPF/module in the
same direction by more than one row.

PHPBB3-13277
2014-11-18 00:41:57 -08:00
Cesar G
7c68964153 [ticket/13315] Check for the includes/captcha/plugins/ directory instead.
PHPBB3-13315
2014-11-18 00:37:07 -08:00
Joas Schilling
31c59cad83 [ticket/13298] Add missing $db->freeresult(); calls in functions_admin.php
PHPBB3-13298
2014-11-17 23:56:33 +01:00
Joas Schilling
4f96688bf7 Merge pull request #3145 from bantu/ticket/13338
[ticket/13338] Make all tests run on their own. Avoid _test suffix for abstract test case classes.
2014-11-17 23:32:45 +01:00
omniError
c1a0d1bf3d [ticket/13347] update event docs
PHPBB3-13347
2014-11-17 16:25:56 -06:00
omniError
115bf63538 [ticket/13347] fix CS
PHPBB3-13347
2014-11-17 16:14:57 -06:00
omniError
bd0107a2ab [ticket/13347] missing acp_forums template events
PHPBB3-13347
2014-11-17 16:09:40 -06:00
Joas Schilling
f261c748b6 Merge branch 'develop-olympus' into develop-ascraeus 2014-11-17 22:47:46 +01:00
Joas Schilling
2b55476df0 Merge pull request #3147 from bantu/ticket/13341-ascraeus
[ticket/13341] Change coverage to whitelist to prevent errors with temp files
2014-11-17 22:47:41 +01:00
Joas Schilling
d4fd5e3365 Merge pull request #3146 from bantu/ticket/13341
[ticket/13341] Change coverage to whitelist to prevent errors with temp ...
2014-11-17 22:47:17 +01:00
Andreas Fischer
21c8985fe8 [ticket/13338] Add include statements for dependencies.
PHPBB3-13338
2014-11-17 21:54:02 +01:00
Andreas Fischer
765d72d194 [ticket/13338] Do not use the _test.php suffix for abstract test case classes.
PHPBB3-13338
2014-11-17 21:53:27 +01:00
Andreas Fischer
a918abe113 [ticket/13338] Move insert_config_array_test to functions_acp, add deps.
PHPBB3-13338
2014-11-17 21:53:27 +01:00
Cesar G
7b33018ade [ticket/13315] Fix loss of CAPTCHA plugin config value.
The plugins were moved to phpbb/captcha/plugins/ after this migration was
created, thus the check is no longer valid and ends up resetting the value
prematurely.

PHPBB3-13315
2014-11-16 17:01:38 -08:00
Cesar G
fb34cbf7cd [ticket/13342] Fix invalid resetting of CAPTCHA plugin when using Recaptcha.
The Recaptcha plugin class name does not follow the phpbb_captcha_ prefix
convention as all others. Instead it simply uses phpbb_, hence the check
for its existence under phpbb/captcha/plugins/ fails.

PHPBB3-13342
2014-11-16 17:01:03 -08:00
Nils Adermann
4ffdb12938 Merge remote-tracking branch 'github-nicofuma/ticket/13280' into develop-ascraeus
* github-nicofuma/ticket/13280:
  [ticket/13280] Output escaping for the symfony request object
  [ticket/13280] Add new tests
  [ticket/13280] Make the tests failing
  [ticket/13280] Revert "Merge pull request #3107 from marc1706/ticket/13280"
2014-11-16 16:50:15 +01:00
Tristan Darricau
0dfe1d0d8b [ticket/13280] Output escaping for the symfony request object
PHPBB3-13280
2014-11-16 16:45:19 +01:00
Tristan Darricau
e27b69f42a Merge pull request #3136 from marc1706/ticket/13332
[ticket/13332] Pass user row to passwords manager check method

* marc1706/ticket/13332:
  [ticket/13332] Fix auth provider tests
  [ticket/13332] Remove useless $result assignment
  [ticket/13332] Pass user row to passwords manager check method
2014-11-16 12:22:51 +01:00
Tristan Darricau
074b91497b [ticket/13023] Add template event posting_editor_buttons_custom_tags_before
PHPBB3-13023
2014-11-16 11:52:30 +01:00
Andreas Fischer
8297f700d0 Merge pull request #3146 from bantu/ticket/13341
[ticket/13341] Change coverage to whitelist to prevent errors with temp ...

* bantu/ticket/13341:
  [ticket/13341] Change coverage to whitelist to prevent errors with temp files.

Conflicts:
	phpunit.xml.dist
2014-11-14 17:27:15 +01:00
Andreas Fischer
c40d7f0896 [ticket/13341] Change coverage to whitelist to prevent errors with temp files.
b4f95deefc suggests that this can lead to issues
with classes having the same name. However, this does not seem to be a problem
with the current version of PHPUnit we are using.

Despite https://phpunit.de/manual/4.1/en/code-coverage-analysis.html saying
that addUncoveredFilesFromWhitelist="true" is optional, this seems to be on by
default in PHPUnit 4.1.0. As a result, all files are considered for code
coverage; which is what we want.

processUncoveredFilesFromWhitelist is however false (by default) and as such
even files that are considered for code coverage are not processed through PHP
when not used in actual tests. Since it is already impossible to test multiple
classes with the same name in the same test run (without process isolation),
because that would already lead to "cannot redeclare class" errors, it is also
impossible for "cannot redeclare class" errors to happen in test coverage.

PHPBB3-13341
2014-11-14 13:44:42 +01:00
Marc Alexander
556565d072 [ticket/13337] Allow empty array passed to sql_in_set()
is_array() will evaluate to true even if the array is just an empty array.
Make sure we also expect an empty array passed to sql_in_set().

PHPBB3-13337
2014-11-14 11:08:35 +01:00
omniError
8a9c2c055c [ticket/13306] update test
https://tracker.phpbb.com/browse/PHPBB3-13306

PHPBB3-13306
2014-11-13 20:55:20 -06:00
omniError
0a4ffb7cf8 [ticket/13306] move error_reporting call
https://tracker.phpbb.com/browse/PHPBB3-13306

PHPBB3-13306
2014-11-13 20:55:10 -06:00
Marc Alexander
c9db08873f Merge pull request #3141 from bantu/ticket/13325
[ticket/13325] Make installing composer dependencies in tests folder optional.
2014-11-13 17:11:48 +01:00
Marc Alexander
9f9ce10f2f Merge pull request #3125 from lavigor/ticket/13318
[ticket/13318] login_username needs to have the multibyte parameter set to true
2014-11-13 01:02:49 +01:00
Marc Alexander
2f54ab0a24 Merge pull request #3137 from prototech/ticket/13209
[ticket/13209] Fix loss of CPF language field values when switching steps
2014-11-13 00:14:54 +01:00
Joas Schilling
a520edb8fa Merge branch 'develop-olympus' into develop-ascraeus 2014-11-12 23:04:10 +01:00
Joas Schilling
12fd9a8827 Merge pull request #3143 from bantu/ticket/13331-ascraeus
[ticket/13331] Use docs target for this branch, add docs-all for all branches
2014-11-12 23:04:07 +01:00
Joas Schilling
b99fbd0be0 Merge pull request #3142 from bantu/ticket/13331
[ticket/13331] Use docs target for this branch, add docs-all for all branches
2014-11-12 22:55:30 +01:00
Andreas Fischer
968360fed6 [ticket/13331] Remove travis/sami.conf.php. Use build/sami-checkout.conf.php.
PHPBB3-13331
2014-11-12 21:45:03 +01:00
Andreas Fischer
0103478521 Merge pull request #3142 from bantu/ticket/13331
[ticket/13331] Use docs target for this branch, add docs-all for all branches

* bantu/ticket/13331:
  [ticket/13331] Use docs target for this branch, add docs-all for dev branches.

Conflicts:
	build/build.xml
	build/sami-checkout.conf.php
2014-11-12 21:43:56 +01:00
Andreas Fischer
b55d744e77 [ticket/13331] Use docs target for this branch, add docs-all for dev branches.
PHPBB3-13331
2014-11-12 21:40:26 +01:00
Andreas Fischer
1e4ff6105a [ticket/13325] Make installing composer dependencies in tests folder optional.
Make phpbb_ui_test_case available unconditionally. Nothing depends on 5.3.19
here. Remove __init__ include. Composer classmap autoloading ensures classes
can be loaded.

PHPBB3-13325
2014-11-12 20:34:36 +01:00
Andreas Fischer
8df63a4499 [ticket/13325] Remove whitespace at end of line.
PHPBB3-13325
2014-11-12 20:32:36 +01:00
Andreas Fischer
e1bf699ad4 [ticket/13325] Update / Fix composer.lock hash.
PHPBB3-13325
2014-11-12 20:31:41 +01:00
Tristan Darricau
526a97db7c [ticket/13280] Add new tests
PHPBB3-13280
2014-11-12 15:43:20 +01:00
Tristan Darricau
f142ed28e4 [ticket/13280] Make the tests failing
PHPBB3-13280
2014-11-12 15:43:12 +01:00
Tristan Darricau
6d533d2f86 [ticket/13280] Revert "Merge pull request #3107 from marc1706/ticket/13280"
This reverts commit a1b58d05d1, reversing
changes made to 0e772afb9d.

PHPBB3-13280
2014-11-12 15:42:23 +01:00
Marc Alexander
09ad1d529e Merge pull request #3139 from prototech/ticket/13239
[ticket/13239] Ensure "Add files" button position is correctly calculated.
2014-11-12 13:04:46 +01:00
Marc Alexander
63022f3c59 [ticket/13332] Fix auth provider tests
PHPBB3-13332
2014-11-12 11:42:08 +01:00
omniError
834a93f76c [ticket/13306] allow 0 error types
https://tracker.phpbb.com/browse/PHPBB3-13306

PHPBB3-13306
2014-11-11 20:23:13 -06:00
omniError
efd4b43c1b [ticket/13306] constructor sets error types
https://tracker.phpbb.com/browse/PHPBB3-13306

PHPBB3-13306
2014-11-11 20:20:52 -06:00
Cesar G
430c6aa32f [ticket/13239] Ensure "Add files" button position is correctly calculated.
PHPBB3-13239
2014-11-11 17:30:34 -08:00
Cesar G
d43f196fa6 [ticket/12642] Ensure CPF type specific options are set when editing booleans.
prepare_hidden_fields is expected to return null if the option is not sent
in the request. The boolean method returns false instead, which results in
the options being set as false in hidden fields when accessing the first edit
step.

When checking the "Default value" option, there is also a failure to check
whether the "Field type" option is set to checkbox, thus resulting in this
option getting lost as well.

PHPBB3-12642
2014-11-11 16:48:25 -08:00
Cesar G
ec220d6494 [ticket/13209] Gather language field values for boolean CPF's in all steps.
The user can move back and forth between all three steps and as such the lang
field data should be expected in all steps.

PHPBB3-13209
2014-11-11 16:32:04 -08:00
Cesar G
3108d0b060 [ticket/13209] Fix expected request value of CPF language fields.
Multiple languages can be edited, thus the expected value is an array.

PHPBB3-13209
2014-11-11 16:28:06 -08:00
Marc Alexander
91f7d53d8e [ticket/13332] Remove useless $result assignment
PHPBB3-13332
2014-11-11 19:02:20 +01:00
Marc Alexander
040fc6dd0f [ticket/13332] Pass user row to passwords manager check method
PHPBB3-13332
2014-11-11 19:02:01 +01:00
omniError
65f83b814c [ticket/13326] fix CS
https://tracker.phpbb.com/browse/PHPBB3-13326

PHPBB3-13326
2014-11-11 10:51:03 -06:00
omniError
b648d3eb4c [ticket/13328] fix CS
https://tracker.phpbb.com/browse/PHPBB3-13328

PHPBB3-13328
2014-11-11 10:47:39 -06:00
Tristan Darricau
cd6085ebdc Merge branch 'develop-olympus' into develop-ascraeus
* develop-olympus:
  [ticket/13324] Update sami/sami and fabpot/goutte for new zipball location.
2014-11-11 15:29:58 +01:00
Tristan Darricau
6949f64d28 Merge pull request #3133 from bantu/ticket/13324
[ticket/13324] Update sami/sami and fabpot/goutte for new zipball location

* bantu/ticket/13324:
  [ticket/13324] Update sami/sami and fabpot/goutte for new zipball location.
2014-11-11 15:27:53 +01:00
Andreas Fischer
9bd24e2efb [ticket/13324] Update sami/sami and fabpot/goutte for new zipball location.
PHPBB3-13324
2014-11-11 12:23:02 +01:00
Tristan Darricau
4dfd4e4cd3 Merge pull request #3112 from Elsensee/ticket/13083
[ticket/13083] Fix language string NO_ENTRIES for logs

* Elsensee/ticket/13083:
  [ticket/13083] Fix language string NO_ENTRIES for logs
2014-11-11 11:56:23 +01:00
omniError
71e0de5588 [ticket/13328] add core.mcp_view_forum_modify_sql
https://tracker.phpbb.com/browse/PHPBB3-13328

PHPBB3-13328
2014-11-10 22:57:54 -06:00
omniError
42b595e7e7 [ticket/13326] add viewtopic_url to event
https://tracker.phpbb.com/browse/PHPBB3-13326

PHPBB3-13326
2014-11-10 20:35:23 -06:00
omniError
a143a19b8b [ticket/13306] add error level to collector
https://tracker.phpbb.com/browse/PHPBB3-13306

PHPBB3-13306
2014-11-10 18:05:18 -06:00
omniError
2d0917c56e [ticket/13323] empty auth option in posting.php
https://tracker.phpbb.com/browse/PHPBB3-13323

PHPBB3-13323
2014-11-10 17:23:23 -06:00
Matt Friedman
971b30a76d [ticket/13290] Add EVENT index_body_forumlist_body_after
PHPBB3-13290
2014-11-10 13:56:52 -08:00
lavigor
8171087cfb [ticket/13318] login_username needs to have the multibyte parameter set to true
This is needed for usernames with UTF-8 characters.

PHPBB3-13318
2014-11-10 20:12:10 +03:00
Marc Alexander
9bb302b92c [ticket/security-169] Stop loop through referer dir in top directory
SECURITY-169
2014-11-09 23:00:39 +01:00
Marc Alexander
6a4cb42565 Merge pull request #3113 from prototech/ticket/13251
[ticket/13251] Escape container parameters defined from config.php.
2014-11-09 20:01:20 +01:00
Oliver Schramm
b6f0c789d5 [ticket/13310] Add event core.acp_email_modify_sql
PHPBB3-13310
2014-11-09 15:34:54 +01:00
rxu
483af1d036 [ticket/13297] Add unicode modifier to url/email regular expression patterns.
PHPBB3-13297
2014-11-09 20:59:14 +07:00
Joas Schilling
7ab774bc8d Merge pull request #3121 from Elsensee/ticket/13300
[ticket/13300] Don't show jabber in profile if jabber is disabled
2014-11-09 14:50:06 +01:00
Marc Alexander
f23634d580 [ticket/13197] Fix tabbing
PHPBB3-13197
2014-11-09 13:43:26 +01:00
Marc Alexander
8dd32c2bb5 [ticket/13197] Correctly format sql query
PHPBB3-13197
2014-11-09 13:07:38 +01:00
Marc Alexander
10b628a20a Merge pull request #3120 from Elsensee/ticket/13301
[ticket/13301] Fix called function in apche auth module
2014-11-09 10:42:30 +01:00
Marc Alexander
8e64652d80 Merge pull request #3119 from Elsensee/ticket/13243
[ticket/13243] Validate announcement entry for existence in version_helper
2014-11-09 10:38:48 +01:00
Oliver Schramm
054ab67771 [ticket/13310] Always use sql_build_query in acp_email.php
PHPBB3-13310
2014-11-09 02:46:50 +01:00
Oliver Schramm
98711450dd [ticket/13309] Add event acp_email_options_after
PHPBB3-13309
2014-11-09 02:31:20 +01:00
Oliver Schramm
ced316d88c [ticket/13300] Don't show jabber in profile if jabber is disabled
PHPBB3-13300
2014-11-09 02:22:39 +01:00
Oliver Schramm
c4628bd92a [ticket/13301] Fix called function in apche auth module
PHPBB3-13301
2014-11-09 01:37:28 +01:00
Oliver Schramm
3fba5e317a [ticket/13243] Validate announcement entry for existence in version_helper
PHPBB3-13243
2014-11-09 01:21:40 +01:00
Joas Schilling
101945acf9 Merge pull request #3110 from Elsensee/ticket/13242
[ticket/13242] Fix HTML validity
2014-11-09 00:39:19 +01:00
Cesar G
92c509bc48 Merge remote-tracking branch 'Elsensee/ticket/13265' into develop-ascraeus
* Elsensee/ticket/13265:
  [ticket/13265] Don't show link to edit own profile to those without permission
2014-11-08 13:53:11 -08:00
rxu
70641e701a [ticket/13220] Add template events to memberlist_search.html
PHPBB3-13220
2014-11-08 21:22:59 +07:00
Tristan Darricau
9aa8f44489 [ticket/13133] Rename $ok variable
PHPBB3-13133
2014-11-07 15:57:31 +01:00
Tristan Darricau
778e0e06f3 Merge pull request #3118 from prototech/ticket/13270
[ticket/13270] Make m_softdelete perm global for boards updated from 3.0.12.

* prototech/ticket/13270:
  [ticket/13270] Make m_softdelete perm global for boards updated from 3.0.12.
2014-11-07 15:19:35 +01:00
Tristan Darricau
8956ec0bd4 Merge pull request #3117 from prototech/ticket/13303
[ticket/13303] Speed up migration dependency calculation.

* prototech/ticket/13303:
  [ticket/13303] Speed up migration dependency calculation.
2014-11-07 11:38:40 +01:00
Cesar G
757e1eac7a [ticket/13270] Make m_softdelete perm global for boards updated from 3.0.12.
PHPBB3-13270
2014-11-07 02:31:11 -08:00
Cesar G
95140bb724 [ticket/13303] Speed up migration dependency calculation.
PHPBB3-13303
2014-11-07 02:30:44 -08:00
Cesar G
d60534d52c [ticket/13251] Escape container parameters defined from config.php.
PHPBB3-13251
2014-11-07 02:30:03 -08:00
Tristan Darricau
a1b58d05d1 Merge pull request #3107 from marc1706/ticket/13280
[ticket/13280] Properly format the current page and add sanitizer to tests

* marc1706/ticket/13280:
  [ticket/13280] Remove unneeded str_replace in build_url()
  [ticket/13280] Only run sanitizer for server superglobal and modify tests
  [ticket/13280] Seperate server sanitizer call and add comment
  [ticket/13280] Add additional sanitizer for ampersands in server superglobal
  [ticket/13280] Correctly format user page for build_url()
  [ticket/13280] Properly format the current page and add sanitizer to tests
2014-11-07 11:10:03 +01:00
Marc Alexander
f432193e07 [ticket/13280] Remove unneeded str_replace in build_url()
PHPBB3-13280
2014-11-06 13:45:09 +01:00
Oliver Schramm
25a7c6e829 [ticket/13083] Fix language string NO_ENTRIES for logs
The string was misleading because there does not
always have to be a period when viewing log entries.

PHPBB3-13083
2014-11-05 21:16:04 +01:00
Oliver Schramm
307fa831d6 [ticket/13265] Don't show link to edit own profile to those without permission
PHPBB3-13265
2014-11-05 21:06:32 +01:00
Oliver Schramm
85031a66cc [ticket/13242] Fix HTML validity
PHPBB3-13242
2014-11-05 20:59:38 +01:00
Oliver Schramm
32010de36e [ticket/13284] Set message body in topic form too, so it will be sent
PHPBB3-13284
2014-11-04 18:33:59 +01:00
Oliver Schramm
b32dc8c667 [ticket/13284] Fix request name so users can cc themselves
PHPBB3-13284
2014-11-04 18:22:46 +01:00
Marc Alexander
32881dbe31 [ticket/13280] Only run sanitizer for server superglobal and modify tests
PHPBB3-13280
2014-11-04 16:54:45 +01:00
Marc Alexander
3986470b3c [ticket/13280] Seperate server sanitizer call and add comment
PHPBB3-13280
2014-11-04 16:14:11 +01:00
Oliver Schramm
e502c8db86 [ticket/13100] Remove pointless variable
PHPBB3-13100
2014-11-04 00:46:06 +01:00
Marc Alexander
13b59af1ff [ticket/13280] Add additional sanitizer for ampersands in server superglobal
PHPBB3-13280
2014-11-03 17:27:01 +01:00
Marc Alexander
6fd092b5df [ticket/13280] Correctly format user page for build_url()
PHPBB3-13280
2014-11-03 16:24:09 +01:00
Marc Alexander
6cc7da0c9c [ticket/13280] Properly format the current page and add sanitizer to tests
PHPBB3-13280
2014-11-03 16:07:32 +01:00
Marc Alexander
0868831675 [ticket/13204] Tell user that password was incorrect when exceeding attempts
At the end of the login method, the captcha was entered correctly and only
the password was incorrect. Therefore, just tell the user that the password
was incorrect. He will see that he still needs to enter a captcha.

PHPBB3-13204
2014-11-02 11:18:08 +01:00
Nils Adermann
0e772afb9d Merge branch 'prep-release-3.1.1' into develop-ascraeus
* prep-release-3.1.1:
  [ticket/13271] Disable CC sender feature for anonymous users
  [prep-release-3.1.1] Add 3.1.1 CHANGELOG
  [prep-release-3.1.1] Add 3.1.1 migration file
  [ticket/13263] Make sure default style exists and clean up code
  [ticket/13263] Only install/set prosilver if no style available
  [ticket/13263] Use prosilver as default style if user's style doesn't exist
  [ticket/security-164] Correctly format page_name
  [ticket/security-164] Sanitize all global variables in symfony_request class
  [ticket/13248] Use functional framework login method in tests
  [ticket/13248] Correctly pass provider name
  [ticket/13248] Always use provider collection for getting provider
  [ticket/13248] Allow specifying different auth provider in provider collection
  [ticket/13248] Use auth provider collection for getting provider
  [ticket/13262] Mention htaccess file when updating from 3.0 to 3.1
  [ticket/13267] Update Automatic Update instructions to include vendor directory
  [ticket/13268] Properly append ternary result in get_existing_indexes()
  [prep-release-3.1.1] Update version number to 3.1.1

Conflicts:
	build/build.xml
	phpBB/includes/constants.php
	phpBB/install/schemas/schema_data.sql
2014-11-02 01:25:51 +01:00
Nils Adermann
b6a4f83c41 Merge remote-tracking branch 'github-security/ticket/security-164-alt' into prep-release-3.1.1
* github-security/ticket/security-164-alt:
  [ticket/security-164] Correctly format page_name
  [ticket/security-164] Sanitize all global variables in symfony_request class
2014-11-02 00:24:02 +01:00
Nils Adermann
c980402a4c Merge branch 'ticket/13271' into prep-release-3.1.1
* ticket/13271:
  [ticket/13271] Disable CC sender feature for anonymous users
2014-11-02 00:22:58 +01:00
Nils Adermann
27be69e3b3 [ticket/13271] Disable CC sender feature for anonymous users
PHPBB3-13271
2014-11-02 00:21:23 +01:00
Nils Adermann
aede89d408 [prep-release-3.1.1] Add 3.1.1 CHANGELOG 2014-11-02 00:20:44 +01:00
Nils Adermann
4ae9e8cf6e [prep-release-3.1.1] Add 3.1.1 migration file 2014-11-02 00:08:21 +01:00
Nils Adermann
0843fd4b77 Merge remote-tracking branch 'github-marc1706/ticket/13263' into prep-release-3.1.1
* github-marc1706/ticket/13263:
  [ticket/13263] Make sure default style exists and clean up code
  [ticket/13263] Only install/set prosilver if no style available
  [ticket/13263] Use prosilver as default style if user's style doesn't exist
2014-11-01 23:57:12 +01:00
Marc Alexander
7461536459 [ticket/13263] Make sure default style exists and clean up code
PHPBB3-13263
2014-11-01 23:53:58 +01:00
Marc Alexander
d1f85f0de3 [ticket/13263] Only install/set prosilver if no style available
Users that have a nonexistent style selectd will revert back to the default
style.

PHPBB3-13263
2014-11-01 23:53:53 +01:00
Marc Alexander
be8b5a41c8 [ticket/13263] Use prosilver as default style if user's style doesn't exist
If prosilver is not installed for whatever reason, it will be installed by
the newly added migration.

PHPBB3-13263
2014-11-01 23:53:48 +01:00
Marc Alexander
f534503a66 [ticket/security-164] Correctly format page_name
SECURITY-164
2014-11-01 22:43:28 +01:00
Marc Alexander
28ef238a5c [ticket/security-164] Sanitize all global variables in symfony_request class
SECURITY-164
2014-11-01 22:43:18 +01:00
Nils Adermann
dde1c7424f Merge pull request #3104 from marc1706/ticket/13248-alt
[ticket/13248] Login functions need to use provider collection for retrieving provider
2014-11-01 22:41:27 +01:00
Marc Alexander
8aec6b58e0 [ticket/13248] Use functional framework login method in tests
PHPBB3-13248
2014-11-01 21:54:34 +01:00
Marc Alexander
d9c868d0f5 [ticket/13248] Correctly pass provider name
PHPBB3-13248
2014-11-01 21:54:27 +01:00
Marc Alexander
a9249bce5e [ticket/13248] Always use provider collection for getting provider
PHPBB3-13248
2014-11-01 21:54:21 +01:00
Marc Alexander
c3f5dc75be [ticket/13248] Allow specifying different auth provider in provider collection
PHPBB3-13248
2014-11-01 21:54:14 +01:00
Marc Alexander
6b057e026c [ticket/13248] Use auth provider collection for getting provider
PHPBB3-13248
2014-11-01 21:54:06 +01:00
Nils Adermann
f3588c66ec Merge branch 'ticket/13262' into prep-release-3.1.1
* ticket/13262:
  [ticket/13262] Mention htaccess file when updating from 3.0 to 3.1
2014-11-01 19:14:11 +01:00
Matt Friedman
a269929f0e [ticket/13262] Mention htaccess file when updating from 3.0 to 3.1
PHPBB3-13262
2014-11-01 19:14:00 +01:00
Nils Adermann
45d054d295 Merge branch 'ticket/13267' into prep-release-3.1.1
* ticket/13267:
  [ticket/13267] Update Automatic Update instructions to include vendor directory
2014-11-01 19:13:21 +01:00
Patrick Webster
8bdbadabb2 [ticket/13267] Update Automatic Update instructions to include vendor directory
PHPBB3-13267
2014-11-01 19:13:09 +01:00
Nils Adermann
2cc9fe5267 Merge branch 'ticket/13268' into prep-release-3.1.1
* ticket/13268:
  [ticket/13268] Properly append ternary result in get_existing_indexes()
2014-11-01 19:12:43 +01:00
Patrick Webster
c3aca59cfb [ticket/13268] Properly append ternary result in get_existing_indexes()
PHPBB3-13268
2014-11-01 19:12:28 +01:00
Nils Adermann
3f3c8d74e8 [prep-release-3.1.1] Update version number to 3.1.1 2014-11-01 18:47:56 +01:00
Jakub Senko
4522db7624 [ticket/13266] Enable twig dump function
PHPBB3-13266
2014-11-01 12:31:58 +01:00
Marc Alexander
a61299a940 Merge pull request #3098 from VSEphpbb/ticket/13262
[ticket/13262] Mention htaccess file when updating from 3.0 to 3.1
2014-11-01 09:10:34 +01:00
Marc Alexander
af77106a2f Merge pull request #3097 from prototech/ticket/13253
[ticket/13253] Fix MCP queue link in active topics search.
2014-11-01 09:08:11 +01:00
Matt Friedman
416577f3dc [ticket/13262] Mention htaccess file when updating from 3.0 to 3.1
PHPBB3-13262
2014-10-31 13:08:36 -07:00
Cesar G
65c3f2a8f1 [ticket/13253] Fix MCP queue link in active topics search.
PHPBB3-13253
2014-10-30 22:47:51 -07:00
Andreas Fischer
17928563a2 Merge pull request #3093 from nickvergessen/ticket/13241
[ticket/13241] Fix pagination of viewforum with global announcements

* nickvergessen/ticket/13241:
  [ticket/13241] Remove sleep() and change flood interval instead
  [ticket/13241] Remove sleep() since the method takes care of this now
  [ticket/13241] Sleep for 1 second when posting twice in the same second
  [ticket/13241] Fix pagination with global announcements
  [ticket/13241] Correctly ignore announcements from topics list
  [ticket/13241] Add a functional test for viewforum with global announcement
2014-10-29 15:10:39 +01:00
Andreas Fischer
bb4f65d743 Merge pull request #3076 from marc1706/ticket/12703
[ticket/12703] Only query database for subscription types once

* marc1706/ticket/12703:
  [ticket/12703] Only query database for subscription types once
2014-10-29 15:09:55 +01:00
Andreas Fischer
932b75c166 Merge pull request #3065 from dhruvgoel92/feature/phantom
[feature/phantom]

* dhruvgoel92/feature/phantom:
  [ticket/12962] Rename setup-phpbb-test
  [ticket/12962] Use phpVersion in phpunit.xml
  [ticket/12962] Functional tests run for php <5.3.19
  [ticket/12962] Clean up composer.json
  [ticket/12962] Fix Line Endings in bootstrap
  [ticket/12962] Load composer test dependencies for php >= 5.3.19
  [ticket/12962] bootstrap functional and ui test when php >5.3.19
  [ticket/12962] Install test dependencies on travis
  [ticket/12962] Add facebook/webdriver dependency
  [ticket/12962] Fix whitespace characters
  [ticket/12962] Run tests for all databases on Travis
  [ticket/12962] Force language=en for UI tests installation
  [ticket/12962] Dump server output to /dev/null
  [ticket/12962] Start phantomjs on travis in background
  [ticket/12962] Mark test skipped when phantom server not running
  [ticket/12962] Add setup-phantomjs-server.sh
  [ticket/12962] Run UI tests on Travis-mysql
  [ticket/12962] Add UI tests to phpunit.xml.dist
  [ticket/12962] Add quick-links JS test
  [ticket/12962] Add initial class for ui_testing
2014-10-29 15:09:22 +01:00
Joas Schilling
1787ccb585 [ticket/13241] Remove sleep() and change flood interval instead
PHPBB3-13241
2014-10-29 14:17:15 +01:00
Joas Schilling
b868886b25 [ticket/13241] Remove sleep() since the method takes care of this now
PHPBB3-13241
2014-10-29 13:42:44 +01:00
Joas Schilling
e42202e794 [ticket/13241] Sleep for 1 second when posting twice in the same second
PHPBB3-13241
2014-10-29 13:42:43 +01:00
Joas Schilling
9ee177573d [ticket/13241] Fix pagination with global announcements
PHPBB3-13241
2014-10-29 13:42:42 +01:00
Joas Schilling
ae6a3b03c4 [ticket/13241] Correctly ignore announcements from topics list
PHPBB3-13241
2014-10-29 13:42:41 +01:00
Joas Schilling
82aed75b3b [ticket/13241] Add a functional test for viewforum with global announcement
PHPBB3-13241
2014-10-29 13:42:41 +01:00
Joas Schilling
3a2ccd079e Merge branch 'prep-release-3.1.0' into develop-ascraeus 2014-10-28 13:35:27 +01:00
Joas Schilling
197fed16bd [prep-release-3.1.0] Update changelog with final changes 2014-10-28 13:08:52 +01:00
Joas Schilling
c57fbe9d0d Merge branch 'prep-release-3.1.0' into develop-ascraeus 2014-10-28 12:58:45 +01:00
Joas Schilling
12033bc499 Merge branch 'develop-olympus' into prep-release-3.1.0
Conflicts:
	phpBB/phpbb/session.php
2014-10-28 12:57:38 +01:00
Joas Schilling
71c19f6eb7 Merge pull request #3091 from Nicofuma/ticket/13234-2
Ticket/13234 2
2014-10-28 12:56:47 +01:00
Joas Schilling
d2cd24e875 Merge pull request #3090 from Nicofuma/ticket/13234
Ticket/13234
2014-10-28 12:56:15 +01:00
Tristan Darricau
9036edd935 [ticket/13234] Merge branch 'ticket/13234' into ticket/13234-2
* ticket/13234:
  [ticket/13234] Fix conditions and CS

Conflicts:
	phpBB/phpbb/session.php

PHPBB3-13234
2014-10-28 12:27:16 +01:00
Tristan Darricau
fcc320e385 [ticket/13234] Fix conditions and CS
PHPBB3-13234
2014-10-28 12:19:53 +01:00
Joas Schilling
0682e5719d Merge branch 'prep-release-3.1.0' into develop-ascraeus 2014-10-28 10:02:53 +01:00
Joas Schilling
679559ce18 Merge branch 'naderman-ticket/13232' into prep-release-3.1.0 2014-10-28 10:02:33 +01:00
Joas Schilling
2e814cc43f [ticket/13232] Fix spaces vs tabs
PHPBB3-13232
2014-10-28 10:01:28 +01:00
Nils Adermann
087a5363bb [ticket/13234-2] Correctly verify that user_id is set in user data array
PHPBB3-13234-2
2014-10-27 23:56:20 -07:00
Nils Adermann
3472b6c5bc [ticket/13234-2] Never allow autologin/remember me to modify the userid
Ascraeus version of 64d97d0787 commit

PHPBB3-13234
2014-10-27 19:58:32 -07:00
Nils Adermann
e1277c26ca Merge branch 'ticket/13234' into ticket/13234-2
* ticket/13234:
  [ticket/13234] Never allow autologin/remember me to modify the userid
2014-10-27 19:57:16 -07:00
Nils Adermann
64d97d0787 [ticket/13234] Never allow autologin/remember me to modify the userid
This prevents admin relogin with forced user id from overwriting
remember me cookies

PHPBB3-13234
2014-10-27 19:55:56 -07:00
Nils Adermann
b9c08cddd4 Merge branch 'prep-release-3.1.0' into develop-ascraeus
* prep-release-3.1.0:
  [ticket/13227] Properly handle curlwrapper headers in remote avatars
  [ticket/13231] Update the dependencies of the migration contact_admin_form
2014-10-27 19:04:01 -07:00
Nils Adermann
dccbd573e8 [ticket/13232] Ensure prune cron job always gets run in prune test
The cron scheduler might pick a different task but we don't want to go
through them all to find the one we need. So we just make sure cron is
run at all and then manually run the one we want.

PHPBB3-13232
2014-10-27 19:00:23 -07:00
Nils Adermann
efe3aaaf0b Merge pull request #3085 from naderman/ticket/13227
[ticket/13227] Properly handle curlwrapper headers in remote avatars
2014-10-27 18:58:11 -07:00
Nils Adermann
df1212ce27 Merge pull request #3083 from Nicofuma/ticket/13231
[ticket/13231] Update the dependencies of the migration contact_admin_form
2014-10-27 18:51:47 -07:00
Nils Adermann
4c75f013de Merge branch 'prep-release-3.1.0' into develop-ascraeus
* prep-release-3.1.0:
  [ticket/13229] Fix overloading memberlist with redundant SQL queries
2014-10-27 17:01:57 -07:00
Nils Adermann
1f31e8e243 Merge branch 'ticket/13229' into prep-release-3.1.0
* ticket/13229:
  [ticket/13229] Fix overloading memberlist with redundant SQL queries
2014-10-27 17:01:46 -07:00
rxu
16d78407db [ticket/13229] Fix overloading memberlist with redundant SQL queries
PHPBB3-13229
2014-10-27 17:01:29 -07:00
Nils Adermann
4e4c3de103 [ticket/13227] Properly handle curlwrapper headers in remote avatars
Read a bit of the file to ensure header values are populated and then
handle headers in the nested array structure too.

PHPBB3-13227
2014-10-27 16:49:30 -07:00
Nils Adermann
dbaee1a5da Merge pull request #4 from nickvergessen/naderman-ticket/13232
[ticket/13232] Fix more issues with TTL and global cache file
2014-10-27 16:36:39 -07:00
Joas Schilling
6380aea647 [ticket/13232] Fix more issues with TTL and global cache file
PHPBB3-13232
2014-10-28 00:34:51 +01:00
Tristan Darricau
47663a4ad3 [ticket/13231] Update the dependencies of the migration contact_admin_form
PHPBB3-13231
2014-10-27 23:45:24 +01:00
Nils Adermann
0cdd071230 [ticket/13232] Fix indentation
PHPBB3-13232
2014-10-27 15:45:24 -07:00
Nils Adermann
df5366a5ca [ticket/13232] Use a cache var with _ to force TTL and shuffle cron tasks
PHPBB3-13232
2014-10-27 15:42:26 -07:00
Joas Schilling
91a9d25a38 Merge branch 'prep-release-3.1.0' into develop-ascraeus 2014-10-27 23:40:04 +01:00
Joas Schilling
aa916fc43f Merge pull request #3077 from marc1706/ticket/13225
[ticket/13225] Use passwords manager instead of phpbb_hash in migration
2014-10-27 23:38:53 +01:00
Dhruv
505ee586ff [ticket/12962] Rename setup-phpbb-test
PHPBB3-12962
2014-10-27 18:36:33 -04:00
Marc Alexander
b295fa4f4f [ticket/13225] Prefix converted passwords with $CP$ in phpBB 3.0.5-RC1
PHPBB3-13225
2014-10-27 20:57:31 +01:00
Nils Adermann
b1d7386075 Merge branch 'prep-release-3.1.0' into develop-ascraeus
* prep-release-3.1.0:
  [ticket/13230] Add missing globals and missing request object for path helper
  [ticket/13226] Add functional test for group ranks
  [ticket/13226] Fix the usage of $rank_img
2014-10-27 12:25:41 -07:00
Nils Adermann
d693d91e26 Merge remote-tracking branch 'github-nicofuma/ticket/13226' into prep-release-3.1.0
* github-nicofuma/ticket/13226:
  [ticket/13226] Add functional test for group ranks
  [ticket/13226] Fix the usage of $rank_img
2014-10-27 12:25:18 -07:00
Nils Adermann
decabb62c0 Merge pull request #3079 from nickvergessen/ticket/13230
[ticket/13230] Add missing globals and missing request object for path helper
2014-10-27 12:16:12 -07:00
Dhruv
cc82f95c8f [ticket/12962] Use phpVersion in phpunit.xml
PHPBB3-12962
2014-10-27 08:13:41 -07:00
Joas Schilling
47759eb096 [ticket/13230] Add missing globals and missing request object for path helper
PHPBB3-13230
2014-10-27 14:54:17 +01:00
Tristan Darricau
2e5cc62071 [ticket/13226] Add functional test for group ranks
PHPBB3-13226
2014-10-27 14:37:51 +01:00
Tristan Darricau
9ccb87675d [ticket/13226] Fix the usage of $rank_img
PHPBB3-13226
2014-10-27 10:00:24 +01:00
Dhruv
c6cca9d0d2 [ticket/12962] Functional tests run for php <5.3.19
PHPBB3-12962
2014-10-26 21:30:31 -07:00
Dhruv
98554475be [ticket/12962] Clean up composer.json
PHPBB3-12962
2014-10-26 20:58:21 -07:00
Marc Alexander
6cc5160d60 [ticket/13225] Use passwords manager instead of phpbb_hash in migration
PHPBB3-13225
2014-10-26 17:14:34 -07:00
Marc Alexander
cb65cd363a [ticket/12703] Only query database for subscription types once
PHPBB3-12703
2014-10-26 13:56:34 -07:00
Nils Adermann
222bec0204 Merge branch 'prep-release-3.1.0' into develop-ascraeus
* prep-release-3.1.0:
  [prep-release-3.1.0] Update CHANGELOG with last minute changes
2014-10-26 12:54:02 -07:00
Nils Adermann
51251293ab [prep-release-3.1.0] Update CHANGELOG with last minute changes 2014-10-26 12:53:45 -07:00
Nils Adermann
78aa120089 Merge branch 'prep-release-3.1.0' into develop-ascraeus
* prep-release-3.1.0:
  [ticket/13223] Fix USERNAME email template variable in notification
2014-10-26 12:48:25 -07:00
Nils Adermann
d5022d87e7 Merge branch 'ticket/13223' into prep-release-3.1.0
* ticket/13223:
  [ticket/13223] Fix USERNAME email template variable in notification
2014-10-26 12:48:16 -07:00
rxu
5431aa6391 [ticket/13223] Fix USERNAME email template variable in notification
admin_activate_user.php notification type is assigning usernames to email
template variables using user_loader->get_username() in 'no_profile' mode,
which in its turn calls get_username_string() function in 'no_profile' mode.
This causes HTML markup in emails for username colour.

PHPBB3-13223
2014-10-26 12:47:57 -07:00
Nils Adermann
c19ab58420 Merge branch 'prep-release-3.1.0' into develop-ascraeus
* prep-release-3.1.0:
  [ticket/13221] Add bot_update as a dependency to gold
  [ticket/13221] Perform bot updates after user table changes
2014-10-26 12:43:17 -07:00
Marc Alexander
b0942fe31d [ticket/13197] Test that user's group avatar is deleted by group avatar delete
PHPBB3-13197
2014-10-26 12:42:47 -07:00
Nils Adermann
7f347a290c Merge pull request #3073 from nickvergessen/ticket/13221
[ticket/13221] Perform bot updates after user table changes
2014-10-26 12:42:28 -07:00
Joas Schilling
0d1d836a89 [ticket/13221] Add bot_update as a dependency to gold
PHPBB3-13221
2014-10-26 20:03:46 +01:00
Joas Schilling
79d782c1d5 [ticket/13221] Perform bot updates after user table changes
PHPBB3-13221
2014-10-26 19:57:08 +01:00
Andreas Fischer
69cf5782d4 Merge pull request #3054 from Senky/ticket/13193
[ticket/13193] Post count in PMs not a link

* Senky/ticket/13193:
  [ticket/13193] Swap ternary condition members
  [ticket/13193] Make template more readable
  [ticket/13193] Add load_search config check
  [ticket/13193] Add link to post count in PMs
2014-10-26 14:20:33 +01:00
brunoais
1fc7bd107d [ticket/13141] Ups wrong version
PHPBB3-13141
2014-10-26 10:58:53 +00:00
brunoais
203f9c24d4 [ticket/13141] Implement core.mcp_global_f_read_auth_after
PHPBB3-13141
2014-10-26 10:58:23 +00:00
Jakub Senko
79274e904c [ticket/13193] Swap ternary condition members
PHPBB3-13193
2014-10-26 08:44:21 +01:00
Nils Adermann
5441a4ea13 Merge pull request #3067 from marc1706/ticket/13216
[ticket/13216] Use gmdate() instead of date() in datetime tests
2014-10-25 21:26:38 -07:00
Nils Adermann
5c1ef45488 Merge remote-tracking branch 'github-marc1706/ticket/13207' into develop-ascraeus
* github-marc1706/ticket/13207:
  [ticket/13207] Use assert_checkbox_is_checked for registration test
2014-10-25 21:01:51 -07:00
Nils Adermann
7a4b404af7 [develop-ascraeus] Update version number to 3.1.1-RC1-dev 2014-10-25 20:28:46 -07:00
Marc Alexander
1046ada9fc [ticket/13216] Use gmdate() instead of date() in datetime tests
PHPBB3-13216
2014-10-25 20:25:57 -07:00
Marc Alexander
cafd3b79fd [ticket/13207] Use assert_checkbox_is_checked for registration test
PHPBB3-13207
2014-10-25 20:05:25 -07:00
Nils Adermann
a5830fe0d5 Merge branch 'prep-release-3.1.0' into develop-ascraeus
* prep-release-3.1.0:
  [prep-release-3.1.0] Add missing CHANGELOG entries for RC6
2014-10-25 18:11:03 -07:00
Nils Adermann
5cee745fc5 [prep-release-3.1.0] Add missing CHANGELOG entries for RC6 2014-10-25 18:10:30 -07:00
Dhruv
1c88a2cb25 [ticket/12962] Fix Line Endings in bootstrap
PHPBB3-12962
2014-10-25 17:33:47 -07:00
Nils Adermann
9c95831f35 Merge branch 'prep-release-3.1.0' into develop-ascraeus
* prep-release-3.1.0:
  [prep-release-3.1.0] Add CHANGELOG for 3.1.0
2014-10-25 17:12:34 -07:00
Nils Adermann
c789acc091 [prep-release-3.1.0] Add CHANGELOG for 3.1.0 2014-10-25 17:12:14 -07:00
Nils Adermann
8de93bee95 Merge branch 'prep-release-3.1.0' into develop-ascraeus
* prep-release-3.1.0:
  [prep-release-3.1.0] Add 3.1.0 gold release migration
2014-10-25 17:05:07 -07:00
Nils Adermann
f2e9c62a97 [prep-release-3.1.0] Add 3.1.0 gold release migration 2014-10-25 17:03:50 -07:00
Nils Adermann
26d4483d36 Merge branch 'prep-release-3.1.0' into develop-ascraeus
* prep-release-3.1.0:
  [ticket/13207] Add notification manager mock to user_add method in tests
  [ticket/13207] Move default user notifications settings to user_add()
  [ticket/13207] Add default subscription options for newly registered users
2014-10-25 16:56:05 -07:00
Nils Adermann
4859cec0c5 Merge remote-tracking branch 'github-marc1706/ticket/13207' into prep-release-3.1.0
* github-marc1706/ticket/13207:
  [ticket/13207] Add notification manager mock to user_add method in tests
  [ticket/13207] Move default user notifications settings to user_add()
  [ticket/13207] Add default subscription options for newly registered users
2014-10-25 16:55:29 -07:00
Marc Alexander
0dcb874c09 [ticket/13207] Add notification manager mock to user_add method in tests
PHPBB3-13207
2014-10-25 16:16:25 -07:00
Marc Alexander
1da1a70650 [ticket/13197] Also delete group avatar from users that have it set
PHPBB3-13197
2014-10-25 15:57:41 -07:00
Dhruv
e78210dc96 [ticket/12962] Load composer test dependencies for php >= 5.3.19
PHPBB3-12962
2014-10-25 15:34:39 -07:00
Marc Alexander
81ad381263 [ticket/13207] Move default user notifications settings to user_add()
PHPBB3-13207
2014-10-25 14:57:01 -07:00
Marc Alexander
18f24a2270 [ticket/13207] Add default subscription options for newly registered users
PHPBB3-13207
2014-10-25 14:50:01 -07:00
Nils Adermann
f22cd2d734 Merge branch 'prep-release-3.1.0' into develop-ascraeus
* prep-release-3.1.0:
  [ticket/13215] Update Symfony components to v2.3.21.
2014-10-25 14:01:54 -07:00
Nils Adermann
07e7cde560 Merge pull request #3062 from bantu/ticket/13215
[ticket/13215] Update Symfony components to v2.3.21.
2014-10-25 14:01:13 -07:00
Andreas Fischer
ad06f6dd71 [ticket/13215] Update Symfony components to v2.3.21.
PHPBB3-13215
2014-10-25 21:29:45 +02:00
Nils Adermann
9ea08aa4d7 Merge branch 'prep-release-3.1.0' into develop-ascraeus
* prep-release-3.1.0:
2014-10-25 12:09:55 -07:00
Nils Adermann
4e952ad443 Merge commit '078e0c1e440f7f906b670348e8da00141e245876' into prep-release-3.1.0
* commit '078e0c1e440f7f906b670348e8da00141e245876':
  [ticket/13211] Move console migrator output handler back to console folder
  [ticket/13211] Also use log wrapper output handler for console migrations
  [ticket/13211] Move console migrator output handler to db folder
  [ticket/13211] Add log wrapper for writing database updater to log file
  [ticket/13126] Add missing use statement
  [ticket/13126] Fix tests
  [ticket/13126] Change messages verbosity levels
  [ticket/13126] Move migrator_output_handler to an interface
  [ticket/13126] Extends migrator_output_handler instead of using a closure
  [ticket/13126] Improve the feedback when running the migrations
2014-10-25 12:09:20 -07:00
Nils Adermann
6308a442d1 Merge pull request #3060 from marc1706/ticket/13211
[ticket/13211] Add log wrapper for writing database updater to log file
2014-10-25 12:04:29 -07:00
Marc Alexander
078e0c1e44 [ticket/13211] Move console migrator output handler back to console folder
PHPBB3-13211
2014-10-25 12:03:13 -07:00
Marc Alexander
8443463006 [ticket/13211] Also use log wrapper output handler for console migrations
PHPBB3-13211
2014-10-25 11:55:15 -07:00
Andreas Fischer
d2e3198407 Merge branch 'prep-release-3.1.0' into develop-ascraeus
* prep-release-3.1.0:
  [ticket/13210] Use the correct config value
2014-10-25 19:50:26 +02:00
Andreas Fischer
a43879fe91 Merge pull request #3061 from Elsensee/ticket/13210
[ticket/13210] Use the correct config value

* Elsensee/ticket/13210:
  [ticket/13210] Use the correct config value
2014-10-25 19:48:33 +02:00
Andreas Fischer
103c929ff0 Merge branch 'prep-release-3.1.0' into develop-ascraeus
* prep-release-3.1.0:
  [ticket/13208] Add security issues to the final changelog
  [prep-release-3.1.0] Prepare Changelog
  [prep-release-3.1.0] Update version to 3.1.0
2014-10-25 19:39:50 +02:00
Oliver Schramm
a9a67b08a5 [ticket/13210] Use the correct config value
PHPBB3-13210
2014-10-25 14:28:56 +02:00
Marc Alexander
b27b9a6984 [ticket/13211] Move console migrator output handler to db folder
PHPBB3-13211
2014-10-24 13:33:26 -07:00
Marc Alexander
516bd9ea51 [ticket/13211] Add log wrapper for writing database updater to log file
PHPBB3-13211
2014-10-24 13:22:56 -07:00
Marc Alexander
14300a1475 Merge remote-tracking branch 'Nicofuma/ticket/13126' into ticket/13211 2014-10-24 13:22:39 -07:00
Marc Alexander
6217a51920 Merge pull request #3059 from nickvergessen/ticket/13208
[ticket/13208] Add security issues to the final changelog
2014-10-23 08:56:01 -04:00
Joas Schilling
c814483627 [ticket/13208] Add security issues to the final changelog
PHPBB3-13208
2014-10-23 12:36:27 +02:00
Joas Schilling
1cd09a03e6 [prep-release-3.1.0] Prepare Changelog 2014-10-23 12:25:52 +02:00
Joas Schilling
80a9c24b6b [prep-release-3.1.0] Update version to 3.1.0 2014-10-23 12:22:02 +02:00
Joas Schilling
08f365236a Merge branch 'prep-release-3.1.0-RC6' into develop-ascraeus 2014-10-23 02:44:45 +02:00
Joas Schilling
7a90184421 [prep-release-3.1.0-RC6] Update phpBB Version for RC7 development 2014-10-23 02:44:18 +02:00
Joas Schilling
5847a50334 [prep-release-3.1.0-RC6] Add changelog for 3.1.0-RC6 2014-10-23 01:57:59 +02:00
Joas Schilling
1ade9b39e4 [prep-release-3.1.0-RC6] Prepare Changelog 2014-10-23 01:55:48 +02:00
Joas Schilling
4c94e44710 [prep-release-3.1.0-RC6] Add migration for 3.1.0-RC6 2014-10-23 01:50:12 +02:00
Joas Schilling
d640a37984 [prep-release-3.1.0-RC6] Update version to 3.1.0-RC6 2014-10-23 01:48:38 +02:00
Joas Schilling
e4c8e4905c Merge pull request #3 from phpbb/ticket/security-161
[ticket/security-161] Add form token to styles management form.
2014-10-23 01:38:12 +02:00
Cesar G
4d30633cd4 [ticket/security-161] Add form token to styles management form.
SECURITY-161
2014-10-22 15:46:00 -07:00
Marc Alexander
6a0727acdc Merge pull request #3058 from naderman/ticket/13205
[ticket/13205] Add a mark all messages read link to PM folders
2014-10-22 17:39:13 -05:00
Nils Adermann
df72846b89 [ticket/13205] Explicitly cast ids to integers and reformat SQL
PHPBB3-13205
2014-10-22 18:35:07 -04:00
Nils Adermann
b5594371ab [ticket/13205] Remove superfluous newline
PHPBB3-13205
2014-10-22 18:31:29 -04:00
Nils Adermann
d7553893c4 Merge pull request #3057 from marc1706/ticket/security-159
[ticket/security-159] Only show first 8 characters of login keys in UCP
2014-10-22 18:20:46 -04:00
Nils Adermann
48dc4c02ae [ticket/13205] Add a mark all messages read link to PM folders
PHPBB3-13205
2014-10-22 18:02:43 -04:00
Marc Alexander
f796f92058 [ticket/security-159] Only show first 8 characters of login keys in UCP
SECURITY-159
2014-10-22 16:21:16 -05:00
Nils Adermann
fad280f94b Merge pull request #3056 from marc1706/ticket/13203
[ticket/13203] Use constant time comparison method for comparing password hashes
2014-10-22 16:57:50 -04:00
Marc Alexander
cf9d1fbd1a [ticket/13203] Fix passwords manager tests
PHPBB3-13203
2014-10-22 15:09:58 -05:00
Marc Alexander
0bc04a4df0 [ticket/13203] Use string_compare method in passwords drivers
PHPBB3-13203
2014-10-22 14:54:55 -05:00
Marc Alexander
2b47ef1266 [ticket/13203] Add method for byte by byte comparison to drivers helper
PHPBB3-13203
2014-10-22 14:54:22 -05:00
Tristan Darricau
fdece6cdf3 [ticket/13126] Add missing use statement
PHPBB3-13126
2014-10-22 15:25:50 +02:00
Marc Alexander
a623868f20 [ticket/13192] Pass correct parameters and rename method to get_valid_page
PHPBB3-13192
2014-10-21 22:38:03 -05:00
Marc Alexander
ce8c09f51f [ticket/13192] Use get_valid_user_page in confirm_box() and cleanup globals
The $request global existed twice and the $phpEx global is not being used
in confirm_box().

PHPBB3-13192
2014-10-21 22:17:48 -05:00
Marc Alexander
c381ad2002 [ticket/13192] Use get_valid_user_page method in build_url function
PHPBB3-13192
2014-10-21 22:17:24 -05:00
Marc Alexander
40497ec824 [ticket/13192] Add method for generating valid user page links
PHPBB3-13192
2014-10-21 22:16:53 -05:00
Marc Alexander
e43d1781bf Merge branch 'develop-olympus' into develop-ascraeus
Conflicts:
	phpBB/docs/AUTHORS
2014-10-21 19:24:48 -05:00
Marc Alexander
d51c1707e3 Merge pull request #3051 from nickvergessen/ticket/12120
[ticket/12120] Remove EXreaction from active authors
2014-10-21 19:22:11 -05:00
Marc Alexander
faec26b873 Merge pull request #3053 from Senky/ticket/13194
[ticket/13194] BBCode isn't parsed when issuing a warning for a post
2014-10-21 18:57:43 -05:00
Marc Alexander
0de7adfa37 Merge pull request #3052 from VSEphpbb/ticket/13041
[ticket/13041] Help_faq.php language file needs to be revised
2014-10-21 18:53:51 -05:00
Jakub Senko
5581a30f58 [ticket/13193] Make template more readable
PHPBB3-13193
2014-10-21 23:12:00 +02:00
Jakub Senko
0dcfcf5854 [ticket/13193] Add load_search config check
PHPBB3-13193
2014-10-21 22:53:59 +02:00
Jakub Senko
92f077a4e9 [ticket/13193] Add link to post count in PMs
PHPBB3-13193
2014-10-21 22:32:57 +02:00
Jakub Senko
defeb1a56f [ticket/13194] Use correct array to access bbcode_bitfield
PHPBB3-13194
2014-10-21 22:21:48 +02:00
Matt Friedman
4b99ab7066 [ticket/13041] Final grammar and language changes to help_faq
PHPBB3-13041
2014-10-21 09:54:25 -07:00
Joas Schilling
9cf81ac7f5 [ticket/12120] Remove EXreaction from active authors
PHPBB3-12120
2014-10-21 18:17:59 +02:00
Nils Adermann
1358acfd7c Merge pull request #3049 from marc1706/ticket/13189
[ticket/13189] Do not use confirm box for marking all notifications read
2014-10-21 09:49:16 -04:00
Marc Alexander
99eeb52b76 Merge pull request #3050 from prototech/ticket/13070
[ticket/13070] Adjust template hook name to match that provided in the class.
2014-10-20 22:44:33 -05:00
Cesar G
b9b15b7007 [ticket/13070] Adjust template hook name to match that provided in the class.
PHPBB3-13070
2014-10-20 19:59:56 -07:00
Marc Alexander
293d64e122 [ticket/13189] Do not use confirm box for marking all notifications read
We already use a token for preventing CSRF when marking notifications read.
Making a user confirm the marking read action serves no real purpose. No
information will be lost by just marking the notifications read but it will
prevent users from always having to confirm this action.

PHPBB3-13189
2014-10-20 21:55:36 -05:00
Andreas Fischer
b71cf56bda Merge pull request #3047 from Elsensee/ticket/13168
[ticket/13168] Fix mbstring warnings in ACP for PHP 5.6 compatibility

* Elsensee/ticket/13168:
  [ticket/13168] Fix mbstring warnings in ACP for PHP 5.6 compatibility
2014-10-20 23:20:42 +02:00
Andreas Fischer
afada9ed40 Merge branch 'develop-olympus' into develop-ascraeus
* develop-olympus:
  [ticket/13168] Fix mbstring warnings in ACP for PHP 5.6 compatibility
2014-10-20 23:20:42 +02:00
Joas Schilling
75b6545bc2 Merge pull request #3040 from nickvergessen/ticket/13138-asc
[3.1] Ticket/13138 Only use cookie data when we do not force a user_id

Conflicts:
	phpBB/phpbb/session.php
2014-10-20 22:19:25 +02:00
Nils Adermann
973dfbf868 Merge pull request #3048 from naderman/ticket/13188
[ticket/13188] Add missing where clause to post_id query in sphinx index
2014-10-20 15:30:08 -04:00
Nils Adermann
99f63f39eb Merge branch 'develop-olympus' into develop-ascraeus
* develop-olympus:
  [ticket/13138] Do not use cookie data and autologin while forcing a user_id

Conflicts:
	phpBB/phpbb/session.php
2014-10-20 14:53:38 -04:00
Nils Adermann
d4faeb064b Merge pull request #3039 from nickvergessen/ticket/13138
[ticket/13138] Only use cookie data when we do not force a user_id
2014-10-20 14:49:29 -04:00
Tristan Darricau
981d3005f3 [ticket/13126] Fix tests
PHPBB3-13126
2014-10-20 20:46:11 +02:00
Tristan Darricau
faf4b03c43 [ticket/13126] Change messages verbosity levels
PHPBB3-13126
2014-10-20 19:42:54 +02:00
Tristan Darricau
8f6fcd2744 [ticket/13126] Move migrator_output_handler to an interface
PHPBB3-13126
2014-10-20 19:41:32 +02:00
Nils Adermann
941cf6979e [ticket/13188] Correctly format string concatenation
PHPBB3-13188
2014-10-20 12:20:44 -04:00
Nils Adermann
566c8a1bbc [ticket/13188] Add missing where clause to post_id query in sphinx index
PHPBB3-13188
2014-10-20 12:08:35 -04:00
Oliver Schramm
53f166274a [ticket/13168] Fix mbstring warnings in ACP for PHP 5.6 compatibility
PHPBB3-13168
2014-10-20 16:47:52 +02:00
Joas Schilling
57a575b5f0 Merge pull request #3046 from Elsensee/ticket/13187
[ticket/13187] Fix HTML validity of INSTALL.html
2014-10-20 16:28:44 +02:00
Oliver Schramm
51044167d1 [ticket/13187] Fix HTML validity of INSTALL.html
PHPBB3-13187
2014-10-20 15:36:27 +02:00
Joas Schilling
009d59335f Merge pull request #2960 from prototech/ticket/12568
[ticket/12568] Update user docs
2014-10-20 15:21:00 +02:00
Joas Schilling
ec5729a99f Merge pull request #3045 from Elsensee/ticket/13186
[ticket/13186] Don't show link on post count when search disabled
2014-10-20 14:23:46 +02:00
Oliver Schramm
86c472f4f7 [ticket/13186] Don't show link on post count when search disabled
PHPBB3-13186
2014-10-20 13:25:07 +02:00
Oliver Schramm
30213816ae [ticket/13100] Display only confirmation buttons when deleting shadow topic
PHPBB3-13100
2014-10-20 00:24:16 +02:00
Marc Alexander
c939f1b2c7 Merge pull request #3030 from Senky/ticket/13164
[ticket/13164] data sent to core.submit_post_end event does not include fresh post_visibility
2014-10-18 21:47:15 -04:00
Marc Alexander
b3421e397d Merge pull request #3041 from nickvergessen/ticket/13171
[ticket/13171] Check the correct (soft)delete permission when deleting in MCP
2014-10-18 17:59:48 -04:00
Dhruv Goel
c6272fca07 Merge pull request #3042 from naderman/ticket/13181
[ticket/13181] Replace database credentials with placeholders in sphinx conf
2014-10-19 01:28:36 +05:30
Nils Adermann
e7ad87e15f [ticket/13181] Replace database credentials with placeholders in sphinx conf
PHPBB3-13181
2014-10-18 12:32:39 -04:00
Mario Skouat
737894027a [ticket/13041] Added multiple changes
- Improper english in some sentences.
- Improper use of singular/plural in some sentences
- Replace "the board administrator" by "a board administrator"
- Update the category "Posting Issues" and "Subscriptions and Bookmarks"

PHPBB3-13041
2014-10-18 13:28:18 +02:00
Oliver Schramm
0ba3bd9aed [ticket/11863] Add functional test
PHPBB3-11863
2014-10-17 23:33:28 +02:00
Oliver Schramm
f049fcd604 [ticket/11863] Display warning to user because of activation method
PHPBB3-11863
2014-10-17 15:42:11 +02:00
Oliver Schramm
01df1d3301 [ticket/11863] Grey out unavailable activation methods when emails disabled
Further fall back to USER_ACTIVATION_DISABLE when emails are disabled
but evaluate it at runtime.

PHPBB3-11863
2014-10-17 15:40:03 +02:00
Joas Schilling
66342f5b89 [ticket/13171] Check the correct (soft)delete permission when deleting in MCP
PHPBB3-13171
2014-10-17 15:39:20 +02:00
Joas Schilling
dec6c7ea8c [ticket/13138] Type hint the variables for IDE usage
PHPBB3-13138
2014-10-17 14:53:56 +02:00
Joas Schilling
f847a1a567 [ticket/13138] Fix the session key tests
PHPBB3-13138
2014-10-17 14:50:14 +02:00
Cesar G
6763de2f25 [ticket/12568] Fix awkward use of "phpBB Limited."
PHPBB3-12568
2014-10-16 20:37:26 -07:00
Cesar G
09b6add6ee [ticket/12568] The "Purge cache" option in the Customise tab no longer exists.
PHPBB3-12568
2014-10-16 20:33:24 -07:00
Cesar G
810d249ca2 [ticket/12568] Update GitHub link.
PHPBB3-12568
2014-10-16 20:20:15 -07:00
Cesar G
29ea1c85b4 [ticket/12568] Fix typo - "directorie" -> "directories"
PHPBB3-12568
2014-10-16 20:18:52 -07:00
Cesar G
f19a6b9714 [ticket/12568] Remove various unnecessary references to phpBB3.
PHPBB3-12568
2014-10-16 20:17:01 -07:00
Cesar G
d06c2cf0f7 [ticket/12568] Update style installation instructions.
PHPBB3-12568
2014-10-16 19:47:02 -07:00
Cesar G
7e08109229 [ticket/12568] Update path to language pack installation page.
PHPBB3-12568
2014-10-16 19:47:02 -07:00
Cesar G
defd36ad7f [ticket/12568] Replace modifications explanation with extensions.
PHPBB3-12568
2014-10-16 19:47:02 -07:00
Cesar G
39e51e5599 Merge remote-tracking branch 'PayBas/ticket/12796' into develop-ascraeus
* PayBas/ticket/12796:
  [ticket/12796] Use dedicated lang vars
  [ticket/12796] Use &amp; in path
  [ticket/12796] Add view own profile to UCP (and vice versa)
2014-10-16 19:32:11 -07:00
Cesar G
6768490f69 Merge remote-tracking branch 'PayBas/ticket/13163' into develop-ascraeus
* PayBas/ticket/13163:
  [ticket/13163] Check for images
  [ticket/13163] Terminate timely when no data-last links exist
  [ticket/13163] Fix responsive link lists
2014-10-16 19:19:53 -07:00
Joas Schilling
55b97ffc27 Merge branch 'ticket/13138-2' into ticket/13138-asc
Conflicts:
	phpBB/phpbb/session.php
2014-10-16 12:48:13 +02:00
Joas Schilling
e7e016637b [ticket/13138] Do not use cookie data and autologin while forcing a user_id
PHPBB3-13138
2014-10-16 12:32:48 +02:00
Tristan Darricau
58075e25e8 [ticket/13126] Extends migrator_output_handler instead of using a closure
PHPBB3-13126
2014-10-16 01:34:23 +02:00
Joas Schilling
e1af6584d9 Merge pull request #3038 from prototech/ticket/12530
[ticket/12530] Move style and class to parent <a>.
2014-10-15 21:15:08 +02:00
Cesar G
23a513baec [ticket/12530] Move style and class to parent <a>.
PHPBB3-12530
2014-10-15 10:35:13 -07:00
Joas Schilling
b343bf783a Merge pull request #3037 from PayBas/ticket/13169
[ticket/13169] Fix RTL forms in responsive mode
2014-10-15 18:56:11 +02:00
Joas Schilling
8be701db0a Merge pull request #2938 from PayBas/ticket/12530
[ticket/12530] Fix captcha challange image breaking responsive layout
2014-10-15 18:47:45 +02:00
Joas Schilling
90771c1762 Merge pull request #3024 from marc1706/ticket/13124
[ticket/13124] Also trim spaces in front of comments except for first line
2014-10-15 18:31:46 +02:00
Joas Schilling
759950c1a6 Merge pull request #3036 from prototech/ticket/13177
[ticket/13177] Fix display of post count-based ranks in viewtopic.
2014-10-15 18:29:23 +02:00
PayBas
205be67622 [ticket/13169] Fix RTL forms in responsive mode
PHPBB3-13169
2014-10-15 17:08:11 +02:00
PayBas
1a128f9a76 [ticket/12796] Use dedicated lang vars
PHPBB3-12796
2014-10-15 16:07:01 +02:00
PayBas
223ae1dfc2 [ticket/13163] Check for images
PHPBB3-13163
2014-10-15 13:06:54 +02:00
PayBas
965894a875 [ticket/12530] Combine logo and TOS link into one
PHPBB3-12530
2014-10-15 12:08:55 +02:00
Cesar G
5c54e96aab [ticket/13177] Fix display of post count-based ranks in viewtopic.
PHPBB3-13177
2014-10-14 15:24:57 -07:00
Tristan Darricau
56d7c2c6ed [ticket/13126] Improve the feedback when running the migrations
PHPBB3-13126
2014-10-14 17:58:29 +02:00
Cesar G
df75b70f3e Merge remote-tracking branch 'PayBas/ticket/13174' into develop-ascraeus
* PayBas/ticket/13174:
  [ticket/13174] Add missing closing </div> to ucp_pm_viewmessage
2014-10-14 07:32:54 -07:00
PayBas
4bdae294cb [ticket/12796] Use &amp; in path
PHPBB3-12796
2014-10-14 12:58:07 +02:00
PayBas
253c6e1fc1 [ticket/12796] Add view own profile to UCP (and vice versa)
PHPBB3-12796
2014-10-14 10:59:03 +02:00
PayBas
9c4ba813d4 [ticket/13174] Add missing closing </div> to ucp_pm_viewmessage
PHPBB3-13174
2014-10-14 10:08:48 +02:00
PayBas
41d660dd98 [ticket/13163] Terminate timely when no data-last links exist
PHPBB3-13163
2014-10-14 00:05:22 +02:00
PayBas
36d1f87c5a [ticket/13163] Fix responsive link lists
PHPBB3-13163
2014-10-13 23:29:01 +02:00
Jakub Senko
9bc9e42c94 [ticket/13164] Fix syntax error
PHPBB3-13164
2014-10-11 17:58:41 +02:00
Jakub Senko
eb7152436c [ticket/13164] Add post_visibility to core.submit_post_end event
PHPBB3-13164
2014-10-11 16:56:03 +02:00
Mario Skouat
2bc79701e6 [ticket/13041] Added multiple changes
- Added the changes reported by VSE.

PHPBB3-13041
2014-10-11 10:43:01 +02:00
Tristan Darricau
29b54d12cc Merge pull request #3029 from nickvergessen/ticket/13161
Ticket/13161 PHP Warnings issued from phpbb database test case

* nickvergessen/ticket/13161:
  [ticket/13161] Check whether the schema exists, before deleting it
  [ticket/13161] Avoid problems when running tests with different migrations
2014-10-10 15:55:03 +02:00
Joas Schilling
1a04d15d4d [ticket/13161] Check whether the schema exists, before deleting it
PHPBB3-13161
2014-10-10 15:26:29 +02:00
Joas Schilling
f6fc8c08a4 [ticket/13161] Avoid problems when running tests with different migrations
PHPBB3-13161
2014-10-10 15:26:28 +02:00
Jakub Senko
699c642128 [ticket/13164] Update post_visibility before event is triggered
PHPBB3-13164
2014-10-10 14:24:46 +02:00
Tristan Darricau
d285363700 [ticket/13133] Add unit tests
PHPBB3-13133
2014-10-09 19:54:56 +02:00
Marc Alexander
a9ed32663a [ticket/13124] Add another test case as requested
PHPBB3-13124
2014-10-09 13:30:10 -04:00
Tristan Darricau
911831a9c5 [ticket/13133] Allow @vendor_name for includecss
PHPBB3-13133
2014-10-08 18:25:36 +02:00
Mario Skouat
97db218829 [ticket/13041] Added multiple changes
- "phpBB3" replaced by "phpBB"
- Added the changes suggested by VSE.
- "Subscriptions and Bookmarks" reviewed
- Added trailing comma on modified lines

PHPBB3-13041
2014-10-08 00:14:00 +02:00
Joas Schilling
5b186c936d Merge branch 'prep-release-3.1.0-RC5' into develop-ascraeus 2014-10-07 22:11:14 +02:00
Joas Schilling
eed4d0d30f [prep-release-3.1.0-RC5] Update phpBB Version for RC6 development 2014-10-07 22:10:45 +02:00
PayBas
757c67b7d8 [ticket/12530] Show logo and policy in responsive
PHPBB3-12530
2014-10-07 20:49:39 +02:00
PayBas
66ecbd8545 [ticket/12530] Fix captcha challange image breaking responsive layout
PHPBB3-12530
2014-10-07 18:30:20 +02:00
Marc Alexander
7bcf6a621f [ticket/13124] Fix tests for event exporter
PHPBB3-13124
2014-10-06 16:53:41 +02:00
Marc Alexander
825af557ae [ticket/13124] Also trim spaces in front of comments except for first line
PHPBB3-13124
2014-10-06 16:09:56 +02:00
Mario Skouat
e5a5933db6 [ticket/13041] Updating "Topic Subscriptions and Bookmarks"
PHPBB3-13041
2014-10-02 12:57:17 +02:00
Mario Skouat
8c628a6dc2 [ticket/13041] Updating "phpBB3 Issues"
PHPBB3-13041
2014-10-02 12:56:56 +02:00
Mario Skouat
1fb4ebb34a [ticket/13041] Updating "Searching the Forums"
PHPBB3-13041
2014-10-02 11:54:48 +02:00
Mario Skouat
64eec22884 [ticket/13041] Updating "Posting Issues"
PHPBB3-13041
2014-10-02 11:53:39 +02:00
Mario Skouat
abb1244b44 [ticket/13041] Updating "Login and Registration Issues"
PHPBB3-13041
2014-10-02 10:27:48 +02:00
Mario Skouat
e816006b8e [ticket/13041] Updating "User Preferences and settings"
PHPBB3-13041
2014-10-01 20:14:30 +02:00
Jakub Senko
ca7f4fb531 [ticket/10985] Add fix to properly inherit style during update process
PHPBB3-10985
2014-09-23 23:03:07 +02:00
Dhruv
29ffddee71 [ticket/12962] bootstrap functional and ui test when php >5.3.19
PHPBB3-12962
2014-09-21 15:54:52 +05:30
Dhruv
7fa596a991 [ticket/12962] Install test dependencies on travis
PHPBB3-12962
2014-09-21 14:24:36 +05:30
Dhruv
77d52982c8 [ticket/12962] Add facebook/webdriver dependency
Create a new composer.json for tests dir and add
facebook/webdriver dependency

PHPBB3-12962
2014-09-21 14:24:29 +05:30
Mario Skouat
39d46e2599 [ticket/13041] Reordering "Login and Registration Issues"
PHPBB3-13041
2014-09-21 10:43:10 +02:00
Dhruv
a1dff65cd1 [ticket/12962] Fix whitespace characters
PHPBB3-12962
2014-09-21 13:53:28 +05:30
Dhruv
a2627e8790 [ticket/12962] Run tests for all databases on Travis
PHPBB3-12962
2014-09-21 13:53:26 +05:30
Dhruv
20dfb23dd4 [ticket/12962] Force language=en for UI tests installation
PHPBB3-12962
2014-09-21 13:53:24 +05:30
Dhruv
d1935b0b0b [ticket/12962] Dump server output to /dev/null
PHPBB3-12962
2014-09-21 13:53:23 +05:30
Dhruv
039b466bd0 [ticket/12962] Start phantomjs on travis in background
PHPBB3-12962
2014-09-21 13:53:20 +05:30
Dhruv
c371e86fa1 [ticket/12962] Mark test skipped when phantom server not running
PHPBB3-12962
2014-09-21 13:53:19 +05:30
Dhruv
8d0933ca4b [ticket/12962] Add setup-phantomjs-server.sh
PHPBB3-12962
2014-09-21 13:53:17 +05:30
Dhruv
6de352f7da [ticket/12962] Run UI tests on Travis-mysql
PHPBB3-12962
2014-09-21 13:53:15 +05:30
Dhruv
c0d3cf6a27 [ticket/12962] Add UI tests to phpunit.xml.dist
PHPBB3-12962
2014-09-21 13:53:14 +05:30
Dhruv
f21ef60175 [ticket/12962] Add quick-links JS test
PHPBB3-12962
2014-09-21 13:53:08 +05:30
Dhruv
77f8bb48fe [ticket/12962] Add initial class for ui_testing
PHPBB3-12962
2014-09-21 12:07:06 +05:30
487 changed files with 12166 additions and 2975 deletions

8
.gitignore vendored
View File

@@ -1,9 +1,8 @@
*~
/phpunit.xml
/phpBB/cache/twig/*
/phpBB/cache/*.html
/phpBB/cache/*.php
/phpBB/cache/*.lock
/phpBB/cache/*
!/phpBB/cache/.htaccess
!/phpBB/cache/index.html
/phpBB/composer.phar
/phpBB/config*.php
/phpBB/ext/*
@@ -22,3 +21,4 @@
/tests/phpbb_unit_tests.sqlite*
/tests/test_config*.php
/tests/tmp/*
/tests/vendor

78
.jscsrc Normal file
View File

@@ -0,0 +1,78 @@
{
"excludeFiles": ["node_modules/**", "**/build/**"],
"requireCurlyBraces": [
"if", "else", "for", "while", "do", "try", "catch"
],
"requireSpaceBeforeKeywords": [
"else", "while", "catch"
],
"requireSpaceAfterKeywords": [
"do", "for", "if", "else", "switch", "case", "try", "catch", "while", "return", "typeof"
],
"requireSpaceBeforeBlockStatements": true,
"requireParenthesesAroundIIFE": true,
"requireSpacesInConditionalExpression": {
"afterTest": true,
"beforeConsequent": true,
"afterConsequent": true,
"beforeAlternate": true
},
"requireSpacesInAnonymousFunctionExpression": {
"beforeOpeningCurlyBrace": true
},
"disallowSpacesInNamedFunctionExpression": {
"beforeOpeningRoundBrace": true
},
"requireSpacesInFunction": {
"beforeOpeningCurlyBrace": true
},
"disallowSpacesInCallExpression": true,
"requireBlocksOnNewline": true,
"requirePaddingNewlinesBeforeKeywords": ["case"],
"disallowEmptyBlocks": true,
"disallowSpacesInsideArrayBrackets": "nested",
"disallowSpacesInsideParentheses": true,
"requireSpacesInsideObjectBrackets": "all",
"disallowQuotedKeysInObjects": "allButReserved",
"disallowSpaceAfterObjectKeys": true,
"requireSpaceBeforeObjectValues": true,
"requireCommaBeforeLineBreak": true,
"requireOperatorBeforeLineBreak": [
"?", "=", "+", "-", "/", "*", "===", "!==", ">", ">=", "<", "<="
],
"disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"],
"disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],
"requireSpaceBeforeBinaryOperators": [
"=", "+", "+=", "-", "-=", "/", "/=", "*", "*=", "===", "!==", "<", "<=", ">", ">="
],
"requireSpaceAfterBinaryOperators": [
"=", "+", "+=", "-", "-=", "/", "/=", "*", "*=", "===", "!==", "<", "<=", ">", ">="
],
"disallowKeywords": ["with"],
"disallowMultipleLineStrings": true,
"disallowMixedSpacesAndTabs": "smart",
"disallowTrailingWhitespace": true,
"disallowTrailingComma": true,
"disallowKeywordsOnNewLine": ["else"],
"requireLineFeedAtFileEnd": true,
"maximumLineLength": {
"value": 120,
"tabSize": 4,
"allowUrlComments": true,
"allowRegex": true
},
"requireCapitalizedConstructors": true,
"requireDotNotation": true,
"disallowYodaConditions": true,
"requireSpaceAfterLineComment": {
"allExcept": ["#", "="]
},
"disallowNewlineBeforeBlockStatements": true,
"validateQuoteMarks": {
"mark": "'",
"escape": true
},
"validateParameterSeparator": ", ",
"safeContextKeyword": ["that"]
}

24
.jshintrc Normal file
View File

@@ -0,0 +1,24 @@
{
"bitwise": true,
"curly": true,
"eqeqeq": true,
"es3": true,
"forin": false,
"freeze": true,
"newcap": true,
"noarg": true,
"noempty": true,
"nonbsp": true,
"undef": true,
"unused": true,
"strict": true,
"browser": true,
"devel": true,
"jquery": true,
"globals": {
"JSON": true
}
}

View File

@@ -16,13 +16,18 @@ matrix:
env: DB=postgres
- php: 5.4
env: DB=sqlite3
- php: 5.4
env: DB=mysqli;SLOWTESTS=1
- php: 5.5
env: DB=mysqli
- php: 5.6
env: DB=mysqli
- php: 7.0
env: DB=mysqli
- php: hhvm
env: DB=mysqli
allow_failures:
- php: 7.0
- php: hhvm
fast_finish: true
@@ -34,12 +39,15 @@ install:
before_script:
- travis/setup-database.sh $DB $TRAVIS_PHP_VERSION
- phantomjs --webdriver=8910 > /dev/null &
script:
- travis/phing-sniff.sh $DB $TRAVIS_PHP_VERSION
- travis/check-sami-parse-errors.sh $DB $TRAVIS_PHP_VERSION
- travis/check-image-icc-profiles.sh $DB $TRAVIS_PHP_VERSION
- travis/check-executable-files.sh $DB $TRAVIS_PHP_VERSION ./
- phpBB/vendor/bin/phpunit --configuration travis/phpunit-$DB-travis.xml
- sh -c "if [ '$SLOWTESTS' != '1' -a '$DB' = 'mysqli' ]; then phpBB/vendor/bin/phpunit tests/lint_test.php; fi"
- sh -c "if [ '$SLOWTESTS' != '1' ]; then phpBB/vendor/bin/phpunit --configuration travis/phpunit-$DB-travis.xml; fi"
- sh -c "if [ '$SLOWTESTS' = '1' ]; then phpBB/vendor/bin/phpunit --configuration travis/phpunit-$DB-travis.xml --group slow; fi"
- sh -c "if [ '$TRAVIS_PHP_VERSION' = '5.3.3' -a '$DB' = 'mysqli' -a '$TRAVIS_PULL_REQUEST' != 'false' ]; then git-tools/commit-msg-hook-range.sh origin/$TRAVIS_BRANCH..FETCH_HEAD; fi"

6
CONTRIBUTING.md Normal file
View File

@@ -0,0 +1,6 @@
## CONTRIBUTE
1. [Create an account on phpBB.com](http://www.phpbb.com/community/ucp.php?mode=register)
2. [Create a ticket (unless there already is one)](http://tracker.phpbb.com/secure/CreateIssue!default.jspa)
3. Read our [Coding guidelines](https://wiki.phpbb.com/Coding_guidelines) and [Git Contribution Guidelines](http://wiki.phpbb.com/Git); if you're new to git, also read [the introduction guide](http://wiki.phpbb.com/display/DEV/Working+with+Git)
4. Send us a pull request

View File

@@ -27,9 +27,9 @@ To be able to run an installation from the repo (and not from a pre-built packag
We have unit and functional tests in order to prevent regressions. You can view the bamboo continuous integration [here](http://bamboo.phpbb.com) or check our travis build below:
* develop [![Build Status](https://secure.travis-ci.org/phpbb/phpbb.png?branch=develop)](http://travis-ci.org/phpbb/phpbb)
* develop-ascraeus [![Build Status](https://secure.travis-ci.org/phpbb/phpbb.png?branch=develop-ascraeus)](http://travis-ci.org/phpbb/phpbb)
* develop-olympus [![Build Status](https://secure.travis-ci.org/phpbb/phpbb.png?branch=develop-olympus)](http://travis-ci.org/phpbb/phpbb)
* [![Build Status](https://secure.travis-ci.org/phpbb/phpbb.png?branch=master)](http://travis-ci.org/phpbb/phpbb) **master** - Latest development version
* [![Build Status](https://secure.travis-ci.org/phpbb/phpbb.png?branch=3.1.x)](http://travis-ci.org/phpbb/phpbb) **3.1.x** - Development of version 3.1.x
* [![Build Status](https://secure.travis-ci.org/phpbb/phpbb.png?branch=3.0.x)](http://travis-ci.org/phpbb/phpbb) **3.0.x** - Development of version 3.0.x
## LICENSE

View File

@@ -2,9 +2,9 @@
<project name="phpBB" description="The phpBB forum software" default="all" basedir="../">
<!-- a few settings for the build -->
<property name="newversion" value="3.1.0-RC5" />
<property name="prevversion" value="3.1.0-RC4" />
<property name="olderversions" value="3.0.12, 3.1.0-a1, 3.1.0-a2, 3.1.0-a3, 3.1.0-b1, 3.1.0-b2, 3.1.0-b3, 3.1.0-b4, 3.1.0-RC1, 3.1.0-RC2, 3.1.0-RC3" />
<property name="newversion" value="3.1.5" />
<property name="prevversion" value="3.1.4" />
<property name="olderversions" value="3.0.12, 3.0.13, 3.0.13-PL1, 3.0.14, 3.1.0, 3.1.1, 3.1.2, 3.1.3, 3.1.5-RC1" />
<!-- no configuration should be needed beyond this point -->
<property name="oldversions" value="${olderversions}, ${prevversion}" />
@@ -75,14 +75,14 @@
<target name="sniff">
<exec command="phpBB/vendor/bin/phpcs
-s
-s -p
--extensions=php
--standard=build/code_sniffer/ruleset-php-strict-core.xml
--ignore=${project.basedir}/phpBB/phpbb/db/migration/data/v30x/*
phpBB/phpbb"
dir="." returnProperty="retval-php-strict" passthru="true" />
<exec command="phpBB/vendor/bin/phpcs
-s
-s -p
--extensions=php
--standard=build/code_sniffer/ruleset-php-legacy-core.xml
--ignore=${project.basedir}/phpBB/cache/*
@@ -98,7 +98,7 @@
phpBB"
dir="." returnProperty="retval-php-legacy" passthru="true" />
<exec command="phpBB/vendor/bin/phpcs
-s
-s -p
--extensions=php
--standard=build/code_sniffer/ruleset-php-extensions.xml
--ignore=${project.basedir}/phpBB/ext/*/tests/*
@@ -117,9 +117,16 @@
</if>
</target>
<!-- Builds docs for current branch into build/api/output/master -->
<target name="docs">
<exec dir="."
command="phpBB/vendor/bin/sami.php update build/sami.conf.php"
command="phpBB/vendor/bin/sami.php update build/sami-checkout.conf.php"
passthru="true" />
</target>
<!-- Builds docs for multiple branches/tags into build/api/output/$branch -->
<target name="docs-all">
<exec dir="."
command="phpBB/vendor/bin/sami.php update build/sami-all.conf.php"
passthru="true" />
</target>
@@ -142,7 +149,7 @@
<property name="dir" value="build/old_versions/release-${version}" />
</phingcall>
<exec dir="build/old_versions" command="LC_ALL=C diff -crNEBwd release-${version} release-${newversion} >
<exec dir="build/old_versions" command="LC_ALL=C diff -crNEBZbd release-${version} release-${newversion} >
../new_version/patches/phpBB-${version}_to_${newversion}.patch" escape="false" />
<exec dir="build/old_versions" command="LC_ALL=C diff -qr release-${version} release-${newversion} | grep 'Only in release-${version}' > ../new_version/patches/phpBB-${version}_to_${newversion}.deleted" escape="false" />
</target>
@@ -170,13 +177,13 @@
<target name="package" depends="clean,prepare,prepare-new-version,old-version-diffs">
<exec dir="build" command="php -f package.php '${versions}' > logs/package.log" escape="false" />
<exec dir="build" escape="false"
command="diff -crNEBwd old_versions/release-${prevversion}/language new_version/phpBB3/language >
command="LC_ALL=C diff -crNEBZbd old_versions/release-${prevversion}/language new_version/phpBB3/language >
save/phpbb-${prevversion}_to_${newversion}_language.patch" />
<exec dir="build" escape="false"
command="diff -crNEBwd old_versions/release-${prevversion}/styles/prosilver new_version/phpBB3/styles/prosilver >
command="LC_ALL=C diff -crNEBZbd old_versions/release-${prevversion}/styles/prosilver new_version/phpBB3/styles/prosilver >
save/phpbb-${prevversion}_to_${newversion}_prosilver.patch" />
<exec dir="build" escape="false"
command="diff -crNEBwd old_versions/release-${prevversion}/styles/subsilver2 new_version/phpBB3/styles/subsilver2 >
command="LC_ALL=C diff -crNEBZbd old_versions/release-${prevversion}/styles/subsilver2 new_version/phpBB3/styles/subsilver2 >
save/phpbb-${prevversion}_to_${newversion}_subsilver2.patch" />
<exec dir="build" escape="false"

View File

@@ -20,7 +20,7 @@ if ($_SERVER['argc'] != 2)
$fixVersion = $_SERVER['argv'][1];
$query = 'project = PHPBB3
$query = 'project IN (PHPBB3, SECURITY)
AND resolution = Fixed
AND fixVersion = "' . $fixVersion . '"
AND status IN ("Unverified Fix", Closed)';

View File

@@ -22,11 +22,11 @@ class build_package
// -r - compare recursive
// -N - Treat missing files as empty
// -E - Ignore tab expansions
// not used: -b - Ignore space changes.
// -w - Ignore all whitespace
// -Z - Ignore white space at line end.
// -b - Ignore changes in the amount of white space.
// -B - Ignore blank lines
// -d - Try to find smaller set of changes
var $diff_options = '-crNEBwd';
var $diff_options = '-crNEBZbd';
var $diff_options_long = '-x images -crNEB'; // -x fonts -x imageset //imageset not used here, because it includes the imageset.cfg file. ;)
var $verbose = false;

View File

@@ -60,14 +60,14 @@ class phpbb_Sniffs_Commenting_FileCommentSniff implements PHP_CodeSniffer_Sniff
return;
}
// Mark as error if this is not a doc comment
else if ($start === false || $tokens[$start]['code'] !== T_DOC_COMMENT)
else if ($start === false || $tokens[$start]['code'] !== T_DOC_COMMENT_OPEN_TAG)
{
$phpcsFile->addError('Missing required file doc comment.', $stackPtr);
return;
}
// Find comment end token
$end = $phpcsFile->findNext(T_DOC_COMMENT, $start + 1, null, true) - 1;
$end = $tokens[$start]['comment_closer'];
// If there is no end, skip processing here
if ($end === false)
@@ -75,38 +75,30 @@ class phpbb_Sniffs_Commenting_FileCommentSniff implements PHP_CodeSniffer_Sniff
return;
}
// List of found comment tags
$tags = array();
// check comment lines without the first(/**) an last(*/) line
for ($i = $start + 1, $c = $end - 1; $i <= $c; ++$i)
for ($token = $start + 1, $c = $end - 2; $token <= $c; ++$token)
{
$line = $tokens[$i]['content'];
// Check that each line starts with a '*'
if (substr($line, 0, 1) !== '*')
if ($tokens[$token]['column'] === 1 && (($tokens[$token]['content'] !== '*' && $tokens[$token]['content'] !== ' ') || ($tokens[$token]['content'] === ' ' && $tokens[$token + 1]['content'] !== '*')))
{
$message = 'The file doc comment should not be idented.';
$phpcsFile->addWarning($message, $i);
}
else if (preg_match('/^\*\s+@([\w]+)\s+(.*)$/', $line, $match) !== 0)
{
if (!isset($tags[$match[1]]))
{
$tags[$match[1]] = array();
}
$tags[$match[1]][] = array($match[2], $i);
$message = 'The file doc comment should not be indented.';
$phpcsFile->addWarning($message, $token);
}
}
// Check that the first and last line is empty
if (trim($tokens[$start + 1]['content']) !== '*')
// /**T_WHITESPACE
// (T_WHITESPACE)*T_WHITESPACE
// (T_WHITESPACE)* ...
// (T_WHITESPACE)*T_WHITESPACE
// T_WHITESPACE*/
if (!(($tokens[$start + 2]['content'] !== '*' && $tokens[$start + 4]['content'] !== '*') || ($tokens[$start + 3]['content'] !== '*' && $tokens[$start + 6]['content'] !== '*')))
{
$message = 'The first file comment line should be empty.';
$phpcsFile->addWarning($message, ($start + 1));
}
if (trim($tokens[$end - 1]['content']) !== '*')
if ($tokens[$end - 3]['content'] !== '*' && $tokens[$end - 6]['content'] !== '*')
{
$message = 'The last file comment line should be empty.';
$phpcsFile->addWarning($message, $end - 1);
@@ -114,8 +106,8 @@ class phpbb_Sniffs_Commenting_FileCommentSniff implements PHP_CodeSniffer_Sniff
//$this->processPackage($phpcsFile, $start, $tags);
//$this->processVersion($phpcsFile, $start, $tags);
$this->processCopyright($phpcsFile, $start, $tags);
$this->processLicense($phpcsFile, $start, $tags);
$this->processCopyright($phpcsFile, $start, $tokens[$start]['comment_tags']);
$this->processLicense($phpcsFile, $start, $tokens[$start]['comment_tags']);
}
/**
@@ -176,17 +168,24 @@ class phpbb_Sniffs_Commenting_FileCommentSniff implements PHP_CodeSniffer_Sniff
protected function processCopyright(PHP_CodeSniffer_File $phpcsFile, $ptr, $tags)
{
$copyright = '(c) phpBB Limited <https://www.phpbb.com>';
$tokens = $phpcsFile->getTokens();
if (!isset($tags['copyright']))
foreach ($tags as $tag)
{
$message = 'Missing require @copyright tag in file doc comment.';
$phpcsFile->addError($message, $ptr);
}
else if ($tags['copyright'][0][0] !== $copyright)
{
$message = 'Invalid content found for the first @copyright tag, use "' . $copyright . '".';
$phpcsFile->addError($message, $tags['copyright'][0][1]);
if ($tokens[$tag]['content'] === '@copyright')
{
if ($tokens[$tag + 2]['content'] !== $copyright)
{
$message = 'Invalid content found for the first @copyright tag, use "' . $copyright . '".';
$phpcsFile->addError($message, $tags['copyright'][0][1]);
}
return;
}
}
$message = 'Missing require @copyright tag in file doc comment.';
$phpcsFile->addError($message, $ptr);
}
/**
@@ -201,22 +200,33 @@ class phpbb_Sniffs_Commenting_FileCommentSniff implements PHP_CodeSniffer_Sniff
protected function processLicense(PHP_CodeSniffer_File $phpcsFile, $ptr, $tags)
{
$license = 'GNU General Public License, version 2 (GPL-2.0)';
$tokens = $phpcsFile->getTokens();
if (!isset($tags['license']))
$found = false;
foreach ($tags as $tag)
{
if ($tokens[$tag]['content'] === '@license')
{
if ($found)
{
$message = 'It must be only one @license tag in file doc comment.';
$phpcsFile->addError($message, $ptr);
}
$found = true;
if ($tokens[$tag + 2]['content'] !== $license)
{
$message = 'Invalid content found for @license tag, use "' . $license . '".';
$phpcsFile->addError($message, $tags['license'][0][1]);
}
}
}
if (!$found)
{
$message = 'Missing require @license tag in file doc comment.';
$phpcsFile->addError($message, $ptr);
}
else if (sizeof($tags['license']) !== 1)
{
$message = 'It must be only one @license tag in file doc comment.';
$phpcsFile->addError($message, $ptr);
}
else if (trim($tags['license'][0][0]) !== $license)
{
$message = 'Invalid content found for @license tag, use '
. '"' . $license . '".';
$phpcsFile->addError($message, $tags['license'][0][1]);
}
}
}

View File

@@ -0,0 +1,143 @@
<?php
/**
*
* This file is part of the phpBB Forum Software package.
*
* @copyright (c) phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
* For full copyright and license information, please see
* the docs/CREDITS.txt file.
*
*/
/**
* Checks that the opening brace of a control structures is on the line after.
* From Generic_Sniffs_Functions_OpeningFunctionBraceBsdAllmanSniff
*/
class phpbb_Sniffs_ControlStructures_OpeningBraceBsdAllmanSniff implements PHP_CodeSniffer_Sniff
{
/**
* Registers the tokens that this sniff wants to listen for.
*/
public function register()
{
return array(
T_IF,
T_ELSE,
T_FOREACH,
T_WHILE,
T_DO,
T_FOR,
T_SWITCH,
);
}
/**
* Processes this test, when one of its tokens is encountered.
*
* @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
* @param int $stackPtr The position of the current token in the
* stack passed in $tokens.
*
* @return void
*/
public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
{
$tokens = $phpcsFile->getTokens();
if (isset($tokens[$stackPtr]['scope_opener']) === false)
{
return;
}
/*
* ...
* }
* else if ()
* {
* ...
*/
if ($tokens[$stackPtr]['code'] === T_ELSE && $tokens[$stackPtr + 2]['code'] === T_IF)
{
return;
}
$openingBrace = $tokens[$stackPtr]['scope_opener'];
/*
* ...
* do
* {
* <code>
* } while();
* ...
* }
* else
* {
* ...
*/
if ($tokens[$stackPtr]['code'] === T_DO ||$tokens[$stackPtr]['code'] === T_ELSE)
{
$cs_line = $tokens[$stackPtr]['line'];
}
else
{
// The end of the function occurs at the end of the argument list. Its
// like this because some people like to break long function declarations
// over multiple lines.
$cs_line = $tokens[$tokens[$stackPtr]['parenthesis_closer']]['line'];
}
$braceLine = $tokens[$openingBrace]['line'];
$lineDifference = ($braceLine - $cs_line);
if ($lineDifference === 0)
{
$error = 'Opening brace should be on a new line';
$phpcsFile->addError($error, $openingBrace, 'BraceOnSameLine');
return;
}
if ($lineDifference > 1)
{
$error = 'Opening brace should be on the line after the declaration; found %s blank line(s)';
$data = array(($lineDifference - 1));
$phpcsFile->addError($error, $openingBrace, 'BraceSpacing', $data);
return;
}
// We need to actually find the first piece of content on this line,
// as if this is a method with tokens before it (public, static etc)
// or an if with an else before it, then we need to start the scope
// checking from there, rather than the current token.
$lineStart = $stackPtr;
while (($lineStart = $phpcsFile->findPrevious(array(T_WHITESPACE), ($lineStart - 1), null, false)) !== false)
{
if (strpos($tokens[$lineStart]['content'], $phpcsFile->eolChar) !== false)
{
break;
}
}
// We found a new line, now go forward and find the first non-whitespace
// token.
$lineStart = $phpcsFile->findNext(array(T_WHITESPACE), $lineStart, null, true);
// The opening brace is on the correct line, now it needs to be
// checked to be correctly indented.
$startColumn = $tokens[$lineStart]['column'];
$braceIndent = $tokens[$openingBrace]['column'];
if ($braceIndent !== $startColumn)
{
$error = 'Opening brace indented incorrectly; expected %s spaces, found %s';
$data = array(
($startColumn - 1),
($braceIndent - 1),
);
$phpcsFile->addError($error, $openingBrace, 'BraceIndent', $data);
}
}
}

View File

@@ -24,6 +24,23 @@ class phpbb_Sniffs_Namespaces_UnusedUseSniff implements PHP_CodeSniffer_Sniff
return array(T_USE);
}
protected function check($phpcsFile, $found_name, $full_name, $short_name, $line)
{
if ($found_name === $full_name)
{
$error = 'Either use statement or full name must be used.';
$phpcsFile->addError($error, $line, 'FullName');
}
if ($found_name === $short_name)
{
return true;
}
return false;
}
/**
* {@inheritdoc}
*/
@@ -74,16 +91,7 @@ class phpbb_Sniffs_Namespaces_UnusedUseSniff implements PHP_CodeSniffer_Sniff
$simple_class_name = trim($phpcsFile->getTokensAsString($simple_class_name_start, ($simple_class_name_end - $simple_class_name_start)));
if ($simple_class_name === $class_name_full)
{
$error = 'Either use statement or full name must be used.';
$phpcsFile->addError($error, $simple_statement, 'FullName');
}
if ($simple_class_name === $class_name_short)
{
$ok = true;
}
$ok = $this->check($phpcsFile, $simple_class_name, $class_name_full, $class_name_short, $simple_statement) ? true : $ok;
}
}
@@ -98,16 +106,7 @@ class phpbb_Sniffs_Namespaces_UnusedUseSniff implements PHP_CodeSniffer_Sniff
$paamayim_nekudotayim_class_name = trim($phpcsFile->getTokensAsString($paamayim_nekudotayim_class_name_start + 1, ($paamayim_nekudotayim_class_name_end - $paamayim_nekudotayim_class_name_start)));
if ($paamayim_nekudotayim_class_name === $class_name_full)
{
$error = 'Either use statement or full name must be used.';
$phpcsFile->addError($error, $paamayim_nekudotayim, 'FullName');
}
if ($paamayim_nekudotayim_class_name === $class_name_short)
{
$ok = true;
}
$ok = $this->check($phpcsFile, $paamayim_nekudotayim_class_name, $class_name_full, $class_name_short, $paamayim_nekudotayim) ? true : $ok;
}
// Checks in implements
@@ -126,16 +125,7 @@ class phpbb_Sniffs_Namespaces_UnusedUseSniff implements PHP_CodeSniffer_Sniff
$implements_class_name = trim($phpcsFile->getTokensAsString($implements_class_name_start, ($implements_class_name_end - $implements_class_name_start)));
if ($implements_class_name === $class_name_full)
{
$error = 'Either use statement or full name must be used.';
$phpcsFile->addError($error, $implements, 'FullName');
}
if ($implements_class_name === $class_name_short)
{
$ok = true;
}
$ok = $this->check($phpcsFile, $implements_class_name, $class_name_full, $class_name_short, $implements) ? true : $ok;
}
}
@@ -145,34 +135,67 @@ class phpbb_Sniffs_Namespaces_UnusedUseSniff implements PHP_CodeSniffer_Sniff
{
$old_function_declaration = $function_declaration;
$end_function = $phpcsFile->findNext(array(T_CLOSE_PARENTHESIS), ($function_declaration + 1));
$old_argument = $function_declaration;
while (($argument = $phpcsFile->findNext(T_VARIABLE, ($old_argument + 1), $end_function)) !== false)
// Check docblocks
$find = array(
T_COMMENT,
T_DOC_COMMENT_CLOSE_TAG,
T_DOC_COMMENT,
T_CLASS,
T_FUNCTION,
T_OPEN_TAG,
);
$comment_end = $phpcsFile->findPrevious($find, ($function_declaration - 1));
if ($comment_end !== false)
{
$old_argument = $argument;
$start_argument = $phpcsFile->findPrevious(array(T_OPEN_PARENTHESIS, T_COMMA), $argument);
$argument_class_name_start = $phpcsFile->findNext(array(T_NS_SEPARATOR, T_STRING), ($start_argument + 1), $argument);
// Skip the parameter if no type is defined.
if ($argument_class_name_start !== false)
if ($tokens[$comment_end]['code'] === T_DOC_COMMENT_CLOSE_TAG)
{
$argument_class_name_end = $phpcsFile->findNext($find, ($argument_class_name_start + 1), null, true);
$comment_start = $tokens[$comment_end]['comment_opener'];
foreach ($tokens[$comment_start]['comment_tags'] as $tag) {
if ($tokens[$tag]['content'] !== '@param' && $tokens[$tag]['content'] !== '@return' && $tokens[$tag]['content'] !== '@throws') {
continue;
}
$argument_class_name = $phpcsFile->getTokensAsString($argument_class_name_start, ($argument_class_name_end - $argument_class_name_start - 1));
$classes = $tokens[($tag + 2)]['content'];
$space = strpos($classes, ' ');
if ($space !== false) {
$classes = substr($classes, 0, $space);
}
if ($argument_class_name === $class_name_full)
{
$error = 'Either use statement or full name must be used.';
$phpcsFile->addError($error, $function_declaration, 'FullName');
}
$tab = strpos($classes, "\t");
if ($tab !== false) {
$classes = substr($classes, 0, $tab);
}
if ($argument_class_name === $class_name_short)
{
$ok = true;
$classes = explode('|', str_replace('[]', '', $classes));
foreach ($classes as $class)
{
$ok = $this->check($phpcsFile, $class, $class_name_full, $class_name_short, $tokens[$tag + 2]['line']) ? true : $ok;
}
}
}
}
// Check type hint
$params = $phpcsFile->getMethodParameters($function_declaration);
foreach ($params as $param)
{
$ok = $this->check($phpcsFile, $param['type_hint'], $class_name_full, $class_name_short, $function_declaration) ? true : $ok;
}
}
// Checks in catch blocks
$old_catch = $stackPtr;
while (($catch = $phpcsFile->findNext(T_CATCH, ($old_catch + 1))) !== false)
{
$old_catch = $catch;
$caught_class_name_start = $phpcsFile->findNext(array(T_NS_SEPARATOR, T_STRING), $catch + 1);
$caught_class_name_end = $phpcsFile->findNext($find, $caught_class_name_start + 1, null, true);
$caught_class_name = trim($phpcsFile->getTokensAsString($caught_class_name_start, ($caught_class_name_end - $caught_class_name_start)));
$ok = $this->check($phpcsFile, $caught_class_name, $class_name_full, $class_name_short, $catch) ? true : $ok;
}
if (!$ok)

View File

@@ -12,4 +12,7 @@
<!-- Tabs MUST be used for indentation -->
<rule ref="Generic.WhiteSpace.DisallowSpaceIndent" />
<!-- ALL braces MUST be on their own lines. -->
<rule ref="./phpbb/Sniffs/ControlStructures/OpeningBraceBsdAllmanSniff.php" />
</ruleset>

View File

@@ -394,6 +394,7 @@ if (sizeof($package->old_packages))
$package->run_command('mkdir ' . $package->get('files_directory') . '/release');
$package->run_command('cp -Rp ' . $package->get('dest_dir') . '/docs ' . $package->get('files_directory') . '/release');
$package->run_command('cp -Rp ' . $package->get('dest_dir') . '/install ' . $package->get('files_directory') . '/release');
$package->run_command('cp -Rp ' . $package->get('dest_dir') . '/vendor ' . $package->get('files_directory') . '/release');
$package->run_command('rm -v ' . $package->get('files_directory') . '/release/install/install_install.php');
$package->run_command('rm -v ' . $package->get('files_directory') . '/release/install/install_update.php');

31
build/sami-all.conf.php Normal file
View File

@@ -0,0 +1,31 @@
<?php
/**
*
* This file is part of the phpBB Forum Software package.
*
* @copyright (c) phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
* For full copyright and license information, please see
* the docs/CREDITS.txt file.
*
*/
require __DIR__ . '/sami-checkout.conf.php';
$config['versions'] = Sami\Version\GitVersionCollection::create(__DIR__ . '/../')
/*
This would be nice, but currently causes various problems that need
debugging.
->addFromTags('release-3.0.*')
->add('3.0.x', '3.0-next (olympus)')
->addFromTags('release-3.1.*')
->add('3.1.x', '3.1-next (ascraeus)')
->add('master')
*/
->add('3.0.x')
->add('3.1.x')
->add('master')
;
return new Sami\Sami($iterator, $config);

View File

@@ -31,23 +31,8 @@ $iterator = Symfony\Component\Finder\Finder::create()
->notPath('data')
;
$versions = Sami\Version\GitVersionCollection::create(__DIR__ . '/../')
/*
This would be nice, but currently causes various problems that need
debugging.
->addFromTags('release-3.0.*')
->add('develop-olympus', '3.0-next (olympus)')
->addFromTags('release-3.1.*')
->add('develop-ascraeus', '3.1-next (ascraeus)')
->add('develop')
*/
->add('develop-olympus')
->add('develop-ascraeus')
;
$config = array(
'theme' => 'enhanced',
'versions' => $versions,
'title' => 'phpBB API Documentation',
'build_dir' => __DIR__.'/api/output/%version%',
'cache_dir' => __DIR__.'/api/cache/%version%',

Binary file not shown.

View File

@@ -47,6 +47,8 @@
<dd><input id="send" type="checkbox" class="radio" name="send_immediately" checked="checked" /></dd>
</dl>
<!-- EVENT acp_email_options_after -->
<p class="submit-buttons">
<input class="button1" type="submit" id="submit" name="submit" value="{L_SEND_EMAIL}" />&nbsp;
<input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />

View File

@@ -111,6 +111,7 @@
<fieldset>
<legend>{L_FORUM_SETTINGS}</legend>
<!-- EVENT acp_forums_main_settings_prepend -->
<dl>
<dt><label for="forum_type">{L_FORUM_TYPE}{L_COLON}</label></dt>
<dd><select id="forum_type" name="forum_type" onchange="display_options(this.options[this.selectedIndex].value);">{S_FORUM_TYPE_OPTIONS}</select></dd>
@@ -182,6 +183,7 @@
<dt><label for="forum_style">{L_FORUM_STYLE}{L_COLON}</label></dt>
<dd><select id="forum_style" name="forum_style"><option value="0">{L_DEFAULT_STYLE}</option>{S_STYLES_OPTIONS}</select></dd>
</dl>
<!-- EVENT acp_forums_main_settings_append -->
</fieldset>
<div id="forum_cat_options">
@@ -198,6 +200,7 @@
<div id="forum_post_options">
<fieldset>
<legend>{L_GENERAL_FORUM_SETTINGS}</legend>
<!-- EVENT acp_forums_normal_settings_prepend -->
<dl>
<dt><label for="forum_status">{L_FORUM_STATUS}{L_COLON}</label></dt>
<dd><select id="forum_status" name="forum_status">{S_STATUS_OPTIONS}</select></dd>
@@ -246,6 +249,7 @@
<fieldset>
<legend>{L_FORUM_PRUNE_SETTINGS}</legend>
<!-- EVENT acp_forums_prune_settings_prepend -->
<dl>
<dt><label for="enable_prune">{L_FORUM_AUTO_PRUNE}{L_COLON}</label><br /><span>{L_FORUM_AUTO_PRUNE_EXPLAIN}</span></dt>
<dd><label><input type="radio" class="radio" name="enable_prune" value="1"<!-- IF S_PRUNE_ENABLE --> id="enable_prune" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
@@ -291,6 +295,7 @@
<dt><label for="prune_shadow_days">{L_AUTO_PRUNE_SHADOW_DAYS}{L_COLON}</label><br /><span>{L_AUTO_PRUNE_SHADOW_DAYS_EXPLAIN}</span></dt>
<dd><input type="number" id="prune_shadow_days" name="prune_shadow_days" value="{PRUNE_SHADOW_DAYS}" maxlength="4" size="4" min="0" max="9999" /> {L_DAYS}</dd>
</dl>
<!-- EVENT acp_forums_prune_settings_append -->
</fieldset>
</div>
@@ -317,6 +322,7 @@
<div id="forum_rules_options">
<fieldset>
<legend>{L_FORUM_RULES}</legend>
<!-- EVENT acp_forums_rules_settings_prepend -->
<dl>
<dt><label for="forum_rules_link">{L_FORUM_RULES_LINK}{L_COLON}</label><br /><span>{L_FORUM_RULES_LINK_EXPLAIN}</span></dt>
<dd><input class="text medium" type="text" id="forum_rules_link" name="forum_rules_link" value="{FORUM_RULES_LINK}" maxlength="255" /></dd>
@@ -334,6 +340,7 @@
<label><input type="checkbox" class="radio" name="rules_parse_smilies"<!-- IF S_SMILIES_CHECKED --> checked="checked"<!-- ENDIF --> /> {L_PARSE_SMILIES}</label>
<label><input type="checkbox" class="radio" name="rules_parse_urls"<!-- IF S_URLS_CHECKED --> checked="checked"<!-- ENDIF --> /> {L_PARSE_URLS}</label></dd>
</dl>
<!-- EVENT acp_forums_rules_settings_append -->
</fieldset>
</div>

View File

@@ -7,7 +7,7 @@
<script type="text/javascript" defer="defer">
// <![CDATA[
<!-- IF S_ADD_CODE -->
var smiley = Array();
<!-- BEGIN smile -->
smiley['{smile.SMILEY_URL}'] = Array();
@@ -37,10 +37,10 @@
}
}
}
<!-- ENDIF -->
function toggle_select(icon, display, select)
{
var disp = document.getElementById('order_disp_' + select);
@@ -101,7 +101,7 @@
<tbody>
<!-- BEGIN items -->
<tr>
<td style="text-align: center;"><img src="{items.IMG_SRC}" alt="" title="" /><input type="hidden" name="image[{items.IMG}]" value="1" /></td>
<td style="vertical-align: top;">[{items.IMG}]</td>
<!-- IF S_SMILIES -->
@@ -121,7 +121,7 @@
<optgroup id="order_disp_{items.S_ROW_COUNT}" label="{L_DISPLAY_POSTING}" <!-- IF not items.POSTING_CHECKED -->disabled="disabled" class="disabled-options" <!-- ENDIF -->>{S_ORDER_LIST_DISPLAY}</optgroup>
<optgroup id="order_no_disp_{items.S_ROW_COUNT}" label="{L_DISPLAY_POSTING_NO}" <!-- IF items.POSTING_CHECKED -->disabled="disabled" class="disabled-options" <!-- ENDIF -->>{S_ORDER_LIST_UNDISPLAY}</optgroup>
</select></td>
<!-- ENDIF -->
<!-- ENDIF -->
<!-- IF S_ADD -->
<td><input type="checkbox" class="radio" name="add_img[{items.IMG}]" value="1" /></td>
<!-- ENDIF -->
@@ -147,6 +147,8 @@
</tr>
<!-- ENDIF -->
<!-- ELSE -->
</thead>
<tbody>
<tr class="row3">
<td colspan="{COLSPAN}">{L_NO_ICONS}</td>
</tr>
@@ -174,7 +176,7 @@
<fieldset>
<legend>{L_IMPORT}</legend>
<!-- IF not S_PAK_OPTIONS -->
<p>{L_NO_PAK_OPTIONS}</p>
@@ -259,7 +261,7 @@
</table>
<div class="pagination">
<!-- IF .pagination -->
<!-- INCLUDE pagination.html -->
<!-- INCLUDE pagination.html -->
<!-- ENDIF -->
</div>
<p class="quick">

View File

@@ -39,7 +39,7 @@
</dl>
<dl>
<dt><label for="jab_password">{L_JAB_PASSWORD}{L_COLON}</label><br /><span>{L_JAB_PASSWORD_EXPLAIN}</span></dt>
<dd><input type="password" id="jab_password" name="jab_password" value="{JAB_PASSWORD}" /></dd>
<dd><input type="password" id="jab_password" name="jab_password" value="{JAB_PASSWORD}" autocomplete="off" /></dd>
</dl>
<!-- IF S_CAN_USE_SSL -->
<dl>

View File

@@ -2,6 +2,7 @@
<fieldset>
<legend>{L_USER_PROFILE}</legend>
<!-- EVENT acp_users_profile_before -->
<dl>
<dt><label for="jabber">{L_UCP_JABBER}{L_COLON}</label></dt>
<dd><input type="email" id="jabber" name="jabber" value="{JABBER}" /></dd>
@@ -10,6 +11,7 @@
<dt><label for="birthday">{L_BIRTHDAY}{L_COLON}</label><br /><span>{L_BIRTHDAY_EXPLAIN}</span></dt>
<dd>{L_DAY}{L_COLON} <select id="birthday" name="bday_day">{S_BIRTHDAY_DAY_OPTIONS}</select> {L_MONTH}{L_COLON} <select name="bday_month">{S_BIRTHDAY_MONTH_OPTIONS}</select> {L_YEAR}{L_COLON} <select name="bday_year">{S_BIRTHDAY_YEAR_OPTIONS}</select></dd>
</dl>
<!-- EVENT acp_users_profile_after -->
</fieldset>
<!-- IF .profile_fields -->
@@ -26,7 +28,7 @@
<!-- END profile_fields -->
</fieldset>
<!-- ENDIF -->
<!-- EVENT acp_users_profile_custom_after -->
<fieldset class="quick">
<input class="button1" type="submit" name="update" value="{L_SUBMIT}" />
{S_FORM_TOKEN}

View File

@@ -2,7 +2,7 @@
<html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<!-- IF META -->{META}<!-- ENDIF -->
<title>{PAGE_TITLE}</title>

View File

@@ -2,7 +2,7 @@
<html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<!-- IF META -->{META}<!-- ENDIF -->
<title>{PAGE_TITLE}</title>

View File

@@ -2,7 +2,7 @@
<html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<!-- IF META -->{META}<!-- ENDIF -->
<title>{PAGE_TITLE}</title>

View File

@@ -2,6 +2,7 @@
<html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<!-- IF META -->{META}<!-- ENDIF -->
<title>{PAGE_TITLE}</title>

View File

@@ -1,3 +1,5 @@
/* global bbfontstyle */
var phpbb = {};
phpbb.alertTime = 100;
@@ -13,7 +15,7 @@ var keymap = {
};
var $dark = $('#darkenwrapper');
var $loadingIndicator = $('#loading_indicator');
var $loadingIndicator;
var phpbbAlertTimer = null;
phpbb.isTouch = (window && typeof window.ontouchstart !== 'undefined');
@@ -21,9 +23,14 @@ phpbb.isTouch = (window && typeof window.ontouchstart !== 'undefined');
/**
* Display a loading screen
*
* @returns object Returns loadingIndicator.
* @returns {object} Returns loadingIndicator.
*/
phpbb.loadingIndicator = function() {
if (!$loadingIndicator) {
$loadingIndicator = $('<div />', { id: 'loading_indicator' });
$loadingIndicator.appendTo('#page-footer');
}
if (!$loadingIndicator.is(':visible')) {
$loadingIndicator.fadeIn(phpbb.alertTime);
// Wait fifteen seconds and display an error if nothing has been returned by then.
@@ -54,7 +61,7 @@ phpbb.clearLoadingTimeout = function() {
/**
* Close popup alert after a specified delay
*
* @param int Delay in ms until darkenwrapper's click event is triggered
* @param {int} delay Delay in ms until darkenwrapper's click event is triggered
*/
phpbb.closeDarkenWrapper = function(delay) {
phpbbAlertTimer = setTimeout(function() {
@@ -67,14 +74,12 @@ phpbb.closeDarkenWrapper = function(delay) {
*
* You can only call one alert or confirm box at any one time.
*
* @param string title Title of the message, eg "Information" (HTML).
* @param string msg Message to display (HTML).
* @param bool fadedark Remove the dark background when done? Defaults
* to yes.
* @param {string} title Title of the message, eg "Information" (HTML).
* @param {string} msg Message to display (HTML).
*
* @returns object Returns the div created.
* @returns {object} Returns the div created.
*/
phpbb.alert = function(title, msg, fadedark) {
phpbb.alert = function(title, msg) {
var $alert = $('#phpbb_alert');
$alert.find('.alert_title').html(title);
$alert.find('.alert_text').html(msg);
@@ -94,14 +99,14 @@ phpbb.alert = function(title, msg, fadedark) {
/**
* Handler for opening an alert box.
*
* @param jQuery $alert jQuery object.
* @param {jQuery} $alert jQuery object.
*/
phpbb.alert.open = function($alert) {
if (!$dark.is(':visible')) {
$dark.fadeIn(phpbb.alertTime);
}
if ($loadingIndicator.is(':visible')) {
if ($loadingIndicator && $loadingIndicator.is(':visible')) {
$loadingIndicator.fadeOut(phpbb.alertTime, function() {
$dark.append($alert);
$alert.fadeIn(phpbb.alertTime);
@@ -134,8 +139,8 @@ phpbb.alert.open = function($alert) {
/**
* Handler for closing an alert box.
*
* @param jQuery $alert jQuery object.
* @param bool fadedark Whether to remove dark background.
* @param {jQuery} $alert jQuery object.
* @param {bool} fadedark Whether to remove dark background.
*/
phpbb.alert.close = function($alert, fadedark) {
var $fade = (fadedark) ? $dark : $alert;
@@ -153,13 +158,13 @@ phpbb.alert.close = function($alert, fadedark) {
*
* You can only call one alert or confirm box at any one time.
*
* @param string msg Message to display (HTML).
* @param function callback Callback. Bool param, whether the user pressed
* @param {string} msg Message to display (HTML).
* @param {function} callback Callback. Bool param, whether the user pressed
* yes or no (or whatever their language is).
* @param bool fadedark Remove the dark background when done? Defaults
* @param {bool} fadedark Remove the dark background when done? Defaults
* to yes.
*
* @returns object Returns the div created.
* @returns {object} Returns the div created.
*/
phpbb.confirm = function(msg, callback, fadedark) {
var $confirmDiv = $('#phpbb_confirm');
@@ -197,8 +202,8 @@ phpbb.confirm = function(msg, callback, fadedark) {
/**
* Turn a querystring into an array.
*
* @argument string string The querystring to parse.
* @returns object The object created.
* @argument {string} string The querystring to parse.
* @returns {object} The object created.
*/
phpbb.parseQuerystring = function(string) {
var params = {}, i, split;
@@ -223,12 +228,7 @@ phpbb.parseQuerystring = function(string) {
* For more info, view the following page on the phpBB wiki:
* http://wiki.phpbb.com/JavaScript_Function.phpbb.ajaxify
*
* @param object options Options.
* @param bool/function refresh If we are sent back a refresh, should it be
* acted upon? This can either be true / false / a function.
* @param function callback Callback to call on completion of event. Has
* three parameters: the element that the event was evoked from, the JSON
* that was returned and (if it is a form) the form action.
* @param {object} options Options.
*/
phpbb.ajaxify = function(options) {
var $elements = $(options.selector),
@@ -262,11 +262,16 @@ phpbb.ajaxify = function(options) {
console.log('AJAX error. status: ' + textStatus + ', message: ' + errorThrown);
}
phpbb.clearLoadingTimeout();
var errorText = false;
if (typeof errorThrown === 'string' && errorThrown.length > 0) {
var responseText, errorText = false;
try {
responseText = JSON.parse(jqXHR.responseText);
responseText = responseText.message;
} catch (e) {}
if (typeof responseText === 'string' && responseText.length > 0) {
errorText = responseText;
} else if (typeof errorThrown === 'string' && errorThrown.length > 0) {
errorText = errorThrown;
}
else {
} else {
errorText = $dark.attr('data-ajax-error-text-' + textStatus);
if (typeof errorText !== 'string' || !errorText.length) {
errorText = $dark.attr('data-ajax-error-text');
@@ -283,7 +288,7 @@ phpbb.ajaxify = function(options) {
* It cannot be called from outside this function, and is purely here to
* avoid repetition of code.
*
* @param object res The object sent back by the server.
* @param {object} res The object sent back by the server.
*/
function returnHandler(res) {
var alert;
@@ -386,7 +391,8 @@ phpbb.ajaxify = function(options) {
type: method,
data: data,
success: returnHandler,
error: errorHandler
error: errorHandler,
cache: false
});
request.always(function() {
$loadingIndicator.fadeOut(phpbb.alertTime);
@@ -407,7 +413,9 @@ phpbb.ajaxify = function(options) {
$elements.find('input:submit').click(function () {
var $this = $(this);
$this.siblings('[data-clicked]').removeAttr('data-clicked');
// Remove data-clicked attribute from any submit button of form
$this.parents('form:first').find('input:submit[data-clicked]').removeAttr('data-clicked');
$this.attr('data-clicked', 'true');
});
}
@@ -424,10 +432,10 @@ phpbb.search = {
};
/**
* Get cached search data.
* Get cached search data.
*
* @param string id Search ID.
* @return bool|object. Cached data object. Returns false if no data exists.
* @param {string} id Search ID.
* @returns {bool|object} Cached data object. Returns false if no data exists.
*/
phpbb.search.cache.get = function(id) {
if (this.data[id]) {
@@ -437,39 +445,35 @@ phpbb.search.cache.get = function(id) {
};
/**
* Set search cache data value.
* Set search cache data value.
*
* @param string id Search ID.
* @param string key Data key.
* @param string value Data value.
*
* @return undefined
* @param {string} id Search ID.
* @param {string} key Data key.
* @param {string} value Data value.
*/
phpbb.search.cache.set = function(id, key, value) {
if (!this.data[id]) {
this.data[id] = {results: []};
this.data[id] = { results: [] };
}
this.data[id][key] = value;
};
/**
* Cache search result.
* Cache search result.
*
* @param string id Search ID.
* @param string keyword Keyword.
* @param array results Search results.
*
* @return undefined
* @param {string} id Search ID.
* @param {string} keyword Keyword.
* @param {Array} results Search results.
*/
phpbb.search.cache.setResults = function(id, keyword, value) {
this.data[id].results[keyword] = value;
phpbb.search.cache.setResults = function(id, keyword, results) {
this.data[id].results[keyword] = results;
};
/**
* Trim spaces from keyword and lower its case.
*
* @param string keyword Search keyword to clean.
* @return string Cleaned string.
* @param {string} keyword Search keyword to clean.
* @returns {string} Cleaned string.
*/
phpbb.search.cleanKeyword = function(keyword) {
return $.trim(keyword).toLowerCase();
@@ -479,11 +483,11 @@ phpbb.search.cleanKeyword = function(keyword) {
* Get clean version of search keyword. If textarea supports several keywords
* (one per line), it fetches the current keyword based on the caret position.
*
* @param jQuery $input Search input|textarea.
* @param string keyword Input|textarea value.
* @param bool multiline Whether textarea supports multiple search keywords.
* @param {jQuery} $input Search input|textarea.
* @param {string} keyword Input|textarea value.
* @param {bool} multiline Whether textarea supports multiple search keywords.
*
* @return string Clean string.
* @returns string Clean string.
*/
phpbb.search.getKeyword = function($input, keyword, multiline) {
if (multiline) {
@@ -495,10 +499,10 @@ phpbb.search.getKeyword = function($input, keyword, multiline) {
/**
* Get the textarea line number on which the keyword resides - for textareas
* that support multiple keywords (one per line).
* that support multiple keywords (one per line).
*
* @param jQuery $textarea Search textarea.
* @return int
* @param {jQuery} $textarea Search textarea.
* @returns {int} The line number.
*/
phpbb.search.getKeywordLine = function ($textarea) {
var selectionStart = $textarea.get(0).selectionStart;
@@ -509,11 +513,9 @@ phpbb.search.getKeywordLine = function ($textarea) {
* Set the value on the input|textarea. If textarea supports multiple
* keywords, only the active keyword is replaced.
*
* @param jQuery $input Search input|textarea.
* @param string value Value to set.
* @param bool multiline Whether textarea supports multiple search keywords.
*
* @return undefined
* @param {jQuery} $input Search input|textarea.
* @param {string} value Value to set.
* @param {bool} multiline Whether textarea supports multiple search keywords.
*/
phpbb.search.setValue = function($input, value, multiline) {
if (multiline) {
@@ -526,14 +528,13 @@ phpbb.search.setValue = function($input, value, multiline) {
};
/**
* Sets the onclick event to set the value on the input|textarea to the selected search result.
* Sets the onclick event to set the value on the input|textarea to the
* selected search result.
*
* @param jQuery $input Search input|textarea.
* @param object value Result object.
* @param jQuery $row Result element.
* @param jQuery $container jQuery object for the search container.
*
* @return undefined
* @param {jQuery} $input Search input|textarea.
* @param {object} value Result object.
* @param {jQuery} $row Result element.
* @param {jQuery} $container jQuery object for the search container.
*/
phpbb.search.setValueOnClick = function($input, value, $row, $container) {
$row.click(function() {
@@ -548,16 +549,16 @@ phpbb.search.setValueOnClick = function($input, value, $row, $container) {
* already, those are displayed instead. Executes the AJAX request function
* itself due to the need to use a timeout to limit the number of requests.
*
* @param array data Data to be sent to the server.
* @param object event Onkeyup event object.
* @param function sendRequest Function to execute AJAX request.
* @param {Array} data Data to be sent to the server.
* @param {object} event Onkeyup event object.
* @param {function} sendRequest Function to execute AJAX request.
*
* @return bool Returns false.
* @returns {bool} Returns false.
*/
phpbb.search.filter = function(data, event, sendRequest) {
var $this = $(this),
dataName = ($this.attr('data-name') !== undefined) ? $this.attr('data-name') : $this.attr('name'),
minLength = parseInt($this.attr('data-min-length')),
minLength = parseInt($this.attr('data-min-length'), 10),
searchID = $this.attr('data-results'),
keyword = phpbb.search.getKeyword($this, data[dataName], $this.attr('data-multiline')),
cache = phpbb.search.cache.get(searchID),
@@ -579,7 +580,10 @@ phpbb.search.filter = function(data, event, sendRequest) {
} else {
// Do we already have results for this?
if (cache.results[keyword]) {
var response = {keyword: keyword, results: cache.results[keyword]};
var response = {
keyword: keyword,
results: cache.results[keyword]
};
phpbb.search.handleResponse(response, $this, true);
proceed = false;
}
@@ -590,8 +594,8 @@ phpbb.search.filter = function(data, event, sendRequest) {
phpbb.search.cache.set(searchID, 'lastSearch', keyword);
phpbb.search.cache.setResults(searchID, keyword, []);
proceed = false;
}
}
}
}
}
if (proceed) {
@@ -604,14 +608,12 @@ phpbb.search.filter = function(data, event, sendRequest) {
};
/**
* Handle search result response.
* Handle search result response.
*
* @param object res Data received from server.
* @param jQuery $input Search input|textarea.
* @param bool fromCache Whether the results are from the cache.
* @param function callback Optional callback to run when assigning each search result.
*
* @return undefined
* @param {object} res Data received from server.
* @param {jQuery} $input Search input|textarea.
* @param {bool} fromCache Whether the results are from the cache.
* @param {function} callback Optional callback to run when assigning each search result.
*/
phpbb.search.handleResponse = function(res, $input, fromCache, callback) {
if (typeof res !== 'object') {
@@ -638,12 +640,10 @@ phpbb.search.handleResponse = function(res, $input, fromCache, callback) {
/**
* Show search results.
*
* @param array results Search results.
* @param jQuery $input Search input|textarea.
* @param jQuery $container Search results container element.
* @param function callback Optional callback to run when assigning each search result.
*
* @return undefined
* @param {Array} results Search results.
* @param {jQuery} $input Search input|textarea.
* @param {jQuery} $container Search results container element.
* @param {function} callback Optional callback to run when assigning each search result.
*/
phpbb.search.showResults = function(results, $input, $container, callback) {
var $resultContainer = $('.search-results', $container);
@@ -680,8 +680,7 @@ phpbb.search.showResults = function(results, $input, $container, callback) {
/**
* Clear search results.
*
* @param jQuery $container Search results container.
* @return undefined
* @param {jQuery} $container Search results container.
*/
phpbb.search.clearResults = function($container) {
$container.children(':not(.search-result-tpl)').remove();
@@ -700,8 +699,8 @@ phpbb.history = {};
/**
* Check whether a method in the native history object is supported.
*
* @param string fn Method name.
* @return bool Returns true if the method is supported.
* @param {string} fn Method name.
* @returns {bool} Returns true if the method is supported.
*/
phpbb.history.isSupported = function(fn) {
return !(typeof history === 'undefined' || typeof history[fn] === 'undefined');
@@ -711,12 +710,10 @@ phpbb.history.isSupported = function(fn) {
* Wrapper for the pushState and replaceState methods of the
* native history object.
*
* @param string mode Mode. Either push or replace.
* @param string url New URL.
* @param string title Optional page title.
* @patam object obj Optional state object.
*
* @return undefined
* @param {string} mode Mode. Either push or replace.
* @param {string} url New URL.
* @param {string} [title] Optional page title.
* @param {object} [obj] Optional state object.
*/
phpbb.history.alterUrl = function(mode, url, title, obj) {
var fn = mode + 'State';
@@ -737,11 +734,9 @@ phpbb.history.alterUrl = function(mode, url, title, obj) {
/**
* Wrapper for the native history.replaceState method.
*
* @param string url New URL.
* @param string title Optional page title.
* @patam object obj Optional state object.
*
* @return undefined
* @param {string} url New URL.
* @param {string} [title] Optional page title.
* @param {object} [obj] Optional state object.
*/
phpbb.history.replaceUrl = function(url, title, obj) {
phpbb.history.alterUrl('replace', url, title, obj);
@@ -750,11 +745,9 @@ phpbb.history.replaceUrl = function(url, title, obj) {
/**
* Wrapper for the native history.pushState method.
*
* @param string url New URL.
* @param string title Optional page title.
* @patam object obj Optional state object.
*
* @return undefined
* @param {string} url New URL.
* @param {string} [title] Optional page title.
* @param {object} [obj] Optional state object.
*/
phpbb.history.pushUrl = function(url, title, obj) {
phpbb.history.alterUrl('push', url, title, obj);
@@ -763,7 +756,8 @@ phpbb.history.pushUrl = function(url, title, obj) {
/**
* Hide the optgroups that are not the selected timezone
*
* @param bool keepSelection Shall we keep the value selected, or shall the user be forced to repick one.
* @param {bool} keepSelection Shall we keep the value selected, or shall the
* user be forced to repick one.
*/
phpbb.timezoneSwitchDate = function(keepSelection) {
var $timezoneCopy = $('#timezone_copy');
@@ -786,7 +780,7 @@ phpbb.timezoneSwitchDate = function(keepSelection) {
}
if ($tzDate.val() !== '') {
$timezone.children('optgroup').remove(':not([data-tz-value="' + $('#tz_date').val() + '"])');
$timezone.children('optgroup').remove(':not([data-tz-value="' + $tzDate.val() + '"])');
}
if ($tzDate.val() === $tzSelectDateSuggest.attr('data-suggested-tz')) {
@@ -794,7 +788,7 @@ phpbb.timezoneSwitchDate = function(keepSelection) {
} else {
$tzSelectDateSuggest.css('display', 'inline');
}
var $tzOptions = $timezone.children('optgroup[data-tz-value="' + $tzDate.val() + '"]').children('option');
if ($tzOptions.length === 1) {
@@ -821,7 +815,7 @@ phpbb.timezoneEnableDateSelection = function() {
/**
* Preselect a date/time or suggest one, if it is not picked.
*
* @param bool forceSelector Shall we select the suggestion?
* @param {bool} forceSelector Shall we select the suggestion?
*/
phpbb.timezonePreselectSelect = function(forceSelector) {
@@ -890,8 +884,8 @@ phpbb.ajaxCallbacks = {};
*
* See the phpbb.ajaxify comments for information on stuff like parameters.
*
* @param string id The name of the callback.
* @param function callback The callback to be called.
* @param {string} id The name of the callback.
* @param {function} callback The callback to be called.
*/
phpbb.addAjaxCallback = function(id, callback) {
if (typeof callback === 'function') {
@@ -982,7 +976,7 @@ phpbb.addAjaxCallback('toggle_link', function() {
* types text.
*
* @param {jQuery} $items jQuery object(s) to resize
* @param {object} options Optional parameter that adjusts default
* @param {object} [options] Optional parameter that adjusts default
* configuration. See configuration variable
*
* Optional parameters:
@@ -1019,15 +1013,19 @@ phpbb.resizeTextArea = function($items, options) {
function resetAutoResize(item) {
var $item = $(item);
if ($item.hasClass('auto-resized')) {
$(item).css({height: '', resize: ''}).removeClass('auto-resized');
$(item)
.css({ height: '', resize: '' })
.removeClass('auto-resized');
configuration.resetCallback.call(item, $item);
}
}
function autoResize(item) {
function setHeight(height) {
height += parseInt($item.css('height')) - $item.height();
$item.css({height: height + 'px', resize: 'none'}).addClass('auto-resized');
height += parseInt($item.css('height'), 10) - $item.height();
$item
.css({ height: height + 'px', resize: 'none' })
.addClass('auto-resized');
configuration.resizeCallback.call(item, $item);
}
@@ -1043,7 +1041,7 @@ phpbb.resizeTextArea = function($items, options) {
configuration.maxHeight
),
$item = $(item),
height = parseInt($item.height()),
height = parseInt($item.height(), 10),
scrollHeight = (item.scrollHeight) ? item.scrollHeight : 0;
if (height < 0) {
@@ -1052,8 +1050,7 @@ phpbb.resizeTextArea = function($items, options) {
if (height > maxHeight) {
setHeight(maxHeight);
}
else if (scrollHeight > (height + 5)) {
} else if (scrollHeight > (height + 5)) {
setHeight(Math.min(maxHeight, scrollHeight));
}
}
@@ -1082,7 +1079,7 @@ phpbb.resizeTextArea = function($items, options) {
* @param {Array} endTags List of end tags to look for
* For example, Array('[/code]')
*
* @return {boolean} True if cursor is in bbcode tag
* @returns {boolean} True if cursor is in bbcode tag
*/
phpbb.inBBCodeTag = function(textarea, startTags, endTags) {
var start = textarea.selectionStart,
@@ -1154,7 +1151,7 @@ phpbb.applyCodeEditor = function(textarea) {
* @param {boolean} stripCodeStart If true, only part of line
* after [code] tag will be returned.
*
* @return {string} Line of text
* @returns {string} Line of text
*/
function getLastLine(stripCodeStart) {
var start = textarea.selectionStart,
@@ -1170,7 +1167,7 @@ phpbb.applyCodeEditor = function(textarea) {
var tagLength = startTags[i].length;
value = value.substring(index + tagLength);
if (startTags[i].lastIndexOf(startTagsEnd) != tagLength) {
if (startTags[i].lastIndexOf(startTagsEnd) !== tagLength) {
index = value.indexOf(startTagsEnd);
if (index >= 0) {
@@ -1187,7 +1184,7 @@ phpbb.applyCodeEditor = function(textarea) {
/**
* Append text at cursor position
*
* @param {string} Text Text to append
* @param {string} text Text to append
*/
function appendText(text) {
var start = textarea.selectionStart,
@@ -1229,6 +1226,31 @@ phpbb.applyCodeEditor = function(textarea) {
});
};
/**
* Show drag and drop animation when textarea is present
*
* This function will enable the drag and drop animation for a specified
* textarea.
*
* @param {HTMLElement} textarea Textarea DOM object to apply editor to
*/
phpbb.showDragNDrop = function(textarea) {
if (!textarea) {
return;
}
$('body').on('dragenter dragover', function () {
$(textarea).addClass('drag-n-drop');
}).on('dragleave dragout dragend drop', function() {
$(textarea).removeClass('drag-n-drop');
});
$(textarea).on('dragenter dragover', function () {
$(textarea).addClass('drag-n-drop-highlight');
}).on('dragleave dragout dragend drop', function() {
$(textarea).removeClass('drag-n-drop-highlight');
});
};
/**
* List of classes that toggle dropdown menu,
* list of classes that contain visible dropdown menu
@@ -1321,12 +1343,15 @@ phpbb.toggleDropdown = function() {
fullFreeSpace = freeSpace + parent.outerWidth();
options.dropdown.find('.dropdown-contents').each(function() {
contentWidth = parseInt($(this).outerWidth());
$(this).css({marginLeft: 0, left: 0});
contentWidth = parseInt($(this).outerWidth(), 10);
$(this).css({ marginLeft: 0, left: 0 });
});
var maxOffset = Math.min(contentWidth, fullFreeSpace) + 'px';
options.dropdown.css({'width': maxOffset, 'margin-left': '-' + maxOffset});
options.dropdown.css({
width: maxOffset,
marginLeft: -maxOffset
});
}
} else {
options.dropdown.css('margin-right', '-' + (windowWidth + freeSpace) + 'px');
@@ -1388,14 +1413,12 @@ phpbb.registerDropdown = function(toggle, dropdown, options) {
/**
* Get the HTML for a color palette table.
*
* @param string dir Palette direction - either v or h
* @param int width Palette cell width.
* @param int height Palette cell height.
* @param {string} dir Palette direction - either v or h
* @param {int} width Palette cell width.
* @param {int} height Palette cell height.
*/
phpbb.colorPalette = function(dir, width, height) {
var r = 0,
g = 0,
b = 0,
var r, g, b,
numberList = new Array(6),
color = '',
html = '';
@@ -1406,32 +1429,33 @@ phpbb.colorPalette = function(dir, width, height) {
numberList[3] = 'BF';
numberList[4] = 'FF';
var tableClass = (dir == 'h') ? 'horizontal-palette' : 'vertical-palette';
var tableClass = (dir === 'h') ? 'horizontal-palette' : 'vertical-palette';
html += '<table class="not-responsive colour-palette ' + tableClass + '" style="width: auto;">';
for (r = 0; r < 5; r++) {
if (dir == 'h') {
if (dir === 'h') {
html += '<tr>';
}
for (g = 0; g < 5; g++) {
if (dir == 'v') {
if (dir === 'v') {
html += '<tr>';
}
for (b = 0; b < 5; b++) {
color = String(numberList[r]) + String(numberList[g]) + String(numberList[b]);
html += '<td style="background-color: #' + color + '; width: ' + width + 'px; height: ' + height + 'px;">';
html += '<a href="#" data-color="' + color + '" style="display: block; width: ' + width + 'px; height: ' + height + 'px; " alt="#' + color + '" title="#' + color + '"></a>';
color = '' + numberList[r] + numberList[g] + numberList[b];
html += '<td style="background-color: #' + color + '; width: ' + width + 'px; height: ' +
height + 'px;"><a href="#" data-color="' + color + '" style="display: block; width: ' +
width + 'px; height: ' + height + 'px; " alt="#' + color + '" title="#' + color + '"></a>';
html += '</td>';
}
if (dir == 'v') {
if (dir === 'v') {
html += '</tr>';
}
}
if (dir == 'h') {
if (dir === 'h') {
html += '</tr>';
}
}
@@ -1442,7 +1466,7 @@ phpbb.colorPalette = function(dir, width, height) {
/**
* Register a color palette.
*
* @param object el jQuery object for the palette container.
* @param {jQuery} el jQuery object for the palette container.
*/
phpbb.registerPalette = function(el) {
var orientation = el.attr('data-orientation'),
@@ -1471,15 +1495,15 @@ phpbb.registerPalette = function(el) {
}
e.preventDefault();
});
}
};
/**
* Set display of page element
*
* @param string id The ID of the element to change
* @param int action Set to 0 if element display should be toggled, -1 for
* @param {string} id The ID of the element to change
* @param {int} action Set to 0 if element display should be toggled, -1 for
* hiding the element, and 1 for showing it.
* @param string type Display type that should be used, e.g. inline, block or
* @param {string} type Display type that should be used, e.g. inline, block or
* other CSS "display" types
*/
phpbb.toggleDisplay = function(id, action, type) {
@@ -1500,8 +1524,7 @@ phpbb.toggleDisplay = function(id, action, type) {
* Toggle additional settings based on the selected
* option of select element.
*
* @param jQuery el jQuery select element object.
* @return undefined
* @param {jQuery} el jQuery select element object.
*/
phpbb.toggleSelectSettings = function(el) {
el.children().each(function() {
@@ -1515,11 +1538,11 @@ phpbb.toggleSelectSettings = function(el) {
* Get function from name.
* Based on http://stackoverflow.com/a/359910
*
* @param string functionName Function to get.
* @return function
* @param {string} functionName Function to get.
* @returns function
*/
phpbb.getFunctionByName = function (functionName) {
var namespaces = functionName.split('.'),
var namespaces = functionName.split('.'),
func = namespaces.pop(),
context = window;

View File

@@ -159,7 +159,7 @@ function insert_text(text, spaces, popup) {
/**
* Add inline attachment at position
*/
function attach_inline(index, filename) {
function attachInline(index, filename) {
insert_text('[attachment=' + index + ']' + filename + '[/attachment]');
document.forms[form_name].elements[text_name].focus();
}
@@ -355,6 +355,9 @@ function getCaretPosition(txtarea) {
textarea = doc.forms[form_name].elements[text_name];
phpbb.applyCodeEditor(textarea);
if ($('#attach-panel').length) {
phpbb.showDragNDrop(textarea);
}
});
})(jQuery);

View File

@@ -1,26 +1,26 @@
/* global phpbb, plupload, attachInline */
plupload.addI18n(phpbb.plupload.i18n);
phpbb.plupload.ids = [];
(function($) { // Avoid conflicts with other libraries
"use strict";
'use strict';
/**
* Set up the uploader.
*
* @return undefined
*/
phpbb.plupload.initialize = function() {
// Initialize the Plupload uploader.
uploader.init();
phpbb.plupload.uploader.init();
// Set attachment data.
phpbb.plupload.setData(phpbb.plupload.data);
phpbb.plupload.updateMultipartParams(phpbb.plupload.getSerializedData());
// Only execute if Plupload initialized successfully.
uploader.bind('Init', function() {
phpbb.plupload.form = $(phpbb.plupload.config.form_hook)[0],
phpbb.plupload.uploader.bind('Init', function() {
phpbb.plupload.form = $(phpbb.plupload.config.form_hook)[0];
phpbb.plupload.rowTpl = $('#attach-row-tpl')[0].outerHTML;
// Hide the basic upload panel and remove the attach row template.
@@ -29,48 +29,51 @@ phpbb.plupload.initialize = function() {
$('#attach-panel-multi').show();
});
uploader.bind('PostInit', function() {
phpbb.plupload.uploader.bind('PostInit', function() {
// Point out the drag-and-drop zone if it's supported.
if (uploader.features.dragdrop) {
if (phpbb.plupload.uploader.features.dragdrop) {
$('#drag-n-drop-message').show();
}
// Ensure "Add files" button position is correctly calculated.
if ($('#attach-panel-multi').is(':visible')) {
phpbb.plupload.uploader.refresh();
}
$('[data-subpanel="attach-panel"]').one('click', function() {
phpbb.plupload.uploader.refresh();
});
});
};
/**
* Unsets all elements in the object uploader.settings.multipart_params whose keys
* begin with 'attachment_data['
*
* @return undefined
*/
phpbb.plupload.clearParams = function() {
var obj = uploader.settings.multipart_params;
var obj = phpbb.plupload.uploader.settings.multipart_params;
for (var key in obj) {
if (!obj.hasOwnProperty(key) || key.indexOf('attachment_data[') !== 0) {
continue;
}
delete uploader.settings.multipart_params[key];
delete phpbb.plupload.uploader.settings.multipart_params[key];
}
};
/**
* Update uploader.settings.multipart_params object with new data.
*
* @param object obj
* @return undefined
* @param {object} obj
*/
phpbb.plupload.updateMultipartParams = function(obj) {
uploader.settings.multipart_params = $.extend(
uploader.settings.multipart_params,
obj
);
var settings = phpbb.plupload.uploader.settings;
settings.multipart_params = $.extend(settings.multipart_params, obj);
};
/**
* Convert the array of attachment objects into an object that PHP would expect as POST data.
*
* @return object An object in the form 'attachment_data[i][key]': value as
* @returns {object} An object in the form 'attachment_data[i][key]': value as
* expected by the server
*/
phpbb.plupload.getSerializedData = function() {
@@ -92,22 +95,19 @@ phpbb.plupload.getSerializedData = function() {
* Get the index from the phpbb.plupload.data array where the given
* attachment id appears.
*
* @param int attach_id The attachment id of the file.
* @return bool Returns false if the id cannot be found.
* @return int Returns the index of the file if it exists.
* @param {int} attachId The attachment id of the file.
* @returns {bool|int} Index of the file if exists, otherwise false.
*/
phpbb.plupload.getIndex = function(attach_id) {
var index = $.inArray(Number(attach_id), phpbb.plupload.ids);
phpbb.plupload.getIndex = function(attachId) {
var index = $.inArray(Number(attachId), phpbb.plupload.ids);
return (index !== -1) ? index : false;
};
/**
* Set the data in phpbb.plupload.data and phpbb.plupload.ids arrays.
*
* @param array data Array containing the new data to use. In the form of
* array(index => object(property: value). Requires attach_id to be one of the object properties.
*
* @return undefined
* @param {Array} data Array containing the new data to use. In the form of
* array(index => object(property: value). Requires attach_id to be one of the object properties.
*/
phpbb.plupload.setData = function(data) {
// Make sure that the array keys are reset.
@@ -121,12 +121,11 @@ phpbb.plupload.setData = function(data) {
/**
* Update the attachment data in the HTML and the phpbb & phpbb.plupload objects.
*
* @param array data Array containing the new data to use.
* @param string action The action that required the update. Used to update the inline attachment bbcodes.
* @param int index The index from phpbb.plupload_ids that was affected by the action.
* @param array downloadUrl Optional array of download urls to update.
* @return undefined
*
* @param {Array} data Array containing the new data to use.
* @param {string} action The action that required the update. Used to update the inline attachment bbcodes.
* @param {int} index The index from phpbb.plupload_ids that was affected by the action.
* @param {Array} downloadUrl Optional array of download urls to update.
*/
phpbb.plupload.update = function(data, action, index, downloadUrl) {
@@ -139,9 +138,8 @@ phpbb.plupload.update = function(data, action, index, downloadUrl) {
/**
* Update the relevant elements and hidden data for all attachments.
*
* @param array downloadUrl Optional array of download urls to update.
* @return undefined
*
* @param {Array} downloadUrl Optional array of download urls to update.
*/
phpbb.plupload.updateRows = function(downloadUrl) {
for (var i = 0; i < phpbb.plupload.ids.length; i++) {
@@ -154,9 +152,8 @@ phpbb.plupload.updateRows = function(downloadUrl) {
* using the id "attach-row-tpl" to be present. This snippet is cloned and the
* data for the file inserted into it. The row is then appended or prepended to
* #file-list based on the attach_order setting.
*
* @param object file Plupload file object for the new attachment.
* @return undefined
*
* @param {object} file Plupload file object for the new attachment.
*/
phpbb.plupload.insertRow = function(file) {
var row = $(phpbb.plupload.rowTpl);
@@ -165,7 +162,7 @@ phpbb.plupload.insertRow = function(file) {
row.find('.file-name').html(plupload.xmlEncode(file.name));
row.find('.file-size').html(plupload.formatSize(file.size));
if (phpbb.plupload.order == 'desc') {
if (phpbb.plupload.order === 'desc') {
$('#file-list').prepend(row);
} else {
$('#file-list').append(row);
@@ -174,10 +171,9 @@ phpbb.plupload.insertRow = function(file) {
/**
* Update the relevant elements and hidden data for an attachment.
*
* @param int index The index from phpbb.plupload.ids of the attachment to edit.
* @param array downloadUrl Optional array of download urls to update.
* @return undefined
*
* @param {int} index The index from phpbb.plupload.ids of the attachment to edit.
* @param {Array} downloadUrl Optional array of download urls to update.
*/
phpbb.plupload.updateRow = function(index, downloadUrl) {
var attach = phpbb.plupload.data[index],
@@ -189,7 +185,7 @@ phpbb.plupload.updateRow = function(index, downloadUrl) {
link = $('<a></a>');
link.attr('href', url).html(attach.real_filename);
row.find('.file-name').html(link)
row.find('.file-name').html(link);
}
row.find('textarea').attr('name', 'comment_list[' + index + ']');
@@ -199,18 +195,21 @@ phpbb.plupload.updateRow = function(index, downloadUrl) {
/**
* Update hidden input data for an attachment.
*
* @param object row jQuery object for the attachment row.
* @param object attach Attachment data object from phpbb.plupload.data
* @param int index Attachment index from phpbb.plupload.ids
* @return undefined
* @param {object} row jQuery object for the attachment row.
* @param {object} attach Attachment data object from phpbb.plupload.data
* @param {int} index Attachment index from phpbb.plupload.ids
*/
phpbb.plupload.updateHiddenData = function(row, attach, index) {
row.find('input[type="hidden"]').remove();
for (var key in attach) {
if (!attach.hasOwnProperty(key)) {
return;
}
var input = $('<input />')
.attr('type', 'hidden')
.attr('name', 'attachment_data[' + index + '][' + key +']')
.attr('name', 'attachment_data[' + index + '][' + key + ']')
.attr('value', attach[key]);
$('textarea', row).after(input);
}
@@ -222,16 +221,14 @@ phpbb.plupload.updateHiddenData = function(row, attach, index) {
* responds with the updated attachment data list so that any future
* uploads can maintain state with the server
*
* @param object row jQuery object for the attachment row.
* @param int attachId Attachment id of the file to be removed.
*
* @return undefined
* @param {object} row jQuery object for the attachment row.
* @param {int} attachId Attachment id of the file to be removed.
*/
phpbb.plupload.deleteFile = function(row, attachId) {
// If there's no attach id, then the file hasn't been uploaded. Simply delete the row.
if (typeof attachId === 'undefined') {
var file = uploader.getFile(row.attr('id'));
uploader.removeFile(file);
var file = phpbb.plupload.uploader.getFile(row.attr('id'));
phpbb.plupload.uploader.removeFile(file);
row.slideUp(100, function() {
row.remove();
@@ -259,7 +256,7 @@ phpbb.plupload.deleteFile = function(row, attachId) {
// trigger_error() was called which likely means a permission error was encountered.
if (typeof response.title !== 'undefined') {
uploader.trigger('Error', {message: response.message});
phpbb.plupload.uploader.trigger('Error', { message: response.message });
// We will have to assume that the deletion failed. So leave the file status as uploaded.
row.find('.file-status').toggleClass('file-uploaded');
@@ -270,21 +267,21 @@ phpbb.plupload.deleteFile = function(row, attachId) {
phpbb.plupload.handleMaxFilesReached();
if (row.attr('id')) {
var file = uploader.getFile(row.attr('id'));
uploader.removeFile(file);
var file = phpbb.plupload.uploader.getFile(row.attr('id'));
phpbb.plupload.uploader.removeFile(file);
}
row.slideUp(100, function() {
row.remove();
// Hide the file list if it's empty now.
phpbb.plupload.hideEmptyList();
});
uploader.trigger('FilesRemoved');
phpbb.plupload.uploader.trigger('FilesRemoved');
};
$.ajax(phpbb.plupload.config.url, {
type: 'POST',
data: $.extend(fields, phpbb.plupload.getSerializedData()),
headers: {'X-PHPBB-USING-PLUPLOAD': '1', 'X-Requested-With': 'XMLHttpRequest'}
headers: { 'X-PHPBB-USING-PLUPLOAD': '1', 'X-Requested-With': 'XMLHttpRequest' }
})
.always(always)
.done(done);
@@ -292,25 +289,21 @@ phpbb.plupload.deleteFile = function(row, attachId) {
/**
* Check the attachment list and hide its container if it's empty.
*
* @return undefined
*/
phpbb.plupload.hideEmptyList = function() {
if (!$('#file-list').children().length) {
$('#file-list-container').slideUp(100);
}
}
};
/**
* Update the indices used in inline attachment bbcodes. This ensures that the bbcodes
* correspond to the correct file after a file is added or removed. This should be called
* before the phpbb.plupload,data and phpbb.plupload.ids arrays are updated, otherwise it will
* not work correctly.
* Update the indices used in inline attachment bbcodes. This ensures that the
* bbcodes correspond to the correct file after a file is added or removed.
* This should be called before the phpbb.plupload,data and phpbb.plupload.ids
* arrays are updated, otherwise it will not work correctly.
*
* @param string action The action that occurred -- either "addition" or "removal"
* @param int index The index of the attachment from phpbb.plupload.ids that was affected.
*
* @return undefined
* @param {string} action The action that occurred -- either "addition" or "removal"
* @param {int} index The index of the attachment from phpbb.plupload.ids that was affected.
*/
phpbb.plupload.updateBbcode = function(action, index) {
var textarea = $('#message', phpbb.plupload.form),
@@ -322,64 +315,59 @@ phpbb.plupload.updateBbcode = function(action, index) {
return;
}
// Private function used to replace the bbcode.
var updateBbcode = function(match, fileName) {
// Remove the bbcode if the file was removed.
if (removal && index === i) {
return '';
}
var newIndex = i + ((removal) ? -1 : 1);
return '[attachment=' + newIndex +']' + fileName + '[/attachment]';
};
function runUpdate(i) {
var regex = new RegExp('\\[attachment=' + i + '\\](.*?)\\[\\/attachment\\]', 'g');
text = text.replace(regex, function updateBbcode(_, fileName) {
// Remove the bbcode if the file was removed.
if (removal && index === i) {
return '';
}
var newIndex = i + ((removal) ? -1 : 1);
return '[attachment=' + newIndex + ']' + fileName + '[/attachment]';
});
}
// Private function used to generate search regexp
var searchRegexp = function(index) {
return new RegExp('\\[attachment=' + index + '\\](.*?)\\[\\/attachment\\]', 'g');
}
// The update order of the indices is based on the action taken to ensure that we don't corrupt
// the bbcode index by updating it several times as we move through the loop.
// Removal loop starts at the removed index and moves to the end of the array.
// Addition loop starts at the end of the array and moves to the added index at 0.
var searchLoop = function() {
if (typeof i === 'undefined') {
i = (removal) ? index : phpbb.plupload.ids.length - 1;
}
return (removal) ? (i < phpbb.plupload.ids.length): (i >= index);
}
// Loop forwards when removing and backwards when adding ensures we don't
// corrupt the bbcode index.
var i;
while (searchLoop()) {
text = text.replace(searchRegexp(i), updateBbcode);
(removal) ? i++ : i--;
if (removal) {
for (i = index; i < phpbb.plupload.ids.length; i++) {
runUpdate(i);
}
} else {
for (i = phpbb.plupload.ids.length - 1; i >= index; i--) {
runUpdate(i);
}
}
textarea.val(text);
};
/**
* Get Plupload file objects based on their upload status.
*
* @param int status Plupload status - plupload.DONE, plupload.FAILED, plupload.QUEUED,
* plupload.STARTED, plupload.STOPPED
* @param {int} status Plupload status - plupload.DONE, plupload.FAILED,
* plupload.QUEUED, plupload.STARTED, plupload.STOPPED
*
* @return Returns an array of the Plupload file objects matching the status.
* @returns {Array} The Plupload file objects matching the status.
*/
phpbb.plupload.getFilesByStatus = function(status) {
var files = [];
$.each(uploader.files, function(i, file) {
$.each(phpbb.plupload.uploader.files, function(i, file) {
if (file.status === status) {
files.push(file);
}
});
return files;
}
};
/**
* Check whether the user has reached the maximun number of files that he's allowed
* to upload. If so, disables the uploader and marks the queued files as failed. Otherwise
* makes sure that the uploader is enabled.
*
* @return bool Returns true if the limit has been reached. False if otherwise.
* @returns {bool} True if the limit has been reached. False if otherwise.
*/
phpbb.plupload.handleMaxFilesReached = function() {
// If there is no limit, the user is an admin or moderator.
@@ -392,41 +380,36 @@ phpbb.plupload.handleMaxFilesReached = function() {
phpbb.plupload.markQueuedFailed(phpbb.plupload.lang.TOO_MANY_ATTACHMENTS);
// Disable the uploader.
phpbb.plupload.disableUploader();
uploader.trigger('Error', {message: phpbb.plupload.lang.TOO_MANY_ATTACHMENTS});
phpbb.plupload.uploader.trigger('Error', { message: phpbb.plupload.lang.TOO_MANY_ATTACHMENTS });
return true;
} else if(phpbb.plupload.maxFiles > phpbb.plupload.ids.length) {
} else if (phpbb.plupload.maxFiles > phpbb.plupload.ids.length) {
// Enable the uploader if the user is under the limit
phpbb.plupload.enableUploader();
}
return false;
}
};
/**
* Disable the uploader
*
* @return undefined
*/
phpbb.plupload.disableUploader = function() {
$('#add_files').addClass('disabled');
uploader.disableBrowse();
}
phpbb.plupload.uploader.disableBrowse();
};
/**
* Enable the uploader
*
* @return undefined
*/
phpbb.plupload.enableUploader = function() {
$('#add_files').removeClass('disabled');
uploader.disableBrowse(false);
}
phpbb.plupload.uploader.disableBrowse(false);
};
/**
* Mark all queued files as failed.
*
* @param string error Error message to present to the user.
* @return undefined
* @param {string} error Error message to present to the user.
*/
phpbb.plupload.markQueuedFailed = function(error) {
var files = phpbb.plupload.getFilesByStatus(plupload.QUEUED);
@@ -435,48 +418,49 @@ phpbb.plupload.markQueuedFailed = function(error) {
$('#' + file.id).find('.file-progress').hide();
phpbb.plupload.fileError(file, error);
});
}
};
/**
* Marks a file as failed and sets the error message for it.
*
* @param object file Plupload file object that failed.
* @param string error Error message to present to the user.
* @return undefined
* @param {object} file Plupload file object that failed.
* @param {string} error Error message to present to the user.
*/
phpbb.plupload.fileError = function(file, error) {
file.status = plupload.FAILED;
file.error = error;
$('#' + file.id).find('.file-status').addClass('file-error').attr({'data-error-title': phpbb.plupload.lang.ERROR, 'data-error-message': error});
}
$('#' + file.id).find('.file-status')
.addClass('file-error')
.attr({
'data-error-title': phpbb.plupload.lang.ERROR,
'data-error-message': error
});
};
/**
* Set up the Plupload object and get some basic data.
*/
var uploader = new plupload.Uploader(phpbb.plupload.config);
phpbb.plupload.uploader = new plupload.Uploader(phpbb.plupload.config);
phpbb.plupload.initialize();
var $fileList = $('#file-list');
/**
* Insert inline attachment bbcode.
*/
$('#file-list').on('click', '.file-inline-bbcode', function(e) {
$fileList.on('click', '.file-inline-bbcode', function(e) {
var attachId = $(this).parents('.attach-row').attr('data-attach-id'),
index = phpbb.plupload.getIndex(attachId);
attach_inline(index, phpbb.plupload.data[index].real_filename);
attachInline(index, phpbb.plupload.data[index].real_filename);
e.preventDefault();
});
/**
* Delete a file.
*/
$('#file-list').on('click', '.file-delete', function(e) {
$fileList.on('click', '.file-delete', function(e) {
var row = $(this).parents('.attach-row'),
attachId = row.attr('data-attach-id');
@@ -487,7 +471,7 @@ $('#file-list').on('click', '.file-delete', function(e) {
/**
* Display the error message for a particular file when the error icon is clicked.
*/
$('#file-list').on('click', '.file-error', function(e) {
$fileList.on('click', '.file-error', function(e) {
phpbb.alert($(this).attr('data-error-title'), $(this).attr('data-error-message'));
e.preventDefault();
});
@@ -495,7 +479,7 @@ $('#file-list').on('click', '.file-error', function(e) {
/**
* Fires when an error occurs.
*/
uploader.bind('Error', function(up, error) {
phpbb.plupload.uploader.bind('Error', function(up, error) {
error.file.name = plupload.xmlEncode(error.file.name);
// The error message that Plupload provides for these is vague, so we'll be more specific.
@@ -512,18 +496,15 @@ uploader.bind('Error', function(up, error) {
* send the real filename along with the chunk. This is necessary because
* for some reason the filename is set to 'blob' whenever a file is chunked
*
* @param object up The plupload.Uploader object
* @param object file The plupload.File object that is about to be
* uploaded
*
* @return undefined
* @param {object} up The plupload.Uploader object
* @param {object} file The plupload.File object that is about to be uploaded
*/
uploader.bind('BeforeUpload', function(up, file) {
phpbb.plupload.uploader.bind('BeforeUpload', function(up, file) {
if (phpbb.plupload.handleMaxFilesReached()) {
return;
}
phpbb.plupload.updateMultipartParams({'real_filename': file.name});
phpbb.plupload.updateMultipartParams({ real_filename: file.name });
});
/**
@@ -531,14 +512,12 @@ uploader.bind('BeforeUpload', function(up, file) {
* response from the server and checks for an error. If an error occurs it
* is reported to the user and the upload of this particular file is halted
*
* @param object up The plupload.Uploader object
* @param object file The plupload.File object whose chunk has just
* @param {object} up The plupload.Uploader object
* @param {object} file The plupload.File object whose chunk has just
* been uploaded
* @param object response The response object from the server
*
* @return undefined
* @param {object} response The response object from the server
*/
uploader.bind('ChunkUploaded', function(up, file, response) {
phpbb.plupload.uploader.bind('ChunkUploaded', function(up, file, response) {
if (response.chunk >= response.chunks - 1) {
return;
}
@@ -559,7 +538,7 @@ uploader.bind('ChunkUploaded', function(up, file, response) {
// If trigger_error() was called, then a permission error likely occurred.
if (typeof json.title !== 'undefined') {
json.error = {message: json.message};
json.error = { message: json.message };
}
if (json.error) {
@@ -576,10 +555,8 @@ uploader.bind('ChunkUploaded', function(up, file, response) {
/**
* Fires when files are added to the queue.
*
* @return undefined
*/
uploader.bind('FilesAdded', function(up, files) {
phpbb.plupload.uploader.bind('FilesAdded', function(up, files) {
// Prevent unnecessary requests to the server if the user already uploaded
// the maximum number of files allowed.
if (phpbb.plupload.handleMaxFilesReached()) {
@@ -587,13 +564,14 @@ uploader.bind('FilesAdded', function(up, files) {
}
// Switch the active tab if the style supports it
if (typeof activateSubPanel == 'function') {
activateSubPanel('attach-panel');
if (typeof activateSubPanel === 'function') {
activateSubPanel('attach-panel'); // jshint ignore: line
}
// Show the file list if there aren't any files currently.
if (!$('#file-list-container').is(':visible')) {
$('#file-list-container').show(100);
var $fileListContainer = $('#file-list-container');
if (!$fileListContainer.is(':visible')) {
$fileListContainer.show(100);
}
$.each(files, function(i, file) {
@@ -601,7 +579,7 @@ uploader.bind('FilesAdded', function(up, files) {
});
up.bind('UploadProgress', function(up, file) {
$('#' + file.id + " .file-progress-bar").css('width', file.percent + '%');
$('.file-progress-bar', '#' + file.id).css('width', file.percent + '%');
$('#file-total-progress-bar').css('width', up.total.percent + '%');
});
@@ -619,14 +597,12 @@ uploader.bind('FilesAdded', function(up, files) {
* appends it to the next file upload so that the server can maintain state
* with regards to the attachments in a given post
*
* @param object up The plupload.Uploader object
* @param object file The plupload.File object that has just been
* @param {object} up The plupload.Uploader object
* @param {object} file The plupload.File object that has just been
* uploaded
* @param string response The response string from the server
*
* @return undefined
* @param {string} response The response string from the server
*/
uploader.bind('FileUploaded', function(up, file, response) {
phpbb.plupload.uploader.bind('FileUploaded', function(up, file, response) {
var json = {},
row = $('#' + file.id),
error;
@@ -635,7 +611,7 @@ uploader.bind('FileUploaded', function(up, file, response) {
row.find('.file-progress').hide();
try {
json = $.parseJSON(response.response);
json = JSON.parse(response.response);
} catch (e) {
error = 'Error parsing server response.';
}
@@ -643,7 +619,7 @@ uploader.bind('FileUploaded', function(up, file, response) {
// If trigger_error() was called, then a permission error likely occurred.
if (typeof json.title !== 'undefined') {
error = json.message;
up.trigger('Error', {message: error});
up.trigger('Error', { message: error });
// The rest of the queue will fail.
phpbb.plupload.markQueuedFailed(error);
@@ -654,25 +630,19 @@ uploader.bind('FileUploaded', function(up, file, response) {
if (typeof error !== 'undefined') {
phpbb.plupload.fileError(file, error);
} else if (file.status === plupload.DONE) {
file.attachment_data = json['data'][0];
file.attachment_data = json.data[0];
row.attr('data-attach-id', file.attachment_data.attach_id);
row.find('.file-inline-bbcode').show();
row.find('.file-status').addClass('file-uploaded');
phpbb.plupload.update(json['data'], 'addition', 0, [json['download_url']]);
phpbb.plupload.update(json.data, 'addition', 0, [json.download_url]);
}
});
/**
* Fires when the entire queue of files have been uploaded.
*
* @param object up The plupload.Uploader object
* @param array files An array of plupload.File objects that have just
* been uploaded as part of a queue
*
* @return undefined
* Fires when the entire queue of files have been uploaded.
*/
uploader.bind('UploadComplete', function(up, files) {
phpbb.plupload.uploader.bind('UploadComplete', function() {
// Hide the progress bar
setTimeout(function() {
$('#file-total-progress-bar').fadeOut(500, function() {

View File

@@ -104,7 +104,7 @@ require($phpbb_root_path . 'includes/compatibility_globals.' . $phpEx);
// Add own hook handler
require($phpbb_root_path . 'includes/hooks/index.' . $phpEx);
$phpbb_hook = new phpbb_hook(array('exit_handler', 'phpbb_user_session_handler', 'append_sid', array('\phpbb\template\template', 'display')));
$phpbb_hook = new phpbb_hook(array('exit_handler', 'phpbb_user_session_handler', 'append_sid', array('template', 'display')));
$phpbb_hook_finder = $phpbb_container->get('hook_finder');
foreach ($phpbb_hook_finder->find() as $hook)

View File

@@ -38,11 +38,11 @@
},
"require-dev": {
"fabpot/goutte": "1.0.*",
"phing/phing": "2.4.*",
"phpunit/dbunit": "1.3.*",
"phpunit/phpunit": "4.1.*",
"phing/phing": "2.4.*",
"sami/sami": "1.*",
"squizlabs/php_codesniffer": "1.*",
"squizlabs/php_codesniffer": "2.*",
"symfony/browser-kit": "2.3.*",
"symfony/css-selector": "2.3.*",
"symfony/debug": "2.3.*",

247
phpBB/composer.lock generated
View File

@@ -1,9 +1,10 @@
{
"_readme": [
"This file locks the dependencies of your project to a known state",
"Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file"
"Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"hash": "d93446768ea0665b7c55c01890153a67",
"hash": "17b51553237b78392baf2ec78bfdfbc0",
"packages": [
{
"name": "lusitanian/oauth",
@@ -108,17 +109,17 @@
},
{
"name": "symfony/config",
"version": "v2.3.19",
"version": "v2.3.21",
"target-dir": "Symfony/Component/Config",
"source": {
"type": "git",
"url": "https://github.com/symfony/Config.git",
"reference": "b34d2b32a92938476f0689486e7a11ea1aeb079e"
"reference": "f9fac999dbc2c6aabd749c034d938b5f9aa5fb7d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/Config/zipball/b34d2b32a92938476f0689486e7a11ea1aeb079e",
"reference": "b34d2b32a92938476f0689486e7a11ea1aeb079e",
"url": "https://api.github.com/repos/symfony/Config/zipball/f9fac999dbc2c6aabd749c034d938b5f9aa5fb7d",
"reference": "f9fac999dbc2c6aabd749c034d938b5f9aa5fb7d",
"shasum": ""
},
"require": {
@@ -152,21 +153,21 @@
],
"description": "Symfony Config Component",
"homepage": "http://symfony.com",
"time": "2014-08-02 07:53:48"
"time": "2014-09-23 05:15:05"
},
{
"name": "symfony/console",
"version": "v2.3.19",
"version": "v2.3.21",
"target-dir": "Symfony/Component/Console",
"source": {
"type": "git",
"url": "https://github.com/symfony/Console.git",
"reference": "a2723f99716c2fa6411e2eb5842edbe680e4b462"
"reference": "aa12ac573c583a74c2cb26ad9be478e119f04ad1"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/Console/zipball/a2723f99716c2fa6411e2eb5842edbe680e4b462",
"reference": "a2723f99716c2fa6411e2eb5842edbe680e4b462",
"url": "https://api.github.com/repos/symfony/Console/zipball/aa12ac573c583a74c2cb26ad9be478e119f04ad1",
"reference": "aa12ac573c583a74c2cb26ad9be478e119f04ad1",
"shasum": ""
},
"require": {
@@ -205,21 +206,21 @@
],
"description": "Symfony Console Component",
"homepage": "http://symfony.com",
"time": "2014-08-07 15:55:24"
"time": "2014-10-05 13:45:10"
},
{
"name": "symfony/debug",
"version": "v2.3.19",
"version": "v2.3.21",
"target-dir": "Symfony/Component/Debug",
"source": {
"type": "git",
"url": "https://github.com/symfony/Debug.git",
"reference": "91e3a1480c67601d2406cd938735abe0243e1c95"
"reference": "883f847ad179e92549a8cea372b08e5ef47ffe40"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/Debug/zipball/91e3a1480c67601d2406cd938735abe0243e1c95",
"reference": "91e3a1480c67601d2406cd938735abe0243e1c95",
"url": "https://api.github.com/repos/symfony/Debug/zipball/883f847ad179e92549a8cea372b08e5ef47ffe40",
"reference": "883f847ad179e92549a8cea372b08e5ef47ffe40",
"shasum": ""
},
"require": {
@@ -261,21 +262,21 @@
],
"description": "Symfony Debug Component",
"homepage": "http://symfony.com",
"time": "2014-07-07 10:13:42"
"time": "2014-10-09 16:42:17"
},
{
"name": "symfony/dependency-injection",
"version": "v2.3.19",
"version": "v2.3.21",
"target-dir": "Symfony/Component/DependencyInjection",
"source": {
"type": "git",
"url": "https://github.com/symfony/DependencyInjection.git",
"reference": "5ee5795515be251c56057d79154e561ee1efecd2"
"reference": "e2324e1c8c39faa5f27e6170b278d7f631574141"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/DependencyInjection/zipball/5ee5795515be251c56057d79154e561ee1efecd2",
"reference": "5ee5795515be251c56057d79154e561ee1efecd2",
"url": "https://api.github.com/repos/symfony/DependencyInjection/zipball/e2324e1c8c39faa5f27e6170b278d7f631574141",
"reference": "e2324e1c8c39faa5f27e6170b278d7f631574141",
"shasum": ""
},
"require": {
@@ -317,21 +318,21 @@
],
"description": "Symfony DependencyInjection Component",
"homepage": "http://symfony.com",
"time": "2014-08-27 08:32:18"
"time": "2014-10-01 05:38:33"
},
{
"name": "symfony/event-dispatcher",
"version": "v2.3.19",
"version": "v2.3.21",
"target-dir": "Symfony/Component/EventDispatcher",
"source": {
"type": "git",
"url": "https://github.com/symfony/EventDispatcher.git",
"reference": "2c64e46d7e22bcafcab4413ff62bc389abf87ea5"
"reference": "3e0b837811fadd73c833c7c06a92201d953df59d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/2c64e46d7e22bcafcab4413ff62bc389abf87ea5",
"reference": "2c64e46d7e22bcafcab4413ff62bc389abf87ea5",
"url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/3e0b837811fadd73c833c7c06a92201d953df59d",
"reference": "3e0b837811fadd73c833c7c06a92201d953df59d",
"shasum": ""
},
"require": {
@@ -371,21 +372,21 @@
],
"description": "Symfony EventDispatcher Component",
"homepage": "http://symfony.com",
"time": "2014-07-25 15:00:14"
"time": "2014-10-01 05:39:06"
},
{
"name": "symfony/filesystem",
"version": "v2.3.19",
"version": "v2.3.21",
"target-dir": "Symfony/Component/Filesystem",
"source": {
"type": "git",
"url": "https://github.com/symfony/Filesystem.git",
"reference": "007359d2822d5eba4f04f6507bc9b46877c622b4"
"reference": "1c3a5fab445d1d4a5d57f8fbf1379696c9785942"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/Filesystem/zipball/007359d2822d5eba4f04f6507bc9b46877c622b4",
"reference": "007359d2822d5eba4f04f6507bc9b46877c622b4",
"url": "https://api.github.com/repos/symfony/Filesystem/zipball/1c3a5fab445d1d4a5d57f8fbf1379696c9785942",
"reference": "1c3a5fab445d1d4a5d57f8fbf1379696c9785942",
"shasum": ""
},
"require": {
@@ -418,21 +419,21 @@
],
"description": "Symfony Filesystem Component",
"homepage": "http://symfony.com",
"time": "2014-08-31 03:30:23"
"time": "2014-09-22 08:32:35"
},
{
"name": "symfony/http-foundation",
"version": "v2.3.19",
"version": "v2.3.21",
"target-dir": "Symfony/Component/HttpFoundation",
"source": {
"type": "git",
"url": "https://github.com/symfony/HttpFoundation.git",
"reference": "d0125fed988da9e189864c2e6de967b3ee7f1d98"
"reference": "30c90f08f948dd43e7310beae7a85c02ad2b655d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/HttpFoundation/zipball/d0125fed988da9e189864c2e6de967b3ee7f1d98",
"reference": "d0125fed988da9e189864c2e6de967b3ee7f1d98",
"url": "https://api.github.com/repos/symfony/HttpFoundation/zipball/30c90f08f948dd43e7310beae7a85c02ad2b655d",
"reference": "30c90f08f948dd43e7310beae7a85c02ad2b655d",
"shasum": ""
},
"require": {
@@ -468,21 +469,21 @@
],
"description": "Symfony HttpFoundation Component",
"homepage": "http://symfony.com",
"time": "2014-09-03 07:39:11"
"time": "2014-10-23 13:11:04"
},
{
"name": "symfony/http-kernel",
"version": "v2.3.19",
"version": "v2.3.21",
"target-dir": "Symfony/Component/HttpKernel",
"source": {
"type": "git",
"url": "https://github.com/symfony/HttpKernel.git",
"reference": "a24817f69012b23ce7c554af6b4c7b53235c7c55"
"reference": "0154ff659004d4148e8da0f2bdb672efe55e6ee5"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/HttpKernel/zipball/a24817f69012b23ce7c554af6b4c7b53235c7c55",
"reference": "a24817f69012b23ce7c554af6b4c7b53235c7c55",
"url": "https://api.github.com/repos/symfony/HttpKernel/zipball/0154ff659004d4148e8da0f2bdb672efe55e6ee5",
"reference": "0154ff659004d4148e8da0f2bdb672efe55e6ee5",
"shasum": ""
},
"require": {
@@ -539,21 +540,21 @@
],
"description": "Symfony HttpKernel Component",
"homepage": "http://symfony.com",
"time": "2014-09-03 09:45:27"
"time": "2014-10-24 05:54:08"
},
{
"name": "symfony/routing",
"version": "v2.3.19",
"version": "v2.3.21",
"target-dir": "Symfony/Component/Routing",
"source": {
"type": "git",
"url": "https://github.com/symfony/Routing.git",
"reference": "aa2beef5d5f1d84250b5ca73a4056c0504e5969e"
"reference": "f7f8ebf9c99e5ebfdb908c3558a818c2883eab1f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/Routing/zipball/aa2beef5d5f1d84250b5ca73a4056c0504e5969e",
"reference": "aa2beef5d5f1d84250b5ca73a4056c0504e5969e",
"url": "https://api.github.com/repos/symfony/Routing/zipball/f7f8ebf9c99e5ebfdb908c3558a818c2883eab1f",
"reference": "f7f8ebf9c99e5ebfdb908c3558a818c2883eab1f",
"shasum": ""
},
"require": {
@@ -563,6 +564,7 @@
"doctrine/common": "~2.2",
"psr/log": "~1.0",
"symfony/config": "~2.2",
"symfony/http-foundation": "~2.3",
"symfony/yaml": "~2.0"
},
"suggest": {
@@ -597,21 +599,21 @@
],
"description": "Symfony Routing Component",
"homepage": "http://symfony.com",
"time": "2014-08-15 09:05:55"
"time": "2014-10-13 12:38:27"
},
{
"name": "symfony/yaml",
"version": "v2.3.19",
"version": "v2.3.21",
"target-dir": "Symfony/Component/Yaml",
"source": {
"type": "git",
"url": "https://github.com/symfony/Yaml.git",
"reference": "71ceeca3d8164f0c5313127b24ad056071ccf2c6"
"reference": "34687c6236f1dfcebc874fbebd8da74d90f9f64f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/Yaml/zipball/71ceeca3d8164f0c5313127b24ad056071ccf2c6",
"reference": "71ceeca3d8164f0c5313127b24ad056071ccf2c6",
"url": "https://api.github.com/repos/symfony/Yaml/zipball/34687c6236f1dfcebc874fbebd8da74d90f9f64f",
"reference": "34687c6236f1dfcebc874fbebd8da74d90f9f64f",
"shasum": ""
},
"require": {
@@ -644,19 +646,19 @@
],
"description": "Symfony Yaml Component",
"homepage": "http://symfony.com",
"time": "2014-08-28 01:42:35"
"time": "2014-10-01 05:38:33"
},
{
"name": "twig/twig",
"version": "v1.13.2",
"source": {
"type": "git",
"url": "https://github.com/fabpot/Twig.git",
"url": "https://github.com/twigphp/Twig.git",
"reference": "6d6a1009427d1f398c9d40904147bf9f723d5755"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/fabpot/Twig/zipball/6d6a1009427d1f398c9d40904147bf9f723d5755",
"url": "https://api.github.com/repos/twigphp/Twig/zipball/6d6a1009427d1f398c9d40904147bf9f723d5755",
"reference": "6d6a1009427d1f398c9d40904147bf9f723d5755",
"shasum": ""
},
@@ -681,14 +683,11 @@
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com",
"homepage": "http://fabien.potencier.org",
"role": "Lead Developer"
"email": "fabien@symfony.com"
},
{
"name": "Armin Ronacher",
"email": "armin.ronacher@active-4.com",
"role": "Project Founder"
"email": "armin.ronacher@active-4.com"
}
],
"description": "Twig, the flexible, fast, and secure template language for PHP",
@@ -702,21 +701,21 @@
"packages-dev": [
{
"name": "fabpot/goutte",
"version": "v1.0.3",
"version": "v1.0.7",
"source": {
"type": "git",
"url": "https://github.com/fabpot/Goutte.git",
"reference": "75c9f23c4122caf4ea3e87a42a00b471366e707f"
"url": "https://github.com/FriendsOfPHP/Goutte.git",
"reference": "794b196e76bdd37b5155cdecbad311f0a3b07625"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/fabpot/Goutte/zipball/75c9f23c4122caf4ea3e87a42a00b471366e707f",
"reference": "75c9f23c4122caf4ea3e87a42a00b471366e707f",
"url": "https://api.github.com/repos/FriendsOfPHP/Goutte/zipball/794b196e76bdd37b5155cdecbad311f0a3b07625",
"reference": "794b196e76bdd37b5155cdecbad311f0a3b07625",
"shasum": ""
},
"require": {
"ext-curl": "*",
"guzzle/http": ">=3.0.5,<3.8-dev",
"guzzle/http": "~3.1",
"php": ">=5.3.0",
"symfony/browser-kit": "~2.1",
"symfony/css-selector": "~2.1",
@@ -725,8 +724,8 @@
"symfony/process": "~2.1"
},
"require-dev": {
"guzzle/plugin-history": ">=3.0.5,<3.8-dev",
"guzzle/plugin-mock": ">=3.0.5,<3.8-dev"
"guzzle/plugin-history": "~3.1",
"guzzle/plugin-mock": "~3.1"
},
"type": "application",
"extra": {
@@ -746,9 +745,7 @@
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com",
"homepage": "http://fabien.potencier.org",
"role": "Lead Developer"
"email": "fabien@symfony.com"
}
],
"description": "A simple PHP Web Scraper",
@@ -756,7 +753,7 @@
"keywords": [
"scraper"
],
"time": "2013-08-16 06:03:22"
"time": "2014-10-09 15:52:51"
},
{
"name": "guzzle/common",
@@ -1591,16 +1588,16 @@
},
{
"name": "sami/sami",
"version": "v1.3",
"version": "v1.4",
"source": {
"type": "git",
"url": "https://github.com/fabpot/Sami.git",
"reference": "76f2ed80b3420f7e2f6dcd5b7218b5a5781f4110"
"url": "https://github.com/FriendsOfPHP/Sami.git",
"reference": "70f29c781f7bef30181c814b9471b2ceac694454"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/fabpot/Sami/zipball/76f2ed80b3420f7e2f6dcd5b7218b5a5781f4110",
"reference": "76f2ed80b3420f7e2f6dcd5b7218b5a5781f4110",
"url": "https://api.github.com/repos/FriendsOfPHP/Sami/zipball/70f29c781f7bef30181c814b9471b2ceac694454",
"reference": "70f29c781f7bef30181c814b9471b2ceac694454",
"shasum": ""
},
"require": {
@@ -1621,7 +1618,7 @@
"type": "application",
"extra": {
"branch-alias": {
"dev-master": "1.3-dev"
"dev-master": "1.4-dev"
}
},
"autoload": {
@@ -1636,9 +1633,7 @@
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com",
"homepage": "http://fabien.potencier.org",
"role": "Lead Developer"
"email": "fabien@symfony.com"
}
],
"description": "Sami, an API documentation generator",
@@ -1646,7 +1641,7 @@
"keywords": [
"phpdoc"
],
"time": "2013-11-30 17:16:25"
"time": "2014-06-25 11:24:03"
},
{
"name": "sebastian/comparator",
@@ -1917,41 +1912,45 @@
},
{
"name": "squizlabs/php_codesniffer",
"version": "1.5.2",
"version": "2.3.2",
"source": {
"type": "git",
"url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
"reference": "a76a39b317ce8106abe6264daa505e24e1731860"
"reference": "e96d8579fbed0c95ecf2a0501ec4f307a4aa6404"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/a76a39b317ce8106abe6264daa505e24e1731860",
"reference": "a76a39b317ce8106abe6264daa505e24e1731860",
"url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/e96d8579fbed0c95ecf2a0501ec4f307a4aa6404",
"reference": "e96d8579fbed0c95ecf2a0501ec4f307a4aa6404",
"shasum": ""
},
"require": {
"ext-tokenizer": "*",
"ext-xmlwriter": "*",
"php": ">=5.1.2"
},
"suggest": {
"phpunit/php-timer": "dev-master"
},
"bin": [
"scripts/phpcs"
"scripts/phpcs",
"scripts/phpcbf"
],
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.0.x-dev"
}
},
"autoload": {
"classmap": [
"CodeSniffer.php",
"CodeSniffer/CLI.php",
"CodeSniffer/Exception.php",
"CodeSniffer/File.php",
"CodeSniffer/Fixer.php",
"CodeSniffer/Report.php",
"CodeSniffer/Reporting.php",
"CodeSniffer/Sniff.php",
"CodeSniffer/Tokens.php",
"CodeSniffer/Reports/",
"CodeSniffer/CommentParser/",
"CodeSniffer/Tokenizers/",
"CodeSniffer/DocGenerators/",
"CodeSniffer/Standards/AbstractPatternSniff.php",
@@ -1977,27 +1976,27 @@
"role": "lead"
}
],
"description": "PHP_CodeSniffer tokenises PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.",
"description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.",
"homepage": "http://www.squizlabs.com/php-codesniffer",
"keywords": [
"phpcs",
"standards"
],
"time": "2014-02-04 23:49:58"
"time": "2015-04-28 23:28:20"
},
{
"name": "symfony/browser-kit",
"version": "v2.3.19",
"version": "v2.3.21",
"target-dir": "Symfony/Component/BrowserKit",
"source": {
"type": "git",
"url": "https://github.com/symfony/BrowserKit.git",
"reference": "262d698efaa788ce24ff9c987378789bf3f81ce9"
"reference": "6a403eedacb56d32dc2cc657cfeac09d640ae6bc"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/BrowserKit/zipball/262d698efaa788ce24ff9c987378789bf3f81ce9",
"reference": "262d698efaa788ce24ff9c987378789bf3f81ce9",
"url": "https://api.github.com/repos/symfony/BrowserKit/zipball/6a403eedacb56d32dc2cc657cfeac09d640ae6bc",
"reference": "6a403eedacb56d32dc2cc657cfeac09d640ae6bc",
"shasum": ""
},
"require": {
@@ -2038,21 +2037,21 @@
],
"description": "Symfony BrowserKit Component",
"homepage": "http://symfony.com",
"time": "2014-08-05 07:20:55"
"time": "2014-09-22 08:32:35"
},
{
"name": "symfony/css-selector",
"version": "v2.3.19",
"version": "v2.3.21",
"target-dir": "Symfony/Component/CssSelector",
"source": {
"type": "git",
"url": "https://github.com/symfony/CssSelector.git",
"reference": "8953d325d3341c246abadb79be172de95ef80664"
"reference": "d9943386b648d21746bed25cc24f61fab1387943"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/CssSelector/zipball/8953d325d3341c246abadb79be172de95ef80664",
"reference": "8953d325d3341c246abadb79be172de95ef80664",
"url": "https://api.github.com/repos/symfony/CssSelector/zipball/d9943386b648d21746bed25cc24f61fab1387943",
"reference": "d9943386b648d21746bed25cc24f61fab1387943",
"shasum": ""
},
"require": {
@@ -2089,21 +2088,21 @@
],
"description": "Symfony CssSelector Component",
"homepage": "http://symfony.com",
"time": "2014-08-27 08:24:06"
"time": "2014-10-09 12:30:02"
},
{
"name": "symfony/dom-crawler",
"version": "v2.3.19",
"version": "v2.3.21",
"target-dir": "Symfony/Component/DomCrawler",
"source": {
"type": "git",
"url": "https://github.com/symfony/DomCrawler.git",
"reference": "bad8d98561f071639fa67b20680bffcc256ce252"
"reference": "64b90870ee3a4e88c9a7a12861683864de029d31"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/DomCrawler/zipball/bad8d98561f071639fa67b20680bffcc256ce252",
"reference": "bad8d98561f071639fa67b20680bffcc256ce252",
"url": "https://api.github.com/repos/symfony/DomCrawler/zipball/64b90870ee3a4e88c9a7a12861683864de029d31",
"reference": "64b90870ee3a4e88c9a7a12861683864de029d31",
"shasum": ""
},
"require": {
@@ -2142,21 +2141,21 @@
],
"description": "Symfony DomCrawler Component",
"homepage": "http://symfony.com",
"time": "2014-08-21 00:21:59"
"time": "2014-10-01 05:38:33"
},
{
"name": "symfony/finder",
"version": "v2.3.19",
"version": "v2.3.21",
"target-dir": "Symfony/Component/Finder",
"source": {
"type": "git",
"url": "https://github.com/symfony/Finder.git",
"reference": "f7a5a5a3b1fc0ec9a1a5b4429223a8726e0f4b55"
"reference": "fc25dab213d14468c39f12d47e5b79a72b898d4d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/Finder/zipball/f7a5a5a3b1fc0ec9a1a5b4429223a8726e0f4b55",
"reference": "f7a5a5a3b1fc0ec9a1a5b4429223a8726e0f4b55",
"url": "https://api.github.com/repos/symfony/Finder/zipball/fc25dab213d14468c39f12d47e5b79a72b898d4d",
"reference": "fc25dab213d14468c39f12d47e5b79a72b898d4d",
"shasum": ""
},
"require": {
@@ -2189,21 +2188,21 @@
],
"description": "Symfony Finder Component",
"homepage": "http://symfony.com",
"time": "2014-08-31 04:03:32"
"time": "2014-10-01 05:39:06"
},
{
"name": "symfony/process",
"version": "v2.3.19",
"version": "v2.3.21",
"target-dir": "Symfony/Component/Process",
"source": {
"type": "git",
"url": "https://github.com/symfony/Process.git",
"reference": "b8fc0e4b6750e4c458a38d038e6b4d538d4fe2bb"
"reference": "0434822691030547f2439d30ff68758c5576a0ce"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/Process/zipball/b8fc0e4b6750e4c458a38d038e6b4d538d4fe2bb",
"reference": "b8fc0e4b6750e4c458a38d038e6b4d538d4fe2bb",
"url": "https://api.github.com/repos/symfony/Process/zipball/0434822691030547f2439d30ff68758c5576a0ce",
"reference": "0434822691030547f2439d30ff68758c5576a0ce",
"shasum": ""
},
"require": {
@@ -2236,20 +2235,16 @@
],
"description": "Symfony Process Component",
"homepage": "http://symfony.com",
"time": "2014-08-28 09:02:24"
"time": "2014-10-01 05:38:33"
}
],
"aliases": [
],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [
],
"stability-flags": [],
"prefer-stable": false,
"prefer-lowest": false,
"platform": {
"php": ">=5.3.3"
},
"platform-dev": [
]
"platform-dev": []
}

View File

@@ -84,6 +84,7 @@ services:
- @config
- @cache
- @log
- %core.root_path%
tags:
- { name: console.command }

View File

@@ -4,6 +4,7 @@ services:
arguments:
- @auth
- @config
- @dispatcher
- @dbal.conn
- @user
- %core.root_path%

View File

@@ -18,6 +18,7 @@ services:
migrator:
class: phpbb\db\migrator
arguments:
- @service_container
- @config
- @dbal.conn
- @dbal.tools

View File

@@ -7,6 +7,7 @@ services:
- @service_container
- @user_loader
- @config
- @dispatcher
- @dbal.conn
- @cache
- @user

View File

@@ -101,6 +101,7 @@ services:
arguments:
- @request
- @passwords.driver.salted_md5
- @passwords.driver_helper
- %core.root_path%
- %core.php_ext%
tags:

View File

@@ -1,7 +1,7 @@
# Structure:
#
# foo_controller:
# pattern: /foo
# path: /foo
# defaults: { _controller: foo_sevice:method }
#
# The above will be accessed via app.php?controller=foo and it will

View File

@@ -75,6 +75,7 @@ services:
- @controller.provider
- @ext.manager
- @symfony_request
- @request
- @filesystem
- %core.root_path%
- %core.php_ext%
@@ -108,6 +109,9 @@ services:
filesystem:
class: phpbb\filesystem
file_downloader:
class: phpbb\file_downloader
http_kernel:
class: Symfony\Component\HttpKernel\HttpKernel
arguments:
@@ -155,6 +159,8 @@ services:
- null
- %core.disable_super_globals%
# WARNING: The Symfony request does not escape the input and should be used very carefully
# prefer the phpbb request (service @request) as possible
symfony_request:
class: phpbb\symfony_request
arguments:
@@ -178,4 +184,5 @@ services:
arguments:
- @cache
- @config
- @file_downloader
- @user

View File

@@ -198,9 +198,9 @@ $prefixes = array('f_', 'a_', 'm_', 'u_');
foreach ($prefixes as $prefix)
{
$var = $prefix . 'permissions';
if (sizeof($$var))
if (sizeof(${$var}))
{
foreach ($$var as $auth_option => $l_ary)
foreach (${$var} as $auth_option => $l_ary)
{
$sql_ary = array(
'auth_option' => $auth_option,

View File

@@ -51,7 +51,6 @@ $classes = $finder->core_path('phpbb/')
$db = new \phpbb\db\driver\sqlite();
$schema_generator = new \phpbb\db\migration\schema_generator($classes, new \phpbb\config\config(array()), $db, new \phpbb\db\tools($db, true), $phpbb_root_path, $phpEx, $table_prefix);
$schema_data = $schema_generator->get_schema();
$dbms_type_map = phpbb\db\tools::get_dbms_type_map();
$fp = fopen($schema_path . 'schema.json', 'wb');
fwrite($fp, json_encode($schema_data, JSON_PRETTY_PRINT));

View File

@@ -18,15 +18,19 @@ if (php_sapi_name() != 'cli')
$phpEx = substr(strrchr(__FILE__, '.'), 1);
$phpbb_root_path = __DIR__ . '/../';
define('IN_PHPBB', true);
function usage()
{
echo "Usage: export_events_for_wiki.php COMMAND [EXTENSION]\n";
echo "Usage: export_events_for_wiki.php COMMAND [VERSION] [EXTENSION]\n";
echo "\n";
echo "COMMAND:\n";
echo " all:\n";
echo " Generate the complete wikipage for https://wiki.phpbb.com/Event_List\n";
echo "\n";
echo " diff:\n";
echo " Generate the Event Diff for the release highlights\n";
echo "\n";
echo " php:\n";
echo " Generate the PHP event section of Event_List\n";
echo "\n";
@@ -36,6 +40,9 @@ function usage()
echo " styles:\n";
echo " Generate the Styles Template event section of Event_List\n";
echo "\n";
echo "VERSION (diff only):\n";
echo " Filter events (minimum version)\n";
echo "\n";
echo "EXTENSION (Optional):\n";
echo " If not given, only core events will be exported.\n";
echo " Otherwise only events from the extension will be exported.\n";
@@ -55,20 +62,32 @@ validate_argument_count($argc, 1);
$action = $argv[1];
$extension = isset($argv[2]) ? $argv[2] : null;
$min_version = null;
require __DIR__ . '/../phpbb/event/php_exporter.' . $phpEx;
require __DIR__ . '/../phpbb/event/md_exporter.' . $phpEx;
require __DIR__ . '/../includes/functions.' . $phpEx;
require __DIR__ . '/../phpbb/event/recursive_event_filter_iterator.' . $phpEx;
require __DIR__ . '/../phpbb/recursive_dot_prefix_filter_iterator.' . $phpEx;
switch ($action)
{
case 'diff':
echo '== Event changes ==' . "\n";
$min_version = $extension;
$extension = isset($argv[3]) ? $argv[3] : null;
case 'all':
echo '__FORCETOC__' . "\n";
if ($action === 'all')
{
echo '__FORCETOC__' . "\n";
}
case 'php':
$exporter = new \phpbb\event\php_exporter($phpbb_root_path, $extension);
$exporter = new \phpbb\event\php_exporter($phpbb_root_path, $extension, $min_version);
$exporter->crawl_phpbb_directory_php();
echo $exporter->export_events_for_wiki();
echo $exporter->export_events_for_wiki($action);
if ($action === 'php')
{
@@ -78,9 +97,16 @@ switch ($action)
// no break;
case 'styles':
$exporter = new \phpbb\event\md_exporter($phpbb_root_path, $extension);
$exporter->crawl_phpbb_directory_styles('docs/events.md');
echo $exporter->export_events_for_wiki();
$exporter = new \phpbb\event\md_exporter($phpbb_root_path, $extension, $min_version);
if ($min_version && $action === 'diff')
{
$exporter->crawl_eventsmd('docs/events.md', 'styles');
}
else
{
$exporter->crawl_phpbb_directory_styles('docs/events.md');
}
echo $exporter->export_events_for_wiki($action);
if ($action === 'styles')
{
@@ -90,9 +116,16 @@ switch ($action)
// no break;
case 'adm':
$exporter = new \phpbb\event\md_exporter($phpbb_root_path, $extension);
$exporter->crawl_phpbb_directory_adm('docs/events.md');
echo $exporter->export_events_for_wiki();
$exporter = new \phpbb\event\md_exporter($phpbb_root_path, $extension, $min_version);
if ($min_version && $action === 'diff')
{
$exporter->crawl_eventsmd('docs/events.md', 'adm');
}
else
{
$exporter->crawl_phpbb_directory_adm('docs/events.md');
}
echo $exporter->export_events_for_wiki($action);
if ($action === 'all')
{

View File

@@ -62,10 +62,14 @@ echo "USE $dbname;$newline$newline";
@set_time_limit(0);
require($phpbb_root_path . 'includes/db/schema_data.' . $phpEx);
require($phpbb_root_path . 'phpbb/db/tools.' . $phpEx);
$finder = new \phpbb\finder(new \phpbb\filesystem(), $phpbb_root_path);
$classes = $finder->core_path('phpbb/')
->directory('/db/migration/data')
->get_classes();
$dbms_type_map = phpbb\db\tools::get_dbms_type_map();
$schema_generator = new \phpbb\db\migration\schema_generator($classes, $config, $db, new \phpbb\db\tools($db, true), $phpbb_root_path, $phpEx, $table_prefix);
$schema_data = $schema_generator->get_schema();
$dbms_type_map = \phpbb\db\tools::get_dbms_type_map();
foreach ($schema_data as $table_name => $table_data)
{

151
phpBB/develop/regex_idn.php Normal file
View File

@@ -0,0 +1,151 @@
<?php
//
// Security message:
//
// This script is potentially dangerous.
// Remove or comment the next line (die(".... ) to enable this script.
// Do NOT FORGET to either remove this script or disable it after you have used it.
//
die("Please read the first lines of this script for instructions on how to enable it");
// IP regular expressions
$dec_octet = '(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])';
$h16 = '[\dA-F]{1,4}';
$ipv4 = "(?:$dec_octet\.){3}$dec_octet";
$ls32 = "(?:$h16:$h16|$ipv4)";
$ipv6_construct = array(
array(false, '', '{6}', $ls32),
array(false, '::', '{0,5}', "(?:$h16(?::$h16)?|$ipv4)"),
array('', ':', '{4}', $ls32),
array('{1,2}', ':', '{3}', $ls32),
array('{1,3}', ':', '{2}', $ls32),
array('{1,4}', ':', '', $ls32),
array('{1,5}', ':', false, $ls32),
array('{1,6}', ':', false, $h16),
array('{1,7}', ':', false, ''),
array(false, '::', false, '')
);
$ipv6 = '(?:';
foreach ($ipv6_construct as $ip_type)
{
$ipv6 .= '(?:';
if ($ip_type[0] !== false)
{
$ipv6 .= "(?:$h16:)" . $ip_type[0];
}
$ipv6 .= $ip_type[1];
if ($ip_type[2] !== false)
{
$ipv6 .= "(?:$h16:)" . $ip_type[2];
}
$ipv6 .= $ip_type[3] . ')|';
}
$ipv6 = substr($ipv6, 0, -1) . ')';
echo 'IPv4: ' . $ipv4 . "<br /><br />\n\nIPv6: " . $ipv6 . "<br /><br />\n\n";
// URL regular expressions
/* IDN2008 characters derivation
** http://unicode.org/faq/idn.html#33 - IDN FAQ: derivation of valid characters in terms of Unicode properties
** http://unicode.org/reports/tr46/ - Unicode Technical Standard #46. Unicode IDNA Compatibility Processing
** http://www.unicode.org/Public/UNIDATA/DerivedNormalizationProps.txt - Unicode Character Database
*/
/*
** Remove Control Characters and Whitespace (as in IDNA2003)
*/
$no_cc = '\p{C}\p{Z}';
/*
** Remove Symbols, Punctuation, non-decimal Numbers, and Enclosing Marks
*/
$no_symbol = '\p{S}\p{P}\p{Nl}\p{No}\p{Me}';
/*
** Remove characters used for archaic Hangul (Korean) - \p{HST=L} and \p{HST=V}
** as per http://unicode.org/Public/UNIDATA/HangulSyllableType.txt
*/
$no_hangul = '\x{1100}-\x{115F}\x{A960}-\x{A97C}\x{1160}-\x{11A7}\x{D7B0}-\x{D7C6}';
/*
** Remove three blocks of technical or archaic symbols.
*/
$no_cdm = '\x{20D0}-\x{20FF}'; // \p{block=Combining_Diacritical_Marks_For_Symbols}
$no_musical = '\x{1D100}-\x{1D1FF}'; // \p{block=Musical_Symbols}
$no_ancient_greek_musical = '\x{1D200}-\x{1D24F}'; // \p{block=Ancient_Greek_Musical_Notation}
/* Remove certain exceptions:
** U+0640 ARABIC TATWEEL
** U+07FA NKO LAJANYALAN
** U+302E HANGUL SINGLE DOT TONE MARK
** U+302F HANGUL DOUBLE DOT TONE MARK
** U+3031 VERTICAL KANA REPEAT MARK
** U+3032 VERTICAL KANA REPEAT WITH VOICED SOUND MARK
** ..
** U+3035 VERTICAL KANA REPEAT MARK LOWER HALF
** U+303B VERTICAL IDEOGRAPHIC ITERATION MARK
*/
$no_certain_exceptions = '\x{0640}\x{07FA}\x{302E}\x{302F}\x{3031}-\x{3035}\x{303B}';
/* Add certain exceptions:
** U+00B7 MIDDLE DOT
** U+0375 GREEK LOWER NUMERAL SIGN
** U+05F3 HEBREW PUNCTUATION GERESH
** U+05F4 HEBREW PUNCTUATION GERSHAYIM
** U+30FB KATAKANA MIDDLE DOT
** U+002D HYPHEN-MINUS
** U+06FD ARABIC SIGN SINDHI AMPERSAND
** U+06FE ARABIC SIGN SINDHI POSTPOSITION MEN
** U+0F0B TIBETAN MARK INTERSYLLABIC TSHEG
** U+3007 IDEOGRAPHIC NUMBER ZERO
*/
$add_certain_exceptions = '\x{00B7}\x{0375}\x{05F3}\x{05F4}\x{30FB}\x{002D}\x{06FD}\x{06FE}\x{0F0B}\x{3007}';
/* Add special exceptions (Deviations):
** U+00DF LATIN SMALL LETTER SHARP S
** U+03C2 GREEK SMALL LETTER FINAL SIGMA
** U+200C ZERO WIDTH NON-JOINER
** U+200D ZERO WIDTH JOINER
*/
$add_deviations = '\x{00DF}\x{03C2}\x{200C}\x{200D}';
// Concatenate remove/add regexes respectively
$remove_chars = "$no_cc$no_symbol$no_hangul$no_cdm$no_musical$no_ancient_greek_musical$no_certain_exceptions";
$add_chars = "$add_certain_exceptions$add_deviations";
// Initialize inline mode
$inline = false;
do
{
$inline = !$inline;
$pct_encoded = "%[\dA-F]{2}";
$unreserved = "$add_chars\pL0-9\-._~";
$sub_delims = ($inline) ? '!$&\'(*+,;=' : '!$&\'()*+,;=';
$scheme = ($inline) ? '[a-z][a-z\d+]*': '[a-z][a-z\d+\-.]*' ; // avoid automatic parsing of "word" in "last word.http://..."
$pchar = "(?:[^$remove_chars]*[$unreserved$sub_delims:@|]+|$pct_encoded)"; // rfc: no "|"
$reg_name = "(?:[^$remove_chars]*[$unreserved$sub_delims:@|]+|$pct_encoded)+"; // rfc: * instead of + and no "|" and no "@" and no ":" (included instead of userinfo)
//$userinfo = "(?:(?:[$unreserved$sub_delims:]+|$pct_encoded))*";
$ipv4_simple = '[0-9.]+';
$ipv6_simple = '\[[a-z0-9.]+:[a-z0-9.]+:[a-z0-9.:]+\]';
$host = "(?:$reg_name|$ipv4_simple|$ipv6_simple)";
$port = '\d*';
//$authority = "(?:$userinfo@)?$host(?::$port)?";
$authority = "$host(?::$port)?";
$segment = "$pchar*";
$path_abempty = "(?:/$segment)*";
$hier_part = "/{2}$authority$path_abempty";
$query = "(?:[^$remove_chars]*[$unreserved$sub_delims:@/?|]+|$pct_encoded)*"; // pchar | "/" | "?", rfc: no "|"
$fragment = $query;
$url = "$scheme:$hier_part(?:\?$query)?(?:\#$fragment)?";
echo (($inline) ? 'URL inline: ' : 'URL: ') . $url . "<br /><br />\n\n";
// no scheme, shortened authority, but host has to start with www.
$www_url = "www\.$reg_name(?::$port)?$path_abempty(?:\?$query)?(?:\#$fragment)?";
echo (($inline) ? 'www.URL_inline: ' : 'www.URL: ') . $www_url . "<br /><br />\n\n";
// no schema and no authority
$relative_url = "$segment$path_abempty(?:\?$query)?(?:\#$fragment)?";
echo (($inline) ? 'relative URL inline: ' : 'relative URL: ') . $relative_url . "<br /><br />\n\n";
}
while ($inline);

View File

@@ -40,7 +40,7 @@ if (!class_exists($search_type))
}
$error = false;
$search = new $search_type($error, $phpbb_root_path, $phpEx, $auth, $config, $db, $user);
$search = new $search_type($error, $phpbb_root_path, $phpEx, $auth, $config, $db, $user, $phpbb_dispatcher);
if ($error)
{

File diff suppressed because it is too large Load Diff

View File

@@ -24,10 +24,10 @@ phpBB Lead Developer: naderman (Nils Adermann)
phpBB Developers: bantu (Andreas Fischer)
dhruv.goel92 (Dhruv Goel)
EXreaction (Nathan Guse)
Elsensee (Oliver Schramm)
marc1706 (Marc Alexander)
nickvergessen (Joas Schilling)
nicofuma (Tristan Darricau)
Nicofuma (Tristan Darricau)
prototech (Cesar Gallegos)
For a list of phpBB Team members, please see:
@@ -53,6 +53,7 @@ phpBB Developers: A_Jelly_Doughnut (Josh Woody) [01/2010 - 11/2010]
ckwalsh (Cullen Walsh) [01/2010 - 07/2011]
DavidMJ (David M.) [12/2005 - 08/2009]
dhn (Dominik Dröscher) [05/2007 - 01/2011]
EXreaction (Nathan Guse) [07/2012 - 05/2014]
GrahamJE (Graham Eames) [09/2005 - 11/2006]
igorw (Igor Wiedler) [08/2010 - 02/2013]
imkingdavid (David King) [11/2012 - 06/2014]

View File

@@ -4,9 +4,9 @@
<meta charset="utf-8">
<meta name="keywords" content="" />
<meta name="description" content="phpBB 3.1.x frequently asked questions" />
<title>phpBB3 &bull; FAQ</title>
<title>phpBB &bull; FAQ</title>
<link href="stylesheet.css" rel="stylesheet" type="text/css" media="screen, projection" />
<link href="assets/css/stylesheet.css" rel="stylesheet" type="text/css" media="screen, projection" />
</head>
@@ -16,16 +16,16 @@
<a id="top" name="top" accesskey="t"></a>
<div id="page-header">
<div class="headerbar">
<div class="inner"><span class="corners-top"><span></span></span>
<div class="inner">
<div id="doc-description">
<a href="../index.php" id="logo"><img src="site_logo.gif" alt="" /></a>
<a href="../index.php" id="logo"><img src="assets/images/site_logo.gif" alt="" /></a>
<h1>phpBB 3.1.x FAQ</h1>
<p>phpBB 3.1.x frequently asked questions</p>
<p style="display: none;"><a href="#start_here">Skip</a></p>
</div>
<span class="corners-bottom"><span></span></span></div>
</div>
</div>
</div>
@@ -35,12 +35,17 @@
<!-- BEGIN DOCUMENT -->
<p>This is a very basic Frequently Asked Questions (FAQ) page which attempts to answer some of the more commonly asked questions. It is by no means exhaustive and should be used in combination with the 'built-in' User FAQ within phpBB3, the community forums and our IRC channel (see <a href="README.html">README</a> for details).</p>
<p class="paragraph main-description">
This is a very basic Frequently Asked Questions (FAQ) page which attempts to answer some of the
more commonly asked questions. It is by no means exhaustive and should be used in combination with
the 'built-in' User FAQ within phpBB3, the community forums and our IRC channel
(see <a href="README.html">README</a> for details).
</p>
<h1>FAQ</h1>
<div class="paragraph menu">
<div class="inner"><span class="corners-top"><span></span></span>
<div class="inner">
<div class="content">
@@ -66,7 +71,7 @@
</div>
<span class="corners-bottom"><span></span></span></div>
</div>
</div>
<hr />
@@ -74,11 +79,11 @@
<a name="install"></a><h2>I am finding phpBB too difficult to install. Will you do it for me?</h2>
<div class="paragraph">
<div class="inner"><span class="corners-top"><span></span></span>
<div class="inner">
<div class="content">
<p>Simple answer, no we will not. We are not being difficult when we say this we are actually trying to help you. phpBB has a reputation for being easy to install, that reputation is we believe well deserved. It is a simple process of unarchiving a single file, uploading the resulting directory/files to their intended location and entering some data in a web based form. The sequence of events, what to type where, etc. is covered in detail in the accompanying <a href="INSTALL.html">INSTALL.html</a> documentation. If you cannot install phpBB3 the chances are you will be unable to administer or update it.</p>
<p>Simple answer, no we will not. We are not being difficult when we say this we are actually trying to help you. phpBB has a reputation for being easy to install, that reputation is we believe well deserved. It is a simple process of unarchiving a single file, uploading the resulting directory/files to their intended location and entering some data in a web based form. The sequence of events, what to type where, etc. is covered in detail in the accompanying <a href="INSTALL.html">INSTALL.html</a> documentation. If you cannot install phpBB the chances are you will be unable to administer or update it.</p>
<p>There are people, companies (unrelated to your hosting provider), etc. that will install your forum, either for free or for a payment. We do not recommend you make use of these offers. Unless the service is provided by your hosting company you will have to divulge passwords and other sensitive details. If you did not know how to use an ATM would you give a passer-by your bank card and PIN and ask them to show you what to do? No, probably not! The same applies to your hosting account details!</p>
@@ -88,7 +93,7 @@
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
<span class="corners-bottom"><span></span></span></div>
</div>
</div>
<hr />
@@ -99,7 +104,7 @@ A board is dealing in warez/porn/etc., you need to prevent them doing this!<br /
I want to sue you because i think you host an illegal board!</h2>
<div class="paragraph">
<div class="inner"><span class="corners-top"><span></span></span>
<div class="inner">
<div class="content">
@@ -111,7 +116,7 @@ I want to sue you because i think you host an illegal board!</h2>
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
<span class="corners-bottom"><span></span></span></div>
</div>
</div>
<hr />
@@ -119,7 +124,7 @@ I want to sue you because i think you host an illegal board!</h2>
<a name="viewonline"></a><h2>According to viewonline a user is doing/reading something they should not be able to!</h2>
<div class="paragraph">
<div class="inner"><span class="corners-top"><span></span></span>
<div class="inner">
<div class="content">
@@ -131,7 +136,7 @@ I want to sue you because i think you host an illegal board!</h2>
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
<span class="corners-bottom"><span></span></span></div>
</div>
</div>
<hr />
@@ -139,7 +144,7 @@ I want to sue you because i think you host an illegal board!</h2>
<a name="mail"></a><h2>I keep getting Mail sending errors when I (or my users) post/send PM's/etc.!</h2>
<div class="paragraph">
<div class="inner"><span class="corners-top"><span></span></span>
<div class="inner">
<div class="content">
@@ -151,7 +156,7 @@ I want to sue you because i think you host an illegal board!</h2>
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
<span class="corners-bottom"><span></span></span></div>
</div>
</div>
<hr />
@@ -159,7 +164,7 @@ I want to sue you because i think you host an illegal board!</h2>
<a name="mail_language"></a><h2>My users are complaining that emails are not in their selected language!</h2>
<div class="paragraph">
<div class="inner"><span class="corners-top"><span></span></span>
<div class="inner">
<div class="content">
@@ -171,7 +176,7 @@ I want to sue you because i think you host an illegal board!</h2>
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
<span class="corners-bottom"><span></span></span></div>
</div>
</div>
<hr />
@@ -179,7 +184,7 @@ I want to sue you because i think you host an illegal board!</h2>
<a name="aol_browser"></a><h2>My AOL based users keep getting logged out!</h2>
<div class="paragraph">
<div class="inner"><span class="corners-top"><span></span></span>
<div class="inner">
<div class="content">
@@ -193,7 +198,7 @@ I want to sue you because i think you host an illegal board!</h2>
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
<span class="corners-bottom"><span></span></span></div>
</div>
</div>
<hr />
@@ -201,7 +206,7 @@ I want to sue you because i think you host an illegal board!</h2>
<a name="avatars"></a><h2>I am unable to upload avatars from my computer, regardless of the settings.</h2>
<div class="paragraph">
<div class="inner"><span class="corners-top"><span></span></span>
<div class="inner">
<div class="content">
@@ -213,7 +218,7 @@ I want to sue you because i think you host an illegal board!</h2>
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
<span class="corners-bottom"><span></span></span></div>
</div>
</div>
<hr />
@@ -221,7 +226,7 @@ I want to sue you because i think you host an illegal board!</h2>
<a name="gallery_avatars"></a><h2>I just cannot get gallery avatars to appear!</h2>
<div class="paragraph">
<div class="inner"><span class="corners-top"><span></span></span>
<div class="inner">
<div class="content">
@@ -231,7 +236,7 @@ I want to sue you because i think you host an illegal board!</h2>
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
<span class="corners-bottom"><span></span></span></div>
</div>
</div>
<hr />
@@ -239,17 +244,17 @@ I want to sue you because i think you host an illegal board!</h2>
<a name="permissions"></a><h2>How do I use/set permissions?</h2>
<div class="paragraph">
<div class="inner"><span class="corners-top"><span></span></span>
<div class="inner">
<div class="content">
<p>Please read the paragraph about permissions in our extensive <a href="https://www.phpbb.com/support/documentation/3.0/">online documentation</a>.</p>
<p>Please read the paragraph about permissions in our extensive <a href="https://www.phpbb.com/support/docs/en/3.1/ug/">online documentation</a>.</p>
</div>
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
<span class="corners-bottom"><span></span></span></div>
</div>
</div>
<hr />
@@ -257,7 +262,7 @@ I want to sue you because i think you host an illegal board!</h2>
<a name="login_issues"></a><h2>I (or my users) cannot stay logged in to the forum!</h2>
<div class="paragraph">
<div class="inner"><span class="corners-top"><span></span></span>
<div class="inner">
<div class="content">
@@ -269,7 +274,7 @@ I want to sue you because i think you host an illegal board!</h2>
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
<span class="corners-bottom"><span></span></span></div>
</div>
</div>
<hr />
@@ -277,7 +282,7 @@ I want to sue you because i think you host an illegal board!</h2>
<a name="logout_issues"></a><h2>My users are complaining about being logged out too quickly!</h2>
<div class="paragraph">
<div class="inner"><span class="corners-top"><span></span></span>
<div class="inner">
<div class="content">
@@ -287,7 +292,7 @@ I want to sue you because i think you host an illegal board!</h2>
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
<span class="corners-bottom"><span></span></span></div>
</div>
</div>
<hr />
@@ -295,11 +300,11 @@ I want to sue you because i think you host an illegal board!</h2>
<a name="not_answered"></a><h2>My question isn't answered here!</h2>
<div class="paragraph">
<div class="inner"><span class="corners-top"><span></span></span>
<div class="inner">
<div class="content">
<p>Please read our <a href="https://www.phpbb.com/support/documentation/3.0/">extensive user documentation</a> first, it may just explain what you want to know.</p>
<p>Please read our <a href="https://www.phpbb.com/support/docs/en/3.1/ug/">extensive user documentation</a> first, it may just explain what you want to know.</p>
<p>Feel free to search our community forum for the information you require. <strong>PLEASE DO NOT</strong> post your question without having first used search, chances are someone has already asked and answered your question. You can find our board here:</p>
@@ -309,7 +314,7 @@ I want to sue you because i think you host an illegal board!</h2>
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
<span class="corners-bottom"><span></span></span></div>
</div>
</div>
<hr />
@@ -317,7 +322,7 @@ I want to sue you because i think you host an illegal board!</h2>
<a name="disclaimer"></a><h2>Copyright and disclaimer</h2>
<div class="paragraph">
<div class="inner"><span class="corners-top"><span></span></span>
<div class="inner">
<div class="content">
@@ -327,7 +332,7 @@ I want to sue you because i think you host an illegal board!</h2>
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
<span class="corners-bottom"><span></span></span></div>
</div>
</div>
<!-- END DOCUMENT -->

View File

@@ -4,9 +4,9 @@
<meta charset="utf-8">
<meta name="keywords" content="" />
<meta name="description" content="phpBB 3.1.x Installation, updating and conversion informations" />
<title>phpBB3 &bull; Install</title>
<title>phpBB &bull; Install</title>
<link href="stylesheet.css" rel="stylesheet" type="text/css" media="screen, projection" />
<link href="assets/css/stylesheet.css" rel="stylesheet" type="text/css" media="screen, projection" />
</head>
@@ -16,16 +16,16 @@
<a id="top" name="top" accesskey="t"></a>
<div id="page-header">
<div class="headerbar">
<div class="inner"><span class="corners-top"><span></span></span>
<div class="inner">
<div id="doc-description">
<a href="../index.php" id="logo"><img src="site_logo.gif" alt="" /></a>
<a href="../index.php" id="logo"><img src="assets/images/site_logo.gif" alt="" /></a>
<h1>phpBB 3.1.x Install</h1>
<p>phpBB 3.1.x Installation, updating and conversion informations</p>
<p style="display: none;"><a href="#start_here">Skip</a></p>
</div>
<span class="corners-bottom"><span></span></span></div>
</div>
</div>
</div>
@@ -35,16 +35,22 @@
<!-- BEGIN DOCUMENT -->
<p><strong>Please read this document completely before proceeding with installation, updating or converting.</strong></p>
<div class="paragraph">
<p><strong>Please read this document completely before proceeding with installation, updating or converting.</strong></p>
<p>This document will walk you through the basics on installing, updating and converting the forum software.</p>
<p>A basic overview of running phpBB3 can be found in the accompanying <a href="README.html">README</a> file. Please ensure you read that document in addition to this! For more detailed information on using, installing, updating and converting phpBB3 you should read <a href="https://www.phpbb.com/support/documentation/3.0/">the documentation</a> available online.</p>
<p>This document will walk you through the basics on installing, updating and converting the forum software.</p>
<p>
A basic overview of running phpBB can be found in the accompanying <a href="README.html">README</a> file.
Please ensure you read that document in addition to this! For more detailed information on using, installing,
updating and converting phpBB you should read <a href="https://www.phpbb.com/support/docs/en/3.1/ug/">the documentation</a>
available online.
</p>
</div>
<h1>Install</h1>
<div class="paragraph menu">
<div class="inner"><span class="corners-top"><span></span></span>
<div class="inner">
<div class="content">
@@ -82,7 +88,7 @@
</div>
<span class="corners-bottom"><span></span></span></div>
</div>
</div>
<hr />
@@ -90,7 +96,7 @@
<a name="quickinstall"></a><h2>1. Quick install</h2>
<div class="paragraph">
<div class="inner"><span class="corners-top"><span></span></span>
<div class="inner">
<div class="content">
@@ -114,7 +120,7 @@
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
<span class="corners-bottom"><span></span></span></div>
</div>
</div>
<hr />
@@ -122,7 +128,7 @@
<a name="require"></a><h2>2. Requirements</h2>
<div class="paragraph">
<div class="inner"><span class="corners-top"><span></span></span>
<div class="inner">
<div class="content">
@@ -142,10 +148,11 @@
</ul>
</li>
<li><strong>PHP 5.3.3+</strong> with support for the database you intend to use.</li>
<li>The following PHP modules are required:</li>
<li>The following PHP modules are required:
<ul>
<li>json</li>
</ul>
</li>
<li>getimagesize() function must be enabled.</li>
<li>Presence of the following modules within PHP will provide access to additional features, but they are not required:
<ul>
@@ -164,7 +171,7 @@
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
<span class="corners-bottom"><span></span></span></div>
</div>
</div>
<hr />
@@ -172,27 +179,27 @@
<a name="install"></a><h2>3. New installation</h2>
<div class="paragraph">
<div class="inner"><span class="corners-top"><span></span></span>
<div class="inner">
<div class="content">
<p>Installation of phpBB3 will vary according to your server and database. If you have <em>shell access</em> to your account (via telnet or ssh for example) you may want to upload the entire phpBB3 archive (in binary mode!) to a directory on your host and unarchive it there.</p>
<p>Installation of phpBB will vary according to your server and database. If you have <em>shell access</em> to your account (via telnet or ssh for example) you may want to upload the entire phpBB archive (in binary mode!) to a directory on your host and unarchive it there.</p>
<p>If you do not have shell access or do not wish to use it, you will need to decompress the phpBB3 archive to a local directory on your system using your favourite compression program, e.g. winzip, rar, zip, etc. From there you must FTP <strong>ALL</strong> the files it contains (being sure to retain the directory structure and filenames) to your host. Please ensure that the cases of filenames are retained, do <strong>NOT</strong> force filenames to all lower or upper case as doing so will cause errors later.</p>
<p>If you do not have shell access or do not wish to use it, you will need to decompress the phpBB archive to a local directory on your system using your favourite compression program, e.g. winzip, rar, zip, etc. From there you must FTP <strong>ALL</strong> the files it contains (being sure to retain the directory structure and filenames) to your host. Please ensure that the cases of filenames are retained, do <strong>NOT</strong> force filenames to all lower or upper case as doing so will cause errors later.</p>
<p>All .php, .sql, .cfg, .css, .js, .html, .htaccess and .txt files should be uploaded in <strong>ASCII</strong> mode, while all graphics should be uploaded in <strong>BINARY</strong> mode. If you are unfamiliar with what this means please refer to your FTP client documentation. In most cases this is all handled transparantly by your ftp client, but if you encounter problems later you should be sure the files were uploaded correctly as described here.</p>
<p>phpBB3 comes supplied with British English as its standard language. However, a number of separate packs for different languages are available. If you are not a native English speaker you may wish to install one or more of these packages before continuing. The installation process below will allow you to select a default language from those available (you can, of course, change this default at a later stage). For more details on language packs, where to obtain them and how to install them please see the <a href="README.html#i18n">README</a>.</p>
<p>phpBB comes supplied with British English as its standard language. However, a number of separate packs for different languages are available. If you are not a native English speaker you may wish to install one or more of these packages before continuing. The installation process below will allow you to select a default language from those available (you can, of course, change this default at a later stage). For more details on language packs, where to obtain them and how to install them please see the <a href="README.html#i18n">README</a>.</p>
<p>Once all the files have been uploaded to your site, you should point your browser at this location with the addition of <code>/install/</code>. For example, if your domain name is <code>www.example.com</code> and you placed the phpBB3 files in the directory <code>/phpBB3</code> off your web root you would enter <code>http://www.example.com/phpBB3/install/</code> or (alternatively) <code>http://www.example.com/phpBB3/install/index.php</code> into your browser. When you have done this, you should see the <strong><em>phpBB3 Introduction</em></strong> screen appear.</p>
<p>Once all the files have been uploaded to your site, you should point your browser at this location with the addition of <code>/install/</code>. For example, if your domain name is <code>www.example.com</code> and you placed the phpBB files in the directory <code>/phpBB3</code> off your web root you would enter <code>http://www.example.com/phpBB3/install/</code> or (alternatively) <code>http://www.example.com/phpBB3/install/index.php</code> into your browser. When you have done this, you should see the <strong><em>phpBB Introduction</em></strong> screen appear.</p>
<h4>Introduction:</h4>
<p>The initial screen gives you a short introduction into phpBB. It allows you to read the license phpBB3 is released under (General Public License v2) and provides information about how you can receive support. To start the installation, use the <strong><em>INSTALL</em></strong> tab.</p>
<p>The initial screen gives you a short introduction into phpBB. It allows you to read the license phpBB is released under (General Public License v2) and provides information about how you can receive support. To start the installation, use the <strong><em>INSTALL</em></strong> tab.</p>
<h4>Requirements</h4>
<p>The first page you will see after starting the installation is the Requirements list. phpBB3 automatically checks whether everything that it needs to run properly is installed on your server. You need to have at least the minimum PHP version installed, and at least one database available to continue the installation. Also important, is that all shown folders are available and have the correct permissions. Please see the description of each section to find out whether they are optional or required for phpBB3 to run. If everything is in order, you can continue the installation with <em>Start Install</em>.</p>
<p>The first page you will see after starting the installation is the Requirements list. phpBB automatically checks whether everything that it needs to run properly is installed on your server. You need to have at least the minimum PHP version installed, and at least one database available to continue the installation. Also important, is that all shown folders are available and have the correct permissions. Please see the description of each section to find out whether they are optional or required for phpBB to run. If everything is in order, you can continue the installation with <em>Start Install</em>.</p>
<h4>Database settings</h4>
@@ -212,7 +219,7 @@
<p>You don't need to change the Prefix for tables in database setting, unless you plan on using multipe phpBB installations on one database. In this case, you can use a different prefix for each installation to make it work.</p>
<p>After you entered your details, you can continue with the <em>Proceed to next step</em> button. Now phpBB3 will check whether the data you entered will lead to a successful database connection and whether tables with the same prefix already exist.</p>
<p>After you entered your details, you can continue with the <em>Proceed to next step</em> button. Now phpBB will check whether the data you entered will lead to a successful database connection and whether tables with the same prefix already exist.</p>
<p>A <em>Could not connect to the database</em> error means that you didn't enter the database data correctly and it is not possible for phpBB to connect. Make sure that everything you entered is in order and try again. Again, if you are unsure about your database settings, please contact your host.</p>
@@ -222,7 +229,7 @@
<h4>Administrator details</h4>
<p>Now you have to create your administration user. This user will have full administration access and he/she will be the first user on your forum. All fields on this page are required. You can also set the default language of your forum on this page. In a vanilla phpBB3 installation, we only include British English. You can download further languages from <a href="https://www.phpbb.com/">www.phpbb.com</a>, and add them before installing or later.</p>
<p>Now you have to create your administration user. This user will have full administration access and he/she will be the first user on your forum. All fields on this page are required. You can also set the default language of your forum on this page. In a vanilla phpBB installation, we only include British English. You can download further languages from <a href="https://www.phpbb.com/">www.phpbb.com</a>, and add them before installing or later.</p>
<h4>Configuration file</h4>
@@ -236,7 +243,7 @@
<p>If the installation was successful, you can now use the <em>Login</em> button to visit the Administration Control Panel. Congratulations, you have installed phpBB successfully. But there is still work ahead!</p>
<p>If you are unable to get phpBB3 installed even after reading this guide, please look at the support section of the installer's introduction page to find out where you can ask for further assistance.</p>
<p>If you are unable to get phpBB installed even after reading this guide, please look at the support section of the installer's introduction page to find out where you can ask for further assistance.</p>
<p>At this point if you are converting from phpBB 2.0.x, you should refer to the <a href="#convert">conversion steps</a> for further information. If not, you should remove the install directory from your server as you will only be able to access the Administration Control Panel whilst it is present.</p>
@@ -244,7 +251,7 @@
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
<span class="corners-bottom"><span></span></span></div>
</div>
</div>
<hr />
@@ -252,19 +259,19 @@
<a name="update"></a><h2>4. Updating from stable releases of phpBB 3.1.x</h2>
<div class="paragraph">
<div class="inner"><span class="corners-top"><span></span></span>
<div class="inner">
<div class="content">
<p>If you are currently using a stable release of phpBB3, updating to this version is straightforward. You would have downloaded one of four packages and your choice determines what you need to do. <strong>Note</strong>: Before updating, we heavily recommend you do a <em>full backup of your database and existing phpBB3 files</em>! If you are unsure how to achieve this please ask your hosting provider for advice.</p>
<p>If you are currently using a stable release of phpBB, updating to this version is straightforward. You would have downloaded one of four packages and your choice determines what you need to do. <strong>Note</strong>: Before updating, we heavily recommend you do a <em>full backup of your database and existing phpBB files</em>! If you are unsure how to achieve this please ask your hosting provider for advice.</p>
<p><strong>Please make sure you update your phpBB3 source files too, even if you run the <code>database_update.php</code> file.</strong></p>
<p><strong>Please make sure you update your phpBB source files too, even if you run the <code>database_update.php</code> file.</strong></p>
<a name="update_full"></a><h3>4.i. Full package</h3>
<p>The full package is normally meant for new installations only, but if you want to replace all source files, this package comes in handy.</p>
<p>First, you should make a copy of your existing <code>config.php</code> file; keep it in a safe place! Next, delete all the existing phpBB3 files, you may want to leave your <code>files/</code> and <code>images/</code> directorie in place. You can leave alternative styles in place too. With this complete, you can upload the new phpBB files (see <a href="#install">New installation</a> for details if necessary). Once complete, copy back your saved <code>config.php</code>, replacing the new one. Another method is to just <strong>replace</strong> the existing files with the files from the full package - though make sure you do <strong>not</strong> overwrite your config.php file.</p>
<p>First, you should make a copy of your existing <code>config.php</code> file; keep it in a safe place! Next, delete all the existing phpBB files, you may want to leave your <code>files/</code> and <code>images/</code> directories in place. You can leave alternative styles in place too. With this complete, you can upload the new phpBB files (see <a href="#install">New installation</a> for details if necessary). Once complete, copy back your saved <code>config.php</code>, replacing the new one. Another method is to just <strong>replace</strong> the existing files with the files from the full package - though make sure you do <strong>not</strong> overwrite your config.php file.</p>
<p>You should now run <code>install/database_update.php</code> which, depending on your previous version, will make a number of database changes. You may receive <em>FAILURES</em> during this procedure. They should not be a cause for concern unless you see an actual <em>ERROR</em>, in which case the script will stop (in this case you should seek help via our forums or bug tracker).</p>
@@ -296,14 +303,14 @@
<p>This update method is the recommended method for updating. This package detects changed files automatically and merges in changes if needed.</p>
<p>The automatic update package will update the board from a given version to the latest version. A number of automatic update files are available, and you should choose the one that corresponds to the version of the board that you are currently running. For example, if your current version is <strong>3.0.10</strong>, you need the <code>phpBB-3.0.10_to_3.0.11.zip/tar.bz2</code> file.</p>
<p>The automatic update package will update the board from a given version to the latest version. A number of automatic update files are available, and you should choose the one that corresponds to the version of the board that you are currently running. For example, if your current version is <strong>3.0.13</strong>, you need the <code>phpBB-3.0.13_to_3.0.14.zip/tar.bz2</code> file.</p>
<p>To perform the update, either follow the instructions from the <strong>Administration Control Panel-&gt;System</strong> Tab - this should point out that you are running an outdated version and will guide you through the update - or follow the instructions listed below.</p>
<ul>
<li>Go to the <a href="https://www.phpbb.com/downloads/">downloads page</a> and download the latest update package listed there, matching your current version.</li>
<li>Upload the uncompressed archive contents to your phpBB installation - only the install folder is required. Upload the whole install folder, retaining the file structure.</li>
<li>After the install folder is present, phpBB3 will go offline automatically.</li>
<li>Upload the uncompressed archive contents to your phpBB installation - only the <code>install/</code> and <code>vendor/</code> folders are required. Upload these folders in their entirety, retaining the file structure.</li>
<li>After the install folder is present, phpBB will go offline automatically.</li>
<li>Point your browser to the install directory, for example <code>http://www.example.com/phpBB3/install/</code></li>
<li>Choose the "Update" Tab and follow the instructions</li>
</ul>
@@ -320,7 +327,7 @@
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
<span class="corners-bottom"><span></span></span></div>
</div>
</div>
<hr />
@@ -346,7 +353,7 @@
<li>The <code>store/</code> directory</li>
</ul></li>
<li>Upload the contents of the 3.1.x Full Package into your forum's directory.</li>
<li>Upload the contents of the 3.1.x Full Package into your forum's directory. Make sure the root level .htaccess file is included in the upload.</li>
<li>Browse to install/database_update.php</li>
<li>Delete the <code>install/</code> directory</li>
</ol>
@@ -362,7 +369,7 @@
<a name="convert"></a><h2>6. Conversion from phpBB 2.0.x to phpBB 3.1.x</h2>
<div class="paragraph">
<div class="inner"><span class="corners-top"><span></span></span>
<div class="inner">
<div class="content">
@@ -417,7 +424,7 @@
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
<span class="corners-bottom"><span></span></span></div>
</div>
</div>
<hr />
@@ -425,17 +432,17 @@
<a name="postinstall"></a><h2>7. Important (security related) post-Install tasks for all installation methods</h2>
<div class="paragraph">
<div class="inner"><span class="corners-top"><span></span></span>
<div class="inner">
<div class="content">
<p>Once you have successfully installed phpBB3 you <strong>MUST</strong> ensure you remove the entire <code>install/</code> directory. Leaving the install directory in place is a <em>very serious potential security issue</em> which may lead to deletion or alteration of files, etc. Please note that until this directory is removed, phpBB will not operate and a warning message will be displayed. Beyond this <strong>essential</strong> deletion, you may also wish to delete the docs/ directory if you wish.</p>
<p>Once you have successfully installed phpBB you <strong>MUST</strong> ensure you remove the entire <code>install/</code> directory. Leaving the install directory in place is a <em>very serious potential security issue</em> which may lead to deletion or alteration of files, etc. Please note that until this directory is removed, phpBB will not operate and a warning message will be displayed. Beyond this <strong>essential</strong> deletion, you may also wish to delete the docs/ directory if you wish.</p>
<p>With these directories deleted, you should proceed to the administration panel. Depending on how the installation completed, you may have been directed there automatically. If not, login as the administrator you specified during install/conversion and click the <strong>Administration Control Panel</strong> link at the bottom of any page. Ensure that details specified on the <strong>General</strong> tab are correct!</p>
<a name="avatars"></a><h3>6.i. Uploadable avatars</h3>
<p>phpBB3 supports several methods for allowing users to select their own <em>avatar</em> (an avatar is a small image generally unique to a user and displayed just below their username in posts).</p>
<p>phpBB supports several methods for allowing users to select their own <em>avatar</em> (an avatar is a small image generally unique to a user and displayed just below their username in posts).</p>
<p>Two of these options allow users to upload an avatar from their machine or a remote location (via a URL). If you wish to enable this function you should first ensure the correct path for uploadable avatars is set in <strong>Administration Control Panel -&gt; General -&gt; Board Configuration -&gt; Avatar settings</strong>. By default this is <code>images/avatars/uploads</code>, but you can set it to whatever you like, just ensure the configuration setting is updated. You must also ensure this directory can be written to by the webserver. Usually this means you have to alter its permissions to allow anyone to read and write to it. Exactly how you should do this depends on your FTP client or server operating system.</p>
@@ -455,15 +462,15 @@
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
<span class="corners-bottom"><span></span></span></div>
</div>
</div>
<hr />
<a name="anti_spam"></a><h2>8. Anti-Spam Measures</h2>
<div class="paragraph">
<div class="inner"><span class="corners-top"><span></span></span>
<div class="inner">
<div class="content">
<p>Like any online site that allows user input, your board could be subject to unwanted posts; often referred to as <a href="http://en.wikipedia.org/wiki/Forum_spam">forum spam</a>. The vast majority of these attacks will be from automated computer programs known as <a href="http://en.wikipedia.org/wiki/Spambot">spambots</a>. The attacks, generally, are not personal as the spammers are just trying to find accessible targets. phpBB has a number of anti-spam measures built in, including a range of CAPTCHAs. However, administrators are strongly urged to read and follow the advice for <a href="https://www.phpbb.com/support/spam/">Preventing Spam in phpBB</a> as soon as possible after completing the installation of your board.</p>
@@ -471,7 +478,7 @@
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
<span class="corners-bottom"><span></span></span></div>
</div>
</div>
<hr />
@@ -479,7 +486,7 @@
<a name="disclaimer"></a><h2>9. Copyright and disclaimer</h2>
<div class="paragraph">
<div class="inner"><span class="corners-top"><span></span></span>
<div class="inner">
<div class="content">
@@ -489,7 +496,7 @@
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
<span class="corners-bottom"><span></span></span></div>
</div>
</div>
<!-- END DOCUMENT -->

View File

@@ -4,9 +4,9 @@
<meta charset="utf-8">
<meta name="keywords" content="" />
<meta name="description" content="phpBB 3.1.x Readme" />
<title>phpBB3 &bull; Readme</title>
<title>phpBB &bull; Readme</title>
<link href="stylesheet.css" rel="stylesheet" type="text/css" media="screen, projection" />
<link href="assets/css/stylesheet.css" rel="stylesheet" type="text/css" media="screen, projection" />
</head>
@@ -16,15 +16,15 @@
<a id="top" name="top" accesskey="t"></a>
<div id="page-header">
<div class="headerbar">
<div class="inner"><span class="corners-top"><span></span></span>
<div class="inner">
<div id="doc-description">
<a href="../index.php" id="logo"><img src="site_logo.gif" alt="" /></a>
<a href="../index.php" id="logo"><img src="assets/images/site_logo.gif" alt="" /></a>
<h1>phpBB 3.1.x Readme</h1>
<p style="display: none;"><a href="#start_here">Skip</a></p>
</div>
<span class="corners-bottom"><span></span></span></div>
</div>
</div>
</div>
@@ -34,25 +34,29 @@
<!-- BEGIN DOCUMENT -->
<p>Thank you for downloading phpBB3. This README will guide you through the basics of installation and operation of phpBB3. Please ensure you read this and the accompanying documentation fully <strong>before</strong> proceeding with the installation.</p>
<p class="paragraph main-description">
Thank you for downloading phpBB. This README will guide you through the basics of installation
and operation of phpBB. Please ensure you read this and the accompanying documentation fully
<strong>before</strong> proceeding with the installation.
</p>
<h1>Readme</h1>
<div class="paragraph menu">
<div class="inner"><span class="corners-top"><span></span></span>
<div class="inner">
<div class="content">
<ol>
<li><a href="#install">Installing phpBB3</a></li>
<li><a href="#run">Running phpBB3</a>
<li><a href="#install">Installing phpBB</a></li>
<li><a href="#run">Running phpBB</a>
<ol style="list-style-type: lower-roman;">
<li><a href="#i18n">Languages (Internationalisation - i18n)</a></li>
<li><a href="#styles">Styles</a></li>
<li><a href="#mods">Modifications</a></li>
<li><a href="#extensions">Extensions</a></li>
</ol>
</li>
<li><a href="#help">Getting help with phpBB3</a>
<li><a href="#help">Getting help with phpBB</a>
<ol style="list-style-type: lower-roman;">
<li><a href="#docs">Documentation</a></li>
<li><a href="#kb">Knowledge Base</a></li>
@@ -73,15 +77,15 @@
</div>
<span class="corners-bottom"><span></span></span></div>
</div>
</div>
<hr />
<a name="install"></a><h2>1. Installing phpBB3</h2>
<a name="install"></a><h2>1. Installing phpBB</h2>
<div class="paragraph">
<div class="inner"><span class="corners-top"><span></span></span>
<div class="inner">
<div class="content">
<p>Installation, update and conversion instructions can be found in the <a href="INSTALL.html">INSTALL</a> document in this directory. If you are intending on converting from a phpBB 2.0.x or 3.0.x installation we highly recommend that you backup any existing data before proceeding!</p>
@@ -110,15 +114,15 @@
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
<span class="corners-bottom"><span></span></span></div>
</div>
</div>
<hr />
<a name="run"></a><h2>2. Running phpBB3</h2>
<a name="run"></a><h2>2. Running phpBB</h2>
<div class="paragraph">
<div class="inner"><span class="corners-top"><span></span></span>
<div class="inner">
<div class="content">
@@ -132,55 +136,55 @@
<p>This is the <em>official</em> location for all supported language sets. If you download a package from a 3rd party site you do so with the understanding that we cannot offer support. Please do not ask for support if you download a language pack from a 3rd party site.</p>
<p>Installation of these packages is straightforward: simply download the required language pack, uncompress (unzip) it and via FTP transfer the included <code>language</code> and <code>styles</code> folders to the root of your board installation. The language can then be installed via the Administration Control Panel of your board: <code>System tab -&gt; General Tasks -&gt; Language packs</code>. A more detailed description of the process is in the Knowledge Base article, <a href="https://www.phpbb.com/kb/article/how-to-install-a-language-pack/">How to Install a Language Pack</a>.</p>
<p>Installation of these packages is straightforward: simply download the required language pack, uncompress (unzip) it and via FTP transfer the included <code>language</code> and <code>styles</code> folders to the root of your board installation. The language can then be installed via the Administration Control Panel of your board: <code>Customise tab -&gt; Language management -&gt; Language packs</code>. A more detailed description of the process is in the Knowledge Base article, <a href="https://www.phpbb.com/kb/article/how-to-install-a-language-pack/">How to Install a Language Pack</a>.</p>
<p>If your language is not available, please visit our <a href="https://www.phpbb.com/community/viewforum.php?f=66">[3.0.x] Translations</a> forum where you will find topics on translations in progress. Should you wish to volunteer to translate a language not currently available or assist in maintaining an existing language pack, you can <a href="https://www.phpbb.com/languages/apply.php">Apply to become a translator</a>.</p>
<p>If your language is not available, please visit our <a href="https://www.phpbb.com/community/viewforum.php?f=491">[3.1.x] Translations</a> forum where you will find topics on translations in progress. Should you wish to volunteer to translate a language not currently available or assist in maintaining an existing language pack, you can <a href="https://www.phpbb.com/languages/apply.php">Apply to become a translator</a>.</p>
<a name="styles"></a><h3>2.ii. Styles</h3>
<p>Although we are rather proud of the included styles, we realise that they may not be to everyone's taste. Therefore, phpBB3 allows styles to be switched with relative ease. First, you need to locate and download a style you like. You can find them listed in the <a href="https://www.phpbb.com/customise/db/styles-2/">Styles</a> section of our <a href="https://www.phpbb.com/customise/db/">Customisation Database</a>.</p>
<p>Although we are rather proud of the included styles, we realise that they may not be to everyone's taste. Therefore, phpBB allows styles to be switched with relative ease. First, you need to locate and download a style you like. You can find them listed in the <a href="https://www.phpbb.com/customise/db/styles-2/">Styles</a> section of our <a href="https://www.phpbb.com/customise/db/">Customisation Database</a>.</p>
<p>For more information about styles, please see: <a href="https://www.phpbb.com/styles/">https://www.phpbb.com/styles/</a></p>
<p><strong>Please note</strong> that 3rd party styles downloaded for versions of phpBB2 will <strong>not</strong> work in phpBB3. It is also important to ensure that the style is updated to match the current version of the phpBB software you are using.</p>
<p>Once you have downloaded a style, the usual next step is to unarchive (or upload the unarchived contents of) the package into your <code>styles/</code> directory. You then need to visit <code>Administration Control Panel -&gt; Styles tab</code> where you should see the new style available. Click &quot;Install&quot; to install the style.</p>
<p>Once you have downloaded a style, the usual next step is to unarchive (or upload the unarchived contents of) the package into your <code>styles/</code> directory. You then need to visit <code>Administration Control Panel -&gt; Customise tab -&gt; Style management -&gt; Install Styles</code> where you should see the new style available. Click &quot;Install style&quot; to install the style.</p>
<p><strong>Please note</strong> that to improve efficiency, the software caches certain data. For this reason, if you create your own style or modify existing ones, please remember to &quot;Refresh&quot; the appropriate style components <code>Administration Control Panel -&gt; Styles tab -&gt; Style Components</code> screen. You may also need to reload the page you have changed in your web browser to overcome browser caching. If the changed components are not refreshed you will not see your changes taking effect.</p>
<p><strong>Please note</strong> that to improve efficiency, the software caches certain data. For this reason, if you create your own style or modify existing ones, please remember to purge the board cache by clicking the <code>Run now</code> button next to the <code>Purge the cache</code> option in the index page of the Administration Control Panel. You may also need to reload the page you have changed in your web browser to overcome browser caching. If the cache is not purged, you will not see your changes taking effect.</p>
<a name="mods"></a><h3>2.iii. Modifications</h3>
<a name="extensions"></a><h3>2.iii. Extensions</h3>
<p>We are proud to have a thriving modifications community. These third party modifications to the standard phpBB software, known as <strong>MODs</strong>, extend its capabilities still further. You can browse through many of the MODs in the <a href="https://www.phpbb.com/customise/db/modifications-1/">Modifications</a> section of our <a href="https://www.phpbb.com/customise/db/">Customisation Database</a>.</p>
<p>We are proud to have a thriving extensions community. These third party extensions to the standard phpBB software, extend its capabilities still further. You can browse through many of the extensions in the <a href="https://www.phpbb.com/customise/db/extensions-36">Extensions</a> section of our <a href="https://www.phpbb.com/customise/db/">Customisation Database</a>.</p>
<p>For more information about MODs, please see: <a href="https://www.phpbb.com/mods/">https://www.phpbb.com/mods/</a></p>
<p>For more information about extensions, please see: <a href="https://www.phpbb.com/extensions">https://www.phpbb.com/extensions</a></p>
<p><strong>Please remember</strong> that any bugs or other issues that occur after you have added any modification should <strong>NOT</strong> be reported to the bug tracker (see below). First remove the MOD and see if the problem is resolved. Any support for a MOD should only be sought in the &quot;Discussion/Support&quot; forum for that MOD.</p>
<p><strong>Please remember</strong> that any bugs or other issues that occur after you have added any extension should <strong>NOT</strong> be reported to the bug tracker (see below). First disable the extension and see if the problem is resolved. Any support for an extension should only be sought in the &quot;Discussion/Support&quot; forum for that extension.</p>
<p>Also remember that any modifications, particularly those which modify the database in any way, may render upgrading your forum to future versions more difficult. With all this said, many users have and continue to utilise many of the MODs already available with great success.</p>
<p>Also remember that any extensions which modify the database in any way, may render upgrading your forum to future versions more difficult.</p>
</div>
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
<span class="corners-bottom"><span></span></span></div>
</div>
</div>
<hr />
<a name="help"></a><h2>3. Getting help with phpBB3</h2>
<a name="help"></a><h2>3. Getting help with phpBB</h2>
<div class="paragraph">
<div class="inner"><span class="corners-top"><span></span></span>
<div class="inner">
<div class="content">
<p>phpBB3 can sometimes seem a little daunting to new users, particularly with regards to the permission system. The first thing you should do is check the <a href="FAQ.html">FAQ</a>, which covers a few basic getting started questions. If you need additional help there are several places you can find it.</p>
<p>phpBB can sometimes seem a little daunting to new users, particularly with regards to the permission system. The first thing you should do is check the <a href="FAQ.html">FAQ</a>, which covers a few basic getting started questions. If you need additional help there are several places you can find it.</p>
<a name="docs"></a><h3>3.i. phpBB3 Documentation</h3>
<a name="docs"></a><h3>3.i. phpBB Documentation</h3>
<p>Comprehensive documentation is now available on the phpBB website:</p>
<p><a href="https://www.phpbb.com/support/documentation/3.0/">https://www.phpbb.com/support/documentation/3.0/</a></p>
<p><a href="https://www.phpbb.com/support/docs/en/3.1/ug/">https://www.phpbb.com/support/docs/en/3.1/ug/</a></p>
<p>This covers everything from installation to setting permissions and managing users.</p>
@@ -208,7 +212,7 @@
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
<span class="corners-bottom"><span></span></span></div>
</div>
</div>
<hr />
@@ -216,7 +220,7 @@
<a name="status"></a><h2>4. Status of this version</h2>
<div class="paragraph">
<div class="inner"><span class="corners-top"><span></span></span>
<div class="inner">
<div class="content">
@@ -232,7 +236,7 @@
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
<span class="corners-bottom"><span></span></span></div>
</div>
</div>
<hr />
@@ -240,20 +244,20 @@
<a name="bugs"></a><h2>5. Reporting Bugs</h2>
<div class="paragraph">
<div class="inner"><span class="corners-top"><span></span></span>
<div class="inner">
<div class="content">
<p>The phpBB Limited uses a bug tracking system to store, list and manage all reported bugs, it can be found at the location listed below. Please <strong>DO NOT</strong> post bug reports to our forums. In addition please <strong>DO NOT</strong> use the bug tracker for support requests. Posting such a request will only see you directed to the support forums (while taking time away from working on real bugs).</p>
<p>The phpBB developers use a bug tracking system to store, list and manage all reported bugs, it can be found at the location listed below. Please <strong>DO NOT</strong> post bug reports to our forums. In addition please <strong>DO NOT</strong> use the bug tracker for support requests. Posting such a request will only see you directed to the support forums (while taking time away from working on real bugs).</p>
<p><a href="http://tracker.phpbb.com/browse/PHPBB3">http://tracker.phpbb.com/browse/PHPBB3</a></p>
<p>While we very much appreciate receiving bug reports (the more reports the more stable phpBB will be) we ask you carry out a few steps before adding new entries:</p>
<ul>
<li>First, determine if your bug is reproduceable; how to determine this depends on the bug in question. Only if the bug is reproduceable is it likely to be a problem with phpBB3 (or in some way connected). If something cannot be reproduced it may turn out to have been your hosting provider working on something, a user doing something silly, etc. Bug reports for non-reproduceable events can slow down our attempts to fix real, reproduceable issues<br /><br /></li>
<li>First, determine if your bug is reproduceable; how to determine this depends on the bug in question. Only if the bug is reproduceable is it likely to be a problem with phpBB (or in some way connected). If something cannot be reproduced it may turn out to have been your hosting provider working on something, a user doing something silly, etc. Bug reports for non-reproduceable events can slow down our attempts to fix real, reproduceable issues<br /><br /></li>
<li>Next, please read or search through the existing bug reports to see if <em>your</em> bug (or one very similar to it) is already listed. If it is please add to that existing bug rather than creating a new duplicate entry (all this does is slow us down).<br /><br /></li>
<li>Check the forums (use search!) to see if people have discussed anything that sounds similar to what you are seeing. However, as noted above please <strong>DO NOT</strong> post your particular bug to the forum unless it's non-reproduceable or you are sure it&rsquo;s related to something you have done rather than phpBB3<br /><br /></li>
<li>Check the forums (use search!) to see if people have discussed anything that sounds similar to what you are seeing. However, as noted above please <strong>DO NOT</strong> post your particular bug to the forum unless it's non-reproduceable or you are sure it&rsquo;s related to something you have done rather than phpBB<br /><br /></li>
<li>If no existing bug exists then please feel free to add it</li>
</ul>
@@ -267,7 +271,7 @@
<p>The relevant database type/version is listed within the administration control panel.</p>
<p>Please be as detailed as you can in your report, and if possible, list the steps required to duplicate the problem. If you have a patch that fixes the issue, please attach it to the ticket or submit a pull request to our repository <a href="https://github.com/phpbb/phpbb3">on GitHub</a>.</p>
<p>Please be as detailed as you can in your report, and if possible, list the steps required to duplicate the problem. If you have a patch that fixes the issue, please attach it to the ticket or submit a pull request to our repository <a href="https://github.com/phpbb/phpbb">on GitHub</a>.</p>
<p>If you create a patch, it is very much appreciated (but not required) if you follow the phpBB coding guidelines. Please note that the coding guidelines are somewhat different between different versions of phpBB. For phpBB 3.1.x the coding guidelines may be found here: <a href="http://area51.phpbb.com/docs/31x/coding-guidelines.html">http://area51.phpbb.com/docs/31x/coding-guidelines.html</a></p>
@@ -283,7 +287,7 @@
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
<span class="corners-bottom"><span></span></span></div>
</div>
</div>
<hr />
@@ -291,7 +295,7 @@
<a name="curbugs"></a><h2>6. Overview of current bug list</h2>
<div class="paragraph">
<div class="inner"><span class="corners-top"><span></span></span>
<div class="inner">
<div class="content">
@@ -307,7 +311,7 @@
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
<span class="corners-bottom"><span></span></span></div>
</div>
</div>
<hr />
@@ -315,13 +319,13 @@
<a name="php"></a><h2>7. PHP compatibility issues</h2>
<div class="paragraph">
<div class="inner"><span class="corners-top"><span></span></span>
<div class="inner">
<div class="content">
<p>phpBB 3.1.x takes advantage of new features added in PHP 5.3. We recommend that you upgrade to the latest stable release of PHP5 to run phpBB. The minimum version required is PHP 5.3.3.</p>
<p>Please remember that running any application on a development (unstable, e.g. a beta release) version of PHP can lead to strange/unexpected results which may appear to be bugs in the application. Therefore, we recommend you upgrade to the newest stable version of PHP before running phpBB3. If you are running a development version of PHP please check any bugs you find on a system running a stable release before submitting.</p>
<p>Please remember that running any application on a development (unstable, e.g. a beta release) version of PHP can lead to strange/unexpected results which may appear to be bugs in the application. Therefore, we recommend you upgrade to the newest stable version of PHP before running phpBB. If you are running a development version of PHP please check any bugs you find on a system running a stable release before submitting.</p>
<p>This board has been developed and tested under Linux and Windows (amongst others) running Apache using MySQL 3.23, 4.x, 5.x, MariaDB 5.x, MSSQL Server 2000, PostgreSQL 8.x, Oracle 8, SQLite 2 and SQLite 3. Versions of PHP used range from 5.3.x to 5.4.x without problem.</p>
@@ -333,7 +337,7 @@
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
<span class="corners-bottom"><span></span></span></div>
</div>
</div>
<hr />
@@ -341,7 +345,7 @@
<a name="disclaimer"></a><h2>8. Copyright and disclaimer</h2>
<div class="paragraph">
<div class="inner"><span class="corners-top"><span></span></span>
<div class="inner">
<div class="content">
@@ -351,7 +355,7 @@
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
<span class="corners-bottom"><span></span></span></div>
</div>
</div>
<!-- END DOCUMENT -->

View File

@@ -11,13 +11,21 @@ body {
font-family: Verdana, Helvetica, Arial, sans-serif;
color: #828282;
background-color: #FFFFFF;
font-size: 12px;
font-size: 10px;
margin: 0;
padding: 12px 0;
}
img { border-width: 0; }
ul, ol {
font-size: 1.1em;
}
ul ul, ol ol {
font-size: inherit;
}
p {
line-height: 1.3em;
font-size: 1.1em;
@@ -70,7 +78,7 @@ h3 {
border-bottom: 1px solid #CCCCCC;
margin-bottom: 3px;
padding-bottom: 2px;
font-size: 1.05em;
font-size: 1.1em;
color: #115098;
margin-top: 20px;
}
@@ -80,7 +88,7 @@ h4 {
font-weight: bold;
margin-bottom: 3px;
padding-bottom: 2px;
font-size: 1.05em;
font-size: 1.1em;
color: #115098;
margin-top: 20px;
}
@@ -104,6 +112,7 @@ code {
border-width: 1px;
border-style: solid;
background-color: #FAFAFA;
padding: 0 4px;
}
#wrap {
@@ -145,44 +154,16 @@ a#logo:hover {
.headerbar {
background: #ebebeb none repeat-x 0 0;
border-radius: 7px;
color: #FFFFFF;
margin-bottom: 4px;
padding: 0 5px;
}
span.corners-top, span.corners-bottom, span.corners-top span, span.corners-bottom span {
font-size: 1px;
line-height: 1px;
display: block;
height: 5px;
background-repeat: no-repeat;
}
span.corners-top {
background-image: none;
background-position: 0 0;
margin: 0 -5px;
}
span.corners-top span {
background-image: none;
background-position: 100% 0;
}
span.corners-bottom {
background-image: none;
background-position: 0 100%;
margin: 0 -5px;
clear: both;
}
span.corners-bottom span {
background-image: none;
background-position: 100% 100%;
padding: 5px;
}
.paragraph {
padding: 0 10px;
border-radius: 7px;
font-size: 1.1em;
padding: 5px 10px;
margin-bottom: 4px;
background-repeat: no-repeat;
background-position: 100% 0;
@@ -197,6 +178,10 @@ span.corners-bottom span {
color: #000000;
}
.main-description {
font-size: 1.15em;
}
.content {
color: #333333;
}
@@ -222,7 +207,7 @@ hr {
.headerbar {
background-color: #12A3EB;
background-image: url("bg_header.gif");
background-image: url("../images/bg_header.gif");
color: #FFFFFF;
}
@@ -231,23 +216,6 @@ hr {
color: #28313F;
}
span.corners-top {
background-image: url("corners_left.png");
}
span.corners-top span {
background-image: url("corners_right.png");
}
span.corners-bottom {
background-image: url("corners_left.png");
}
span.corners-bottom span {
background-image: url("corners_right.png");
}
.error {
color: #BC2A4D;
}
@@ -257,10 +225,6 @@ a:visited { color: #105289; }
a:hover { color: #D31141; }
a:active { color: #368AD2; }
.paragraph span.corners-top, .paragraph span.corners-bottom {
margin: 0 -10px;
}
.content {
padding: 0;
line-height: 1.48em;
@@ -288,13 +252,17 @@ a:active { color: #368AD2; }
}
* html hr { margin: 0; }
* html span.corners-top, * html span.corners-bottom { background-image: url("corners_left.gif"); }
* html span.corners-top span, * html span.corners-bottom span { background-image: url("corners_right.gif"); }
.back2top {
clear: both;
.top {
background: url("../images/icon_back_top.gif") no-repeat top left;
text-decoration: none;
width: 11px;
height: 11px;
text-align: right;
display: block;
float: right;
overflow: hidden;
letter-spacing: 1000px;
text-indent: 11px;
}
.content ol, .content ul {
@@ -350,3 +318,9 @@ a:active { color: #368AD2; }
clear: both;
margin-right: 1em;
}
.inner:after {
clear: both;
content: '';
display: block;
}

View File

Before

Width:  |  Height:  |  Size: 690 B

After

Width:  |  Height:  |  Size: 690 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 204 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

View File

@@ -6,7 +6,7 @@
<meta name="description" content="This is an explanation of how to use the phpBB auth/acl API" />
<title>phpBB3 &bull; Auth API</title>
<link href="stylesheet.css" rel="stylesheet" type="text/css" media="screen, projection" />
<link href="assets/css/stylesheet.css" rel="stylesheet" type="text/css" media="screen, projection" />
</head>
@@ -16,16 +16,16 @@
<a id="top" name="top" accesskey="t"></a>
<div id="page-header">
<div class="headerbar">
<div class="inner"><span class="corners-top"><span></span></span>
<div class="inner">
<div id="doc-description">
<a href="../index.php" id="logo"><img src="site_logo.gif" alt="" /></a>
<a href="../index.php" id="logo"><img src="assets/images/site_logo.gif" alt="" /></a>
<h1>Auth API</h1>
<p>This is an explanation of how to use the phpBB auth/acl API</p>
<p style="display: none;"><a href="#start_here">Skip</a></p>
</div>
<span class="corners-bottom"><span></span></span></div>
</div>
</div>
</div>
@@ -35,12 +35,12 @@
<!-- BEGIN DOCUMENT -->
<p>This is an explanation of how to use the phpBB auth/acl API.</p>
<p class="paragraph main-description">This is an explanation of how to use the phpBB auth/acl API.</p>
<h1>Auth API</h1>
<div class="paragraph menu">
<div class="inner"><span class="corners-top"><span></span></span>
<div class="inner">
<div class="content">
@@ -65,7 +65,7 @@
</div>
<span class="corners-bottom"><span></span></span></div>
</div>
</div>
<hr />
@@ -73,7 +73,7 @@
<a name="intro"></a><h2>1. Introduction</h2>
<div class="paragraph">
<div class="inner"><span class="corners-top"><span></span></span>
<div class="inner">
<div class="content">
@@ -86,8 +86,8 @@
<p>To use any methods contained with the <code>auth</code> class it first needs to be instantiated. This is best achieved early in the execution of the script in the following manner:</p>
<div class="codebox"><pre>
$auth = new phpbb\auth\auth();
</pre></div>
$auth = new phpbb\auth\auth();</pre>
</div>
<p>Once an instance of the class has been created you are free to call the various methods it contains. Please note that should you wish to use the <code>auth_admin</code> methods you will need to instantiate this separately but in the same way.</p>
@@ -95,7 +95,7 @@ $auth = new phpbb\auth\auth();
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
<span class="corners-bottom"><span></span></span></div>
</div>
</div>
<hr />
@@ -103,7 +103,7 @@ $auth = new phpbb\auth\auth();
<a name="methods"></a><h2>2. Methods</h2>
<div class="paragraph">
<div class="inner"><span class="corners-top"><span></span></span>
<div class="inner">
<div class="content">
@@ -114,8 +114,8 @@ $auth = new phpbb\auth\auth();
<p>The <code>acl</code> method is the initialisation routine for all the acl functions. If you intend calling any acl method you must first call this. The method takes as its one and only required parameter an associative array containing user information as stored in the database. This array must contain at least the following information; user_id, user_permissions and user_type. It is called in the following way:</p>
<div class="codebox"><pre>
$auth-&gt;acl(<code>userdata</code>);
</pre></div>
$auth-&gt;acl(<code>userdata</code>);</pre>
</div>
<p>Where userdata is the array containing the aforementioned data.</p>
@@ -124,8 +124,8 @@ $auth-&gt;acl(<code>userdata</code>);
<p>This method is the primary way of determining what a user can and cannot do for a given option globally or in a given forum. The method should be called in the following way:</p>
<div class="codebox"><pre>
$result = $auth-&gt;acl_get(<code>option</code>[, <code>forum</code>]);
</pre></div>
$result = $auth-&gt;acl_get(<code>option</code>[, <code>forum</code>]);</pre>
</div>
<p>Where option is a string representing the required option, e.g. 'f_list', 'm_edit', 'a_adduser', etc. By adding a ! in front of the option, e.g. '!f_list' the result of this method will be negated. The optional forum term is the integer forum_id.</p>
@@ -142,8 +142,8 @@ $result = $auth-&gt;acl_get(<code>option</code>[, <code>forum</code>]);
<p>The method should be called thus:</p>
<div class="codebox"><pre>
$result = $auth-&gt;acl_gets(<code>option1</code>[, <code>option2</code>, ..., <code>optionN</code>, <code>forum</code>]);
</pre></div>
$result = $auth-&gt;acl_gets(<code>option1</code>[, <code>option2</code>, ..., <code>optionN</code>, <code>forum</code>]);</pre>
</div>
<p>As with the <code>acl_get</code> method the options are strings representing the required permissions to check. The forum again is an integer representing a given forum_id.</p>
@@ -154,16 +154,16 @@ $result = $auth-&gt;acl_gets(<code>option1</code>[, <code>option2</code>, ..., <
<p>This method is used to find out in which forums a user is allowed to carry out an operation or to find out in which forums he is not allowed to carry out an operation. The method should be called in the following way:</p>
<div class="codebox"><pre>
$result = $auth-&gt;acl_getf(<code>option</code>[, <code>clean</code>]);
</pre></div>
$result = $auth-&gt;acl_getf(<code>option</code>[, <code>clean</code>]);</pre>
</div>
<p>Just like in the <code>acl_get</code> method the option is a string specifying the permission which has to be checked (negation using ! is allowed). The second parameter is a boolean. If it is set to false this method returns all forums with either zero or a positive integer. If it is set to true only those forums with a positive integer as the result will be returned.</p>
<p>The method returns an associative array of the form:</p>
<div class="codebox"><pre>
array(<em>forum_id1</em> =&gt; array(<em>option</em> =&gt; <em>integer</em>), <em>forum_id2</em> =&gt; ...)
</pre></div>
array(<em>forum_id1</em> =&gt; array(<em>option</em> =&gt; <em>integer</em>), <em>forum_id2</em> =&gt; ...)</pre>
</div>
<p>Where option is the option passed to the method and integer is either zero or a positive integer and the same <code>acl_get(option, forum_id)</code> would return.</p>
@@ -172,8 +172,8 @@ array(<em>forum_id1</em> =&gt; array(<em>option</em> =&gt; <em>integer</em>), <e
<p>This method is used to find out whether a user has a permission in at least one forum or globally. This method is similar to checking whether <code>acl_getf(option, true)</code> returned one or more forums but it's faster. It should be called in the following way:</p>
<div class="codebox"><pre>
$result = $auth-&gt;acl_getf_global(<code>option</code>)
</pre></div>
$result = $auth-&gt;acl_getf_global(<code>option</code>)</pre>
</div>
<p>As with the previous methods option is a string specifying the permission which has to be checked.</p>
@@ -230,7 +230,7 @@ $result = $auth-&gt;acl_get_list($user_id, $permissions, $forum_id);
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
<span class="corners-bottom"><span></span></span></div>
</div>
</div>
<hr />
@@ -238,7 +238,7 @@ $result = $auth-&gt;acl_get_list($user_id, $permissions, $forum_id);
<a name="admin_related"></a><h2>3. Admin related functions</h2>
<div class="paragraph">
<div class="inner"><span class="corners-top"><span></span></span>
<div class="inner">
<div class="content">
@@ -247,8 +247,8 @@ $result = $auth-&gt;acl_get_list($user_id, $permissions, $forum_id);
<p>To use any methods this class contains it first needs to be instantiated separately from <code>auth</code>. This is achieved in the same way as <code>auth</code>:</p>
<div class="codebox"><pre>
$auth_admin = new auth_admin();
</pre></div>
$auth_admin = new auth_admin();</pre>
</div>
<p>This instance gives you access to both the methods of this specific class and that of <code>auth</code>.</p>
@@ -256,7 +256,7 @@ $auth_admin = new auth_admin();
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
<span class="corners-bottom"><span></span></span></div>
</div>
</div>
<hr />
@@ -264,7 +264,7 @@ $auth_admin = new auth_admin();
<a name="disclaimer"></a><h2>4. Copyright and disclaimer</h2>
<div class="paragraph">
<div class="inner"><span class="corners-top"><span></span></span>
<div class="inner">
<div class="content">
@@ -274,7 +274,7 @@ $auth_admin = new auth_admin();
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
<span class="corners-bottom"><span></span></span></div>
</div>
</div>
<!-- END DOCUMENT -->

View File

@@ -6,7 +6,7 @@
<meta name="description" content="Ascraeus coding guidelines document" />
<title>phpBB3 &bull; Coding Guidelines</title>
<link href="stylesheet.css" rel="stylesheet" type="text/css" media="screen, projection" />
<link href="assets/css/stylesheet.css" rel="stylesheet" type="text/css" media="screen, projection" />
</head>
@@ -16,16 +16,16 @@
<a id="top" name="top" accesskey="t"></a>
<div id="page-header">
<div class="headerbar">
<div class="inner"><span class="corners-top"><span></span></span>
<div class="inner">
<div id="doc-description">
<a href="../index.php" id="logo"><img src="site_logo.gif" alt="" /></a>
<a href="../index.php" id="logo"><img src="assets/images/site_logo.gif" alt="" /></a>
<h1>Coding Guidelines</h1>
<p>Ascraeus coding guidelines document</p>
<p style="display: none;"><a href="#start_here">Skip</a></p>
</div>
<span class="corners-bottom"><span></span></span></div>
</div>
</div>
</div>
@@ -35,12 +35,14 @@
<!-- BEGIN DOCUMENT -->
<p>These are the phpBB Coding Guidelines for Ascraeus, all attempts should be made to follow them as closely as possible.</p>
<p class="paragraph main-description">
These are the phpBB Coding Guidelines for Ascraeus, all attempts should be made to follow them as closely as possible.
</p>
<h1>Coding Guidelines</h1>
<div class="paragraph menu">
<div class="inner"><span class="corners-top"><span></span></span>
<div class="inner">
<div class="content">
@@ -89,7 +91,7 @@
</div>
<span class="corners-bottom"><span></span></span></div>
</div>
</div>
<hr />
@@ -97,7 +99,7 @@
<a name="defaults"></a><h2>1. Defaults</h2>
<div class="paragraph">
<div class="inner"><span class="corners-top"><span></span></span>
<div class="inner">
<div class="content">
@@ -109,8 +111,8 @@
<div class="codebox"><pre>
{TAB}$mode{TAB}{TAB}= $request->variable('mode', '');
{TAB}$search_id{TAB}= $request->variable('search_id', '');
</pre></div>
{TAB}$search_id{TAB}= $request->variable('search_id', '');</pre>
</div>
<p>If entered with tabs (replace the {TAB}) both equal signs need to be on the same column.</p>
@@ -133,8 +135,8 @@
* For full copyright and license information, please see
* the docs/CREDITS.txt file.
*
*/
</pre></div>
*/</pre>
</div>
<p>Please see the <a href="#locations">File Locations section</a> for the correct package name.</p>
@@ -157,8 +159,8 @@
/**
*/
{CODE}
</pre></div>
{CODE}</pre>
</div>
<h4>Files containing only functions:</h4>
@@ -185,8 +187,8 @@ Small code snipped, mostly one or two defines or an if statement
/**
* {DOCUMENTATION}
*/
class ...
</pre></div>
class ...</pre>
</div>
<a name="locations"></a><h3>1.iii. File Locations</h3>
@@ -274,7 +276,7 @@ PHPBB_QA (Set board to QA-Mode, which means the updater also c
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
<span class="corners-bottom"><span></span></span></div>
</div>
</div>
<hr />
@@ -282,7 +284,7 @@ PHPBB_QA (Set board to QA-Mode, which means the updater also c
<a name="code"></a><h2>2. Code Layout/Guidelines</h2>
<div class="paragraph">
<div class="inner"><span class="corners-top"><span></span></span>
<div class="inner">
<div class="content">
@@ -317,8 +319,8 @@ for ($i = 0; $i &lt; $outer_size; $i++)
{
foo($i, $j);
}
}
</pre></div>
}</pre>
</div>
<h4>Function Names:</h4>
<p>Functions should also be named descriptively. We're not programming in C here, we don't want to write functions called things like "stristr()". Again, all lower-case names with words separated by a single underscore character in PHP, and camel caps in JavaScript. Function names should be prefixed with "phpbb_" and preferably have a verb in them somewhere. Good function names are <code>phpbb_print_login_status()</code>, <code>phpbb_get_user_data()</code>, etc. Constructor functions in JavaScript should begin with a capital letter.</p>
@@ -344,14 +346,14 @@ phpbb/
dir/
class_name.php
subdir/
class_name.php
</pre></div>
class_name.php</pre>
</div>
<div class="codebox"><pre>
\phpbb\class_name - phpbb/class_name.php
\phpbb\dir\class_name - phpbb/dir/class_name.php
\phpbb\dir\subdir\class_name - phpbb/dir/subdir/class_name.php
</pre></div>
\phpbb\dir\subdir\class_name - phpbb/dir/subdir/class_name.php</pre>
</div>
<h4>Summary:</h4>
@@ -377,8 +379,8 @@ while (condition)
do_stuff();
for ($i = 0; $i &lt; size; $i++)
do_stuff($i);
</pre></div>
do_stuff($i);</pre>
</div>
<p class="good">// These are all right. </p>
<div class="codebox"><pre>
@@ -395,8 +397,8 @@ while (condition)
for ($i = 0; $i &lt; size; $i++)
{
do_stuff();
}
</pre></div>
}</pre>
</div>
<h4>Where to put the braces:</h4>
<p>In PHP code, braces always go on their own line. The closing brace should also always be at the same column as the corresponding opening brace, examples:</p>
@@ -427,8 +429,8 @@ while (condition)
function do_stuff()
{
...
}
</pre></div>
}</pre>
</div>
<p>In JavaScript code, braces always go on the same line:</p>
@@ -451,8 +453,8 @@ while (condition) {
function do_stuff() {
...
}
</pre></div>
}</pre>
</div>
<h4>Use spaces between tokens:</h4>
<p>This is another simple, easy step that helps keep code readable without much effort. Whenever you write an assignment, expression, etc.. Always leave <em>one</em> space between the tokens. Basically, write code as if it was English. Put spaces between variable names and operators. Don't put spaces just after an opening bracket or before a closing bracket. Don't put spaces just before a comma or a semicolon. This is best shown with a few examples, examples:</p>
@@ -476,26 +478,26 @@ for($i=0; $i&lt;$size; $i++) ...
for ($i = 0; $i &lt; $size; $i++) ...
$i=($j &lt; $size)?0:1;
$i = ($j &lt; $size) ? 0 : 1;
</pre></div>
$i = ($j &lt; $size) ? 0 : 1;</pre>
</div>
<h4>Operator precedence:</h4>
<p>Do you know the exact precedence of all the operators in PHP? Neither do I. Don't guess. Always make it obvious by using brackets to force the precedence of an equation so you know what it does. Remember to not over-use this, as it may harden the readability. Basically, do not enclose single expressions. Examples:</p>
<p class="bad">// what's the result? who knows. </p>
<div class="codebox"><pre>
$bool = ($i &lt; 7 &amp;&amp; $j &gt; 8 || $k == 4);
</pre></div>
<div class="codebox">
<pre>$bool = ($i &lt; 7 &amp;&amp; $j &gt; 8 || $k == 4);</pre>
</div>
<p class="bad">// now you can be certain what I'm doing here.</p>
<div class="codebox"><pre>
$bool = (($i &lt; 7) &amp;&amp; (($j &lt; 8) || ($k == 4)));
</pre></div>
<div class="codebox">
<pre>$bool = (($i &lt; 7) &amp;&amp; (($j &lt; 8) || ($k == 4)));</pre>
</div>
<p class="good">// But this one is even better, because it is easier on the eye but the intention is preserved</p>
<div class="codebox"><pre>
$bool = ($i &lt; 7 &amp;&amp; ($j &lt; 8 || $k == 4));
</pre></div>
<div class="codebox">
<pre>$bool = ($i &lt; 7 &amp;&amp; ($j &lt; 8 || $k == 4));</pre>
</div>
<h4>Quoting strings:</h4>
<p>There are two different ways to quote strings in PHP - either with single quotes or with double quotes. The main difference is that the parser does variable interpolation in double-quoted strings, but not in single quoted strings. Because of this, you should <em>always</em> use single quotes <em>unless</em> you specifically need variable interpolation to be done on that string. This way, we can save the parser the trouble of parsing a bunch of strings where no interpolation needs to be done.</p>
@@ -505,25 +507,25 @@ $bool = ($i &lt; 7 &amp;&amp; ($j &lt; 8 || $k == 4));
<div class="codebox"><pre>
$str = "This is a really long string with no variables for the parser to find.";
do_stuff("$str");
</pre></div>
do_stuff("$str");</pre>
</div>
<p class="good">// right</p>
<div class="codebox"><pre>
$str = 'This is a really long string with no variables for the parser to find.';
do_stuff($str);
</pre></div>
do_stuff($str);</pre>
</div>
<p class="bad">// Sometimes single quotes are just not right</p>
<div class="codebox"><pre>
$post_url = $phpbb_root_path . 'posting.' . $phpEx . '?mode=' . $mode . '&amp;amp;start=' . $start;
</pre></div>
$post_url = $phpbb_root_path . 'posting.' . $phpEx . '?mode=' . $mode . '&amp;amp;start=' . $start;</pre>
</div>
<p class="good">// Double quotes are sometimes needed to not overcrowd the line with concatenations.</p>
<div class="codebox"><pre>
$post_url = "{$phpbb_root_path}posting.$phpEx?mode=$mode&amp;amp;start=$start";
</pre></div>
$post_url = "{$phpbb_root_path}posting.$phpEx?mode=$mode&amp;amp;start=$start";</pre>
</div>
<p>In SQL statements mixing single and double quotes is partly allowed (following the guidelines listed here about SQL formatting), else one should try to only use one method - mostly single quotes.</p>
@@ -535,40 +537,40 @@ $post_url = "{$phpbb_root_path}posting.$phpEx?mode=$mode&amp;amp;start=$start";
$foo = array(
'bar' => 42,
'boo' => 23
);
</pre></div>
);</pre>
</div>
<p class="good">// right </p>
<div class="codebox"><pre>
$foo = array(
'bar' => 42,
'boo' => 23,
);
</pre></div>
);</pre>
</div>
<h4>Associative array keys:</h4>
<p>In PHP, it's legal to use a literal string as a key to an associative array without quoting that string. We don't want to do this -- the string should always be quoted to avoid confusion. Note that this is only when we're using a literal, not when we're using a variable, examples:</p>
<p class="bad">// wrong</p>
<div class="codebox"><pre>
$foo = $assoc_array[blah];
</pre></div>
<div class="codebox">
<pre>$foo = $assoc_array[blah];</pre>
</div>
<p class="good">// right </p>
<div class="codebox"><pre>
$foo = $assoc_array['blah'];
</pre></div>
<div class="codebox">
<pre>$foo = $assoc_array['blah'];</pre>
</div>
<p class="bad">// wrong</p>
<div class="codebox"><pre>
$foo = $assoc_array["$var"];
</pre></div>
<div class="codebox">
<pre>$foo = $assoc_array["$var"];</pre>
</div>
<p class="good">// right </p>
<div class="codebox"><pre>
$foo = $assoc_array[$var];
</pre></div>
<div class="codebox">
<pre>$foo = $assoc_array[$var];</pre>
</div>
<h4>Comments:</h4>
<p>Each complex function should be preceded by a comment that tells a programmer everything they need to know to use that function. The meaning of every parameter, the expected input, and the output are required as a minimal comment. The function's behaviour in error conditions (and what those error conditions are) should also be present - but mostly included within the comment about the output.<br /><br />Especially important to document are any assumptions the code makes, or preconditions for its proper operation. Any one of the developers should be able to look at any part of the application and figure out what's going on in a reasonable amount of time.<br /><br />Avoid using <code>/* */</code> comment blocks for one-line comments, <code>//</code> should be used for one/two-liners.</p>
@@ -582,8 +584,8 @@ $foo = $assoc_array[$var];
<p class="bad">// wrong </p>
<div class="codebox"><pre>
$array[++$i] = $j;
$array[$i++] = $k;
</pre></div>
$array[$i++] = $k;</pre>
</div>
<p class="good">// right </p>
<div class="codebox"><pre>
@@ -591,39 +593,38 @@ $i++;
$array[$i] = $j;
$array[$i] = $k;
$i++;
</pre></div>
$i++;</pre>
</div>
<h4>Inline conditionals:</h4>
<p>Inline conditionals should only be used to do very simple things. Preferably, they will only be used to do assignments, and not for function calls or anything complex at all. They can be harmful to readability if used incorrectly, so don't fall in love with saving typing by using them, examples:</p>
<p class="bad">// Bad place to use them</p>
<div class="codebox"><pre>
($i &lt; $size &amp;&amp; $j &gt; $size) ? do_stuff($foo) : do_stuff($bar);
</pre></div>
($i &lt; $size &amp;&amp; $j &gt; $size) ? do_stuff($foo) : do_stuff($bar);</pre>
</div>
<p class="good">// OK place to use them </p>
<div class="codebox"><pre>
$min = ($i &lt; $j) ? $i : $j;
</pre></div>
$min = ($i &lt; $j) ? $i : $j;</pre>
</div>
<h4>Don't use uninitialized variables.</h4>
<p>For phpBB3, we intend to use a higher level of run-time error reporting. This will mean that the use of an uninitialized variable will be reported as a warning. These warnings can be avoided by using the built-in isset() function to check whether a variable has been set - but preferably the variable is always existing. For checking if an array has a key set this can come in handy though, examples:</p>
<p class="bad">// Wrong </p>
<div class="codebox"><pre>
if ($forum) ...
</pre></div>
<div class="codebox">
<pre>if ($forum) ...</pre>
</div>
<p class="good">// Right </p>
<div class="codebox"><pre>
if (isset($forum)) ...
</pre></div>
<div class="codebox">
<pre>if (isset($forum)) ...</pre></div>
<p class="good">// Also possible</p>
<div class="codebox"><pre>
if (isset($forum) &amp;&amp; $forum == 5)
</pre></div>
<div class="codebox">
<pre>if (isset($forum) &amp;&amp; $forum == 5)</pre>
</div>
<p>The <code>empty()</code> function is useful if you want to check if a variable is not set or being empty (an empty string, 0 as an integer or string, NULL, false, an empty array or a variable declared, but without a value in a class). Therefore empty should be used in favor of <code>isset($array) &amp;&amp; sizeof($array) &gt; 0</code> - this can be written in a shorter way as <code>!empty($array)</code>.</p>
@@ -640,8 +641,8 @@ switch ($mode)
case 'mode2':
// I am doing something completely different here
break;
}
</pre></div>
}</pre>
</div>
<p class="good">// Good </p>
<div class="codebox"><pre>
@@ -658,8 +659,8 @@ switch ($mode)
default:
// Always assume that a case was not caught
break;
}
</pre></div>
}</pre>
</div>
<p class="good">// Also good, if you have more code between the case and the break </p>
<div class="codebox"><pre>
@@ -682,8 +683,8 @@ switch ($mode)
// Always assume that a case was not caught
break;
}
</pre></div>
}</pre>
</div>
<p>Even if the break for the default case is not needed, it is sometimes better to include it just for readability and completeness.</p>
@@ -710,8 +711,8 @@ switch ($mode)
// Always assume that a case was not caught
break;
}
</pre></div>
}</pre>
</div>
<h4>Class Members</h4>
<p>Use the explicit visibility qualifiers <code>public</code>, <code>private</code> and <code>protected</code> for all properties instead of <code>var</code>.
@@ -721,14 +722,14 @@ switch ($mode)
<p class="bad">//Wrong </p>
<div class="codebox"><pre>
var $x;
private static function f()
</pre></div>
private static function f()</pre>
</div>
<p class="good">// Right </p>
<div class="codebox"><pre>
public $x;
static private function f()
</pre></div>
static private function f()</pre>
</div>
<h4>Constants</h4>
<p>Prefer class constants over global constants created with <code>define()</code>.</p>
@@ -748,8 +749,8 @@ $sql = 'SELECT *
&lt;-one tab-&gt;WHERE a = 1
&lt;-two tabs-&gt;AND (b = 2
&lt;-three tabs-&gt;OR b = 3)
&lt;-one tab-&gt;ORDER BY b';
</pre></div>
&lt;-one tab-&gt;ORDER BY b';</pre>
</div>
<p>Here the example with the tabs applied:</p>
@@ -759,8 +760,8 @@ $sql = 'SELECT *
WHERE a = 1
AND (b = 2
OR b = 3)
ORDER BY b';
</pre></div>
ORDER BY b';</pre>
</div>
<h4>SQL Quotes: </h4>
<p>Use double quotes where applicable. (The variables in these examples are typecasted to integers beforehand.) Examples: </p>
@@ -769,16 +770,16 @@ $sql = 'SELECT *
<div class="codebox"><pre>
"UPDATE " . SOME_TABLE . " SET something = something_else WHERE a = $b";
'UPDATE ' . SOME_TABLE . ' SET something = ' . $user_id . ' WHERE a = ' . $something;
</pre></div>
'UPDATE ' . SOME_TABLE . ' SET something = ' . $user_id . ' WHERE a = ' . $something;</pre>
</div>
<p class="good">// These are right. </p>
<div class="codebox"><pre>
'UPDATE ' . SOME_TABLE . " SET something = something_else WHERE a = $b";
'UPDATE ' . SOME_TABLE . " SET something = $user_id WHERE a = $something";
</pre></div>
'UPDATE ' . SOME_TABLE . " SET something = $user_id WHERE a = $something";</pre>
</div>
<p>In other words use single quotes where no variable substitution is required or where the variable involved shouldn't appear within double quotes. Otherwise use double quotes.</p>
@@ -789,15 +790,15 @@ $sql = 'SELECT *
<div class="codebox"><pre>
$sql = 'SELECT *
FROM ' . SOME_TABLE . '
WHERE a != 2';
</pre></div>
WHERE a != 2';</pre>
</div>
<p class="good">// This is right. </p>
<div class="codebox"><pre>
$sql = 'SELECT *
FROM ' . SOME_TABLE . '
WHERE a &lt;&gt; 2';
</pre></div>
WHERE a &lt;&gt; 2';</pre>
</div>
<h4>Common DBAL methods: </h4>
@@ -808,8 +809,8 @@ $sql = 'SELECT *
<div class="codebox"><pre>
$sql = 'SELECT *
FROM ' . SOME_TABLE . "
WHERE username = '" . $db-&gt;sql_escape($username) . "'";
</pre></div>
WHERE username = '" . $db-&gt;sql_escape($username) . "'";</pre>
</div>
<h4>sql_query_limit():</h4>
@@ -830,8 +831,8 @@ $sql_ary = array(
'moredata' =&gt; $another_int,
);
$db-&gt;sql_query('INSERT INTO ' . SOME_TABLE . ' ' . $db-&gt;sql_build_array('INSERT', $sql_ary));
</pre></div>
$db-&gt;sql_query('INSERT INTO ' . SOME_TABLE . ' ' . $db-&gt;sql_build_array('INSERT', $sql_ary));</pre>
</div>
<p>To complete the example, this is how an update statement would look like:</p>
@@ -845,8 +846,8 @@ $sql_ary = array(
$sql = 'UPDATE ' . SOME_TABLE . '
SET ' . $db-&gt;sql_build_array('UPDATE', $sql_ary) . '
WHERE user_id = ' . (int) $user_id;
$db-&gt;sql_query($sql);
</pre></div>
$db-&gt;sql_query($sql);</pre>
</div>
<p>The <code>$db-&gt;sql_build_array()</code> function supports the following modes: <code>INSERT</code> (example above), <code>INSERT_SELECT</code> (building query for <code>INSERT INTO table (...) SELECT value, column ...</code> statements), <code>UPDATE</code> (example above) and <code>SELECT</code> (for building WHERE statement [AND logic]).</p>
@@ -869,8 +870,8 @@ $sql_ary[] = array(
'moredata' =&gt; $another_int_2,
);
$db->sql_multi_insert(SOME_TABLE, $sql_ary);
</pre></div>
$db->sql_multi_insert(SOME_TABLE, $sql_ary);</pre>
</div>
<h4>sql_in_set():</h4>
@@ -880,22 +881,22 @@ $db->sql_multi_insert(SOME_TABLE, $sql_ary);
$sql = 'SELECT *
FROM ' . FORUMS_TABLE . '
WHERE ' . $db-&gt;sql_in_set('forum_id', $forum_ids);
$db-&gt;sql_query($sql);
</pre></div>
$db-&gt;sql_query($sql);</pre>
</div>
<p>Based on the number of values in $forum_ids, the query can look differently.</p>
<p class="good">// SQL Statement if $forum_ids = array(1, 2, 3);</p>
<div class="codebox"><pre>
SELECT FROM phpbb_forums WHERE forum_id IN (1, 2, 3)
</pre></div>
SELECT FROM phpbb_forums WHERE forum_id IN (1, 2, 3)</pre>
</div>
<p class="good">// SQL Statement if $forum_ids = array(1) or $forum_ids = 1</p>
<div class="codebox"><pre>
SELECT FROM phpbb_forums WHERE forum_id = 1
</pre></div>
SELECT FROM phpbb_forums WHERE forum_id = 1</pre>
</div>
<p>Of course the same is possible for doing a negative match against a number of values:</p>
@@ -903,22 +904,22 @@ SELECT FROM phpbb_forums WHERE forum_id = 1
$sql = 'SELECT *
FROM ' . FORUMS_TABLE . '
WHERE ' . $db-&gt;sql_in_set('forum_id', $forum_ids, <strong>true</strong>);
$db-&gt;sql_query($sql);
</pre></div>
$db-&gt;sql_query($sql);</pre>
</div>
<p>Based on the number of values in $forum_ids, the query can look differently here too.</p>
<p class="good">// SQL Statement if $forum_ids = array(1, 2, 3);</p>
<div class="codebox"><pre>
SELECT FROM phpbb_forums WHERE forum_id <strong>NOT</strong> IN (1, 2, 3)
</pre></div>
SELECT FROM phpbb_forums WHERE forum_id <strong>NOT</strong> IN (1, 2, 3)</pre>
</div>
<p class="good">// SQL Statement if $forum_ids = array(1) or $forum_ids = 1</p>
<div class="codebox"><pre>
SELECT FROM phpbb_forums WHERE forum_id <strong>&lt;&gt;</strong> 1
</pre></div>
SELECT FROM phpbb_forums WHERE forum_id <strong>&lt;&gt;</strong> 1</pre>
</div>
<p>If the given array is empty, an error will be produced.</p>
@@ -948,8 +949,8 @@ $sql_array = array(
'ORDER_BY' =&gt; 'left_id',
);
$sql = $db-&gt;sql_build_query('SELECT', $sql_array);
</pre></div>
$sql = $db-&gt;sql_build_query('SELECT', $sql_array);</pre>
</div>
<p>The possible first parameter for sql_build_query() is SELECT or SELECT_DISTINCT. As you can see, the logic is pretty self-explaining. For the LEFT_JOIN key, just add another array if you want to join on to tables for example. The added benefit of using this construct is that you are able to easily build the query statement based on conditions - for example the above LEFT_JOIN is only necessary if server side topic tracking is enabled; a slight adjustement would be:</p>
@@ -984,8 +985,8 @@ else
// Here we read the cookie data
}
$sql = $db-&gt;sql_build_query('SELECT', $sql_array);
</pre></div>
$sql = $db-&gt;sql_build_query('SELECT', $sql_array);</pre>
</div>
<a name="optimizing"></a><h3>2.iv. Optimizations</h3>
@@ -997,16 +998,16 @@ $sql = $db-&gt;sql_build_query('SELECT', $sql_array);
for ($i = 0; $i &lt; sizeof($post_data); $i++)
{
do_something();
}
</pre></div>
}</pre>
</div>
<p class="good">// You are able to assign the (not changing) result within the loop itself</p>
<div class="codebox"><pre>
for ($i = 0, $size = sizeof($post_data); $i &lt; $size; $i++)
{
do_something();
}
</pre></div>
}</pre>
</div>
<h4>Use of in_array(): </h4>
<p>Try to avoid using in_array() on huge arrays, and try to not place them into loops if the array to check consist of more than 20 entries. in_array() can be very time consuming and uses a lot of cpu processing time. For little checks it is not noticeable, but if checked against a huge array within a loop those checks alone can take several seconds. If you need this functionality, try using isset() on the arrays keys instead, actually shifting the values into keys and vice versa. A call to <code>isset($array[$var])</code> is a lot faster than <code>in_array($var, array_keys($array))</code> for example.</p>
@@ -1028,29 +1029,29 @@ for ($i = 0, $size = sizeof($post_data); $i &lt; $size; $i++)
<p class="bad">// Old method, do not use it</p>
<div class="codebox"><pre>
$start = (isset($HTTP_GET_VARS['start'])) ? intval($HTTP_GET_VARS['start']) : intval($HTTP_POST_VARS['start']);
$submit = (isset($HTTP_POST_VARS['submit'])) ? true : false;
</pre></div>
$submit = (isset($HTTP_POST_VARS['submit'])) ? true : false;</pre>
</div>
<p class="good">// Use request var and define a default variable (use the correct type)</p>
<div class="codebox"><pre>
$start = $request->variable('start', 0);
$submit = $request->is_set_post('submit');
</pre></div>
$submit = $request->is_set_post('submit');</pre>
</div>
<p class="bad">// $start is an int, the following use of $request->variable() therefore is not allowed</p>
<div class="codebox"><pre>
$start = $request->variable('start', '0');
</pre></div>
$start = $request->variable('start', '0');</pre>
</div>
<p class="good">// Getting an array, keys are integers, value defaults to 0</p>
<div class="codebox"><pre>
$mark_array = $request->variable('mark', array(0));
</pre></div>
$mark_array = $request->variable('mark', array(0));</pre>
</div>
<p class="good">// Getting an array, keys are strings, value defaults to 0</p>
<div class="codebox"><pre>
$action_ary = $request->variable('action', array('' =&gt; 0));
</pre></div>
$action_ary = $request->variable('action', array('' =&gt; 0));</pre>
</div>
<h4>Login checks/redirection: </h4>
<p>To show a forum login box use <code>login_forum_box($forum_data)</code>, else use the <code>login_box()</code> function.</p>
@@ -1073,8 +1074,8 @@ $action_ary = $request->variable('action', array('' =&gt; 0));
{
trigger_error('FORM_INVALID');
}
}
</pre></div>
}</pre>
</div>
<p>The string passed to <code>add_form_key()</code> needs to match the string passed to <code>check_form_key()</code>. Another requirement for this to work correctly is that all forms include the <code>{S_FORM_TOKEN}</code> template variable.</p>
@@ -1085,8 +1086,8 @@ $action_ary = $request->variable('action', array('' =&gt; 0));
<div class="codebox"><pre>
$user-&gt;session_begin();
$auth-&gt;acl($user-&gt;data);
$user-&gt;setup();
</pre></div>
$user-&gt;setup();</pre>
</div>
<p>The <code>$user-&gt;setup()</code> call can be used to pass on additional language definition and a custom style (used in viewforum).</p>
@@ -1094,16 +1095,16 @@ $user-&gt;setup();
<p>All messages/errors should be outputted by calling <code>trigger_error()</code> using the appropriate message type and language string. Example:</p>
<div class="codebox"><pre>
trigger_error('NO_FORUM');
</pre></div>
trigger_error('NO_FORUM');</pre>
</div>
<div class="codebox"><pre>
trigger_error($user-&gt;lang['NO_FORUM']);
</pre></div>
trigger_error($user-&gt;lang['NO_FORUM']);</pre>
</div>
<div class="codebox"><pre>
trigger_error('NO_MODE', E_USER_ERROR);
</pre></div>
trigger_error('NO_MODE', E_USER_ERROR);</pre>
</div>
<h4>Url formatting</h4>
@@ -1112,8 +1113,8 @@ trigger_error('NO_MODE', E_USER_ERROR);
<p>The <code>append_sid()</code> function from 2.0.x is available too, though it does not handle url alterations automatically. Please have a look at the code documentation if you want to get more details on how to use append_sid(). A sample call to append_sid() can look like this:</p>
<div class="codebox"><pre>
append_sid(&quot;{$phpbb_root_path}memberlist.$phpEx&quot;, 'mode=group&amp;amp;g=' . $row['group_id'])
</pre></div>
append_sid(&quot;{$phpbb_root_path}memberlist.$phpEx&quot;, 'mode=group&amp;amp;g=' . $row['group_id'])</pre>
</div>
<h4>General function usage: </h4>
@@ -1169,14 +1170,14 @@ append_sid(&quot;{$phpbb_root_path}memberlist.$phpEx&quot;, 'mode=group&amp;amp;
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
<span class="corners-bottom"><span></span></span></div>
</div>
</div>
<hr />
<a name="styling"></a><h2>3. Styling</h2>
<div class="paragraph">
<div class="inner"><span class="corners-top"><span></span></span>
<div class="inner">
<div class="content">
<a name="cfgfiles"></a><h3>3.i. Style Config Files</h3>
@@ -1193,8 +1194,8 @@ phpbb_version = 3.1.0
# Parent style
# Set value to empty or to this style's name if this style does not have a parent style
parent = prosilver
</pre></div>
parent = prosilver</pre>
</div>
<a name="genstyling"></a><h3>3.2. General Styling Rules</h3>
<p>Templates should be produced in a consistent manner. Where appropriate they should be based off an existing copy, e.g. index, viewforum or viewtopic (the combination of which implement a range of conditional and variable forms). Please also note that the indentation and coding guidelines also apply to templates where possible.</p>
@@ -1252,14 +1253,14 @@ parent = prosilver
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
<span class="corners-bottom"><span></span></span></div>
</div>
</div>
<hr />
<a name="templating"></a><h2>4. Templating</h2>
<div class="paragraph">
<div class="inner"><span class="corners-top"><span></span></span>
<div class="inner">
<div class="content">
<a name="templates"></a><h3>4.i. General Templating</h3>
@@ -1748,7 +1749,7 @@ This may span multiple lines.
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
<span class="corners-bottom"><span></span></span></div>
</div>
</div>
<hr />
@@ -1758,7 +1759,7 @@ This may span multiple lines.
<a name="charsets"></a><h2>5. Character Sets and Encodings</h2>
<div class="paragraph">
<div class="inner"><span class="corners-top"><span></span></span>
<div class="inner">
<div class="content">
@@ -1821,7 +1822,7 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
<span class="corners-bottom"><span></span></span></div>
</div>
</div>
<hr />
@@ -1829,7 +1830,7 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
<a name="translation"></a><h2>6. Translation (<abbr title="Internationalisation">i18n</abbr>/<abbr title="Localisation">L10n</abbr>) Guidelines</h2>
<div class="paragraph">
<div class="inner"><span class="corners-top"><span></span></span>
<div class="inner">
<div class="content">
@@ -2356,8 +2357,8 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
'PAGE_OF' =&gt; 'Page %s of %s',
/* Just grabbing the replacements as they
come and hope they are in the right order */
...
</pre></div>
...</pre>
</div>
<p>&hellip; a clearer way to show explicit replacement ordering is to do:</p>
@@ -2366,8 +2367,8 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
'PAGE_OF' =&gt; 'Page %1$s of %2$s',
/* Explicit ordering of the replacements,
even if they are the same order as English */
...
</pre></div>
...</pre>
</div>
<p>Why bother at all? Because some languages, the string transliterated back to English might read something like:</p>
@@ -2376,8 +2377,8 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
'PAGE_OF' =&gt; 'Total of %2$s pages, currently on page %1$s',
/* Explicit ordering of the replacements,
reversed compared to English as the total comes first */
...
</pre></div>
...</pre>
</div>
<a name="usingplurals"></a><h3>6.iv. Using plurals</h3>
@@ -2395,8 +2396,8 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
<div class="codebox"><pre>
...
$user->lang('NUMBER_OF_ELEPHANTS', $number_of_elephants);
...
</pre></div>
...</pre>
</div>
<p>And the English translation would be:</p>
@@ -2407,8 +2408,8 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
1 => 'You have 1 elephant', // Singular
2 => 'You have %d elephants', // Plural
),
...
</pre></div>
...</pre>
</div>
<p>While the Bosnian translation can have more cases:</p>
@@ -2420,16 +2421,16 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
2 => 'You have %d slona', // Used for 5, 6,
3 => ...
),
...
</pre></div>
...</pre>
</div>
<p><strong>NOTE:</strong> It is okay to use plurals for an unknown number compared to a single item, when the number is not known and displayed:</p>
<div class="codebox"><pre>
...
'MODERATOR' => 'Moderator', // Your board has 1 moderator
'MODERATORS' => 'Moderators', // Your board has multiple moderators
...
</pre></div>
...</pre>
</div>
<a name="writingstyle"></a><h3>6.v. Writing Style</h3>
@@ -2443,8 +2444,8 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
...
'CONV_ERROR_NO_AVATAR_PATH'
=&gt; 'Note to developer: you must specify $convertor['avatar_path'] to use %s.',
...
</pre></div>
...</pre>
</div>
<p class="good">// Good - Literal straight quotes should be escaped with a backslash, ie: \</p>
@@ -2452,8 +2453,8 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
...
'CONV_ERROR_NO_AVATAR_PATH'
=&gt; 'Note to developer: you must specify $convertor[\'avatar_path\'] to use %s.',
...
</pre></div>
...</pre>
</div>
<p>However, because phpBB3 now uses UTF-8 as its sole encoding, we can actually use this to our advantage and not have to remember to escape a straight quote when we don't have to:</p>
@@ -2462,24 +2463,24 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
<div class="codebox"><pre>
...
'USE_PERMISSIONS' =&gt; 'Test out user's permissions',
...
</pre></div>
...</pre>
</div>
<p class="good">// Okay - However, non-programmers wouldn't type "user\'s" automatically</p>
<div class="codebox"><pre>
...
'USE_PERMISSIONS' =&gt; 'Test out user\'s permissions',
...
</pre></div>
...</pre>
</div>
<p class="good">// Best - Use the Unicode Right-Single-Quotation-Mark character</p>
<div class="codebox"><pre>
...
'USE_PERMISSIONS' =&gt; 'Test out user&rsquo;s permissions',
...
</pre></div>
...</pre>
</div>
<p>The <code>&quot;</code> (straight double quote), <code>&lt;</code> (less-than sign) and <code>&gt;</code> (greater-than sign) characters can all be used as displayed glyphs or as part of HTML markup, for example:</p>
@@ -2489,8 +2490,8 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
...
'FOO_BAR' =&gt; 'PHP version &lt; 5.3.3.&lt;br /&gt;
Visit &quot;Downloads&quot; at &lt;a href=&quot;http://www.php.net/&quot;&gt;www.php.net&lt;/a&gt;.',
...
</pre></div>
...</pre>
</div>
<p class="good">// Okay - No more invalid HTML, but &quot;&amp;quot;&quot; is rather clumsy</p>
@@ -2498,8 +2499,8 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
...
'FOO_BAR' =&gt; 'PHP version &amp;lt; 5.3.3.&lt;br /&gt;
Visit &amp;quot;Downloads&amp;quot; at &lt;a href=&quot;http://www.php.net/&quot;&gt;www.php.net&lt;/a&gt;.',
...
</pre></div>
...</pre>
</div>
<p class="good">// Best - No more invalid HTML, and usage of correct typographical quotation marks</p>
@@ -2507,8 +2508,8 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
...
'FOO_BAR' =&gt; 'PHP version &amp;lt; 5.3.3.&lt;br /&gt;
Visit &ldquo;Downloads&rdquo; at &lt;a href=&quot;http://www.php.net/&quot;&gt;www.php.net&lt;/a&gt;.',
...
</pre></div>
...</pre>
</div>
<p>Lastly, the <code>&amp;</code> (ampersand) must always be entitised regardless of where it is used:</p>
@@ -2517,16 +2518,16 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
<div class="codebox"><pre>
...
'FOO_BAR' =&gt; '&lt;a href=&quot;http://somedomain.tld/?foo=1&amp;bar=2&quot;&gt;Foo &amp; Bar&lt;/a&gt;.',
...
</pre></div>
...</pre>
</div>
<p class="good">// Good - Valid HTML, amperands are correctly entitised in all cases</p>
<div class="codebox"><pre>
...
'FOO_BAR' =&gt; '&lt;a href=&quot;http://somedomain.tld/?foo=1&amp;amp;bar=2&quot;&gt;Foo &amp;amp; Bar&lt;/a&gt;.',
...
</pre></div>
...</pre>
</div>
<p>As for how these charcters are entered depends very much on choice of Operating System, current language locale/keyboard configuration and native abilities of the text editor used to edit phpBB language files. Please see <a href="http://en.wikipedia.org/wiki/Unicode#Input_methods">http://en.wikipedia.org/wiki/Unicode#Input_methods</a> for more information.</p>
@@ -2538,7 +2539,7 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
<span class="corners-bottom"><span></span></span></div>
</div>
</div>
<hr />
@@ -2546,7 +2547,7 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
<a name="disclaimer"></a><h2>7. Copyright and disclaimer</h2>
<div class="paragraph">
<div class="inner"><span class="corners-top"><span></span></span>
<div class="inner">
<div class="content">
@@ -2556,7 +2557,7 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
<span class="corners-bottom"><span></span></span></div>
</div>
</div>
<!-- END DOCUMENT -->

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 195 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 201 B

View File

@@ -16,11 +16,59 @@ acp_bbcodes_edit_fieldsets_after
* Since: 3.1.0-a3
* Purpose: Add settings to BBCode add/edit form
acp_email_options_after
===
* Location: adm/style/acp_email.html
* Since: 3.1.2-RC1
* Purpose: Add settings to mass email form
acp_forums_main_settings_append
===
* Location: adm/style/acp_forums.html
* Since: 3.1.2-RC1
* Purpose: Add settings to forums at end of main settings section
acp_forums_main_settings_prepend
===
* Location: adm/style/acp_forums.html
* Since: 3.1.2-RC1
* Purpose: Add settings to forums before main settings section
acp_forums_normal_settings_append
===
* Location: adm/style/acp_forums.html
* Since: 3.1.0-a1
* Purpose: Add settings to forums
* Purpose: Add settings to forums at end of normal settings section
acp_forums_normal_settings_prepend
===
* Location: adm/style/acp_forums.html
* Since: 3.1.2-RC1
* Purpose: Add settings to forums before normal settings section
acp_forums_prune_settings_append
===
* Location: adm/style/acp_forums.html
* Since: 3.1.2-RC1
* Purpose: Add settings to forums at end of prune settings section
acp_forums_prune_settings_prepend
===
* Location: adm/style/acp_forums.html
* Since: 3.1.2-RC1
* Purpose: Add settings to forums before prune settings section
acp_forums_rules_settings_append
===
* Location: adm/style/acp_forums.html
* Since: 3.1.2-RC1
* Purpose: Add settings to forums at end of rules settings section
acp_forums_rules_settings_prepend
===
* Location: adm/style/acp_forums.html
* Since: 3.1.2-RC1
* Purpose: Add settings to forums before rules settings section
acp_group_options_before
===
@@ -111,7 +159,7 @@ acp_ranks_list_column_before
* Locations:
+ adm/style/acp_ranks.html
* Since: 3.1.0-RC3
* Purpose: Add content after the last column (but before the action column)
* Purpose: Add content after the last column (but before the action column)
in the ranks list in the ACP
acp_ranks_list_header_after
@@ -126,9 +174,30 @@ acp_ranks_list_header_before
* Locations:
+ adm/style/acp_ranks.html
* Since: 3.1.0-RC3
* Purpose: Add content after the last header-column (but before the action column)
* Purpose: Add content after the last header-column (but before the action column)
in the ranks list in the ACP
acp_users_profile_before
===
* Locations:
+ adm/style/acp_users_profile.html
* Since: 3.1.4-RC1
* Purpose: Add content before the profile details when editing a user in the ACP
acp_users_profile_after
===
* Locations:
+ adm/style/acp_users_profile.html
* Since: 3.1.4-RC1
* Purpose: Add content after the profile details but before the custom profile fields when editing a user in the ACP
acp_users_profile_custom_after
===
* Locations:
+ adm/style/acp_users_profile.html
* Since: 3.1.4-RC1
* Purpose: Add content after the the custom profile fields when editing a user in the ACP
acp_simple_footer_after
===
* Location: adm/style/simple_footer.html
@@ -224,6 +293,20 @@ forumlist_body_category_header_before
* Since: 3.1.0-a4
* Purpose: Add content before the header of the category on the forum list.
forumlist_body_category_header_row_append
===
* Locations:
+ styles/prosilver/template/forumlist_body.html
* Since: 3.1.5-RC1
* Purpose: Add content after the header row of the category on the forum list.
forumlist_body_category_header_row_prepend
===
* Locations:
+ styles/prosilver/template/forumlist_body.html
* Since: 3.1.5-RC1
* Purpose: Add content before the header row of the category on the forum list.
forumlist_body_forum_row_after
===
* Locations:
@@ -336,6 +419,14 @@ index_body_block_stats_prepend
* Since: 3.1.0-b3
* Purpose: Prepend content to the statistics list on the Board index
index_body_forumlist_body_after
===
* Locations:
+ styles/prosilver/template/index_body.html
+ styles/subsilver2/template/index_body.html
* Since: 3.1.1
* Purpose: Add content after the forum list body on the index page
index_body_markforums_after
===
* Locations:
@@ -400,6 +491,54 @@ mcp_ban_unban_before
* Since: 3.1.0-RC3
* Purpose: Add additional fields to the unban form in MCP
mcp_front_latest_logs_after
===
* Locations:
+ styles/prosilver/template/mcp_front.html
+ styles/subsilver2/template/mcp_front.html
* Since: 3.1.3-RC1
* Purpose: Add content after latest logs list
mcp_front_latest_logs_before
===
* Locations:
+ styles/prosilver/template/mcp_front.html
+ styles/subsilver2/template/mcp_front.html
* Since: 3.1.3-RC1
* Purpose: Add content before latest logs list
mcp_front_latest_reported_before
===
* Locations:
+ styles/prosilver/template/mcp_front.html
+ styles/subsilver2/template/mcp_front.html
* Since: 3.1.3-RC1
* Purpose: Add content before latest reported posts list
mcp_front_latest_reported_pms_before
===
* Locations:
+ styles/prosilver/template/mcp_front.html
+ styles/subsilver2/template/mcp_front.html
* Since: 3.1.3-RC1
* Purpose: Add content before latest reported private messages list
mcp_front_latest_unapproved_before
===
* Locations:
+ styles/prosilver/template/mcp_front.html
+ styles/subsilver2/template/mcp_front.html
* Since: 3.1.3-RC1
* Purpose: Add content before latest unapproved posts list
mcp_post_additional_options
===
* Locations:
+ styles/prosilver/template/mcp_post.html
+ styles/subsilver2/template/mcp_post.html
* Since: 3.1.5-RC1
* Purpose: Add content within the list of post moderation actions
memberlist_body_username_append
===
* Locations:
@@ -418,6 +557,30 @@ memberlist_body_username_prepend
* Purpose: Add information before every username in the memberlist. Works in
all display modes (leader, group and normal memberlist).
memberlist_search_fields_after
===
* Locations:
+ styles/prosilver/template/memberlist_search.html
+ styles/subsilver2/template/memberlist_search.html
* Since: 3.1.2-RC1
* Purpose: Add information after the search fields column.
memberlist_search_fields_before
===
* Locations:
+ styles/prosilver/template/memberlist_search.html
+ styles/subsilver2/template/memberlist_search.html
* Since: 3.1.2-RC1
* Purpose: Add information before the search fields column.
memberlist_search_sorting_options_before
===
* Locations:
+ styles/prosilver/template/memberlist_search.html
+ styles/subsilver2/template/memberlist_search.html
* Since: 3.1.2-RC1
* Purpose: Add information before the search sorting options field.
memberlist_view_contact_after
===
* Locations:
@@ -555,6 +718,14 @@ overall_footer_after
* Since: 3.1.0-a1
* Purpose: Add content at the end of the file, directly prior to the `</body>` tag
overall_footer_body_after
===
* Locations:
+ styles/prosilver/template/overall_footer.html
+ styles/subsilver2/template/overall_footer.html
* Since: 3.1.3-RC1
* Purpose: Add content before the `</body>` tag but after the $SCRIPTS var, i.e. after the js scripts have been loaded
overall_footer_breadcrumb_append
===
* Locations:
@@ -691,6 +862,14 @@ overall_header_head_append
* Since: 3.1.0-a1
* Purpose: Add asset calls directly before the `</head>` tag
overall_header_navbar_before
===
* Locations:
+ styles/prosilver/template/overall_header.html
+ styles/subsilver2/template/overall_header.html
* Since: 3.1.4-RC1
* Purpose: Add content before the navigation bar
overall_header_navigation_append
===
* Locations:
@@ -731,6 +910,13 @@ overall_header_page_body_before
* Since: 3.1.0-b3
* Purpose: Add content after the page-header, but before the page-body
overall_header_searchbox_before
===
* Locations:
+ styles/prosilver/template/overall_header.html
* Since: 3.1.4-RC1
* Purpose: Add content before the search box in the header
overall_header_stylesheets_after
===
* Locations:
@@ -740,6 +926,14 @@ overall_header_stylesheets_after
* Purpose: Add asset calls after stylesheets within the `</head>` tag.
Note that INCLUDECSS will not work with this event.
posting_editor_bbcode_status_after
===
* Locations:
+ styles/prosilver/template/posting_editor.html
+ styles/subsilver2/template/posting_body.html
* Since: 3.1.4-RC1
* Purpose: Add content after bbcode status
posting_editor_buttons_after
===
* Locations:
@@ -756,6 +950,14 @@ posting_editor_buttons_before
* Since: 3.1.0-a3
* Purpose: Add content before the BBCode posting buttons
posting_editor_buttons_custom_tags_before
===
* Locations:
+ styles/prosilver/template/posting_buttons.html
+ styles/subsilver2/template/posting_buttons.html
* Since: 3.1.2-RC1
* Purpose: Add content inside the BBCode posting buttons and before the customs BBCode
posting_editor_message_after
===
* Locations:
@@ -780,6 +982,22 @@ posting_editor_options_prepend
* Since: 3.1.0-a1
* Purpose: Add posting options on the posting screen
posting_editor_smilies_after
===
* Locations:
+ styles/prosilver/template/posting_editor.html
+ styles/subsilver2/template/posting_body.html
* Since: 3.1.4-RC1
* Purpose: Add content after smilies
posting_editor_smilies_before
===
* Locations:
+ styles/prosilver/template/posting_editor.html
+ styles/subsilver2/template/posting_body.html
* Since: 3.1.4-RC1
* Purpose: Add content before the smilies
posting_editor_subject_after
===
* Locations:
@@ -812,6 +1030,28 @@ posting_pm_header_find_username_before
* Since: 3.1.0-RC4
* Purpose: Add content before the find username link on composing pm
posting_pm_layout_include_pm_header_after
===
* Locations:
+ styles/prosilver/template/posting_pm_layout.html
* Since: 3.1.4-RC1
* Purpose: Add content after the include of posting_pm_header.html
posting_pm_layout_include_pm_header_before
===
* Locations:
+ styles/prosilver/template/posting_pm_layout.html
* Since: 3.1.4-RC1
* Purpose: Add content before the include of posting_pm_header.html
posting_poll_body_options_after
===
* Locations:
+ styles/prosilver/template/posting_poll_body.html
+ styles/subsilver2/template/posting_poll_body.html
* Since: 3.1.4-RC1
* Purpose: Add content after the poll options on creating a poll
quickreply_editor_panel_after
===
* Locations:
@@ -844,6 +1084,30 @@ quickreply_editor_message_before
* Since: 3.1.0-a4
* Purpose: Add content before the quick reply textbox
search_body_form_before
===
* Locations:
+ styles/prosilver/template/search_body.html
+ styles/subsilver2/template/search_body.html
* Since: 3.1.5-RC1
* Purpose: Add content before the search form
search_results_header_after
===
* Locations:
+ styles/prosilver/template/search_results.html
+ styles/subsilver2/template/search_results.html
* Since: 3.1.4-RC1
* Purpose: Add content after the header of the search results
search_results_header_before
===
* Locations:
+ styles/prosilver/template/search_results.html
+ styles/subsilver2/template/search_results.html
* Since: 3.1.4-RC1
* Purpose: Add content before the header of the search results.
search_results_post_after
===
* Locations:
@@ -874,6 +1138,14 @@ search_results_postprofile_before
* Since: 3.1.0-b3
* Purpose: Add content directly before the post author in search results (posts view mode)
search_results_searchbox_after
===
* Locations:
+ styles/prosilver/template/search_results.html
+ styles/subsilver2/template/search_results.html
* Since: 3.1.4-RC1
* Purpose: Add content right after the searchbox of the search results.
search_results_topic_after
===
* Locations:
@@ -1011,7 +1283,7 @@ ucp_pm_viewmessage_post_buttons_after
+ styles/prosilver/template/ucp_pm_viewmessage.html
+ styles/subsilver2/template/ucp_pm_viewmessage.html
* Since: 3.1.0-RC3
* Purpose: Add post button to private messages (next to edit, quote etc), at
* Purpose: Add post button to private messages (next to edit, quote etc), at
the end of the list.
ucp_pm_viewmessage_post_buttons_before
@@ -1020,7 +1292,7 @@ ucp_pm_viewmessage_post_buttons_before
+ styles/prosilver/template/ucp_pm_viewmessage.html
+ styles/subsilver2/template/ucp_pm_viewmessage.html
* Since: 3.1.0-RC3
* Purpose: Add post button to private messages (next to edit, quote etc), at
* Purpose: Add post button to private messages (next to edit, quote etc), at
the start of the list.
ucp_pm_viewmessage_print_head_append
@@ -1099,6 +1371,38 @@ ucp_prefs_view_select_menu_append
* Purpose: Add options to the bottom of the drop-down lists block of the Edit
Display Options screen
ucp_profile_profile_info_before
===
* Locations:
+ styles/prosilver/template/ucp_profile_profile_info.html
+ styles/subsilver2/template/ucp_profile_profile_info.html
* Since: 3.1.4-RC1
* Purpose: Add options in profile page fieldset - before jabber field.
ucp_profile_profile_info_after
===
* Locations:
+ styles/prosilver/template/ucp_profile_profile_info.html
+ styles/subsilver2/template/ucp_profile_profile_info.html
* Since: 3.1.4-RC1
* Purpose: Add options in profile page fieldset - after custom profile fields.
ucp_profile_register_details_before
===
* Locations:
+ styles/prosilver/template/ucp_profile_reg_details.html
+ styles/subsilver2/template/ucp_profile_reg_details.html
* Since: 3.1.4-RC1
* Purpose: Add options in profile page fieldset - before first field.
ucp_profile_register_details_after
===
* Locations:
+ styles/prosilver/template/ucp_profile_reg_details.html
+ styles/subsilver2/template/ucp_profile_reg_details.html
* Since: 3.1.4-RC1
* Purpose: Add options in profile page fieldset - after confirm password field.
ucp_register_credentials_before
===
* Locations:
@@ -1235,6 +1539,22 @@ viewforum_forum_name_prepend
* Since: 3.1.0-b3
* Purpose: Add content directly before the forum name link on the View forum screen
viewforum_forum_title_after
===
* Locations:
+ styles/prosilver/template/viewforum_body.html
+ styles/subsilver2/template/viewforum_body.html
* Since: 3.1.5-RC1
* Purpose: Add content directly after the forum title on the View forum screen
viewforum_forum_title_before
===
* Locations:
+ styles/prosilver/template/viewforum_body.html
+ styles/subsilver2/template/viewforum_body.html
* Since: 3.1.5-RC1
* Purpose: Add content directly before the forum title on the View forum screen
viewtopic_print_head_append
===
* Locations:
@@ -1243,6 +1563,14 @@ viewtopic_print_head_append
* Since: 3.1.0-a1
* Purpose: Add asset calls directly before the `</head>` tag of the Print Topic screen
viewtopic_body_pagination_top_after
===
* Locations:
+ styles/prosilver/template/viewtopic_body.html
+ styles/subsilver2/template/viewtopic_body.html
* Since: 3.1.4-RC1
* Purpose: Add content after the pagination at top
viewtopic_body_avatar_after
===
* Locations:
@@ -1319,6 +1647,22 @@ viewtopic_body_poll_question_prepend
* Since: 3.1.0-b3
* Purpose: Add content directly before the poll question on the View topic screen
viewtopic_body_post_author_after
===
* Locations:
+ styles/prosilver/template/viewtopic_body.html
+ styles/subsilver2/template/viewtopic_body.html
* Since: 3.1.3-RC1
* Purpose: Add content directly after the post author on the view topic screen
viewtopic_body_post_author_before
===
* Locations:
+ styles/prosilver/template/viewtopic_body.html
+ styles/subsilver2/template/viewtopic_body.html
* Since: 3.1.3-RC1
* Purpose: Add content directly before the post author on the view topic screen
viewtopic_body_post_buttons_after
===
* Locations:
@@ -1337,6 +1681,22 @@ viewtopic_body_post_buttons_before
* Purpose: Add post button to posts (next to edit, quote etc), at the start of
the list.
viewtopic_body_post_buttons_list_after
===
* Locations:
+ styles/prosilver/template/viewtopic_body.html
* Since: 3.1.5-RC1
* Purpose: Add post button custom list to posts (next to edit, quote etc),
after the original list.
viewtopic_body_post_buttons_list_before
===
* Locations:
+ styles/prosilver/template/viewtopic_body.html
* Since: 3.1.5-RC1
* Purpose: Add post button custom list to posts (next to edit, quote etc),
before the original list.
viewtopic_body_postrow_custom_fields_after
===
* Locations:
@@ -1379,6 +1739,22 @@ viewtopic_body_postrow_post_content_footer
* Since: 3.1.0-RC4
* Purpose: Add data at the end of the posts.
viewtopic_body_postrow_post_details_after
===
* Locations:
+ styles/prosilver/template/viewtopic_body.html
+ styles/subsilver2/template/viewtopic_body.html
* Since: 3.1.4-RC1
* Purpose: Add content after the post details
viewtopic_body_postrow_post_details_before
===
* Locations:
+ styles/prosilver/template/viewtopic_body.html
+ styles/subsilver2/template/viewtopic_body.html
* Since: 3.1.4-RC1
* Purpose: Add content before the post details
viewtopic_body_postrow_post_notices_after
===
* Locations:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

View File

@@ -35,8 +35,30 @@ switch ($mode)
break;
default:
$l_title = $user->lang['FAQ_EXPLAIN'];
$user->add_lang('faq', false, true);
$page_title = $user->lang['FAQ_EXPLAIN'];
$ext_name = $lang_file = '';
/**
* You can use this event display a custom help page
*
* @event core.faq_mode_validation
* @var string page_title Title of the page
* @var string mode FAQ that is going to be displayed
* @var string lang_file Language file containing the help data
* @var string ext_name Vendor and extension name where the help
* language file can be loaded from
* @since 3.1.4-RC1
*/
$vars = array(
'page_title',
'mode',
'lang_file',
'ext_name',
);
extract($phpbb_dispatcher->trigger_event('core.faq_mode_validation', compact($vars)));
$l_title = $page_title;
$user->add_lang(($lang_file) ? $lang_file : 'faq', false, true, $ext_name);
break;
}

View File

@@ -153,7 +153,7 @@ class acp_attachments
'img_create_thumbnail' => array('lang' => 'CREATE_THUMBNAIL', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'img_max_thumb_width' => array('lang' => 'MAX_THUMB_WIDTH', 'validate' => 'int:0:999999999999999', 'type' => 'number:0:999999999999999', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
'img_min_thumb_filesize' => array('lang' => 'MIN_THUMB_FILESIZE', 'validate' => 'int:0:999999999999999', 'type' => 'number:0:999999999999999', 'explain' => true, 'append' => ' ' . $user->lang['BYTES']),
'img_imagick' => array('lang' => 'IMAGICK_PATH', 'validate' => 'string', 'type' => 'text:20:200', 'explain' => true, 'append' => '&nbsp;&nbsp;<span>[ <a href="' . $this->u_action . '&amp;action=imgmagick">' . $user->lang['SEARCH_IMAGICK'] . '</a> ]</span>'),
'img_imagick' => array('lang' => 'IMAGICK_PATH', 'validate' => 'absolute_path', 'type' => 'text:20:200', 'explain' => true, 'append' => '&nbsp;&nbsp;<span>[ <a href="' . $this->u_action . '&amp;action=imgmagick">' . $user->lang['SEARCH_IMAGICK'] . '</a> ]</span>'),
'img_max' => array('lang' => 'MAX_IMAGE_SIZE', 'validate' => 'int:0:9999', 'type' => 'dimension:0:9999', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
'img_link' => array('lang' => 'IMAGE_LINK_SIZE', 'validate' => 'int:0:9999', 'type' => 'dimension:0:9999', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
)

View File

@@ -409,7 +409,9 @@ class acp_bbcodes
{
$bbcode_match = trim($bbcode_match);
$bbcode_tpl = trim($bbcode_tpl);
$utf8 = strpos($bbcode_match, 'INTTEXT') !== false;
// Allow unicode characters for URL|LOCAL_URL|RELATIVE_URL|INTTEXT tokens
$utf8 = preg_match('/(URL|LOCAL_URL|RELATIVE_URL|INTTEXT)/', $bbcode_match);
$utf8_pcre_properties = phpbb_pcre_utf8_support();

View File

@@ -500,7 +500,7 @@ class acp_board
}
// We go through the display_vars to make sure no one is trying to set variables he/she is not allowed to...
foreach ($display_vars['vars'] as $config_name => $null)
foreach ($display_vars['vars'] as $config_name => $data)
{
if (!isset($cfg_array[$config_name]) || strpos($config_name, 'legend') !== false)
{
@@ -514,7 +514,8 @@ class acp_board
if ($config_name == 'guest_style')
{
if (isset($cfg_array[$config_name])) {
if (isset($cfg_array[$config_name]))
{
$this->guest_style_set($cfg_array[$config_name]);
}
continue;
@@ -531,6 +532,13 @@ class acp_board
if ($submit)
{
if (strpos($data['type'], 'password') === 0 && $config_value === '********')
{
// Do not update password fields if the content is ********,
// because that is the password replacement we use to not
// send the password to the output
continue;
}
set_config($config_name, $config_value);
if ($config_name == 'allow_quick_reply' && isset($_POST['allow_quick_reply_enable']))
@@ -559,6 +567,7 @@ class acp_board
$old_auth_config = array();
foreach ($auth_providers as $provider)
{
/** @var \phpbb\auth\provider\provider_interface $provider */
if ($fields = $provider->acp())
{
// Check if we need to create config fields for this plugin and save config when submit was pressed
@@ -574,6 +583,14 @@ class acp_board
continue;
}
if (substr($field, -9) === '_password' && $cfg_array[$field] === '********')
{
// Do not update password fields if the content is ********,
// because that is the password replacement we use to not
// send the password to the output
continue;
}
$old_auth_config[$field] = $this->new_config[$field];
$config_value = $cfg_array[$field];
$this->new_config[$field] = $config_value;
@@ -615,7 +632,15 @@ class acp_board
{
add_log('admin', 'LOG_CONFIG_' . strtoupper($mode));
trigger_error($user->lang['CONFIG_UPDATED'] . adm_back_link($this->u_action));
$message = $user->lang('CONFIG_UPDATED');
$message_type = E_USER_NOTICE;
if (!$config['email_enable'] && in_array($mode, array('email', 'registration')) &&
in_array($config['require_activation'], array(USER_ACTIVATION_SELF, USER_ACTIVATION_ADMIN)))
{
$message .= '<br /><br />' . $user->lang('ACC_ACTIVATION_WARNING');
$message_type = E_USER_WARNING;
}
trigger_error($message . adm_back_link($this->u_action), $message_type);
}
$this->tpl_name = 'acp_board';
@@ -792,20 +817,19 @@ class acp_board
global $user, $config;
$act_ary = array(
'ACC_DISABLE' => USER_ACTIVATION_DISABLE,
'ACC_NONE' => USER_ACTIVATION_NONE,
'ACC_DISABLE' => array(true, USER_ACTIVATION_DISABLE),
'ACC_NONE' => array(true, USER_ACTIVATION_NONE),
'ACC_USER' => array($config['email_enable'], USER_ACTIVATION_SELF),
'ACC_ADMIN' => array($config['email_enable'], USER_ACTIVATION_ADMIN),
);
if ($config['email_enable'])
{
$act_ary['ACC_USER'] = USER_ACTIVATION_SELF;
$act_ary['ACC_ADMIN'] = USER_ACTIVATION_ADMIN;
}
$act_options = '';
foreach ($act_ary as $key => $value)
$act_options = '';
foreach ($act_ary as $key => $data)
{
list($available, $value) = $data;
$selected = ($selected_value == $value) ? ' selected="selected"' : '';
$act_options .= '<option value="' . $value . '"' . $selected . '>' . $user->lang[$key] . '</option>';
$class = (!$available) ? ' class="disabled-option"' : '';
$act_options .= '<option value="' . $value . '"' . $selected . $class . '>' . $user->lang($key) . '</option>';
}
return $act_options;

View File

@@ -1173,6 +1173,7 @@ class postgres_extractor extends base_extractor
$this->flush($sql_data . ";\n");
}
}
$db->sql_freeresult($result);
$sql_data = '-- Table: ' . $table_name . "\n";
$sql_data .= "DROP TABLE $table_name;\n";

View File

@@ -26,7 +26,7 @@ class acp_email
function main($id, $mode)
{
global $config, $db, $user, $auth, $template, $cache;
global $phpbb_root_path, $phpbb_admin_path, $phpEx, $table_prefix;
global $phpbb_root_path, $phpbb_admin_path, $phpEx, $table_prefix, $phpbb_dispatcher;
$user->add_lang('acp/email');
$this->tpl_name = 'acp_email';
@@ -40,6 +40,7 @@ class acp_email
$error = array();
$usernames = request_var('usernames', '', true);
$usernames = (!empty($usernames)) ? explode("\n", $usernames) : array();
$group_id = request_var('g', 0);
$subject = utf8_normalize_nfc(request_var('subject', '', true));
$message = utf8_normalize_nfc(request_var('message', '', true));
@@ -69,14 +70,18 @@ class acp_email
if (!sizeof($error))
{
if ($usernames)
if (!empty($usernames))
{
// If giving usernames the admin is able to email inactive users too...
$sql = 'SELECT username, user_email, user_jabber, user_notify_type, user_lang
FROM ' . USERS_TABLE . '
WHERE ' . $db->sql_in_set('username_clean', array_map('utf8_clean_string', explode("\n", $usernames))) . '
AND user_allow_massemail = 1
ORDER BY user_lang, user_notify_type'; // , SUBSTRING(user_email FROM INSTR(user_email, '@'))
$sql_ary = array(
'SELECT' => 'username, user_email, user_jabber, user_notify_type, user_lang',
'FROM' => array(
USERS_TABLE => '',
),
'WHERE' => $db->sql_in_set('username_clean', array_map('utf8_clean_string', $usernames)) . '
AND user_allow_massemail = 1',
'ORDER_BY' => 'user_lang, user_notify_type',
);
}
else
{
@@ -123,8 +128,18 @@ class acp_email
),
);
}
$sql = $db->sql_build_query('SELECT', $sql_ary);
}
/**
* Modify sql query to change the list of users the email is sent to
*
* @event core.acp_email_modify_sql
* @var array sql_ary Array which is used to build the sql query
* @since 3.1.2-RC1
*/
$vars = array('sql_ary');
extract($phpbb_dispatcher->trigger_event('core.acp_email_modify_sql', compact($vars)));
$sql = $db->sql_build_query('SELECT', $sql_ary);
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
@@ -180,6 +195,39 @@ class acp_email
$errored = false;
$email_template = 'admin_send_email';
$template_data = array(
'CONTACT_EMAIL' => phpbb_get_board_contact($config, $phpEx),
'MESSAGE' => htmlspecialchars_decode($message),
);
$generate_log_entry = true;
/**
* Modify email template data before the emails are sent
*
* @event core.acp_email_send_before
* @var string email_template The template to be used for sending the email
* @var string subject The subject of the email
* @var array template_data Array with template data assigned to email template
* @var bool generate_log_entry If false, no log entry will be created
* @var array usernames Usernames which will be displayed in log entry, if it will be created
* @var int group_id The group this email will be sent to
* @var bool use_queue If true, email queue will be used for sending
* @var int priority Priority of sent emails
* @since 3.1.3-RC1
*/
$vars = array(
'email_template',
'subject',
'template_data',
'generate_log_entry',
'usernames',
'group_id',
'use_queue',
'priority',
);
extract($phpbb_dispatcher->trigger_event('core.acp_email_send_before', compact($vars)));
for ($i = 0, $size = sizeof($email_list); $i < $size; $i++)
{
$used_lang = $email_list[$i][0]['lang'];
@@ -193,17 +241,14 @@ class acp_email
$messenger->im($email_row['jabber'], $email_row['name']);
}
$messenger->template('admin_send_email', $used_lang);
$messenger->template($email_template, $used_lang);
$messenger->anti_abuse_headers($config, $user);
$messenger->subject(htmlspecialchars_decode($subject));
$messenger->set_mail_priority($priority);
$messenger->assign_vars(array(
'CONTACT_EMAIL' => phpbb_get_board_contact($config, $phpEx),
'MESSAGE' => htmlspecialchars_decode($message))
);
$messenger->assign_vars($template_data);
if (!($messenger->send($used_method)))
{
@@ -214,24 +259,26 @@ class acp_email
$messenger->save_queue();
if ($usernames)
if ($generate_log_entry)
{
$usernames = explode("\n", $usernames);
add_log('admin', 'LOG_MASS_EMAIL', implode(', ', utf8_normalize_nfc($usernames)));
}
else
{
if ($group_id)
if (!empty($usernames))
{
$group_name = get_group_name($group_id);
add_log('admin', 'LOG_MASS_EMAIL', implode(', ', utf8_normalize_nfc($usernames)));
}
else
{
// Not great but the logging routine doesn't cope well with localising on the fly
$group_name = $user->lang['ALL_USERS'];
}
if ($group_id)
{
$group_name = get_group_name($group_id);
}
else
{
// Not great but the logging routine doesn't cope well with localising on the fly
$group_name = $user->lang['ALL_USERS'];
}
add_log('admin', 'LOG_MASS_EMAIL', $group_name);
add_log('admin', 'LOG_MASS_EMAIL', $group_name);
}
}
if (!$errored)
@@ -267,17 +314,31 @@ class acp_email
$s_priority_options .= '<option value="' . MAIL_NORMAL_PRIORITY . '" selected="selected">' . $user->lang['MAIL_NORMAL_PRIORITY'] . '</option>';
$s_priority_options .= '<option value="' . MAIL_HIGH_PRIORITY . '">' . $user->lang['MAIL_HIGH_PRIORITY'] . '</option>';
$template->assign_vars(array(
$template_data = array(
'S_WARNING' => (sizeof($error)) ? true : false,
'WARNING_MSG' => (sizeof($error)) ? implode('<br />', $error) : '',
'U_ACTION' => $this->u_action,
'S_GROUP_OPTIONS' => $select_list,
'USERNAMES' => $usernames,
'USERNAMES' => implode("\n", $usernames),
'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&amp;form=acp_email&amp;field=usernames'),
'SUBJECT' => $subject,
'MESSAGE' => $message,
'S_PRIORITY_OPTIONS' => $s_priority_options)
'S_PRIORITY_OPTIONS' => $s_priority_options,
);
/**
* Modify custom email template data before we display the form
*
* @event core.acp_email_display
* @var array template_data Array with template data assigned to email template
* @var array exclude Array with groups which are excluded from group selection
* @var array usernames Usernames which will be displayed in form
*
* @since 3.1.4-RC1
*/
$vars = array('template_data', 'exclude', 'usernames');
extract($phpbb_dispatcher->trigger_event('core.acp_email_display', compact($vars)));
$template->assign_vars($template_data);
}
}

View File

@@ -174,11 +174,6 @@ class acp_extensions
trigger_error($user->lang['EXTENSION_NOT_ENABLEABLE'] . adm_back_link($this->u_action), E_USER_WARNING);
}
if ($phpbb_extension_manager->is_enabled($ext_name))
{
redirect($this->u_action);
}
try
{
while ($phpbb_extension_manager->enable_step($ext_name))
@@ -537,7 +532,7 @@ class acp_extensions
$version_check = $meta['extra']['version-check'];
$version_helper = new \phpbb\version_helper($this->cache, $this->config, $this->user);
$version_helper = new \phpbb\version_helper($this->cache, $this->config, new \phpbb\file_downloader(), $this->user);
$version_helper->set_current_version($meta['version']);
$version_helper->set_file_location($version_check['host'], $version_check['directory'], $version_check['filename']);
$version_helper->force_stability($this->config['extension_force_unstable'] ? 'unstable' : null);

View File

@@ -107,7 +107,10 @@ class acp_jabber
set_config('jab_host', $jab_host);
set_config('jab_port', $jab_port);
set_config('jab_username', $jab_username);
set_config('jab_password', $jab_password);
if ($jab_password !== '********')
{
set_config('jab_password', $jab_password);
}
set_config('jab_package_size', $jab_package_size);
set_config('jab_use_ssl', $jab_use_ssl);
@@ -122,7 +125,7 @@ class acp_jabber
'JAB_HOST' => $jab_host,
'JAB_PORT' => ($jab_port) ? $jab_port : '',
'JAB_USERNAME' => $jab_username,
'JAB_PASSWORD' => $jab_password,
'JAB_PASSWORD' => $jab_password !== '' ? '********' : '',
'JAB_PACKAGE_SIZE' => $jab_package_size,
'JAB_USE_SSL' => $jab_use_ssl,
'S_CAN_USE_SSL' => jabber::can_use_ssl(),

View File

@@ -632,7 +632,7 @@ class acp_main
{
$error = false;
$search_type = $config['search_type'];
$search = new $search_type($error, $phpbb_root_path, $phpEx, $auth, $config, $db, $user);
$search = new $search_type($error, $phpbb_root_path, $phpEx, $auth, $config, $db, $user, $phpbb_dispatcher);
if (!$search->index_created())
{
@@ -655,8 +655,8 @@ class acp_main
'S_MBSTRING_LOADED' => true,
'S_MBSTRING_FUNC_OVERLOAD_FAIL' => (intval(@ini_get('mbstring.func_overload')) & (MB_OVERLOAD_MAIL | MB_OVERLOAD_STRING)),
'S_MBSTRING_ENCODING_TRANSLATION_FAIL' => (@ini_get('mbstring.encoding_translation') != 0),
'S_MBSTRING_HTTP_INPUT_FAIL' => (@ini_get('mbstring.http_input') != 'pass'),
'S_MBSTRING_HTTP_OUTPUT_FAIL' => (@ini_get('mbstring.http_output') != 'pass'),
'S_MBSTRING_HTTP_INPUT_FAIL' => !in_array(@ini_get('mbstring.http_input'), array('pass', '')),
'S_MBSTRING_HTTP_OUTPUT_FAIL' => !in_array(@ini_get('mbstring.http_output'), array('pass', '')),
));
}

View File

@@ -460,7 +460,7 @@ class acp_profile
if (!$cp->vars[$key] && $action == 'edit')
{
$cp->vars[$key] = $$key;
$cp->vars[$key] = ${$key};
}
$field_data = $cp->vars;

View File

@@ -397,7 +397,7 @@ class acp_prune
$joined_after = request_var('joined_after', '');
$active = request_var('active', '');
$count = request_var('count', 0);
$count = ($request->variable('count', '') === '') ? false : $request->variable('count', 0);
$active = ($active) ? explode('-', $active) : array();
$joined_before = ($joined_before) ? explode('-', $joined_before) : array();
@@ -439,7 +439,7 @@ class acp_prune
$where_sql .= ($username) ? ' AND username_clean ' . $db->sql_like_expression(str_replace('*', $db->get_any_char(), utf8_clean_string($username))) : '';
$where_sql .= ($email) ? ' AND user_email ' . $db->sql_like_expression(str_replace('*', $db->get_any_char(), $email)) . ' ' : '';
$where_sql .= $joined_sql;
$where_sql .= ($count) ? " AND user_posts " . $key_match[$count_select] . ' ' . (int) $count . ' ' : '';
$where_sql .= ($count !== false) ? " AND user_posts " . $key_match[$count_select] . ' ' . (int) $count . ' ' : '';
// First handle pruning of users who never logged in, last active date is 0000-00-00
if (sizeof($active) && (int) $active[0] == 0 && (int) $active[1] == 0 && (int) $active[2] == 0)
@@ -506,9 +506,9 @@ class acp_prune
WHERE ug.group_id = ' . (int) $group_id . '
AND ug.user_id <> ' . ANONYMOUS . '
AND u.user_type <> ' . USER_FOUNDER . '
AND ug.user_pending = 0 ' .
((!empty($user_ids)) ? 'AND ' . $db->sql_in_set('ug.user_id', $user_ids) : '') . '
AND u.user_id = ug.user_id';
AND ug.user_pending = 0
AND u.user_id = ug.user_id
' . (!empty($user_ids) ? ' AND ' . $db->sql_in_set('ug.user_id', $user_ids) : '');
$result = $db->sql_query($sql);
// we're performing an intersection operation, so all the relevant users
@@ -532,10 +532,10 @@ class acp_prune
$sql = 'SELECT u.user_id, u.username, COUNT(p.post_id) AS queue_posts
FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . ' u
WHERE u.user_id <> ' . ANONYMOUS . '
AND u.user_type <> ' . USER_FOUNDER .
((!empty($user_ids)) ? 'AND ' . $db->sql_in_set('p.poster_id', $user_ids) : '') . '
AND u.user_type <> ' . USER_FOUNDER . '
AND ' . $db->sql_in_set('p.post_visibility', array(ITEM_UNAPPROVED, ITEM_REAPPROVE)) . '
AND u.user_id = p.poster_id
' . (!empty($user_ids) ? ' AND ' . $db->sql_in_set('p.poster_id', $user_ids) : '') . '
GROUP BY p.poster_id
HAVING queue_posts ' . $key_match[$queue_select] . ' ' . $posts_on_queue;
$result = $db->sql_query($sql);

View File

@@ -449,7 +449,6 @@ class acp_search
$search = null;
$error = false;
$search_options = '';
foreach ($search_types as $type)
{
if ($this->init_search($type, $search, $error) || !method_exists($search, 'index_created'))
@@ -599,7 +598,7 @@ class acp_search
*/
function init_search($type, &$search, &$error)
{
global $phpbb_root_path, $phpEx, $user, $auth, $config, $db;
global $phpbb_root_path, $phpEx, $user, $auth, $config, $db, $phpbb_dispatcher;
if (!class_exists($type) || !method_exists($type, 'keyword_search'))
{
@@ -608,7 +607,7 @@ class acp_search
}
$error = false;
$search = new $type($error, $phpbb_root_path, $phpEx, $auth, $config, $db, $user);
$search = new $type($error, $phpbb_root_path, $phpEx, $auth, $config, $db, $user, $phpbb_dispatcher);
return $error;
}

View File

@@ -29,14 +29,31 @@ class acp_styles
protected $styles_path;
protected $styles_path_absolute = 'styles';
protected $default_style = 0;
protected $styles_list_cols = 0;
protected $reserved_style_names = array('adm', 'admin', 'all');
/** @var \phpbb\db\driver\driver_interface */
protected $db;
/** @var \phpbb\user */
protected $user;
/** @var \phpbb\template\template */
protected $template;
/** @var \phpbb\request\request_interface */
protected $request;
/** @var \phpbb\cache\driver\driver_interface */
protected $cache;
/** @var \phpbb\auth\auth */
protected $auth;
/** @var string */
protected $phpbb_root_path;
/** @var string */
protected $php_ext;
public function main($id, $mode)
@@ -70,11 +87,6 @@ class acp_styles
$action = $this->request->variable('action', '');
$post_actions = array('install', 'activate', 'deactivate', 'uninstall');
if ($action && in_array($action, $post_actions) && !check_link_hash($request->variable('hash', ''), $action))
{
trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
}
foreach ($post_actions as $key)
{
if ($this->request->is_set_post($key))
@@ -83,6 +95,18 @@ class acp_styles
}
}
// The uninstall action uses confirm_box() to verify the validity of the request,
// so there is no need to check for a valid token here.
if (in_array($action, $post_actions) && $action != 'uninstall')
{
$is_valid_request = check_link_hash($request->variable('hash', ''), $action) || check_form_key('styles_management');
if (!$is_valid_request)
{
trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
}
}
if ($action != '')
{
$this->s_hidden_fields['action'] = $action;
@@ -122,6 +146,8 @@ class acp_styles
*/
protected function frontend()
{
add_form_key('styles_management');
// Check mode
switch ($this->mode)
{
@@ -155,6 +181,12 @@ class acp_styles
$last_installed = false;
foreach ($dirs as $dir)
{
if (in_array($dir, $this->reserved_style_names))
{
$messages[] = $this->user->lang('STYLE_NAME_RESERVED', htmlspecialchars($dir));
continue;
}
$found = false;
foreach ($styles as &$style)
{
@@ -800,7 +832,7 @@ class acp_styles
* Update styles tree
*
* @param array $styles Styles list, passed as reference
* @param array $style Current style, false if root
* @param array|false $style Current style, false if root
* @return bool True if something was updated, false if not
*/
protected function update_styles_tree(&$styles, $style = false)
@@ -1082,7 +1114,7 @@ class acp_styles
/**
* Install style
*
* @param $style style data
* @param array $style style data
* @return int Style id
*/
protected function install_style($style)

View File

@@ -173,6 +173,21 @@ class acp_users
$delete_type = request_var('delete_type', '');
$ip = request_var('ip', 'ip');
/**
* Run code at beginning of ACP users overview
*
* @event core.acp_users_overview_before
* @var array user_row Current user data
* @var string mode Active module
* @var string action Module that should be run
* @var bool submit Do we display the form only
* or did the user press submit
* @var array error Array holding error messages
* @since 3.1.3-RC1
*/
$vars = array('user_row', 'mode', 'action', 'submit', 'error');
extract($phpbb_dispatcher->trigger_event('core.acp_users_overview_before', compact($vars)));
if ($submit)
{
if ($delete)
@@ -1362,6 +1377,19 @@ class acp_users
$data['bday_year'] = request_var('bday_year', $data['bday_year']);
$data['user_birthday'] = sprintf('%2d-%2d-%4d', $data['bday_day'], $data['bday_month'], $data['bday_year']);
/**
* Modify user data on editing profile in ACP
*
* @event core.acp_users_modify_profile
* @var array data Array with user profile data
* @var bool submit Flag indicating if submit button has been pressed
* @var int user_id The user id
* @var array user_row Array with the full user data
* @since 3.1.4-RC1
*/
$vars = array('data', 'submit', 'user_id', 'user_row');
extract($phpbb_dispatcher->trigger_event('core.acp_users_modify_profile', compact($vars)));
if ($submit)
{
$error = validate_data($data, array(
@@ -1386,6 +1414,18 @@ class acp_users
$error[] = 'FORM_INVALID';
}
/**
* Validate profile data in ACP before submitting to the database
*
* @event core.acp_users_profile_validate
* @var bool submit Flag indicating if submit button has been pressed
* @var array data Array with user profile data
* @var array error Array with the form errors
* @since 3.1.4-RC1
*/
$vars = array('submit', 'data', 'error');
extract($phpbb_dispatcher->trigger_event('core.acp_users_profile_validate', compact($vars)));
if (!sizeof($error))
{
$sql_ary = array(
@@ -1393,6 +1433,20 @@ class acp_users
'user_birthday' => $data['user_birthday'],
);
/**
* Modify profile data in ACP before submitting to the database
*
* @event core.acp_users_profile_modify_sql_ary
* @var array cp_data Array with the user custom profile fields data
* @var array data Array with user profile data
* @var int user_id The user id
* @var array user_row Array with the full user data
* @var array sql_ary Array with sql data
* @since 3.1.4-RC1
*/
$vars = array('cp_data', 'data', 'user_id', 'user_row', 'sql_ary');
extract($phpbb_dispatcher->trigger_event('core.acp_users_profile_modify_sql_ary', compact($vars)));
$sql = 'UPDATE ' . USERS_TABLE . '
SET ' . $db->sql_build_array('UPDATE', $sql_ary) . "
WHERE user_id = $user_id";

View File

@@ -129,7 +129,7 @@ class bbcode
*/
function bbcode_cache_init()
{
global $phpbb_root_path, $phpEx, $config, $user, $phpbb_extension_manager, $phpbb_path_helper;
global $phpbb_root_path, $phpEx, $config, $user, $phpbb_dispatcher, $phpbb_extension_manager, $phpbb_path_helper;
if (empty($this->template_filename))
{
@@ -182,6 +182,8 @@ class bbcode
$db->sql_freeresult($result);
}
// To perform custom second pass in extension, use $this->bbcode_second_pass_by_extension()
// method which accepts variable number of parameters
foreach ($bbcode_ids as $bbcode_id)
{
switch ($bbcode_id)
@@ -388,6 +390,26 @@ class bbcode
break;
}
}
$bbcode_cache = $this->bbcode_cache;
$bbcode_bitfield = $this->bbcode_bitfield;
$bbcode_uid = $this->bbcode_uid;
/**
* Use this event to modify the bbcode_cache
*
* @event core.bbcode_cache_init_end
* @var array bbcode_cache The array of cached search and replace patterns of bbcodes
* @var string bbcode_bitfield The bbcode bitfield
* @var string bbcode_uid The bbcode uid
* @since 3.1.3-RC1
*/
$vars = array('bbcode_cache', 'bbcode_bitfield', 'bbcode_uid');
extract($phpbb_dispatcher->trigger_event('core.bbcode_cache_init_end', compact($vars)));
$this->bbcode_cache = $bbcode_cache;
$this->bbcode_bitfield = $bbcode_bitfield;
$this->bbcode_uid = $bbcode_uid;
}
/**
@@ -593,4 +615,36 @@ class bbcode
return $code;
}
/**
* Function to perform custom bbcode second pass by extensions
* can be used to assign bbcode pattern replacement
* Example: '#\[list=([^\[]+):$uid\]#e' => "\$this->bbcode_second_pass_by_extension('\$1')"
*
* Accepts variable number of parameters
*
* @return mixed Second pass result
*/
function bbcode_second_pass_by_extension()
{
global $phpbb_dispatcher;
$return = false;
$params_array = func_get_args();
/**
* Event to perform bbcode second pass with
* the custom validating methods provided by extensions
*
* @event core.bbcode_second_pass_by_extension
* @var array params_array Array with the function parameters
* @var mixed return Second pass result to return
*
* @since 3.1.5-RC1
*/
$vars = array('params_array', 'return');
extract($phpbb_dispatcher->trigger_event('core.bbcode_second_pass_by_extension', compact($vars)));
return $return;
}
}

View File

@@ -28,7 +28,7 @@ if (!defined('IN_PHPBB'))
*/
// phpBB Version
define('PHPBB_VERSION', '3.1.0-RC5');
define('PHPBB_VERSION', '3.1.5');
// QA-related
// define('PHPBB_QA', 1);

View File

@@ -1150,10 +1150,43 @@ function phpbb_timezone_select($template, $user, $default = '', $truncate = fals
function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $user_id = 0)
{
global $db, $user, $config;
global $request, $phpbb_container;
global $request, $phpbb_container, $phpbb_dispatcher;
$post_time = ($post_time === 0 || $post_time > time()) ? time() : (int) $post_time;
$should_markread = true;
/**
* This event is used for performing actions directly before marking forums,
* topics or posts as read.
*
* It is also possible to prevent the marking. For that, the $should_markread parameter
* should be set to FALSE.
*
* @event core.markread_before
* @var string mode Variable containing marking mode value
* @var mixed forum_id Variable containing forum id, or false
* @var mixed topic_id Variable containing topic id, or false
* @var int post_time Variable containing post time
* @var int user_id Variable containing the user id
* @var bool should_markread Flag indicating if the markread should be done or not.
* @since 3.1.4-RC1
*/
$vars = array(
'mode',
'forum_id',
'topic_id',
'post_time',
'user_id',
'should_markread',
);
extract($phpbb_dispatcher->trigger_event('core.markread_before', compact($vars)));
if (!$should_markread)
{
return;
}
if ($mode == 'all')
{
if ($forum_id === false || !sizeof($forum_id))
@@ -1648,6 +1681,7 @@ function get_complete_topic_tracking($forum_id, $topic_ids, $global_announce_lis
function get_unread_topics($user_id = false, $sql_extra = '', $sql_sort = '', $sql_limit = 1001, $sql_limit_offset = 0)
{
global $config, $db, $user;
global $phpbb_dispatcher;
$user_id = ($user_id === false) ? (int) $user->data['user_id'] : (int) $user_id;
@@ -1691,6 +1725,24 @@ function get_unread_topics($user_id = false, $sql_extra = '', $sql_sort = '', $s
$sql_sort",
);
/**
* Change SQL query for fetching unread topics data
*
* @event core.get_unread_topics_modify_sql
* @var array sql_array Fully assembled SQL query with keys SELECT, FROM, LEFT_JOIN, WHERE
* @var int last_mark User's last_mark time
* @var string sql_extra Extra WHERE SQL statement
* @var string sql_sort ORDER BY SQL sorting statement
* @since 3.1.4-RC1
*/
$vars = array(
'sql_array',
'last_mark',
'sql_extra',
'sql_sort',
);
extract($phpbb_dispatcher->trigger_event('core.get_unread_topics_modify_sql', compact($vars)));
$sql = $db->sql_build_query('SELECT', $sql_array);
$result = $db->sql_query_limit($sql, $sql_limit, $sql_limit_offset);
@@ -2257,7 +2309,7 @@ function redirect($url, $return = false, $disable_cd_check = false)
// Attention: only able to redirect within the same domain if $disable_cd_check is false (yourdomain.com -> www.yourdomain.com will not work)
if (!$disable_cd_check && $url_parts['host'] !== $user->host)
{
$url = generate_board_url();
trigger_error('INSECURE_REDIRECT', E_USER_ERROR);
}
}
else if ($url[0] == '/')
@@ -2295,7 +2347,7 @@ function redirect($url, $return = false, $disable_cd_check = false)
// Clean URL and check if we go outside the forum directory
$url = $phpbb_path_helper->clean_url($url);
if (!$disable_cd_check && strpos($url, generate_board_url(true)) === false)
if (!$disable_cd_check && strpos($url, generate_board_url(true) . '/') !== 0)
{
trigger_error('INSECURE_REDIRECT', E_USER_ERROR);
}
@@ -2337,7 +2389,7 @@ function redirect($url, $return = false, $disable_cd_check = false)
}
// Redirect via an HTML form for PITA webservers
if (@preg_match('#Microsoft|WebSTAR|Xitami#', getenv('SERVER_SOFTWARE')))
if (@preg_match('#WebSTAR|Xitami#', getenv('SERVER_SOFTWARE')))
{
header('Refresh: 0; URL=' . $url);
@@ -2396,26 +2448,7 @@ function build_url($strip_vars = false)
{
global $config, $user, $phpbb_path_helper;
$php_ext = $phpbb_path_helper->get_php_ext();
$page = $user->page['page'];
// We need to be cautious here.
// On some situations, the redirect path is an absolute URL, sometimes a relative path
// For a relative path, let's prefix it with $phpbb_root_path to point to the correct location,
// else we use the URL directly.
$url_parts = parse_url($page);
// URL
if ($url_parts === false || empty($url_parts['scheme']) || empty($url_parts['host']))
{
// Remove 'app.php/' from the page, when rewrite is enabled
if ($config['enable_mod_rewrite'] && strpos($page, 'app.' . $php_ext . '/') === 0)
{
$page = substr($page, strlen('app.' . $php_ext . '/'));
}
$page = $phpbb_path_helper->get_phpbb_root_path() . $page;
}
$page = $phpbb_path_helper->get_valid_page($user->page['page'], $config['enable_mod_rewrite']);
// Append SID
$redirect = append_sid($page, false, false);
@@ -2511,13 +2544,19 @@ function phpbb_request_http_version()
{
global $request;
$version = '';
if ($request && $request->server('SERVER_PROTOCOL'))
{
return $request->server('SERVER_PROTOCOL');
$version = $request->server('SERVER_PROTOCOL');
}
else if (isset($_SERVER['SERVER_PROTOCOL']))
{
return $_SERVER['SERVER_PROTOCOL'];
$version = $_SERVER['SERVER_PROTOCOL'];
}
if (!empty($version) && is_string($version) && preg_match('#^HTTP/[0-9]\.[0-9]$#', $version))
{
return $version;
}
return 'HTTP/1.0';
@@ -2657,7 +2696,7 @@ function check_form_key($form_name, $timespan = false)
function confirm_box($check, $title = '', $hidden = '', $html_body = 'confirm_body.html', $u_action = '')
{
global $user, $template, $db, $request;
global $phpEx, $phpbb_root_path, $request;
global $config, $phpbb_path_helper;
if (isset($_POST['cancel']))
{
@@ -2719,8 +2758,8 @@ function confirm_box($check, $title = '', $hidden = '', $html_body = 'confirm_bo
}
// re-add sid / transform & to &amp; for user->page (user->page is always using &)
$use_page = ($u_action) ? $phpbb_root_path . $u_action : $phpbb_root_path . str_replace('&', '&amp;', $user->page['page']);
$u_action = reapply_sid($use_page);
$use_page = ($u_action) ? $u_action : str_replace('&', '&amp;', $user->page['page']);
$u_action = reapply_sid($phpbb_path_helper->get_valid_page($use_page, $config['enable_mod_rewrite']));
$u_action .= ((strpos($u_action, '?') === false) ? '?' : '&amp;') . 'confirm_key=' . $confirm_key;
$template->assign_vars(array(
@@ -2887,19 +2926,6 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
// Special cases... determine
switch ($result['status'])
{
case LOGIN_ERROR_ATTEMPTS:
$captcha = $phpbb_container->get('captcha.factory')->get_instance($config['captcha_plugin']);
$captcha->init(CONFIRM_LOGIN);
// $captcha->reset();
$template->assign_vars(array(
'CAPTCHA_TEMPLATE' => $captcha->get_template(),
));
$err = $user->lang[$result['error_msg']];
break;
case LOGIN_ERROR_PASSWORD_CONVERT:
$err = sprintf(
$user->lang[$result['error_msg']],
@@ -2910,6 +2936,17 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
);
break;
case LOGIN_ERROR_ATTEMPTS:
$captcha = $phpbb_container->get('captcha.factory')->get_instance($config['captcha_plugin']);
$captcha->init(CONFIRM_LOGIN);
// $captcha->reset();
$template->assign_vars(array(
'CAPTCHA_TEMPLATE' => $captcha->get_template(),
));
// no break;
// Username, password, etc...
default:
$err = $user->lang[$result['error_msg']];
@@ -2922,6 +2959,19 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
break;
}
/**
* This event allows an extension to process when a user fails a login attempt
*
* @event core.login_box_failed
* @var array result Login result data
* @var string username User name used to login
* @var string password Password used to login
* @var string err Error message
* @since 3.1.3-RC1
*/
$vars = array('result', 'username', 'password', 'err');
extract($phpbb_dispatcher->trigger_event('core.login_box_failed', compact($vars)));
}
// Assign credential for username/password pair
@@ -3301,7 +3351,7 @@ function get_preg_expression($mode)
case 'email':
// Regex written by James Watts and Francisco Jose Martin Moreno
// http://fightingforalostcause.net/misc/2006/compare-email-regex.php
return '([\w\!\#$\%\&\'\*\+\-\/\=\?\^\`{\|\}\~]+\.)*(?:[\w\!\#$\%\'\*\+\-\/\=\?\^\`{\|\}\~]|&amp;)+@((((([a-z0-9]{1}[a-z0-9\-]{0,62}[a-z0-9]{1})|[a-z])\.)+[a-z]{2,63})|(\d{1,3}\.){3}\d{1,3}(\:\d{1,5})?)';
return '((?:[\w\!\#$\%\&\'\*\+\-\/\=\?\^\`{\|\}\~]+\.)*(?:[\w\!\#$\%\'\*\+\-\/\=\?\^\`{\|\}\~]|&amp;)+)@((((([a-z0-9]{1}[a-z0-9\-]{0,62}[a-z0-9]{1})|[a-z])\.)+[a-z]{2,63})|(\d{1,3}\.){3}\d{1,3}(\:\d{1,5})?)';
break;
case 'bbcode_htm':
@@ -3327,23 +3377,33 @@ function get_preg_expression($mode)
break;
case 'url':
// generated with regex_idn.php file in the develop folder
return "[a-z][a-z\d+\-.]*:/{2}(?:(?:[^\p{C}\p{Z}\p{S}\p{P}\p{Nl}\p{No}\p{Me}\x{1100}-\x{115F}\x{A960}-\x{A97C}\x{1160}-\x{11A7}\x{D7B0}-\x{D7C6}\x{20D0}-\x{20FF}\x{1D100}-\x{1D1FF}\x{1D200}-\x{1D24F}\x{0640}\x{07FA}\x{302E}\x{302F}\x{3031}-\x{3035}\x{303B}]*[\x{00B7}\x{0375}\x{05F3}\x{05F4}\x{30FB}\x{002D}\x{06FD}\x{06FE}\x{0F0B}\x{3007}\x{00DF}\x{03C2}\x{200C}\x{200D}\pL0-9\-._~!$&'()*+,;=:@|]+|%[\dA-F]{2})+|[0-9.]+|\[[a-z0-9.]+:[a-z0-9.]+:[a-z0-9.:]+\])(?::\d*)?(?:/(?:[^\p{C}\p{Z}\p{S}\p{P}\p{Nl}\p{No}\p{Me}\x{1100}-\x{115F}\x{A960}-\x{A97C}\x{1160}-\x{11A7}\x{D7B0}-\x{D7C6}\x{20D0}-\x{20FF}\x{1D100}-\x{1D1FF}\x{1D200}-\x{1D24F}\x{0640}\x{07FA}\x{302E}\x{302F}\x{3031}-\x{3035}\x{303B}]*[\x{00B7}\x{0375}\x{05F3}\x{05F4}\x{30FB}\x{002D}\x{06FD}\x{06FE}\x{0F0B}\x{3007}\x{00DF}\x{03C2}\x{200C}\x{200D}\pL0-9\-._~!$&'()*+,;=:@|]+|%[\dA-F]{2})*)*(?:\?(?:[^\p{C}\p{Z}\p{S}\p{P}\p{Nl}\p{No}\p{Me}\x{1100}-\x{115F}\x{A960}-\x{A97C}\x{1160}-\x{11A7}\x{D7B0}-\x{D7C6}\x{20D0}-\x{20FF}\x{1D100}-\x{1D1FF}\x{1D200}-\x{1D24F}\x{0640}\x{07FA}\x{302E}\x{302F}\x{3031}-\x{3035}\x{303B}]*[\x{00B7}\x{0375}\x{05F3}\x{05F4}\x{30FB}\x{002D}\x{06FD}\x{06FE}\x{0F0B}\x{3007}\x{00DF}\x{03C2}\x{200C}\x{200D}\pL0-9\-._~!$&'()*+,;=:@/?|]+|%[\dA-F]{2})*)?(?:\#(?:[^\p{C}\p{Z}\p{S}\p{P}\p{Nl}\p{No}\p{Me}\x{1100}-\x{115F}\x{A960}-\x{A97C}\x{1160}-\x{11A7}\x{D7B0}-\x{D7C6}\x{20D0}-\x{20FF}\x{1D100}-\x{1D1FF}\x{1D200}-\x{1D24F}\x{0640}\x{07FA}\x{302E}\x{302F}\x{3031}-\x{3035}\x{303B}]*[\x{00B7}\x{0375}\x{05F3}\x{05F4}\x{30FB}\x{002D}\x{06FD}\x{06FE}\x{0F0B}\x{3007}\x{00DF}\x{03C2}\x{200C}\x{200D}\pL0-9\-._~!$&'()*+,;=:@/?|]+|%[\dA-F]{2})*)?";
break;
case 'url_inline':
$inline = ($mode == 'url') ? ')' : '';
$scheme = ($mode == 'url') ? '[a-z\d+\-.]' : '[a-z\d+]'; // avoid automatic parsing of "word" in "last word.http://..."
// generated with regex generation file in the develop folder
return "[a-z]$scheme*:/{2}(?:(?:[a-z0-9\-._~!$&'($inline*+,;=:@|]+|%[\dA-F]{2})+|[0-9.]+|\[[a-z0-9.]+:[a-z0-9.]+:[a-z0-9.:]+\])(?::\d*)?(?:/(?:[a-z0-9\-._~!$&'($inline*+,;=:@|]+|%[\dA-F]{2})*)*(?:\?(?:[a-z0-9\-._~!$&'($inline*+,;=:@/?|]+|%[\dA-F]{2})*)?(?:\#(?:[a-z0-9\-._~!$&'($inline*+,;=:@/?|]+|%[\dA-F]{2})*)?";
// generated with regex_idn.php file in the develop folder
return "[a-z][a-z\d+]*:/{2}(?:(?:[^\p{C}\p{Z}\p{S}\p{P}\p{Nl}\p{No}\p{Me}\x{1100}-\x{115F}\x{A960}-\x{A97C}\x{1160}-\x{11A7}\x{D7B0}-\x{D7C6}\x{20D0}-\x{20FF}\x{1D100}-\x{1D1FF}\x{1D200}-\x{1D24F}\x{0640}\x{07FA}\x{302E}\x{302F}\x{3031}-\x{3035}\x{303B}]*[\x{00B7}\x{0375}\x{05F3}\x{05F4}\x{30FB}\x{002D}\x{06FD}\x{06FE}\x{0F0B}\x{3007}\x{00DF}\x{03C2}\x{200C}\x{200D}\pL0-9\-._~!$&'(*+,;=:@|]+|%[\dA-F]{2})+|[0-9.]+|\[[a-z0-9.]+:[a-z0-9.]+:[a-z0-9.:]+\])(?::\d*)?(?:/(?:[^\p{C}\p{Z}\p{S}\p{P}\p{Nl}\p{No}\p{Me}\x{1100}-\x{115F}\x{A960}-\x{A97C}\x{1160}-\x{11A7}\x{D7B0}-\x{D7C6}\x{20D0}-\x{20FF}\x{1D100}-\x{1D1FF}\x{1D200}-\x{1D24F}\x{0640}\x{07FA}\x{302E}\x{302F}\x{3031}-\x{3035}\x{303B}]*[\x{00B7}\x{0375}\x{05F3}\x{05F4}\x{30FB}\x{002D}\x{06FD}\x{06FE}\x{0F0B}\x{3007}\x{00DF}\x{03C2}\x{200C}\x{200D}\pL0-9\-._~!$&'(*+,;=:@|]+|%[\dA-F]{2})*)*(?:\?(?:[^\p{C}\p{Z}\p{S}\p{P}\p{Nl}\p{No}\p{Me}\x{1100}-\x{115F}\x{A960}-\x{A97C}\x{1160}-\x{11A7}\x{D7B0}-\x{D7C6}\x{20D0}-\x{20FF}\x{1D100}-\x{1D1FF}\x{1D200}-\x{1D24F}\x{0640}\x{07FA}\x{302E}\x{302F}\x{3031}-\x{3035}\x{303B}]*[\x{00B7}\x{0375}\x{05F3}\x{05F4}\x{30FB}\x{002D}\x{06FD}\x{06FE}\x{0F0B}\x{3007}\x{00DF}\x{03C2}\x{200C}\x{200D}\pL0-9\-._~!$&'(*+,;=:@/?|]+|%[\dA-F]{2})*)?(?:\#(?:[^\p{C}\p{Z}\p{S}\p{P}\p{Nl}\p{No}\p{Me}\x{1100}-\x{115F}\x{A960}-\x{A97C}\x{1160}-\x{11A7}\x{D7B0}-\x{D7C6}\x{20D0}-\x{20FF}\x{1D100}-\x{1D1FF}\x{1D200}-\x{1D24F}\x{0640}\x{07FA}\x{302E}\x{302F}\x{3031}-\x{3035}\x{303B}]*[\x{00B7}\x{0375}\x{05F3}\x{05F4}\x{30FB}\x{002D}\x{06FD}\x{06FE}\x{0F0B}\x{3007}\x{00DF}\x{03C2}\x{200C}\x{200D}\pL0-9\-._~!$&'(*+,;=:@/?|]+|%[\dA-F]{2})*)?";
break;
case 'www_url':
// generated with regex_idn.php file in the develop folder
return "www\.(?:[^\p{C}\p{Z}\p{S}\p{P}\p{Nl}\p{No}\p{Me}\x{1100}-\x{115F}\x{A960}-\x{A97C}\x{1160}-\x{11A7}\x{D7B0}-\x{D7C6}\x{20D0}-\x{20FF}\x{1D100}-\x{1D1FF}\x{1D200}-\x{1D24F}\x{0640}\x{07FA}\x{302E}\x{302F}\x{3031}-\x{3035}\x{303B}]*[\x{00B7}\x{0375}\x{05F3}\x{05F4}\x{30FB}\x{002D}\x{06FD}\x{06FE}\x{0F0B}\x{3007}\x{00DF}\x{03C2}\x{200C}\x{200D}\pL0-9\-._~!$&'()*+,;=:@|]+|%[\dA-F]{2})+(?::\d*)?(?:/(?:[^\p{C}\p{Z}\p{S}\p{P}\p{Nl}\p{No}\p{Me}\x{1100}-\x{115F}\x{A960}-\x{A97C}\x{1160}-\x{11A7}\x{D7B0}-\x{D7C6}\x{20D0}-\x{20FF}\x{1D100}-\x{1D1FF}\x{1D200}-\x{1D24F}\x{0640}\x{07FA}\x{302E}\x{302F}\x{3031}-\x{3035}\x{303B}]*[\x{00B7}\x{0375}\x{05F3}\x{05F4}\x{30FB}\x{002D}\x{06FD}\x{06FE}\x{0F0B}\x{3007}\x{00DF}\x{03C2}\x{200C}\x{200D}\pL0-9\-._~!$&'()*+,;=:@|]+|%[\dA-F]{2})*)*(?:\?(?:[^\p{C}\p{Z}\p{S}\p{P}\p{Nl}\p{No}\p{Me}\x{1100}-\x{115F}\x{A960}-\x{A97C}\x{1160}-\x{11A7}\x{D7B0}-\x{D7C6}\x{20D0}-\x{20FF}\x{1D100}-\x{1D1FF}\x{1D200}-\x{1D24F}\x{0640}\x{07FA}\x{302E}\x{302F}\x{3031}-\x{3035}\x{303B}]*[\x{00B7}\x{0375}\x{05F3}\x{05F4}\x{30FB}\x{002D}\x{06FD}\x{06FE}\x{0F0B}\x{3007}\x{00DF}\x{03C2}\x{200C}\x{200D}\pL0-9\-._~!$&'()*+,;=:@/?|]+|%[\dA-F]{2})*)?(?:\#(?:[^\p{C}\p{Z}\p{S}\p{P}\p{Nl}\p{No}\p{Me}\x{1100}-\x{115F}\x{A960}-\x{A97C}\x{1160}-\x{11A7}\x{D7B0}-\x{D7C6}\x{20D0}-\x{20FF}\x{1D100}-\x{1D1FF}\x{1D200}-\x{1D24F}\x{0640}\x{07FA}\x{302E}\x{302F}\x{3031}-\x{3035}\x{303B}]*[\x{00B7}\x{0375}\x{05F3}\x{05F4}\x{30FB}\x{002D}\x{06FD}\x{06FE}\x{0F0B}\x{3007}\x{00DF}\x{03C2}\x{200C}\x{200D}\pL0-9\-._~!$&'()*+,;=:@/?|]+|%[\dA-F]{2})*)?";
break;
case 'www_url_inline':
$inline = ($mode == 'www_url') ? ')' : '';
return "www\.(?:[a-z0-9\-._~!$&'($inline*+,;=:@|]+|%[\dA-F]{2})+(?::\d*)?(?:/(?:[a-z0-9\-._~!$&'($inline*+,;=:@|]+|%[\dA-F]{2})*)*(?:\?(?:[a-z0-9\-._~!$&'($inline*+,;=:@/?|]+|%[\dA-F]{2})*)?(?:\#(?:[a-z0-9\-._~!$&'($inline*+,;=:@/?|]+|%[\dA-F]{2})*)?";
// generated with regex_idn.php file in the develop folder
return "www\.(?:[^\p{C}\p{Z}\p{S}\p{P}\p{Nl}\p{No}\p{Me}\x{1100}-\x{115F}\x{A960}-\x{A97C}\x{1160}-\x{11A7}\x{D7B0}-\x{D7C6}\x{20D0}-\x{20FF}\x{1D100}-\x{1D1FF}\x{1D200}-\x{1D24F}\x{0640}\x{07FA}\x{302E}\x{302F}\x{3031}-\x{3035}\x{303B}]*[\x{00B7}\x{0375}\x{05F3}\x{05F4}\x{30FB}\x{002D}\x{06FD}\x{06FE}\x{0F0B}\x{3007}\x{00DF}\x{03C2}\x{200C}\x{200D}\pL0-9\-._~!$&'(*+,;=:@|]+|%[\dA-F]{2})+(?::\d*)?(?:/(?:[^\p{C}\p{Z}\p{S}\p{P}\p{Nl}\p{No}\p{Me}\x{1100}-\x{115F}\x{A960}-\x{A97C}\x{1160}-\x{11A7}\x{D7B0}-\x{D7C6}\x{20D0}-\x{20FF}\x{1D100}-\x{1D1FF}\x{1D200}-\x{1D24F}\x{0640}\x{07FA}\x{302E}\x{302F}\x{3031}-\x{3035}\x{303B}]*[\x{00B7}\x{0375}\x{05F3}\x{05F4}\x{30FB}\x{002D}\x{06FD}\x{06FE}\x{0F0B}\x{3007}\x{00DF}\x{03C2}\x{200C}\x{200D}\pL0-9\-._~!$&'(*+,;=:@|]+|%[\dA-F]{2})*)*(?:\?(?:[^\p{C}\p{Z}\p{S}\p{P}\p{Nl}\p{No}\p{Me}\x{1100}-\x{115F}\x{A960}-\x{A97C}\x{1160}-\x{11A7}\x{D7B0}-\x{D7C6}\x{20D0}-\x{20FF}\x{1D100}-\x{1D1FF}\x{1D200}-\x{1D24F}\x{0640}\x{07FA}\x{302E}\x{302F}\x{3031}-\x{3035}\x{303B}]*[\x{00B7}\x{0375}\x{05F3}\x{05F4}\x{30FB}\x{002D}\x{06FD}\x{06FE}\x{0F0B}\x{3007}\x{00DF}\x{03C2}\x{200C}\x{200D}\pL0-9\-._~!$&'(*+,;=:@/?|]+|%[\dA-F]{2})*)?(?:\#(?:[^\p{C}\p{Z}\p{S}\p{P}\p{Nl}\p{No}\p{Me}\x{1100}-\x{115F}\x{A960}-\x{A97C}\x{1160}-\x{11A7}\x{D7B0}-\x{D7C6}\x{20D0}-\x{20FF}\x{1D100}-\x{1D1FF}\x{1D200}-\x{1D24F}\x{0640}\x{07FA}\x{302E}\x{302F}\x{3031}-\x{3035}\x{303B}]*[\x{00B7}\x{0375}\x{05F3}\x{05F4}\x{30FB}\x{002D}\x{06FD}\x{06FE}\x{0F0B}\x{3007}\x{00DF}\x{03C2}\x{200C}\x{200D}\pL0-9\-._~!$&'(*+,;=:@/?|]+|%[\dA-F]{2})*)?";
break;
case 'relative_url':
// generated with regex_idn.php file in the develop folder
return "(?:[^\p{C}\p{Z}\p{S}\p{P}\p{Nl}\p{No}\p{Me}\x{1100}-\x{115F}\x{A960}-\x{A97C}\x{1160}-\x{11A7}\x{D7B0}-\x{D7C6}\x{20D0}-\x{20FF}\x{1D100}-\x{1D1FF}\x{1D200}-\x{1D24F}\x{0640}\x{07FA}\x{302E}\x{302F}\x{3031}-\x{3035}\x{303B}]*[\x{00B7}\x{0375}\x{05F3}\x{05F4}\x{30FB}\x{002D}\x{06FD}\x{06FE}\x{0F0B}\x{3007}\x{00DF}\x{03C2}\x{200C}\x{200D}\pL0-9\-._~!$&'()*+,;=:@|]+|%[\dA-F]{2})*(?:/(?:[^\p{C}\p{Z}\p{S}\p{P}\p{Nl}\p{No}\p{Me}\x{1100}-\x{115F}\x{A960}-\x{A97C}\x{1160}-\x{11A7}\x{D7B0}-\x{D7C6}\x{20D0}-\x{20FF}\x{1D100}-\x{1D1FF}\x{1D200}-\x{1D24F}\x{0640}\x{07FA}\x{302E}\x{302F}\x{3031}-\x{3035}\x{303B}]*[\x{00B7}\x{0375}\x{05F3}\x{05F4}\x{30FB}\x{002D}\x{06FD}\x{06FE}\x{0F0B}\x{3007}\x{00DF}\x{03C2}\x{200C}\x{200D}\pL0-9\-._~!$&'()*+,;=:@|]+|%[\dA-F]{2})*)*(?:\?(?:[^\p{C}\p{Z}\p{S}\p{P}\p{Nl}\p{No}\p{Me}\x{1100}-\x{115F}\x{A960}-\x{A97C}\x{1160}-\x{11A7}\x{D7B0}-\x{D7C6}\x{20D0}-\x{20FF}\x{1D100}-\x{1D1FF}\x{1D200}-\x{1D24F}\x{0640}\x{07FA}\x{302E}\x{302F}\x{3031}-\x{3035}\x{303B}]*[\x{00B7}\x{0375}\x{05F3}\x{05F4}\x{30FB}\x{002D}\x{06FD}\x{06FE}\x{0F0B}\x{3007}\x{00DF}\x{03C2}\x{200C}\x{200D}\pL0-9\-._~!$&'()*+,;=:@/?|]+|%[\dA-F]{2})*)?(?:\#(?:[^\p{C}\p{Z}\p{S}\p{P}\p{Nl}\p{No}\p{Me}\x{1100}-\x{115F}\x{A960}-\x{A97C}\x{1160}-\x{11A7}\x{D7B0}-\x{D7C6}\x{20D0}-\x{20FF}\x{1D100}-\x{1D1FF}\x{1D200}-\x{1D24F}\x{0640}\x{07FA}\x{302E}\x{302F}\x{3031}-\x{3035}\x{303B}]*[\x{00B7}\x{0375}\x{05F3}\x{05F4}\x{30FB}\x{002D}\x{06FD}\x{06FE}\x{0F0B}\x{3007}\x{00DF}\x{03C2}\x{200C}\x{200D}\pL0-9\-._~!$&'()*+,;=:@/?|]+|%[\dA-F]{2})*)?";
break;
case 'relative_url_inline':
$inline = ($mode == 'relative_url') ? ')' : '';
return "(?:[a-z0-9\-._~!$&'($inline*+,;=:@|]+|%[\dA-F]{2})*(?:/(?:[a-z0-9\-._~!$&'($inline*+,;=:@|]+|%[\dA-F]{2})*)*(?:\?(?:[a-z0-9\-._~!$&'($inline*+,;=:@/?|]+|%[\dA-F]{2})*)?(?:\#(?:[a-z0-9\-._~!$&'($inline*+,;=:@/?|]+|%[\dA-F]{2})*)?";
// generated with regex_idn.php file in the develop folder
return "(?:[^\p{C}\p{Z}\p{S}\p{P}\p{Nl}\p{No}\p{Me}\x{1100}-\x{115F}\x{A960}-\x{A97C}\x{1160}-\x{11A7}\x{D7B0}-\x{D7C6}\x{20D0}-\x{20FF}\x{1D100}-\x{1D1FF}\x{1D200}-\x{1D24F}\x{0640}\x{07FA}\x{302E}\x{302F}\x{3031}-\x{3035}\x{303B}]*[\x{00B7}\x{0375}\x{05F3}\x{05F4}\x{30FB}\x{002D}\x{06FD}\x{06FE}\x{0F0B}\x{3007}\x{00DF}\x{03C2}\x{200C}\x{200D}\pL0-9\-._~!$&'(*+,;=:@|]+|%[\dA-F]{2})*(?:/(?:[^\p{C}\p{Z}\p{S}\p{P}\p{Nl}\p{No}\p{Me}\x{1100}-\x{115F}\x{A960}-\x{A97C}\x{1160}-\x{11A7}\x{D7B0}-\x{D7C6}\x{20D0}-\x{20FF}\x{1D100}-\x{1D1FF}\x{1D200}-\x{1D24F}\x{0640}\x{07FA}\x{302E}\x{302F}\x{3031}-\x{3035}\x{303B}]*[\x{00B7}\x{0375}\x{05F3}\x{05F4}\x{30FB}\x{002D}\x{06FD}\x{06FE}\x{0F0B}\x{3007}\x{00DF}\x{03C2}\x{200C}\x{200D}\pL0-9\-._~!$&'(*+,;=:@|]+|%[\dA-F]{2})*)*(?:\?(?:[^\p{C}\p{Z}\p{S}\p{P}\p{Nl}\p{No}\p{Me}\x{1100}-\x{115F}\x{A960}-\x{A97C}\x{1160}-\x{11A7}\x{D7B0}-\x{D7C6}\x{20D0}-\x{20FF}\x{1D100}-\x{1D1FF}\x{1D200}-\x{1D24F}\x{0640}\x{07FA}\x{302E}\x{302F}\x{3031}-\x{3035}\x{303B}]*[\x{00B7}\x{0375}\x{05F3}\x{05F4}\x{30FB}\x{002D}\x{06FD}\x{06FE}\x{0F0B}\x{3007}\x{00DF}\x{03C2}\x{200C}\x{200D}\pL0-9\-._~!$&'(*+,;=:@/?|]+|%[\dA-F]{2})*)?(?:\#(?:[^\p{C}\p{Z}\p{S}\p{P}\p{Nl}\p{No}\p{Me}\x{1100}-\x{115F}\x{A960}-\x{A97C}\x{1160}-\x{11A7}\x{D7B0}-\x{D7C6}\x{20D0}-\x{20FF}\x{1D100}-\x{1D1FF}\x{1D200}-\x{1D24F}\x{0640}\x{07FA}\x{302E}\x{302F}\x{3031}-\x{3035}\x{303B}]*[\x{00B7}\x{0375}\x{05F3}\x{05F4}\x{30FB}\x{002D}\x{06FD}\x{06FE}\x{0F0B}\x{3007}\x{00DF}\x{03C2}\x{200C}\x{200D}\pL0-9\-._~!$&'(*+,;=:@/?|]+|%[\dA-F]{2})*)?";
break;
case 'table_prefix':
@@ -4191,9 +4251,10 @@ function obtain_users_online($item_id = 0, $item = 'forum')
*/
function obtain_users_online_string($online_users, $item_id = 0, $item = 'forum')
{
global $config, $db, $user, $auth;
global $config, $db, $user, $auth, $phpbb_dispatcher;
$user_online_link = $online_userlist = '';
$guests_online = $hidden_online = $l_online_users = $online_userlist = $visible_online = '';
$user_online_link = $rowset = array();
// Need caps version of $item for language-strings
$item_caps = strtoupper($item);
@@ -4203,9 +4264,28 @@ function obtain_users_online_string($online_users, $item_id = 0, $item = 'forum'
FROM ' . USERS_TABLE . '
WHERE ' . $db->sql_in_set('user_id', $online_users['online_users']) . '
ORDER BY username_clean ASC';
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
/**
* Modify SQL query to obtain online users data
*
* @event core.obtain_users_online_string_sql
* @var array online_users Array with online users data
* from obtain_users_online()
* @var int item_id Restrict online users to item id
* @var string item Restrict online users to a certain
* session item, e.g. forum for
* session_forum_id
* @var string sql SQL query to obtain users online data
* @since 3.1.4-RC1
*/
$vars = array('online_users', 'item_id', 'item', 'sql');
extract($phpbb_dispatcher->trigger_event('core.obtain_users_online_string_sql', compact($vars)));
$result = $db->sql_query($sql);
$rowset = $db->sql_fetchrowset($result);
$db->sql_freeresult($result);
foreach ($rowset as $row)
{
// User is logged in and therefore not a guest
if ($row['user_id'] != ANONYMOUS)
@@ -4217,13 +4297,12 @@ function obtain_users_online_string($online_users, $item_id = 0, $item = 'forum'
if (!isset($online_users['hidden_users'][$row['user_id']]) || $auth->acl_get('u_viewonline'))
{
$user_online_link = get_username_string(($row['user_type'] <> USER_IGNORE) ? 'full' : 'no_profile', $row['user_id'], $row['username'], $row['user_colour']);
$online_userlist .= ($online_userlist != '') ? ', ' . $user_online_link : $user_online_link;
$user_online_link[$row['user_id']] = get_username_string(($row['user_type'] <> USER_IGNORE) ? 'full' : 'no_profile', $row['user_id'], $row['username'], $row['user_colour']);
}
}
}
$db->sql_freeresult($result);
}
$online_userlist = implode(', ', $user_online_link);
if (!$online_userlist)
{
@@ -4256,6 +4335,33 @@ function obtain_users_online_string($online_users, $item_id = 0, $item = 'forum'
$l_online_users = $user->lang('ONLINE_USERS_TOTAL', (int) $online_users['total_online'], $visible_online, $hidden_online);
}
/**
* Modify online userlist data
*
* @event core.obtain_users_online_string_modify
* @var array online_users Array with online users data
* from obtain_users_online()
* @var int item_id Restrict online users to item id
* @var string item Restrict online users to a certain
* session item, e.g. forum for
* session_forum_id
* @var array rowset Array with online users data
* @var array user_online_link Array with online users items (usernames)
* @var string online_userlist String containing users online list
* @var string l_online_users String with total online users count info
* @since 3.1.4-RC1
*/
$vars = array(
'online_users',
'item_id',
'item',
'rowset',
'user_online_link',
'online_userlist',
'l_online_users',
);
extract($phpbb_dispatcher->trigger_event('core.obtain_users_online_string_modify', compact($vars)));
return array(
'online_userlist' => $online_userlist,
'l_online_users' => $l_online_users,
@@ -5254,7 +5360,7 @@ function page_footer($run_cron = true, $display_template = true, $exit_handler =
// Call cron-type script
$call_cron = false;
if (!defined('IN_CRON') && !$config['use_system_cron'] && $run_cron && !$config['board_disable'] && !$user->data['is_bot'] && !$cache->get('cron.lock_check'))
if (!defined('IN_CRON') && !$config['use_system_cron'] && $run_cron && !$config['board_disable'] && !$user->data['is_bot'] && !$cache->get('_cron.lock_check'))
{
$call_cron = true;
$time_now = (!empty($user->time_now) && is_int($user->time_now)) ? $user->time_now : time();
@@ -5286,7 +5392,7 @@ function page_footer($run_cron = true, $display_template = true, $exit_handler =
}
else
{
$cache->put('cron.lock_check', true, 300);
$cache->put('_cron.lock_check', true, 60);
}
}

View File

@@ -245,8 +245,13 @@ function build_cfg_template($tpl_type, $key, &$new, $config_key, $vars)
switch ($tpl_type[0])
{
case 'text':
case 'password':
if ($new[$config_key] !== '')
{
// replace passwords with asterixes
$new[$config_key] = '********';
}
case 'text':
case 'url':
case 'email':
case 'color':
@@ -550,6 +555,9 @@ function validate_config_vars($config_vars, &$cfg_array, &$error)
$cfg_array[$config_name] = trim($destination);
// Absolute file path
case 'absolute_path':
case 'absolute_path_writable':
// Path being relative (still prefixed by phpbb_root_path), but with the ability to escape the root dir...
case 'path':
case 'wpath':
@@ -568,20 +576,22 @@ function validate_config_vars($config_vars, &$cfg_array, &$error)
break;
}
if (!file_exists($phpbb_root_path . $cfg_array[$config_name]))
$path = in_array($config_definition['validate'], array('wpath', 'path', 'rpath', 'rwpath')) ? $phpbb_root_path . $cfg_array[$config_name] : $cfg_array[$config_name];
if (!file_exists($path))
{
$error[] = sprintf($user->lang['DIRECTORY_DOES_NOT_EXIST'], $cfg_array[$config_name]);
}
if (file_exists($phpbb_root_path . $cfg_array[$config_name]) && !is_dir($phpbb_root_path . $cfg_array[$config_name]))
if (file_exists($path) && !is_dir($path))
{
$error[] = sprintf($user->lang['DIRECTORY_NOT_DIR'], $cfg_array[$config_name]);
}
// Check if the path is writable
if ($config_definition['validate'] == 'wpath' || $config_definition['validate'] == 'rwpath')
if ($config_definition['validate'] == 'wpath' || $config_definition['validate'] == 'rwpath' || $config_definition['validate'] === 'absolute_path_writable')
{
if (file_exists($phpbb_root_path . $cfg_array[$config_name]) && !phpbb_is_writable($phpbb_root_path . $cfg_array[$config_name]))
if (file_exists($path) && !phpbb_is_writable($path))
{
$error[] = sprintf($user->lang['DIRECTORY_NOT_WRITABLE'], $cfg_array[$config_name]);
}

View File

@@ -500,7 +500,7 @@ function filelist($rootdir, $dir = '', $type = 'gif|jpg|jpeg|png')
*/
function move_topics($topic_ids, $forum_id, $auto_sync = true)
{
global $db;
global $db, $phpbb_dispatcher;
if (empty($topic_ids))
{
@@ -534,6 +534,27 @@ function move_topics($topic_ids, $forum_id, $auto_sync = true)
}
$table_ary = array(TOPICS_TABLE, POSTS_TABLE, LOG_TABLE, DRAFTS_TABLE, TOPICS_TRACK_TABLE);
/**
* Perform additional actions before topics move
*
* @event core.move_topics_before_query
* @var array table_ary Array of tables from which forum_id will be updated for all rows that hold the moved topics
* @var array topic_ids Array of the moved topic ids
* @var string forum_id The forum id from where the topics are moved
* @var array forum_ids Array of the forums where the topics are moving (includes also forum_id)
* @var bool auto_sync Whether or not to perform auto sync
* @since 3.1.5-RC1
*/
$vars = array(
'table_ary',
'topic_ids',
'forum_id',
'forum_ids',
'auto_sync',
);
extract($phpbb_dispatcher->trigger_event('core.move_topics_before_query', compact($vars)));
foreach ($table_ary as $table)
{
$sql = "UPDATE $table
@@ -618,7 +639,7 @@ function move_posts($post_ids, $topic_id, $auto_sync = true)
*/
function delete_topics($where_type, $where_ids, $auto_sync = true, $post_count_sync = true, $call_delete_posts = true)
{
global $db, $config, $phpbb_container;
global $db, $config, $phpbb_container, $phpbb_dispatcher;
$approved_topics = 0;
$forum_ids = $topic_ids = array();
@@ -672,6 +693,20 @@ function delete_topics($where_type, $where_ids, $auto_sync = true, $post_count_s
$table_ary = array(BOOKMARKS_TABLE, TOPICS_TRACK_TABLE, TOPICS_POSTED_TABLE, POLL_VOTES_TABLE, POLL_OPTIONS_TABLE, TOPICS_WATCH_TABLE, TOPICS_TABLE);
/**
* Perform additional actions before topic(s) deletion
*
* @event core.delete_topics_before_query
* @var array table_ary Array of tables from which all rows will be deleted that hold a topic_id occuring in topic_ids
* @var array topic_ids Array of topic ids to delete
* @since 3.1.4-RC1
*/
$vars = array(
'table_ary',
'topic_ids',
);
extract($phpbb_dispatcher->trigger_event('core.delete_topics_before_query', compact($vars)));
foreach ($table_ary as $table)
{
$sql = "DELETE FROM $table
@@ -680,6 +715,18 @@ function delete_topics($where_type, $where_ids, $auto_sync = true, $post_count_s
}
unset($table_ary);
/**
* Perform additional actions after topic(s) deletion
*
* @event core.delete_topics_after_query
* @var array topic_ids Array of topic ids that were deleted
* @since 3.1.4-RC1
*/
$vars = array(
'topic_ids',
);
extract($phpbb_dispatcher->trigger_event('core.delete_topics_after_query', compact($vars)));
$moved_topic_ids = array();
// update the other forums
@@ -894,7 +941,7 @@ function delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync =
}
$error = false;
$search = new $search_type($error, $phpbb_root_path, $phpEx, $auth, $config, $db, $user);
$search = new $search_type($error, $phpbb_root_path, $phpEx, $auth, $config, $db, $user, $phpbb_dispatcher);
if ($error)
{
@@ -2311,7 +2358,7 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
*/
function prune($forum_id, $prune_mode, $prune_date, $prune_flags = 0, $auto_sync = true)
{
global $db;
global $db, $phpbb_dispatcher;
if (!is_array($forum_id))
{
@@ -2351,6 +2398,21 @@ function prune($forum_id, $prune_mode, $prune_date, $prune_flags = 0, $auto_sync
$sql_and .= ' AND topic_status = ' . ITEM_MOVED . " AND topic_last_post_time < $prune_date";
}
/**
* Use this event to modify the SQL that selects topics to be pruned
*
* @event core.prune_sql
* @var string forum_id The forum id
* @var string prune_mode The prune mode
* @var string prune_date The prune date
* @var int prune_flags The prune flags
* @var bool auto_sync Whether or not to perform auto sync
* @var string sql_and SQL text appended to where clause
* @since 3.1.3-RC1
*/
$vars = array('forum_id', 'prune_mode', 'prune_date', 'prune_flags', 'auto_sync', 'sql_and');
extract($phpbb_dispatcher->trigger_event('core.prune_sql', compact($vars)));
$sql = 'SELECT topic_id
FROM ' . TOPICS_TABLE . '
WHERE ' . $db->sql_in_set('forum_id', $forum_id) . "
@@ -2512,6 +2574,7 @@ function phpbb_cache_moderators($db, $cache, $auth)
{
$usernames_ary[$row['user_id']] = $row['username'];
}
$db->sql_freeresult($result);
foreach ($hold_ary as $user_id => $forum_id_ary)
{
@@ -2806,6 +2869,7 @@ function view_inactive_users(&$users, &$user_count, $limit = 0, $offset = 0, $li
$users[] = $row;
}
$db->sql_freeresult($result);
return $offset;
}
@@ -2980,68 +3044,21 @@ function get_database_size()
/**
* Retrieve contents from remotely stored file
*
* @deprecated 3.1.2 Use file_downloader instead
*/
function get_remote_file($host, $directory, $filename, &$errstr, &$errno, $port = 80, $timeout = 6)
{
global $user;
global $phpbb_container;
if ($fsock = @fsockopen($host, $port, $errno, $errstr, $timeout))
{
@fputs($fsock, "GET $directory/$filename HTTP/1.0\r\n");
@fputs($fsock, "HOST: $host\r\n");
@fputs($fsock, "Connection: close\r\n\r\n");
// Get file downloader and assign $errstr and $errno
$file_downloader = $phpbb_container->get('file_downloader');
$timer_stop = time() + $timeout;
stream_set_timeout($fsock, $timeout);
$file_data = $file_downloader->get($host, $directory, $filename, $port, $timeout);
$errstr = $file_downloader->get_error_string();
$errno = $file_downloader->get_error_number();
$file_info = '';
$get_info = false;
while (!@feof($fsock))
{
if ($get_info)
{
$file_info .= @fread($fsock, 1024);
}
else
{
$line = @fgets($fsock, 1024);
if ($line == "\r\n")
{
$get_info = true;
}
else if (stripos($line, '404 not found') !== false)
{
$errstr = $user->lang('FILE_NOT_FOUND', $filename);
return false;
}
}
$stream_meta_data = stream_get_meta_data($fsock);
if (!empty($stream_meta_data['timed_out']) || time() >= $timer_stop)
{
$errstr = $user->lang['FSOCK_TIMEOUT'];
return false;
}
}
@fclose($fsock);
}
else
{
if ($errstr)
{
$errstr = utf8_convert_message($errstr);
return false;
}
else
{
$errstr = $user->lang['FSOCK_DISABLED'];
return false;
}
}
return $file_info;
return $file_data;
}
/*

View File

@@ -101,18 +101,21 @@ function phpbb_clean_path($path)
}
else if (!$phpbb_path_helper)
{
global $phpbb_root_path, $phpEx;
// The container is not yet loaded, use a new instance
if (!class_exists('\phpbb\path_helper'))
{
global $phpbb_root_path, $phpEx;
require($phpbb_root_path . 'phpbb/path_helper.' . $phpEx);
}
$request = new phpbb\request\request();
$phpbb_path_helper = new phpbb\path_helper(
new phpbb\symfony_request(
new phpbb\request\request()
$request
),
new phpbb\filesystem(),
$request,
$phpbb_root_path,
$phpEx
);

View File

@@ -78,7 +78,7 @@ function gen_sort_selects(&$limit_days, &$sort_by_text, &$sort_days, &$sort_key,
foreach ($sorts as $name => $sort_ary)
{
$key = $sort_ary['key'];
$selected = $$sort_ary['key'];
$selected = ${$sort_ary['key']};
// Check if the key is selectable. If not, we reset to the default or first key found.
// This ensures the values are always valid. We also set $sort_dir/sort_key/etc. to the
@@ -87,12 +87,12 @@ function gen_sort_selects(&$limit_days, &$sort_by_text, &$sort_days, &$sort_key,
{
if ($sort_ary['default'] !== false)
{
$selected = $$key = $sort_ary['default'];
$selected = ${$key} = $sort_ary['default'];
}
else
{
@reset($sort_ary['options']);
$selected = $$key = key($sort_ary['options']);
$selected = ${$key} = key($sort_ary['options']);
}
}
@@ -712,7 +712,7 @@ function make_clickable_callback($type, $whitespace, $url, $relative_url, $class
break;
}
$short_url = (strlen($url) > 55) ? substr($url, 0, 39) . ' ... ' . substr($url, -10) : $url;
$short_url = (utf8_strlen($url) > 55) ? utf8_substr($url, 0, 39) . ' ... ' . utf8_substr($url, -10) : $url;
switch ($type)
{
@@ -788,28 +788,28 @@ function make_clickable($text, $server_url = false, $class = 'postlink')
// relative urls for this board
$magic_url_match_args[$server_url][] = array(
'#(^|[\n\t (>.])(' . preg_quote($server_url, '#') . ')/(' . get_preg_expression('relative_url_inline') . ')#i',
'#(^|[\n\t (>.])(' . preg_quote($server_url, '#') . ')/(' . get_preg_expression('relative_url_inline') . ')#iu',
MAGIC_URL_LOCAL,
$local_class,
);
// matches a xxxx://aaaaa.bbb.cccc. ...
$magic_url_match_args[$server_url][] = array(
'#(^|[\n\t (>.])(' . get_preg_expression('url_inline') . ')#i',
'#(^|[\n\t (>.])(' . get_preg_expression('url_inline') . ')#iu',
MAGIC_URL_FULL,
$class,
);
// matches a "www.xxxx.yyyy[/zzzz]" kinda lazy URL thing
$magic_url_match_args[$server_url][] = array(
'#(^|[\n\t (>])(' . get_preg_expression('www_url_inline') . ')#i',
'#(^|[\n\t (>])(' . get_preg_expression('www_url_inline') . ')#iu',
MAGIC_URL_WWW,
$class,
);
// matches an email@domain type address at the start of a line, or after a space or after what might be a BBCode.
$magic_url_match_args[$server_url][] = array(
'/(^|[\n\t (>])(' . get_preg_expression('email') . ')/i',
'/(^|[\n\t (>])(' . get_preg_expression('email') . ')/iu',
MAGIC_URL_EMAIL,
'',
);

View File

@@ -2148,6 +2148,7 @@ function fix_empty_primary_groups()
}
$sql = 'SELECT user_id FROM ' . USER_GROUP_TABLE . ' WHERE group_id = ' . get_group_id('global_moderators');
$result = $db->sql_query($sql);
$user_ids = array();
while ($row = $db->sql_fetchrow($result))

View File

@@ -150,7 +150,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
$sql = $db->sql_build_query('SELECT', $sql_ary);
$result = $db->sql_query($sql);
$forum_tracking_info = array();
$forum_tracking_info = $valid_categories = array();
$branch_root_id = $root_data['forum_id'];
$phpbb_content_visibility = $phpbb_container->get('content.visibility');
@@ -250,6 +250,12 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
}
}
// Fill list of categories with forums
if (isset($forum_rows[$row['parent_id']]))
{
$valid_categories[$row['parent_id']] = true;
}
//
if ($row['parent_id'] == $root_data['forum_id'] || $row['parent_id'] == $branch_root_id)
{
@@ -267,6 +273,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
$branch_root_id = $forum_id;
}
$forum_rows[$parent_id]['forum_id_last_post'] = $row['forum_id'];
$forum_rows[$parent_id]['forum_password_last_post'] = $row['forum_password'];
$forum_rows[$parent_id]['orig_forum_last_post_time'] = $row['forum_last_post_time'];
}
else if ($row['forum_type'] != FORUM_CAT)
@@ -308,6 +315,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
$forum_rows[$parent_id]['forum_last_poster_name'] = $row['forum_last_poster_name'];
$forum_rows[$parent_id]['forum_last_poster_colour'] = $row['forum_last_poster_colour'];
$forum_rows[$parent_id]['forum_id_last_post'] = $forum_id;
$forum_rows[$parent_id]['forum_password_last_post'] = $row['forum_password'];
}
}
@@ -375,6 +383,28 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
get_moderators($forum_moderators, $forum_ids_moderator);
}
/**
* Event to perform additional actions before the forum list is being generated
*
* @event core.display_forums_before
* @var array active_forum_ary Array with forum data to display active topics
* @var bool display_moderators Flag indicating if we display forum moderators
* @var array forum_moderators Array with forum moderators list
* @var array forum_rows Data array of all forums we display
* @var bool return_moderators Flag indicating if moderators list should be returned
* @var array root_data Array with the root forum data
* @since 3.1.4-RC1
*/
$vars = array(
'active_forum_ary',
'display_moderators',
'forum_moderators',
'forum_rows',
'return_moderators',
'root_data',
);
extract($phpbb_dispatcher->trigger_event('core.display_forums_before', compact($vars)));
// Used to tell whatever we have to create a dummy category or not.
$last_catless = true;
foreach ($forum_rows as $row)
@@ -382,6 +412,12 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
// Category
if ($row['parent_id'] == $root_data['forum_id'] && $row['forum_type'] == FORUM_CAT)
{
// Do not display categories without any forums to display
if (!isset($valid_categories[$row['forum_id']]))
{
continue;
}
$cat_row = array(
'S_IS_CAT' => true,
'FORUM_ID' => $row['forum_id'],
@@ -500,8 +536,15 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
// Create last post link information, if appropriate
if ($row['forum_last_post_id'])
{
$last_post_subject = $row['forum_last_post_subject'];
$last_post_subject_truncated = truncate_string(censor_text($last_post_subject), 30, 255, false, $user->lang['ELLIPSIS']);
if ($row['forum_password_last_post'] === '' && $auth->acl_get('f_read', $row['forum_id_last_post']))
{
$last_post_subject = censor_text($row['forum_last_post_subject']);
$last_post_subject_truncated = truncate_string($last_post_subject, 30, 255, false, $user->lang['ELLIPSIS']);
}
else
{
$last_post_subject = $last_post_subject_truncated = '';
}
$last_post_time = $user->format_date($row['forum_last_post_time']);
$last_post_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id_last_post'] . '&amp;p=' . $row['forum_last_post_id']) . '#p' . $row['forum_last_post_id'];
}
@@ -561,7 +604,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
'S_LOCKED_FORUM' => ($row['forum_status'] == ITEM_LOCKED) ? true : false,
'S_LIST_SUBFORUMS' => ($row['display_subforum_list']) ? true : false,
'S_SUBFORUMS' => (sizeof($subforums_list)) ? true : false,
'S_DISPLAY_SUBJECT' => ($last_post_subject && $config['display_last_subject'] && !$row['forum_password'] && $auth->acl_get('f_read', $row['forum_id'])) ? true : false,
'S_DISPLAY_SUBJECT' => ($last_post_subject !== '' && $config['display_last_subject']) ? true : false,
'S_FEED_ENABLED' => ($config['feed_forum'] && !phpbb_optionget(FORUM_OPTION_FEED_EXCLUDE, $row['forum_options']) && $row['forum_type'] == FORUM_POST) ? true : false,
'FORUM_ID' => $row['forum_id'],
@@ -574,8 +617,8 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
'FORUM_FOLDER_IMG_ALT' => isset($user->lang[$folder_alt]) ? $user->lang[$folder_alt] : '',
'FORUM_IMAGE' => ($row['forum_image']) ? '<img src="' . $phpbb_root_path . $row['forum_image'] . '" alt="' . $user->lang[$folder_alt] . '" />' : '',
'FORUM_IMAGE_SRC' => ($row['forum_image']) ? $phpbb_root_path . $row['forum_image'] : '',
'LAST_POST_SUBJECT' => (!$row['forum_password'] && $auth->acl_get('f_read', $row['forum_id'])) ? censor_text($last_post_subject) : "",
'LAST_POST_SUBJECT_TRUNCATED' => (!$row['forum_password'] && $auth->acl_get('f_read', $row['forum_id'])) ? $last_post_subject_truncated : "",
'LAST_POST_SUBJECT' => $last_post_subject,
'LAST_POST_SUBJECT_TRUNCATED' => $last_post_subject_truncated,
'LAST_POST_TIME' => $last_post_time,
'LAST_POSTER' => get_username_string('username', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']),
'LAST_POSTER_COLOUR' => get_username_string('colour', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']),
@@ -710,13 +753,15 @@ function generate_forum_rules(&$forum_data)
function generate_forum_nav(&$forum_data)
{
global $db, $user, $template, $auth, $config;
global $phpEx, $phpbb_root_path;
global $phpEx, $phpbb_root_path, $phpbb_dispatcher;
if (!$auth->acl_get('f_list', $forum_data['forum_id']))
{
return;
}
$navlinks = $navlinks_parents = $forum_template_data = array();
// Get forum parents
$forum_parents = get_forum_parents($forum_data);
@@ -735,35 +780,59 @@ function generate_forum_nav(&$forum_data)
continue;
}
$template->assign_block_vars('navlinks', array(
$navlinks_parents[] = array(
'S_IS_CAT' => ($parent_type == FORUM_CAT) ? true : false,
'S_IS_LINK' => ($parent_type == FORUM_LINK) ? true : false,
'S_IS_POST' => ($parent_type == FORUM_POST) ? true : false,
'FORUM_NAME' => $parent_name,
'FORUM_ID' => $parent_forum_id,
'MICRODATA' => $microdata_attr . '="' . $parent_forum_id . '"',
'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $parent_forum_id))
'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $parent_forum_id),
);
}
}
$template->assign_block_vars('navlinks', array(
$navlinks = array(
'S_IS_CAT' => ($forum_data['forum_type'] == FORUM_CAT) ? true : false,
'S_IS_LINK' => ($forum_data['forum_type'] == FORUM_LINK) ? true : false,
'S_IS_POST' => ($forum_data['forum_type'] == FORUM_POST) ? true : false,
'FORUM_NAME' => $forum_data['forum_name'],
'FORUM_ID' => $forum_data['forum_id'],
'MICRODATA' => $microdata_attr . '="' . $forum_data['forum_id'] . '"',
'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_data['forum_id']))
'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_data['forum_id']),
);
$template->assign_vars(array(
$forum_template_data = array(
'FORUM_ID' => $forum_data['forum_id'],
'FORUM_NAME' => $forum_data['forum_name'],
'FORUM_DESC' => generate_text_for_display($forum_data['forum_desc'], $forum_data['forum_desc_uid'], $forum_data['forum_desc_bitfield'], $forum_data['forum_desc_options']),
'S_ENABLE_FEEDS_FORUM' => ($config['feed_forum'] && $forum_data['forum_type'] == FORUM_POST && !phpbb_optionget(FORUM_OPTION_FEED_EXCLUDE, $forum_data['forum_options'])) ? true : false,
));
);
/**
* Event to modify the navlinks text
*
* @event core.generate_forum_nav
* @var array forum_data Array with the forum data
* @var array forum_template_data Array with generic forum template data
* @var string microdata_attr The microdata attribute
* @var array navlinks_parents Array with the forum parents navlinks data
* @var array navlinks Array with the forum navlinks data
* @since 3.1.5-RC1
*/
$vars = array(
'forum_data',
'forum_template_data',
'microdata_attr',
'navlinks_parents',
'navlinks',
);
extract($phpbb_dispatcher->trigger_event('core.generate_forum_nav', compact($vars)));
$template->assign_block_vars_array('navlinks', $navlinks_parents);
$template->assign_block_vars('navlinks', $navlinks);
$template->assign_vars($forum_template_data);
return;
}
@@ -1491,7 +1560,7 @@ function phpbb_get_user_rank($user_data, $user_posts)
/**
* Prepare profile data
*/
function phpbb_show_profile($data, $user_notes_enabled = false, $warn_user_enabled = false)
function phpbb_show_profile($data, $user_notes_enabled = false, $warn_user_enabled = false, $check_can_receive_pm = true)
{
global $config, $auth, $user, $phpEx, $phpbb_root_path, $phpbb_dispatcher;
@@ -1559,7 +1628,7 @@ function phpbb_show_profile($data, $user_notes_enabled = false, $warn_user_enabl
}
// Can this user receive a Private Message?
$can_receive_pm = (
$can_receive_pm = $check_can_receive_pm && (
// They must be a "normal" user
$data['user_type'] != USER_IGNORE &&
@@ -1608,8 +1677,8 @@ function phpbb_show_profile($data, $user_notes_enabled = false, $warn_user_enabl
'U_EMAIL' => $email,
'U_JABBER' => ($data['user_jabber'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&amp;action=jabber&amp;u=' . $user_id) : '',
'USER_JABBER' => $data['user_jabber'],
'USER_JABBER_IMG' => ($data['user_jabber']) ? $user->img('icon_contact_jabber', $data['user_jabber']) : '',
'USER_JABBER' => ($config['jab_enable']) ? $data['user_jabber'] : '',
'USER_JABBER_IMG' => ($config['jab_enable'] && $data['user_jabber']) ? $user->img('icon_contact_jabber', $data['user_jabber']) : '',
'L_SEND_EMAIL_USER' => $user->lang('SEND_EMAIL_USER', $username),
'L_CONTACT_USER' => $user->lang('CONTACT_USER', $username),

View File

@@ -210,11 +210,6 @@ function send_file_to_browser($attachment, $upload_dir, $category)
}
}
if ($size)
{
header("Content-Length: $size");
}
// Close the db connection before sending the file etc.
file_gc(false);
@@ -238,6 +233,11 @@ function send_file_to_browser($attachment, $upload_dir, $category)
exit;
}
if ($size)
{
header("Content-Length: $size");
}
// Try to deliver in chunks
@set_time_limit(0);

View File

@@ -368,7 +368,7 @@ function phpbb_get_pm_data($pm_ids)
*/
function phpbb_mcp_sorting($mode, &$sort_days, &$sort_key, &$sort_dir, &$sort_by_sql, &$sort_order_sql, &$total, $forum_id = 0, $topic_id = 0, $where_sql = 'WHERE')
{
global $db, $user, $auth, $template;
global $db, $user, $auth, $template, $phpbb_dispatcher;
$sort_days = request_var('st', 0);
$min_time = ($sort_days) ? time() - ($sort_days * 86400) : 0;
@@ -553,6 +553,56 @@ function phpbb_mcp_sorting($mode, &$sort_days, &$sort_key, &$sort_dir, &$sort_by
break;
}
// Default total to -1 to allow editing by the event
$total = -1;
/**
* This event allows you to control the SQL query used to get the total number
* of reports the user can access.
*
* This total is used for the pagination and for displaying the total number
* of reports to the user
*
*
* @event core.mcp_sorting_query_before
* @var string sql The current SQL search string
* @var string mode An id related to the module(s) the user is viewing
* @var string type Which kind of information is this being used for displaying. Posts, topics, etc...
* @var int forum_id The forum id of the posts the user is trying to access, if not 0
* @var int topic_id The topic id of the posts the user is trying to access, if not 0
* @var int sort_days The max age of the oldest report to be shown, in days
* @var string sort_key The way the user has decided to sort the data.
* The valid values must be in the keys of the sort_by_* variables
* @var string sort_dir Either 'd' for "DESC" or 'a' for 'ASC' in the SQL query
* @var int limit_days The possible max ages of the oldest report for the user to choose, in days.
* @var array sort_by_sql SQL text (values) for the possible names of the ways of sorting data (keys).
* @var array sort_by_text Language text (values) for the possible names of the ways of sorting data (keys).
* @var int min_time Integer with the minimum post time that the user is searching for
* @var int limit_time_sql Time limiting options used in the SQL query.
* @var int total The total number of reports that exist. Only set if you want to override the result
* @var string where_sql Extra information included in the WHERE clause. It must end with "WHERE" or "AND" or "OR".
* Set to "WHERE" and set total above -1 to override the total value
* @since 3.1.4-RC1
*/
$vars = array(
'sql',
'mode',
'type',
'forum_id',
'topic_id',
'sort_days',
'sort_key',
'sort_dir',
'limit_days',
'sort_by_sql',
'sort_by_text',
'min_time',
'limit_time_sql',
'total',
'where_sql',
);
extract($phpbb_dispatcher->trigger_event('core.mcp_sorting_query_before', compact($vars)));
if (!isset($sort_by_sql[$sort_key]))
{
$sort_key = $default_key;
@@ -584,7 +634,7 @@ function phpbb_mcp_sorting($mode, &$sort_days, &$sort_key, &$sort_dir, &$sort_by
$total = (int) $db->sql_fetchfield('total');
$db->sql_freeresult($result);
}
else
else if ($total < -1)
{
$total = -1;
}

View File

@@ -510,7 +510,7 @@ class messenger
foreach ($address_ary as $which_ary)
{
$$type .= (($$type != '') ? ', ' : '') . (($which_ary['name'] != '') ? mail_encode($which_ary['name'], $encode_eol) . ' <' . $which_ary['email'] . '>' : $which_ary['email']);
${$type} .= ((${$type} != '') ? ', ' : '') . (($which_ary['name'] != '') ? mail_encode($which_ary['name'], $encode_eol) . ' <' . $which_ary['email'] . '>' : $which_ary['email']);
}
}

View File

@@ -976,7 +976,7 @@ class p_master
*
* @param string $class module class (acp/mcp/ucp)
* @param string $name module name (class name of the module, or its basename
* phpbb_ext_foo_acp_bar_module, ucp_zebra or zebra)
* phpbb_ext_foo_acp_bar_module, ucp_zebra or zebra)
* @param string $mode mode, as passed through to the module
*
*/
@@ -1086,7 +1086,7 @@ class p_master
->core_path('language/' . $user->lang_name . '/mods/')
->find();
$lang_files = array_unique(array_merge($user_lang_files, $english_lang_files, $default_lang_files));
$lang_files = array_merge($english_lang_files, $default_lang_files, $user_lang_files);
foreach ($lang_files as $lang_file => $ext_name)
{
$user->add_lang_ext($ext_name, $lang_file);

View File

@@ -1036,8 +1036,8 @@ function load_drafts($topic_id = 0, $forum_id = 0, $id = 0, $pm_action = '', $ms
*/
function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id = 0, $show_quote_button = true)
{
global $user, $auth, $db, $template, $bbcode, $cache;
global $config, $phpbb_root_path, $phpEx, $phpbb_container;
global $user, $auth, $db, $template, $cache;
global $config, $phpbb_root_path, $phpEx, $phpbb_container, $phpbb_dispatcher;
$phpbb_content_visibility = $phpbb_container->get('content.visibility');
$sql_sort = ($mode == 'post_review') ? 'ASC' : 'DESC';
@@ -1094,13 +1094,11 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id
$sql = $db->sql_build_query('SELECT', $sql_ary);
$result = $db->sql_query($sql);
$bbcode_bitfield = '';
$rowset = array();
$has_attachments = false;
while ($row = $db->sql_fetchrow($result))
{
$rowset[$row['post_id']] = $row;
$bbcode_bitfield = $bbcode_bitfield | base64_decode($row['bbcode_bitfield']);
if ($row['post_attachment'])
{
@@ -1109,13 +1107,6 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id
}
$db->sql_freeresult($result);
// Instantiate BBCode class
if (!isset($bbcode) && $bbcode_bitfield !== '')
{
include_once($phpbb_root_path . 'includes/bbcode.' . $phpEx);
$bbcode = new bbcode(base64_encode($bbcode_bitfield));
}
// Grab extensions
$extensions = $attachments = array();
if ($has_attachments && $auth->acl_get('u_download') && $auth->acl_get('f_download', $forum_id))
@@ -1176,7 +1167,7 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id
$post_anchor = ($mode == 'post_review') ? 'ppr' . $row['post_id'] : 'pr' . $row['post_id'];
$u_show_post = append_sid($phpbb_root_path . 'viewtopic.' . $phpEx, "f=$forum_id&amp;t=$topic_id&amp;p={$row['post_id']}&amp;view=show#p{$row['post_id']}");
$template->assign_block_vars($mode . '_row', array(
$post_row = array(
'POST_AUTHOR_FULL' => get_username_string('full', $poster_id, $row['username'], $row['user_colour'], $row['post_username']),
'POST_AUTHOR_COLOUR' => get_username_string('colour', $poster_id, $row['username'], $row['user_colour'], $row['post_username']),
'POST_AUTHOR' => get_username_string('username', $poster_id, $row['username'], $row['user_colour'], $row['post_username']),
@@ -1195,9 +1186,37 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id
'POST_ID' => $row['post_id'],
'U_MINI_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'p=' . $row['post_id']) . '#p' . $row['post_id'],
'U_MCP_DETAILS' => ($auth->acl_get('m_info', $forum_id)) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=main&amp;mode=post_details&amp;f=' . $forum_id . '&amp;p=' . $row['post_id'], true, $user->session_id) : '',
'POSTER_QUOTE' => ($show_quote_button && $auth->acl_get('f_reply', $forum_id)) ? addslashes(get_username_string('username', $poster_id, $row['username'], $row['user_colour'], $row['post_username'])) : '')
'POSTER_QUOTE' => ($show_quote_button && $auth->acl_get('f_reply', $forum_id)) ? addslashes(get_username_string('username', $poster_id, $row['username'], $row['user_colour'], $row['post_username'])) : '',
);
$current_row_number = $i;
/**
* Event to modify the template data block for topic reviews
*
* @event core.topic_review_modify_row
* @var string mode The review mode
* @var int topic_id The topic that is being reviewed
* @var int forum_id The topic's forum
* @var int cur_post_id Post offset id
* @var int current_row_number Number of the current row being iterated
* @var array post_row Template block array of the current post
* @var array row Array with original post and user data
* @since 3.1.4-RC1
*/
$vars = array(
'mode',
'topic_id',
'forum_id',
'cur_post_id',
'current_row_number',
'post_row',
'row',
);
extract($phpbb_dispatcher->trigger_event('core.topic_review_modify_row', compact($vars)));
$template->assign_block_vars($mode . '_row', $post_row);
// Display not already displayed Attachments for this post, we already parsed them. ;)
if (!empty($attachments[$row['post_id']]))
{
@@ -1825,6 +1844,30 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
break;
}
/**
* Modify sql query data for post submitting
*
* @event core.submit_post_modify_sql_data
* @var array data Array with the data for the post
* @var array poll Array with the poll data for the post
* @var string post_mode Variable containing posting mode value
* @var bool sql_data Array with the data for the posting SQL query
* @var string subject Variable containing post subject value
* @var int topic_type Variable containing topic type value
* @var string username Variable containing post author name
* @since 3.1.3-RC1
*/
$vars = array(
'data',
'poll',
'post_mode',
'sql_data',
'subject',
'topic_type',
'username',
);
extract($phpbb_dispatcher->trigger_event('core.submit_post_modify_sql_data', compact($vars)));
// Submit new topic
if ($post_mode == 'post')
{
@@ -2166,7 +2209,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
}
$error = false;
$search = new $search_type($error, $phpbb_root_path, $phpEx, $auth, $config, $db, $user);
$search = new $search_type($error, $phpbb_root_path, $phpEx, $auth, $config, $db, $user, $phpbb_dispatcher);
if ($error)
{
@@ -2384,6 +2427,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
* @var int topic_type Variable containing topic type value
* @var array poll Array with the poll data for the post
* @var array data Array with the data for the post
* @var int post_visibility Variable containing up to date post visibility
* @var bool update_message Flag indicating if the post will be updated
* @var bool update_search_index Flag indicating if the search index will be updated
* @var string url The "Return to topic" URL
@@ -2399,6 +2443,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
'topic_type',
'poll',
'data',
'post_visibility',
'update_message',
'update_search_index',
'url',

View File

@@ -914,6 +914,24 @@ function update_unread_status($unread, $msg_id, $user_id, $folder_id)
}
}
function mark_folder_read($user_id, $folder_id)
{
global $db;
$sql = 'SELECT msg_id
FROM ' . PRIVMSGS_TO_TABLE . '
WHERE folder_id = ' . ((int) $folder_id) . '
AND user_id = ' . ((int) $user_id) . '
AND pm_unread = 1';
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
update_unread_status(true, $row['msg_id'], $user_id, $folder_id);
}
$db->sql_freeresult($result);
}
/**
* Handle all actions possible with marked messages
*/
@@ -1397,9 +1415,9 @@ function rebuild_header($check_ary)
$_types = array('u', 'g');
foreach ($_types as $type)
{
if (sizeof($$type))
if (sizeof(${$type}))
{
foreach ($$type as $id)
foreach (${$type} as $id)
{
$address[$type][$id] = $check_type;
}
@@ -1939,7 +1957,7 @@ function submit_pm($mode, $subject, &$data, $put_in_outbox = true)
*/
function message_history($msg_id, $user_id, $message_row, $folder, $in_post_mode = false)
{
global $db, $user, $config, $template, $phpbb_root_path, $phpEx, $auth, $bbcode;
global $db, $user, $config, $template, $phpbb_root_path, $phpEx, $auth;
// Select all receipts and the author from the pm we currently view, to only display their pm-history
$sql = 'SELECT author_id, user_id
@@ -1991,7 +2009,6 @@ function message_history($msg_id, $user_id, $message_row, $folder, $in_post_mode
$title = $row['message_subject'];
$rowset = array();
$bbcode_bitfield = '';
$folder_url = append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm') . '&amp;folder=';
do
@@ -2007,7 +2024,6 @@ function message_history($msg_id, $user_id, $message_row, $folder, $in_post_mode
else
{
$rowset[$row['msg_id']] = $row;
$bbcode_bitfield = $bbcode_bitfield | base64_decode($row['bbcode_bitfield']);
}
}
while ($row = $db->sql_fetchrow($result));
@@ -2018,16 +2034,6 @@ function message_history($msg_id, $user_id, $message_row, $folder, $in_post_mode
return false;
}
// Instantiate BBCode class
if ((empty($bbcode) || $bbcode === false) && $bbcode_bitfield !== '')
{
if (!class_exists('bbcode'))
{
include($phpbb_root_path . 'includes/bbcode.' . $phpEx);
}
$bbcode = new bbcode(base64_encode($bbcode_bitfield));
}
$title = censor_text($title);
$url = append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm');

View File

@@ -213,6 +213,8 @@ class filespec
*/
static public function get_extension($filename)
{
$filename = utf8_basename($filename);
if (strpos($filename, '.') === false)
{
return '';

View File

@@ -44,13 +44,13 @@ function user_get_id_name(&$user_id_ary, &$username_ary, $user_type = false)
$which_ary = ($user_id_ary) ? 'user_id_ary' : 'username_ary';
if ($$which_ary && !is_array($$which_ary))
if (${$which_ary} && !is_array(${$which_ary}))
{
$$which_ary = array($$which_ary);
${$which_ary} = array(${$which_ary});
}
$sql_in = ($which_ary == 'user_id_ary') ? array_map('intval', $$which_ary) : array_map('utf8_clean_string', $$which_ary);
unset($$which_ary);
$sql_in = ($which_ary == 'user_id_ary') ? array_map('intval', ${$which_ary}) : array_map('utf8_clean_string', ${$which_ary});
unset(${$which_ary});
$user_id_ary = $username_ary = array();
@@ -161,9 +161,10 @@ function user_update_name($old_name, $new_name)
*
* @param mixed $user_row An array containing the following keys (and the appropriate values): username, group_id (the group to place the user in), user_email and the user_type(usually 0). Additional entries not overridden by defaults will be forwarded.
* @param string $cp_data custom profile fields, see custom_profile::build_insert_sql_array
* @param array $notifications_data The notifications settings for the new user
* @return the new user's ID.
*/
function user_add($user_row, $cp_data = false)
function user_add($user_row, $cp_data = false, $notifications_data = null)
{
global $db, $user, $auth, $config, $phpbb_root_path, $phpEx;
global $phpbb_dispatcher, $phpbb_container;
@@ -347,6 +348,31 @@ function user_add($user_row, $cp_data = false)
set_config('newest_user_colour', $row['group_colour'], true);
}
// Use default notifications settings if notifications_data is not set
if ($notifications_data === null)
{
$notifications_data = array(
array(
'item_type' => 'notification.type.post',
'method' => 'notification.method.email',
),
array(
'item_type' => 'notification.type.topic',
'method' => 'notification.method.email',
),
);
}
// Subscribe user to notifications if necessary
if (!empty($notifications_data))
{
$phpbb_notifications = $phpbb_container->get('notification_manager');
foreach ($notifications_data as $subscription)
{
$phpbb_notifications->add_subscription($subscription['item_type'], 0, $subscription['method'], $user_id);
}
}
/**
* Event that returns user id, user detals and user CPF of newly registared user
*
@@ -372,7 +398,7 @@ function user_add($user_row, $cp_data = false)
*/
function user_delete($mode, $user_ids, $retain_username = true)
{
global $cache, $config, $db, $user, $phpbb_dispatcher;
global $cache, $config, $db, $user, $phpbb_dispatcher, $phpbb_container;
global $phpbb_root_path, $phpEx;
$db->sql_transaction('begin');
@@ -474,6 +500,9 @@ function user_delete($mode, $user_ids, $retain_username = true)
$num_users_delta = 0;
// Get auth provider collection in case accounts might need to be unlinked
$provider_collection = $phpbb_container->get('auth.provider_collection');
// Some things need to be done in the loop (if the query changes based
// on which user is currently being deleted)
$added_guest_posts = 0;
@@ -484,6 +513,38 @@ function user_delete($mode, $user_ids, $retain_username = true)
avatar_delete('user', $user_row);
}
// Unlink accounts
foreach ($provider_collection as $provider_name => $auth_provider)
{
$provider_data = $auth_provider->get_auth_link_data($user_id);
if ($provider_data !== null)
{
$link_data = array(
'user_id' => $user_id,
'link_method' => 'user_delete',
);
// BLOCK_VARS might contain hidden fields necessary for unlinking accounts
if (isset($provider_data['BLOCK_VARS']) && is_array($provider_data['BLOCK_VARS']))
{
foreach ($provider_data['BLOCK_VARS'] as $provider_service)
{
if (!array_key_exists('HIDDEN_FIELDS', $provider_service))
{
$provider_service['HIDDEN_FIELDS'] = array();
}
$auth_provider->unlink_account(array_merge($link_data, $provider_service['HIDDEN_FIELDS']));
}
}
else
{
$auth_provider->unlink_account($link_data);
}
}
}
// Decrement number of users if this user is active
if ($user_row['user_type'] != USER_INACTIVE && $user_row['user_type'] != USER_IGNORE)
{
@@ -646,6 +707,9 @@ function user_delete($mode, $user_ids, $retain_username = true)
}
phpbb_delete_users_pms($user_ids);
$phpbb_notifications = $phpbb_container->get('notification_manager');
$phpbb_notifications->delete_notifications('notification.type.admin_activate_user', $user_ids);
$db->sql_transaction('commit');
/**
@@ -677,7 +741,7 @@ function user_delete($mode, $user_ids, $retain_username = true)
*/
function user_active_flip($mode, $user_id_ary, $reason = INACTIVE_MANUAL)
{
global $config, $db, $user, $auth;
global $config, $db, $user, $auth, $phpbb_dispatcher;
$deactivated = $activated = 0;
$sql_statements = array();
@@ -730,6 +794,21 @@ function user_active_flip($mode, $user_id_ary, $reason = INACTIVE_MANUAL)
}
$db->sql_freeresult($result);
/**
* Check or modify activated/deactivated users data before submitting it to the database
*
* @event core.user_active_flip_before
* @var string mode User type changing mode, can be: flip|activate|deactivate
* @var int reason Reason for changing user type, can be: INACTIVE_REGISTER|INACTIVE_PROFILE|INACTIVE_MANUAL|INACTIVE_REMIND
* @var int activated The number of users to be activated
* @var int deactivated The number of users to be deactivated
* @var array user_id_ary Array with user ids to change user type
* @var array sql_statements Array with users data to submit to the database, keys: user ids, values: arrays with user data
* @since 3.1.4-RC1
*/
$vars = array('mode', 'reason', 'activated', 'deactivated', 'user_id_ary', 'sql_statements');
extract($phpbb_dispatcher->trigger_event('core.user_active_flip_before', compact($vars)));
if (sizeof($sql_statements))
{
foreach ($sql_statements as $user_id => $sql_ary)
@@ -743,6 +822,21 @@ function user_active_flip($mode, $user_id_ary, $reason = INACTIVE_MANUAL)
$auth->acl_clear_prefetch(array_keys($sql_statements));
}
/**
* Perform additional actions after the users have been activated/deactivated
*
* @event core.user_active_flip_after
* @var string mode User type changing mode, can be: flip|activate|deactivate
* @var int reason Reason for changing user type, can be: INACTIVE_REGISTER|INACTIVE_PROFILE|INACTIVE_MANUAL|INACTIVE_REMIND
* @var int activated The number of users to be activated
* @var int deactivated The number of users to be deactivated
* @var array user_id_ary Array with user ids to change user type
* @var array sql_statements Array with users data to submit to the database, keys: user ids, values: arrays with user data
* @since 3.1.4-RC1
*/
$vars = array('mode', 'reason', 'activated', 'deactivated', 'user_id_ary', 'sql_statements');
extract($phpbb_dispatcher->trigger_event('core.user_active_flip_after', compact($vars)));
if ($deactivated)
{
set_config_count('num_users', $deactivated * (-1), true);

View File

@@ -165,6 +165,22 @@ function mcp_forum_view($id, $mode, $action, $forum_info)
AND ' . $phpbb_content_visibility->get_visibility_sql('topic', $forum_id, 't.') . "
$limit_time_sql
ORDER BY t.topic_type DESC, $sort_order_sql";
/**
* Modify SQL query before MCP forum view topic list is queried
*
* @event core.mcp_view_forum_modify_sql
* @var string sql SQL query for forum view topic list
* @var int forum_id ID of the forum
* @var string limit_time_sql SQL query part for limit time
* @var string sort_order_sql SQL query part for sort order
* @var int topics_per_page Number of topics per page
* @var int start Start value
* @since 3.1.2-RC1
*/
$vars = array('sql', 'forum_id', 'limit_time_sql', 'sort_order_sql', 'topics_per_page', 'start');
extract($phpbb_dispatcher->trigger_event('core.mcp_view_forum_modify_sql', compact($vars)));
$result = $db->sql_query_limit($sql, $topics_per_page, $start);
$topic_list = $topic_tracking_info = array();

View File

@@ -41,10 +41,27 @@ function mcp_front_view($id, $mode, $action)
if (!empty($forum_list))
{
$sql = 'SELECT COUNT(post_id) AS total
FROM ' . POSTS_TABLE . '
WHERE ' . $db->sql_in_set('forum_id', $forum_list) . '
AND ' . $db->sql_in_set('post_visibility', array(ITEM_UNAPPROVED, ITEM_REAPPROVE));
$sql_ary = array(
'SELECT' => 'COUNT(post_id) AS total',
'FROM' => array(
POSTS_TABLE => 'p',
),
'WHERE' => $db->sql_in_set('p.forum_id', $forum_list) . '
AND ' . $db->sql_in_set('p.post_visibility', array(ITEM_UNAPPROVED, ITEM_REAPPROVE))
);
/**
* Allow altering the query to get the number of unapproved posts
*
* @event core.mcp_front_queue_unapproved_total_before
* @var int sql_ary Query to get the total number of unapproved posts
* @var array forum_list List of forums to look for unapproved posts
* @since 3.1.5-RC1
*/
$vars = array('sql_ary', 'forum_list');
extract($phpbb_dispatcher->trigger_event('core.mcp_front_queue_unapproved_total_before', compact($vars)));
$sql = $db->sql_build_query('SELECT', $sql_ary);
$result = $db->sql_query($sql);
$total = (int) $db->sql_fetchfield('total');
$db->sql_freeresult($result);
@@ -157,6 +174,18 @@ function mcp_front_view($id, $mode, $action)
AND r.pm_id = 0
AND r.report_closed = 0
AND ' . $db->sql_in_set('p.forum_id', $forum_list);
/**
* Alter sql query to count the number of reported posts
*
* @event core.mcp_front_reports_count_query_before
* @var int sql The query string used to get the number of reports that exist
* @var array forum_list List of forums that contain the posts
* @since 3.1.5-RC1
*/
$vars = array('sql', 'forum_list');
extract($phpbb_dispatcher->trigger_event('core.mcp_front_reports_count_query_before', compact($vars)));
$result = $db->sql_query($sql);
$total = (int) $db->sql_fetchfield('total');
$db->sql_freeresult($result);
@@ -234,6 +263,7 @@ function mcp_front_view($id, $mode, $action)
'ATTACH_ICON_IMG' => ($auth->acl_get('u_download') && $auth->acl_get('f_download', $row['forum_id']) && $row['post_attachment']) ? $user->img('icon_topic_attach', $user->lang['TOTAL_ATTACHMENTS']) : '',
));
}
$db->sql_freeresult($result);
}
$template->assign_vars(array(
@@ -290,6 +320,7 @@ function mcp_front_view($id, $mode, $action)
$pm_by_id[(int) $row['msg_id']] = $row;
$pm_list[] = (int) $row['msg_id'];
}
$db->sql_freeresult($result);
$address_list = get_recipient_strings($pm_by_id);

View File

@@ -137,7 +137,7 @@ class mcp_logs
if ($mode == 'topic_logs')
{
$conditions['topic_logs'] = $topic_id;
$conditions['topic_id'] = $topic_id;
}
$phpbb_log->delete('mod', $conditions);

View File

@@ -226,6 +226,31 @@ class mcp_main
break;
default:
if ($quickmod)
{
switch ($action)
{
case 'lock':
case 'unlock':
case 'make_announce':
case 'make_sticky':
case 'make_global':
case 'make_normal':
case 'make_onindex':
case 'move':
case 'fork':
case 'delete_topic':
trigger_error('TOPIC_NOT_EXIST');
break;
case 'lock_post':
case 'unlock_post':
case 'delete_post':
trigger_error('POST_NOT_EXIST');
break;
}
}
trigger_error('NO_MODE', E_USER_ERROR);
break;
}
@@ -754,7 +779,8 @@ function mcp_delete_topic($topic_ids, $is_soft = false, $soft_delete_reason = ''
{
global $auth, $user, $db, $phpEx, $phpbb_root_path, $request, $phpbb_container;
if (!phpbb_check_ids($topic_ids, TOPICS_TABLE, 'topic_id', array('m_delete')))
$check_permission = ($is_soft) ? 'm_softdelete' : 'm_delete';
if (!phpbb_check_ids($topic_ids, TOPICS_TABLE, 'topic_id', array($check_permission)))
{
return;
}
@@ -812,8 +838,17 @@ function mcp_delete_topic($topic_ids, $is_soft = false, $soft_delete_reason = ''
$user->add_lang('posting');
// If there are only shadow topics, we neither need a reason nor softdelete
$sql = 'SELECT topic_id
FROM ' . TOPICS_TABLE . '
WHERE ' . $db->sql_in_set('topic_id', $topic_ids) . '
AND topic_moved_id = 0';
$result = $db->sql_query_limit($sql, 1);
$only_shadow = !$db->sql_fetchfield('topic_id');
$db->sql_freeresult($result);
$only_softdeleted = false;
if ($auth->acl_get('m_delete', $forum_id) && $auth->acl_get('m_softdelete', $forum_id))
if (!$only_shadow && $auth->acl_get('m_delete', $forum_id) && $auth->acl_get('m_softdelete', $forum_id))
{
// If there are only soft deleted topics, we display a message why the option is not available
$sql = 'SELECT topic_id
@@ -826,6 +861,7 @@ function mcp_delete_topic($topic_ids, $is_soft = false, $soft_delete_reason = ''
}
$template->assign_vars(array(
'S_SHADOW_TOPICS' => $only_shadow,
'S_SOFTDELETED' => $only_softdeleted,
'S_TOPIC_MODE' => true,
'S_ALLOWED_DELETE' => $auth->acl_get('m_delete', $forum_id),
@@ -838,7 +874,7 @@ function mcp_delete_topic($topic_ids, $is_soft = false, $soft_delete_reason = ''
$l_confirm .= '_PERMANENTLY';
$s_hidden_fields['delete_permanent'] = '1';
}
else if (!$auth->acl_get('m_softdelete', $forum_id))
else if ($only_shadow || !$auth->acl_get('m_softdelete', $forum_id))
{
$s_hidden_fields['delete_permanent'] = '1';
}
@@ -882,7 +918,8 @@ function mcp_delete_post($post_ids, $is_soft = false, $soft_delete_reason = '',
{
global $auth, $user, $db, $phpEx, $phpbb_root_path, $request, $phpbb_container;
if (!phpbb_check_ids($post_ids, POSTS_TABLE, 'post_id', array('m_softdelete')))
$check_permission = ($is_soft) ? 'm_softdelete' : 'm_delete';
if (!phpbb_check_ids($post_ids, POSTS_TABLE, 'post_id', array($check_permission)))
{
return;
}
@@ -1107,7 +1144,7 @@ function mcp_delete_post($post_ids, $is_soft = false, $soft_delete_reason = '',
function mcp_fork_topic($topic_ids)
{
global $auth, $user, $db, $template, $config;
global $phpEx, $phpbb_root_path;
global $phpEx, $phpbb_root_path, $phpbb_dispatcher;
if (!phpbb_check_ids($topic_ids, TOPICS_TABLE, 'topic_id', array('m_')))
{
@@ -1185,7 +1222,7 @@ function mcp_fork_topic($topic_ids)
}
$error = false;
$search = new $search_type($error, $phpbb_root_path, $phpEx, $auth, $config, $db, $user);
$search = new $search_type($error, $phpbb_root_path, $phpEx, $auth, $config, $db, $user, $phpbb_dispatcher);
$search_mode = 'post';
if ($error)
@@ -1264,6 +1301,7 @@ function mcp_fork_topic($topic_ids)
$db->sql_query('INSERT INTO ' . POLL_OPTIONS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary));
}
$db->sql_freeresult($result);
}
$sql = 'SELECT *

View File

@@ -26,6 +26,7 @@ function mcp_post_details($id, $mode, $action)
{
global $phpEx, $phpbb_root_path, $config;
global $template, $db, $user, $auth, $cache;
global $phpbb_dispatcher;
$user->add_lang('posting');
@@ -106,6 +107,21 @@ function mcp_post_details($id, $mode, $action)
}
break;
default:
/**
* This event allows you to handle custom post moderation options
*
* @event core.mcp_post_additional_options
* @var string action Post moderation action name
* @var array post_info Information on the affected post
* @since 3.1.5-RC1
*/
$vars = array('action', 'post_info');
extract($phpbb_dispatcher->trigger_event('core.mcp_post_additional_options', compact($vars)));
break;
}
// Set some vars
@@ -197,7 +213,7 @@ function mcp_post_details($id, $mode, $action)
$l_deleted_by = '';
}
$template->assign_vars(array(
$mcp_post_template_data = array(
'U_MCP_ACTION' => "$url&amp;i=main&amp;quickmod=1&amp;mode=post_details", // Use this for mode paramaters
'U_POST_ACTION' => "$url&amp;i=$id&amp;mode=post_details", // Use this for action parameters
'U_APPROVE_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", "i=queue&amp;p=$post_id&amp;f={$post_info['forum_id']}"),
@@ -249,7 +265,32 @@ function mcp_post_details($id, $mode, $action)
'U_LOOKUP_IP' => ($auth->acl_get('m_info', $post_info['forum_id'])) ? "$url&amp;i=$id&amp;mode=$mode&amp;lookup={$post_info['poster_ip']}#ip" : '',
'U_WHOIS' => ($auth->acl_get('m_info', $post_info['forum_id'])) ? append_sid("{$phpbb_root_path}mcp.$phpEx", "i=$id&amp;mode=$mode&amp;action=whois&amp;p=$post_id&amp;ip={$post_info['poster_ip']}") : '',
));
);
$s_additional_opts = false;
/**
* Event to add/modify MCP post template data
*
* @event core.mcp_post_template_data
* @var array post_info Array with the post information
* @var array mcp_post_template_data Array with the MCP post template data
* @var array attachments Array with the post attachments, if any
* @var bool s_additional_opts Must be set to true in extension if additional options are presented in MCP post panel
* @since 3.1.5-RC1
*/
$vars = array(
'post_info',
'mcp_post_template_data',
'attachments',
's_additional_opts',
);
extract($phpbb_dispatcher->trigger_event('core.mcp_post_template_data', compact($vars)));
$template->assign_vars($mcp_post_template_data);
$template->assign_var('S_MCP_POST_ADDITIONAL_OPTS', $s_additional_opts);
unset($mcp_post_template_data);
// Get User Notes
$log_data = array();
@@ -497,7 +538,7 @@ function change_poster(&$post_info, $userdata)
{
// We do some additional checks in the module to ensure it can actually be utilised
$error = false;
$search = new $search_type($error, $phpbb_root_path, $phpEx, $auth, $config, $db, $user);
$search = new $search_type($error, $phpbb_root_path, $phpEx, $auth, $config, $db, $user, $phpbb_dispatcher);
if (!$error && method_exists($search, 'destroy_cache'))
{

View File

@@ -616,7 +616,7 @@ class mcp_queue
*/
static public function approve_posts($action, $post_id_list, $id, $mode)
{
global $db, $template, $user, $config, $request, $phpbb_container;
global $db, $template, $user, $config, $request, $phpbb_container, $phpbb_dispatcher;
global $phpEx, $phpbb_root_path;
if (!phpbb_check_ids($post_id_list, POSTS_TABLE, 'post_id', array('m_approve')))
@@ -764,6 +764,30 @@ class mcp_queue
$success_msg = (sizeof($post_info) == 1) ? 'POST_' . strtoupper($action) . 'D_SUCCESS' : 'POSTS_' . strtoupper($action) . 'D_SUCCESS';
}
/**
* Perform additional actions during post(s) approval
*
* @event core.approve_posts_after
* @var string action Variable containing the action we perform on the posts ('approve' or 'restore')
* @var array post_info Array containing info for all posts being approved
* @var array topic_info Array containing info for all parent topics of the posts
* @var int num_topics Variable containing number of topics
* @var bool notify_poster Variable telling if the post should be notified or not
* @var string success_msg Variable containing the language key for the success message
* @var string redirect Variable containing the redirect url
* @since 3.1.4-RC1
*/
$vars = array(
'action',
'post_info',
'topic_info',
'num_topics',
'notify_poster',
'success_msg',
'redirect',
);
extract($phpbb_dispatcher->trigger_event('core.approve_posts_after', compact($vars)));
meta_refresh(3, $redirect);
$message = $user->lang[$success_msg];
@@ -840,7 +864,7 @@ class mcp_queue
static public function approve_topics($action, $topic_id_list, $id, $mode)
{
global $db, $template, $user, $config;
global $phpEx, $phpbb_root_path, $request, $phpbb_container;
global $phpEx, $phpbb_root_path, $request, $phpbb_container, $phpbb_dispatcher;
if (!phpbb_check_ids($topic_id_list, TOPICS_TABLE, 'topic_id', array('m_approve')))
{
@@ -945,6 +969,28 @@ class mcp_queue
}
}
/**
* Perform additional actions during topics(s) approval
*
* @event core.approve_topics_after
* @var string action Variable containing the action we perform on the posts ('approve' or 'restore')
* @var mixed topic_info Array containing info for all topics being approved
* @var array first_post_ids Array containing ids of all first posts
* @var bool notify_poster Variable telling if the poster should be notified or not
* @var string success_msg Variable containing the language key for the success message
* @var string redirect Variable containing the redirect url
* @since 3.1.4-RC1
*/
$vars = array(
'action',
'topic_info',
'first_post_ids',
'notify_poster',
'success_msg',
'redirect',
);
extract($phpbb_dispatcher->trigger_event('core.approve_topics_after', compact($vars)));
meta_refresh(3, $redirect);
$message = $user->lang[$success_msg];
@@ -1008,7 +1054,7 @@ class mcp_queue
*/
static public function disapprove_posts($post_id_list, $id, $mode)
{
global $db, $template, $user, $config, $phpbb_container;
global $db, $template, $user, $config, $phpbb_container, $phpbb_dispatcher;
global $phpEx, $phpbb_root_path, $request;
if (!phpbb_check_ids($post_id_list, POSTS_TABLE, 'post_id', array('m_approve')))
@@ -1239,8 +1285,6 @@ class mcp_queue
}
}
unset($lang_reasons, $post_info, $disapprove_reason, $disapprove_reason_lang);
if ($num_disapproved_topics)
{
$success_msg = ($num_disapproved_topics == 1) ? 'TOPIC' : 'TOPICS';
@@ -1275,6 +1319,44 @@ class mcp_queue
}
}
/**
* Perform additional actions during post(s) disapproval
*
* @event core.disapprove_posts_after
* @var array post_info Array containing info for all posts being disapproved
* @var array topic_information Array containing information for the topics
* @var array topic_posts_unapproved Array containing list of topic ids and the count of disapproved posts in them
* @var array post_disapprove_list Array containing list of posts and their topic id
* @var int num_disapproved_topics Variable containing the number of disapproved topics
* @var int num_disapproved_posts Variable containing the number of disapproved posts
* @var array lang_reasons Array containing the language keys for reasons
* @var string disapprove_reason Variable containing the language key for the success message
* @var string disapprove_reason_lang Variable containing the language key for the success message
* @var bool is_disapproving Variable telling if anything is going to be disapproved
* @var bool notify_poster Variable telling if the post should be notified or not
* @var string success_msg Variable containing the language key for the success message
* @var string redirect Variable containing the redirect url
* @since 3.1.4-RC1
*/
$vars = array(
'post_info',
'topic_information',
'topic_posts_unapproved',
'post_disapprove_list',
'num_disapproved_topics',
'num_disapproved_posts',
'lang_reasons',
'disapprove_reason',
'disapprove_reason_lang',
'is_disapproving',
'notify_poster',
'success_msg',
'redirect',
);
extract($phpbb_dispatcher->trigger_event('core.disapprove_posts_after', compact($vars)));
unset($lang_reasons, $post_info, $disapprove_reason, $disapprove_reason_lang);
meta_refresh(3, $redirect);
$message = $user->lang[$success_msg];

View File

@@ -73,18 +73,66 @@ class mcp_reports
// closed reports are accessed by report id
$report_id = request_var('r', 0);
$sql_ary = array(
'SELECT' => 'r.post_id, r.user_id, r.report_id, r.report_closed, report_time, r.report_text, r.reported_post_text, r.reported_post_uid, r.reported_post_bitfield, r.reported_post_enable_magic_url, r.reported_post_enable_smilies, r.reported_post_enable_bbcode, rr.reason_title, rr.reason_description, u.username, u.username_clean, u.user_colour',
$sql = 'SELECT r.post_id, r.user_id, r.report_id, r.report_closed, report_time, r.report_text, r.reported_post_text, r.reported_post_uid, r.reported_post_bitfield, r.reported_post_enable_magic_url, r.reported_post_enable_smilies, r.reported_post_enable_bbcode, rr.reason_title, rr.reason_description, u.username, u.username_clean, u.user_colour
FROM ' . REPORTS_TABLE . ' r, ' . REPORTS_REASONS_TABLE . ' rr, ' . USERS_TABLE . ' u
WHERE ' . (($report_id) ? 'r.report_id = ' . $report_id : "r.post_id = $post_id") . '
'FROM' => array(
REPORTS_TABLE => 'r',
REPORTS_REASONS_TABLE => 'rr',
USERS_TABLE => 'u',
),
'WHERE' => (($report_id) ? 'r.report_id = ' . $report_id : "r.post_id = $post_id") . '
AND rr.reason_id = r.reason_id
AND r.user_id = u.user_id
AND r.pm_id = 0
ORDER BY report_closed ASC';
AND r.pm_id = 0',
'ORDER_BY' => 'report_closed ASC',
);
/**
* Allow changing the query to obtain the user-submitted report.
*
* @event core.mcp_reports_report_details_query_before
* @var array sql_ary The array in the format of the query builder with the query
* @var mixed forum_id The forum_id, the number in the f GET parameter
* @var int post_id The post_id of the report being viewed (if 0, it is meaningless)
* @var int report_id The report_id of the report being viewed
* @since 3.1.5-RC1
*/
$vars = array(
'sql_ary',
'forum_id',
'post_id',
'report_id',
);
extract($phpbb_dispatcher->trigger_event('core.mcp_reports_report_details_query_before', compact($vars)));
$sql = $db->sql_build_query('SELECT', $sql_ary);
$result = $db->sql_query_limit($sql, 1);
$report = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
/**
* Allow changing the data obtained from the user-submitted report.
*
* @event core.mcp_reports_report_details_query_after
* @var array sql_ary The array in the format of the query builder with the query that had been executted
* @var mixed forum_id The forum_id, the number in the f GET parameter
* @var int post_id The post_id of the report being viewed (if 0, it is meaningless)
* @var int report_id The report_id of the report being viewed
* @var int report The query's resulting row.
* @since 3.1.5-RC1
*/
$vars = array(
'sql_ary',
'forum_id',
'post_id',
'report_id',
'report',
);
extract($phpbb_dispatcher->trigger_event('core.mcp_reports_report_details_query_after', compact($vars)));
if (!$report)
{
trigger_error('NO_REPORT');
@@ -489,6 +537,7 @@ function close_report($report_id_list, $mode, $action, $pm = false)
{
$post_id_list[] = $row[$id_column];
}
$db->sql_freeresult($result);
$post_id_list = array_unique($post_id_list);
if ($pm)

Some files were not shown because too many files have changed in this diff Show More