Merge pull request #2 from phpbb/3.2.x

3.2.x
This commit is contained in:
3Di 2018-10-26 18:33:30 +02:00 committed by GitHub
commit 379900b4ed
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
47 changed files with 963 additions and 375 deletions

281
LICENSE Normal file
View file

@ -0,0 +1,281 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
675 Mass Ave, Cambridge, MA 02139, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS

Binary file not shown.

View file

@ -238,7 +238,7 @@
<form id="profile_fields" method="post" action="{U_ACTION}">
<fieldset class="quick">
<input class="text small" type="text" name="field_ident" /> <select name="field_type">{S_TYPE_OPTIONS}</select>
<select name="field_type">{S_TYPE_OPTIONS}</select>
<input class="button1" type="submit" name="submit" value="{L_CREATE_NEW_FIELD}" />
<input type="hidden" name="create" value="1" />
{S_FORM_TOKEN}

View file

@ -1643,7 +1643,7 @@ phpbb.lazyLoadAvatars = function loadAvatars() {
});
};
$(window).load(phpbb.lazyLoadAvatars);
$(window).on('load', phpbb.lazyLoadAvatars);
/**
* Apply code editor to all textarea elements with data-bbcode attribute

File diff suppressed because one or more lines are too long

254
phpBB/composer.lock generated
View file

@ -1,10 +1,9 @@
{
"_readme": [
"This file locks the dependencies of your project to a known state",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"hash": "620519ab8cf439078c08f8a4fb49efb8",
"content-hash": "c843abc1344cd9df37f63c08a125cad0",
"packages": [
{
@ -35,7 +34,7 @@
"MIT"
],
"description": "Convenience wrapper around ini_get()",
"time": "2014-09-15 13:12:35"
"time": "2014-09-15T13:12:35+00:00"
},
{
"name": "google/recaptcha",
@ -80,7 +79,7 @@
"recaptcha",
"spam"
],
"time": "2015-09-02 17:23:59"
"time": "2015-09-02T17:23:59+00:00"
},
{
"name": "guzzlehttp/guzzle",
@ -133,7 +132,7 @@
"rest",
"web service"
],
"time": "2018-07-31 13:33:10"
"time": "2018-07-31T13:33:10+00:00"
},
{
"name": "guzzlehttp/ringphp",
@ -184,7 +183,7 @@
}
],
"description": "Provides a simple API and specification that abstracts away the details of HTTP into a single PHP function.",
"time": "2018-07-31 13:22:33"
"time": "2018-07-31T13:22:33+00:00"
},
{
"name": "guzzlehttp/streams",
@ -234,7 +233,7 @@
"Guzzle",
"stream"
],
"time": "2014-10-12 19:18:40"
"time": "2014-10-12T19:18:40+00:00"
},
{
"name": "ircmaxell/password-compat",
@ -276,7 +275,7 @@
"hashing",
"password"
],
"time": "2014-11-20 16:49:30"
"time": "2014-11-20T16:49:30+00:00"
},
{
"name": "lusitanian/oauth",
@ -343,7 +342,7 @@
"oauth",
"security"
],
"time": "2016-07-12 22:15:00"
"time": "2016-07-12T22:15:00+00:00"
},
{
"name": "marc1706/fast-image-size",
@ -395,7 +394,7 @@
"php",
"size"
],
"time": "2017-10-23 18:52:01"
"time": "2017-10-23T18:52:01+00:00"
},
{
"name": "ocramius/proxy-manager",
@ -458,7 +457,7 @@
"proxy pattern",
"service proxies"
],
"time": "2015-08-09 04:28:19"
"time": "2015-08-09T04:28:19+00:00"
},
{
"name": "paragonie/random_compat",
@ -506,7 +505,7 @@
"pseudorandom",
"random"
],
"time": "2017-03-13 16:22:52"
"time": "2017-03-13T16:22:52+00:00"
},
{
"name": "patchwork/utf8",
@ -565,7 +564,7 @@
"utf-8",
"utf8"
],
"time": "2016-05-18 13:57:10"
"time": "2016-05-18T13:57:10+00:00"
},
{
"name": "psr/log",
@ -612,7 +611,7 @@
"psr",
"psr-3"
],
"time": "2016-10-10 12:19:37"
"time": "2016-10-10T12:19:37+00:00"
},
{
"name": "react/promise",
@ -658,7 +657,7 @@
"promise",
"promises"
],
"time": "2018-06-13 15:59:06"
"time": "2018-06-13T15:59:06+00:00"
},
{
"name": "s9e/text-formatter",
@ -723,20 +722,20 @@
"parser",
"shortcodes"
],
"time": "2017-12-10 00:55:53"
"time": "2017-12-10T00:55:53+00:00"
},
{
"name": "symfony/config",
"version": "v2.8.45",
"version": "v2.8.46",
"source": {
"type": "git",
"url": "https://github.com/symfony/config.git",
"reference": "06c0be4cdd8363f3ec8d592c9a4d1b981d5052af"
"reference": "fb3469266daaa67a1e6d42fc78fa6cdc254689f6"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/config/zipball/06c0be4cdd8363f3ec8d592c9a4d1b981d5052af",
"reference": "06c0be4cdd8363f3ec8d592c9a4d1b981d5052af",
"url": "https://api.github.com/repos/symfony/config/zipball/fb3469266daaa67a1e6d42fc78fa6cdc254689f6",
"reference": "fb3469266daaa67a1e6d42fc78fa6cdc254689f6",
"shasum": ""
},
"require": {
@ -780,20 +779,20 @@
],
"description": "Symfony Config Component",
"homepage": "https://symfony.com",
"time": "2018-07-26 11:13:39"
"time": "2018-09-08T12:44:02+00:00"
},
{
"name": "symfony/console",
"version": "v2.8.45",
"version": "v2.8.46",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
"reference": "0c1fcbb9afb5cff992c982ff99c0434f0146dcfc"
"reference": "aca0dcc0c75496e17e2aa0303bb9c8e6d79ed789"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/console/zipball/0c1fcbb9afb5cff992c982ff99c0434f0146dcfc",
"reference": "0c1fcbb9afb5cff992c982ff99c0434f0146dcfc",
"url": "https://api.github.com/repos/symfony/console/zipball/aca0dcc0c75496e17e2aa0303bb9c8e6d79ed789",
"reference": "aca0dcc0c75496e17e2aa0303bb9c8e6d79ed789",
"shasum": ""
},
"require": {
@ -841,20 +840,20 @@
],
"description": "Symfony Console Component",
"homepage": "https://symfony.com",
"time": "2018-07-26 11:13:39"
"time": "2018-09-30T03:33:07+00:00"
},
{
"name": "symfony/debug",
"version": "v2.8.45",
"version": "v2.8.46",
"source": {
"type": "git",
"url": "https://github.com/symfony/debug.git",
"reference": "cbb8a5f212148964efbc414838c527229f9951b7"
"reference": "4fd77efcd4a499bf76d4ff46d092c67f3fe9e347"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/debug/zipball/cbb8a5f212148964efbc414838c527229f9951b7",
"reference": "cbb8a5f212148964efbc414838c527229f9951b7",
"url": "https://api.github.com/repos/symfony/debug/zipball/4fd77efcd4a499bf76d4ff46d092c67f3fe9e347",
"reference": "4fd77efcd4a499bf76d4ff46d092c67f3fe9e347",
"shasum": ""
},
"require": {
@ -898,20 +897,20 @@
],
"description": "Symfony Debug Component",
"homepage": "https://symfony.com",
"time": "2018-08-03 09:45:57"
"time": "2018-09-21T12:46:38+00:00"
},
{
"name": "symfony/dependency-injection",
"version": "v2.8.45",
"version": "v2.8.46",
"source": {
"type": "git",
"url": "https://github.com/symfony/dependency-injection.git",
"reference": "ad2446d39d11c3daaa7f147d957941a187e47357"
"reference": "84219396d1a79d149a5a9d5f71afaf48dcfde7d0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/dependency-injection/zipball/ad2446d39d11c3daaa7f147d957941a187e47357",
"reference": "ad2446d39d11c3daaa7f147d957941a187e47357",
"url": "https://api.github.com/repos/symfony/dependency-injection/zipball/84219396d1a79d149a5a9d5f71afaf48dcfde7d0",
"reference": "84219396d1a79d149a5a9d5f71afaf48dcfde7d0",
"shasum": ""
},
"require": {
@ -961,11 +960,11 @@
],
"description": "Symfony DependencyInjection Component",
"homepage": "https://symfony.com",
"time": "2018-07-26 11:13:39"
"time": "2018-09-08T12:44:02+00:00"
},
{
"name": "symfony/event-dispatcher",
"version": "v2.8.45",
"version": "v2.8.46",
"source": {
"type": "git",
"url": "https://github.com/symfony/event-dispatcher.git",
@ -1021,20 +1020,20 @@
],
"description": "Symfony EventDispatcher Component",
"homepage": "https://symfony.com",
"time": "2018-07-26 09:03:18"
"time": "2018-07-26T09:03:18+00:00"
},
{
"name": "symfony/filesystem",
"version": "v2.8.45",
"version": "v2.8.46",
"source": {
"type": "git",
"url": "https://github.com/symfony/filesystem.git",
"reference": "0b252f4e25b7da17abb5a98eb60755b71d082c9c"
"reference": "91f194c5ec8d2ad5ce417a218ce3c46909e92f4d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/filesystem/zipball/0b252f4e25b7da17abb5a98eb60755b71d082c9c",
"reference": "0b252f4e25b7da17abb5a98eb60755b71d082c9c",
"url": "https://api.github.com/repos/symfony/filesystem/zipball/91f194c5ec8d2ad5ce417a218ce3c46909e92f4d",
"reference": "91f194c5ec8d2ad5ce417a218ce3c46909e92f4d",
"shasum": ""
},
"require": {
@ -1071,20 +1070,20 @@
],
"description": "Symfony Filesystem Component",
"homepage": "https://symfony.com",
"time": "2018-08-07 09:12:42"
"time": "2018-09-24T08:04:37+00:00"
},
{
"name": "symfony/finder",
"version": "v2.8.45",
"version": "v2.8.46",
"source": {
"type": "git",
"url": "https://github.com/symfony/finder.git",
"reference": "f0de0b51913eb2caab7dfed6413b87e14fca780e"
"reference": "5ebb438d1aabe9dba93099dd06e0500f97817a6e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/finder/zipball/f0de0b51913eb2caab7dfed6413b87e14fca780e",
"reference": "f0de0b51913eb2caab7dfed6413b87e14fca780e",
"url": "https://api.github.com/repos/symfony/finder/zipball/5ebb438d1aabe9dba93099dd06e0500f97817a6e",
"reference": "5ebb438d1aabe9dba93099dd06e0500f97817a6e",
"shasum": ""
},
"require": {
@ -1120,20 +1119,20 @@
],
"description": "Symfony Finder Component",
"homepage": "https://symfony.com",
"time": "2018-07-26 11:13:39"
"time": "2018-09-21T12:46:38+00:00"
},
{
"name": "symfony/http-foundation",
"version": "v2.8.45",
"version": "v2.8.46",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-foundation.git",
"reference": "dc02e684171d0696edb6d4266e9d93af5e3f44d3"
"reference": "9fcce5f0b6896a135d192cc9fd5394fd46f74eff"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/dc02e684171d0696edb6d4266e9d93af5e3f44d3",
"reference": "dc02e684171d0696edb6d4266e9d93af5e3f44d3",
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/9fcce5f0b6896a135d192cc9fd5394fd46f74eff",
"reference": "9fcce5f0b6896a135d192cc9fd5394fd46f74eff",
"shasum": ""
},
"require": {
@ -1175,20 +1174,20 @@
],
"description": "Symfony HttpFoundation Component",
"homepage": "https://symfony.com",
"time": "2018-08-27 15:52:41"
"time": "2018-09-23T15:27:53+00:00"
},
{
"name": "symfony/http-kernel",
"version": "v2.8.45",
"version": "v2.8.46",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-kernel.git",
"reference": "5424d38f10dc62752e655740224681a478d9f5bb"
"reference": "90411d2ad577b883f2fc9de06c86dd564d9ac676"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/5424d38f10dc62752e655740224681a478d9f5bb",
"reference": "5424d38f10dc62752e655740224681a478d9f5bb",
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/90411d2ad577b883f2fc9de06c86dd564d9ac676",
"reference": "90411d2ad577b883f2fc9de06c86dd564d9ac676",
"shasum": ""
},
"require": {
@ -1259,7 +1258,7 @@
],
"description": "Symfony HttpKernel Component",
"homepage": "https://symfony.com",
"time": "2018-08-27 17:33:38"
"time": "2018-09-30T03:51:44+00:00"
},
{
"name": "symfony/polyfill-ctype",
@ -1317,7 +1316,7 @@
"polyfill",
"portable"
],
"time": "2018-08-06 14:22:27"
"time": "2018-08-06T14:22:27+00:00"
},
{
"name": "symfony/polyfill-mbstring",
@ -1376,7 +1375,7 @@
"portable",
"shim"
],
"time": "2018-08-06 14:22:27"
"time": "2018-08-06T14:22:27+00:00"
},
{
"name": "symfony/polyfill-php54",
@ -1434,7 +1433,7 @@
"portable",
"shim"
],
"time": "2018-08-06 14:22:27"
"time": "2018-08-06T14:22:27+00:00"
},
{
"name": "symfony/polyfill-php55",
@ -1490,11 +1489,11 @@
"portable",
"shim"
],
"time": "2018-08-06 14:22:27"
"time": "2018-08-06T14:22:27+00:00"
},
{
"name": "symfony/proxy-manager-bridge",
"version": "v2.8.45",
"version": "v2.8.46",
"source": {
"type": "git",
"url": "https://github.com/symfony/proxy-manager-bridge.git",
@ -1544,20 +1543,20 @@
],
"description": "Symfony ProxyManager Bridge",
"homepage": "https://symfony.com",
"time": "2018-07-26 09:03:18"
"time": "2018-07-26T09:03:18+00:00"
},
{
"name": "symfony/routing",
"version": "v2.8.45",
"version": "v2.8.46",
"source": {
"type": "git",
"url": "https://github.com/symfony/routing.git",
"reference": "e26f791e8669603e9dc0a601e75a50f914eaa144"
"reference": "fed18962c40095adc36c2ad05bf0d957cc346f61"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/routing/zipball/e26f791e8669603e9dc0a601e75a50f914eaa144",
"reference": "e26f791e8669603e9dc0a601e75a50f914eaa144",
"url": "https://api.github.com/repos/symfony/routing/zipball/fed18962c40095adc36c2ad05bf0d957cc346f61",
"reference": "fed18962c40095adc36c2ad05bf0d957cc346f61",
"shasum": ""
},
"require": {
@ -1618,20 +1617,20 @@
"uri",
"url"
],
"time": "2018-07-26 11:13:39"
"time": "2018-09-08T12:44:02+00:00"
},
{
"name": "symfony/twig-bridge",
"version": "v2.8.45",
"version": "v2.8.46",
"source": {
"type": "git",
"url": "https://github.com/symfony/twig-bridge.git",
"reference": "2bb814a4554a7188275be36503dc27c0dd12cd2f"
"reference": "69d2a5542ea37309292d10029ce52b32656523a0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/twig-bridge/zipball/2bb814a4554a7188275be36503dc27c0dd12cd2f",
"reference": "2bb814a4554a7188275be36503dc27c0dd12cd2f",
"url": "https://api.github.com/repos/symfony/twig-bridge/zipball/69d2a5542ea37309292d10029ce52b32656523a0",
"reference": "69d2a5542ea37309292d10029ce52b32656523a0",
"shasum": ""
},
"require": {
@ -1703,20 +1702,20 @@
],
"description": "Symfony Twig Bridge",
"homepage": "https://symfony.com",
"time": "2018-07-26 11:13:39"
"time": "2018-08-29T13:11:53+00:00"
},
{
"name": "symfony/yaml",
"version": "v2.8.45",
"version": "v2.8.46",
"source": {
"type": "git",
"url": "https://github.com/symfony/yaml.git",
"reference": "fbf876678e29dc634430dcf0096e216eb0004467"
"reference": "5baf0f821b14eee8ca415e6a0361a9fa140c002c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/yaml/zipball/fbf876678e29dc634430dcf0096e216eb0004467",
"reference": "fbf876678e29dc634430dcf0096e216eb0004467",
"url": "https://api.github.com/repos/symfony/yaml/zipball/5baf0f821b14eee8ca415e6a0361a9fa140c002c",
"reference": "5baf0f821b14eee8ca415e6a0361a9fa140c002c",
"shasum": ""
},
"require": {
@ -1753,7 +1752,7 @@
],
"description": "Symfony Yaml Component",
"homepage": "https://symfony.com",
"time": "2018-07-26 09:03:18"
"time": "2018-08-29T13:11:53+00:00"
},
{
"name": "twig/twig",
@ -1819,7 +1818,7 @@
"keywords": [
"templating"
],
"time": "2018-07-13 07:12:17"
"time": "2018-07-13T07:12:17+00:00"
},
{
"name": "zendframework/zend-code",
@ -1872,7 +1871,7 @@
"code",
"zf2"
],
"time": "2015-06-03 15:31:59"
"time": "2015-06-03T15:31:59+00:00"
},
{
"name": "zendframework/zend-eventmanager",
@ -1917,7 +1916,7 @@
"eventmanager",
"zf2"
],
"time": "2015-06-03 15:32:01"
"time": "2015-06-03T15:32:01+00:00"
},
{
"name": "zendframework/zend-stdlib",
@ -1973,7 +1972,7 @@
"stdlib",
"zf2"
],
"time": "2015-06-03 15:32:03"
"time": "2015-06-03T15:32:03+00:00"
}
],
"packages-dev": [
@ -2029,7 +2028,7 @@
"constructor",
"instantiate"
],
"time": "2015-06-14 21:17:01"
"time": "2015-06-14T21:17:01+00:00"
},
{
"name": "fabpot/goutte",
@ -2078,7 +2077,7 @@
"keywords": [
"scraper"
],
"time": "2015-05-05 21:14:57"
"time": "2015-05-05T21:14:57+00:00"
},
{
"name": "facebook/webdriver",
@ -2124,7 +2123,7 @@
"selenium",
"webdriver"
],
"time": "2016-08-10 00:44:08"
"time": "2016-08-10T00:44:08+00:00"
},
{
"name": "laravel/homestead",
@ -2165,7 +2164,7 @@
}
],
"description": "A virtual machine for web artisans.",
"time": "2016-09-17 04:42:33"
"time": "2016-09-17T04:42:33+00:00"
},
{
"name": "michelf/php-markdown",
@ -2211,7 +2210,7 @@
"keywords": [
"markdown"
],
"time": "2018-01-15 00:49:33"
"time": "2018-01-15T00:49:33+00:00"
},
{
"name": "nikic/php-parser",
@ -2256,7 +2255,7 @@
"parser",
"php"
],
"time": "2014-07-23 18:24:17"
"time": "2014-07-23T18:24:17+00:00"
},
{
"name": "phing/phing",
@ -2308,7 +2307,7 @@
"task",
"tool"
],
"time": "2012-11-29 21:23:47"
"time": "2012-11-29T21:23:47+00:00"
},
{
"name": "phpdocumentor/reflection-docblock",
@ -2357,7 +2356,7 @@
"email": "mike.vanriel@naenius.com"
}
],
"time": "2016-01-25 08:17:30"
"time": "2016-01-25T08:17:30+00:00"
},
{
"name": "phpspec/prophecy",
@ -2420,7 +2419,7 @@
"spy",
"stub"
],
"time": "2018-08-05 17:53:17"
"time": "2018-08-05T17:53:17+00:00"
},
{
"name": "phpunit/dbunit",
@ -2479,7 +2478,7 @@
"testing",
"xunit"
],
"time": "2015-03-29 14:23:04"
"time": "2015-03-29T14:23:04+00:00"
},
{
"name": "phpunit/php-code-coverage",
@ -2541,7 +2540,7 @@
"testing",
"xunit"
],
"time": "2015-10-06 15:47:00"
"time": "2015-10-06T15:47:00+00:00"
},
{
"name": "phpunit/php-file-iterator",
@ -2588,7 +2587,7 @@
"filesystem",
"iterator"
],
"time": "2017-11-27 13:52:08"
"time": "2017-11-27T13:52:08+00:00"
},
{
"name": "phpunit/php-text-template",
@ -2629,7 +2628,7 @@
"keywords": [
"template"
],
"time": "2015-06-21 13:50:34"
"time": "2015-06-21T13:50:34+00:00"
},
{
"name": "phpunit/php-timer",
@ -2678,7 +2677,7 @@
"keywords": [
"timer"
],
"time": "2017-02-26 11:10:40"
"time": "2017-02-26T11:10:40+00:00"
},
{
"name": "phpunit/php-token-stream",
@ -2727,7 +2726,7 @@
"keywords": [
"tokenizer"
],
"time": "2017-12-04 08:55:13"
"time": "2017-12-04T08:55:13+00:00"
},
{
"name": "phpunit/phpunit",
@ -2799,7 +2798,7 @@
"testing",
"xunit"
],
"time": "2017-06-21 08:07:12"
"time": "2017-06-21T08:07:12+00:00"
},
{
"name": "phpunit/phpunit-mock-objects",
@ -2855,7 +2854,7 @@
"mock",
"xunit"
],
"time": "2015-10-02 06:51:40"
"time": "2015-10-02T06:51:40+00:00"
},
{
"name": "pimple/pimple",
@ -2903,7 +2902,7 @@
"container",
"dependency injection"
],
"time": "2013-03-08 08:21:40"
"time": "2013-03-08T08:21:40+00:00"
},
{
"name": "sami/sami",
@ -2960,7 +2959,8 @@
"keywords": [
"phpdoc"
],
"time": "2015-06-05 03:36:34"
"abandoned": true,
"time": "2015-06-05T03:36:34+00:00"
},
{
"name": "sebastian/comparator",
@ -3024,7 +3024,7 @@
"compare",
"equality"
],
"time": "2017-01-29 09:50:25"
"time": "2017-01-29T09:50:25+00:00"
},
{
"name": "sebastian/diff",
@ -3076,7 +3076,7 @@
"keywords": [
"diff"
],
"time": "2017-05-22 07:24:03"
"time": "2017-05-22T07:24:03+00:00"
},
{
"name": "sebastian/environment",
@ -3126,7 +3126,7 @@
"environment",
"hhvm"
],
"time": "2016-08-18 05:49:44"
"time": "2016-08-18T05:49:44+00:00"
},
{
"name": "sebastian/exporter",
@ -3193,7 +3193,7 @@
"export",
"exporter"
],
"time": "2016-06-17 09:04:28"
"time": "2016-06-17T09:04:28+00:00"
},
{
"name": "sebastian/global-state",
@ -3244,7 +3244,7 @@
"keywords": [
"global state"
],
"time": "2015-10-12 03:26:01"
"time": "2015-10-12T03:26:01+00:00"
},
{
"name": "sebastian/recursion-context",
@ -3297,7 +3297,7 @@
],
"description": "Provides functionality to recursively process PHP variables",
"homepage": "http://www.github.com/sebastianbergmann/recursion-context",
"time": "2016-10-03 07:41:43"
"time": "2016-10-03T07:41:43+00:00"
},
{
"name": "sebastian/version",
@ -3332,7 +3332,7 @@
],
"description": "Library that helps with managing the version number of Git-hosted PHP projects",
"homepage": "https://github.com/sebastianbergmann/version",
"time": "2015-06-21 13:59:46"
"time": "2015-06-21T13:59:46+00:00"
},
{
"name": "squizlabs/php_codesniffer",
@ -3410,11 +3410,11 @@
"phpcs",
"standards"
],
"time": "2017-05-22 02:43:20"
"time": "2017-05-22T02:43:20+00:00"
},
{
"name": "symfony/browser-kit",
"version": "v2.8.45",
"version": "v2.8.46",
"source": {
"type": "git",
"url": "https://github.com/symfony/browser-kit.git",
@ -3467,20 +3467,20 @@
],
"description": "Symfony BrowserKit Component",
"homepage": "https://symfony.com",
"time": "2018-07-26 09:03:18"
"time": "2018-07-26T09:03:18+00:00"
},
{
"name": "symfony/css-selector",
"version": "v2.8.45",
"version": "v2.8.46",
"source": {
"type": "git",
"url": "https://github.com/symfony/css-selector.git",
"reference": "294611f3a0d265bcf049e2da62cb4f712e3ed927"
"reference": "4cca41ebe83cd5b4bd0c1a9f6bdfaec7103f97fb"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/css-selector/zipball/294611f3a0d265bcf049e2da62cb4f712e3ed927",
"reference": "294611f3a0d265bcf049e2da62cb4f712e3ed927",
"url": "https://api.github.com/repos/symfony/css-selector/zipball/4cca41ebe83cd5b4bd0c1a9f6bdfaec7103f97fb",
"reference": "4cca41ebe83cd5b4bd0c1a9f6bdfaec7103f97fb",
"shasum": ""
},
"require": {
@ -3520,20 +3520,20 @@
],
"description": "Symfony CssSelector Component",
"homepage": "https://symfony.com",
"time": "2018-07-26 09:03:18"
"time": "2018-09-08T12:44:02+00:00"
},
{
"name": "symfony/dom-crawler",
"version": "v2.8.45",
"version": "v2.8.46",
"source": {
"type": "git",
"url": "https://github.com/symfony/dom-crawler.git",
"reference": "2fd6513f2dd3b08446da420070084db376c0134c"
"reference": "ba0b706b5ac1c1afcf7d34507a5a272f51cc7721"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/dom-crawler/zipball/2fd6513f2dd3b08446da420070084db376c0134c",
"reference": "2fd6513f2dd3b08446da420070084db376c0134c",
"url": "https://api.github.com/repos/symfony/dom-crawler/zipball/ba0b706b5ac1c1afcf7d34507a5a272f51cc7721",
"reference": "ba0b706b5ac1c1afcf7d34507a5a272f51cc7721",
"shasum": ""
},
"require": {
@ -3577,20 +3577,20 @@
],
"description": "Symfony DomCrawler Component",
"homepage": "https://symfony.com",
"time": "2018-07-24 10:05:38"
"time": "2018-09-21T12:46:38+00:00"
},
{
"name": "symfony/process",
"version": "v2.8.45",
"version": "v2.8.46",
"source": {
"type": "git",
"url": "https://github.com/symfony/process.git",
"reference": "4be278e19064c3492095de50c9e375caae569ae1"
"reference": "f09e21b7c5aba06c47bbfad9cbcf13ac7f0db0a6"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/process/zipball/4be278e19064c3492095de50c9e375caae569ae1",
"reference": "4be278e19064c3492095de50c9e375caae569ae1",
"url": "https://api.github.com/repos/symfony/process/zipball/f09e21b7c5aba06c47bbfad9cbcf13ac7f0db0a6",
"reference": "f09e21b7c5aba06c47bbfad9cbcf13ac7f0db0a6",
"shasum": ""
},
"require": {
@ -3626,7 +3626,7 @@
],
"description": "Symfony Process Component",
"homepage": "https://symfony.com",
"time": "2018-08-03 09:45:57"
"time": "2018-09-06T17:11:15+00:00"
}
],
"aliases": [],

View file

@ -652,6 +652,13 @@ attachment_file_prepend
* Since: 3.1.6-RC1
* Purpose: Add custom attachment types displaying to the top of attachment block.
confirm_delete_body_delete_reason_before
===
* Locations:
+ styles/prosilver/template/confirm_delete_body.html
* Since: 3.2.4-RC1
* Purpose: Add custom text to the confirmation of a post that is deleted.
forumlist_body_category_header_after
===
* Locations:
@ -974,6 +981,20 @@ mcp_post_additional_options
* Since: 3.1.5-RC1
* Purpose: Add content within the list of post moderation actions
mcp_post_report_buttons_top_after
===
* Locations:
+ styles/prosilver/template/mcp_post.html
* Since: 3.2.4-RC1
* Purpose: Add content after report buttons
mcp_post_report_buttons_top_before
===
* Locations:
+ styles/prosilver/template/mcp_post.html
* Since: 3.2.4-RC1
* Purpose: Add content before report buttons
mcp_topic_options_after
===
* Locations:
@ -1971,6 +1992,13 @@ simple_footer_after
* Locations:
+ styles/prosilver/template/simple_footer.html
* Since: 3.1.0-a1
* Purpose: Add content prior to the scripts of the simple footer
simple_footer_body_after
===
* Locations:
+ styles/prosilver/template/simple_footer.html
* Since: 3.2.4-RC1
* Purpose: Add content directly prior to the `</body>` tag of the simple footer
simple_header_body_before

View file

@ -29,7 +29,6 @@ source source_phpbb_{SPHINX_ID}_main
AND p.post_id >= $start AND p.post_id <= $end
sql_query_post =
sql_query_post_index = UPDATE phpbb_sphinx SET max_doc_id = $maxid WHERE counter_id = 1
sql_query_info = SELECT * FROM phpbb_posts WHERE post_id = $id
sql_attr_uint = forum_id
sql_attr_uint = topic_id
sql_attr_uint = poster_id
@ -72,7 +71,6 @@ index index_phpbb_{SPHINX_ID}_main
morphology = none
stopwords =
min_word_len = 2
charset_type = utf-8
charset_table = U+FF10..U+FF19->0..9, 0..9, U+FF41..U+FF5A->a..z, U+FF21..U+FF3A->a..z, A..Z->a..z, a..z, U+0149, U+017F, U+0138, U+00DF, U+00FF, U+00C0..U+00D6->U+00E0..U+00F6, U+00E0..U+00F6, U+00D8..U+00DE->U+00F8..U+00FE, U+00F8..U+00FE, U+0100->U+0101, U+0101, U+0102->U+0103, U+0103, U+0104->U+0105, U+0105, U+0106->U+0107, U+0107, U+0108->U+0109, U+0109, U+010A->U+010B, U+010B, U+010C->U+010D, U+010D, U+010E->U+010F, U+010F, U+0110->U+0111, U+0111, U+0112->U+0113, U+0113, U+0114->U+0115, U+0115, U+0116->U+0117, U+0117, U+0118->U+0119, U+0119, U+011A->U+011B, U+011B, U+011C->U+011D, U+011D, U+011E->U+011F, U+011F, U+0130->U+0131, U+0131, U+0132->U+0133, U+0133, U+0134->U+0135, U+0135, U+0136->U+0137, U+0137, U+0139->U+013A, U+013A, U+013B->U+013C, U+013C, U+013D->U+013E, U+013E, U+013F->U+0140, U+0140, U+0141->U+0142, U+0142, U+0143->U+0144, U+0144, U+0145->U+0146, U+0146, U+0147->U+0148, U+0148, U+014A->U+014B, U+014B, U+014C->U+014D, U+014D, U+014E->U+014F, U+014F, U+0150->U+0151, U+0151, U+0152->U+0153, U+0153, U+0154->U+0155, U+0155, U+0156->U+0157, U+0157, U+0158->U+0159, U+0159, U+015A->U+015B, U+015B, U+015C->U+015D, U+015D, U+015E->U+015F, U+015F, U+0160->U+0161, U+0161, U+0162->U+0163, U+0163, U+0164->U+0165, U+0165, U+0166->U+0167, U+0167, U+0168->U+0169, U+0169, U+016A->U+016B, U+016B, U+016C->U+016D, U+016D, U+016E->U+016F, U+016F, U+0170->U+0171, U+0171, U+0172->U+0173, U+0173, U+0174->U+0175, U+0175, U+0176->U+0177, U+0177, U+0178->U+00FF, U+00FF, U+0179->U+017A, U+017A, U+017B->U+017C, U+017C, U+017D->U+017E, U+017E, U+0410..U+042F->U+0430..U+044F, U+0430..U+044F, U+4E00..U+9FFF
min_prefix_len = 0
min_infix_len = 0
@ -88,13 +86,11 @@ indexer
}
searchd
{
compat_sphinxql_magics = 0
listen = localhost:9312
log = {DATA_PATH}/log/searchd.log
query_log = {DATA_PATH}/log/sphinx-query.log
read_timeout = 5
max_children = 30
pid_file = {DATA_PATH}/searchd.pid
max_matches = 20000
binlog_path = {DATA_PATH}
}

View file

@ -1012,7 +1012,7 @@ class acp_forums
}
$range_test_ary = array(
array('lang' => 'FORUM_TOPICS_PAGE', 'value' => $forum_data_ary['forum_topics_per_page'], 'column_type' => 'TINT:0'),
array('lang' => 'FORUM_TOPICS_PAGE', 'value' => $forum_data_ary['forum_topics_per_page'], 'column_type' => 'USINT:0'),
);
if (!empty($forum_data_ary['forum_image']) && !file_exists($phpbb_root_path . $forum_data_ary['forum_image']))

View file

@ -1744,14 +1744,14 @@ function redirect($url, $return = false, $disable_cd_check = false)
if ($url_parts === false)
{
// Malformed url
trigger_error('INSECURE_REDIRECT', E_USER_ERROR);
trigger_error('INSECURE_REDIRECT', E_USER_WARNING);
}
else if (!empty($url_parts['scheme']) && !empty($url_parts['host']))
{
// 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)
{
trigger_error('INSECURE_REDIRECT', E_USER_ERROR);
trigger_error('INSECURE_REDIRECT', E_USER_WARNING);
}
}
else if ($url[0] == '/')
@ -1791,13 +1791,13 @@ function redirect($url, $return = false, $disable_cd_check = false)
if (!$disable_cd_check && strpos($url, generate_board_url(true) . '/') !== 0)
{
trigger_error('INSECURE_REDIRECT', E_USER_ERROR);
trigger_error('INSECURE_REDIRECT', E_USER_WARNING);
}
// Make sure no linebreaks are there... to prevent http response splitting for PHP < 4.4.2
if (strpos(urldecode($url), "\n") !== false || strpos(urldecode($url), "\r") !== false || strpos($url, ';') !== false)
{
trigger_error('INSECURE_REDIRECT', E_USER_ERROR);
trigger_error('INSECURE_REDIRECT', E_USER_WARNING);
}
// Now, also check the protocol and for a valid url the last time...
@ -1806,7 +1806,7 @@ function redirect($url, $return = false, $disable_cd_check = false)
if ($url_parts === false || empty($url_parts['scheme']) || !in_array($url_parts['scheme'], $allowed_protocols))
{
trigger_error('INSECURE_REDIRECT', E_USER_ERROR);
trigger_error('INSECURE_REDIRECT', E_USER_WARNING);
}
/**
@ -2363,10 +2363,12 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
* @event core.login_box_redirect
* @var string redirect Redirect string
* @var bool admin Is admin?
* @var array result Result from auth provider
* @since 3.1.0-RC5
* @changed 3.1.9-RC1 Removed undefined return variable
* @changed 3.2.4-RC1 Added result
*/
$vars = array('redirect', 'admin');
$vars = array('redirect', 'admin', 'result');
extract($phpbb_dispatcher->trigger_event('core.login_box_redirect', compact($vars)));
// append/replace SID (may change during the session for AOL users)
@ -2539,7 +2541,7 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
*/
function login_forum_box($forum_data)
{
global $db, $phpbb_container, $request, $template, $user, $phpbb_dispatcher;
global $db, $phpbb_container, $request, $template, $user, $phpbb_dispatcher, $phpbb_root_path, $phpEx;
$password = $request->variable('password', '', true);
@ -2624,6 +2626,8 @@ function login_forum_box($forum_data)
'body' => 'login_forum.html')
);
make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"), $forum_data['forum_id']);
page_footer();
}
@ -4506,7 +4510,7 @@ function page_header($page_title = '', $display_online_list = false, $item_id =
'S_COOKIE_NOTICE' => !empty($config['cookie_notice']),
'T_THEME_NAME' => rawurlencode($user->style['style_path']),
'T_THEME_LANG_NAME' => $user->data['user_lang'],
'T_THEME_LANG_NAME' => $user->lang_name,
'T_TEMPLATE_NAME' => $user->style['style_path'],
'T_SUPER_TEMPLATE_NAME' => rawurlencode((isset($user->style['style_parent_tree']) && $user->style['style_parent_tree']) ? $user->style['style_parent_tree'] : $user->style['style_path']),
'T_IMAGES' => 'images',

View file

@ -1758,3 +1758,47 @@ class bitfield
$this->data = $this->data | $bitfield->get_blob();
}
}
/**
* Formats the quote according to the given BBCode status setting
*
* @param bool $bbcode_status The status of the BBCode setting
* @param array $quote_attributes The attributes of the quoted post
* @param phpbb\textformatter\utils $text_formatter_utils Text formatter utilities
* @param parse_message $message_parser Message parser class
* @param string $message_link Link of the original quoted post
*/
function phpbb_format_quote($bbcode_status, $quote_attributes, $text_formatter_utils, $message_parser, $message_link = '')
{
if ($bbcode_status)
{
$quote_text = $text_formatter_utils->generate_quote(
censor_text($message_parser->message),
$quote_attributes
);
$message_parser->message = $quote_text . "\n\n";
}
else
{
$offset = 0;
$quote_string = "&gt; ";
$message = censor_text(trim($message_parser->message));
// see if we are nesting. It's easily tricked but should work for one level of nesting
if (strpos($message, "&gt;") !== false)
{
$offset = 10;
}
$message = utf8_wordwrap($message, 75 + $offset, "\n");
$message = $quote_string . $message;
$message = str_replace("\n", "\n" . $quote_string, $message);
$message_parser->message = $quote_attributes['author'] . " " . $user->lang['WROTE'] . ":\n" . $message . "\n";
}
if ($message_link)
{
$message_parser->message = $message_link . $message_parser->message;
}
}

View file

@ -327,6 +327,7 @@ class messenger
$subject = $this->subject;
$message = $this->msg;
$template = $this->template;
/**
* Event to modify notification message text before parsing
*
@ -336,13 +337,16 @@ class messenger
* and the message without sending it
* @var string subject The message subject
* @var string message The message text
* @var \phpbb\template\template template Template object
* @since 3.1.11-RC1
* @changed 3.2.4-RC1 Added template
*/
$vars = array(
'method',
'break',
'subject',
'message',
'template',
);
extract($phpbb_dispatcher->trigger_event('core.modify_notification_message', compact($vars)));
$this->subject = $subject;
@ -517,7 +521,7 @@ class messenger
*/
function msg_email()
{
global $config;
global $config, $phpbb_dispatcher;
if (empty($config['email_enable']))
{
@ -545,6 +549,33 @@ class messenger
$contact_name = htmlspecialchars_decode($config['board_contact_name']);
$board_contact = (($contact_name !== '') ? '"' . mail_encode($contact_name) . '" ' : '') . '<' . $config['board_contact'] . '>';
$break = false;
$addresses = $this->addresses;
$subject = $this->subject;
$msg = $this->msg;
/**
* Event to send message via external transport
*
* @event core.notification_message_email
* @var bool break Flag indicating if the function return after hook
* @var array addresses The message recipients
* @var string subject The message subject
* @var string msg The message text
* @since 3.2.4-RC1
*/
$vars = array(
'break',
'addresses',
'subject',
'msg',
);
extract($phpbb_dispatcher->trigger_event('core.notification_message_email', compact($vars)));
if ($break)
{
return true;
}
if (empty($this->replyto))
{
$this->replyto = $board_contact;
@ -783,7 +814,7 @@ class queue
*/
function process()
{
global $config, $phpEx, $phpbb_root_path, $user;
global $config, $phpEx, $phpbb_root_path, $user, $phpbb_dispatcher;
$lock = new \phpbb\lock\flock($this->cache_file);
$lock->acquire();
@ -880,23 +911,45 @@ class queue
switch ($object)
{
case 'email':
$err_msg = '';
$to = (!$to) ? 'undisclosed-recipients:;' : $to;
$break = false;
/**
* Event to send message via external transport
*
* @event core.notification_message_process
* @var bool break Flag indicating if the function return after hook
* @var array addresses The message recipients
* @var string subject The message subject
* @var string msg The message text
* @since 3.2.4-RC1
*/
$vars = array(
'break',
'addresses',
'subject',
'msg',
);
extract($phpbb_dispatcher->trigger_event('core.notification_message_process', compact($vars)));
if ($config['smtp_delivery'])
if (!$break)
{
$result = smtpmail($addresses, mail_encode($subject), wordwrap(utf8_wordwrap($msg), 997, "\n", true), $err_msg, $headers);
}
else
{
$result = phpbb_mail($to, $subject, $msg, $headers, PHP_EOL, $err_msg);
}
$err_msg = '';
$to = (!$to) ? 'undisclosed-recipients:;' : $to;
if (!$result)
{
$messenger = new messenger();
$messenger->error('EMAIL', $err_msg);
continue 2;
if ($config['smtp_delivery'])
{
$result = smtpmail($addresses, mail_encode($subject), wordwrap(utf8_wordwrap($msg), 997, "\n", true), $err_msg, $headers);
}
else
{
$result = phpbb_mail($to, $subject, $msg, $headers, PHP_EOL, $err_msg);
}
if (!$result)
{
$messenger = new messenger();
$messenger->error('EMAIL', $err_msg);
continue 2;
}
}
break;

View file

@ -2282,6 +2282,19 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll_ary, &$data
'post_subject' => $subject,
));
/**
* This event allows you to modify the notification data upon submission
*
* @event core.modify_submit_notification_data
* @var array notification_data The notification data to be inserted in to the database
* @var array data_ary The data array with a lot of the post submission data
* @var string mode The posting mode
* @var int poster_id The poster id
* @since 3.2.4-RC1
*/
$vars = array('notification_data', 'data_ary', 'mode', 'poster_id');
extract($phpbb_dispatcher->trigger_event('core.modify_submit_notification_data', compact($vars)));
/* @var $phpbb_notifications \phpbb\notification\manager */
$phpbb_notifications = $phpbb_container->get('notification_manager');
@ -2309,8 +2322,14 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll_ary, &$data
case 'edit_first_post':
case 'edit':
case 'edit_last_post':
if ($user->data['user_id'] == $poster_id)
{
$phpbb_notifications->update_notifications(array(
'notification.type.quote',
), $notification_data);
}
$phpbb_notifications->update_notifications(array(
'notification.type.quote',
'notification.type.bookmark',
'notification.type.topic',
'notification.type.post',

View file

@ -666,7 +666,7 @@ function user_delete($mode, $user_ids, $retain_username = true)
delete_posts('poster_id', $user_ids);
}
$table_ary = array(USERS_TABLE, USER_GROUP_TABLE, TOPICS_WATCH_TABLE, FORUMS_WATCH_TABLE, ACL_USERS_TABLE, TOPICS_TRACK_TABLE, TOPICS_POSTED_TABLE, FORUMS_TRACK_TABLE, PROFILE_FIELDS_DATA_TABLE, MODERATOR_CACHE_TABLE, DRAFTS_TABLE, BOOKMARKS_TABLE, SESSIONS_KEYS_TABLE, PRIVMSGS_FOLDER_TABLE, PRIVMSGS_RULES_TABLE);
$table_ary = array(USERS_TABLE, USER_GROUP_TABLE, TOPICS_WATCH_TABLE, FORUMS_WATCH_TABLE, ACL_USERS_TABLE, TOPICS_TRACK_TABLE, TOPICS_POSTED_TABLE, FORUMS_TRACK_TABLE, PROFILE_FIELDS_DATA_TABLE, MODERATOR_CACHE_TABLE, DRAFTS_TABLE, BOOKMARKS_TABLE, SESSIONS_KEYS_TABLE, PRIVMSGS_FOLDER_TABLE, PRIVMSGS_RULES_TABLE, $phpbb_container->getParameter('tables.auth_provider_oauth_token_storage'), $phpbb_container->getParameter('tables.auth_provider_oauth_states'), $phpbb_container->getParameter('tables.auth_provider_oauth_account_assoc'));
// Delete the miscellaneous (non-post) data for the user
foreach ($table_ary as $table)
@ -1429,21 +1429,14 @@ function user_ipwhois($ip)
return '';
}
if (preg_match(get_preg_expression('ipv4'), $ip))
{
// IPv4 address
$whois_host = 'whois.arin.net.';
}
else if (preg_match(get_preg_expression('ipv6'), $ip))
{
// IPv6 address
$whois_host = 'whois.sixxs.net.';
}
else
if (!preg_match(get_preg_expression('ipv4'), $ip) && !preg_match(get_preg_expression('ipv6'), $ip))
{
return '';
}
// IPv4 & IPv6 addresses
$whois_host = 'whois.arin.net.';
$ipwhois = '';
if (($fsk = @fsockopen($whois_host, 43)))
@ -3604,11 +3597,6 @@ function remove_newly_registered($user_id, $user_data = false)
}
}
if (empty($user_data['user_new']))
{
return false;
}
$sql = 'SELECT group_id
FROM ' . GROUPS_TABLE . "
WHERE group_name = 'NEWLY_REGISTERED'

View file

@ -213,6 +213,10 @@ function mcp_post_details($id, $mode, $action)
$l_deleted_by = '';
}
// parse signature
$parse_flags = ($post_info['user_sig_bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES;
$post_info['user_sig'] = generate_text_for_display($post_info['user_sig'], $post_info['user_sig_bbcode_uid'], $post_info['user_sig_bbcode_bitfield'], $parse_flags, true);
$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
@ -262,6 +266,7 @@ function mcp_post_details($id, $mode, $action)
'POST_IP' => $post_info['poster_ip'],
'POST_IPADDR' => ($auth->acl_get('m_info', $post_info['forum_id']) && $request->variable('lookup', '')) ? @gethostbyaddr($post_info['poster_ip']) : '',
'POST_ID' => $post_info['post_id'],
'SIGNATURE' => $post_info['user_sig'],
'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']}") : '',

View file

@ -242,6 +242,10 @@ class mcp_reports
}
}
// parse signature
$parse_flags = ($post_info['user_sig_bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES;
$post_info['user_sig'] = generate_text_for_display($post_info['user_sig'], $post_info['user_sig_bbcode_uid'], $post_info['user_sig_bbcode_bitfield'], $parse_flags, true);
$template->assign_vars(array(
'S_MCP_REPORT' => true,
'S_CLOSE_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&amp;mode=report_details&amp;f=' . $post_info['forum_id'] . '&amp;p=' . $post_id),
@ -291,6 +295,7 @@ class mcp_reports
'POST_IP' => $post_info['poster_ip'],
'POST_IPADDR' => ($auth->acl_get('m_info', $post_info['forum_id']) && $request->variable('lookup', '')) ? @gethostbyaddr($post_info['poster_ip']) : '',
'POST_ID' => $post_info['post_id'],
'SIGNATURE' => $post_info['user_sig'],
'U_LOOKUP_IP' => ($auth->acl_get('m_info', $post_info['forum_id'])) ? $this->u_action . '&amp;r=' . $report_id . '&amp;p=' . $post_id . '&amp;f=' . $forum_id . '&amp;lookup=' . $post_info['poster_ip'] . '#ip' : '',
));

View file

@ -77,6 +77,22 @@ class ucp_main
// If the user can't see any forums, he can't read any posts because fid of 0 is invalid
if (!empty($forum_ary))
{
/**
* Modify sql variables before query is processed
*
* @event core.ucp_main_front_modify_sql
* @var string sql_select SQL select
* @var string sql_from SQL from
* @var array forum_ary Forum array
* @since 3.2.4-RC1
*/
$vars = array(
'sql_select',
'sql_from',
'forum_ary',
);
extract($phpbb_dispatcher->trigger_event('core.ucp_main_front_modify_sql', compact($vars)));
$sql = "SELECT t.* $sql_select
FROM $sql_from
WHERE t.topic_type = " . POST_GLOBAL . '
@ -144,7 +160,7 @@ class ucp_main
$folder_img .= '_mine';
}
$template->assign_block_vars('topicrow', array(
$topicrow = array(
'FORUM_ID' => $forum_id,
'TOPIC_ID' => $topic_id,
'TOPIC_AUTHOR' => get_username_string('username', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
@ -171,8 +187,30 @@ class ucp_main
'U_LAST_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=$topic_id&amp;p=" . $row['topic_last_post_id']) . '#p' . $row['topic_last_post_id'],
'U_LAST_POST_AUTHOR' => get_username_string('profile', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
'U_NEWEST_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=$topic_id&amp;view=unread") . '#unread',
'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=$topic_id"))
'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=$topic_id"),
);
/**
* Add template variables to a front topics row.
*
* @event core.ucp_main_front_modify_template_vars
* @var array topicrow Array containing the template variables for the row
* @var array row Array containing the subscribed forum row data
* @var int forum_id Forum ID
* @var string folder_img Folder image
* @var string folder_alt Alt text for the folder image
* @since 3.2.4-RC1
*/
$vars = array(
'topicrow',
'row',
'forum_id',
'folder_img',
'folder_alt',
);
extract($phpbb_dispatcher->trigger_event('core.ucp_main_front_modify_template_vars', compact($vars)));
$template->assign_block_vars('topicrow', $topicrow);
}
if ($config['load_user_activity'])
@ -502,6 +540,9 @@ class ucp_main
$draft_subject = $draft_message = '';
add_form_key('ucp_draft');
include_once($phpbb_root_path . 'includes/message_parser.' . $phpEx);
$message_parser = new parse_message();
if ($delete)
{
if (check_form_key('ucp_draft'))
@ -535,9 +576,19 @@ class ucp_main
{
if ($draft_message && $draft_subject)
{
// $auth->acl_gets can't be used here because it will check for global forum permissions in this case
// In general we don't need too harsh checking here for permissions, as this will be handled later when submitting
$bbcode_status = $auth->acl_get('u_pm_bbcode') || $auth->acl_getf_global('f_bbcode');
$smilies_status = $auth->acl_get('u_pm_smilies') || $auth->acl_getf_global('f_smilies');
$img_status = $auth->acl_get('u_pm_img') || $auth->acl_getf_global('f_img');
$flash_status = $auth->acl_get('u_pm_flash') || $auth->acl_getf_global('f_flash');
$message_parser->message = $draft_message;
$message_parser->parse($bbcode_status, $config['allow_post_links'], $smilies_status, $img_status, $flash_status, true, $config['allow_post_links']);
$draft_row = array(
'draft_subject' => $draft_subject,
'draft_message' => $draft_message
'draft_message' => $message_parser->message,
);
$sql = 'UPDATE ' . DRAFTS_TABLE . '
@ -639,9 +690,16 @@ class ucp_main
$insert_url = append_sid("{$phpbb_root_path}ucp.$phpEx", "i=$id&amp;mode=compose&amp;d=" . $draft['draft_id']);
}
if (!$submit)
{
$message_parser->message = $draft['draft_message'];
$message_parser->decode_message();
$draft_message = $message_parser->message;
}
$template_row = array(
'DATE' => $user->format_date($draft['save_time']),
'DRAFT_MESSAGE' => ($submit) ? $draft_message : $draft['draft_message'],
'DRAFT_MESSAGE' => $draft_message,
'DRAFT_SUBJECT' => ($submit) ? $draft_subject : $draft['draft_subject'],
'TITLE' => $title,

View file

@ -124,7 +124,7 @@ function compose_pm($id, $mode, $action, $user_folders = array())
// Add groups to PM box
if ($config['allow_mass_pm'] && $auth->acl_get('u_masspm_group'))
{
$sql = 'SELECT g.group_id, g.group_name, g.group_type
$sql = 'SELECT g.group_id, g.group_name, g.group_type, g.group_colour
FROM ' . GROUPS_TABLE . ' g';
if (!$auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel'))
@ -147,7 +147,7 @@ function compose_pm($id, $mode, $action, $user_folders = array())
$group_options = '';
while ($row = $db->sql_fetchrow($result))
{
$group_options .= '<option' . (($row['group_type'] == GROUP_SPECIAL) ? ' class="sep"' : '') . ' value="' . $row['group_id'] . '">' . $group_helper->get_name($row['group_name']) . '</option>';
$group_options .= '<option' . (($row['group_type'] == GROUP_SPECIAL) ? ' class="sep"' : '') . ' value="' . $row['group_id'] . '"' . ($row['group_colour'] ? ' style="color: #' . $row['group_colour'] . '"' : '') . '>' . $group_helper->get_name($row['group_name']) . '</option>';
}
$db->sql_freeresult($result);
}
@ -658,13 +658,16 @@ function compose_pm($id, $mode, $action, $user_folders = array())
{
if (confirm_box(true))
{
$message_parser->message = $message;
$message_parser->parse($bbcode_status, $url_status, $smilies_status, $img_status, $flash_status, true, $url_status);
$sql = 'INSERT INTO ' . DRAFTS_TABLE . ' ' . $db->sql_build_array('INSERT', array(
'user_id' => $user->data['user_id'],
'topic_id' => 0,
'forum_id' => 0,
'save_time' => $current_time,
'draft_subject' => $subject,
'draft_message' => $message
'draft_message' => $message_parser->message,
)
);
$db->sql_query($sql);
@ -953,7 +956,16 @@ function compose_pm($id, $mode, $action, $user_folders = array())
$post_id = $request->variable('p', 0);
if ($config['allow_post_links'])
{
$message_link = "[url=" . generate_board_url() . "/viewtopic.$phpEx?p={$post_id}#p{$post_id}]{$user->lang['SUBJECT']}{$user->lang['COLON']} {$message_subject}[/url]\n\n";
$message_link = generate_board_url() . "/viewtopic.$phpEx?p={$post_id}#p{$post_id}";
$message_link_subject = "{$user->lang['SUBJECT']}{$user->lang['COLON']} {$message_subject}";
if ($bbcode_status)
{
$message_link = "[url=" . $message_link . "]" . $message_link_subject . "[/url]\n\n";
}
else
{
$message_link = $message_link . " - " . $message_link_subject . "\n\n";
}
}
else
{
@ -973,11 +985,8 @@ function compose_pm($id, $mode, $action, $user_folders = array())
{
$quote_attributes['post_id'] = $post['msg_id'];
}
$quote_text = $phpbb_container->get('text_formatter.utils')->generate_quote(
censor_text($message_parser->message),
$quote_attributes
);
$message_parser->message = $message_link . $quote_text . "\n\n";
phpbb_format_quote($bbcode_status, $quote_attributes, $phpbb_container->get('text_formatter.utils'), $message_parser, $message_link);
}
if (($action == 'reply' || $action == 'quote' || $action == 'quotepost') && !$preview && !$refresh)
@ -1260,7 +1269,7 @@ function compose_pm($id, $mode, $action, $user_folders = array())
function handle_message_list_actions(&$address_list, &$error, $remove_u, $remove_g, $add_to, $add_bcc)
{
global $auth, $db, $user;
global $request;
global $request, $phpbb_dispatcher;
// Delete User [TO/BCC]
if ($remove_u && $request->variable('remove_u', array(0 => '')))
@ -1437,6 +1446,21 @@ function handle_message_list_actions(&$address_list, &$error, $remove_u, $remove
$error[] = $user->lang['PM_USERS_REMOVED_NO_PERMISSION'];
}
}
/**
* Event for additional message list actions
*
* @event core.message_list_actions
* @var array address_list The assoc array with the recipient user/group ids
* @var array error The array containing error data
* @var bool remove_u The variable for removing a user
* @var bool remove_g The variable for removing a group
* @var bool add_to The variable for adding a user to the [TO] field
* @var bool add_bcc The variable for adding a user to the [BCC] field
* @since 3.2.4-RC1
*/
$vars = array('address_list', 'error', 'remove_u', 'remove_g', 'add_to', 'add_bcc');
extract($phpbb_dispatcher->trigger_event('core.message_list_actions', compact($vars)));
}
/**

View file

@ -371,7 +371,7 @@ $lang = array_merge($lang, array(
'ACP_CONTACT_SETTINGS_EXPLAIN' => 'Here you can enable and disable the contact page and also add a text that is displayed on the page.',
'CONTACT_US_ENABLE' => 'Enable contact page',
'CONTACT_US_ENABLE_EXPLAIN' => 'This page allows users to send emails to board administrators. Please note that board-wide emails option must be enabled as well. You can find this option in General > Client Communication > Email settings.',
'CONTACT_US_ENABLE_EXPLAIN' => 'This page allows users to send emails to board administrators. Please note that board-wide emails option must be enabled as well. You can find this option in General &gt; Client Communication &gt; Email settings.',
'CONTACT_US_INFO' => 'Contact information',
'CONTACT_US_INFO_EXPLAIN' => 'The message is displayed on the contact page',

View file

@ -49,7 +49,7 @@ $lang = array_merge($lang, array(
'ANSWER' => 'Answer',
'EDIT_QUESTION' => 'Edit Question',
'QUESTIONS' => 'Questions',
'QUESTIONS_EXPLAIN' => 'For every form submission where you have enabled the Q&amp;A plugin, users will be asked one of the questions specified here. To use this plugin at least one question must be set in the default language. These questions should be easy for your target audience to answer but beyond the ability of a bot capable of running a Google™ search. Using a large and regularly changed set of questions will yield the best results. Enable the strict setting if your question relies on mixed case, punctuation or whitespace.',
'QUESTIONS_EXPLAIN' => 'For every form submission where you have enabled the Q&amp;A plugin, users will be asked one of the questions specified here. To use this plugin at least one question must be set in the default language. These questions should be easy for your target audience to answer but beyond the ability of a bot capable of running a Google™ search. Only a single proper question is necessary. If you start receiving spam registrations, the question should be changed. Enable the strict setting if your question relies on mixed case, punctuation or whitespace.',
'QUESTION_DELETED' => 'Question deleted',
'QUESTION_LANG' => 'Language',
'QUESTION_LANG_EXPLAIN' => 'The language this question and its answers are written in.',

View file

@ -104,6 +104,8 @@ class delete
$this->set_sql_constraints($mode);
$sql_id = $this->sql_id;
/**
* Perform additional actions before collecting data for attachment(s) deletion
*
@ -122,11 +124,21 @@ class delete
);
extract($this->dispatcher->trigger_event('core.delete_attachments_collect_data_before', compact($vars)));
$this->sql_id = $sql_id;
unset($sql_id);
// Collect post and topic ids for later use if we need to touch remaining entries (if resync is enabled)
$this->collect_attachment_info($resync);
// Delete attachments from database
$this->delete_attachments_from_db();
$this->delete_attachments_from_db($mode, $ids, $resync);
$sql_id = $this->sql_id;
$post_ids = $this->post_ids;
$topic_ids = $this->topic_ids;
$message_ids = $this->message_ids;
$physical = $this->physical;
$num_deleted = $this->num_deleted;
/**
* Perform additional actions after attachment(s) deletion from the database
@ -156,13 +168,21 @@ class delete
);
extract($this->dispatcher->trigger_event('core.delete_attachments_from_database_after', compact($vars)));
$this->sql_id = $sql_id;
$this->post_ids = $post_ids;
$this->topic_ids = $topic_ids;
$this->message_ids = $message_ids;
$this->physical = $physical;
$this->num_deleted = $num_deleted;
unset($sql_id, $post_ids, $topic_ids, $message_ids, $physical, $num_deleted);
if (!$this->num_deleted)
{
return 0;
}
// Delete attachments from filesystem
$this->remove_from_filesystem();
$this->remove_from_filesystem($mode, $ids, $resync);
// If we do not resync, we do not need to adjust any message, post, topic or user entries
if (!$resync)
@ -288,8 +308,14 @@ class delete
/**
* Delete attachments from database table
*/
protected function delete_attachments_from_db()
protected function delete_attachments_from_db($mode, $ids, $resync)
{
$sql_id = $this->sql_id;
$post_ids = $this->post_ids;
$topic_ids = $this->topic_ids;
$message_ids = $this->message_ids;
$physical = $this->physical;
/**
* Perform additional actions before attachment(s) deletion
*
@ -316,6 +342,13 @@ class delete
);
extract($this->dispatcher->trigger_event('core.delete_attachments_before', compact($vars)));
$this->sql_id = $sql_id;
$this->post_ids = $post_ids;
$this->topic_ids = $topic_ids;
$this->message_ids = $message_ids;
$this->physical = $physical;
unset($sql_id, $post_ids, $topic_ids, $message_ids, $physical);
// Delete attachments
$sql = 'DELETE FROM ' . ATTACHMENTS_TABLE . '
WHERE ' . $this->db->sql_in_set($this->sql_id, $this->ids);
@ -329,7 +362,7 @@ class delete
/**
* Delete attachments from filesystem
*/
protected function remove_from_filesystem()
protected function remove_from_filesystem($mode, $ids, $resync)
{
$space_removed = $files_removed = 0;
@ -348,6 +381,13 @@ class delete
}
}
$sql_id = $this->sql_id;
$post_ids = $this->post_ids;
$topic_ids = $this->topic_ids;
$message_ids = $this->message_ids;
$physical = $this->physical;
$num_deleted = $this->num_deleted;
/**
* Perform additional actions after attachment(s) deletion from the filesystem
*
@ -380,6 +420,14 @@ class delete
);
extract($this->dispatcher->trigger_event('core.delete_attachments_from_filesystem_after', compact($vars)));
$this->sql_id = $sql_id;
$this->post_ids = $post_ids;
$this->topic_ids = $topic_ids;
$this->message_ids = $message_ids;
$this->physical = $physical;
$this->num_deleted = $num_deleted;
unset($sql_id, $post_ids, $topic_ids, $message_ids, $physical, $num_deleted);
if ($space_removed || $files_removed)
{
$this->config->increment('upload_dir_size', $space_removed * (-1), false);

View file

@ -55,21 +55,26 @@ class prune_all_forums extends \phpbb\cron\task\base
include($this->phpbb_root_path . 'includes/functions_admin.' . $this->php_ext);
}
$sql = 'SELECT forum_id, prune_next, enable_prune, prune_days, prune_viewed, forum_flags, prune_freq
FROM ' . FORUMS_TABLE . "
WHERE enable_prune = 1
AND prune_next < " . time();
$sql = 'SELECT forum_id, prune_next, enable_prune, prune_days, prune_viewed, enable_shadow_prune, prune_shadow_days, prune_shadow_freq, prune_shadow_next, forum_flags, prune_freq
FROM ' . FORUMS_TABLE;
$result = $this->db->sql_query($sql);
while ($row = $this->db->sql_fetchrow($result))
{
if ($row['prune_days'])
if ($row['enable_prune'] && $row['prune_next'] < time())
{
auto_prune($row['forum_id'], 'posted', $row['forum_flags'], $row['prune_days'], $row['prune_freq']);
}
if ($row['prune_days'])
{
auto_prune($row['forum_id'], 'posted', $row['forum_flags'], $row['prune_days'], $row['prune_freq']);
}
if ($row['prune_viewed'])
if ($row['prune_viewed'])
{
auto_prune($row['forum_id'], 'viewed', $row['forum_flags'], $row['prune_viewed'], $row['prune_freq']);
}
}
if ($row['enable_shadow_prune'] && $row['prune_shadow_next'] < time() && $row['prune_shadow_days'])
{
auto_prune($row['forum_id'], 'viewed', $row['forum_flags'], $row['prune_viewed'], $row['prune_freq']);
auto_prune($row['forum_id'], 'shadow', $row['forum_flags'], $row['prune_shadow_days'], $row['prune_shadow_freq']);
}
}
$this->db->sql_freeresult($result);

View file

@ -0,0 +1,37 @@
<?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.
*
*/
namespace phpbb\db\migration\data\v32x;
class forum_topics_per_page_type extends \phpbb\db\migration\migration
{
static public function depends_on()
{
return array(
'\phpbb\db\migration\data\v32x\v323',
);
}
public function update_schema()
{
return array(
'change_columns' => array(
$this->table_prefix . 'forums' => array(
'forum_topics_per_page' => array('USINT', 0),
),
),
);
}
}

View file

@ -439,16 +439,9 @@ class md_exporter
$event_list = array();
$file_content = file_get_contents($this->path . $file);
$events = explode('<!-- EVENT ', $file_content);
// Remove the code before the first event
array_shift($events);
foreach ($events as $event)
{
$event = explode(' -->', $event, 2);
$event_list[] = array_shift($event);
}
preg_match_all('/(?:{%|<!--) EVENT (.*) (?:%}|-->)/U', $file_content, $event_list);
return $event_list;
return $event_list[1];
}
/**

View file

@ -150,8 +150,6 @@ class request implements \phpbb\request\request_interface
return;
}
$this->type_cast_helper->add_magic_quotes($value);
// setting to null means unsetting
if ($value === null)
{

View file

@ -18,69 +18,6 @@ namespace phpbb\request;
*/
class type_cast_helper implements \phpbb\request\type_cast_helper_interface
{
/**
* @var string Whether slashes need to be stripped from input
*/
protected $strip;
/**
* Initialises the type cast helper class.
* All it does is find out whether magic quotes are turned on.
*/
public function __construct()
{
if (version_compare(PHP_VERSION, '5.4.0-dev', '>='))
{
$this->strip = false;
}
else
{
$this->strip = (@get_magic_quotes_gpc()) ? true : false;
}
}
/**
* Recursively applies addslashes to a variable.
*
* @param mixed &$var Variable passed by reference to which slashes will be added.
*/
public function addslashes_recursively(&$var)
{
if (is_string($var))
{
$var = addslashes($var);
}
else if (is_array($var))
{
$var_copy = $var;
$var = array();
foreach ($var_copy as $key => $value)
{
if (is_string($key))
{
$key = addslashes($key);
}
$var[$key] = $value;
$this->addslashes_recursively($var[$key]);
}
}
}
/**
* Recursively applies addslashes to a variable if magic quotes are turned on.
*
* @param mixed &$var Variable passed by reference to which slashes will be added.
*/
public function add_magic_quotes(&$var)
{
if ($this->strip)
{
$this->addslashes_recursively($var);
}
}
/**
* Set variable $result to a particular type.
*
@ -129,8 +66,6 @@ class type_cast_helper implements \phpbb\request\type_cast_helper_interface
$result = preg_replace('/[\x80-\xFF]/', '?', $result);
}
}
$result = ($this->strip) ? stripslashes($result) : $result;
}
}

View file

@ -18,20 +18,6 @@ namespace phpbb\request;
*/
interface type_cast_helper_interface
{
/**
* Recursively applies addslashes to a variable.
*
* @param mixed &$var Variable passed by reference to which slashes will be added.
*/
public function addslashes_recursively(&$var);
/**
* Recursively applies addslashes to a variable if magic quotes are turned on.
*
* @param mixed &$var Variable passed by reference to which slashes will be added.
*/
public function add_magic_quotes(&$var);
/**
* Set variable $result to a particular type.
*

View file

@ -292,7 +292,6 @@ class fulltext_sphinx
AND p.post_id >= $start AND p.post_id <= $end'),
array('sql_query_post', ''),
array('sql_query_post_index', 'UPDATE ' . SPHINX_TABLE . ' SET max_doc_id = $maxid WHERE counter_id = 1'),
array('sql_query_info', 'SELECT * FROM ' . POSTS_TABLE . ' WHERE post_id = $id'),
array('sql_attr_uint', 'forum_id'),
array('sql_attr_uint', 'topic_id'),
array('sql_attr_uint', 'poster_id'),
@ -333,7 +332,6 @@ class fulltext_sphinx
array('morphology', 'none'),
array('stopwords', ''),
array('min_word_len', '2'),
array('charset_type', 'utf-8'),
array('charset_table', 'U+FF10..U+FF19->0..9, 0..9, U+FF41..U+FF5A->a..z, U+FF21..U+FF3A->a..z, A..Z->a..z, a..z, U+0149, U+017F, U+0138, U+00DF, U+00FF, U+00C0..U+00D6->U+00E0..U+00F6, U+00E0..U+00F6, U+00D8..U+00DE->U+00F8..U+00FE, U+00F8..U+00FE, U+0100->U+0101, U+0101, U+0102->U+0103, U+0103, U+0104->U+0105, U+0105, U+0106->U+0107, U+0107, U+0108->U+0109, U+0109, U+010A->U+010B, U+010B, U+010C->U+010D, U+010D, U+010E->U+010F, U+010F, U+0110->U+0111, U+0111, U+0112->U+0113, U+0113, U+0114->U+0115, U+0115, U+0116->U+0117, U+0117, U+0118->U+0119, U+0119, U+011A->U+011B, U+011B, U+011C->U+011D, U+011D, U+011E->U+011F, U+011F, U+0130->U+0131, U+0131, U+0132->U+0133, U+0133, U+0134->U+0135, U+0135, U+0136->U+0137, U+0137, U+0139->U+013A, U+013A, U+013B->U+013C, U+013C, U+013D->U+013E, U+013E, U+013F->U+0140, U+0140, U+0141->U+0142, U+0142, U+0143->U+0144, U+0144, U+0145->U+0146, U+0146, U+0147->U+0148, U+0148, U+014A->U+014B, U+014B, U+014C->U+014D, U+014D, U+014E->U+014F, U+014F, U+0150->U+0151, U+0151, U+0152->U+0153, U+0153, U+0154->U+0155, U+0155, U+0156->U+0157, U+0157, U+0158->U+0159, U+0159, U+015A->U+015B, U+015B, U+015C->U+015D, U+015D, U+015E->U+015F, U+015F, U+0160->U+0161, U+0161, U+0162->U+0163, U+0163, U+0164->U+0165, U+0165, U+0166->U+0167, U+0167, U+0168->U+0169, U+0169, U+016A->U+016B, U+016B, U+016C->U+016D, U+016D, U+016E->U+016F, U+016F, U+0170->U+0171, U+0171, U+0172->U+0173, U+0173, U+0174->U+0175, U+0175, U+0176->U+0177, U+0177, U+0178->U+00FF, U+00FF, U+0179->U+017A, U+017A, U+017B->U+017C, U+017C, U+017D->U+017E, U+017E, U+0410..U+042F->U+0430..U+044F, U+0430..U+044F, U+4E00..U+9FFF'),
array('min_prefix_len', '0'),
array('min_infix_len', '0'),
@ -346,14 +344,12 @@ class fulltext_sphinx
array('mem_limit', $this->config['fulltext_sphinx_indexer_mem_limit'] . 'M'),
),
'searchd' => array(
array('compat_sphinxql_magics' , '0'),
array('listen' , ($this->config['fulltext_sphinx_host'] ? $this->config['fulltext_sphinx_host'] : 'localhost') . ':' . ($this->config['fulltext_sphinx_port'] ? $this->config['fulltext_sphinx_port'] : '9312')),
array('log', $this->config['fulltext_sphinx_data_path'] . 'log/searchd.log'),
array('query_log', $this->config['fulltext_sphinx_data_path'] . 'log/sphinx-query.log'),
array('read_timeout', '5'),
array('max_children', '30'),
array('pid_file', $this->config['fulltext_sphinx_data_path'] . 'searchd.pid'),
array('max_matches', (string) SPHINX_MAX_MATCHES),
array('binlog_path', $this->config['fulltext_sphinx_data_path']),
),
);
@ -648,7 +644,7 @@ class fulltext_sphinx
$this->sphinx->SetFilter('deleted', array(0));
$this->sphinx->SetLimits($start, (int) $per_page, SPHINX_MAX_MATCHES);
$this->sphinx->SetLimits((int) $start, (int) $per_page, SPHINX_MAX_MATCHES);
$result = $this->sphinx->Query($search_query_prefix . $this->sphinx->EscapeString(str_replace('&quot;', '"', $this->search_query)), $this->indexes);
// Could be connection to localhost:9312 failed (errno=111,

View file

@ -1627,35 +1627,14 @@ if ($generate_quote)
// Remove attachment bbcode tags from the quoted message to avoid mixing with the new post attachments if any
$message_parser->message = preg_replace('#\[attachment=([0-9]+)\](.*?)\[\/attachment\]#uis', '\\2', $message_parser->message);
if ($config['allow_bbcode'])
{
$message_parser->message = $bbcode_utils->generate_quote(
censor_text($message_parser->message),
array(
'author' => $post_data['quote_username'],
'post_id' => $post_data['post_id'],
'time' => $post_data['post_time'],
'user_id' => $post_data['poster_id'],
)
);
$message_parser->message .= "\n\n";
}
else
{
$offset = 0;
$quote_string = "&gt; ";
$message = censor_text(trim($message_parser->message));
// see if we are nesting. It's easily tricked but should work for one level of nesting
if (strpos($message, "&gt;") !== false)
{
$offset = 10;
}
$message = utf8_wordwrap($message, 75 + $offset, "\n");
$quote_attributes = array(
'author' => $post_data['quote_username'],
'post_id' => $post_data['post_id'],
'time' => $post_data['post_time'],
'user_id' => $post_data['poster_id'],
);
$message = $quote_string . $message;
$message = str_replace("\n", "\n" . $quote_string, $message);
$message_parser->message = $post_data['quote_username'] . " " . $user->lang['WROTE'] . ":\n" . $message . "\n";
}
phpbb_format_quote($config['allow_bbcode'], $quote_attributes, $bbcode_utils, $message_parser);
}
if (($mode == 'reply' || $mode == 'quote') && !$submit && !$preview && !$refresh)

View file

@ -199,7 +199,7 @@ phpbb.addAjaxCallback('zebra', function(res) {
*/
phpbb.addAjaxCallback('vote_poll', function(res) {
if (typeof res.success !== 'undefined') {
var poll = $('.topic_poll');
var poll = $(this).closest('.topic_poll');
var panel = poll.find('.panel');
var resultsVisible = poll.find('dl:first-child .resultbar').is(':visible');
var mostVotes = 0;

View file

@ -49,6 +49,8 @@
</dl>
<!-- ENDIF -->
{% EVENT confirm_delete_body_delete_reason_before %}
<dl>
<dt><label for="delete_reason">{L_DELETE_REASON}{L_COLON}</label><br /><span>{L_DELETE_REASON_EXPLAIN}</span></dt>
<dd><input type="text" name="delete_reason" id="delete_reason" value="" class="inputbox autowidth" maxlength="120" size="45" /></dd>

View file

@ -273,11 +273,9 @@ function insertUser(formId, value) {
function insert_marked_users(formId, users) {
'use strict';
for (var i = 0; i < users.length; i++) {
if (users[i].checked) {
insertUser(formId, users[i].value);
}
}
$(users).filter(':checked').each(function() {
insertUser(formId, this.value);
});
window.close();
}
@ -612,7 +610,7 @@ function parseDocument($container) {
// If there are any images in the links list, run the check again after they have loaded
$linksAll.find('img').each(function() {
$(this).load(function() {
$(this).on('load', function() {
check();
});
});

View file

@ -11,10 +11,10 @@
<!-- BEGIN bans -->
ban_length['{bans.BAN_ID}'] = '{bans.A_LENGTH}';
<!-- IF bans.A_REASON -->
ban_reason['{bans.BAN_ID}'] = '{bans.A_REASON}';
ban_reason['{bans.BAN_ID}'] = '{{ bans.A_REASON | e('js') }}';
<!-- ENDIF -->
<!-- IF bans.A_GIVE_REASON -->
ban_give_reason['{bans.BAN_ID}'] = '{bans.A_GIVE_REASON}';
ban_give_reason['{bans.BAN_ID}'] = '{{ bans.A_GIVE_REASON | e('js') }}';
<!-- ENDIF -->
<!-- END bans -->

View file

@ -31,10 +31,12 @@
<form method="post" id="mcp_report" action="{S_CLOSE_ACTION}">
<fieldset class="submit-buttons">
{% EVENT mcp_post_report_buttons_top_before %}
<!-- IF not S_REPORT_CLOSED -->
<input class="button1" type="submit" value="{L_CLOSE_REPORT}" name="action[close]" /> &nbsp;
<!-- ENDIF -->
<input class="button2" type="submit" value="{L_DELETE_REPORT}" name="action[delete]" />
{% EVENT mcp_post_report_buttons_top_after %}
<input type="hidden" name="report_id_list[]" value="{REPORT_ID}" />
{S_FORM_TOKEN}
</fieldset>
@ -69,8 +71,8 @@
<p class="author">
<strong>{L_SENT_AT}{L_COLON}</strong> {POST_DATE}
<br /><strong>{L_PM_FROM}{L_COLON}</strong> {POST_AUTHOR_FULL}
<!-- IF S_TO_RECIPIENT --><br /><strong>{L_TO}{L_COLON}</strong> <!-- BEGIN to_recipient --><!-- IF to_recipient.NAME_FULL -->{to_recipient.NAME_FULL}<!-- ELSE --><a href="{to_recipient.U_VIEW}" style="color:<!-- IF to_recipient.COLOUR -->{to_recipient.COLOUR}<!-- ELSEIF to_recipient.IS_GROUP -->#0000FF<!-- ENDIF -->;">{to_recipient.NAME}</a><!-- ENDIF -->&nbsp;<!-- END to_recipient --><!-- ENDIF -->
<!-- IF S_BCC_RECIPIENT --><br /><strong>{L_BCC}{L_COLON}</strong> <!-- BEGIN bcc_recipient --><!-- IF bcc_recipient.NAME_FULL -->{bcc_recipient.NAME_FULL}<!-- ELSE --><a href="{bcc_recipient.U_VIEW}" style="color:<!-- IF bcc_recipient.COLOUR -->{bcc_recipient.COLOUR}<!-- ELSEIF bcc_recipient.IS_GROUP -->#0000FF<!-- ENDIF -->;">{bcc_recipient.NAME}</a><!-- ENDIF -->&nbsp;<!-- END bcc_recipient --><!-- ENDIF -->
<!-- IF S_TO_RECIPIENT --><br /><strong>{L_TO}{L_COLON}</strong> <!-- BEGIN to_recipient --><!-- IF to_recipient.NAME_FULL -->{to_recipient.NAME_FULL}<!-- ELSE --><a href="{to_recipient.U_VIEW}"<!-- IF to_recipient.COLOUR --> style="color:{to_recipient.COLOUR};"<!-- ENDIF -->><strong>{to_recipient.NAME}</strong></a><!-- ENDIF -->&nbsp;<!-- END to_recipient --><!-- ENDIF -->
<!-- IF S_BCC_RECIPIENT --><br /><strong>{L_BCC}{L_COLON}</strong> <!-- BEGIN bcc_recipient --><!-- IF bcc_recipient.NAME_FULL -->{bcc_recipient.NAME_FULL}<!-- ELSE --><a href="{bcc_recipient.U_VIEW}"<!-- IF bcc_recipient.COLOUR --> style="color:{bcc_recipient.COLOUR};"<!-- ENDIF -->><strong>{bcc_recipient.NAME}</strong></a><!-- ENDIF -->&nbsp;<!-- END bcc_recipient --><!-- ENDIF -->
</p>
<!-- ELSE -->
<p class="author"><span><i class="icon fa-file fa-fw icon-lightgray icon-md" aria-hidden="true"></i><span class="sr-only">{MINI_POST_IMG}</span></span> {L_POSTED} {L_POST_BY_AUTHOR} {POST_AUTHOR_FULL} &raquo; {POST_DATE}</p>

View file

@ -178,9 +178,9 @@
</ul>
<ul id="nav-breadcrumbs" class="nav-breadcrumbs linklist navlinks" role="menubar">
<!-- DEFINE $MICRODATA = ' itemtype="http://data-vocabulary.org/Breadcrumb" itemscope=""' -->
<!-- DEFINE $MICRODATA = ' itemtype="http://schema.org/ListItem" itemprop="itemListElement" itemscope' -->
<!-- EVENT overall_header_breadcrumbs_before -->
<li class="breadcrumbs">
<li class="breadcrumbs" itemscope itemtype="http://schema.org/BreadcrumbList">
<!-- IF U_SITE_HOME -->
<span class="crumb" {$MICRODATA}><a href="{U_SITE_HOME}" itemprop="url" data-navbar-reference="home"><i class="icon fa-home fa-fw" aria-hidden="true"></i><span itemprop="title">{L_SITE_HOME}</span></a></span>
<!-- ENDIF -->

View file

@ -32,7 +32,7 @@
<!-- BEGIN to_recipient -->
<li>
<!-- IF not S_EDIT_POST --><input type="submit" name="remove_{to_recipient.TYPE}[{to_recipient.UG_ID}]" value="x" class="button2" /><!-- ENDIF -->
<!-- IF to_recipient.IS_GROUP --><a href="{to_recipient.U_VIEW}"><strong>{to_recipient.NAME}</strong></a><!-- ELSE -->{to_recipient.NAME_FULL}<!-- ENDIF -->
<!-- IF to_recipient.IS_GROUP --><a href="{to_recipient.U_VIEW}" style="color: {{ to_recipient.COLOUR }}"><strong>{to_recipient.NAME}</strong></a><!-- ELSE -->{to_recipient.NAME_FULL}<!-- ENDIF -->
</li>
<!-- END to_recipient -->
</ul>
@ -49,7 +49,7 @@
<!-- BEGIN bcc_recipient -->
<li>
<!-- IF not S_EDIT_POST --><input type="submit" name="remove_{bcc_recipient.TYPE}[{bcc_recipient.UG_ID}]" value="x" class="button2" /><!-- ENDIF -->
<!-- IF bcc_recipient.IS_GROUP --><a href="{bcc_recipient.U_VIEW}"><strong>{bcc_recipient.NAME}</strong></a><!-- ELSE -->{bcc_recipient.NAME_FULL}<!-- ENDIF -->
<!-- IF bcc_recipient.IS_GROUP --><a href="{bcc_recipient.U_VIEW}" style="color: {{ bcc_recipient.COLOUR }}"><strong>{bcc_recipient.NAME}</strong></a><!-- ELSE -->{bcc_recipient.NAME_FULL}<!-- ENDIF -->
</li>
<!-- END bcc_recipient -->
</ul>

View file

@ -34,5 +34,7 @@
{$SCRIPTS}
{% EVENT simple_footer_body_after %}
</body>
</html>

View file

@ -124,8 +124,8 @@
<p class="author">
<strong>{L_SENT_AT}{L_COLON}</strong> {SENT_DATE}
<br /><strong>{L_PM_FROM}{L_COLON}</strong> {MESSAGE_AUTHOR_FULL}
<!-- IF S_TO_RECIPIENT --><br /><strong>{L_TO}{L_COLON}</strong> <!-- BEGIN to_recipient --><!-- IF to_recipient.NAME_FULL -->{to_recipient.NAME_FULL}<!-- ELSE --><a href="{to_recipient.U_VIEW}" style="color:<!-- IF to_recipient.COLOUR -->{to_recipient.COLOUR}<!-- ELSEIF to_recipient.IS_GROUP -->#0000FF<!-- ENDIF -->;">{to_recipient.NAME}</a><!-- ENDIF -->&nbsp;<!-- END to_recipient --><!-- ENDIF -->
<!-- IF S_BCC_RECIPIENT --><br /><strong>{L_BCC}{L_COLON}</strong> <!-- BEGIN bcc_recipient --><!-- IF bcc_recipient.NAME_FULL -->{bcc_recipient.NAME_FULL}<!-- ELSE --><a href="{bcc_recipient.U_VIEW}" style="color:<!-- IF bcc_recipient.COLOUR -->{bcc_recipient.COLOUR}<!-- ELSEIF bcc_recipient.IS_GROUP -->#0000FF<!-- ENDIF -->;">{bcc_recipient.NAME}</a><!-- ENDIF -->&nbsp;<!-- END bcc_recipient --><!-- ENDIF -->
<!-- IF S_TO_RECIPIENT --><br /><strong>{L_TO}{L_COLON}</strong> <!-- BEGIN to_recipient --><!-- IF to_recipient.NAME_FULL -->{to_recipient.NAME_FULL}<!-- ELSE --><a href="{to_recipient.U_VIEW}"<!-- IF to_recipient.COLOUR --> style="color:{to_recipient.COLOUR};"<!-- ENDIF -->><strong>{to_recipient.NAME}</strong></a><!-- ENDIF -->&nbsp;<!-- END to_recipient --><!-- ENDIF -->
<!-- IF S_BCC_RECIPIENT --><br /><strong>{L_BCC}{L_COLON}</strong> <!-- BEGIN bcc_recipient --><!-- IF bcc_recipient.NAME_FULL -->{bcc_recipient.NAME_FULL}<!-- ELSE --><a href="{bcc_recipient.U_VIEW}"<!-- IF bcc_recipient.COLOUR --> style="color:{bcc_recipient.COLOUR};"<!-- ENDIF -->><strong>{bcc_recipient.NAME}</strong></a><!-- ENDIF -->&nbsp;<!-- END bcc_recipient --><!-- ENDIF -->
</p>

View file

@ -30,6 +30,12 @@ if (in_array($mode, array('login', 'login_link', 'logout', 'confirm', 'sendpassw
define('IN_LOGIN', true);
}
if ($mode === 'delete_cookies')
{
define('SKIP_CHECK_BAN', true);
define('SKIP_CHECK_DISABLED', true);
}
// Start session management
$user->session_begin();
$auth->acl($user->data);
@ -138,7 +144,7 @@ switch ($mode)
'AGREEMENT_TITLE' => $user->lang[$title],
'AGREEMENT_TEXT' => sprintf($user->lang[$message], $config['sitename'], generate_board_url()),
'U_BACK' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login'),
'L_BACK' => $user->lang['BACK_TO_LOGIN'],
'L_BACK' => $user->lang['BACK_TO_PREV'],
));
page_footer();

View file

@ -780,7 +780,7 @@ $template->assign_vars(array(
'U_TOPIC' => "{$server_path}viewtopic.$phpEx?f=$forum_id&amp;t=$topic_id",
'U_FORUM' => $server_path,
'U_VIEW_TOPIC' => $viewtopic_url,
'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=$topic_id" . (($start == 0) ? '' : "&amp;start=$start") . (strlen($u_sort_param) ? "&amp;$u_sort_param" : '')),
'U_CANONICAL' => generate_board_url() . '/' . append_sid("viewtopic.$phpEx", "t=$topic_id" . (($start) ? "&amp;start=$start" : ''), true, ''),
'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id),
'U_VIEW_OLDER_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=$topic_id&amp;view=previous"),
@ -998,6 +998,29 @@ if (!empty($topic_data['poll_start']))
'total_votes' => array_sum($vote_counts),
'can_vote' => !count($valid_user_votes) || ($auth->acl_get('f_votechg', $forum_id) && $topic_data['poll_vote_change']),
);
/**
* Event to manipulate the poll data sent by AJAX response
*
* @event core.viewtopic_modify_poll_ajax_data
* @var array data JSON response data
* @var array valid_user_votes Valid user votes
* @var array vote_counts Vote counts
* @var int forum_id Forum ID
* @var array topic_data Topic data
* @var array poll_info Array with the poll information
* @since 3.2.4-RC1
*/
$vars = array(
'data',
'valid_user_votes',
'vote_counts',
'forum_id',
'topic_data',
'poll_info',
);
extract($phpbb_dispatcher->trigger_event('core.viewtopic_modify_poll_ajax_data', compact($vars)));
$json_response = new \phpbb\json_response();
$json_response->send($data);
}
@ -1148,6 +1171,29 @@ $sql = 'SELECT p.post_id
" . (($join_user_sql[$sort_key]) ? 'AND u.user_id = p.poster_id': '') . "
$limit_posts_time
ORDER BY $sql_sort_order";
/**
* Event to modify the SQL query that gets post_list
*
* @event core.viewtopic_modify_post_list_sql
* @var string sql The SQL query to generate the post_list
* @var int sql_limit The number of posts the query fetches
* @var int sql_start The index the query starts to fetch from
* @var string sort_key Key the posts are sorted by
* @var string sort_days Display posts of previous x days
* @var int forum_id Forum ID
* @since 3.2.4-RC1
*/
$vars = array(
'sql',
'sql_limit',
'sql_start',
'sort_key',
'sort_days',
'forum_id',
);
extract($phpbb_dispatcher->trigger_event('core.viewtopic_modify_post_list_sql', compact($vars)));
$result = $db->sql_query_limit($sql, $sql_limit, $sql_start);
$i = ($store_reverse) ? $sql_limit - 1 : 0;
@ -2069,7 +2115,7 @@ for ($i = 0, $end = count($post_list); $i < $end; ++$i)
array(
'ID' => 'pm',
'NAME' => $user->lang['SEND_PRIVATE_MESSAGE'],
'U_CONTACT' => $u_pm,
'U_CONTACT' => $post_row['U_PM'],
),
array(
'ID' => 'email',

View file

@ -94,6 +94,9 @@ abstract class phpbb_console_user_base extends phpbb_database_test_case
'auth.provider_collection',
$provider_collection
);
$phpbb_container->setParameter('tables.auth_provider_oauth_token_storage', 'phpbb_oauth_tokens');
$phpbb_container->setParameter('tables.auth_provider_oauth_states', 'phpbb_oauth_states');
$phpbb_container->setParameter('tables.auth_provider_oauth_account_assoc', 'phpbb_oauth_accounts');
parent::setUp();
}

View file

@ -28,18 +28,20 @@ class phpbb_functional_acp_profile_field_test extends phpbb_functional_test_case
public function data_add_profile_field()
{
return array(
array('bool', 'profilefields.type.bool',
array('profilefields.type.bool',
array(
'field_ident' => 'bool',
'lang_name' => 'bool',
'lang_options[0]' => 'foo',
'lang_options[1]' => 'bar',
),
array(),
),
array('dropdown', 'profilefields.type.dropdown',
array('profilefields.type.dropdown',
array(
'field_ident' => 'dropdown',
'lang_name' => 'dropdown',
'lang_options' => "foo\nbar\nbar\nfoo",
),
array(),
),
);
}
@ -47,13 +49,12 @@ class phpbb_functional_acp_profile_field_test extends phpbb_functional_test_case
/**
* @dataProvider data_add_profile_field
*/
public function test_add_profile_field($name, $type, $page1_settings, $page2_settings)
public function test_add_profile_field($type, $page1_settings)
{
// Custom profile fields page
$crawler = self::request('GET', 'adm/index.php?i=acp_profile&mode=profile&sid=' . $this->sid);
// these language strings are html
$form = $crawler->selectButton('Create new field')->form(array(
'field_ident' => $name,
'field_type' => $type,
));
$crawler = self::submit($form);
@ -63,7 +64,7 @@ class phpbb_functional_acp_profile_field_test extends phpbb_functional_test_case
$crawler = self::submit($form);
// Fill form for profile field specific options
$form = $crawler->selectButton('Save')->form($page2_settings);
$form = $crawler->selectButton('Save')->form();
$crawler= self::submit($form);
$this->assertContainsLang('ADDED_PROFILE_FIELD', $crawler->text());

View file

@ -82,6 +82,10 @@ class phpbb_functions_user_delete_test extends phpbb_database_test_case
$phpbb_container->set('auth.provider.oauth.service.google', $oauth_provider_google);
$phpbb_container->set('auth.provider_collection', $provider_collection);
$phpbb_container->set('notification_manager', $notification_manager);
$phpbb_container->setParameter('tables.auth_provider_oauth_token_storage', 'phpbb_oauth_tokens');
$phpbb_container->setParameter('tables.auth_provider_oauth_states', 'phpbb_oauth_states');
$phpbb_container->setParameter('tables.auth_provider_oauth_account_assoc', 'phpbb_oauth_accounts');
}
public function test_user_delete()

View file

@ -46,6 +46,9 @@ class phpbb_functions_user_delete_user_test extends phpbb_database_test_case
'auth.provider_collection',
$provider_collection
);
$phpbb_container->setParameter('tables.auth_provider_oauth_token_storage', 'phpbb_oauth_tokens');
$phpbb_container->setParameter('tables.auth_provider_oauth_states', 'phpbb_oauth_states');
$phpbb_container->setParameter('tables.auth_provider_oauth_account_assoc', 'phpbb_oauth_accounts');
}
public function first_last_post_data()

View file

@ -20,16 +20,6 @@ class phpbb_type_cast_helper_test extends phpbb_test_case
$this->type_cast_helper = new \phpbb\request\type_cast_helper();
}
public function test_addslashes_recursively()
{
$data = array('some"string' => array('that"' => 'really"', 'needs"' => '"escaping'));
$expected = array('some\\"string' => array('that\\"' => 'really\\"', 'needs\\"' => '\\"escaping'));
$this->type_cast_helper->addslashes_recursively($data);
$this->assertEquals($expected, $data);
}
public function test_simple_recursive_set_var()
{
$data = 'eviL<3';

View file

@ -109,7 +109,7 @@ class phpbb_security_redirect_test extends phpbb_security_test_base
if ($expected_error !== false)
{
$this->setExpectedTriggerError(E_USER_ERROR, $user->lang[$expected_error]);
$this->setExpectedTriggerError(E_USER_WARNING, $user->lang[$expected_error]);
}
$result = redirect($test, true, $disable_cd_check);

View file

@ -192,6 +192,13 @@ class phpbb_ui_test_case extends phpbb_test_case
}
}
$install_config_file = $phpbb_root_path . 'store/install_config.php';
if (file_exists($install_config_file))
{
unlink($install_config_file);
}
$container_builder = new \phpbb\di\container_builder($phpbb_root_path, $phpEx);
$container = $container_builder
->with_environment('installer')
@ -205,11 +212,14 @@ class phpbb_ui_test_case extends phpbb_test_case
],
'cache.driver.class' => 'phpbb\cache\driver\file'
])
->with_config(new \phpbb\config_php_file($phpbb_root_path, $phpEx))
->without_compiled_container()
->get_container();
$container->register('installer.install_finish.notify_user')->setSynthetic(true);
$container->set('installer.install_finish.notify_user', new phpbb_mock_null_installer_task());
$container->register('installer.install_finish.install_extensions')->setSynthetic(true);
$container->set('installer.install_finish.install_extensions', new phpbb_mock_null_installer_task());
$container->compile();
$language = $container->get('language');
@ -338,6 +348,12 @@ class phpbb_ui_test_case extends phpbb_test_case
{
if (!$this->cache)
{
global $phpbb_container, $phpbb_root_path;
$phpbb_container = new phpbb_mock_container_builder();
$phpbb_container->setParameter('core.environment', PHPBB_ENVIRONMENT);
$phpbb_container->setParameter('core.cache_dir', $phpbb_root_path . 'cache/' . PHPBB_ENVIRONMENT . '/');
$this->cache = new \phpbb\cache\driver\file;
}
@ -590,4 +606,37 @@ class phpbb_ui_test_case extends phpbb_test_case
$this->getDriver()->takeScreenshot($screenshot);
}
/**
* Wait for AJAX. Should be called after an AJAX action is made.
*
* @param string $framework javascript frameworks jquery|prototype|dojo
* @throws \Facebook\WebDriver\Exception\NoSuchElementException
* @throws \Facebook\WebDriver\Exception\TimeOutException
*/
public function waitForAjax($framework = 'jquery')
{
switch ($framework)
{
case 'jquery':
$code = 'return jQuery.active;';
break;
case 'prototype':
$code = 'return Ajax.activeRequestCount;';
break;
case 'dojo':
$code = 'return dojo.io.XMLHTTPTransport.inFlight.length;';
break;
default:
throw new \RuntimeException('Unsupported framework');
break;
}
// wait for at most 30s, retry every 2000ms (2s)
$driver = $this->getDriver();
$driver->wait(30, 2000)->until(
function () use ($driver, $code) {
return !$driver->executeScript($code);
}
);
}
}