1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-09-07 23:01:04 +02:00

Compare commits

...

101 Commits

Author SHA1 Message Date
Meik Sievertsen
199bb13660 Tag phpBB Release Candidate 4
git-svn-id: file:///svn/phpbb/tags/release_3_0_6-RC4@10250 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-11-01 19:19:17 +00:00
Meik Sievertsen
b5c4dc3284 check for additional empty config variables...
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10249 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-11-01 15:33:44 +00:00
Meik Sievertsen
5553cfc2ed Several fixes:
Fix Bug #53335
Fix wrong unique index fetch for oracle and sqlite
Fix alter column definition for firebird (although the query will fail in these circumstances [primary key] because firebird (again) does not support simple things... although... mssql/oracle having the same "problems", but there you are able to do more advanced queries)

git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10248 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-10-30 19:19:48 +00:00
Meik Sievertsen
c2832affae Fix another bug in WHERE statement rewrite for oracle. The bug(s) actually consist of not detecting correct parameters and then resulting in partial WHERE statements, where non-detected strings are simply removed. grrrrrr
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10247 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-10-30 17:21:20 +00:00
Meik Sievertsen
c02f276c5f saw this bug while debugging... we really really need another layer in 3.1.x (better sooner than later), but retaining backwards compatibility.
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10246 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-10-30 16:59:48 +00:00
Meik Sievertsen
cdeca65aec Fix Jabber SASL PLAIN authentication failures. (Bug #52995)
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10245 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-10-29 15:04:19 +00:00
Meik Sievertsen
2258d85623 Implement suggestion in ticket #52155 - Better way to generate SID-free links in feed.php
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10244 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-10-29 14:00:43 +00:00
Ruslan Uzdenov
3d3e673396 Fix Bug #53285 introduced in r10018 - Mark the first visible forum on index as unread if there's any unread global announcement
Authorised by: Bantu

git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10243 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-10-28 16:49:23 +00:00
Meik Sievertsen
401ee9ce59 now we will have an RC4 we can adjust this one email file to act like all other email files
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10242 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-10-28 16:18:02 +00:00
Meik Sievertsen
110f81684e I am very sorry... but the changes require (a hopefully very short) RC4 phase
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10241 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-10-28 16:05:17 +00:00
Meik Sievertsen
87e717ae87 Fix Bug #53245 - Correct regular expression escaping and only splitting keywords on space and "|"
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10240 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-10-28 15:10:32 +00:00
Henry Sudhof
df5fa06035 ... and finally
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10239 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-10-27 13:54:03 +00:00
Henry Sudhof
d53f9a22d6 adding normalization - shouldn't change anything
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10238 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-10-27 12:36:55 +00:00
Henry Sudhof
44719bd041 #53235 - removing accidental commits
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10237 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-10-27 12:27:46 +00:00
Meik Sievertsen
b23f6c90ba fix spaces/tabs
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10236 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-10-27 11:17:53 +00:00
Henry Sudhof
56c8e34145 #53235
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10235 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-10-27 08:43:00 +00:00
Meik Sievertsen
6ca7b21dc9 Fix Bug #53185 (icon width/height adjustement for icons > 127px also applied on smilies) - related to r10088
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10234 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-10-26 13:59:02 +00:00
Meik Sievertsen
6d1c40f6e6 Fix Bug #53175 (forum_options cleared if editing forum) - regression from r10024
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10233 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-10-25 09:03:05 +00:00
Chris Smith
d7d810a586 changelog more descriptive for #45805 r9633
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10232 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-10-24 23:15:10 +00:00
Meik Sievertsen
b850fc4fbe fix table creation in db_tools.
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10231 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-10-24 14:28:59 +00:00
Meik Sievertsen
131ba8c2ba two obvious mistakes (thanks Jon :))
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10230 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-10-24 14:28:41 +00:00
Meik Sievertsen
4e8e766ed6 revert r9910 - ticket #1309
Reason for revert: http://www.phpbb.com/bugs/phpbb3/ticket.php?ticket_id=1309&start=8#post193395

git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10229 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-10-24 13:04:26 +00:00
Meik Sievertsen
30f3ba83e3 sneaks in and changes the version number. Seems like we see no RC4...
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10228 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-10-22 14:35:56 +00:00
Meik Sievertsen
ba73a77f30 adjust changelog (spelling, etc.) and removed our loved JD's from the patch lines (they are now listed within the AUTHORS file).
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10227 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-10-21 19:56:40 +00:00
Meik Sievertsen
98bde3441e add default_lang to statistics
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10226 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-10-20 11:16:30 +00:00
Meik Sievertsen
cdc780b798 fix bug #53045 the simple way. ;)
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10225 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-10-20 11:04:00 +00:00
Henry Sudhof
69746fe683 #52875 working around php4 bug 24631 - call_user_func doesn't return references. This causes php4 to create a copy.
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10224 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-10-15 10:52:41 +00:00
Henry Sudhof
2a0a16bca3 #52875 working around php4 bug 24631 - call_user_func doesn't return references. This causes php4 to create a copy.
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10223 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-10-15 10:51:32 +00:00
Meik Sievertsen
cc0eadb67f remove unused closing div tag (Bug #52735)
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10221 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-10-12 14:16:09 +00:00
Meik Sievertsen
08437d1538 update constants and schema data from RC2 to RC3
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10220 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-10-11 09:56:47 +00:00
Meik Sievertsen
ae88f95808 update mysql_upgrader to latest schema
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10219 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-10-11 09:56:11 +00:00
Meik Sievertsen
d94da30c5d correctly execute database update step (detect if the version the admin wants to update to is greater than the current version even if phpbb.com says the current version is lower than the update version) which correctly updates the database for those who forgot to enable the PHPBB_QA constant for release candidates.
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10218 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-10-09 11:59:54 +00:00
Meik Sievertsen
9ccd209930 fix bug #52605 - regression from r9811
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10217 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-10-09 11:12:37 +00:00
Chris Smith
457a195797 Properly fix #40925
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10216 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-10-07 14:54:10 +00:00
Meik Sievertsen
aef6352a35 Bug #52525
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10214 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-10-05 17:54:55 +00:00
Meik Sievertsen
d5fe2e7db7 bugfix for non-existent handles and theme data (we really need to clean this up, template_files feels quite furry)
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10213 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-10-05 16:22:21 +00:00
Meik Sievertsen
e9c1c03ca6 Fix bug #52515 (wrong bbcode uid assigned if error triggered and quote/forward PM) - still not entirely sure if this will break things, but the correct uid should also be assigned if there is an error triggered somewhere, this does not change the content or the actions assigned.
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10208 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-10-04 18:03:19 +00:00
Meik Sievertsen
8525e97c28 Bug #52415
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10205 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-10-04 11:10:16 +00:00
Meik Sievertsen
53965f0085 Bug #52175
atm the "fix" with the most changes involved. We will inform style authors about these changes. We will not release RC2 to RC3 code changes, but will annnounce the style changes within the RC3 release announcement.

git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10204 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-10-04 11:08:12 +00:00
Meik Sievertsen
a53c9abf7e it is not a post but a private message
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10203 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-10-04 10:35:20 +00:00
Andreas Fischer
8661541d0d Some nitpicks before we include this file in a final release.
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10202 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-10-03 13:23:10 +00:00
Meik Sievertsen
8bae495874 revert r10079 (bug #50035) to be able to investigate other options of handling this later.
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10201 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-10-03 11:35:39 +00:00
Meik Sievertsen
485576395c Revert revisions r10176 and r9647 - Bug #45975, #51505
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10200 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-09-30 15:07:40 +00:00
Henry Sudhof
3850de87fc #52245
Authorised by: AcydBurn

git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10199 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-09-30 15:00:44 +00:00
Meik Sievertsen
80bc2d8dc9 Disable copy forum permissions screen in forums creation/update workflow - also fixes Bug #52035
We will revisit this one later

git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10198 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-09-30 14:51:43 +00:00
Meik Sievertsen
d47c61bbb3 update acp forums copy style to look like the rest of the ACP
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10197 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-09-30 14:50:49 +00:00
Meik Sievertsen
d657c05ed5 Fix Bug #52125, regression from r9678 for Bug #46225
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10196 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-09-29 14:51:58 +00:00
Meik Sievertsen
823cbdc2d9 Fix Bug #52055 - php notices if phpbb.com is not reachable
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10195 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-09-29 14:48:24 +00:00
Henry Sudhof
5e22b11be1 #52095
Authorised by: AcydBurn
That should finally fix the issue for rtl

git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10194 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-09-28 13:31:30 +00:00
Henry Sudhof
19b417cee9 Fail without notices when no questions are provided
Authorised by: AcydBurn

git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10193 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-09-28 13:08:33 +00:00
Henry Sudhof
4208ed9c57 #52095
Authorised by: AcydBurn

git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10192 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-09-28 10:40:20 +00:00
Henry Sudhof
eb7ac464cf #52095
Authorised by: AcydBurn

git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10191 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-09-28 10:26:18 +00:00
Meik Sievertsen
1612be1af3 alt instead of title, fix XHTML issue reported in ticket #51945
(i will not announce this change, the code changes package for RC2 and the final release will include it though, the RC1 one will not be updated to reflect this change)

git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10189 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-09-25 16:42:52 +00:00
Meik Sievertsen
96b3361577 add recent important additions/fixes to the changelog
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10188 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-09-25 10:27:19 +00:00
Meik Sievertsen
3e0bf1f8a4 prepare for RC2
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10187 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-09-25 09:41:49 +00:00
Joas Schilling
de25ce8724 Fix Bug #51835 - editing posts with attachments - regression from r9843 introduced in #48265
Authorised by: AcydBurn

git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10186 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-09-25 08:41:47 +00:00
Meik Sievertsen
023760c8b2 I think i need to check other DBMS more often. :/
- fix index check for sqlite, firebird and oracle
- add check for unique index
- fix changing default value for column in mssql (add constraint)

git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10185 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-09-24 15:36:05 +00:00
Andreas Fischer
66038cde5b Fix bug #51905 - Only check whether forum image exists if forum image is specified.
Related to bug #39005.
Authorised by: acydburn

git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10184 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-09-24 12:37:39 +00:00
Meik Sievertsen
54c22ae52a remove log_time index (was not used at all)
At the same time the database updater now supports checking for existing indexes. The db tools will not have this in 3.0.6 (the db tools have a function to retrieve all indexes) and i need to test the updater on all DBMS today...

git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10183 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-09-24 08:53:17 +00:00
Henry Sudhof
c1b898890b #51805
Authorised by: AcydBurn

git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10182 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-09-23 17:41:11 +00:00
Meik Sievertsen
1461beacf6 submit buttons in same style as other submit buttons in ACP
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10181 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-09-23 17:03:04 +00:00
Meik Sievertsen
35eea4539a check for m_split and m_merge permission on target topic and topic icon selection (Bug #51675)
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10180 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-09-23 09:41:54 +00:00
Joas Schilling
87eb1d9f20 Fix Bug #51775 - Do not unlock topics with QuickReply
Authorised by: AcydBurn

git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10179 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-09-23 08:19:22 +00:00
Meik Sievertsen
782d680b54 Fix getting host for situations where the name/IP is not resolvable. Related to Bug #41025
Related revisions: r9387 and r10158

git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10178 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-09-22 15:09:09 +00:00
Meik Sievertsen
90e1187601 Move add_log() call for captcha "configure" page to the captcha plugin, because only the plugin is able to know if the config got updated or not.
Note to captcha MOD authors: please check if you have a function acp_page() and if an add_log() call is required for your plugin.
Bug #51695

git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10177 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-09-22 10:03:17 +00:00
Meik Sievertsen
5d52b32a63 regression in r9647 (wrong fix for bug #45975) - Bug #51505 (Patch by HardStyle)
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10176 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-09-22 09:55:50 +00:00
Meik Sievertsen
2ba402b06d And now i feel even more dirty because i had to adjust the oracle hack to allow for queries > 4k to let it recognise concatenated strings and strings having the character ")" in it. I also added fallback code in case our regex splits too much. :/
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10175 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-09-21 18:02:33 +00:00
Meik Sievertsen
3d5ca6b2b7 Ok, the oracle database backup never actually worked at all. We used the wrong delimiter, did not preserve correct sequence order, did not merge primary keys and uniques... i think no one ever tried to actually restore an oracle backup.
Fix all of this.

git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10174 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-09-21 17:59:39 +00:00
Henry Sudhof
61c6c07abc #50485
Authorised by: AcydBurn

git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10173 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-09-21 11:36:36 +00:00
Meik Sievertsen
5382eb441d remove unnecessary query parts... thanks to asinshesq for pointing it out.
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10172 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-09-20 18:50:35 +00:00
Meik Sievertsen
0e130c107b forgot to add display active flag to forum data in r10169 for bug #19135
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10171 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-09-20 17:52:06 +00:00
Meik Sievertsen
8da2b69e2b note correct username if post/topic get's removed if user is anonymous
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10170 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-09-20 17:08:16 +00:00
Meik Sievertsen
4006def79d set "display active topics" to true by default for new forum creation... regression/addition from/to bug #19135
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10169 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-09-20 16:46:31 +00:00
Meik Sievertsen
97be42d31c improve code to detect and solve conflicts for code removed from one version to another.
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10168 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-09-20 16:20:20 +00:00
Meik Sievertsen
7a244e1d2b if preserve_cr is true and the file generated no conflict but is obviously not "empty" we tag it as modified because preserve_cr is the default mode for showing modifications (else the user gets a resolvable conflict and may wonder why ;))
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10167 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-09-20 16:18:41 +00:00
Meik Sievertsen
1b64e41160 although we do not use force_approved_state check it nevertheless for the message displayed to the user - bug #51325
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10166 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-09-20 12:32:27 +00:00
Joas Schilling
2e40ba022d Fix Bug #51655 - Missing global vars phpbb_root_path & phpEx
Authorised by: AcydBurn

git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10165 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-09-19 12:21:39 +00:00
Meik Sievertsen
b53a0c8041 use existing language key for "private message not found"
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10164 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-09-19 10:46:19 +00:00
Meik Sievertsen
38c4bcad55 Ok, after 20+ hours i think i fixed all grave issues with the updater
- smaller memory footprint
- better checks for already updated files
- even less conflicts
- fixed automatic conflict resolving after successful merges
- no more conflicts for $Id$ changes
- fixed skip_whitespace_changes bug where code blocks were added to diff_op_add whereby the previous or next diff_op_copy already had the change
- correctly display merged files in diff view (previously it happened that the old file was used for comparision, although the new file was different/newer/merged)


git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10163 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-09-18 18:18:54 +00:00
Joas Schilling
9c1334cd62 fix r9814 - remove echo "aha"; - Happy birthday naderman
Authorised by: naderman

git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10162 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-09-18 14:56:58 +00:00
Joas Schilling
bc677ae3ad Fix Bug #51375 - Do not show QR in closed topics/forums
Authorised by: AcydBurn

git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10161 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-09-18 14:28:45 +00:00
Meik Sievertsen
d1f796bf25 phpBB updater now solves common conflicts on it's own. This further reduces the chance of conflicts.
(tested with some heavily modified files who previously generated a lot of conflicts)

git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10160 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-09-17 14:18:57 +00:00
Andreas Fischer
13e8898563 Return integers when get_forum_list() is supposed to only return IDs.
This will save us some calls to the sql escape function when used with sql_in_set().
Authorised by: acydburn

git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10159 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-09-17 13:44:50 +00:00
Meik Sievertsen
223b9ed0d6 extend r9387 - check for existance of all functions we use...
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10158 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-09-17 13:39:50 +00:00
Meik Sievertsen
0b0c9544a3 found a much better method to skip whitespace/tab changes. :)
This also solves even more unncessary conflicts - Bug #51365

git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10157 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-09-17 08:14:56 +00:00
Meik Sievertsen
6b5d195a98 correctly display diff for conflicts
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10156 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-09-17 08:13:28 +00:00
Meik Sievertsen
8bcfd33539 Remove duplicate S_DISPLAY_GALLERY key from ucp_groups. Regression from r9757
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10155 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-09-17 07:52:35 +00:00
Meik Sievertsen
2f808d274b fix xhtml issue in updater - Bug #51335
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10154 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-09-16 14:37:17 +00:00
Meik Sievertsen
8cea32f3bf fix some XHTML issues in admin style - Bug #51405
the acp_logs one is quite nasty, i know - but at least it does not require a new css class

git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10153 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-09-16 14:30:36 +00:00
Meik Sievertsen
c32d295d97 Bug #51385 - regression from r9252 - only spelling fix
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10152 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-09-16 13:02:13 +00:00
Meik Sievertsen
198989dcfd add send_statistics feature to changelog
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10151 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-09-16 13:01:20 +00:00
Joas Schilling
697fd5a134 Fix #51285 and more issues with template inherence on set_custom_template
Conflict introduced with r9839 and r9823

Authorised by: AcydBurn

git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10150 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-09-16 08:11:52 +00:00
Meik Sievertsen
b27e96cf62 move up the feed code because MODs often use this location which results in more unneccessary conflicts.
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10149 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-09-16 07:51:26 +00:00
Meik Sievertsen
c616b2b336 fix coppa setting in convertor (Bug #50735) - at the same time increase target phpBB version number for the phpBB2 convertor and convertor version number. ;)
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10148 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-09-15 19:01:42 +00:00
Meik Sievertsen
36dc2d6e2d Fix login for passworded forums - Bug #51265
Was a regression from r10067 for Bug #50285

git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10147 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-09-15 13:10:59 +00:00
Meik Sievertsen
1df914d80a fix uninitialised variable in functions_admin.php (Bug #51295)
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10146 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-09-15 12:58:23 +00:00
Joas Schilling
b4c7dbcd66 Fix #51305 - User need a_clearlog to delete warnings
Authorised by: AcydBurn

git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10145 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-09-15 09:45:05 +00:00
Henry Sudhof
ffbe4e3b82 sanity check - avoid ugly error messages
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10144 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-09-15 09:11:17 +00:00
Henry Sudhof
bf2133d380 #51395 - remove legacy captcha code. authorised by: acyd burn
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10143 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-09-15 09:08:37 +00:00
Joas Schilling
cb88671638 fix #51235 - regression from 9843 for #48265
Authorised by: AcydBurn

git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10142 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-09-13 15:04:21 +00:00
Meik Sievertsen
3b73584430 why am i so dumb sometimes... /me hits myself with the dumbness stick...
regression from r10122

git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10141 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-09-13 14:31:32 +00:00
71 changed files with 1440 additions and 682 deletions

View File

@@ -246,7 +246,7 @@ function h_radio($name, &$input_ary, $input_default = false, $id = false, $key =
foreach ($input_ary as $value => $title)
{
$selected = ($input_default !== false && $value == $input_default) ? ' checked="checked"' : '';
$html .= '<label><input type="radio" name="' . $name . '"' . (($id && !$id_assigned) ? ' id="' . $id . '"' : '') . ' value="' . $value . '"' . $selected . (($key) ? ' accesskey="' . $key . '"' : '') . ' class="radio" /> ' . $user->lang[$title] . '</label> ';
$html .= '<label><input type="radio" name="' . $name . '"' . (($id && !$id_assigned) ? ' id="' . $id . '"' : '') . ' value="' . $value . '"' . $selected . (($key) ? ' accesskey="' . $key . '"' : '') . ' class="radio" /> ' . $user->lang[$title] . '</label>';
$id_assigned = true;
}

View File

@@ -54,10 +54,12 @@
</fieldset>
<!-- ENDIF -->
<fieldset class="submit-buttons">
<legend>{L_SUBMIT}</legend>
<input class="button1" type="submit" id="main_submit" name="main_submit" value="{L_SUBMIT}" />&nbsp;
<input class="button2" type="reset" id="form_reset" name="reset" value="{L_RESET}" />&nbsp;
<fieldset>
<legend>{L_ACP_SUBMIT_CHANGES}</legend>
<p class="submit-buttons">
<input class="button1" type="submit" id="main_submit" name="main_submit" value="{L_SUBMIT}" />&nbsp;
<input class="button2" type="reset" id="form_reset" name="reset" value="{L_RESET}" />&nbsp;
</p>
{S_FORM_TOKEN}
</fieldset>
</form>

View File

@@ -71,8 +71,9 @@
<dl>
<dt><label for="where">{L_ACTION}:</label></dt>
<dd>
<label><input type="radio" class="radio" name="where" value="store" checked="checked" /> {L_STORE_LOCAL}</label>
<label><input type="radio" class="radio" name="where" value="download" /> {L_DOWNLOAD}</label></dd>
<label><input id="where" type="radio" class="radio" name="where" value="store" checked="checked" /> {L_STORE_LOCAL}</label>
<label><input type="radio" class="radio" name="where" value="download" /> {L_DOWNLOAD}</label>
</dd>
</dl>
<dl>
<dt><label for="table">{L_TABLE_SELECT}:</label></dt>

View File

@@ -1,21 +1,22 @@
<!-- INCLUDE overall_header.html -->
<h1>{L_COPY_PERMISSIONS}</h1>
<p>{L_COPY_PERMISSIONS_EXPLAIN}</p>
<p>{L_ACL_LINK}</p>
<form id="confirm" method="post" action="{S_COPY_ACTION}">
<fieldset>
<h1>{L_COPY_PERMISSIONS}</h1>
<p>{L_COPY_PERMISSIONS_EXPLAIN}</p>
<p>{L_ACL_LINK}</p>
<dl>
<dt><label for="forum_perm_from">{L_COPY_PERMISSIONS}:</label><br /><span>{L_COPY_PERMISSIONS_EXPLAIN}</span></dt>
<dd><select id="forum_perm_from" name="forum_perm_from"><option value="0">{L_NO_PERMISSIONS}</option>{S_FORUM_OPTIONS}</select></dd>
</dl>
<div style="text-align: center;">{S_FORM_TOKEN}{S_HIDDEN_FIELDS}
<input type="submit" name="update" value="{L_CONTINUE}" class="button2" />&nbsp;
<input type="submit" name="update" value="{L_CONTINUE}" class="button2" />&nbsp;
</div>
</fieldset>
</form>
<!-- INCLUDE overall_footer.html -->

View File

@@ -41,6 +41,7 @@
<td style="vertical-align: top;">
{inactive.REASON}
<!-- IF inactive.REMINDED --><br />{inactive.REMINDED_EXPLAIN}<!-- ENDIF -->
</td>
<td>&nbsp;<input type="checkbox" class="radio" name="mark[]" value="{inactive.USER_ID}" />&nbsp;</td>
</tr>
<!-- BEGINELSE -->
@@ -67,7 +68,7 @@
<fieldset class="quick">
<select name="action">{S_INACTIVE_OPTIONS}</select>
<input class="button2" type="submit" name="submit" value="{L_SUBMIT}" />
<p class="small"><a href="#" onclick="marklist('inactive', 'mark', true); return false;">{L_MARK_ALL}</a> &bull; <a href="#" onclick="marklist('inactive', 'mark', false); return false;">{L_UNMARK_ALL}</a></p>
<p class="small"><a href="#" onclick="marklist('inactive', 'mark', true); return false;">{L_MARK_ALL}</a> &bull; <a href="#" onclick="marklist('inactive', 'mark', false); return false;">{L_UNMARK_ALL}</a></p>
{S_FORM_TOKEN}
</fieldset>

View File

@@ -14,11 +14,12 @@
<!-- IF PAGINATION -->
<div class="pagination" style="float: right; margin: 15px 0 2px 0">
<a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{S_ON_PAGE}</a> &bull; <span>{PAGINATION}</span>
<a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{S_ON_PAGE}</a> &bull; <span>{PAGINATION}</span>
</div>
<!-- ENDIF -->
<div class="clearfix">&nbsp;</div><br style="clear: both;" />
<div class="clearfix">&nbsp;</div>
<div><br style="clear: both;" /></div>
<!-- IF .log -->
<table cellspacing="1">

View File

@@ -232,6 +232,7 @@
<td style="vertical-align: top;">
{inactive.REASON}
<!-- IF inactive.REMINDED --><br />{inactive.REMINDED_EXPLAIN}<!-- ENDIF -->
</td>
</tr>
<!-- BEGINELSE -->
<tr>

View File

@@ -20,7 +20,7 @@
</dl>
<dl>
<dt><label for="new_id">{L_REPLACE}:</label><br /><span>{L_REPLACE_EXPLAIN}</span></dt>
<dd><select name="new_id">{S_REPLACE_OPTIONS}</select></dd>
<dd><select id="new_id" name="new_id">{S_REPLACE_OPTIONS}</select></dd>
</dl>
<p class="quick">
@@ -135,11 +135,11 @@
<div id="img_dimensions">
<dl>
<dt><label for="imgwidth">{L_IMAGE_WIDTH}:</label><br /><span>{L_AUTOMATIC_EXPLAIN}</span></dt>
<dd><input type="text" name="imgwidth" value="{IMAGE_SIZE}" /></dd>
<dd><input id="imgwidth" type="text" name="imgwidth" value="{IMAGE_SIZE}" /></dd>
</dl>
<dl>
<dt><label for="imgheight">{L_IMAGE_HEIGHT}:</label><br /><span>{L_AUTOMATIC_EXPLAIN}</span></dt>
<dd><input type="text" name="imgheight" value="{IMAGE_HEIGHT}" /></dd>
<dd><input id="imgheight" type="text" name="imgheight" value="{IMAGE_HEIGHT}" /></dd>
</dl>
</div>
</fieldset>
@@ -266,7 +266,7 @@
<p>{L_TEMPLATE_CACHE_EXPLAIN}</p>
<form name="acp_styles" method="post" action="{U_ACTION}">
<form id="acp_styles" method="post" action="{U_ACTION}">
<fieldset class="tabulated">
<legend>{L_TEMPLATE_CACHE}</legend>

View File

@@ -7,17 +7,16 @@
<th>{L_REPORT_BY}</th>
<th>{L_TIME}</th>
<th>{L_FEEDBACK}</th>
<!-- IF S_CLEARLOGS --><th>{L_MARK}</th><!-- ENDIF -->
<th>{L_MARK}</th>
</tr>
</thead>
<tbody>
<!-- BEGIN warn -->
<!-- IF warn.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
<td>{warn.USERNAME}</td>
<td style="text-align: center; nowrap: nowrap;">{warn.DATE}</td>
<td>{warn.ACTION}</td>
<!-- IF S_CLEARLOGS --><td style="text-align: center;"><input type="checkbox" class="radio" name="mark[]" value="{warn.ID}" /></td><!-- ENDIF -->
<td style="text-align: center;"><input type="checkbox" class="radio" name="mark[]" value="{warn.ID}" /></td>
</tr>
<!-- END warn -->
</tbody>
@@ -28,12 +27,10 @@
</div>
<!-- ENDIF -->
<!-- IF S_CLEARLOGS -->
<fieldset class="quick">
<input class="button2" type="submit" name="delall" value="{L_DELETE_ALL}" />&nbsp;
<input class="button2" type="submit" name="delmarked" value="{L_DELETE_MARKED}" />
<p class="small"><a href="#" onclick="marklist('list', 'mark', true);">{L_MARK_ALL}</a> &bull; <a href="#" onclick="marklist('list', 'mark', false);">{L_UNMARK_ALL}</a></p>
</fieldset>
<!-- ENDIF -->
<fieldset class="quick">
<input class="button2" type="submit" name="delall" value="{L_DELETE_ALL}" />&nbsp;
<input class="button2" type="submit" name="delmarked" value="{L_DELETE_MARKED}" />
<p class="small"><a href="#" onclick="marklist('list', 'mark', true);">{L_MARK_ALL}</a> &bull; <a href="#" onclick="marklist('list', 'mark', false);">{L_UNMARK_ALL}</a></p>
</fieldset>
{S_FORM_TOKEN}
</form>

View File

@@ -69,8 +69,8 @@ h2, caption {
h3, h4 {
font-family: "Trebuchet MS", Helvetica, sans-serif;
font-size: 1.20em;
text-decoration: none;
line-height: 1.20em;
text-decoration: none;
line-height: 1.20em;
margin-top: 25px;
}
@@ -97,8 +97,8 @@ hr {
height: 1px;
}
.small {
font-size: 0.85em;
.small {
font-size: 0.85em;
}
/* General links */
@@ -195,7 +195,6 @@ li {
width: 76%;
margin: 0 0 0 3%;
min-height: 350px;
overflow-y: auto;
}
.rtl #main {
@@ -203,8 +202,8 @@ li {
margin: 0 3% 0 0;
}
* html #main {
height: 350px;
* html #main {
height: 350px;
}
#page-body.simple-page-body {
@@ -316,7 +315,7 @@ li {
padding: 0;
}
span.corners-top, span.corners-bottom,
span.corners-top, span.corners-bottom,
span.corners-top span, span.corners-bottom span {
font-size: 1px;
line-height: 1px;
@@ -795,7 +794,7 @@ label img {
fieldset.quick, p.quick {
margin: 0 0 5px;
padding: 5px 0 0;
padding: 5px 0 0;
border: none;
background-color: transparent;
text-align: right;
@@ -848,7 +847,7 @@ select option.disabled {
}
/* Special case inputs */
select#board_timezone,
select#board_timezone,
select#full_folder_action {
width: 95%;
}
@@ -1245,12 +1244,12 @@ input.disabled {
}
/* Nice method for clearing floated blocks without having to insert any extra markup
From http://www.positioniseverything.net/easyclearing.html
From http://www.positioniseverything.net/easyclearing.html
.clearfix:after, #tabs:after, .row:after, #content:after, fieldset dl:after, #page-body:after {
content: ".";
display: block;
height: 0;
clear: both;
content: ".";
display: block;
height: 0;
clear: both;
visibility: hidden;
}*/
@@ -1317,7 +1316,7 @@ fieldset.permissions legend input{
height: 1.1em;
}
/* Permission sections */
/* Permission sections */
fieldset.permissions .permissions-simple {
text-align: left;
padding-top: 3px;
@@ -1528,7 +1527,7 @@ fieldset.permissions .padding {
background-image: url("../images/corners_right2.gif");
}
.permissions-panel span.corners-top, .permissions-panel span.corners-bottom,
.permissions-panel span.corners-top, .permissions-panel span.corners-bottom,
.permissions-panel span.corners-top span, .permissions-panel span.corners-bottom span {
font-size: 1px;
line-height: 1px;
@@ -1606,7 +1605,7 @@ fieldset.permissions .padding {
}
.permissions-panel th.row4 {
background-image: none;
background-image: none;
background-color: #E4E8EB;
color: #536482;
border: none;
@@ -1614,8 +1613,8 @@ fieldset.permissions .padding {
.permissions-panel th a:link, .permissions-panel th a:hover, .permissions-panel th a:visited {
display: block;
color: #FFFFFF;
text-decoration: underline;
color: #FFFFFF;
text-decoration: underline;
}
.permissions-panel td.permissions-yes label:hover {

View File

@@ -56,11 +56,13 @@
</fieldset>
<fieldset class="submit-buttons">
<legend>{L_SUBMIT}</legend>
<input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />&nbsp;
<input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />&nbsp;
<input class="button2" type="submit" id="preview" name="preview" value="{L_PREVIEW}" />&nbsp;
<fieldset>
<legend>{L_ACP_SUBMIT_CHANGES}</legend>
<p class="submit-buttons">
<input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />&nbsp;
<input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />&nbsp;
<input class="button2" type="submit" id="preview" name="preview" value="{L_PREVIEW}" />&nbsp;
</p>
<input type="hidden" name="select_captcha" value="{CAPTCHA_NAME}" />
<input type="hidden" name="configure" value="1" />

View File

@@ -1,13 +1,21 @@
<!-- IF S_RECAPTCHA_AVAILABLE -->
<dl>
<dd>
<script type="text/javascript" src="{RECAPTCHA_SERVER}/challenge?k={RECAPTCHA_PUBKEY}{RECAPTCHA_ERRORGET}">
<script type="text/javascript">
// <![CDATA[
var RecaptchaOptions = {
lang : {L_RECAPTCHA_LANG}
lang : '{L_RECAPTCHA_LANG}',
};
// ]]>
</script>
<script type="text/javascript" src="{RECAPTCHA_SERVER}/challenge?k={RECAPTCHA_PUBKEY}{RECAPTCHA_ERRORGET}"></script>
<script type="text/javascript">
// <![CDATA[
<!-- IF S_CONTENT_DIRECTION eq 'rtl' -->
document.getElementById('recaptcha_table').style.direction = 'ltr';
<!-- ENDIF -->
// ]]>
</script>
<noscript>

View File

@@ -34,10 +34,12 @@
<!-- INCLUDE {CAPTCHA_PREVIEW} -->
</fieldset>
<fieldset class="submit-buttons">
<legend>{L_SUBMIT}</legend>
<input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />&nbsp;
<input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />&nbsp;
<fieldset>
<legend>{L_ACP_SUBMIT_CHANGES}</legend>
<p class="submit-buttons">
<input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />&nbsp;
<input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />&nbsp;
</p>
<input type="hidden" name="select_captcha" value="{CAPTCHA_NAME}" />
<input type="hidden" name="configure" value="1" />

View File

@@ -15,9 +15,9 @@
// <![CDATA[
function resize_panel()
{
var block = document.getElementById('codepanel');
var block = document.getElementById('codepanel');
var height;
if (window.innerHeight)
{
height = window.innerHeight - 150;
@@ -26,7 +26,7 @@ function resize_panel()
else
{
//whatever IE needs to do this
}
}
}
window.onresize = resize_panel;
@@ -54,7 +54,7 @@ div#codepanel {
width: 100%;
}
<!-- ELSE -->
div#codepanel {
div#codepanel {
background-color: #eee;
}
<!-- ENDIF -->
@@ -149,10 +149,10 @@ table.hrdiff tbody th {
table.hrdiff tbody td.old {
border-left: 1px solid #999;
border-right: 1px solid #999;
border-right: 1px solid #999;
}
table.hrdiff tbody td.new {
border-right: 1px solid #999;
border-right: 1px solid #999;
}
table.hrdiff td pre {
@@ -237,19 +237,19 @@ table.hrdiff caption span {
<input class="button1" type="submit" id="submit" name="submit" value="{L_CHANGE}" />
</fieldset>
</form>
<!-- ENDIF -->
<!-- IF S_DIFF_CONFLICT_FILE -->
<div style="float: {S_CONTENT_FLOW_BEGIN};"><strong>{L_NUM_CONFLICTS}: {NUM_CONFLICTS}</strong></div>
<br style="clear: both;" />
<!-- ENDIF -->
</div>
<div id="page-body">
<div id="acp">
<div class="panel" id="codepanel">
<span class="corners-top"><span></span></span>
<div id="diff_content">
<div id="main">
<!-- IF S_DIFF_CONFLICT_FILE -->
<div style="float: {S_CONTENT_FLOW_END};"><strong>{L_NUM_CONFLICTS}: {NUM_CONFLICTS}</strong></div>
<!-- ENDIF -->
{DIFF_CONTENT}
</div>
</div>
@@ -257,6 +257,6 @@ table.hrdiff caption span {
</div>
</div>
</div>
<!-- INCLUDE simple_footer.html -->

View File

@@ -796,6 +796,7 @@ function get_schema_struct()
'poster_ip' => array('INDEX', 'poster_ip'),
'poster_id' => array('INDEX', 'poster_id'),
'post_approved' => array('INDEX', 'post_approved'),
'post_username' => array('INDEX', 'post_username'),
'tid_post_time' => array('INDEX', array('topic_id', 'post_time')),
),
);

View File

@@ -90,119 +90,118 @@
<ul>
<li>[Fix] Allow whitespaces in avatar gallery names. (Bug #44955)</li>
<li>[Fix] Sorting by author or subject on viewtopic now preserves the order. (Bug #44875)</li>
<li>[Fix] Correctly determine writable status of files on Windows operating system. (Bug #39035)</li>
<li>[Fix] Show report button in prosilver for guests who are allowed to report posts. (Bug #45695 - Patch by bantu)</li>
<li>[Fix] Correctly show private message history (Bug #46065 - Patch by bantu)</li>
<li>[Fix] Various XHTML mistakes in prosilver, subsilver2 and the ACP. (Bugs #25545 - Patch by bantu, #26315, #38555, #45505 - Patch by Raimon, #45785, #45865, #47085 - Patch by Raimon)</li>
<li>[Fix] Fix some ACP style issues (Bug #45975 - Patch by leviatan21, Bug #16109 - Patch by prototech)</li>
<li>[Fix] Move post bump information markup to the template. (Bug #34295 - Patch by bantu)</li>
<li>[Fix] Show error in the ACP when template folder is not readable. (Bug #45705 - Patch by bantu)</li>
<li>[Fix] Adjust viewonline filename regular expression to be less strict. (Bug #46215 - Patch by bantu)</li>
<li>[Fix] Correctly apply the can change vote permission again. Regression introduced in r9470. (Bug #45895)</li>
<li>[Fix] Also remove data from friend/foe table when deleting user. (Bug #45345 - Patch by nickvergessen)</li>
<li>[Fix] Correctly determine writable status of files on Windows operating systems. (Bug #39035)</li>
<li>[Fix] Show report button in prosilver for guests who are allowed to report posts. (Bug #45695)</li>
<li>[Fix] Correctly show private message history. (Bug #46065)</li>
<li>[Fix] Various XHTML mistakes in prosilver, subsilver2 and the ACP. (Bugs #25545, #26315, #38555, #45505 - Patch by Raimon, #45785, #45865, #47085 - Patch by Raimon)</li>
<li>[Fix] Fix some ACP style issues. (Bug #16109 - Patch by prototech)</li>
<li>[Fix] Move post bump information markup to the template. (Bug #34295)</li>
<li>[Fix] Show error in the ACP when template folder is not readable. (Bug #45705)</li>
<li>[Fix] Adjust viewonline filename regular expression to be less strict. (Bug #46215)</li>
<li>[Fix] Correctly apply the &quot;can change vote&quot; permission again. Regression introduced in r9470. (Bug #45895)</li>
<li>[Fix] Remove data from friend/foe table when deleting user. (Bug #45345)</li>
<li>[Fix] Correctly hide skiplink in prosilver right-to-left mode. (Bug #45765 - Patch by prototech and bantu)</li>
<li>[Fix] Fix dynamic config update routine error if firebird is used (Bug #46315)</li>
<li>[Fix] Allow friends/foes to be added and removed at the same time. (Bug #46255 - Patch by bantu)</li>
<li>[Fix] Only change topic/post icon if icons are enabled and user is allowed to. (Bug #46355 - Patch by bantu)</li>
<li>[Fix] Fix dynamic config update routine error if firebird is used. (Bug #46315)</li>
<li>[Fix] Allow friends/foes to be added and removed at the same time. (Bug #46255)</li>
<li>[Fix] Only change topic/post icon on edit if icons are enabled and user is allowed to use icons. (Bug #46355)</li>
<li>[Fix] Fix saving custom profile fields in ACP if Oracle is used. (Bug #46015)</li>
<li>[Fix] Make view_log() more resilient to corrupt serialized data. (Bug #46545)</li>
<li>[Fix] Show error if hostname lookup doesn't return a valid IP address when banning. (Bug #45585 - Patch by bantu)</li>
<li>[Fix] Show error if hostname lookup doesn't return a valid IP address when banning. (Bug #45585)</li>
<li>[Fix] Fix incorrect layout when loading private message draft. (Bug #38435 - Patch by nickvergessen)</li>
<li>[Fix] Show proper error message when trying to add bots to friends/foes list. (Bug #40205 - Patch by nickvergessen)</li>
<li>[Fix] Fix Oracle database backup (Bug #46715)</li>
<li>[Fix] Update attachments table when deleting user and retaining his posts. (Bug #40245 - Patch by rxu)</li>
<li>[Fix] Correctly detect files in subfolders when viewing cached template files. (Bug #46145 - Patch by nickvergessen)</li>
<li>[Fix] Display user's Jabber address in popup when Jabber functionality is disabled (Bug #20775 - Patch by nickvergessen)</li>
<li>[Fix] Correctly exclude forums from active topics list. (Bug #19135 - Patch by nickvergessen)</li>
<li>[Fix] Do not display birthdays of banned users (Bug #20625 - Patch by nickvergessen)</li>
<li>[Fix] Fix function to recalculate Nested Sets (Bug #41555 - Patch by EXreaction)</li>
<li>[Fix] Display but also highlight already used rank images when creating new ranks. (Bug #22665 - Patch by nickvergessen)</li>
<li>[Fix] Correctly orientate quoted text image on RTL languages (Bug #33745 - Patch by nickvergessen)</li>
<li>[Fix] Do not display &quot;View user notes&quot; and &quot;Warn user&quot; links in user profile if corresponding MCP modules are disabled. (Bug #10519 - Patch by rxu)</li>
<li>[Fix] Show proper error message when trying to create a private messages folder with an empty name. (Bug #39875 - Patch by nickvergessen)</li>
<li>[Fix] No longer state that it is possible to manage group leaders from the UCP. (Bug #19945 - Patch by nickvergessen)</li>
<li>[Fix] Show proper error message when trying to add bots to friends/foes list. (Bug #40205)</li>
<li>[Fix] Fixed database backup and restore with Oracle DBMS. (Bug #46715)</li>
<li>[Fix] Update attachments table when deleting user and retaining his posts. (Bug #40245)</li>
<li>[Fix] Correctly detect files in subfolders when viewing cached template files. (Bug #46145)</li>
<li>[Fix] Display user's jabber address in popup if jabber functionality is disabled. (Bug #20775)</li>
<li>[Fix] Correctly exclude forums from active topics list. (Bug #19135)</li>
<li>[Fix] Do not display banned users in birthday list. (Bug #20625)</li>
<li>[Fix] Fix function to recalculate nested sets. (Bug #41555 - Patch by EXreaction)</li>
<li>[Fix] Display but also highlight already used rank images while assigning new ranks. (Bug #22665)</li>
<li>[Fix] Correctly orientate quoted text image on RTL languages. (Bug #33745)</li>
<li>[Fix] Do not display &quot;View user notes&quot; and &quot;Warn user&quot; links in user profile if corresponding MCP modules are disabled. (Bug #10519)</li>
<li>[Fix] Show proper error message when trying to create a private messages folder with an empty name. (Bug #39875)</li>
<li>[Fix] No longer state that it is possible to manage group leaders from the UCP. (Bug #19945)</li>
<li>[Fix] Do not throw an error when PDO is a shared module and not loaded preventing SQLite from being loaded.</li>
<li>[Fix] Fix censoring of unicode words. (Bug #16555 - Patches by rxu)</li>
<li>[Fix] Display coloured usernames in ACP groups management screens</li>
<li>[Fix] Correctly describe founder permissions on trace-information (Bug #37235 - Patch by nickvergessen)</li>
<li>[Fix] Correct the width value for poll_center.gif omitted in imageset.cfg for subsilver2. (Bug #43005 - Patch by rxu)</li>
<li>[Fix] Correctly load complex language variable using acp_language (Bug #45735 - Patch by leviatan21)</li>
<li>[Fix] Fix reapply_sid() to correctly strip session id in certain circumstances (Bug #43125 - Patch by leviatan21)</li>
<li>[Fix] Correctly state why one language pack is marked with an asterisk in the ACP. (Bug #37565 - Patch by bantu)</li>
<li>[Fix] Correctly check if install directory is still present. (Bug #46965 - Patch by rxu)</li>
<li>[Fix] Correct banned user behaviour when &quot;force password change&quot; is enabled (Bug #47145 - Patch by nickvergessen and leviatan21)</li>
<li>[Fix] Fix censoring of unicode words. (Bug #16555)</li>
<li>[Fix] Display coloured usernames in ACP groups management screens.</li>
<li>[Fix] Correctly describe founder permissions on trace-information. (Bug #37235)</li>
<li>[Fix] Correct the width value for poll_center.gif omitted in imageset.cfg for subsilver2. (Bug #43005)</li>
<li>[Fix] Correctly load complex language variable using acp_language. (Bug #45735 - Patch by leviatan21)</li>
<li>[Fix] Fix reapply_sid() to correctly strip session id in certain circumstances. (Bug #43125 - Patch by leviatan21)</li>
<li>[Fix] Correctly state why one language pack is marked with an asterisk in the ACP. (Bug #37565)</li>
<li>[Fix] Correctly check if install directory is still present. (Bug #46965)</li>
<li>[Fix] Correct banned user behaviour when &quot;force password change&quot; is enabled. (Bug #47145 - Patch by nickvergessen and leviatan21)</li>
<li>[Fix] Correctly display ACP logs options, without permission to clear logs. (Bug #24155 - Patch by leviatan21)</li>
<li>[Fix] Display topic icons in MCP forum view again (only prosilver).</li>
<li>[Fix] Properly display post status messages in topic when post is reported and unapproved (Bug #44455 - Patch by leviatan21)</li>
<li>[Fix] Do not remove recipients when loading private message draft. (Bug #38395 - Patch by nickvergessen)</li>
<li>[Fix] Add author name to moderator log when deleting post/topic. (Bug #46225 - Patch by nickvergessen)</li>
<li>[Fix] Fix broken &quot;Report details&quot; link in the MCP. (Bug #46975 - Patch by nickvergessen)</li>
<li>[Fix] Resolve accesskey conflicts in prosilver. (Bug #44685 - Patch by bantu)</li>
<li>[Fix] Check if template file is empty before trying to read from it. (Bug #47345 - Patch by bantu)</li>
<li>[Fix] Correct descriptions of the permissions to use BBCode, smilies, images and flash to be more relevant. (Bug #36065 - Patch by rxu)</li>
<li>[Fix] Do not remove recipients when loading private message draft. (Bug #38395)</li>
<li>[Fix] Add author name to moderator log when deleting post/topic. (Bug #46225)</li>
<li>[Fix] Fix broken &quot;Report details&quot; link in the MCP. (Bug #46975)</li>
<li>[Fix] Resolve accesskey conflicts in prosilver. (Bug #44685)</li>
<li>[Fix] Check if template file is empty before trying to read from it. (Bug #47345)</li>
<li>[Fix] More descriptive descriptions for permissions to use BBCode, smilies, images and flash. (Bug #36065)</li>
<li>[Fix] Fix style issues in print mode. (Bug #26375 - Patch by leviatan21)</li>
<li>[Fix] Fix minor issue with L_QUOTE language string missing in several PM composing modes. (Bug #39625 - Patch by rxu)</li>
<li>[Fix] Also fetch posts of guests and deleted or deactivated users when searching for author names. (Bug #36565, #47765 - Patch by nickvergessen)</li>
<li>[Fix] Fix minor issue with L_QUOTE language string missing in several PM composing modes. (Bug #39625)</li>
<li>[Fix] Also fetch posts of guests and deleted or deactivated users while searching for author names. (Bug #36565, #47765)</li>
<li>[Fix] Show end of ban in MCP and ACP when user is banned by duration. (Bug #47815 - Patch by Pyramide)</li>
<li>[Fix] Correctly count posts awaiting approval in the MCP. (Bug #47685 - Patch by nickvergessen)</li>
<li>[Fix] Display user's posts count in private message when it is equal to 0 (prosilver). (Bug #40155 - Patch by rxu)</li>
<li>[Fix] Correctly count posts awaiting approval in the MCP. (Bug #47685)</li>
<li>[Fix] Display user's posts count in private message when it is equal to 0 (prosilver). (Bug #40155)</li>
<li>[Fix] Only allow users to disable word censor if globally allowed. (Bug #47575 - Patch by 00mohgta7)</li>
<li>[Fix] Fix database updater and db tools to support multiple column changes/additions/removals with SQLite</li>
<li>[Fix] Correctly detect GZIP status in debug mode. (Bug #24075 - Patch by rxu)</li>
<li>[Fix] Posting smilies in view more smilies now work again in IE (Bug #46025 - Patch by leviatan21)</li>
<li>[Fix] Properly convert and show filesize information. (Bug #47775 - Patch by bantu)</li>
<li>[Fix] Add ability to prune users who never logged in. (Bug #44295 - Patch by rxu)</li>
<li>[Fix] Show smilies and images in topic print view. (Bug #47265 - Patch by nickvergessen)</li>
<li>[Fix] Force full date in private message print view. (Patch by nickvergessen)</li>
<li>[Fix] Fix &quot;Always show a scrollbar for short pages&quot; for IE8 and Firefox 3.5 (Bug #47865 - Patch by stokerpiller)</li>
<li>[Fix] Do not allow setting group as default group for pending users. (Bug #45675 - Patch by nickvergessen)</li>
<li>[Fix] Fix database updater and db tools to support multiple column changes/additions/removals with SQLite.</li>
<li>[Fix] Correctly detect GZIP status in debug mode. (Bug #24075)</li>
<li>[Fix] Posting smilies in view more smilies screen now works again in IE. (Bug #46025 - Patch by leviatan21)</li>
<li>[Fix] Properly convert and show filesize information. (Bug #47775)</li>
<li>[Fix] Add ability to prune users who never logged in. (Bug #44295)</li>
<li>[Fix] Show smilies and images in topic print view. (Bug #47265)</li>
<li>[Fix] Force full date in private message print view.</li>
<li>[Fix] Fix &quot;Always show a scrollbar for short pages&quot; for IE8 and Firefox 3.5. (Bug #47865 - Patch by stokerpiller)</li>
<li>[Fix] Do not allow setting group as default group for pending users. (Bug #45675)</li>
<li>[Fix] Fail gracefully if store folder is not writable during update. (Bugs #46615, #46945)</li>
<li>[Fix] Hide profile-icon from viewtopic-page if user has no permissions (subsilver2 only) (Bug #37635 - Patch by leviatan21)</li>
<li>[Fix] Hide profile-icon from viewtopic page if user has no permissions (subsilver2 only). (Bug #37635 - Patch by leviatan21)</li>
<li>[Fix] Correct escaping/unescaping in the LDAP authentication plugin. (Bug #48175)</li>
<li>[Fix] Add hard limit for smilies.</li>
<li>[Fix] Remove redundant SQL query from ucp.php. (Bug #40305)</li>
<li>[Fix] Reorder frame order of animated subsilver2 topic icons to be useful when animation is disabled. (Bug #29385 - Patch by prototech)</li>
<li>[Fix] Reorder frame order of animated subsilver2 topic icons to be useful when animations are disabled. (Bug #29385 - Patch by prototech)</li>
<li>[Fix] Ensure user errors are displayed regardless of PHP settings. (Bug #47505)</li>
<li>[Fix] Permit null values for non-required integer custom profile fields and ensure zero complies with the range limits. (Bug #40925)</li>
<li>[Fix] Allow changing forum from select box under certain circumstances. (Bug #37525)</li>
<li>[Fix] Display required fields notice on registration above the custom profile fields. (Bug #39665)</li>
<li>[Fix] Copy poll options properly when copying topic. (Bug #39065)</li>
<li>[Fix] Fix error with disapproval of topics having several queued posts only. (Bug #47705 - Patch by rxu)</li>
<li>[Fix] Preserve newlines in template files (one newline had been always dropped after a template variable due to PHP's handling of closing tags)</li>
<li>[Fix] Be less strict with FTP daemons when getting directory filelists. (Bug #46295)</li>
<li>[Fix] Fix set_custom_template for database-stored styles (Bug #40515 - Patch by nickvergessen)</li>
<li>[Fix] Banning an already banned user states to be successful, but has no effect (Bug #47825 - Patch by Pyramide)</li>
<li>[Fix] Do not add style-parameter to URL again, after admin re-authentification (Bug #18005 - Patch by leviatan21)</li>
<li>[Fix] Do not cut post-message in between HTML-Entities on search.php (Bug #31505 - Patch by leviatan21)</li>
<li>[Fix] Correctly set attachment flag for topics, posts and pms after deleting attachments (Bug #48265 - Patch by MarcoDM and nickvergessen)</li>
<li>[Fix] Fix error with disapproval of topics having several queued posts only. (Bug #47705)</li>
<li>[Fix] Preserve newlines in template files (one newline had been always dropped after a template variable due to PHP's handling of closing tags).</li>
<li>[Fix] Be less strict with FTP daemons for getting directory filelists. (Bug #46295)</li>
<li>[Fix] Fix set_custom_template for database-stored styles. (Bug #40515)</li>
<li>[Fix] Banning an already banned user states to be successful, but has no effect. (Bug #47825 - Patch by Pyramide)</li>
<li>[Fix] Do not add style parameter again to URL after admin re-authentification. (Bug #18005 - Patch by leviatan21)</li>
<li>[Fix] Do not cut post-message in between HTML-Entities on search.php. (Bug #31505 - Patch by leviatan21)</li>
<li>[Fix] Correctly set attachment flag for topics, posts and pms after deleting attachments. (Bug #48265 - Patch by MarcoDM and nickvergessen)</li>
<li>[Fix] Display &quot;Locked&quot; button instead of &quot;Reply&quot; one for locked forum in viewtopic (prosilver). (Bug #38055 - Patch by Raimon)</li>
<li>[Fix] Correctly propagate umlauts over search result pages (Bug #33755)</li>
<li>[Fix] Correctly propagate umlauts over search result pages. (Bug #33755)</li>
<li>[Fix] Preserve post options when refusing to save the post as a draft. (Bug #39115)</li>
<li>[Fix] Do not send private message back to sender if sender is in the same group the private message was sent to.</li>
<li>[Fix] Correctly add user to a group making it a default one. (Bug #48345 - Patch by rxu)</li>
<li>[Fix] Correctly add user to a group making it a default one. (Bug #48345)</li>
<li>[Fix] Add log entry when copying forum permissions.</li>
<li>[Fix] Min/max characters per posts no longer affects poll options (Bug #47295 - Patch by nickvergessen)</li>
<li>[Fix] Correctly log action when users request to join a group (Bug #37585 - Patch by nickvergessen)</li>
<li>[Fix] Min/max characters per posts no longer affects poll options. (Bug #47295)</li>
<li>[Fix] Correctly log action when users request to join a group. (Bug #37585)</li>
<li>[Fix] Do not try to create thumbnails for images we cannot open properly. (Bug #48695)</li>
<li>[Fix] Apply locale-independent basename() to attachment filenames. New function added: utf8_basename(). (Bug #43335 - Patch by ocean=Yohsuke)</li>
<li>[Fix] Adjust build_url() to not prepend $phpbb_root_path if path returned from redirect() is an URL. This fixes redirect issues with some installations and bridges. (Bug #47535)</li>
<li>[Fix] Do not mark global announcements as read if all topics in a forum become read (Bug #15729).</li>
<li>[Fix] Fix general error while registration, through undefined variable $config in validate_referer (Bug #49035 - Patch by wjvriend)</li>
<li>[Fix] Fix general error in registration, caused by an undefined $config variable in validate_referer(). (Bug #49035 - Patch by wjvriend)</li>
<li>[Fix] Correctly extract column default value when exporting PostgreSQL tables. (Bug #48955)</li>
<li>[Fix] Allow updater to work correctly with PHP filename extensions other than &quot;.php&quot;. (Bugs #15809, #49215)</li>
<li>[Fix] Update search index if only post subject changed. (Bug #49435)</li>
<li>[Fix] Fix who is online displaying incorrect data. (Bug #49485, thanks Brainy)</li>
<li>[Fix] Fixed incorrect &quot;topic does not exist&quot; when unapproved posts were visited without global moderator permissions. (Bug #47795)</li>
<li>[Fix] Fixed incorrect &quot;topic does not exist&quot; if unapproved posts were visited without global moderator permissions. (Bug #47795)</li>
<li>[Fix] Prevent style switcher from blocking the tab key. (Bug #49335)</li>
<li>[Fix] Correctly redirect on MCP main page after posts approval/disapproval from it. (Bug #49625)</li>
<li>[Fix] Correctly redirect back to MCP main page after posts approval/disapproval from it. (Bug #49625)</li>
<li>[Fix] Do not display topic approval status image for shadow topic if a user is not a moderator in the forum the topic has been moved to. (Bug #43295)</li>
<li>[Fix] Fix email problems on servers with PHP installations not accepting RFC-compliant subject string passed to the the mail()-function. (Bug #46725)</li>
<li>[Fix] Correctly orientate Control-Panel-Navigation background-image on RTL languages. (Bug #49945)</li>
<li>[Fix] Fix email problems on servers with PHP installations not accepting RFC-compliant subject string passed to the mail()-function. (Bug #46725)</li>
<li>[Fix] Correctly orientate control panel navigation background-image on RTL languages. (Bug #49945)</li>
<li>[Fix] Sort private messages by message time and not message id. (Bug #50015)</li>
<li>[Fix] Make sure only logs for existing users are displayed and user-specific logs removed on user deletion. (Bug #49855)</li>
<li>[Fix] Only show &quot;Add friend&quot; and &quot;Add foe&quot; links if the specific module is enabled. (Bug #50475)</li>
<li>[Fix] Correctly display list items in forum description in prosilver and administration. (Bug #48055 - Patch by leviatan21)</li>
<li>[Fix] Fix handling of bookmarks and subscriptions on &quot;split topics&quot;, &quot;merge topics&quot; and &quot;merge posts&quot;. (Bug #50035)</li>
<li>[Fix] Only embed cron.php if there is no cron lock present to reduce overhead. (Bug #45725 - Patch by TerryE)</li>
<li>[Fix] Add header gradient back into subsilver2 but keep site logo easily replaceable with smaller and bigger ones. (Bug #11142 - Patch by dark/Rain and Raimon)</li>
<li>[Fix] Send activation email when activating user from user settings. (Bug #43145)</li>
@@ -210,42 +209,45 @@
<li>[Fix] Do not display links to user/post search if search is disabled. (Bug #50685 - Patch by HardStyle)</li>
<li>[Fix] Fix icon alignment for forums with large descriptions in subsilver2. (Bug #50445)</li>
<li>[Fix] Correctly display underlined links placed in last line in viewtopic. (Bug #14811 - Patch by primehalo)</li>
<li>[Fix] Only check whether forum image exists if forum image is specified. (Bug #51905)</li>
<li>[Fix] Fixed database updater for changes to columns having default value in MSSQL (adding/dropping constraints).</li>
<li>[Fix] Jabber SASL PLAIN authentication failures. (Bug #52995)</li>
<li>[Change] Database updater now supports checking for existing/missing indexes.</li>
<li>[Change] submit_post() now accepts force_approved_state key passed to $data to indicate new posts being approved (true) or unapproved (false).</li>
<li>[Change] Change the data format of the default file ACM to be more secure from tampering and have better performance.</li>
<li>[Change] Add index on log_time to the log table to prevent slowdown on boards with many log entries. (Bug #44665 - Patch by bantu)</li>
<li>[Change] Template engine now permits to a limited extent variable includes.</li>
<li>[Change] Template engine now permits variable includes to a limited extent.</li>
<li>[Change] Quote BBCode no longer requires the f_reply permission. (Bug #16079)</li>
<li>[Change] Banning/unbanning users now generates an entry in their user notes (Bug #21825 - Patch by nickvergessen)</li>
<li>[Change] Banning/unbanning users now generates an entry in their user notes. (Bug #21825)</li>
<li>[Change] Smilies no longer require the f_bbcode permission. (Bug #26545)</li>
<li>[Change] Ability to define column split in FAQ/BBCode help (Bug #31405)</li>
<li>[Change] Changed behaviour of group_create() function to support specifying additional group columns</li>
<li>[Change] Hide avatar when avatar-type is not allowed (Bug #46785 - Patch by cYbercOsmOnauT and nickvergessen)</li>
<li>[Change] INCLUDEPHP not depending on phpbb_root_path (Bug #45805 - Patch by nickvergessen)</li>
<li>[Change] Ability to define column split in FAQ/BBCode help. (Bug #31405)</li>
<li>[Change] Changed behaviour of group_create() function to support specifying additional group columns.</li>
<li>[Change] Hide avatar when avatar-type is not allowed. (Bug #46785 - Patch by cYbercOsmOnauT and nickvergessen)</li>
<li>[Change] INCLUDEPHP paths are now relative to $phpbb_root_path. (Bug #45805)</li>
<li>[Change] Ability to fetch moderators with get_moderators() even if load_moderators setting is off. (Bug #35955)</li>
<li>[Change] &quot;Post details&quot; links with image in MCP. (Bug #39845 - Patch by leviatan21)</li>
<li>[Change] PM history now only shows PMs of users you currently reply to. (Bug #39505 - Patch by nickvergessen)</li>
<li>[Change] Show quote button for own PMs in PM history. (Bug #37285 - Patch by nickvergessen)</li>
<li>[Change] PM history now only shows PMs of users you currently reply to. (Bug #39505)</li>
<li>[Change] Show quote button for own PMs in PM history. (Bug #37285)</li>
<li>[Change] Fetch requested cookie variables directly from cookie super global. (Bug #47785)</li>
<li>[Change] Add confirmation for deactivating styles (Bug #14304 - Patch by leviatan21)</li>
<li>[Change] Add confirmation for deactivating language packs (Patch by leviatan21)</li>
<li>[Change] Add confirm-box when deleting permissions (Bug #13673 - Patch by nickvergessen)</li>
<li>[Change] Add pagination for icons and smilies in the ACP and smilies in the smiley popup</li>
<li>[Change] Add confirmation for deactivating styles. (Bug #14304 - Patch by leviatan21)</li>
<li>[Change] Add confirmation for deactivating language packs. (Patch by leviatan21)</li>
<li>[Change] Add confirmation for deleting permissions. (Bug #13673)</li>
<li>[Change] Add pagination for icons and smilies in the ACP and smilies in the smiley popup.</li>
<li>[Change] Cache get_username_string() function calls on viewtopic.</li>
<li>[Change] Cache version check.</li>
<li>[Change] When creating a new forum without copying permissions, ask again.</li>
<li>[Change] Parse multiline url title for [url] BBCode tag. (Bug #1309)</li>
<li>[Change] Introduce new parameter to page_header() for forum specific who is online listings.</li>
<li>[Change] Lifted minimum requirement for Firebird DBMS from 2.0+ to 2.1+.</li>
<li>[Change] Unapproved topics can no longer be replied to (Bug #44005, #47675, #23605)</li>
<li>[Change] Require user to be registered and logged in to search for unread posts if topic read tracking is disabled for guests (Bug #49525)</li>
<li>[Change] Allow three-digit hex notation in Color BBcode. (Bug #39965 - Patch by m0rpha)</li>
<li>[Change] Changed minimum requirement for Firebird DBMS from 2.0+ to 2.1+.</li>
<li>[Change] Unapproved topics can no longer be replied to. (Bug #44005, #47675, #23605)</li>
<li>[Change] Require user to be registered and logged in to search for unread posts if topic read tracking is disabled for guests. (Bug #49525)</li>
<li>[Change] Allow three-digit hex notation in color BBcode. (Bug #39965 - Patch by m0rpha)</li>
<li>[Change] Simplified login_box() and redirection after login. S_LOGIN_ACTION can now be used on every page. (Bug #50285)</li>
<li>[Change] Do not take edit post time into account for determining permission to delete last post in topic. (Bug #48615)</li>
<li>[Change] Resize oversized Topic icons (Bug #44415)</li>
<li>[Change] Banned IPs are now sorted (Bug #43045 - Patch by DavidIQ)</li>
<li>[Change] phpBB updater now skips sole whitespace changes. This reduces the chance of conflicts tremendously.</li>
<li>[Feature] Add language selection on the registration terms page (Bug #15085 - Patch by leviatan21)</li>
<li>[Feature] Backported 3.2 captcha plugins.
<li>[Change] Resize oversized topic icons. (Bug #44415)</li>
<li>[Change] Banned IPs are now sorted. (Bug #43045 - Patch by DavidIQ)</li>
<li>[Change] phpBB updater now skips sole whitespace/tab changes while computing differences. This reduces the chance of conflicts tremendously.</li>
<li>[Change] phpBB updater now solves common conflicts on its own. This further reduces the chance of conflicts.</li>
<li>[Feature] Add language selection to the registration terms page. (Bug #15085 - Patch by leviatan21)</li>
<li>[Feature] Backported 3.2 captcha plugins:
<ul>
<li>Classic and GD CAPTCHA</li>
<li>reCaptcha (based on API from recaptcha.net by Mike Crawford and Ben Maurer)</li>
@@ -253,32 +255,32 @@
<li>3D Wave (by Robert &quot;Xore&quot; Hetzler)</li>
</ul>
</li>
<li>[Feature] Introduced new ACM plugins:
<li>[Feature] Introduced new ACM (Cache) plugins:
<ul>
<li>null</li>
<li>null (to disable caching completely)</li>
<li><a href="http://pecl.php.net/package/memcache">memcache</a></li>
<li><a href="http://pecl.php.net/package/APC">APC</a></li>
<li><a href="http://xcache.lighttpd.net/">XCache</a></li>
<li><a href="http://eaccelerator.net/">eAccelerator</a></li>
</ul>
</li>
<li>[Feature] ATOM Feeds (Idea and diversed from RSS Feed 2.0 MOD (Version 1.0.8/9) by leviatan21)</li>
<li>[Feature] New groups option to excempt group leaders from group permissions</li>
<li>[Feature] ATOM Feeds (Idea from RSS Feed 2.0 MOD (Version 1.0.8/9) by leviatan21)</li>
<li>[Feature] New groups option to excempt group leaders from group permissions.</li>
<li>[Feature] New &quot;Newly Registered Users&quot; group for assigning permissions to newly registered users. They will be removed from this group once they reach a defineable amount of posts.</li>
<li>[Feature] Ability to define if the &quot;Newly Registered Users&quot; group will be assigned as the default group to newly registered users.</li>
<li>[Feature] Add new option to disable avatars board-wide (Bug #46785 - Patch by cYbercOsmOnauT and nickvergessen)</li>
<li>[Feature] Enhance obtain_users_online_string to be able to return user-lists for other session-items (Bug #31975 - Patch by nickvergessen)</li>
<li>[Feature] Add unapproved topic icon for moderators on forum list (Bug #46865 - Patch by nickvergessen)</li>
<li>[Feature] Ability to define minimum number of characters for posts/pms</li>
<li>[Feature] Store signature configuration options in database (Bug #45115 - Patch by rxu)</li>
<li>[Feature] Add new option to disable avatars board-wide. (Bug #46785 - Patch by cYbercOsmOnauT and nickvergessen)</li>
<li>[Feature] Enhance obtain_users_online_string to be able to return user-lists for other session items. (Bug #31975)</li>
<li>[Feature] Add unapproved topic icon for moderators on forum list. (Bug #46865)</li>
<li>[Feature] Ability to define minimum number of characters for posts/pms.</li>
<li>[Feature] Store signature configuration options in database. (Bug #45115)</li>
<li>[Feature] Add bare-bones quick-reply editor to viewtopic.</li>
<li>[Feature] Detect when a post has been altered by someone else while editing. (Patch by bantu)</li>
<li>[Feature] Add unread posts quick search option (Bug #46765 - Patch by rxu)</li>
<li>[Feature] Add option to disable avatar uploads from remote locations. (Bug #45375 - Patch by nickvergessen)</li>
<li>[Feature] Ability to delete warnings and keep warnings permanently (Bug #43375 - Patch by nickvergessen)</li>
<li>[Feature] Detect if a post has been altered by someone else while editing.</li>
<li>[Feature] Add unread posts quick search option. (Bug #46765)</li>
<li>[Feature] Add option to disable avatar uploads from remote locations. (Bug #45375)</li>
<li>[Feature] Ability to delete warnings and keep warnings permanently. (Bug #43375)</li>
<li>[Feature] Ability to empty a user's outbox from the user ACP quick tools.</li>
<li>[Feature] Ability to search ACP / MCP logs</li>
<li>[Feature] Users can report PMs to moderators which are then visible in a new MCP module</li>
<li>[Feature] Ability to search ACP/MCP logs.</li>
<li>[Feature] Users can report PMs to moderators which are then visible in a new MCP module.</li>
<li>[Feature] Parse email text files with the template engine.</li>
<li>[Feature] Use email-style quoting when bbcodes are disabled.</li>
<li>[Feature] Added new functionality to inactive users module:
@@ -292,15 +294,17 @@
</li>
<li>[Feature] Display version check on ACP main page.</li>
<li>[Feature] Ability to copy permissions from one forum to several other forums.</li>
<li>[Feature] Ability to control the display of custom profile fields on viewtopic (Bug #48985).</li>
<li>[Feature] Ability to control the display of custom profile fields on viewtopic. (Bug #48985)</li>
<li>[Feature] Fallback options for missing language files. (Bug #38575 - Patch by EXreaction)</li>
<li>[Feature] Separate PM Reply and PM Reply to all in prosilver.</li>
<li>[Feature] Separate &quot;PM Reply&quot; and &quot;PM Reply to all&quot; in prosilver.</li>
<li>[Feature] Place debug notices during captcha rendering in the error log - useful for debugging output already started errors.</li>
<li>[Feature] Ability to define constant PHPBB_USE_BOARD_URL_PATH to use board url for images/avatars/ranks/imageset...</li>
<li>[Feature] Added function to generate Email hash. (Bug #49195)</li>
<li>[Feature] Style authors are now able to define the default submit button used for form submission on ENTER keypress on forms using more than one. Prosilver uses this for the posting page(s) and registration screen.</li>
<li>[Feature] Ability to define constant PHPBB_USE_BOARD_URL_PATH to use board url for images/avatars/ranks/imageset (useful for bridges and applications using phpBB).</li>
<li>[Feature] Added function to generate email hash. (Bug #49195)</li>
<li>[Feature] Style authors are now able to define the default submit button used for form submission on ENTER keypress on forms using more than one submit button. Prosilver uses this for the posting page(s) and registration screen.</li>
<li>[Feature] Ability to specify amount of time user is able to delete his last post in topic.</li>
<li>[Feature] Send anonymous statistical information to phpBB on installation and update (optional).</li>
</ul>
<a name="v304"></a><h3>1.ii. Changes since 3.0.4</h3>
<ul>

View File

@@ -196,7 +196,7 @@ foreach ($item_vars as $row)
echo '<p>' . $user->lang['STATISTICS'] . ': ' . $row['statistics'] . '</p>';
}
echo '<hr /></div>' . "\n" . ']]></content>' . "\n";
echo '<hr />' . "\n" . ']]></content>' . "\n";
echo '</entry>' . "\n";
}
@@ -212,17 +212,7 @@ function feed_append_sid($url, $params)
{
global $board_url;
$link = append_sid($board_url . $url, $params);
// Remove added sid - not as easy as it sounds. ;)
$link = (strpos($link, 'sid=') !== false) ? trim(preg_replace('/(&amp;|&|\?)sid=[a-z0-9]+(&amp;|&)?/', '\1', $link), '?& ') : $link;
// Now the only thing remaining could be an empty &amp;
$link = (substr($link, -5) === '&amp;') ? substr($link, 0, -5) : $link;
// And &amp;#xxx
$link = str_replace('&amp;#', '#', $link);
return $link;
return append_sid($board_url . $url, $params, true, '');
}
/**
@@ -249,7 +239,7 @@ function feed_generate_content($content, $uid, $bitfield, $options)
$content = str_replace('./', $board_url . '/', $content);
// Remove "Select all" link and mouse events
$content = str_replace('<a href="#" onclick="selectCode(this); return false;">' .$user->lang['SELECT_ALL_CODE'] . '</a>', '', $content);
$content = str_replace('<a href="#" onclick="selectCode(this); return false;">' . $user->lang['SELECT_ALL_CODE'] . '</a>', '', $content);
$content = preg_replace('#(onkeypress|onclick)="(.*?)"#si', '', $content);
// Firefox does not support CSS for feeds, though
@@ -430,7 +420,7 @@ class phpbb_feed
/**
* Default cache time of entries in seconds
*/
var $cache_time = 300;
var $cache_time = 0;
/**
* Separator for title elements to separate items (for example forum / topic)
@@ -450,7 +440,7 @@ class phpbb_feed
$this->sql = array();
// Set some values for pagination
$this->num_items = $config['feed_limit'];
$this->num_items = (int) $config['feed_limit'];
$this->set_keys();
}
@@ -828,7 +818,7 @@ class phpbb_feed_forums extends phpbb_feed
$this->set('date', 'forum_last_post_time');
$this->set('options', 'forum_desc_options');
$this->num_items = $config['feed_overall_forums_limit'];
$this->num_items = (int) $config['feed_overall_forums_limit'];
}
function open()

View File

@@ -30,10 +30,13 @@ class acp_captcha
$user->add_lang('acp/board');
include($phpbb_root_path . 'includes/captcha/captcha_factory.' . $phpEx);
$captchas = phpbb_captcha_factory::get_captcha_types();
$selected = request_var('select_captcha', $config['captcha_plugin']);
$selected = (isset($captchas['available'][$selected]) || isset($captchas['unavailable'][$selected])) ? $selected : $config['captcha_plugin'];
$configure = request_var('configure', false);
// Oh, they are just here for the view
if (isset($_GET['captcha_demo']))
{
@@ -45,12 +48,9 @@ class acp_captcha
{
$config_captcha =& phpbb_captcha_factory::get_instance($selected);
$config_captcha->acp_page($id, $this);
add_log('admin', 'LOG_CONFIG_VISUAL');
}
else
{
$captchas = phpbb_captcha_factory::get_captcha_types();
$config_vars = array(
'enable_confirm' => array('tpl' => 'REG_ENABLE', 'default' => false),
'enable_post_confirm' => array('tpl' => 'POST_ENABLE', 'default' => false),

View File

@@ -142,7 +142,7 @@ class acp_database
break;
case 'oracle':
$extractor->flush('TRUNCATE TABLE ' . $table_name . "\\\n");
$extractor->flush('TRUNCATE TABLE ' . $table_name . "/\n");
break;
default:
@@ -1716,8 +1716,7 @@ class oracle_extractor extends base_extractor
{
global $db;
$sql_data = '-- Table: ' . $table_name . "\n";
$sql_data .= "DROP TABLE $table_name;\n";
$sql_data .= '\\' . "\n";
$sql_data .= "DROP TABLE $table_name\n/\n";
$sql_data .= "\nCREATE TABLE $table_name (\n";
$sql = "SELECT COLUMN_NAME, DATA_TYPE, DATA_PRECISION, DATA_LENGTH, NULLABLE, DATA_DEFAULT
@@ -1732,7 +1731,7 @@ class oracle_extractor extends base_extractor
if ($row['data_type'] !== 'CLOB')
{
if ($row['data_type'] !== 'VARCHAR2')
if ($row['data_type'] !== 'VARCHAR2' && $row['data_type'] !== 'CHAR')
{
$line .= '(' . $row['data_precision'] . ')';
}
@@ -1762,12 +1761,20 @@ class oracle_extractor extends base_extractor
AND A.TABLE_NAME = '{$table_name}'";
$result = $db->sql_query($sql);
$primary_key = array();
$contraint_name = '';
while ($row = $db->sql_fetchrow($result))
{
$rows[] = " CONSTRAINT {$row['constraint_name']} PRIMARY KEY ({$row['column_name']})";
$constraint_name = '"' . $row['constraint_name'] . '"';
$primary_key[] = '"' . $row['column_name'] . '"';
}
$db->sql_freeresult($result);
if (sizeof($primary_key))
{
$rows[] = " CONSTRAINT {$constraint_name} PRIMARY KEY (" . implode(', ', $primary_key) . ')';
}
$sql = "SELECT A.CONSTRAINT_NAME, A.COLUMN_NAME
FROM USER_CONS_COLUMNS A, USER_CONSTRAINTS B
WHERE A.CONSTRAINT_NAME = B.CONSTRAINT_NAME
@@ -1775,24 +1782,44 @@ class oracle_extractor extends base_extractor
AND A.TABLE_NAME = '{$table_name}'";
$result = $db->sql_query($sql);
$unique = array();
$contraint_name = '';
while ($row = $db->sql_fetchrow($result))
{
$rows[] = " CONSTRAINT {$row['constraint_name']} UNIQUE ({$row['column_name']})";
$constraint_name = '"' . $row['constraint_name'] . '"';
$unique[] = '"' . $row['column_name'] . '"';
}
$db->sql_freeresult($result);
$sql_data .= implode(",\n", $rows);
$sql_data .= "\n)\n\\";
if (sizeof($unique))
{
$rows[] = " CONSTRAINT {$constraint_name} UNIQUE (" . implode(', ', $unique) . ')';
}
$sql = "SELECT A.REFERENCED_NAME
FROM USER_DEPENDENCIES A, USER_TRIGGERS B
$sql_data .= implode(",\n", $rows);
$sql_data .= "\n)\n/\n";
$sql = "SELECT A.REFERENCED_NAME, C.*
FROM USER_DEPENDENCIES A, USER_TRIGGERS B, USER_SEQUENCES C
WHERE A.REFERENCED_TYPE = 'SEQUENCE'
AND A.NAME = B.TRIGGER_NAME
AND B. TABLE_NAME = '{$table_name}'";
AND B.TABLE_NAME = '{$table_name}'
AND C.SEQUENCE_NAME = A.REFERENCED_NAME";
$result = $db->sql_query($sql);
$type = request_var('type', '');
while ($row = $db->sql_fetchrow($result))
{
$sql_data .= "\nCREATE SEQUENCE {$row['referenced_name']}\\\n";
$sql_data .= "\nDROP SEQUENCE \"{$row['referenced_name']}\"\n/\n";
$sql_data .= "\nCREATE SEQUENCE \"{$row['referenced_name']}\"";
if ($type == 'full')
{
$sql_data .= ' START WITH ' . $row['last_number'];
}
$sql_data .= "\n/\n";
}
$db->sql_freeresult($result);
@@ -1802,7 +1829,7 @@ class oracle_extractor extends base_extractor
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
$sql_data .= "\nCREATE OR REPLACE TRIGGER {$row['description']}WHEN ({$row['when_clause']})\n{$row['trigger_body']}\\";
$sql_data .= "\nCREATE OR REPLACE TRIGGER {$row['description']}WHEN ({$row['when_clause']})\n{$row['trigger_body']}\n/\n";
}
$db->sql_freeresult($result);
@@ -1822,7 +1849,7 @@ class oracle_extractor extends base_extractor
foreach ($index as $index_name => $column_names)
{
$sql_data .= "\nCREATE INDEX $index_name ON $table_name(" . implode(', ', $column_names) . ")\n\\";
$sql_data .= "\nCREATE INDEX $index_name ON $table_name(" . implode(', ', $column_names) . ")\n/\n";
}
$db->sql_freeresult($result);
$this->flush($sql_data);
@@ -1858,7 +1885,7 @@ class oracle_extractor extends base_extractor
// Oracle uses uppercase - we use lowercase
$str_val = $row[strtolower($ary_name[$i])];
if (preg_match('#char|text|bool|raw#i', $ary_type[$i]))
if (preg_match('#char|text|bool|raw|clob#i', $ary_type[$i]))
{
$str_quote = '';
$str_empty = "''";
@@ -1892,7 +1919,7 @@ class oracle_extractor extends base_extractor
// Take the ordered fields and their associated data and build it
// into a valid sql statement to recreate that field in the data.
$sql_data = "INSERT INTO $table_name (" . implode(', ', $schema_fields) . ') VALUES (' . implode(', ', $schema_vals) . ");\n";
$sql_data = "INSERT INTO $table_name (" . implode(', ', $schema_fields) . ') VALUES (' . implode(', ', $schema_vals) . ")\n/\n";
$this->flush($sql_data);
}
@@ -2211,8 +2238,10 @@ function sanitize_data_mssql($text)
function sanitize_data_oracle($text)
{
$data = preg_split('/[\0\n\t\r\b\f\'"\\\]/', $text);
preg_match_all('/[\0\n\t\r\b\f\'"\\\]/', $text, $matches);
// $data = preg_split('/[\0\n\t\r\b\f\'"\/\\\]/', $text);
// preg_match_all('/[\0\n\t\r\b\f\'"\/\\\]/', $text, $matches);
$data = preg_split('/[\0\b\f\'\/]/', $text);
preg_match_all('/[\0\r\b\f\'\/]/', $text, $matches);
$val = array();

View File

@@ -125,7 +125,6 @@ class acp_forums
'type_action' => request_var('type_action', ''),
'forum_status' => request_var('forum_status', ITEM_UNLOCKED),
'forum_parents' => '',
'forum_options' => 0,
'forum_name' => utf8_normalize_nfc(request_var('forum_name', '', true)),
'forum_link' => request_var('forum_link', ''),
'forum_link_track' => request_var('forum_link_track', false),
@@ -159,6 +158,12 @@ class acp_forums
'forum_password_unset' => request_var('forum_password_unset', false),
);
// On add, add empty forum_options... else do not consider it (not updating it)
if ($action == 'add')
{
$forum_data['forum_options'] = 0;
}
// Use link_display_on_index setting if forum type is link
if ($forum_data['forum_type'] == FORUM_LINK)
{
@@ -171,7 +176,7 @@ class acp_forums
$forum_data['forum_status'] = ITEM_UNLOCKED;
}
$forum_data['show_active'] = ($forum_data['forum_type'] == FORUM_POST) ? request_var('display_recent', false) : request_var('display_active', false);
$forum_data['show_active'] = ($forum_data['forum_type'] == FORUM_POST) ? request_var('display_recent', true) : request_var('display_active', true);
// Get data for forum rules if specified...
if ($forum_data['forum_rules'])
@@ -193,18 +198,19 @@ class acp_forums
$cache->destroy('sql', FORUMS_TABLE);
// Copy permissions?
if (!empty($forum_perm_from) && $forum_perm_from != $forum_data['forum_id'] &&
(($action != 'edit') || empty($forum_id) || ($auth->acl_get('a_fauth') && $auth->acl_get('a_authusers') && $auth->acl_get('a_authgroups') && $auth->acl_get('a_mauth'))))
if ($forum_perm_from && $forum_perm_from != $forum_data['forum_id'] &&
($action != 'edit' || empty($forum_id) || ($auth->acl_get('a_fauth') && $auth->acl_get('a_authusers') && $auth->acl_get('a_authgroups') && $auth->acl_get('a_mauth'))))
{
copy_forum_permissions($forum_perm_from, $forum_data['forum_id'], ($action == 'edit') ? true : false);
cache_moderators();
}
else if (($action != 'edit') && $auth->acl_get('a_fauth') && $auth->acl_get('a_authusers') && $auth->acl_get('a_authgroups') && $auth->acl_get('a_mauth'))
/* Commented out because of questionable UI workflow - re-visit for 3.0.7
else if (!$this->parent_id && $action != 'edit' && $auth->acl_get('a_fauth') && $auth->acl_get('a_authusers') && $auth->acl_get('a_authgroups') && $auth->acl_get('a_mauth'))
{
$this->copy_permission_page($forum_data);
return;
}
*/
$auth->acl_clear_prefetch();
$acl_url = '&amp;mode=setting_forum_local&amp;forum_id[]=' . $forum_data['forum_id'];
@@ -443,7 +449,7 @@ class acp_forums
'prune_days' => 7,
'prune_viewed' => 7,
'prune_freq' => 1,
'forum_flags' => FORUM_FLAG_POST_REVIEW,
'forum_flags' => FORUM_FLAG_POST_REVIEW + FORUM_FLAG_ACTIVE_TOPICS,
'forum_options' => 0,
'forum_password' => '',
'forum_password_confirm'=> '',
@@ -907,7 +913,7 @@ class acp_forums
array('lang' => 'FORUM_TOPICS_PAGE', 'value' => $forum_data['forum_topics_per_page'], 'column_type' => 'TINT:0'),
);
if (!file_exists($phpbb_root_path . $forum_data['forum_image']))
if (!empty($forum_data['forum_image']) && !file_exists($phpbb_root_path . $forum_data['forum_image']))
{
$errors[] = $user->lang['FORUM_IMAGE_NO_EXIST'];
}
@@ -1919,6 +1925,7 @@ class acp_forums
/**
* Display copy permission page
* Not used at the moment - we will have a look at it for 3.0.7
*/
function copy_permission_page($forum_data)
{

View File

@@ -89,16 +89,19 @@ class acp_icons
continue;
}
// adjust the width and height to be lower than 128px while perserving the aspect ratio
if ($img_size[0] > 127 && $img_size[0] > $img_size[1])
// adjust the width and height to be lower than 128px while perserving the aspect ratio (for icons)
if ($mode == 'icons')
{
$img_size[1] = (int) ($img_size[1] * (127 / $img_size[0]));
$img_size[0] = 127;
}
else if ($img_size[1] > 127)
{
$img_size[0] = (int) ($img_size[0] * (127 / $img_size[1]));
$img_size[1] = 127;
if ($img_size[0] > 127 && $img_size[0] > $img_size[1])
{
$img_size[1] = (int) ($img_size[1] * (127 / $img_size[0]));
$img_size[0] = 127;
}
else if ($img_size[1] > 127)
{
$img_size[0] = (int) ($img_size[0] * (127 / $img_size[1]));
$img_size[1] = 127;
}
}
$_images[$path . $img]['file'] = $path . $img;
@@ -363,7 +366,7 @@ class acp_icons
if ($mode == 'smilies' && $action == 'create')
{
$smiley_count = $this->item_count($table);
$addable_smileys_count = sizeof($images);
foreach ($images as $image)
{
@@ -372,7 +375,7 @@ class acp_icons
--$addable_smileys_count;
}
}
if ($smiley_count + $addable_smileys_count > SMILEY_LIMIT)
{
trigger_error(sprintf($user->lang['TOO_MANY_SMILIES'], SMILEY_LIMIT) . adm_back_link($this->u_action), E_USER_WARNING);
@@ -400,15 +403,19 @@ class acp_icons
$image_height[$image] = $img_size[1];
}
if ($image_width[$image] > 127 && $image_width[$image] > $image_height[$image])
// Adjust image width/height for icons
if ($mode == 'icons')
{
$image_height[$image] = (int) ($image_height[$image] * (127 / $image_width[$image]));
$image_width[$image] = 127;
}
else if ($image_height[$image] > 127)
{
$image_width[$image] = (int) ($image_width[$image] * (127 / $image_height[$image]));
$image_height[$image] = 127;
if ($image_width[$image] > 127 && $image_width[$image] > $image_height[$image])
{
$image_height[$image] = (int) ($image_height[$image] * (127 / $image_width[$image]));
$image_width[$image] = 127;
}
else if ($image_height[$image] > 127)
{
$image_width[$image] = (int) ($image_width[$image] * (127 / $image_height[$image]));
$image_height[$image] = 127;
}
}
$img_sql = array(
@@ -923,7 +930,7 @@ class acp_icons
generate_pagination($this->u_action, $item_count, $config['smilies_per_page'], $pagination_start, true)
);
}
/**
* Returns the count of smilies or icons in the database
*

View File

@@ -509,6 +509,14 @@ class acp_profile
// Get the number of options if this key is 'field_maxlen'
$var = request_var('field_default_value', 0);
}*/
else if ($field_type == FIELD_INT && $key == 'field_default_value')
{
// Permit an empty string
if (request_var('field_default_value', '') === '')
{
$var = '';
}
}
$cp->vars[$key] = $var;
}

View File

@@ -39,10 +39,16 @@ class acp_update
$info = obtain_latest_version_info(request_var('versioncheck_force', false), true);
if ($info === false)
{
trigger_error('VERSIONCHECK_FAIL', E_USER_WARNING);
}
$info = explode("\n", $info);
$latest_version = trim($info[0]);
$announcement_url = trim($info[1]);
$announcement_url = (strpos($announcement_url, '&amp;') === false) ? str_replace('&', '&amp;', $announcement_url) : $announcement_url;
$update_link = append_sid($phpbb_root_path . 'install/index.' . $phpEx, 'mode=update');
// Determine automatic update...

View File

@@ -1023,7 +1023,7 @@ class acp_users
'U_WHOIS' => $this->u_action . "&amp;action=whois&amp;user_ip={$user_row['user_ip']}",
'U_MCP_QUEUE' => ($auth->acl_getf_global('m_approve')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue', true, $user->session_id) : '',
'U_SWITCH_PERMISSIONS' => ($auth->acl_get('a_switchperm') && $user->data['user_id'] != $user_row['user_id']) ? append_sid("{$phpbb_root_path}ucp.$phpEx", "mode=switch_perm&amp;u={$user_row['user_id']}") : '',
'U_SWITCH_PERMISSIONS' => ($auth->acl_get('a_switchperm') && $user->data['user_id'] != $user_row['user_id']) ? append_sid("{$phpbb_root_path}ucp.$phpEx", "mode=switch_perm&amp;u={$user_row['user_id']}&amp;hash=" . generate_link_hash('switchperm')) : '',
'POSTS_IN_QUEUE' => $user_row['posts_in_queue'],
'USER' => $user_row['username'],
@@ -1167,13 +1167,7 @@ class acp_users
$deleteall = request_var('delall', 0);
if ($deletemark && $marked)
{
$sql_in = array();
foreach ($marked as $mark)
{
$sql_in[] = $mark;
}
$where_sql = ' AND ' . $db->sql_in_set('warning_id', $sql_in);
unset($sql_in);
$where_sql = ' AND ' . $db->sql_in_set('warning_id', array_values($marked));
}
if ($where_sql || $deleteall)
@@ -1291,7 +1285,6 @@ class acp_users
$template->assign_vars(array(
'S_WARNINGS' => true,
'S_CLEARLOGS' => $auth->acl_get('a_clearlogs'),
));
break;
@@ -1715,6 +1708,7 @@ class acp_users
$template->assign_vars(array(
'S_AVATAR' => true,
'S_CAN_UPLOAD' => $can_upload,
'S_UPLOAD_FILE' => ($config['allow_avatar'] && $can_upload && $config['allow_avatar_upload']) ? true : false,
'S_REMOTE_UPLOAD' => ($config['allow_avatar'] && $can_upload && $config['allow_avatar_remote_upload']) ? true : false,
'S_ALLOW_REMOTE' => ($config['allow_avatar'] && $config['allow_avatar_remote']) ? true : false,

View File

@@ -67,10 +67,12 @@ function login_db(&$username, &$password)
// Every auth module is able to define what to do by itself...
if ($config['max_login_attempts'] && $row['user_login_attempts'] >= $config['max_login_attempts'])
{
$confirm_id = request_var('confirm_id', '');
// Visual Confirmation handling
if (!$confirm_id)
$captcha =& phpbb_captcha_factory::get_instance($config['captcha_plugin']);
$captcha->init(CONFIRM_LOGIN);
$vc_response = $captcha->validate();
if ($vc_response)
{
return array(
'status' => LOGIN_ERROR_ATTEMPTS,
@@ -78,21 +80,7 @@ function login_db(&$username, &$password)
'user_row' => $row,
);
}
else
{
$captcha =& phpbb_captcha_factory::get_instance($config['captcha_plugin']);
$captcha->init(CONFIRM_LOGIN);
$vc_response = $captcha->validate();
if ($vc_response)
{
return array(
'status' => LOGIN_ERROR_ATTEMPTS,
'error_msg' => 'LOGIN_ERROR_ATTEMPTS',
'user_row' => $row,
);
}
}
}
// If the password convert flag is set we need to convert it

View File

@@ -128,7 +128,7 @@ class bbcode
*/
function bbcode_cache_init()
{
global $user, $phpbb_root_path;
global $phpbb_root_path, $template, $user;
if (empty($this->template_filename))
{
@@ -137,7 +137,7 @@ class bbcode
if (!@file_exists($this->template_filename))
{
if (isset($user->theme['template_inherits_id']) && $user->theme['template_inherits_id'])
if (isset($template->orig_tpl_inherits_id) && $template->orig_tpl_inherits_id)
{
$this->template_filename = $phpbb_root_path . 'styles/' . $user->theme['template_inherit_path'] . '/template/bbcode.html';
if (!@file_exists($this->template_filename))

View File

@@ -35,7 +35,7 @@ class phpbb_captcha_factory
{
include($phpbb_root_path . "includes/captcha/plugins/{$name}_plugin." . $phpEx);
}
$instance =& call_user_func(array($name, 'get_instance'));
$instance = call_user_func(array($name, 'get_instance'));
return $instance;
}

View File

@@ -80,7 +80,7 @@ class phpbb_captcha_gd extends phpbb_default_captcha
{
return true;
}
function get_name()
{
return 'CAPTCHA_GD';
@@ -123,6 +123,8 @@ class phpbb_captcha_gd extends phpbb_default_captcha
set_config($captcha_var, $value);
}
}
add_log('admin', 'LOG_CONFIG_VISUAL');
trigger_error($user->lang['CONFIG_UPDATED'] . adm_back_link($module->u_action));
}
else if ($submit)
@@ -148,7 +150,7 @@ class phpbb_captcha_gd extends phpbb_default_captcha
function execute_demo()
{
global $config;
$config_old = $config;
foreach ($this->captcha_vars as $captcha_var => $template_var)
{

View File

@@ -53,16 +53,16 @@ class phpbb_captcha_qa
// read input
$this->confirm_id = request_var('qa_confirm_id', '');
$this->answer = request_var('qa_answer', '', true);
$this->answer = utf8_normalize_nfc(request_var('qa_answer', '', true));
$this->type = (int) $type;
$this->question_lang = $user->data['user_lang'];
$this->question_lang = $user->lang_name;
// we need all defined questions - shouldn't be too many, so we can just grab them
// try the user's lang first
$sql = 'SELECT question_id
FROM ' . CAPTCHA_QUESTIONS_TABLE . "
WHERE lang_iso = '" . $db->sql_escape($user->data['user_lang']) . "'";
WHERE lang_iso = '" . $db->sql_escape($user->lang_name) . "'";
$result = $db->sql_query($sql, 3600);
while ($row = $db->sql_fetchrow($result))
@@ -349,7 +349,12 @@ class phpbb_captcha_qa
global $config, $db, $user;
$error = '';
if (!sizeof($this->question_ids))
{
return false;
}
if (!$this->confirm_id)
{
$error = $user->lang['CONFIRM_QUESTION_WRONG'];
@@ -388,6 +393,11 @@ class phpbb_captcha_qa
{
global $db, $user;
if (!sizeof($this->question_ids))
{
return false;
}
$this->confirm_id = md5(unique_id($user->ip));
$this->question = (int) array_rand($this->question_ids);
@@ -409,6 +419,11 @@ class phpbb_captcha_qa
function reselect_question()
{
global $db, $user;
if (!sizeof($this->question_ids))
{
return false;
}
$this->question = (int) array_rand($this->question_ids);
$this->solved = 0;
@@ -449,6 +464,11 @@ class phpbb_captcha_qa
function load_answer()
{
global $db, $user;
if (!sizeof($this->question_ids))
{
return false;
}
$sql = 'SELECT con.question_id, attempts, question_text, strict
FROM ' . CAPTCHA_QA_CONFIRM_TABLE . ' con, ' . CAPTCHA_QUESTIONS_TABLE . " qes
@@ -482,7 +502,7 @@ class phpbb_captcha_qa
{
global $db;
$answer = ($this->question_strict) ? request_var('qa_answer', '', true) : utf8_clean_string(request_var('qa_answer', '', true));
$answer = ($this->question_strict) ? utf8_normalize_nfc(request_var('qa_answer', '', true)) : utf8_clean_string(utf8_normalize_nfc(request_var('qa_answer', '', true)));
$sql = 'SELECT answer_text
FROM ' . CAPTCHA_ANSWERS_TABLE . '
@@ -685,6 +705,7 @@ class phpbb_captcha_qa
$this->acp_add_question($data);
}
add_log('admin', 'LOG_CONFIG_VISUAL');
trigger_error($user->lang['CONFIG_UPDATED'] . adm_back_link($list_url));
}
}
@@ -768,11 +789,12 @@ class phpbb_captcha_qa
*/
function acp_get_question_input()
{
$answers = utf8_normalize_nfc(request_var('answers', '', true));
$question = array(
'question_text' => request_var('question_text', '', true),
'strict' => request_var('strict', false),
'lang_iso' => request_var('lang_iso', ''),
'answers' => explode("\n", request_var('answers', '', true)),
'answers' => (strlen($answers)) ? explode("\n", $answers) : '',
);
return $question;
@@ -887,8 +909,9 @@ class phpbb_captcha_qa
}
if (!isset($langs[$question_data['lang_iso']]) ||
!$question_data['question_text'] ||
!sizeof($question_data['answers']))
!strlen($question_data['question_text']) ||
!sizeof($question_data['answers']) ||
!is_array($question_data['answers']))
{
return false;
}

View File

@@ -100,6 +100,8 @@ class phpbb_recaptcha extends phpbb_default_captcha
set_config($captcha_var, $value);
}
}
add_log('admin', 'LOG_CONFIG_VISUAL');
trigger_error($user->lang['CONFIG_UPDATED'] . adm_back_link($module->u_action));
}
else if ($submit)

View File

@@ -25,7 +25,7 @@ if (!defined('IN_PHPBB'))
*/
// phpBB Version
define('PHPBB_VERSION', '3.0.6-RC1');
define('PHPBB_VERSION', '3.0.6-RC4');
// QA-related
// define('PHPBB_QA', 1);

View File

@@ -453,11 +453,17 @@ class phpbb_db_tools
case 'firebird':
case 'mssql':
// We need the data here
$old_return_statements = $this->return_statements;
$this->return_statements = true;
$primary_key_stmts = $this->sql_create_primary_key($table_name, $table_data['PRIMARY_KEY']);
foreach ($primary_key_stmts as $pk_stmt)
{
$statements[] = $pk_stmt;
}
$this->return_statements = $old_return_statements;
break;
case 'oracle':
@@ -1190,11 +1196,13 @@ class phpbb_db_tools
// For hexadecimal values do not use single quotes
if (strpos($column_data[1], '0x') === 0)
{
$sql_default .= 'DEFAULT (' . $column_data[1] . ') ';
$return_array['default'] = 'DEFAULT (' . $column_data[1] . ') ';
$sql_default .= $return_array['default'];
}
else
{
$sql_default .= 'DEFAULT (' . ((is_numeric($column_data[1])) ? $column_data[1] : "'{$column_data[1]}'") . ') ';
$return_array['default'] = 'DEFAULT (' . ((is_numeric($column_data[1])) ? $column_data[1] : "'{$column_data[1]}'") . ') ';
$sql_default .= $return_array['default'];
}
}
@@ -1781,7 +1789,7 @@ class phpbb_db_tools
case 'firebird':
$sql = "SELECT LOWER(RDB\$INDEX_NAME) as index_name
FROM RDB\$INDICES
WHERE RDB\$RELATION_NAME = " . strtoupper($table_name) . "
WHERE RDB\$RELATION_NAME = '" . strtoupper($table_name) . "'
AND RDB\$UNIQUE_FLAG IS NULL
AND RDB\$FOREIGN_KEY IS NULL";
$col = 'index_name';
@@ -1808,8 +1816,9 @@ class phpbb_db_tools
case 'oracle':
$sql = "SELECT index_name
FROM user_indexes
WHERE table_name = '" . $table_name . "'
AND generated = 'N'";
WHERE table_name = '" . strtoupper($table_name) . "'
AND generated = 'N'
AND uniqueness = 'NONUNIQUE'";
$col = 'index_name';
break;
@@ -1864,12 +1873,33 @@ class phpbb_db_tools
}
else
{
$statements[] = 'ALTER TABLE ' . $table_name . ' ALTER COLUMN "' . strtoupper($column_name) . '" TYPE ' . ' ' . $column_data['column_type_sql'];
$statements[] = 'ALTER TABLE ' . $table_name . ' ALTER COLUMN "' . strtoupper($column_name) . '" TYPE ' . ' ' . $column_data['column_type_sql_type'];
}
break;
case 'mssql':
$statements[] = 'ALTER TABLE [' . $table_name . '] ALTER COLUMN [' . $column_name . '] ' . $column_data['column_type_sql'];
if (!empty($column_data['default']))
{
// Using TRANSACT-SQL for this statement because we do not want to have colliding data if statements are executed at a later stage
$statements[] = "DECLARE @drop_default_name VARCHAR(100), @cmd VARCHAR(1000)
SET @drop_default_name =
(SELECT so.name FROM sysobjects so
JOIN sysconstraints sc ON so.id = sc.constid
WHERE object_name(so.parent_obj) = '{$table_name}'
AND so.xtype = 'D'
AND sc.colid = (SELECT colid FROM syscolumns
WHERE id = object_id('{$table_name}')
AND name = '{$column_name}'))
IF @drop_default_name <> ''
BEGIN
SET @cmd = 'ALTER TABLE [{$table_name}] DROP CONSTRAINT [' + @drop_default_name + ']'
EXEC(@cmd)
END
SET @cmd = 'ALTER TABLE [{$table_name}] ADD CONSTRAINT [DF_{$table_name}_{$column_name}_1] {$column_data['default']} FOR [{$column_name}]'
EXEC(@cmd)";
}
break;
case 'mysql_40':

View File

@@ -136,7 +136,7 @@ class dbal_oracle extends dbal
*/
function _rewrite_where($where_clause)
{
preg_match_all('/\s*(AND|OR)?\s*([\w_.]++)\s*(?:(=|<[=>]?|>=?)\s*((?>\'(?>[^\']++|\'\')*+\'|[\d-.]+))|((NOT )?IN\s*\((?>\'(?>[^\']++|\'\')*+\',? ?|[\d-.]+,? ?)*+\)))/', $where_clause, $result, PREG_SET_ORDER);
preg_match_all('/\s*(AND|OR)?\s*([\w_.()]++)\s*(?:(=|<[=>]?|>=?|LIKE)\s*((?>\'(?>[^\']++|\'\')*+\'|[\d-.()]+))|((NOT )?IN\s*\((?>\'(?>[^\']++|\'\')*+\',? ?|[\d-.]+,? ?)*+\)))/', $where_clause, $result, PREG_SET_ORDER);
$out = '';
foreach ($result as $val)
{
@@ -255,13 +255,62 @@ class dbal_oracle extends dbal
// We overcome Oracle's 4000 char limit by binding vars
if (strlen($query) > 4000)
{
if (preg_match('/^(INSERT INTO[^(]++)\\(([^()]+)\\) VALUES[^(]++\\((.*?)\\)$/s', $query, $regs))
if (preg_match('/^(INSERT INTO[^(]++)\\(([^()]+)\\) VALUES[^(]++\\((.*?)\\)$/sU', $query, $regs))
{
if (strlen($regs[3]) > 4000)
{
$cols = explode(', ', $regs[2]);
preg_match_all('/\'(?:[^\']++|\'\')*+\'|[\d-.]+/', $regs[3], $vals, PREG_PATTERN_ORDER);
if (sizeof($cols) !== sizeof($vals))
{
// Try to replace some common data we know is from our restore script or from other sources
$regs[3] = str_replace("'||chr(47)||'", '/', $regs[3]);
$_vals = explode(', ', $regs[3]);
$vals = array();
$is_in_val = false;
$i = 0;
$string = '';
foreach ($_vals as $value)
{
if (strpos($value, "'") === false && !$is_in_val)
{
$vals[$i++] = $value;
continue;
}
if (substr($value, -1) === "'")
{
$vals[$i] = $string . (($is_in_val) ? ', ' : '') . $value;
$string = '';
$is_in_val = false;
if ($vals[$i][0] !== "'")
{
$vals[$i] = "''" . $vals[$i];
}
$i++;
continue;
}
else
{
$string .= (($is_in_val) ? ', ' : '') . $value;
$is_in_val = true;
}
}
if ($string)
{
// New value if cols != value
$vals[(sizeof($cols) !== sizeof($vals)) ? $i : $i - 1] .= $string;
}
$vals = array(0 => $vals);
}
$inserts = $vals[0];
unset($vals);

View File

@@ -71,8 +71,10 @@ class diff
{
$count = 0;
foreach ($this->_edits as $edit)
for ($i = 0, $size = sizeof($this->_edits); $i < $size; $i++)
{
$edit = $this->_edits[$i];
if (is_a($edit, 'diff_op_add') || is_a($edit, 'diff_op_change'))
{
$count += $edit->nfinal();
@@ -92,8 +94,10 @@ class diff
{
$count = 0;
foreach ($this->_edits as $edit)
for ($i = 0, $size = sizeof($this->_edits); $i < $size; $i++)
{
$edit = $this->_edits[$i];
if (is_a($edit, 'diff_op_delete') || is_a($edit, 'diff_op_change'))
{
$count += $edit->norig();
@@ -128,8 +132,9 @@ class diff
$rev->_edits = array();
foreach ($this->_edits as $edit)
for ($i = 0, $size = sizeof($this->_edits); $i < $size; $i++)
{
$edit = $this->_edits[$i];
$rev->_edits[] = $edit->reverse();
}
@@ -143,13 +148,36 @@ class diff
*/
function is_empty()
{
foreach ($this->_edits as $edit)
for ($i = 0, $size = sizeof($this->_edits); $i < $size; $i++)
{
if (!is_a($edit, 'diff_op_copy'))
$edit = $this->_edits[$i];
// skip diff_op_copy
if (is_a($edit, 'diff_op_copy'))
{
continue;
}
if (is_a($edit, 'diff_op_delete') || is_a($edit, 'diff_op_add'))
{
$orig = $edit->orig;
$final = $edit->final;
// We can simplify one case where the array is usually supposed to be empty...
if (sizeof($orig) == 1 && trim($orig[0]) === '') $orig = array();
if (sizeof($final) == 1 && trim($final[0]) === '') $final = array();
if (!$orig && !$final)
{
continue;
}
return false;
}
return false;
}
return true;
}
@@ -164,8 +192,10 @@ class diff
{
$lcs = 0;
foreach ($this->_edits as $edit)
for ($i = 0, $size = sizeof($this->_edits); $i < $size; $i++)
{
$edit = $this->_edits[$i];
if (is_a($edit, 'diff_op_copy'))
{
$lcs += sizeof($edit->orig);
@@ -185,8 +215,10 @@ class diff
{
$lines = array();
foreach ($this->_edits as $edit)
for ($i = 0, $size = sizeof($this->_edits); $i < $size; $i++)
{
$edit = $this->_edits[$i];
if ($edit->orig)
{
array_splice($lines, sizeof($lines), 0, $edit->orig);
@@ -206,8 +238,10 @@ class diff
{
$lines = array();
foreach ($this->_edits as $edit)
for ($i = 0, $size = sizeof($this->_edits); $i < $size; $i++)
{
$edit = $this->_edits[$i];
if ($edit->final)
{
array_splice($lines, sizeof($lines), 0, $edit->final);
@@ -258,8 +292,10 @@ class diff
$prevtype = null;
foreach ($this->_edits as $edit)
for ($i = 0, $size = sizeof($this->_edits); $i < $size; $i++)
{
$edit = $this->_edits[$i];
if ($prevtype == get_class($edit))
{
trigger_error("[diff] Edit sequence is non-optimal", E_USER_ERROR);
@@ -456,14 +492,14 @@ class diff3 extends diff
* @param array $final1 The first version to compare to.
* @param array $final2 The second version to compare to.
*/
function diff3(&$orig, &$final1, &$final2)
function diff3(&$orig, &$final1, &$final2, $preserve_cr = true)
{
$diff_engine = new diff_engine();
$diff_1 = $diff_engine->diff($orig, $final1);
$diff_2 = $diff_engine->diff($orig, $final2);
$diff_1 = $diff_engine->diff($orig, $final1, $preserve_cr);
$diff_2 = $diff_engine->diff($orig, $final2, $preserve_cr);
unset($engine);
unset($diff_engine);
$this->_edits = $this->_diff3($diff_1, $diff_2);
}
@@ -475,8 +511,10 @@ class diff3 extends diff
{
$conflicts = 0;
foreach ($this->_edits as $edit)
for ($i = 0, $size = sizeof($this->_edits); $i < $size; $i++)
{
$edit = $this->_edits[$i];
if ($edit->is_conflict())
{
$conflicts++;
@@ -506,8 +544,10 @@ class diff3 extends diff
$lines = array();
foreach ($this->_edits as $edit)
for ($i = 0, $size = sizeof($this->_edits); $i < $size; $i++)
{
$edit = $this->_edits[$i];
if ($edit->is_conflict())
{
// Start conflict label
@@ -544,8 +584,10 @@ class diff3 extends diff
{
$lines = array();
foreach ($this->_edits as $edit)
for ($i = 0, $size = sizeof($this->_edits); $i < $size; $i++)
{
$edit = $this->_edits[$i];
if ($edit->is_conflict())
{
$lines = array_merge($lines, $edit->final2);
@@ -566,8 +608,10 @@ class diff3 extends diff
{
$lines = array();
foreach ($this->_edits as $edit)
for ($i = 0, $size = sizeof($this->_edits); $i < $size; $i++)
{
$edit = $this->_edits[$i];
if ($edit->is_conflict())
{
$lines = array_merge($lines, $edit->final1);
@@ -588,8 +632,10 @@ class diff3 extends diff
{
$conflicts = array();
foreach ($this->_edits as $edit)
for ($i = 0, $size = sizeof($this->_edits); $i < $size; $i++)
{
$edit = $this->_edits[$i];
if ($edit->is_conflict())
{
$conflicts[] = array($edit->final1, $edit->final2);
@@ -713,6 +759,9 @@ class diff3_op
{
if (!isset($this->_merged))
{
// Prepare the arrays before we compare them. ;)
$this->solve_prepare();
if ($this->final1 === $this->final2)
{
$this->_merged = &$this->final1;
@@ -727,7 +776,9 @@ class diff3_op
}
else
{
// The following tries to aggressively solve conflicts...
$this->_merged = false;
$this->solve_conflict();
}
}
@@ -738,6 +789,267 @@ class diff3_op
{
return ($this->merged() === false) ? true : false;
}
/**
* Function to prepare the arrays for comparing - we want to skip over newline changes
* @author acydburn
*/
function solve_prepare()
{
// We can simplify one case where the array is usually supposed to be empty...
if (sizeof($this->orig) == 1 && trim($this->orig[0]) === '') $this->orig = array();
if (sizeof($this->final1) == 1 && trim($this->final1[0]) === '') $this->final1 = array();
if (sizeof($this->final2) == 1 && trim($this->final2[0]) === '') $this->final2 = array();
// Now we only can have the case where the only difference between arrays are newlines, so compare all cases
// First, some strings we can compare...
$orig = $final1 = $final2 = '';
foreach ($this->orig as $null => $line) $orig .= trim($line);
foreach ($this->final1 as $null => $line) $final1 .= trim($line);
foreach ($this->final2 as $null => $line) $final2 .= trim($line);
// final1 === final2
if ($final1 === $final2)
{
// We preserve the part which will be used in the merge later
$this->final2 = $this->final1;
}
// final1 === orig
else if ($final1 === $orig)
{
// Here it does not really matter what we choose, but we will use the new code
$this->orig = $this->final1;
}
// final2 === orig
else if ($final2 === $orig)
{
// Here it does not really matter too (final1 will be used), but we will use the new code
$this->orig = $this->final2;
}
}
/**
* Find code portions from $orig in $final1 and use $final2 as merged instance if provided
* @author acydburn
*/
function _compare_conflict_seq($orig, $final1, $final2 = false)
{
$result = array('merge_found' => false, 'merge' => array());
$_orig = &$this->$orig;
$_final1 = &$this->$final1;
// Ok, we basically search for $orig in $final1
$compare_seq = sizeof($_orig);
// Go through the conflict code
for ($i = 0, $j = 0, $size = sizeof($_final1); $i < $size; $i++, $j = $i)
{
$line = $_final1[$i];
$skip = 0;
for ($x = 0; $x < $compare_seq; $x++)
{
// Try to skip all matching lines
if (trim($line) === trim($_orig[$x]))
{
$line = (++$j < $size) ? $_final1[$j] : $line;
$skip++;
}
}
if ($skip === $compare_seq)
{
$result['merge_found'] = true;
if ($final2 !== false)
{
$result['merge'] = array_merge($result['merge'], $this->$final2);
}
$i += ($skip - 1);
}
else if ($final2 !== false)
{
$result['merge'][] = $line;
}
}
return $result;
}
/**
* Tries to solve conflicts aggressively based on typical "assumptions"
* @author acydburn
*/
function solve_conflict()
{
$this->_merged = false;
// CASE ONE: orig changed into final2, but modified/unknown code in final1.
// IF orig is found "as is" in final1 we replace the code directly in final1 and populate this as final2/merge
if (sizeof($this->orig) && sizeof($this->final2))
{
$result = $this->_compare_conflict_seq('orig', 'final1', 'final2');
if ($result['merge_found'])
{
$this->final2 = $result['merge'];
$this->_merged = &$this->final2;
return;
}
$result = $this->_compare_conflict_seq('final2', 'final1');
if ($result['merge_found'])
{
$this->_merged = &$this->final1;
return;
}
// Try to solve $Id$ issues. ;)
if (sizeof($this->orig) == 1 && sizeof($this->final1) == 1 && sizeof($this->final2) == 1)
{
$match = '#^' . preg_quote('* @version $Id: ', '#') . '[a-z\._\- ]+[0-9]+ [0-9]{4}-[0-9]{2}-[0-9]{2} [0-9\:Z]+ [a-z0-9_\- ]+\$$#';
if (preg_match($match, $this->orig[0]) && preg_match($match, $this->final1[0]) && preg_match($match, $this->final2[0]))
{
$this->_merged = &$this->final2;
return;
}
}
$second_run = false;
// Try to solve issues where the only reason why the above did not work is a newline being removed in the final1 code but exist in the orig/final2 code
if (trim($this->orig[0]) === '' && trim($this->final2[0]) === '')
{
unset($this->orig[0], $this->final2[0]);
$this->orig = array_values($this->orig);
$this->final2 = array_values($this->final2);
$second_run = true;
}
// The same is true for a line at the end. ;)
if (sizeof($this->orig) && sizeof($this->final2) && sizeof($this->orig) === sizeof($this->final2) && trim($this->orig[sizeof($this->orig)-1]) === '' && trim($this->final2[sizeof($this->final2)-1]) === '')
{
unset($this->orig[sizeof($this->orig)-1], $this->final2[sizeof($this->final2)-1]);
$this->orig = array_values($this->orig);
$this->final2 = array_values($this->final2);
$second_run = true;
}
if ($second_run)
{
$result = $this->_compare_conflict_seq('orig', 'final1', 'final2');
if ($result['merge_found'])
{
$this->final2 = $result['merge'];
$this->_merged = &$this->final2;
return;
}
$result = $this->_compare_conflict_seq('final2', 'final1');
if ($result['merge_found'])
{
$this->_merged = &$this->final1;
return;
}
}
return;
}
// CASE TWO: Added lines from orig to final2 but final1 had added lines too. Just merge them.
if (!sizeof($this->orig) && $this->final1 !== $this->final2 && sizeof($this->final1) && sizeof($this->final2))
{
$result = $this->_compare_conflict_seq('final2', 'final1');
if ($result['merge_found'])
{
$this->final2 = $this->final1;
$this->_merged = &$this->final1;
}
else
{
$result = $this->_compare_conflict_seq('final1', 'final2');
if (!$result['merge_found'])
{
$this->final2 = array_merge($this->final1, $this->final2);
$this->_merged = &$this->final2;
}
else
{
$this->final2 = $this->final1;
$this->_merged = &$this->final1;
}
}
return;
}
// CASE THREE: Removed lines (orig has the to-remove line(s), but final1 has additional lines which does not need to be removed). Just remove orig from final1 and then use final1 as final2/merge
if (!sizeof($this->final2) && sizeof($this->orig) && sizeof($this->final1) && $this->orig !== $this->final1)
{
$result = $this->_compare_conflict_seq('orig', 'final1');
if (!$result['merge_found'])
{
return;
}
// First of all, try to find the code in orig in final1. ;)
$compare_seq = sizeof($this->orig);
$begin = $end = -1;
$j = 0;
for ($i = 0, $size = sizeof($this->final1); $i < $size; $i++)
{
$line = $this->final1[$i];
if (trim($line) === trim($this->orig[$j]))
{
// Mark begin
if ($begin === -1)
{
$begin = $i;
}
// End is always $i, the last found line
$end = $i;
if (isset($this->orig[$j+1]))
{
$j++;
}
}
}
if ($begin !== -1 && $begin + ($compare_seq - 1) == $end)
{
foreach ($this->final1 as $i => $line)
{
if ($i < $begin || $i > $end)
{
$merged[] = $line;
}
}
$this->final2 = $merged;
$this->_merged = &$this->final2;
}
return;
}
return;
}
}
/**

View File

@@ -49,6 +49,9 @@ if (!defined('IN_PHPBB'))
*/
class diff_engine
{
/**
* If set to true we trim all lines before we compare them. This ensures that sole space/tab changes do not trigger diffs.
*/
var $skip_whitespace_changes = true;
function diff(&$from_lines, &$to_lines, $preserve_cr = true)
@@ -87,7 +90,7 @@ class diff_engine
// Skip leading common lines.
for ($skip = 0; $skip < $n_from && $skip < $n_to; $skip++)
{
if ($from_lines[$skip] !== $to_lines[$skip])
if (trim($from_lines[$skip]) !== trim($to_lines[$skip]))
{
break;
}
@@ -100,7 +103,7 @@ class diff_engine
for ($endskip = 0; --$xi > $skip && --$yi > $skip; $endskip++)
{
if ($from_lines[$xi] !== $to_lines[$yi])
if (trim($from_lines[$xi]) !== trim($to_lines[$yi]))
{
break;
}
@@ -110,12 +113,12 @@ class diff_engine
// Ignore lines which do not exist in both files.
for ($xi = $skip; $xi < $n_from - $endskip; $xi++)
{
$xhash[$from_lines[$xi]] = 1;
if ($this->skip_whitespace_changes) $xhash[trim($from_lines[$xi])] = 1; else $xhash[$from_lines[$xi]] = 1;
}
for ($yi = $skip; $yi < $n_to - $endskip; $yi++)
{
$line = $to_lines[$yi];
$line = ($this->skip_whitespace_changes) ? trim($to_lines[$yi]) : $to_lines[$yi];
if (($this->ychanged[$yi] = empty($xhash[$line])))
{
@@ -128,7 +131,7 @@ class diff_engine
for ($xi = $skip; $xi < $n_from - $endskip; $xi++)
{
$line = $from_lines[$xi];
$line = ($this->skip_whitespace_changes) ? trim($from_lines[$xi]) : $from_lines[$xi];
if (($this->xchanged[$xi] = empty($yhash[$line])))
{
@@ -142,8 +145,21 @@ class diff_engine
$this->_compareseq(0, sizeof($this->xv), 0, sizeof($this->yv));
// Merge edits when possible.
$this->_shift_boundaries($from_lines, $this->xchanged, $this->ychanged);
$this->_shift_boundaries($to_lines, $this->ychanged, $this->xchanged);
if ($this->skip_whitespace_changes)
{
$from_lines_clean = array_map('trim', $from_lines);
$to_lines_clean = array_map('trim', $to_lines);
$this->_shift_boundaries($from_lines_clean, $this->xchanged, $this->ychanged);
$this->_shift_boundaries($to_lines_clean, $this->ychanged, $this->xchanged);
unset($from_lines_clean, $to_lines_clean);
}
else
{
$this->_shift_boundaries($from_lines, $this->xchanged, $this->ychanged);
$this->_shift_boundaries($to_lines, $this->ychanged, $this->xchanged);
}
// Compute the edit operations.
$edits = array();
@@ -178,20 +194,6 @@ class diff_engine
$add[] = $to_lines[$yi++];
}
// Here we are a bit naughty. Naughty Boy... Naughty Boy...
// We check if delete and add is filled and only consist of one item
if ($this->skip_whitespace_changes && sizeof($delete) == 1 && sizeof($add) == 1)
{
// Now we simply trim the string and see if the lines are identical
// If they are identical we do not need to take them into account for the merge (less conflicts in phpBB)
if (trim($delete[0]) === trim($add[0]))
{
// This line ensures the line found here is correctly copied later (remember: we naughty boys like loops)
$xi--; $yi--; $this->xchanged[$xi] = $this->ychanged[$yi] = false;
$delete = $add = array();
}
}
if ($delete && $add)
{
$edits[] = new diff_op_change($delete, $add);

View File

@@ -1693,11 +1693,11 @@ function get_unread_topics($user_id = false, $sql_extra = '', $sql_sort = '', $s
'LEFT_JOIN' => array(
array(
'FROM' => array(TOPICS_TRACK_TABLE => 'tt'),
'ON' => "tt.user_id = $user_id AND t.topic_id = tt.topic_id AND tt.mark_time > $last_mark",
'ON' => "tt.user_id = $user_id AND t.topic_id = tt.topic_id",
),
array(
'FROM' => array(FORUMS_TRACK_TABLE => 'ft'),
'ON' => "ft.user_id = $user_id AND t.forum_id = ft.forum_id AND ft.mark_time > $last_mark",
'ON' => "ft.user_id = $user_id AND t.forum_id = ft.forum_id",
),
),
@@ -1705,10 +1705,7 @@ function get_unread_topics($user_id = false, $sql_extra = '', $sql_sort = '', $s
(
(tt.mark_time IS NOT NULL AND t.topic_last_post_time > tt.mark_time) OR
(tt.mark_time IS NULL AND ft.mark_time IS NOT NULL AND t.topic_last_post_time > ft.mark_time) OR
(
((tt.mark_time IS NULL AND ft.mark_time IS NULL) OR (tt.mark_time < $last_mark AND ft.mark_time < $last_mark))
AND t.topic_last_post_time > $last_mark
)
(tt.mark_time IS NULL AND ft.mark_time IS NULL AND t.topic_last_post_time > $last_mark)
)
$sql_extra
$sql_sort",
@@ -3050,6 +3047,7 @@ function login_forum_box($forum_data)
page_header($user->lang['LOGIN'], false);
$template->assign_vars(array(
'S_LOGIN_ACTION' => build_url(array('f')),
'S_HIDDEN_FIELDS' => build_hidden_fields(array('f' => $forum_data['forum_id'])))
);
@@ -4034,16 +4032,6 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0
}
}
// Which timezone?
$tz = ($user->data['user_id'] != ANONYMOUS) ? strval(doubleval($user->data['user_timezone'])) : strval(doubleval($config['board_timezone']));
// Send a proper content-language to the output
$user_lang = $user->lang['USER_LANG'];
if (strpos($user_lang, '-x-') !== false)
{
$user_lang = substr($user_lang, 0, strpos($user_lang, '-x-'));
}
$forum_id = request_var('f', 0);
$topic_id = request_var('t', 0);
@@ -4064,6 +4052,16 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0
$board_url = generate_board_url() . '/';
$web_path = (defined('PHPBB_USE_BOARD_URL_PATH') && PHPBB_USE_BOARD_URL_PATH) ? $board_url : $phpbb_root_path;
// Which timezone?
$tz = ($user->data['user_id'] != ANONYMOUS) ? strval(doubleval($user->data['user_timezone'])) : strval(doubleval($config['board_timezone']));
// Send a proper content-language to the output
$user_lang = $user->lang['USER_LANG'];
if (strpos($user_lang, '-x-') !== false)
{
$user_lang = substr($user_lang, 0, strpos($user_lang, '-x-'));
}
// The following assigns all _common_ variables that may be used at any point in a template.
$template->assign_vars(array(
'SITENAME' => $config['sitename'],

View File

@@ -254,7 +254,7 @@ function get_forum_list($acl_list = 'f_list', $id_only = true, $postable_only =
if ($acl_list == '' || ($acl_list != '' && $auth->acl_gets($acl_list, $row['forum_id'])))
{
$rowset[] = ($id_only) ? $row['forum_id'] : $row;
$rowset[] = ($id_only) ? (int) $row['forum_id'] : $row;
}
}
@@ -2514,6 +2514,7 @@ function view_log($mode, &$log, &$log_count, $limit = 0, $offset = 0, $forum_id
case 'mod':
$log_type = LOG_MOD;
$sql_forum = '';
if ($topic_id)
{
@@ -2548,17 +2549,24 @@ function view_log($mode, &$log, &$log_count, $limit = 0, $offset = 0, $forum_id
return;
}
$keywords = preg_split('#[\s+\-|*()]+#u', utf8_strtolower(preg_quote($keywords, '#')), 0, PREG_SPLIT_NO_EMPTY);
// Use no preg_quote for $keywords because this would lead to sole backslashes being added
// We also use an OR connection here for spaces and the | string. Currently, regex is not supported for searching (but may come later).
$keywords = preg_split('#[\s|]+#u', utf8_strtolower($keywords), 0, PREG_SPLIT_NO_EMPTY);
$sql_keywords = '';
if (!empty($keywords))
{
$keywords_pattern = '#' . implode('|', $keywords) . '#ui';
$keywords_pattern = array();
// Build pattern and keywords...
for ($i = 0, $num_keywords = sizeof($keywords); $i < $num_keywords; $i++)
{
$keywords_pattern[] = preg_quote($keywords[$i], '#');
$keywords[$i] = $db->sql_like_expression($db->any_char . $keywords[$i] . $db->any_char);
}
$keywords_pattern = '#' . implode('|', $keywords_pattern) . '#ui';
$operations = array();
foreach ($user->lang as $key => $value)
{

View File

@@ -323,7 +323,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
$forum_unread = (isset($forum_tracking_info[$forum_id]) && $row['orig_forum_last_post_time'] > $forum_tracking_info[$forum_id]) ? true : false;
// Mark the first visible forum on index as unread if there's any unread global announcement
if (($forum_id == $forum_ids_moderator[0]) && ($root_data['forum_id'] == 0) && $ga_unread)
if ($ga_unread && !empty($forum_ids_moderator) && $forum_id == $forum_ids_moderator[0])
{
$forum_unread = true;
}

View File

@@ -476,8 +476,9 @@ class jabber
}
else if (in_array('PLAIN', $methods) && ($this->session['ssl'] || !empty($this->session['tls'])))
{
// http://www.ietf.org/rfc/rfc4616.txt (PLAIN SASL Mechanism)
$this->send("<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>"
. base64_encode(chr(0) . $this->username . '@' . $this->server . chr(0) . $this->password) .
. base64_encode($this->username . '@' . $this->server . chr(0) . $this->username . chr(0) . $this->password) .
'</auth>');
}
else if (in_array('ANONYMOUS', $methods))

View File

@@ -199,7 +199,7 @@ class messenger
$template_path .= $template_lang . '/email';
}
$tpl->set_custom_template($template_path, $template_lang . '_email');
$tpl->set_custom_template($template_path, $template_lang . '_email', 'email');
$tpl->set_filenames(array(
'body' => $template_file . '.txt',
@@ -1134,7 +1134,24 @@ class smtp_class
global $user;
$err_msg = '';
$local_host = (function_exists('php_uname')) ? gethostbyaddr(gethostbyname(php_uname('n'))) : $user->host;
// Here we try to determine the *real* hostname (reverse DNS entry preferrably)
$local_host = $user->host;
if (function_exists('php_uname'))
{
$local_host = php_uname('n');
// Able to resolve name to IP
if (($addr = @gethostbyname($local_host)) !== $local_host)
{
// Able to resolve IP back to name
if (($name = @gethostbyaddr($addr)) !== $addr)
{
$local_host = $name;
}
}
}
// If we are authenticating through pop-before-smtp, we
// have to login ones before we get authenticated

View File

@@ -1900,7 +1900,7 @@ function set_user_message_limit()
*/
function get_recipient_strings($pm_by_id)
{
global $user, $db;
global $db, $phpbb_root_path, $phpEx, $user;
$address_list = $recipient_list = $address = array();

View File

@@ -624,7 +624,7 @@ class custom_profile
}
else
{
if (!$preview && isset($user->profile_fields[$user_ident]) && is_null($user->profile_fields[$user_ident]))
if (!$preview && array_key_exists($user_ident, $user->profile_fields) && is_null($user->profile_fields[$user_ident]))
{
$value = NULL;
}

View File

@@ -349,7 +349,6 @@ class filespec
}
phpbb_chmod($this->destination_file, $chmod);
return true;
}
// Try to get real filesize from destination folder

View File

@@ -2832,11 +2832,11 @@ function group_user_del($group_id, $user_id_ary = false, $username_ary = false,
if ($config['coppa_enable'])
{
$group_order = array('ADMINISTRATORS', 'GLOBAL_MODERATORS', 'REGISTERED_COPPA', 'REGISTERED', 'BOTS', 'GUESTS');
$group_order = array('ADMINISTRATORS', 'GLOBAL_MODERATORS', 'NEWLY_REGISTERED', 'REGISTERED_COPPA', 'REGISTERED', 'BOTS', 'GUESTS');
}
else
{
$group_order = array('ADMINISTRATORS', 'GLOBAL_MODERATORS', 'REGISTERED', 'BOTS', 'GUESTS');
$group_order = array('ADMINISTRATORS', 'GLOBAL_MODERATORS', 'NEWLY_REGISTERED', 'REGISTERED', 'BOTS', 'GUESTS');
}
// We need both username and user_id info

View File

@@ -416,14 +416,11 @@ function merge_topics($forum_id, $topic_ids, $to_topic_id)
// If the topic no longer exist, we will update the topic watch table.
// To not let it error out on users watching both topics, we just return on an error...
// Same for Bookmarks
$db->sql_return_on_error(true);
$db->sql_query('UPDATE ' . TOPICS_WATCH_TABLE . ' SET topic_id = ' . (int) $to_topic_id . ' WHERE ' . $db->sql_in_set('topic_id', $topic_ids));
$db->sql_query('UPDATE ' . BOOKMARKS_TABLE . ' SET topic_id = ' . (int) $to_topic_id . ' WHERE ' . $db->sql_in_set('topic_id', $topic_ids));
$db->sql_return_on_error(false);
$db->sql_query('DELETE FROM ' . TOPICS_WATCH_TABLE . ' WHERE ' . $db->sql_in_set('topic_id', $topic_ids));
$db->sql_query('DELETE FROM ' . BOOKMARKS_TABLE . ' WHERE ' . $db->sql_in_set('topic_id', $topic_ids));
// Link to the new topic
$return_link .= (($return_link) ? '<br /><br />' : '') . sprintf($user->lang['RETURN_NEW_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $to_forum_id . '&amp;t=' . $to_topic_id) . '">', '</a>');

View File

@@ -813,7 +813,14 @@ function mcp_delete_topic($topic_ids)
foreach ($data as $topic_id => $row)
{
add_log('mod', $row['forum_id'], $topic_id, 'LOG_DELETE_' . ($row['topic_moved_id'] ? 'SHADOW_' : '') . 'TOPIC', $row['topic_title']);
if ($row['topic_moved_id'])
{
add_log('mod', $row['forum_id'], $topic_id, 'LOG_DELETE_SHADOW_TOPIC', $row['topic_title']);
}
else
{
add_log('mod', $row['forum_id'], $topic_id, 'LOG_DELETE_TOPIC', $row['topic_title'], $row['topic_first_poster_name']);
}
}
$return = delete_topics('topic_id', $topic_ids);
@@ -897,7 +904,8 @@ function mcp_delete_post($post_ids)
foreach ($post_data as $id => $row)
{
add_log('mod', $row['forum_id'], $row['topic_id'], 'LOG_DELETE_POST', $row['post_subject']);
$post_username = ($row['poster_id'] == ANONYMOUS && !empty($row['post_username'])) ? $row['post_username'] : $row['username'];
add_log('mod', $row['forum_id'], $row['topic_id'], 'LOG_DELETE_POST', $row['post_subject'], $post_username);
}
// Now delete the posts, topics and forums are automatically resync'ed

View File

@@ -593,7 +593,7 @@ function close_report($report_id_list, $mode, $action, $pm = false)
$db->sql_query($sql);
if ($action == 'delete')
{echo "aha";
{
delete_pm(ANONYMOUS, $close_report_posts, PRIVMSGS_INBOX);
}
}

View File

@@ -259,7 +259,7 @@ function mcp_topic_view($id, $mode, $action)
// Display topic icons for split topic
$s_topic_icons = false;
if ($auth->acl_get('m_split', $topic_info['forum_id']))
if ($auth->acl_gets('m_split', 'm_merge', (int) $topic_info['forum_id']))
{
include_once($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
$s_topic_icons = posting_gen_topic_icons('', $icon_id);
@@ -504,45 +504,6 @@ function split_topic($action, $topic_id, $to_forum_id, $subject)
// Update forum statistics
set_config_count('num_topics', 1, true);
// Add new topic to bookmarks
$bookmarks = array();
$sql = 'SELECT user_id
FROM ' . BOOKMARKS_TABLE . '
WHERE topic_id = ' . $topic_id;
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
$bookmarks[] = array(
'user_id' => (int) $row['user_id'],
'topic_id' => $to_topic_id,
);
}
$db->sql_freeresult($result);
if (sizeof($bookmarks))
{
$db->sql_multi_insert(BOOKMARKS_TABLE, $bookmarks);
}
// Add new topic to watch-list
$notifications = array();
$sql = 'SELECT user_id, notify_status
FROM ' . TOPICS_WATCH_TABLE . '
WHERE topic_id = ' . $topic_id;
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
$notifications[] = array(
'user_id' => (int) $row['user_id'],
'topic_id' => $to_topic_id,
'notify_status' => (int) $row['notify_status'],
);
}
$db->sql_freeresult($result);
if (sizeof($notifications))
{
$db->sql_multi_insert(TOPICS_WATCH_TABLE, $notifications);
}
// Link back to both topics
$return_link = sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $post_info['forum_id'] . '&amp;t=' . $post_info['topic_id']) . '">', '</a>') . '<br /><br />' . sprintf($user->lang['RETURN_NEW_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $to_forum_id . '&amp;t=' . $to_topic_id) . '">', '</a>');
}
@@ -636,65 +597,17 @@ function merge_posts($topic_id, $to_topic_id)
if ($row)
{
// Add new topic to bookmarks
$bookmarks = array();
$sql = 'SELECT user_id
FROM ' . BOOKMARKS_TABLE . '
WHERE topic_id = ' . (int) $topic_id;
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
$bookmarks[] = array(
'user_id' => (int) $row['user_id'],
'topic_id' => (int) $to_topic_id,
);
}
$db->sql_freeresult($result);
if (sizeof($bookmarks))
{
// To not let it error out on users, who already bookmarked the topic, we just return on an error...
$db->sql_return_on_error(true);
$db->sql_multi_insert(BOOKMARKS_TABLE, $bookmarks);
$db->sql_return_on_error(false);
}
// Add new topic to notifications
$notifications = array();
$sql = 'SELECT user_id, notify_status
FROM ' . TOPICS_WATCH_TABLE . '
WHERE topic_id = ' . (int) $topic_id;
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
$notifications[] = array(
'user_id' => (int) $row['user_id'],
'topic_id' => (int) $to_topic_id,
'notify_status' => (int) $row['notify_status'],
);
}
$db->sql_freeresult($result);
if (sizeof($notifications))
{
// To not let it error out on users, who already watch the topic, we just return on an error...
$db->sql_return_on_error(true);
$db->sql_multi_insert(TOPICS_WATCH_TABLE, $notifications);
$db->sql_return_on_error(false);
}
$return_link .= sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&amp;t=' . $topic_id) . '">', '</a>');
}
else
{
// If the topic no longer exist, we will update the topic watch table.
// To not let it error out on users watching both topics, we just return on an error...
// Same for bookmarks
$db->sql_return_on_error(true);
$db->sql_query('UPDATE ' . TOPICS_WATCH_TABLE . ' SET topic_id = ' . (int) $to_topic_id . ' WHERE topic_id = ' . (int) $topic_id);
$db->sql_query('UPDATE ' . BOOKMARKS_TABLE . ' SET topic_id = ' . (int) $to_topic_id . ' WHERE topic_id = ' . (int) $topic_id);
$db->sql_return_on_error(false);
$db->sql_query('DELETE FROM ' . TOPICS_WATCH_TABLE . ' WHERE topic_id = ' . (int) $topic_id);
$db->sql_query('DELETE FROM ' . BOOKMARKS_TABLE . ' WHERE topic_id = ' . (int) $topic_id);
}
// Link to the new topic

View File

@@ -115,7 +115,7 @@ class bbcode_firstpass extends bbcode
'attachment' => array('bbcode_id' => 12, 'regexp' => array('#\[attachment=([0-9]+)\](.*?)\[/attachment\]#ise' => "\$this->bbcode_attachment('\$1', '\$2')")),
'b' => array('bbcode_id' => 1, 'regexp' => array('#\[b\](.*?)\[/b\]#ise' => "\$this->bbcode_strong('\$1')")),
'i' => array('bbcode_id' => 2, 'regexp' => array('#\[i\](.*?)\[/i\]#ise' => "\$this->bbcode_italic('\$1')")),
'url' => array('bbcode_id' => 3, 'regexp' => array('#\[url(=(.*))?\]((?s).*)\[/url\]#iUe' => "\$this->validate_url('\$2', '\$3')")),
'url' => array('bbcode_id' => 3, 'regexp' => array('#\[url(=(.*))?\](.*)\[/url\]#iUe' => "\$this->validate_url('\$2', '\$3')")),
'img' => array('bbcode_id' => 4, 'regexp' => array('#\[img\](.*)\[/img\]#iUe' => "\$this->bbcode_img('\$1')")),
'size' => array('bbcode_id' => 5, 'regexp' => array('#\[size=([\-\+]?\d+)\](.*?)\[/size\]#ise' => "\$this->bbcode_size('\$1', '\$2')")),
'color' => array('bbcode_id' => 6, 'regexp' => array('!\[color=(#[0-9a-f]{3}|#[0-9a-f]{6}|[a-z\-]+)\](.*?)\[/color\]!ise' => "\$this->bbcode_color('\$1', '\$2')")),
@@ -1064,17 +1064,12 @@ class parse_message extends bbcode_firstpass
$this->mode = $mode;
if (!isset($config['max_' . $mode . '_chars']))
foreach (array('chars', 'smilies', 'urls', 'font_size', 'img_height', 'img_width') as $key)
{
$config['max_' . $mode . '_chars'] = 0;
}
if (!isset($config['max_' . $mode . '_smilies']))
{
$config['max_' . $mode . '_smilies'] = 0;
}
if (!isset($config['max_' . $mode . '_urls']))
{
$config['max_' . $mode . '_urls'] = 0;
if (!isset($config['max_' . $mode . '_' . $key]))
{
$config['max_' . $mode . '_' . $key] = 0;
}
}
$this->allow_img_bbcode = $allow_img_bbcode;
@@ -1345,7 +1340,7 @@ class parse_message extends bbcode_firstpass
/**
* Parse Attachments
*/
function parse_attachments($form_name, $mode, $forum_id, $submit, $preview, $refresh, $is_message = false, $post_msg_id = 0, $topic_id = 0)
function parse_attachments($form_name, $mode, $forum_id, $submit, $preview, $refresh, $is_message = false)
{
global $config, $auth, $user, $phpbb_root_path, $phpEx, $db;
@@ -1498,25 +1493,16 @@ class parse_message extends bbcode_firstpass
'filesize' => $filedata['filesize'],
'filetime' => $filedata['filetime'],
'thumbnail' => $filedata['thumbnail'],
'is_orphan' => ($post_msg_id) ? 0 : 1,
'is_orphan' => 1,
'in_message' => ($is_message) ? 1 : 0,
'poster_id' => $user->data['user_id'],
);
if ($post_msg_id)
{
$sql_ary['post_msg_id'] = $post_msg_id;
if ($topic_id)
{
$sql_ary['topic_id'] = $topic_id;
}
}
$db->sql_query('INSERT INTO ' . ATTACHMENTS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary));
$new_entry = array(
'attach_id' => $db->sql_nextid(),
'is_orphan' => ($post_msg_id) ? 0 : 1,
'is_orphan' => 1,
'real_filename' => $filedata['real_filename'],
'attach_comment'=> $this->filename_data['filecomment'],
);

View File

@@ -303,6 +303,7 @@ class phpbb_questionnaire_phpbb_data_provider
'database_gc' => true,
'dbms_version' => true,
'default_dateformat' => true,
'default_lang' => true,
'display_last_edited' => true,
'display_order' => true,
'edit_time' => true,

View File

@@ -182,7 +182,7 @@ class session
else
{
// Set to OS hostname or localhost
$host = (function_exists('php_uname')) ? gethostbyaddr(gethostbyname(php_uname('n'))) : 'localhost';
$host = (function_exists('php_uname')) ? php_uname('n') : 'localhost';
}
}

View File

@@ -90,7 +90,7 @@ class template
* Set custom template location (able to use directory outside of phpBB)
* @access public
*/
function set_custom_template($template_path, $template_name)
function set_custom_template($template_path, $template_name, $template_mode = 'template')
{
global $phpbb_root_path, $user;
@@ -102,8 +102,13 @@ class template
$this->root = $template_path;
$this->cachepath = $phpbb_root_path . 'cache/ctpl_' . str_replace('_', '-', $template_name) . '_';
$user->theme['template_storedb'] = false;
$user->theme['template_inherits_id'] = false;
// As the template-engine is used for more than the template (emails, etc.), we should not set $user->theme in all cases, but only on the real template.
if ($template_mode == 'template')
{
$user->theme['template_storedb'] = false;
$user->theme['template_inherits_id'] = false;
}
$this->_rootref = &$this->_tpldata['.'][0];
@@ -147,6 +152,7 @@ class template
function destroy()
{
$this->_tpldata = array('.' => array(0 => array()));
$this->_rootref = &$this->_tpldata['.'][0];
}
/**
@@ -243,8 +249,13 @@ class template
{
global $user, $phpEx, $config;
if (!isset($this->filename[$handle]))
{
trigger_error("template->_tpl_load(): No file specified for handle $handle", E_USER_ERROR);
}
$filename = $this->cachepath . str_replace('/', '.', $this->filename[$handle]) . '.' . $phpEx;
$this->files_template[$handle] = $user->theme['template_id'];
$this->files_template[$handle] = (isset($user->theme['template_id'])) ? $user->theme['template_id'] : 0;
$recompile = false;
if (!file_exists($filename) || @filesize($filename) === 0)

View File

@@ -708,7 +708,6 @@ class ucp_groups
'S_UPLOAD_AVATAR_FILE' => ($config['allow_avatar'] && $config['allow_avatar_upload'] && $can_upload) ? true : false,
'S_UPLOAD_AVATAR_URL' => ($config['allow_avatar'] && $config['allow_avatar_remote_upload'] && $can_upload) ? true : false,
'S_LINK_AVATAR' => ($config['allow_avatar'] && $config['allow_avatar_remote']) ? true : false,
'S_DISPLAY_GALLERY' => ($config['allow_avatar'] && $config['allow_avatar_local']) ? true : false,
'ERROR_MSG' => (sizeof($error)) ? implode('<br />', $error) : '',
'GROUP_RECEIVE_PM' => (isset($group_row['group_receive_pm']) && $group_row['group_receive_pm']) ? ' checked="checked"' : '',

View File

@@ -122,6 +122,7 @@ class ucp_pm
// trigger_error('NO_AUTH_SEND_MESSAGE');
$template->assign_vars(array(
'S_NO_AUTH_SEND_MESSAGE' => true,
'S_COMPOSE_PM_VIEW' => true,
));
$tpl_file = 'ucp_pm_viewfolder';

View File

@@ -669,22 +669,7 @@ function compose_pm($id, $mode, $action)
}
// Parse Attachments - before checksum is calculated
if ($action == 'edit')
{
$message_parser->parse_attachments('fileupload', $action, 0, $submit, $preview, $refresh, true, $msg_id);
if (sizeof($message_parser->attachment_data))
{
// Update attachment indicators for pms having attachments now, as a precaution if the pm does not get stored by submit
$sql = 'UPDATE ' . PRIVMSGS_TABLE . '
SET message_attachment = 1
WHERE msg_id = ' . $msg_id;
$db->sql_query($sql);
}
}
else
{
$message_parser->parse_attachments('fileupload', $action, 0, $submit, $preview, $refresh, true);
}
$message_parser->parse_attachments('fileupload', $action, 0, $submit, $preview, $refresh, true);
if (sizeof($message_parser->warn_msg) && !($remove_u || $remove_g || $add_to || $add_bcc))
{
@@ -826,7 +811,7 @@ function compose_pm($id, $mode, $action)
}
// Decode text for message display
$bbcode_uid = (($action == 'quote' || $action == 'forward') && !$preview && !$refresh && !sizeof($error)) ? $bbcode_uid : $message_parser->bbcode_uid;
$bbcode_uid = (($action == 'quote' || $action == 'forward') && !$preview && !$refresh) ? $bbcode_uid : $message_parser->bbcode_uid;
$message_parser->decode_message($bbcode_uid);

View File

@@ -432,7 +432,6 @@ function get_pm_from($folder_id, $folder, $user_id)
'TOTAL_MESSAGES' => (($pm_count == 1) ? $user->lang['VIEW_PM_MESSAGE'] : sprintf($user->lang['VIEW_PM_MESSAGES'], $pm_count)),
'POST_IMG' => (!$auth->acl_get('u_sendpm')) ? $user->img('button_topic_locked', 'POST_PM_LOCKED') : $user->img('button_pm_new', 'POST_NEW_PM'),
'L_NO_MESSAGES' => (!$auth->acl_get('u_sendpm')) ? $user->lang['NO_AUTH_SEND_MESSAGE'] : $user->lang['NO_MESSAGES'],
'S_NO_AUTH_SEND_MESSAGE' => !$auth->acl_get('u_sendpm'),

View File

@@ -31,8 +31,8 @@ unset($dbpasswd);
*/
$convertor_data = array(
'forum_name' => 'phpBB 2.0.x',
'version' => '1.0.2',
'phpbb_version' => '3.0.4',
'version' => '1.0.3',
'phpbb_version' => '3.0.6',
'author' => '<a href="http://www.phpbb.com/">phpBB Group</a>',
'dbms' => $dbms,
'dbhost' => $dbhost,
@@ -129,7 +129,7 @@ $config_schema = array(
'board_timezone' => 'board_timezone',
'allow_privmsg' => 'not(privmsg_disable)',
'gzip_compress' => 'gzip_compress',
'coppa_enable' => 'is_empty(coppa_mail)',
'coppa_enable' => '!is_empty(coppa_mail)',
'coppa_fax' => 'coppa_fax',
'coppa_mail' => 'coppa_mail',
'record_online_users' => 'record_online_users',

View File

@@ -8,7 +8,7 @@
*
*/
$updates_to_version = '3.0.6-RC1';
$updates_to_version = '3.0.6-RC4';
// Enter any version to update from to test updates. The version within the db will not be updated.
$debug_from_version = false;
@@ -346,11 +346,15 @@ for ($i = 0; $i < sizeof($versions); $i++)
$no_updates = false;
$statements = $db_tools->perform_schema_changes($schema_changes);
foreach ($statements as $sql)
// We run one index after the other... to be consistent with schema changes...
foreach ($schema_changes as $key => $changes)
{
_sql($sql, $errored, $error_ary);
$statements = $db_tools->perform_schema_changes(array($key => $changes));
foreach ($statements as $sql)
{
_sql($sql, $errored, $error_ary);
}
}
}
@@ -716,6 +720,9 @@ function database_update_info()
'session_forum_id' => array('UINT', 0),
),
),
'drop_keys' => array(
GROUPS_TABLE => array('group_legend'),
),
'add_index' => array(
SESSIONS_TABLE => array(
'session_forum_id' => array('session_forum_id'),
@@ -724,9 +731,6 @@ function database_update_info()
'group_legend_name' => array('group_legend', 'group_name'),
),
),
'drop_keys' => array(
GROUPS_TABLE => array('group_legend'),
),
),
// No changes from 3.0.1-RC1 to 3.0.1
'3.0.1-RC1' => array(),
@@ -868,9 +872,6 @@ function database_update_info()
),
),
'add_index' => array(
LOG_TABLE => array(
'log_time' => array('log_time'),
),
REPORTS_TABLE => array(
'post_id' => array('post_id'),
'pm_id' => array('pm_id'),
@@ -880,6 +881,16 @@ function database_update_info()
),
),
),
// Changes from 3.0.6-RC1 to 3.0.6-RC2
'3.0.6-RC1' => array(
'drop_keys' => array(
LOG_TABLE => array('log_time'),
),
),
// No changes from 3.0.6-RC2 to 3.0.6-RC3
'3.0.6-RC2' => array(),
// No changes from 3.0.6-RC3 to 3.0.6-RC4
'3.0.6-RC3' => array(),
);
}
@@ -1046,10 +1057,21 @@ function change_database_data(&$no_updates, $version)
// Changes from 3.0.3-RC1 to 3.0.3
case '3.0.3-RC1':
$sql = 'UPDATE ' . LOG_TABLE . "
SET log_operation = 'LOG_DELETE_TOPIC'
WHERE log_operation = 'LOG_TOPIC_DELETED'";
_sql($sql, $errored, $error_ary);
if ($db->sql_layer == 'oracle')
{
// log_operation is CLOB - but we can change this later
$sql = 'UPDATE ' . LOG_TABLE . "
SET log_operation = 'LOG_DELETE_TOPIC'
WHERE log_operation LIKE 'LOG_TOPIC_DELETED'";
_sql($sql, $errored, $error_ary);
}
else
{
$sql = 'UPDATE ' . LOG_TABLE . "
SET log_operation = 'LOG_DELETE_TOPIC'
WHERE log_operation = 'LOG_TOPIC_DELETED'";
_sql($sql, $errored, $error_ary);
}
$no_updates = false;
break;
@@ -1192,6 +1214,18 @@ function change_database_data(&$no_updates, $version)
'drop_keys' => array(
ACL_OPTIONS_TABLE => array('auth_option'),
),
);
global $db_tools;
$statements = $db_tools->perform_schema_changes($changes);
foreach ($statements as $sql)
{
_sql($sql, $errored, $error_ary);
}
$changes = array(
'add_unique_index' => array(
ACL_OPTIONS_TABLE => array(
'auth_option' => array('auth_option'),
@@ -1199,8 +1233,6 @@ function change_database_data(&$no_updates, $version)
),
);
global $db_tools;
$statements = $db_tools->perform_schema_changes($changes);
foreach ($statements as $sql)
@@ -1506,6 +1538,27 @@ function change_database_data(&$no_updates, $version)
$no_updates = false;
break;
// No changes from 3.0.6-RC1 to 3.0.6-RC2
case '3.0.6-RC1':
break;
// Changes from 3.0.6-RC2 to 3.0.6-RC3
case '3.0.6-RC2':
// Update the Custom Profile Fields based on previous settings to the new format
$sql = 'UPDATE ' . PROFILE_FIELDS_TABLE . '
SET field_show_on_vt = 1
WHERE field_hide = 0
AND (field_required = 1 OR field_show_on_reg = 1 OR field_show_profile = 1)';
_sql($sql, $errored, $error_ary);
$no_updates = false;
break;
// No changes from 3.0.6-RC3 to 3.0.6-RC4
case '3.0.6-RC3':
break;
}
}
@@ -1902,7 +1955,8 @@ class updater_db_tools
{
if ($column_exists)
{
$sqlite_data[$table]['change_columns'][] = $result;
continue;
// $sqlite_data[$table]['change_columns'][] = $result;
}
else
{
@@ -1924,6 +1978,11 @@ class updater_db_tools
{
foreach ($indexes as $index_name)
{
if (!$this->sql_index_exists($table, $index_name))
{
continue;
}
$result = $this->sql_index_drop($table, $index_name);
if ($this->return_statements)
@@ -1984,6 +2043,11 @@ class updater_db_tools
{
foreach ($index_array as $index_name => $column)
{
if ($this->sql_unique_index_exists($table, $index_name))
{
continue;
}
$result = $this->sql_create_unique_index($table, $index_name, $column);
if ($this->return_statements)
@@ -2001,6 +2065,11 @@ class updater_db_tools
{
foreach ($index_array as $index_name => $column)
{
if ($this->sql_index_exists($table, $index_name))
{
continue;
}
$result = $this->sql_create_index($table, $index_name, $column);
if ($this->return_statements)
@@ -2308,6 +2377,236 @@ class updater_db_tools
}
}
/**
* Check if a specified index exists in table. Does not return PRIMARY KEY and UNIQUE indexes.
*
* @param string $table_name Table to check the index at
* @param string $index_name The index name to check
*
* @return bool True if index exists, else false
*/
function sql_index_exists($table_name, $index_name)
{
if ($this->sql_layer == 'mssql')
{
$sql = "EXEC sp_statistics '$table_name'";
$result = $this->db->sql_query($sql);
while ($row = $this->db->sql_fetchrow($result))
{
if ($row['TYPE'] == 3)
{
if (strtolower($row['INDEX_NAME']) == strtolower($index_name))
{
$this->db->sql_freeresult($result);
return true;
}
}
}
$this->db->sql_freeresult($result);
return false;
}
switch ($this->sql_layer)
{
case 'firebird':
$sql = "SELECT LOWER(RDB\$INDEX_NAME) as index_name
FROM RDB\$INDICES
WHERE RDB\$RELATION_NAME = '" . strtoupper($table_name) . "'
AND RDB\$UNIQUE_FLAG IS NULL
AND RDB\$FOREIGN_KEY IS NULL";
$col = 'index_name';
break;
case 'postgres':
$sql = "SELECT ic.relname as index_name
FROM pg_class bc, pg_class ic, pg_index i
WHERE (bc.oid = i.indrelid)
AND (ic.oid = i.indexrelid)
AND (bc.relname = '" . $table_name . "')
AND (i.indisunique != 't')
AND (i.indisprimary != 't')";
$col = 'index_name';
break;
case 'mysql_40':
case 'mysql_41':
$sql = 'SHOW KEYS
FROM ' . $table_name;
$col = 'Key_name';
break;
case 'oracle':
$sql = "SELECT index_name
FROM user_indexes
WHERE table_name = '" . strtoupper($table_name) . "'
AND generated = 'N'
AND uniqueness = 'NONUNIQUE'";
$col = 'index_name';
break;
case 'sqlite':
$sql = "PRAGMA index_list('" . $table_name . "');";
$col = 'name';
break;
}
$result = $this->db->sql_query($sql);
while ($row = $this->db->sql_fetchrow($result))
{
if (($this->sql_layer == 'mysql_40' || $this->sql_layer == 'mysql_41') && !$row['Non_unique'])
{
continue;
}
// These DBMS prefix index name with the table name
switch ($this->sql_layer)
{
case 'firebird':
case 'oracle':
case 'postgres':
case 'sqlite':
$row[$col] = substr($row[$col], strlen($table_name) + 1);
break;
}
if (strtolower($row[$col]) == strtolower($index_name))
{
$this->db->sql_freeresult($result);
return true;
}
}
$this->db->sql_freeresult($result);
return false;
}
/**
* Check if a specified UNIQUE index exists in table.
*
* @param string $table_name Table to check the index at
* @param string $index_name The index name to check
*
* @return bool True if index exists, else false
*/
function sql_unique_index_exists($table_name, $index_name)
{
if ($this->sql_layer == 'mssql')
{
$sql = "EXEC sp_statistics '$table_name'";
$result = $this->db->sql_query($sql);
while ($row = $this->db->sql_fetchrow($result))
{
// Usually NON_UNIQUE is the column we want to check, but we allow for both
if ($row['TYPE'] == 3)
{
if (strtolower($row['INDEX_NAME']) == strtolower($index_name))
{
$this->db->sql_freeresult($result);
return true;
}
}
}
$this->db->sql_freeresult($result);
return false;
}
switch ($this->sql_layer)
{
case 'firebird':
$sql = "SELECT LOWER(RDB\$INDEX_NAME) as index_name
FROM RDB\$INDICES
WHERE RDB\$RELATION_NAME = '" . strtoupper($table_name) . "'
AND RDB\$UNIQUE_FLAG IS NOT NULL
AND RDB\$FOREIGN_KEY IS NULL";
$col = 'index_name';
break;
case 'postgres':
$sql = "SELECT ic.relname as index_name, i.indisunique
FROM pg_class bc, pg_class ic, pg_index i
WHERE (bc.oid = i.indrelid)
AND (ic.oid = i.indexrelid)
AND (bc.relname = '" . $table_name . "')
AND (i.indisprimary != 't')";
$col = 'index_name';
break;
case 'mysql_40':
case 'mysql_41':
$sql = 'SHOW KEYS
FROM ' . $table_name;
$col = 'Key_name';
break;
case 'oracle':
$sql = "SELECT index_name, table_owner
FROM user_indexes
WHERE table_name = '" . strtoupper($table_name) . "'
AND generated = 'N'
AND uniqueness = 'UNIQUE'";
$col = 'index_name';
break;
case 'sqlite':
$sql = "PRAGMA index_list('" . $table_name . "');";
$col = 'name';
break;
}
$result = $this->db->sql_query($sql);
while ($row = $this->db->sql_fetchrow($result))
{
if (($this->sql_layer == 'mysql_40' || $this->sql_layer == 'mysql_41') && ($row['Non_unique'] || $row[$col] == 'PRIMARY'))
{
continue;
}
if ($this->sql_layer == 'sqlite' && !$row['unique'])
{
continue;
}
if ($this->sql_layer == 'postgres' && $row['indisunique'] != 't')
{
continue;
}
// These DBMS prefix index name with the table name
switch ($this->sql_layer)
{
case 'oracle':
// Two cases here... prefixed with U_[table_owner] and not prefixed with table_name
if (strpos($row[$col], 'U_') === 0)
{
$row[$col] = substr($row[$col], strlen('U_' . $row['table_owner']) + 1);
}
else if (strpos($row[$col], strtoupper($table_name)) === 0)
{
$row[$col] = substr($row[$col], strlen($table_name) + 1);
}
break;
case 'firebird':
case 'postgres':
case 'sqlite':
$row[$col] = substr($row[$col], strlen($table_name) + 1);
break;
}
if (strtolower($row[$col]) == strtolower($index_name))
{
$this->db->sql_freeresult($result);
return true;
}
}
$this->db->sql_freeresult($result);
return false;
}
/**
* Private method for performing sql statements (either execute them or return them)
* @access private
@@ -2441,11 +2740,13 @@ class updater_db_tools
// For hexadecimal values do not use single quotes
if (strpos($column_data[1], '0x') === 0)
{
$sql_default .= 'DEFAULT (' . $column_data[1] . ') ';
$return_array['default'] = 'DEFAULT (' . $column_data[1] . ') ';
$sql_default .= $return_array['default'];
}
else
{
$sql_default .= 'DEFAULT (' . ((is_numeric($column_data[1])) ? $column_data[1] : "'{$column_data[1]}'") . ') ';
$return_array['default'] = 'DEFAULT (' . ((is_numeric($column_data[1])) ? $column_data[1] : "'{$column_data[1]}'") . ') ';
$sql_default .= $return_array['default'];
}
}
@@ -2959,12 +3260,34 @@ class updater_db_tools
}
else
{
$statements[] = 'ALTER TABLE ' . $table_name . ' ALTER COLUMN "' . strtoupper($column_name) . '" TYPE ' . ' ' . $column_data['column_type_sql'];
// TODO: try to change pkey without removing trigger, generator or constraints. ATM this query may fail.
$statements[] = 'ALTER TABLE ' . $table_name . ' ALTER COLUMN "' . strtoupper($column_name) . '" TYPE ' . ' ' . $column_data['column_type_sql_type'];
}
break;
case 'mssql':
$statements[] = 'ALTER TABLE [' . $table_name . '] ALTER COLUMN [' . $column_name . '] ' . $column_data['column_type_sql'];
if (!empty($column_data['default']))
{
// Using TRANSACT-SQL for this statement because we do not want to have colliding data if statements are executed at a later stage
$statements[] = "DECLARE @drop_default_name VARCHAR(100), @cmd VARCHAR(1000)
SET @drop_default_name =
(SELECT so.name FROM sysobjects so
JOIN sysconstraints sc ON so.id = sc.constid
WHERE object_name(so.parent_obj) = '{$table_name}'
AND so.xtype = 'D'
AND sc.colid = (SELECT colid FROM syscolumns
WHERE id = object_id('{$table_name}')
AND name = '{$column_name}'))
IF @drop_default_name <> ''
BEGIN
SET @cmd = 'ALTER TABLE [{$table_name}] DROP CONSTRAINT [' + @drop_default_name + ']'
EXEC(@cmd)
END
SET @cmd = 'ALTER TABLE [{$table_name}] ADD CONSTRAINT [DF_{$table_name}_{$column_name}_1] {$column_data['default']} FOR [{$column_name}]'
EXEC(@cmd)";
}
break;
case 'mysql_40':

View File

@@ -262,6 +262,16 @@ class install_update extends module
$template->assign_var('PACKAGE_VERSION', $this->update_info['version']['to']);
}
// Since some people try to update to RC releases, but phpBB.com tells them the last version is the version they currently run
// we are faced with the updater thinking the database schema is up-to-date; which it is, but should be updated none-the-less
// We now try to cope with this by triggering the update process
if (version_compare(str_replace('rc', 'RC', strtolower($this->current_version)), str_replace('rc', 'RC', strtolower($this->update_info['version']['to'])), '<'))
{
$template->assign_vars(array(
'S_UP_TO_DATE' => false,
));
}
break;
case 'update_db':
@@ -687,7 +697,7 @@ class install_update extends module
default:
$diff = $this->return_diff($this->old_location . $original_filename, $phpbb_root_path . $file_struct['filename'], $this->new_location . $original_filename);
$contents = implode("\n", $diff->merged_new_output());
$contents = implode("\n", $diff->merged_output());
unset($diff);
break;
}
@@ -1104,24 +1114,6 @@ class install_update extends module
break;
/*
$diff = $this->return_diff($this->old_location . $original_file, $phpbb_root_path . $file, $this->new_location . $original_file);
$tmp = array(
'file1' => array(),
'file2' => ($option == MERGE_NEW_FILE) ? implode("\n", $diff->merged_new_output()) : implode("\n", $diff->merged_orig_output()),
);
$diff = new diff($tmp['file1'], $tmp['file2']);
unset($tmp);
$template->assign_var('S_DIFF_NEW_FILE', true);
$diff_mode = 'inline';
$this->page_title = 'VIEWING_FILE_CONTENTS';
break;
*/
// Merge differences and use new phpBB code for conflicted blocks
case MERGE_NEW_FILE:
case MERGE_MOD_FILE:
@@ -1175,6 +1167,7 @@ class install_update extends module
default:
$diff = $this->return_diff($this->old_location . $original_file, $phpbb_root_path . $original_file, $this->new_location . $file);
$diff = $this->return_diff($phpbb_root_path . $file, $diff->merged_output());
break;
}
break;
@@ -1362,6 +1355,9 @@ class install_update extends module
$update_ary['original'] = $original_file;
}
// we only want to know if the files are successfully merged and newlines could result in errors (duplicate addition of lines and such things)
// Therefore we check for empty diffs with two methods, preserving newlines and not preserving them (which mostly works best, therefore the first option)
// On a successfull update the new location file exists but the old one does not exist.
// Check for this circumstance, the new file need to be up-to-date with the current file then...
if (!file_exists($this->old_location . $original_file) && file_exists($this->new_location . $original_file) && file_exists($phpbb_root_path . $file))
@@ -1401,104 +1397,141 @@ class install_update extends module
trigger_error($user->lang['INCOMPLETE_UPDATE_FILES'], E_USER_ERROR);
}
$tmp = array(
'file1' => file_get_contents($this->old_location . $original_file),
'file2' => file_get_contents($phpbb_root_path . $file),
);
$preserve_cr_ary = array(false, true);
// We need to diff the contents here to make sure the file is really the one we expect
$diff = new diff($tmp['file1'], $tmp['file2'], false);
$empty_1 = $diff->is_empty();
unset($tmp, $diff);
$tmp = array(
'file1' => file_get_contents($this->new_location . $original_file),
'file2' => file_get_contents($phpbb_root_path . $file),
);
// We need to diff the contents here to make sure the file is really the one we expect
$diff = new diff($tmp['file1'], $tmp['file2'], false);
$empty_2 = $diff->is_empty();
unset($tmp, $diff);
// If the file is not modified we are finished here...
if ($empty_1)
foreach ($preserve_cr_ary as $preserve_cr)
{
// Further check if it is already up to date - it could happen that non-modified files
// slip through
$tmp = array(
'file1' => file_get_contents($this->old_location . $original_file),
'file2' => file_get_contents($phpbb_root_path . $file),
);
// We need to diff the contents here to make sure the file is really the one we expect
$diff = new diff($tmp['file1'], $tmp['file2'], $preserve_cr);
$empty_1 = $diff->is_empty();
unset($tmp, $diff);
$tmp = array(
'file1' => file_get_contents($this->new_location . $original_file),
'file2' => file_get_contents($phpbb_root_path . $file),
);
$diff = new diff($tmp['file1'], $tmp['file2'], $preserve_cr);
$empty_2 = $diff->is_empty();
unset($tmp, $diff);
// If the file is not modified we are finished here...
if ($empty_1)
{
// Further check if it is already up to date - it could happen that non-modified files
// slip through
if ($empty_2)
{
$update_list['up_to_date'][] = $update_ary;
return;
}
$update_list['not_modified'][] = $update_ary;
return;
}
// If the file had been modified then we need to check if it is already up to date
// if there are no differences we have an up-to-date file...
if ($empty_2)
{
$update_list['up_to_date'][] = $update_ary;
return;
}
$update_list['not_modified'][] = $update_ary;
return;
}
// If the file had been modified then we need to check if it is already up to date
$conflicts = false;
// if there are no differences we have an up-to-date file...
if ($empty_2)
foreach ($preserve_cr_ary as $preserve_cr)
{
$update_list['up_to_date'][] = $update_ary;
return;
}
// if the file is modified we try to make sure a merge succeed
$tmp = array(
'file1' => file_get_contents($this->old_location . $original_file),
'file2' => file_get_contents($phpbb_root_path . $file),
'file3' => file_get_contents($this->new_location . $original_file),
);
$diff = new diff3($tmp['file1'], $tmp['file2'], $tmp['file3'], false);
unset($tmp);
if ($diff->get_num_conflicts())
{
$update_ary['conflicts'] = $diff->get_num_conflicts();
// There is one special case... users having merged with a conflicting file... we need to check this
// if the file is modified we try to make sure a merge succeed
$tmp = array(
'file1' => file_get_contents($phpbb_root_path . $file),
'file2' => implode("\n", $diff->merged_orig_output()),
'orig' => file_get_contents($this->old_location . $original_file),
'final1' => file_get_contents($phpbb_root_path . $file),
'final2' => file_get_contents($this->new_location . $original_file),
);
$diff = new diff($tmp['file1'], $tmp['file2'], false);
$empty = $diff->is_empty();
$diff = new diff3($tmp['orig'], $tmp['final1'], $tmp['final2'], $preserve_cr);
unset($tmp);
if ($empty)
if (!$diff->get_num_conflicts())
{
unset($update_ary['conflicts']);
unset($diff);
$update_list['up_to_date'][] = $update_ary;
return;
$tmp = array(
'file1' => file_get_contents($phpbb_root_path . $file),
'file2' => implode("\n", $diff->merged_output()),
);
// now compare the merged output with the original file to see if the modified file is up to date
$diff2 = new diff($tmp['file1'], $tmp['file2'], $preserve_cr);
$empty = $diff2->is_empty();
unset($diff, $diff2);
if ($empty)
{
$update_list['up_to_date'][] = $update_ary;
return;
}
// If we preserve cr tag it as modified because the conflict would not show in this mode anyway
if ($preserve_cr)
{
$update_list['modified'][] = $update_ary;
return;
}
}
else
{
// There is one special case... users having merged with a conflicting file... we need to check this
$tmp = array(
'file1' => file_get_contents($phpbb_root_path . $file),
'file2' => implode("\n", $diff->merged_new_output()),
);
$update_list['conflict'][] = $update_ary;
unset($diff);
$diff2 = new diff($tmp['file1'], $tmp['file2'], $preserve_cr);
$empty = $diff2->is_empty();
return;
if (!$empty)
{
unset($tmp, $diff2);
// We check if the user merged with his output
$tmp = array(
'file1' => file_get_contents($phpbb_root_path . $file),
'file2' => implode("\n", $diff->merged_orig_output()),
);
$diff2 = new diff($tmp['file1'], $tmp['file2'], $preserve_cr);
$empty = $diff2->is_empty();
}
if (!$empty)
{
$conflicts = $diff->get_num_conflicts();
}
unset($diff, $diff2);
if ($empty)
{
// A conflict got resolved...
$update_list['up_to_date'][] = $update_ary;
return;
}
}
}
$tmp = array(
'file1' => file_get_contents($phpbb_root_path . $file),
'file2' => implode("\n", $diff->merged_new_output()),
);
// now compare the merged output with the original file to see if the modified file is up to date
$diff = new diff($tmp['file1'], $tmp['file2'], false);
$empty = $diff->is_empty();
if ($empty)
if ($conflicts !== false)
{
unset($diff);
$update_list['up_to_date'][] = $update_ary;
$update_ary['conflicts'] = $conflicts;
$update_list['conflict'][] = $update_ary;
return;
}
@@ -1650,7 +1683,7 @@ class install_update extends module
/**
* Wrapper for returning a diff object
*/
function &return_diff()
function return_diff()
{
$args = func_get_args();
$three_way_diff = (func_num_args() > 2) ? true : false;

View File

@@ -239,7 +239,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('topics_per_page',
INSERT INTO phpbb_config (config_name, config_value) VALUES ('tpl_allow_php', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('upload_icons_path', 'images/upload_icons');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('upload_path', 'files');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.0.6-RC1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.0.6-RC4');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_expire_days', '90');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_gc', '14400');

View File

@@ -2,6 +2,8 @@ Subject: Account activated
Hello {USERNAME},
Your account on "{SITENAME}" has now been activated, you may login using the username and password you received in a previous e-mail.
Your account on "{SITENAME}" has now been activated, you may login using the username you received in a previous e-mail.
Your password has been securely stored in our database and cannot be retrieved. In the event that it is forgotten, you will be able to reset it using the email address associated with your account.
{EMAIL_SIG}

View File

@@ -2,7 +2,7 @@ Subject: Report deleted - "{PM_SUBJECT}"
Hello {USERNAME},
You are receiving this notification because the report you filed regarding the post "{PM_SUBJECT}" at "{SITENAME}" was deleted by a moderator or administrator.
You are receiving this notification because the report you filed regarding the private message "{PM_SUBJECT}" at "{SITENAME}" was deleted by a moderator or administrator.
{EMAIL_SIG}

View File

@@ -451,8 +451,8 @@ $lang = array_merge($lang, array(
'MERGE_NO_MERGE_NEW_OPTION' => 'Do not merge - use new file',
'MERGE_NO_MERGE_MOD_OPTION' => 'Do not merge - use currently installed file',
'MERGE_MOD_FILE_OPTION' => 'Merge modifications (Loose new phpBB code within conflicting block)',
'MERGE_NEW_FILE_OPTION' => 'Merge modifications (Loose modified code within conflicting block)',
'MERGE_MOD_FILE_OPTION' => 'Merge modifications (removes new phpBB code within conflicting block)',
'MERGE_NEW_FILE_OPTION' => 'Merge modifications (removes modified code within conflicting block)',
'MERGE_SELECT_ERROR' => 'Conflicting file merge modes are not correctly selected.',
'MERGING_FILES' => 'Merging differences',
'MERGING_FILES_EXPLAIN' => 'Currently collecting final file changes.<br /><br />Please wait until phpBB has completed all operations on changed files.',

View File

@@ -742,28 +742,7 @@ if ($submit || $preview || $refresh)
}
// Parse Attachments - before checksum is calculated
if ($mode == 'edit')
{
$message_parser->parse_attachments('fileupload', $mode, $forum_id, $submit, $preview, $refresh, false, $post_id, $topic_id);
if (sizeof($message_parser->attachment_data))
{
// Update attachment indicators for post/topic having attachments now, as a precaution if the post does not get stored by submit
$sql = 'UPDATE ' . POSTS_TABLE . '
SET post_attachment = 1
WHERE post_id = ' . $post_id;
$db->sql_query($sql);
$sql = 'UPDATE ' . TOPICS_TABLE . '
SET topic_attachment = 1
WHERE topic_id = ' . $topic_id;
$db->sql_query($sql);
}
}
else
{
$message_parser->parse_attachments('fileupload', $mode, $forum_id, $submit, $preview, $refresh);
}
$message_parser->parse_attachments('fileupload', $mode, $forum_id, $submit, $preview, $refresh);
// Grab md5 'checksum' of new message
$message_md5 = md5($message_parser->message);
@@ -1121,13 +1100,13 @@ if ($submit || $preview || $refresh)
// The last parameter tells submit_post if search indexer has to be run
$redirect_url = submit_post($mode, $post_data['post_subject'], $post_data['username'], $post_data['topic_type'], $poll, $data, $update_message, ($update_message || $update_subject) ? true : false);
if ($config['enable_post_confirm'] && !$user->data['is_registered'] && (isset($captcha) && $captcha->is_solved() === true) && ($mode == 'post' || $mode == 'reply' || $mode == 'quote'))
{
$captcha->reset();
}
// Check the permissions for post approval. Moderators are not affected.
if (!$auth->acl_get('f_noapprove', $data['forum_id']) && !$auth->acl_get('m_approve', $data['forum_id']))
if ((!$auth->acl_get('f_noapprove', $data['forum_id']) && !$auth->acl_get('m_approve', $data['forum_id'])) || !empty($post_data['force_approved_state']))
{
meta_refresh(10, $redirect_url);
$message = ($mode == 'edit') ? $user->lang['POST_EDITED_MOD'] : $user->lang['POST_STORED_MOD'];
@@ -1569,17 +1548,18 @@ function handle_post_delete($forum_id, $topic_id, $post_id, &$post_data)
);
$next_post_id = delete_post($forum_id, $topic_id, $post_id, $data);
$post_username = ($post_data['poster_id'] == ANONYMOUS && !empty($post_data['post_username'])) ? $post_data['post_username'] : $post_data['username'];
if ($next_post_id === false)
{
add_log('mod', $forum_id, $topic_id, 'LOG_DELETE_TOPIC', $post_data['topic_title'], $post_data['username']);
add_log('mod', $forum_id, $topic_id, 'LOG_DELETE_TOPIC', $post_data['topic_title'], $post_username);
$meta_info = append_sid("{$phpbb_root_path}viewforum.$phpEx", "f=$forum_id");
$message = $user->lang['POST_DELETED'];
}
else
{
add_log('mod', $forum_id, $topic_id, 'LOG_DELETE_POST', $post_data['post_subject'], $post_data['username']);
add_log('mod', $forum_id, $topic_id, 'LOG_DELETE_POST', $post_data['post_subject'], $post_username);
$meta_info = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=$topic_id&amp;p=$next_post_id") . "#p$next_post_id";
$message = $user->lang['POST_DELETED'] . '<br /><br />' . sprintf($user->lang['RETURN_TOPIC'], '<a href="' . $meta_info . '">', '</a>');

View File

@@ -118,7 +118,8 @@ else
if (!$report_data)
{
trigger_error('PM_NOT_EXIST');
$user->add_lang('ucp');
trigger_error('NO_MESSAGE');
}
if ($report_data['message_reported'])

View File

@@ -12,16 +12,22 @@
<dl>
<dt><label>{L_CONFIRM_CODE}</label>:<br /><span>{L_RECAPTCHA_EXPLAIN}</span></dt>
<dd>
<script type="text/javascript" src="{RECAPTCHA_SERVER}/challenge?k={RECAPTCHA_PUBKEY}{RECAPTCHA_ERRORGET}">
<script type="text/javascript">
// <![CDATA[
var RecaptchaOptions = {
lang : {L_RECAPTCHA_LANG},
lang : '{L_RECAPTCHA_LANG}',
tabindex : <!-- IF $CAPTCHA_TAB_INDEX -->{$CAPTCHA_TAB_INDEX}<!-- ELSE -->10<!-- ENDIF -->
};
// ]]>
</script>
<script type="text/javascript" src="{RECAPTCHA_SERVER}/challenge?k={RECAPTCHA_PUBKEY}{RECAPTCHA_ERRORGET}"></script>
<script type="text/javascript">
// <![CDATA[
<!-- IF S_CONTENT_DIRECTION eq 'rtl' -->
document.getElementById('recaptcha_table').style.direction = 'ltr';
<!-- ENDIF -->
// ]]>
</script>
<noscript>
<div>
<object data="{RECAPTCHA_SERVER}/noscript?k={RECAPTCHA_PUBKEY}{RECAPTCHA_ERRORGET}" type="text/html" height="300" width="500"></object><br />

View File

@@ -27,7 +27,7 @@
<li class="row">
<dl class="icon" style="background-image: url({forumrow.FORUM_FOLDER_IMG_SRC}); background-repeat: no-repeat;">
<dt title="{forumrow.FORUM_FOLDER_IMG_ALT}">
<!-- IF S_ENABLE_FEEDS and forumrow.S_FEED_ENABLED --><!-- <a class="feed-icon-forum" title="{L_FEED} - {forumrow.FORUM_NAME}" href="{U_FEED}?f={forumrow.FORUM_ID}"><img src="{T_THEME_PATH}/images/feed.gif" title="{L_FEED} - {forumrow.FORUM_NAME}" /></a> --><!-- ENDIF -->
<!-- IF S_ENABLE_FEEDS and forumrow.S_FEED_ENABLED --><!-- <a class="feed-icon-forum" title="{L_FEED} - {forumrow.FORUM_NAME}" href="{U_FEED}?f={forumrow.FORUM_ID}"><img src="{T_THEME_PATH}/images/feed.gif" alt="{L_FEED} - {forumrow.FORUM_NAME}" /></a> --><!-- ENDIF -->
<!-- IF forumrow.FORUM_IMAGE --><span class="forum-image">{forumrow.FORUM_IMAGE}</span><!-- ENDIF -->
<a href="{forumrow.U_VIEWFORUM}" class="forumtitle">{forumrow.FORUM_NAME}</a><br />

View File

@@ -82,10 +82,14 @@
<!-- END messagerow -->
</ul>
<!-- ELSEIF S_NO_AUTH_SEND_MESSAGE -->
<p><strong><!-- IF S_USER_NEW -->{L_USER_NEW_PERMISSION_DISALLOWED}<!-- ELSE -->{L_NO_AUTH_SEND_MESSAGE}<!-- ENDIF --></p></strong>
<!-- ELSE -->
<p><strong>{L_NO_MESSAGES}</strong></p>
<p><strong>
<!-- IF S_COMPOSE_PM_VIEW and S_NO_AUTH_SEND_MESSAGE -->
<!-- IF S_USER_NEW -->{L_USER_NEW_PERMISSION_DISALLOWED}<!-- ELSE -->{L_NO_AUTH_SEND_MESSAGE}<!-- ENDIF -->
<!-- ELSE -->
{L_NO_MESSAGES}
<!-- ENDIF -->
</strong></p>
<!-- ENDIF -->
<!-- IF FOLDER_CUR_MESSAGES neq 0 -->

View File

@@ -5,13 +5,22 @@
<tr>
<td class="row1"><b class="genmed">{L_CONFIRM_CODE}:</b><br /><span class="gensmall">{L_RECAPTCHA_EXPLAIN}</span></td>
<td class="row2">
<script type="text/javascript" src="{RECAPTCHA_SERVER}/challenge?k={RECAPTCHA_PUBKEY}{RECAPTCHA_ERRORGET}">
//<![CDATA[
var RecaptchaOptions = {
lang : {L_RECAPTCHA_LANG}
};
// ]]>
</script>
<script type="text/javascript">
// <![CDATA[
var RecaptchaOptions = {
lang : '{L_RECAPTCHA_LANG}',
tabindex : <!-- IF $CAPTCHA_TAB_INDEX -->{$CAPTCHA_TAB_INDEX}<!-- ELSE -->10<!-- ENDIF -->
};
// ]]>
</script>
<script type="text/javascript" src="{RECAPTCHA_SERVER}/challenge?k={RECAPTCHA_PUBKEY}{RECAPTCHA_ERRORGET}" ></script>
<script type="text/javascript">
// <![CDATA[
<!-- IF S_CONTENT_DIRECTION eq 'rtl' -->
document.getElementById('recaptcha_table').style.direction = 'ltr';
<!-- ENDIF -->
// ]]>
</script>
<noscript>
<iframe src="{RECAPTCHA_SERVER}/noscript?k={RECAPTCHA_PUBKEY}{RECAPTCHA_ERRORGET}" height="300" width="500" frameborder="0"></iframe><br />

View File

@@ -92,7 +92,13 @@
</tr>
<!-- BEGINELSE -->
<tr>
<td class="row1" colspan="{$COLSPAN}" height="30" align="center" valign="middle"><span class="gen"><!-- IF S_USER_NEW -->{L_USER_NEW_PERMISSION_DISALLOWED}<!-- ELSE -->{L_NO_MESSAGES}<!-- ENDIF --></span></td>
<td class="row1" colspan="{$COLSPAN}" height="30" align="center" valign="middle"><span class="gen">
<!-- IF S_COMPOSE_PM_VIEW and S_NO_AUTH_SEND_MESSAGE -->
<!-- IF S_USER_NEW -->{L_USER_NEW_PERMISSION_DISALLOWED}<!-- ELSE -->{L_NO_AUTH_SEND_MESSAGE}<!-- ENDIF -->
<!-- ELSE -->
{L_NO_MESSAGES}
<!-- ENDIF -->
</span></td>
</tr>
<!-- END messagerow -->
</table>

View File

@@ -1678,7 +1678,8 @@ else if (!$all_marked_read)
}
// let's set up quick_reply
$s_quick_reply = $user->data['is_registered'] && $config['allow_quick_reply'] && ($topic_data['forum_flags'] & FORUM_FLAG_QUICK_REPLY) && $auth->acl_get('f_reply', $forum_id);
$s_allowed_reply = ((!$auth->acl_get('f_reply', $forum_id) || ($topic_data['forum_status'] == ITEM_LOCKED) || ($topic_data['topic_status'] == ITEM_LOCKED)) && !$auth->acl_get('m_edit', $forum_id)) ? false : true;
$s_quick_reply = $s_allowed_reply && $user->data['is_registered'] && $config['allow_quick_reply'] && ($topic_data['forum_flags'] & FORUM_FLAG_QUICK_REPLY);
if ($s_can_vote || $s_quick_reply)
{
@@ -1704,6 +1705,7 @@ if ($s_can_vote || $s_quick_reply)
(!$config['allow_post_links']) ? $qr_hidden_fields['disable_magic_url'] = 1 : true;
($s_attach_sig) ? $qr_hidden_fields['attach_sig'] = 1 : true;
($s_notify) ? $qr_hidden_fields['notify'] = 1 : true;
($topic_data['topic_status'] == ITEM_LOCKED) ? $qr_hidden_fields['lock_topic'] = 1 : true;
$template->assign_vars(array(
'S_QUICK_REPLY' => true,