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

Compare commits

...

356 Commits

Author SHA1 Message Date
Meik Sievertsen
1ef96b504d Tag Trunk before we change it to a state where merges from the 3.0.x branch are no longer possible
git-svn-id: file:///svn/phpbb/tags/merge_point_20082412@9220 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-12-24 13:11:39 +00:00
Meik Sievertsen
8c9af252cb merge #r9217
git-svn-id: file:///svn/phpbb/trunk@9218 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-12-24 12:11:31 +00:00
Chris Smith
7e95a3ee6c merge in r9090, r9170, r9174, r9179
git-svn-id: file:///svn/phpbb/trunk@9214 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-12-23 13:53:13 +00:00
Chris Smith
79f2dedb51 Remove cache files after each test, ensure they are not included in the coverage report
git-svn-id: file:///svn/phpbb/trunk@9181 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-12-07 02:26:47 +00:00
Chris Smith
c48f64ce94 Should not be needed, unlink() should clear sthe cache and this was never the problem anyway
git-svn-id: file:///svn/phpbb/trunk@9180 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-12-07 02:11:12 +00:00
Meik Sievertsen
a39e879300 fix postcount resync for situations where low and high post ids are higher than step value, resulting in users having 0 posts. (Bug #38195)
Enforce a requirement for some DBMS (Oracle, PostgreSQL, MSSQL) where the table order is quite important in some situations. ;) Since this does not affect the operation of the other DBMS the code is placed into dbal.php.


git-svn-id: file:///svn/phpbb/trunk@9176 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-12-05 11:21:01 +00:00
Meik Sievertsen
a0c9705bb7 every second commit an pre/post-commit error... :/
Ask for forum password if post within passworded forum quoted in private message (Reported by nickvergessen)


git-svn-id: file:///svn/phpbb/trunk@9169 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-12-03 16:48:58 +00:00
Meik Sievertsen
bb5c5adab1 correctly update last topic/forum information if changing guest usernames through editing posts - Bug #38095
(Changelog follows)

git-svn-id: file:///svn/phpbb/trunk@9167 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-12-03 16:43:20 +00:00
Meik Sievertsen
c076becc5a Use "less than a minute ago" instead of "0 minutes ago"
Use "Sent: {DATE}" in pm's, instead of "Sent at: {DATE}"

git-svn-id: file:///svn/phpbb/trunk@9163 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-12-03 11:19:25 +00:00
Meik Sievertsen
4e3d564be6 fix the no_profile one called after another mode with the same user_id and guest_username
git-svn-id: file:///svn/phpbb/trunk@9161 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-12-03 11:17:30 +00:00
Meik Sievertsen
16e8b8271b ok... now i remember. Added more precise comments
git-svn-id: file:///svn/phpbb/trunk@9159 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-12-03 09:42:10 +00:00
Chris Smith
9ef743ba7d fix tiny typos in r9087
git-svn-id: file:///svn/phpbb/trunk@9158 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-12-02 20:04:27 +00:00
Chris Smith
79dc2e79b2 Merge in r9156
git-svn-id: file:///svn/phpbb/trunk@9157 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-12-02 18:49:02 +00:00
Meik Sievertsen
a236d24ae5 Add same redirect disable_cd_check parameter to meta_refresh - #38065
git-svn-id: file:///svn/phpbb/trunk@9154 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-12-02 17:04:13 +00:00
Meik Sievertsen
eddddaa3a4 Slight performance increase for common parameter calls to append_sid() (Bug #37555 - Patch by BartVB)
Unsure if this works with the mysterious, uncommented block in front of it, the parsed_urls thingy... whoever wrote it, please prod me. :) Or add comments.

git-svn-id: file:///svn/phpbb/trunk@9151 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-12-02 16:27:44 +00:00
Meik Sievertsen
d054940739 Performance increase for get_username_string() (Bug #37545 - Patch by BartVB)
git-svn-id: file:///svn/phpbb/trunk@9149 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-12-02 16:22:03 +00:00
Chris Smith
45ac6aba10 merge in r9145
git-svn-id: file:///svn/phpbb/trunk@9147 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-12-01 17:28:32 +00:00
Chris Smith
b68a102491 merge in r9144
git-svn-id: file:///svn/phpbb/trunk@9145 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-12-01 17:04:58 +00:00
Chris Smith
be17000b92 Clear the stat cache of cache files after writing them
git-svn-id: file:///svn/phpbb/trunk@9143 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-12-01 16:56:57 +00:00
Chris Smith
f49fe16766 Fixed :D
git-svn-id: file:///svn/phpbb/trunk@9142 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-12-01 16:37:52 +00:00
Meik Sievertsen
132a1d2efa do not display ban link for own profile
git-svn-id: file:///svn/phpbb/trunk@9141 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-11-30 17:46:54 +00:00
Meik Sievertsen
81b57da147 force full date on "edited by" line. ;)
git-svn-id: file:///svn/phpbb/trunk@9139 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-11-30 16:56:31 +00:00
Meik Sievertsen
4379b3d7bc [Change] Performance increase for format_date() (Bug #37575 - Patch by BartVB)
[Change] Changed prosilver date separator from 'on' to '»'
[Feature] Added 'AGO' setting to relative date strings. For example: posted 14 minutes ago. (Patch by BartVB)
[Fix] Extend vertical line for last post column if no posts in forum (Bug #37125)


git-svn-id: file:///svn/phpbb/trunk@9137 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-11-30 14:43:25 +00:00
Meik Sievertsen
b4bf675273 Do not increment users post count after post approval if post had been posted in a forum with no post count increasing set (Bug #37865)
git-svn-id: file:///svn/phpbb/trunk@9134 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-11-30 12:05:15 +00:00
Meik Sievertsen
764c1c4f2b Let's face it - the most common setup we see with phpBB is having group-specific settings for external users (FTP, whatever).
Changed phpbb_chmod() to set the group bit, even if the PHP user is the owner. (somehow this sounds complicated, i hope you get the idea).

git-svn-id: file:///svn/phpbb/trunk@9132 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-11-30 11:50:23 +00:00
Meik Sievertsen
0d92e30b38 extend the style columns (style_id, template_id, imageset_id, image_id...)
No, not only because of possible style demos. :o

git-svn-id: file:///svn/phpbb/trunk@9130 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-11-27 13:46:54 +00:00
Chris Smith
d57b4d0b48 Test empty filename and invalid handle
git-svn-id: file:///svn/phpbb/trunk@9119 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-11-25 00:50:21 +00:00
Chris Smith
de51ec8a15 Test empty filename
git-svn-id: file:///svn/phpbb/trunk@9118 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-11-25 00:46:22 +00:00
Chris Smith
7b5dc8f3c5 Test missing files
git-svn-id: file:///svn/phpbb/trunk@9117 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-11-25 00:42:32 +00:00
Chris Smith
c95f0c7935 - Add template variable S_BLOCK_NAME
- Modify template::alter_block_array() so it supports modification of nested blocks
- Add (incomplete) tests for template::alter_block_array()


git-svn-id: file:///svn/phpbb/trunk@9116 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-11-25 00:31:32 +00:00
Chris Smith
332521a369 - Make a start on completing the phpDoc comments for the template engine
- Tidy template engine code, mainly PHP5 stuff, made some methods void instead of just returning true
- Add tests for the remaining untested compilation code


git-svn-id: file:///svn/phpbb/trunk@9115 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-11-24 21:59:33 +00:00
Nils Adermann
9954d9c29f - merge r9113: Handle checking for duplicate usernames in chunks (Bug #17285 - Patch by A_Jelly_Doughnut)
git-svn-id: file:///svn/phpbb/trunk@9114 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-11-24 19:31:44 +00:00
Nils Adermann
81c44f8351 - added a PHPUnit version check
git-svn-id: file:///svn/phpbb/trunk@9112 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-11-24 13:41:39 +00:00
Chris Smith
f816e67c36 Test is (even|odd) by y
git-svn-id: file:///svn/phpbb/trunk@9110 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-11-24 11:46:28 +00:00
Chris Smith
528bd80651 Fix a bug we inherited from Smarty a long time ago
git-svn-id: file:///svn/phpbb/trunk@9109 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-11-24 11:38:22 +00:00
David M
0955e2e539 Optimized this so it would not renumber the keys in the array every time it would grab a unicode character. Instead, it uses the php internal functions to get at the array as we see fit.
git-svn-id: file:///svn/phpbb/trunk@9108 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-11-24 08:14:36 +00:00
Chris Smith
ae9c4068e7 Deprecate S_ROW_COUNT, remove *really* old assignments from the code
git-svn-id: file:///svn/phpbb/trunk@9107 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-11-24 07:22:28 +00:00
Nils Adermann
21573a8473 - updating all tests to use new framework
git-svn-id: file:///svn/phpbb/trunk@9106 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-11-24 00:29:58 +00:00
Nils Adermann
0b11951412 - adding tests for the new request class and extending the tests for request_var to include deep direct access to multidimensional arrays and arbitrary number of dimensions
git-svn-id: file:///svn/phpbb/trunk@9105 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-11-24 00:28:57 +00:00
Nils Adermann
c8cba06910 - updated security/redirect test to use new framework functionality
git-svn-id: file:///svn/phpbb/trunk@9104 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-11-24 00:27:18 +00:00
Nils Adermann
bcfcf9b048 - added phpBB test framework which is an extension with some additional
functionality of PHPUnit
- first addition: setExpectedTriggerError() if a test expects a call
  to trigger_error().

git-svn-id: file:///svn/phpbb/trunk@9103 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-11-24 00:24:46 +00:00
Nils Adermann
07e9b83a3d - updated all code to use the request class instead of any direct access to
super globals
- disabled super globals in common.php. See commit r9101 for
  more information
- cleaned up/simplified a few lines along the way.

git-svn-id: file:///svn/phpbb/trunk@9102 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-11-24 00:20:33 +00:00
Nils Adermann
8427ae3fd4 Introducing the new request class. All input his handled through this class.
"Given a choice between dancing pigs and security, users will pick
          dancing pigs every time." (Gary McGraw and Edward Felten)

What stays the same?
- request_var() keeps working as it used to, alternatively you can directly use
  request::variable() which allows choosing which super global you want to read

So what's new?
- request::disable_super_globals() which disables super globals. This
  function causes any direct use of $_POST, $_GET, $_REQUEST or $_COOKIE to
  result in an E_USER_ERROR. We hope that this will force MOD authors to at
  least think about validation as they will have to read about how to use the
  request class.
- request::is_set() / request::is_set_post will be used instead of using isset
  directly on super globals
- request_var() now supports arrays with arbitrary depth
- request_var() can be used with an array as the variable name to directly
  access values in mutli dimensional arrays.

What's next?
- request::disable_super_globals() will be active by default (set in
  common.php)
- all code will be adjusted to use the new class consistently
- tests for the request class to make sure it works as designed and will not
  change behaviour between releases

I've also already updated all the code within functions.php to use the request class.

git-svn-id: file:///svn/phpbb/trunk@9101 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-11-23 23:43:00 +00:00
Chris Smith
6e2d2f85b5 More tests
git-svn-id: file:///svn/phpbb/trunk@9100 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-11-23 22:39:31 +00:00
Chris Smith
500eb05c48 test advanced loop constructs
git-svn-id: file:///svn/phpbb/trunk@9099 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-11-23 19:51:52 +00:00
Chris Smith
3f11fc12ac S_NUM_ROWS gives you the number of rows in a block
git-svn-id: file:///svn/phpbb/trunk@9098 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-11-23 16:07:36 +00:00
Chris Smith
aa3a2f565b Why did I not do it this way to begin with :)
git-svn-id: file:///svn/phpbb/trunk@9097 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-11-23 16:01:33 +00:00
Meik Sievertsen
3bd6984785 [Change] Alllow applications to set custom module inclusion path (idea by HoL)
git-svn-id: file:///svn/phpbb/trunk@9096 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-11-23 12:45:22 +00:00
Chris Smith
dcf0b15c9f Will he ever be happy? ...
git-svn-id: file:///svn/phpbb/trunk@9094 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-11-23 03:50:16 +00:00
Chris Smith
ff22d7a368 Refactor and fix :)
git-svn-id: file:///svn/phpbb/trunk@9093 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-11-23 03:41:54 +00:00
Chris Smith
f4c079a62b Run template tests over non-cached data as well
git-svn-id: file:///svn/phpbb/trunk@9092 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-11-23 01:55:12 +00:00
Chris Smith
d26f38c4e0 all 557 tests pass now :D
git-svn-id: file:///svn/phpbb/trunk@9091 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-11-23 01:08:08 +00:00
Chris Smith
99fa62267e Fix r9088
git-svn-id: file:///svn/phpbb/trunk@9089 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-11-23 00:10:48 +00:00
Chris Smith
74121b41fa Fix a tiny bug
git-svn-id: file:///svn/phpbb/trunk@9088 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-11-23 00:09:34 +00:00
Chris Smith
416270ee77 - Deprecate S_ROW_COUNT use S_ROW_NUM
- S_ROW_NUM, S_FIRST_ROW, S_LAST_ROW are now using internal template engine variables saving memory
- Other small changes
- Update of template tests


git-svn-id: file:///svn/phpbb/trunk@9087 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-11-22 23:53:40 +00:00
Nils Adermann
efe06af913 - merge r9084 and r9085
- added tests for make_clickable

git-svn-id: file:///svn/phpbb/trunk@9086 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-11-22 23:25:57 +00:00
Meik Sievertsen
04f7c1da69 Only display special ranks to guests; no longer display normal ranks for guests (Bug #36735)
[changed parameters for get_user_rank(), breaks backward compatibility]

git-svn-id: file:///svn/phpbb/trunk@9083 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-11-22 20:26:47 +00:00
Meik Sievertsen
a9274f1d63 define cookie var for styleswitcher.js for popups (Bug #36765)
git-svn-id: file:///svn/phpbb/trunk@9081 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-11-22 20:05:24 +00:00
Meik Sievertsen
08bd36f0b2 Do not try to send jabber notifications if no jid entered (Bug #36775)
git-svn-id: file:///svn/phpbb/trunk@9079 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-11-22 19:58:08 +00:00
Meik Sievertsen
d46e8e6f98 merge revisions i missed... hopefully not breaking things - did not check every change.
git-svn-id: file:///svn/phpbb/trunk@9077 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-11-22 19:38:25 +00:00
Chris Smith
47b4b83468 Merge in r9065
git-svn-id: file:///svn/phpbb/trunk@9074 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-11-22 18:03:04 +00:00
Henry Sudhof
c8e3035a4b Merge R 9067
git-svn-id: file:///svn/phpbb/trunk@9068 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-11-21 13:46:39 +00:00
Chris Smith
ef0c0d4c82 been a while :( ... merge in r8997, r8998, r8999, r9000, r9001, r9002, r9003, r9004, r9005, r9007, r9008, r9009, r9010, r9011, r9012, r9013, r9014, r9015, r9022, r9023, r9029, r9030, r9034, r9048, r9049, r9054, r9056
git-svn-id: file:///svn/phpbb/trunk@9064 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-11-13 13:04:54 +00:00
Henry Sudhof
1739da9335 Merging R9051 and R 9052
git-svn-id: file:///svn/phpbb/trunk@9062 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-11-13 11:46:49 +00:00
Henry Sudhof
36635929a8 #36695
git-svn-id: file:///svn/phpbb/trunk@9061 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-11-13 11:45:40 +00:00
Meik Sievertsen
f353fd2d57 db_tools from static to non-static due to the db dependancy (#31245)
git-svn-id: file:///svn/phpbb/trunk@9044 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-11-02 11:36:13 +00:00
Meik Sievertsen
6a15c2a936 we no longer need them. Schema is in install now.
git-svn-id: file:///svn/phpbb/trunk@9043 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-11-02 11:34:50 +00:00
Meik Sievertsen
c903b453fa i had these changes sitting... must've been a merge not committed (and because we do not use svn 1.5 as the client version i am not able to say which they were)
git-svn-id: file:///svn/phpbb/trunk@9042 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-11-02 11:22:30 +00:00
Meik Sievertsen
1b10cb9c37 gah@trunk
git-svn-id: file:///svn/phpbb/trunk@9027 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-10-17 14:56:19 +00:00
Meik Sievertsen
d0e630157c Disable referer validation on install if it is not possible to determine correct referer due to a proxy setup (Bug #32765)
git-svn-id: file:///svn/phpbb/trunk@9025 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-10-17 10:33:06 +00:00
Chris Smith
69cfb5b821 Initial template tests, a bit hackish currently, excuse the rushed nature of this commit got to catch a train :)
git-svn-id: file:///svn/phpbb/trunk@9020 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-10-15 16:21:27 +00:00
Chris Smith
baf8d571e3 Mini bug fix for UNDEFINE
git-svn-id: file:///svn/phpbb/trunk@9016 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-10-15 01:47:37 +00:00
Chris Smith
5ce6035aad Merging r8993, r8994, r8995
git-svn-id: file:///svn/phpbb/trunk@8996 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-10-10 17:58:32 +00:00
Meik Sievertsen
746b617807 Add two standard language items - #30885
Make sure users still get notifications if they set to only be notified by Jabber, but Jabber service disabled. (Bug #29715 - Patch by Paul)


git-svn-id: file:///svn/phpbb/trunk@8991 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-10-09 15:42:08 +00:00
Meik Sievertsen
9c7d8dcd7d - Do not show link to user/group profiles if user has no permission to view the linked page and gets a denied message anyway. (Bug #15088)
- Do not display last post link and sort display options for search engines. (Bug #15088)


git-svn-id: file:///svn/phpbb/trunk@8988 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-10-09 14:22:07 +00:00
Meik Sievertsen
73db74dfa1 Implemented strict check for cached user permissions and existing ACL options. This fix makes sure cached permissions are valid, even if they got already cached.
git-svn-id: file:///svn/phpbb/trunk@8986 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-10-09 13:19:36 +00:00
Meik Sievertsen
d4c8a078a2 Show coloured guest names correctly if not enclosed in <a> tags. ;) Bug #21935
git-svn-id: file:///svn/phpbb/trunk@8984 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-10-08 15:17:27 +00:00
Meik Sievertsen
9d9d61b1a2 Merge revisions:
r8974, r8975, r8976, r8977, r8978, r8979

git-svn-id: file:///svn/phpbb/trunk@8980 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-10-08 12:51:43 +00:00
Meik Sievertsen
89f1b88fe1 merge r8970 and r8971
git-svn-id: file:///svn/phpbb/trunk@8972 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-10-06 05:52:49 +00:00
Meik Sievertsen
9a7804cb71 [Change] Remove NUL-Bytes directly in request_var() for strings and within the custom DBAL sql_escape() functions (MSSQL, Firebird, Oracle) (reported by AdhostMikeSw)
git-svn-id: file:///svn/phpbb/trunk@8968 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-10-02 12:05:13 +00:00
Henry Sudhof
8f2b4562b1 meh
git-svn-id: file:///svn/phpbb/trunk@8966 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-10-01 11:14:48 +00:00
Henry Sudhof
18bfc5e69b and why not this as well?
git-svn-id: file:///svn/phpbb/trunk@8965 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-10-01 10:29:27 +00:00
Meik Sievertsen
ad4d7c036e merge r8956, r8957 and r8960
git-svn-id: file:///svn/phpbb/trunk@8961 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-09-30 15:18:35 +00:00
Henry Sudhof
e4c3a743ca #34815
git-svn-id: file:///svn/phpbb/trunk@8959 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-09-30 12:55:48 +00:00
Meik Sievertsen
f3844a17f7 revert r8893 - there were massive problems with the display and select all code
git-svn-id: file:///svn/phpbb/trunk@8954 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-09-28 17:09:20 +00:00
Chris Smith
c439b286e9 Merge in r8940, r8941, r8942, r8945, r8946, r8947, r8949, r8950, r8951
git-svn-id: file:///svn/phpbb/trunk@8952 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-09-27 11:45:30 +00:00
Chris Smith
0b6dd99a76 tiny typo #34345
git-svn-id: file:///svn/phpbb/trunk@8948 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-09-26 21:27:31 +00:00
Chris Smith
0a4c62f12e Merge in r8924, r8925, r8926, r8936, r8938
git-svn-id: file:///svn/phpbb/trunk@8939 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-09-26 09:28:12 +00:00
Marek A. R
1cc419fb4c Fix typos
git-svn-id: file:///svn/phpbb/trunk@8937 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-09-25 19:55:04 +00:00
Chris Smith
f6a47c6f82 Merge in r8934
git-svn-id: file:///svn/phpbb/trunk@8935 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-09-24 18:41:06 +00:00
Meik Sievertsen
10d3191198 better query for syncing post counts. Thanks to BartVB for this. ;)
git-svn-id: file:///svn/phpbb/trunk@8933 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-09-24 13:58:50 +00:00
Henry Sudhof
9f9a89c78e Merging 8927, 8928, 8929, 8930
git-svn-id: file:///svn/phpbb/trunk@8931 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-09-24 12:29:57 +00:00
Chris Smith
884cde18fe Merge in r8922
git-svn-id: file:///svn/phpbb/trunk@8923 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-09-23 16:31:45 +00:00
Meik Sievertsen
ec1be2563c gah^2
git-svn-id: file:///svn/phpbb/trunk@8921 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-09-23 14:40:20 +00:00
Meik Sievertsen
ec88ec534b here too
git-svn-id: file:///svn/phpbb/trunk@8919 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-09-23 14:14:33 +00:00
Meik Sievertsen
bb97d3531a remove exit statement and make sure no "additional" code gets executed
git-svn-id: file:///svn/phpbb/trunk@8916 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-09-23 13:31:04 +00:00
Meik Sievertsen
ce6b87ccec - Automatically add users/groups to the PM recipient list, if entered or selected.
- Reply to PM now includes all previous recipients and not only the original sender.
- Added 'max_recipients' setting for private messages. This setting allows admins to define the maximum number of recipients per private message with a board-wide setting and a group-specific setting.
- Added new permission setting for sending private messages to groups. Now there are two permissions to define sending private messages to multiple recipients and private messages to groups.



git-svn-id: file:///svn/phpbb/trunk@8914 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-09-23 13:11:34 +00:00
Chris Smith
b486710ea1 Merge in r8843, r8908, r8909
git-svn-id: file:///svn/phpbb/trunk@8910 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-09-23 12:56:34 +00:00
Meik Sievertsen
aa9dbcec3c short php open tags should not be used. :) A lot of users (including myself) do not allow them.
git-svn-id: file:///svn/phpbb/trunk@8907 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-09-22 17:51:43 +00:00
Henry Sudhof
08428f8fa1 merging 8904
git-svn-id: file:///svn/phpbb/trunk@8905 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-09-22 13:32:28 +00:00
Henry Sudhof
0f14f278d0 fixing some vC bugs (attempt counting and posting) and introducing prototype for reCaptcha
git-svn-id: file:///svn/phpbb/trunk@8903 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-09-22 12:37:42 +00:00
Meik Sievertsen
c67fa83652 remove some spaces
git-svn-id: file:///svn/phpbb/trunk@8902 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-09-21 10:14:17 +00:00
Meik Sievertsen
1f6eea1b5b Fix sql_multi_insert() if called with non multi-dimensional array (Bug #32975)
git-svn-id: file:///svn/phpbb/trunk@8901 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-09-19 17:13:22 +00:00
Meik Sievertsen
6f0ea3c9d2 do not allow categories to be locked by accident (Bug #14548)
git-svn-id: file:///svn/phpbb/trunk@8899 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-09-19 17:07:45 +00:00
Meik Sievertsen
8fd7f16642 language correction (Bug #23955)
git-svn-id: file:///svn/phpbb/trunk@8897 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-09-19 17:00:26 +00:00
Meik Sievertsen
80ced5c0b7 support tabs in code selections (Bug #25445). Still does not solve the strange "4 spaces prefixed on every line" problem in firefox. :/
git-svn-id: file:///svn/phpbb/trunk@8894 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-09-19 16:42:55 +00:00
Henry Sudhof
01c1c27f2c meh
git-svn-id: file:///svn/phpbb/trunk@8892 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-09-19 16:18:59 +00:00
Meik Sievertsen
eee2f89ace Correctly delete message attachments. (Bug #23755) Also revamped and simplified delete_attachments() - it looks like we did not touch it for a long long time.
git-svn-id: file:///svn/phpbb/trunk@8891 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-09-19 15:42:33 +00:00
Henry Sudhof
461be11e8d Okay, that is pretty raw, but better to have it in place than trying to play catch-up. Introducing an early stage of CAPTCHA modules.
git-svn-id: file:///svn/phpbb/trunk@8889 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-09-19 13:17:30 +00:00
Meik Sievertsen
5349280538 Pass S_SEARCH_ACTION through append_sid() in search.php. (Bug #21585)
git-svn-id: file:///svn/phpbb/trunk@8886 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-09-18 15:25:45 +00:00
Meik Sievertsen
24da8c474d remove duplicate statement
git-svn-id: file:///svn/phpbb/trunk@8884 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-09-18 15:06:23 +00:00
Meik Sievertsen
158a15ba9c Reset login attempts on new password activation. Prevents "first failed login attempt" on converted boards. Bug #19965
git-svn-id: file:///svn/phpbb/trunk@8882 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-09-18 14:50:50 +00:00
Meik Sievertsen
958d077faa Fix native full text search on postgresql while using excluding keyword matches. (Bug #19195)
git-svn-id: file:///svn/phpbb/trunk@8880 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-09-18 14:32:51 +00:00
Meik Sievertsen
4649b93e0d Prevent integer overflow - Bug #19895
git-svn-id: file:///svn/phpbb/trunk@8877 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-09-18 14:27:27 +00:00
Meik Sievertsen
2fc6d5147a Set secure cookie for style switcher if required. (Bug #19625)
git-svn-id: file:///svn/phpbb/trunk@8875 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-09-18 14:17:39 +00:00
Meik Sievertsen
e2736dea20 Display assigned rank/avatar for guests. (Bug #19155)
git-svn-id: file:///svn/phpbb/trunk@8873 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-09-18 13:36:40 +00:00
Meik Sievertsen
76c0e5aa5e Do not allow setting forums parent to the forum itself. (Bug #18855)
git-svn-id: file:///svn/phpbb/trunk@8871 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-09-18 13:22:15 +00:00
Meik Sievertsen
d135060c12 #18175
git-svn-id: file:///svn/phpbb/trunk@8869 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-09-17 15:52:21 +00:00
Meik Sievertsen
3b79fd122e Use correct port delimiter for MSSQL connections in windows. (Bug #16615)
git-svn-id: file:///svn/phpbb/trunk@8867 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-09-17 15:12:31 +00:00
Meik Sievertsen
b6949c47ec Preserve alpha transparency for created thumbnails. (Bug #16575)
git-svn-id: file:///svn/phpbb/trunk@8865 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-09-17 14:59:53 +00:00
Meik Sievertsen
235f552974 Expand shown ban reason in unban screen to fully show long entries. (Bug #16234)
git-svn-id: file:///svn/phpbb/trunk@8863 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-09-17 14:50:48 +00:00
Meik Sievertsen
1651c5df57 Display popular topic based on posts within topic instead of replies within topic. (Bug #16099)
git-svn-id: file:///svn/phpbb/trunk@8861 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-09-17 14:31:32 +00:00
Meik Sievertsen
17ec98b834 simplify $user->img()
git-svn-id: file:///svn/phpbb/trunk@8859 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-09-16 15:15:03 +00:00
Meik Sievertsen
cc5d77e06d make topic icon image width/height available to viewforum and search templates (Bug #15934)
git-svn-id: file:///svn/phpbb/trunk@8858 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-09-16 15:07:38 +00:00
Meik Sievertsen
2eeeaadcfd emails to e-mails
git-svn-id: file:///svn/phpbb/trunk@8856 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-09-16 13:21:12 +00:00
Meik Sievertsen
de0bc7476a Do not display reported topic icon for shadow topics. (Bug #13970)
git-svn-id: file:///svn/phpbb/trunk@8854 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-09-16 12:51:36 +00:00
Meik Sievertsen
ca07af715f Fix Wrong table order in query obtaining posts if post id given. In MSSQL there is an sql error due to this bug.
git-svn-id: file:///svn/phpbb/trunk@8852 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-09-16 12:37:33 +00:00
Meik Sievertsen
46b4d09e3a add missing dot. :)
git-svn-id: file:///svn/phpbb/trunk@8849 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-09-16 11:42:09 +00:00
Meik Sievertsen
af26b56470 more in-depth hostname validation. Not used in install files... there the code is fine.
There are ways to improve this, either a whitelist or "more guessing"

git-svn-id: file:///svn/phpbb/trunk@8847 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-09-15 18:43:24 +00:00
Henry Sudhof
310375db66 Merge 8844, Bug #34045
git-svn-id: file:///svn/phpbb/trunk@8845 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-09-15 11:44:25 +00:00
Chris Smith
e5425dfd46 Merge in r8840
git-svn-id: file:///svn/phpbb/trunk@8841 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-09-11 00:32:02 +00:00
Chris Smith
0e0100c525 merge r8829, r8830, r8831, r8832, r8833, r8834, r8835, r8836, r8837, r8838
git-svn-id: file:///svn/phpbb/trunk@8839 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-09-08 13:39:34 +00:00
Chris Smith
a32f3a6709 Merge in r8827
git-svn-id: file:///svn/phpbb/trunk@8828 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-09-05 13:49:04 +00:00
Chris Smith
10c8d29205 Merge in r8825
git-svn-id: file:///svn/phpbb/trunk@8826 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-09-05 12:52:00 +00:00
Chris Smith
6f754d49e4 Remove a useless str_replace()
git-svn-id: file:///svn/phpbb/trunk@8823 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-09-05 12:41:08 +00:00
Meik Sievertsen
c83e6f7e94 cleanage
git-svn-id: file:///svn/phpbb/trunk@8822 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-09-04 14:10:17 +00:00
Meik Sievertsen
3a330753f4 Get real dbms version instead of relying on php internal functions which only grab the local library version
git-svn-id: file:///svn/phpbb/trunk@8821 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-09-04 14:10:03 +00:00
Meik Sievertsen
a736c97c04 needed for mysql 4.1.3+?
git-svn-id: file:///svn/phpbb/trunk@8820 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-09-04 14:08:19 +00:00
Meik Sievertsen
199ab53f30 support new method of getting correct language strings for nullar/singular/plural forms
git-svn-id: file:///svn/phpbb/trunk@8819 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-09-04 14:07:30 +00:00
Meik Sievertsen
63e2f5cf14 add phpbb version number to constants
git-svn-id: file:///svn/phpbb/trunk@8818 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-09-04 14:06:43 +00:00
Meik Sievertsen
4658e3f828 schema updates for the queue trigger feature and for storing the dbms version
git-svn-id: file:///svn/phpbb/trunk@8817 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-09-04 14:06:20 +00:00
Meik Sievertsen
44416f4744 - queue trigger feature
- queued posts do not affect user_posts
- show links to MCP + queued posts in ucp and acp


git-svn-id: file:///svn/phpbb/trunk@8816 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-09-04 14:04:30 +00:00
Chris Smith
0dbe7e3b6c Remove caching of templates from the database completely, themes is cut down ready for a complete chop, and fix the installer :)
git-svn-id: file:///svn/phpbb/trunk@8812 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-09-04 11:39:25 +00:00
Chris Smith
f2abefeaed Merge in r8758, r8807, r8808, r8809
git-svn-id: file:///svn/phpbb/trunk@8810 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-09-02 13:36:48 +00:00
Henry Sudhof
57ec5805df Merging R8795
git-svn-id: file:///svn/phpbb/trunk@8796 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-08-29 11:53:11 +00:00
Henry Sudhof
73da6084d0 Merge R8792
git-svn-id: file:///svn/phpbb/trunk@8794 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-08-28 13:12:48 +00:00
Henry Sudhof
323fb23b49 Merge R8790/8791
git-svn-id: file:///svn/phpbb/trunk@8793 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-08-28 13:12:18 +00:00
Meik Sievertsen
cbacffd9fc fix bug #32925
git-svn-id: file:///svn/phpbb/trunk@8789 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-08-25 17:17:25 +00:00
Meik Sievertsen
589db44b56 Merge of the language-specific custom path change Revision #r8782
git-svn-id: file:///svn/phpbb/trunk@8786 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-08-24 10:04:15 +00:00
Meik Sievertsen
8174462e89 Merge chmod changes into trunk
git-svn-id: file:///svn/phpbb/trunk@8781 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-08-22 13:32:34 +00:00
Henry Sudhof
a45ac24bd7 comments
git-svn-id: file:///svn/phpbb/trunk@8779 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-08-22 11:02:17 +00:00
Henry Sudhof
3a3b9eb8ef merge
git-svn-id: file:///svn/phpbb/trunk@8776 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-08-21 15:50:21 +00:00
Meik Sievertsen
76a542a03e merge
git-svn-id: file:///svn/phpbb/trunk@8773 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-08-21 14:21:38 +00:00
Henry Sudhof
d67b943ef6 merge
git-svn-id: file:///svn/phpbb/trunk@8771 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-08-18 13:09:08 +00:00
Henry Sudhof
b46bd90f6e merge
git-svn-id: file:///svn/phpbb/trunk@8769 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-08-18 11:51:07 +00:00
Marek A. R
c119d0b424 More 5.3 compatibility.
git-svn-id: file:///svn/phpbb/trunk@8767 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-08-16 22:32:24 +00:00
Meik Sievertsen
15e04808fc writeable -> writable merge
git-svn-id: file:///svn/phpbb/trunk@8762 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-08-16 13:11:50 +00:00
Marek A. R
4235be4bcb PHP5.3 compatibility.
git-svn-id: file:///svn/phpbb/trunk@8759 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-08-15 13:00:20 +00:00
Henry Sudhof
f741c4ff05 merge
git-svn-id: file:///svn/phpbb/trunk@8757 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-08-14 12:49:11 +00:00
Henry Sudhof
8236a7438d merge
git-svn-id: file:///svn/phpbb/trunk@8753 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-08-13 14:43:14 +00:00
Henry Sudhof
ae27aaf1a4 merge
git-svn-id: file:///svn/phpbb/trunk@8750 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-08-13 14:22:27 +00:00
Henry Sudhof
cec12340b9 merge
git-svn-id: file:///svn/phpbb/trunk@8748 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-08-13 14:17:11 +00:00
Henry Sudhof
f405535730 merge
git-svn-id: file:///svn/phpbb/trunk@8746 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-08-13 12:31:19 +00:00
Henry Sudhof
6eed0e5bd2 merge
git-svn-id: file:///svn/phpbb/trunk@8744 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-08-13 12:28:17 +00:00
David M
6a401ab68b Extracted the IF code to make a generic parsing function,
now DEFINE is nicely integrated and we can even do things
like <!-- BEGIN foo($FOO, $BAR) --> if we *really* wanted
to do so.


git-svn-id: file:///svn/phpbb/trunk@8742 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-08-03 18:11:40 +00:00
Marek A. R
b3e2250391 Compile things like {$FOO} again.
git-svn-id: file:///svn/phpbb/trunk@8741 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-08-01 15:13:23 +00:00
Meik Sievertsen
c002c468c4 change conditional enclosements in template engine
oh... thank you very much brainy. :)

git-svn-id: file:///svn/phpbb/trunk@8740 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-08-01 14:36:52 +00:00
Meik Sievertsen
1071d9cb31 merge cookie secure detection
git-svn-id: file:///svn/phpbb/trunk@8738 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-08-01 14:30:42 +00:00
Henry Sudhof
48701289ff Igor, hope that makes you happy
git-svn-id: file:///svn/phpbb/trunk@8729 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-07-29 15:38:30 +00:00
Henry Sudhof
360e245a1a make IM links in PMs behave like their viewtopic brothers (#30075 - fix by Porter21)
git-svn-id: file:///svn/phpbb/trunk@8728 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-07-29 15:35:45 +00:00
Henry Sudhof
97b5920055 Oh. A Paul
git-svn-id: file:///svn/phpbb/trunk@8726 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-07-29 15:28:46 +00:00
Henry Sudhof
492354344b enable stupid php.ini fallback for readfile (#30325 - fix by bellzebu)
git-svn-id: file:///svn/phpbb/trunk@8725 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-07-29 15:18:03 +00:00
Henry Sudhof
c1cf3404a2 No negative values (#30335)
git-svn-id: file:///svn/phpbb/trunk@8723 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-07-29 15:14:07 +00:00
Meik Sievertsen
96948b010c erm, yeah
git-svn-id: file:///svn/phpbb/trunk@8721 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-07-29 15:05:31 +00:00
Meik Sievertsen
9047c986da upgrader in trunk too. :P
git-svn-id: file:///svn/phpbb/trunk@8720 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-07-29 15:02:08 +00:00
Henry Sudhof
4580ca9683 Merge teach viewonline about download/file
git-svn-id: file:///svn/phpbb/trunk@8717 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-07-29 14:58:49 +00:00
Henry Sudhof
be1849a901 Merge make the MCP remember a bit more - still far from perfect as pagination makes it forget
git-svn-id: file:///svn/phpbb/trunk@8716 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-07-29 14:57:54 +00:00
Henry Sudhof
e9b2e6174e Add VST
git-svn-id: file:///svn/phpbb/trunk@8715 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-07-29 14:56:40 +00:00
Henry Sudhof
fe93fa0e9d Merge attachment caching
git-svn-id: file:///svn/phpbb/trunk@8714 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-07-29 14:54:57 +00:00
Henry Sudhof
dceaf59d3b Merge avatar deletion on change code
git-svn-id: file:///svn/phpbb/trunk@8713 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-07-29 14:38:46 +00:00
Henry Sudhof
db4011c9d9 Merge style element name conflict code
git-svn-id: file:///svn/phpbb/trunk@8712 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-07-29 14:35:32 +00:00
Meik Sievertsen
7c79d0f860 hmm, this seems to be a merge i forgot
git-svn-id: file:///svn/phpbb/trunk@8711 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-07-29 13:39:50 +00:00
Marek A. R
8c186d97c6 - Make "<?" and/or "<%" in template files not break the compiled template.
- Enable <!-- PHP --> and <!-- INCLUDEPHP --> again.

git-svn-id: file:///svn/phpbb/trunk@8699 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-07-28 15:01:06 +00:00
Meik Sievertsen
1b67e80422 marge
git-svn-id: file:///svn/phpbb/trunk@8696 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-07-28 13:37:16 +00:00
Meik Sievertsen
d8f2c4a1c4 add warning to ACP index if config file is writeable
git-svn-id: file:///svn/phpbb/trunk@8689 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-07-28 13:21:53 +00:00
David M
41d3effa19 Added the locking code back in... Marek, feel free to reorder it as you see fit.
git-svn-id: file:///svn/phpbb/trunk@8687 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-07-28 01:16:47 +00:00
Marek A. R
e6e9618be6 Fix ucp.php?mode=login login box redirect
git-svn-id: file:///svn/phpbb/trunk@8686 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-07-27 22:39:22 +00:00
Marek A. R
0c4ae1cd97 - Optimise compiled template code.
- Improve template filter.

git-svn-id: file:///svn/phpbb/trunk@8685 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-07-27 22:08:47 +00:00
Meik Sievertsen
036dc071e7 merge
git-svn-id: file:///svn/phpbb/trunk@8684 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-07-27 13:42:46 +00:00
Marek A. R
d5d7de4ffa - Add some necessary evil
- Template DEFINE variables can now be assigned other variables

git-svn-id: file:///svn/phpbb/trunk@8683 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-07-25 17:24:12 +00:00
Marek A. R
79dd5b164b Cleanup
git-svn-id: file:///svn/phpbb/trunk@8682 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-07-20 15:33:23 +00:00
Marek A. R
e0799b79e2 Fix file ACM to work with cached single-quotes and other characters that could need escaping.
git-svn-id: file:///svn/phpbb/trunk@8681 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-07-13 19:08:30 +00:00
Marek A. R
95462dca58 git-svn-id: file:///svn/phpbb/trunk@8680 89ea8834-ac86-4346-8a33-228a782c2dd0 2008-07-12 18:22:47 +00:00
Meik Sievertsen
ad739a358c merge? merge.
git-svn-id: file:///svn/phpbb/trunk@8672 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-06-23 18:22:44 +00:00
Marek A. R
3892e7330a Fix merge to use the new constants
git-svn-id: file:///svn/phpbb/trunk@8660 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-06-19 17:51:11 +00:00
Marek A. R
aeb36226c0 Change 5.1.0 to 5.2.0
git-svn-id: file:///svn/phpbb/trunk@8659 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-06-18 21:32:58 +00:00
Meik Sievertsen
eeba8f4560 Fix some instances where we left db connections open (registration -> captcha for example)
git-svn-id: file:///svn/phpbb/trunk@8656 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-06-13 19:44:40 +00:00
Marek A. R
677e6451c4 ...
git-svn-id: file:///svn/phpbb/trunk@8654 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-06-13 18:12:52 +00:00
Marek A. R
c44d2edc4a Changed the template compiler to work on streams. Should be a bit faster.
git-svn-id: file:///svn/phpbb/trunk@8653 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-06-13 17:57:47 +00:00
Marek A. R
50dd4c183a Fix ACP module URLs
git-svn-id: file:///svn/phpbb/trunk@8652 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-06-13 17:12:09 +00:00
David M
97d2fb55b7 /me slaps himself for being old school
git-svn-id: file:///svn/phpbb/trunk@8650 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-06-12 07:27:01 +00:00
David M
0ebc5cc9ee The beginnings of the destruction of phpBB's greatest bottleneck, dynamic css...
As of phpBB 3.0.x, we take our "generic" CSS for a theme and later on combine it with the imagesets and languages as needed... What we did for 3.0.x involved dynamically resolving the variables in the CSS and then sending it off, caching it at several layers (except the one that mattered). The biggest issue with style.php is that it is one giant str_replace on every page load, no matter what; cache be damned. Instead, the trick is to cache the full compilation earlier on...
Further work to do: kill all the old crap and fully integrate the new solution


git-svn-id: file:///svn/phpbb/trunk@8649 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-06-12 07:24:13 +00:00
Meik Sievertsen
0ca7e81ca4 #28595 (AVATAR_IMG available to memberlist_body.html)
git-svn-id: file:///svn/phpbb/trunk@8646 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-06-10 14:38:07 +00:00
Meik Sievertsen
fc8db76da9 added two comments to describe the functions use-case
git-svn-id: file:///svn/phpbb/trunk@8644 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-06-10 12:55:32 +00:00
Nils Adermann
d168abdcc9 Regular expression for email matching in posts will no longer die on long words
git-svn-id: file:///svn/phpbb/trunk@8642 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-06-09 22:32:51 +00:00
Meik Sievertsen
50f5502cc9 check if folder is not empty (may happen for absolute paths). Thanks paul
git-svn-id: file:///svn/phpbb/trunk@8640 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-06-09 17:46:41 +00:00
Meik Sievertsen
e199f55ba2 #27395
git-svn-id: file:///svn/phpbb/trunk@8637 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-06-09 17:10:59 +00:00
Henry Sudhof
d7a217c28c #16124
git-svn-id: file:///svn/phpbb/trunk@8635 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-06-09 13:06:14 +00:00
Henry Sudhof
8f3c085f7f #27325
git-svn-id: file:///svn/phpbb/trunk@8633 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-06-09 12:37:44 +00:00
Henry Sudhof
4ba2921cec #23945
git-svn-id: file:///svn/phpbb/trunk@8632 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-06-09 12:37:08 +00:00
Henry Sudhof
fe2343965b merge
git-svn-id: file:///svn/phpbb/trunk@8629 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-06-09 11:59:43 +00:00
Henry Sudhof
d0140a096c merge
git-svn-id: file:///svn/phpbb/trunk@8627 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-06-09 11:36:17 +00:00
David M
fc126eec66 Rewrote this stuff so that it is all multiple object oriented instead of looping single objects... The way it is written, there should be no speed decrease (and in some places, a speed increase) and maybe a miniscule amount of extra memory used in the move_topics function... Everything in there should be O(n) where n is the number of topics or posts being delete or moved or whatever. Multiple topic insertions are not supported as I cannot forsee where one would like to insert multiple topics into the same forum. Different forums I can understand but there is no way to optimize that _at all_. More work to come...
git-svn-id: file:///svn/phpbb/trunk@8625 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-06-09 00:59:44 +00:00
Meik Sievertsen
1aa40171e0 merge...
git-svn-id: file:///svn/phpbb/trunk@8624 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-06-08 21:44:59 +00:00
Meik Sievertsen
6a59f3efd6 fix security test for redirect. Also set common server variables to mimick a real testbed.
git-svn-id: file:///svn/phpbb/trunk@8623 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-06-08 21:43:27 +00:00
Meik Sievertsen
b54a9ec1e2 #28485
git-svn-id: file:///svn/phpbb/trunk@8618 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-06-07 13:59:14 +00:00
Meik Sievertsen
24b9d6432f #28635
git-svn-id: file:///svn/phpbb/trunk@8616 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-06-07 13:51:51 +00:00
Meik Sievertsen
7524ca5249 do not allow [flash=0,0]... not implemented for images due to the reliance on getimagesize() - as usual both sizes are able to be limited by the maximum/minimum image size configuration options
git-svn-id: file:///svn/phpbb/trunk@8614 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-06-07 13:42:06 +00:00
Henry Sudhof
4dddc3a130 Some xenophobia
git-svn-id: file:///svn/phpbb/trunk@8612 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-06-06 11:28:55 +00:00
Meik Sievertsen
8822747b91 merge...
git-svn-id: file:///svn/phpbb/trunk@8610 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-06-05 14:11:42 +00:00
Henry Sudhof
ea3eb9e9c3 merge
git-svn-id: file:///svn/phpbb/trunk@8608 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-06-05 11:38:33 +00:00
Henry Sudhof
a156e31f0c minor constant fix, won't make it work
git-svn-id: file:///svn/phpbb/trunk@8607 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-06-05 11:35:43 +00:00
Nils Adermann
443ec9dcb0 merging r8604 into trunk
git-svn-id: file:///svn/phpbb/trunk@8606 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-06-04 17:28:43 +00:00
Nils Adermann
e08a400b9f HTTP Authentication supports UTF-8 usernames now [Bug #21135]
git-svn-id: file:///svn/phpbb/trunk@8603 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-06-04 16:05:49 +00:00
Nils Adermann
a11f41986f corrected link for searching post author's other posts [Bug #26455]
git-svn-id: file:///svn/phpbb/trunk@8600 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-06-04 15:48:00 +00:00
Nils Adermann
150c6c4c24 removed executable props [Bug #6464]
git-svn-id: file:///svn/phpbb/trunk@8599 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-06-04 15:38:14 +00:00
Meik Sievertsen
e8b7c45d85 fix adm redirect
git-svn-id: file:///svn/phpbb/trunk@8590 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-06-04 11:23:00 +00:00
Meik Sievertsen
e8e807f797 adding missing props
git-svn-id: file:///svn/phpbb/trunk@8588 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-06-04 11:06:51 +00:00
Henry Sudhof
65fb840b76 merge
git-svn-id: file:///svn/phpbb/trunk@8587 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-06-03 16:33:02 +00:00
Meik Sievertsen
59e6bc27f1 erm, no, not yet. :P
git-svn-id: file:///svn/phpbb/trunk@8586 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-06-03 16:32:49 +00:00
Meik Sievertsen
7591a84c0d two new tests, added security suite and fixed utf8 tests.
git-svn-id: file:///svn/phpbb/trunk@8584 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-06-03 16:15:01 +00:00
Meik Sievertsen
990e3cd4b2 add missing constant to config file
git-svn-id: file:///svn/phpbb/trunk@8583 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-06-03 14:57:04 +00:00
Vic D'Elfant
de5ddf3907 I'm going to get an award for the smallest commit ever.
git-svn-id: file:///svn/phpbb/trunk@8579 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-05-29 16:19:06 +00:00
Meik Sievertsen
7c159b8c6e mcp link (not within adm folder) - as well as carrying a session by default
git-svn-id: file:///svn/phpbb/trunk@8576 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-05-29 14:30:00 +00:00
Henry Sudhof
98dadd5eb8 merge
git-svn-id: file:///svn/phpbb/trunk@8575 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-05-29 14:07:55 +00:00
Meik Sievertsen
8ce9e1b852 i am very sorry... i played a bit... :(
git-svn-id: file:///svn/phpbb/trunk@8573 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-05-29 12:28:07 +00:00
Meik Sievertsen
2f4a618900 ok... i hope i haven't messed too much with the code and everything is still working.
Changes:
- Ascraeus now uses constants for the phpbb root path and the php extension. This ensures more security for external applications and modifications (no more overwriting of root path and extension possible through insecure mods and register globals enabled) as well as no more globalizing needed.
- A second change implemented here is an additional short-hand-notation for append_sid(). It is allowed to omit the root path and extension now (for example calling append_sid('memberlist')) - in this case the root path and extension get added automatically. The hook is called after these are added.

git-svn-id: file:///svn/phpbb/trunk@8572 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-05-29 12:25:56 +00:00
Henry Sudhof
91b4fe1868 Merging mime and referer checks into the Trunk
git-svn-id: file:///svn/phpbb/trunk@8571 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-05-28 13:05:45 +00:00
Meik Sievertsen
28e8c3ea85 merge
git-svn-id: file:///svn/phpbb/trunk@8570 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-05-26 12:05:22 +00:00
Meik Sievertsen
0c1fa73423 git-svn-id: file:///svn/phpbb/trunk@8569 89ea8834-ac86-4346-8a33-228a782c2dd0 2008-05-26 12:03:22 +00:00
Meik Sievertsen
e7a043a22a ok... still merge needed... now the fix is spread. :/
git-svn-id: file:///svn/phpbb/trunk@8566 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-05-18 20:15:41 +00:00
Meik Sievertsen
53dc95d429 #26885
git-svn-id: file:///svn/phpbb/trunk@8564 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-05-18 20:02:14 +00:00
Meik Sievertsen
41d8c20836 merge fix for bug #27355
git-svn-id: file:///svn/phpbb/trunk@8562 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-05-18 18:58:42 +00:00
Meik Sievertsen
8dde998e87 merge the quick fix
git-svn-id: file:///svn/phpbb/trunk@8553 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-05-08 17:36:22 +00:00
Nils Adermann
9aac603888 :o don't allow access to that file for people who cannot add a comment
git-svn-id: file:///svn/phpbb/trunk@8551 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-05-05 00:17:12 +00:00
Nils Adermann
2cfc6b7e0b fixing access to const members in the normalizer and the normalizer test
git-svn-id: file:///svn/phpbb/trunk@8550 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-05-05 00:14:46 +00:00
Nils Adermann
6871e7caa4 - adding request_var tests
git-svn-id: file:///svn/phpbb/trunk@8549 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-05-04 22:54:16 +00:00
Nils Adermann
0d631c2ae0 Moving code sniffer stuff into subfolder so directory can be linked and doesn't require copying
git-svn-id: file:///svn/phpbb/trunk@8548 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-05-04 20:06:02 +00:00
Nils Adermann
1219ff4717 these files should have headers too
git-svn-id: file:///svn/phpbb/trunk@8547 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-05-04 15:41:51 +00:00
Nils Adermann
22f6e1ed1e - adding a test for utf8_clean_string()
git-svn-id: file:///svn/phpbb/trunk@8546 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-05-04 14:47:54 +00:00
Meik Sievertsen
eb664ddafb some missing merges...
git-svn-id: file:///svn/phpbb/trunk@8545 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-05-04 14:47:49 +00:00
Nils Adermann
771fd3696d adding a bbcode test suite
git-svn-id: file:///svn/phpbb/trunk@8541 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-05-04 12:54:47 +00:00
Nils Adermann
b1915b6f25 expectation goes first
git-svn-id: file:///svn/phpbb/trunk@8540 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-05-04 12:49:20 +00:00
Nils Adermann
378838499e Going further with our attempt to make phpBB more stable: Testing with PHPUnit
git-svn-id: file:///svn/phpbb/trunk@8539 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-05-04 12:04:08 +00:00
Henry Sudhof
60aad364c8 #26605
git-svn-id: file:///svn/phpbb/trunk@8537 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-05-02 16:39:30 +00:00
Henry Sudhof
52400baafa merge
git-svn-id: file:///svn/phpbb/trunk@8535 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-05-02 14:45:19 +00:00
Henry Sudhof
ebb801ebff merge
git-svn-id: file:///svn/phpbb/trunk@8534 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-05-02 14:44:41 +00:00
Meik Sievertsen
4b9077a58b merge
git-svn-id: file:///svn/phpbb/trunk@8532 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-04-30 15:56:02 +00:00
David M
5e7c936618 Some enhancements to the posting api, replaced the bitfield with two int fields... This represents what the new system could be...
git-svn-id: file:///svn/phpbb/trunk@8528 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-04-23 00:31:28 +00:00
Meik Sievertsen
c5dcff536a #22855
git-svn-id: file:///svn/phpbb/trunk@8527 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-04-22 14:13:12 +00:00
Meik Sievertsen
91d0c8b3bf merge again, revisions 8516 to 8525
git-svn-id: file:///svn/phpbb/trunk@8526 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-04-21 15:10:59 +00:00
Meik Sievertsen
f2ba40f294 merge
git-svn-id: file:///svn/phpbb/trunk@8515 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-04-21 10:55:47 +00:00
Meik Sievertsen
0cf75b2546 remove changelog for the time being and add changes.txt (only temporary for us to mark changes, else we forget them. :P)
git-svn-id: file:///svn/phpbb/trunk@8512 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-04-20 11:27:50 +00:00
Meik Sievertsen
5c2b9b17d1 merged #r8490
git-svn-id: file:///svn/phpbb/trunk@8504 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-04-11 14:22:59 +00:00
Meik Sievertsen
dbae1db24c merge some changes/fixes
henry: is your viewonline fix/change missing? ;)

git-svn-id: file:///svn/phpbb/trunk@8503 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-04-11 14:21:45 +00:00
Nils Adermann
82454165c3 merging r8489 into trunk
git-svn-id: file:///svn/phpbb/trunk@8490 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-04-03 14:06:57 +00:00
Marek A. R
4879a7a075 Some fixes
git-svn-id: file:///svn/phpbb/trunk@8488 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-04-02 21:46:47 +00:00
Meik Sievertsen
c5081a685e #s24575
git-svn-id: file:///svn/phpbb/trunk@8487 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-04-02 08:52:49 +00:00
David M
2deee69e2f Some neat stuff, the new DBAL function has the potential of removing somewhere in the ballpark of 40% of all the DBAL code. It combines a few very common idioms into one statement, allowing us to implicitly use prepared statements. Short term advantages are the ability to remove the gross code that attempts to work around DB2, Oracle and Firebird. Long term advantages include removing the burden of sanitizing data (at least on input) from our end and placing it on shoulders of the backend PHP driver.
Also included is a new posting API I am working on. It is not a real API in so much as it is a backend that a "nice" API could use. User submitted functions are welcome :) It represents a massive simplification in post and topic accounting and a generalization of concepts like "soft deletion" as it works across both topics and posts (yes, this has preliminary support for soft deletions). The only "interesting" problem left is global topics, this has yet to be solved.

Enough talk, time for sleep.

P.S.
Sorry if I broke stuff, was not done on purpose :)

git-svn-id: file:///svn/phpbb/trunk@8485 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-04-02 08:28:21 +00:00
Meik Sievertsen
3e42df098c merging some changes
git-svn-id: file:///svn/phpbb/trunk@8484 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-03-31 14:58:14 +00:00
Marek A. R
45c97a40d2 A little cleanup
git-svn-id: file:///svn/phpbb/trunk@8480 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-03-29 14:11:49 +00:00
Nils Adermann
b935389427 I mean it. Really. Go away.
git-svn-id: file:///svn/phpbb/trunk@8478 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-03-29 00:10:43 +00:00
Nils Adermann
195cd7e148 Go away evil carriage returns\!
git-svn-id: file:///svn/phpbb/trunk@8477 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-03-29 00:08:34 +00:00
Marek A. R
22c304092e It's here and it's awesome!
git-svn-id: file:///svn/phpbb/trunk@8476 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-03-28 22:59:53 +00:00
Henry Sudhof
7596a3bfdc #22385 - David told me to ci this
git-svn-id: file:///svn/phpbb/trunk@8473 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-03-26 17:32:05 +00:00
Nils Adermann
a3da99f358 new isset_post function and some better comments
git-svn-id: file:///svn/phpbb/trunk@8468 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-03-24 01:21:42 +00:00
Nils Adermann
6a30daeb59 not sure what the implications of this quick fix are, especially when upgrading from earlier versions we either have to use a different timezone depending on the server or fix timestamps on update, though shouldn't they be gmt already?
git-svn-id: file:///svn/phpbb/trunk@8467 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-03-24 01:04:27 +00:00
Nils Adermann
5417ec5c4d - add error_reporting to style.php (merge from r8464)
- let the error handler deal with E_STRICT (same as E_WARNING/E_NOTICE) and E_RECOVERABLE_ERROR (same as E_USER_ERROR)


git-svn-id: file:///svn/phpbb/trunk@8466 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-03-24 00:59:39 +00:00
Nils Adermann
65b0f6b165 add session_forum_id column to schema on trunk too
git-svn-id: file:///svn/phpbb/trunk@8465 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-03-24 00:53:17 +00:00
Nils Adermann
6c8a8163e8 - merging r8462 from 3.0 branch
git-svn-id: file:///svn/phpbb/trunk@8463 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-03-24 00:22:16 +00:00
Meik Sievertsen
312bd1a670 merging, revisions #r8453 and #r8454
git-svn-id: file:///svn/phpbb/trunk@8455 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-03-21 10:50:11 +00:00
Meik Sievertsen
02a5032a52 merging... again
git-svn-id: file:///svn/phpbb/trunk@8452 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-03-18 14:47:43 +00:00
Manuel Pichler
c34599126f - First PHP_CodeSniffer rule added that checks all files for a valid file doc
comment as specified in "1.ii. File Header" of the phpBB Coding Guidelines.

git-svn-id: file:///svn/phpbb/trunk@8435 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-03-15 01:01:15 +00:00
Manuel Pichler
9b96e12678 - Initial commit of an ant build file that helps to execute the test suite
for this code sniffer standard implementation. 
  


git-svn-id: file:///svn/phpbb/trunk@8434 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-03-14 20:21:03 +00:00
Nils Adermann
d1f48526d7 code sniffer directory
git-svn-id: file:///svn/phpbb/trunk@8433 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-03-14 20:08:44 +00:00
Meik Sievertsen
8c64d7c32a merging #r8426 to #r8430
git-svn-id: file:///svn/phpbb/trunk@8431 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-03-13 15:25:20 +00:00
Nils Adermann
f115ab68a5 Custom profile fields with date type should be timezone independend [Bug #15003]
git-svn-id: file:///svn/phpbb/trunk@8425 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-03-06 19:31:03 +00:00
Henry Sudhof
cf17b13c98 Problem migrating old cvs working copy to svn
git-svn-id: file:///svn/phpbb/trunk@8423 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-02-29 13:42:28 +00:00
Meik Sievertsen
da966fed65 #22355 and #22365
git-svn-id: file:///svn/phpbb/trunk@8421 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-02-28 19:57:52 +00:00
Vic D'Elfant
a765c1aba1 #22285
git-svn-id: file:///svn/phpbb/trunk@8416 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-02-28 07:39:57 +00:00
Henry Sudhof
f465cdd782 cross-ci
git-svn-id: file:///svn/phpbb/trunk@8415 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-02-27 15:51:23 +00:00
Henry Sudhof
05ba2058c6 git-svn-id: file:///svn/phpbb/trunk@8413 89ea8834-ac86-4346-8a33-228a782c2dd0 2008-02-27 15:29:35 +00:00
Henry Sudhof
2a3eb724a8 cross-ci
git-svn-id: file:///svn/phpbb/trunk@8411 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-02-27 15:21:23 +00:00
Nils Adermann
30b24d476c guess we need to initialise it first
git-svn-id: file:///svn/phpbb/trunk@8404 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-02-26 17:13:12 +00:00
Nils Adermann
f83b47bc11 allow search backends to handle regular updates too, and not just backend switches
git-svn-id: file:///svn/phpbb/trunk@8403 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-02-25 18:39:16 +00:00
Vic D'Elfant
42073ab0af This will prevent a php warning from being printed (and the layout getting ruined) in case of a conflicting permission restriction such as open_basedir
git-svn-id: file:///svn/phpbb/trunk@8401 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-02-25 13:07:41 +00:00
Vic D'Elfant
a800565393 #22035
git-svn-id: file:///svn/phpbb/trunk@8396 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-02-24 15:04:20 +00:00
Meik Sievertsen
0c5839a0b9 merge revisions #r8392 and #r8393
git-svn-id: file:///svn/phpbb/trunk@8394 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-02-23 15:32:34 +00:00
Meik Sievertsen
2cedbbac09 merge revisions #r8384, #r8387, #r8388, #r8389 and #r8390
git-svn-id: file:///svn/phpbb/trunk@8391 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-02-23 14:23:34 +00:00
Vic D'Elfant
6dc85449c1 - New set of smilies (they're all face-shaped now), provided by camm15h. Send all your love his way! ;)
- Set svn:ignore on cache/*.php

git-svn-id: file:///svn/phpbb/trunk@8386 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-02-21 13:14:24 +00:00
Henry Sudhof
95f11a38c0 Cross ci, converter not updated. (as 3.1 schema won't fit any more)
git-svn-id: file:///svn/phpbb/trunk@8383 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-02-14 12:38:06 +00:00
Henry Sudhof
65ba4fe94e cross-ci
git-svn-id: file:///svn/phpbb/trunk@8382 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-02-14 12:35:57 +00:00
Henry Sudhof
b33ec670a2 Minor stuff: #20925, #20815
git-svn-id: file:///svn/phpbb/trunk@8376 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-02-04 12:14:03 +00:00
Nils Adermann
3b669aedfd adding a new option to hide the entire list of subforums on listforums
git-svn-id: file:///svn/phpbb/trunk@8373 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-02-03 22:39:38 +00:00
David M
7b262babcd Alright, this should give some improved performance :)
This is the end of random seek access to rows. If you have a compelling reason as to why they should stay, contact me. Else, they are gone forevermore...

The following API calls are deprecated:
acm::sql_rowseek() -> no replacement
$db->sql_fetchfield($field, $rownum = false, $query_id = false) -> $db->sql_fetchfield($field, $query_id = false)

Initial tests show that phpBB3 over four percent of memory against phpBB3.1 on an empty board. So far so good :)

Other cool things: 
db2, MS SQL ODBC and MS SQL 2005 all use less memory because they do not need to reference the last executed query to handle random access seeks :)

P.S.
The crazy people using SVN: please report any issues with the new way we itterate through caches, I do not want to miss anything :)

git-svn-id: file:///svn/phpbb/trunk@8372 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-02-03 10:19:04 +00:00
Meik Sievertsen
e9e9e8e69c merge revisions: #r8359, #r8360, #r8368
git-svn-id: file:///svn/phpbb/trunk@8369 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-02-02 15:24:55 +00:00
Henry Sudhof
2e5e0a7868 Oh well
git-svn-id: file:///svn/phpbb/trunk@8365 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-02-01 15:17:04 +00:00
Henry Sudhof
9a4a3a089a cross-ci 8362; #15120, #16029
git-svn-id: file:///svn/phpbb/trunk@8363 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-02-01 13:15:50 +00:00
Meik Sievertsen
48ed77f046 Merging revisions #r8352, #r8353, #r8354 and #r8355
git-svn-id: file:///svn/phpbb/trunk@8356 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-01-30 21:48:49 +00:00
Meik Sievertsen
4b5fab372f merge with revision #r8350
git-svn-id: file:///svn/phpbb/trunk@8351 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-01-30 16:14:39 +00:00
Meik Sievertsen
1407460895 Merging revisions #r8346, #r8347 and #r8348
git-svn-id: file:///svn/phpbb/trunk@8349 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-01-29 15:57:56 +00:00
Meik Sievertsen
e970da6514 Merge revision #r8334
git-svn-id: file:///svn/phpbb/trunk@8345 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-01-29 14:35:29 +00:00
Meik Sievertsen
1819be3ed1 Merge revision #r8343
git-svn-id: file:///svn/phpbb/trunk@8344 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-01-29 14:33:53 +00:00
Henry Sudhof
9f5841219a nit rightfully picked
git-svn-id: file:///svn/phpbb/trunk@8341 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-01-28 15:23:14 +00:00
Henry Sudhof
e683deeeb8 merging #20255
git-svn-id: file:///svn/phpbb/trunk@8338 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-01-28 13:04:49 +00:00
Henry Sudhof
fedee2c07e cross-ci
git-svn-id: file:///svn/phpbb/trunk@8336 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-01-24 11:11:11 +00:00
Henry Sudhof
7fed5dd166 cross-checkin for the TRUNK
git-svn-id: file:///svn/phpbb/trunk@8333 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-01-23 14:32:15 +00:00
Marek A. R
e6991260df Fix parse errors
git-svn-id: file:///svn/phpbb/trunk@8331 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-01-22 22:15:30 +00:00
Nils Adermann
dbcf8a6f31 poor file being commited without reason
git-svn-id: file:///svn/phpbb/trunk@8330 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-01-22 19:38:55 +00:00
Marek A. R
835558ea38 Fix parse error
git-svn-id: file:///svn/phpbb/trunk@8329 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-01-22 19:38:05 +00:00
Nils Adermann
8608cea5c8 test commit on svn
git-svn-id: file:///svn/phpbb/trunk@8328 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-01-22 19:16:52 +00:00
David M
18a081bc6c oops
#19305


git-svn-id: file:///svn/phpbb/trunk@8325 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-01-14 05:52:11 +00:00
David M
5195509f3b #19285
git-svn-id: file:///svn/phpbb/trunk@8324 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-01-13 08:46:37 +00:00
David M
13ee383aad #19245
git-svn-id: file:///svn/phpbb/trunk@8323 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-01-13 07:49:51 +00:00
David M
9dcb557a5e I suppose I should fix this :P
git-svn-id: file:///svn/phpbb/trunk@8322 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-01-13 07:47:41 +00:00
David M
b9da54ba91 arg, the voices in my head won't let me focus :P
git-svn-id: file:///svn/phpbb/trunk@8321 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-01-11 06:25:28 +00:00
David M
24a359e9f5 db tools can now drop tables
git-svn-id: file:///svn/phpbb/trunk@8320 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-01-11 06:17:46 +00:00
David M
cbb4db46b2 - use proper OOP for db_tools
- made it all static. If one of you disagree, you are free to change it. I just couldn't think of a reason of having it otherwise...


git-svn-id: file:///svn/phpbb/trunk@8319 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-01-11 05:07:33 +00:00
David M
35f59ceb9a we enter a brave new world...
- fix schema data so that it can now be used
- replace the current system of packaging schemas with phpBB with a new system that dynamically generates the schemas on the fly
- give the db tools package the power to create databases


git-svn-id: file:///svn/phpbb/trunk@8318 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-01-10 21:46:46 +00:00
David M
b9b46a8b45 - phpBB now uses a less ancient version of Oracle
git-svn-id: file:///svn/phpbb/trunk@8317 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-01-09 00:21:29 +00:00
David M
7193d91e40 so close to that perfect commit, yet so very far...
git-svn-id: file:///svn/phpbb/trunk@8316 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-01-08 06:46:08 +00:00
David M
370e189f15 - make viewforum work again
- remove the lower case functions, they were stupid anyway
- added some indexes
- added a group_name_clean column


git-svn-id: file:///svn/phpbb/trunk@8315 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-01-08 06:44:05 +00:00
Meik Sievertsen
b4e64655af grr
git-svn-id: file:///svn/phpbb/trunk@8314 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-01-07 19:29:50 +00:00
David M
2928574ed4 - a few tiny clean ups
- a new MS SQL DBAL, it does not work so hot because of issues with the extension it depends on


git-svn-id: file:///svn/phpbb/trunk@8313 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-01-07 15:19:38 +00:00
Vic D'Elfant
159ce6f8d1 Fixed a problem caused by "-x-" variations of a translation, such as fr-x-strict and de-x-sie. We're now sending the main language code to the output so it will at least be a valid language code
git-svn-id: file:///svn/phpbb/trunk@8311 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-01-07 09:30:18 +00:00
Meik Sievertsen
5dddcb42ae - Do not split topic list for topics being promoted to announcements after been moved to another forum (Bug #18635)
- Allow editing usernames within database_update on username cleanup (Bug #18415)
- Fixing wrong sync() calls if moving all posts by a member in ACP (Bug #18385)
- Check entered imagemagick path for trailing slash (Bug #18205)
- Use proper title on index for new/unread posts (Bug #13101) - patch provided by Pyramide
- Allow calls to $user->set_cookie() define no cookie time for setting session cookies (Bug #18025)


git-svn-id: file:///svn/phpbb/trunk@8310 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-01-06 17:00:09 +00:00
David M
6dfa770986 I plan on getting a perfect commit one of these days... Today is not that day :P
git-svn-id: file:///svn/phpbb/trunk@8309 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-01-06 13:48:28 +00:00
David M
2f08a36062 - add DB2 support
/me takes a nap


git-svn-id: file:///svn/phpbb/trunk@8308 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-01-06 13:46:20 +00:00
David M
57645ad5bc the end of an era...
- MySQL < 4.1.3 support is removed
- renamed mysql4 to mysql, no need to cause confusion
- changed the cfg cacher, reduces file system lookups and include count by two on every page load


git-svn-id: file:///svn/phpbb/trunk@8307 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-01-06 02:21:44 +00:00
Meik Sievertsen
f0dea06097 Correctly check empty subjects/messages (Bug #17915)
Do not check usernames against word censor list. Disallowed usernames is already checked and word censor belong to posts. (Bug #17745)
Additionally include non-postable forums for moderators forums shown within the teams list. (Bug #17265)


git-svn-id: file:///svn/phpbb/trunk@8306 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-01-05 16:10:10 +00:00
Meik Sievertsen
a4633d8ac0 - version jump
- take empty topic_list into account as well as re-enabling for an empty get_forum_ids


git-svn-id: file:///svn/phpbb/trunk@8304 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-01-05 15:44:31 +00:00
David M
3b29db4545 oops
git-svn-id: file:///svn/phpbb/trunk@8303 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-01-04 19:54:24 +00:00
David M
f14f82775f ACMs? yep, ACMs...
- Added support for APC, eAccelerator, xcache and memcache systems


git-svn-id: file:///svn/phpbb/trunk@8302 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-01-04 18:56:42 +00:00
David M
af738dbc2a Ch-ch-ch-changes
- Made us more DB independent by making many queries capability based instead of DB specific
- Finished PHP5ifying of the acm_file class, now with some (hopefully) enhancements to its performance
- Sped up viewforum considerably (also goes towards mcp_forum)

I really hope I didn't explode CVS...


git-svn-id: file:///svn/phpbb/trunk@8301 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-01-04 18:35:49 +00:00
David M
edd6c34eda do this the proper way
git-svn-id: file:///svn/phpbb/trunk@8300 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-01-03 19:12:41 +00:00
David M
6b8f2fb4cc PHP, why do you break my heart?
git-svn-id: file:///svn/phpbb/trunk@8299 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-01-03 18:22:48 +00:00
David M
a7c29a06bf oops
git-svn-id: file:///svn/phpbb/trunk@8298 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-01-03 17:53:18 +00:00
David M
12d7c9b007 good bye old friend
git-svn-id: file:///svn/phpbb/trunk@8297 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-01-03 17:14:12 +00:00
David M
4b1b950068 uncomment the second one for ultra debugging power :P
git-svn-id: file:///svn/phpbb/trunk@8296 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-01-03 17:10:17 +00:00
David M
85055ac97f oh boy...
- Migrate code base to PHP 5.1+


git-svn-id: file:///svn/phpbb/trunk@8295 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-01-03 17:00:40 +00:00
Henry Sudhof
0f26ffbade cross-ci to the head
git-svn-id: file:///svn/phpbb/trunk@8294 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-01-03 14:37:34 +00:00
Meik Sievertsen
fe56349e34 #16695
#s17235


git-svn-id: file:///svn/phpbb/trunk@8290 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-12-27 17:34:05 +00:00
Meik Sievertsen
5eb46fb67e Ticket #16825
git-svn-id: file:///svn/phpbb/trunk@8289 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-12-27 16:36:24 +00:00
Meik Sievertsen
c3ef1109c0 Ticket #16945
git-svn-id: file:///svn/phpbb/trunk@8288 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-12-27 16:27:24 +00:00
Meik Sievertsen
bf2741ca80 Ticket #17705
git-svn-id: file:///svn/phpbb/trunk@8287 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-12-27 16:04:42 +00:00
Meik Sievertsen
253c07733e re-allow disabling of word censors (we somehow forgot to commit this, i really do not know why :/)
git-svn-id: file:///svn/phpbb/trunk@8286 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-12-26 15:33:06 +00:00
406 changed files with 21528 additions and 71885 deletions

View File

@@ -0,0 +1,210 @@
<?php
/**
*
* @package code_sniffer
* @version $Id: $
* @copyright (c) 2007 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
/**
* Checks that each source file contains the standard header.
*
* Based on Coding Guidelines 1.ii File Header.
*
* @package code_sniffer
* @author Manuel Pichler <mapi@phpundercontrol.org>
*/
class phpbb_Sniffs_Commenting_FileCommentSniff implements PHP_CodeSniffer_Sniff
{
/**
* Returns an array of tokens this test wants to listen for.
*
* @return array
*/
public function register()
{
return array(T_OPEN_TAG);
}
/**
* Processes this test, when one of its tokens is encountered.
*
* @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
* @param int $stackPtr The position of the current token
* in the stack passed in $tokens.
*
* @return void
*/
public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
{
// We are only interested in the first file comment.
if ($stackPtr !== 0)
{
if ($phpcsFile->findPrevious(T_OPEN_TAG, $stackPtr - 1) !== false)
{
return;
}
}
// Fetch next non whitespace token
$tokens = $phpcsFile->getTokens();
$start = $phpcsFile->findNext(T_WHITESPACE, $stackPtr + 1, null, true);
// Skip empty files
if ($tokens[$start]['code'] === T_CLOSE_TAG)
{
return;
}
// Mark as error if this is not a doc comment
else if ($start === false || $tokens[$start]['code'] !== T_DOC_COMMENT)
{
$phpcsFile->addError('Missing required file doc comment.', $stackPtr);
return;
}
// Find comment end token
$end = $phpcsFile->findNext(T_DOC_COMMENT, $start + 1, null, true) - 1;
// If there is no end, skip processing here
if ($end === false)
{
return;
}
// List of found comment tags
$tags = array();
// check comment lines without the first(/**) an last(*/) line
for ($i = $start + 1, $c = ($end - $start); $i <= $c; ++$i)
{
$line = $tokens[$i]['content'];
// Check that each line starts with a '*'
if (substr($line, 0, 1) !== '*')
{
$message = 'The file doc comment should not be idented.';
$phpcsFile->addWarning($message, $i);
}
else if (preg_match('/^\*\s+@([\w]+)\s+(.*)$/', $line, $match) !== 0)
{
$tags[$match[1]] = array($match[2], $i);
}
}
// Check that the first and last line is empty
if (trim($tokens[$start + 1]['content']) !== '*')
{
$message = 'The first file comment line should be empty.';
$phpcsFile->addWarning($message, ($start + 1));
}
if (trim($tokens[$end - $start]['content']) !== '*')
{
$message = 'The last file comment line should be empty.';
$phpcsFile->addWarning($message, ($end - $start));
}
$this->processPackage($phpcsFile, $start, $tags);
$this->processVersion($phpcsFile, $start, $tags);
$this->processCopyright($phpcsFile, $start, $tags);
$this->processLicense($phpcsFile, $start, $tags);
//print_r($tags);
}
/**
* Checks that the tags array contains a valid package tag
*
* @param PHP_CodeSniffer_File $phpcsFile The context source file instance.
* @param integer The stack pointer for the first comment token.
* @param array(string=>array) $tags The found file doc comment tags.
*
* @return void
*/
protected function processPackage(PHP_CodeSniffer_File $phpcsFile, $ptr, $tags)
{
if (!isset($tags['package']))
{
$message = 'Missing require @package tag in file doc comment.';
$phpcsFile->addError($message, $ptr);
}
else if (preg_match('/^([\w]+)$/', $tags['package'][0]) === 0)
{
$message = 'Invalid content found for @package tag.';
$phpcsFile->addWarning($message, $tags['package'][1]);
}
}
/**
* Checks that the tags array contains a valid version tag
*
* @param PHP_CodeSniffer_File $phpcsFile The context source file instance.
* @param integer The stack pointer for the first comment token.
* @param array(string=>array) $tags The found file doc comment tags.
*
* @return void
*/
protected function processVersion(PHP_CodeSniffer_File $phpcsFile, $ptr, $tags)
{
if (!isset($tags['version']))
{
$message = 'Missing require @version tag in file doc comment.';
$phpcsFile->addError($message, $ptr);
}
else if (preg_match('/^\$Id:[^\$]+\$$/', $tags['version'][0]) === 0)
{
$message = 'Invalid content found for @version tag, use "$Id: $".';
$phpcsFile->addError($message, $tags['version'][1]);
}
}
/**
* Checks that the tags array contains a valid copyright tag
*
* @param PHP_CodeSniffer_File $phpcsFile The context source file instance.
* @param integer The stack pointer for the first comment token.
* @param array(string=>array) $tags The found file doc comment tags.
*
* @return void
*/
protected function processCopyright(PHP_CodeSniffer_File $phpcsFile, $ptr, $tags)
{
if (!isset($tags['copyright']))
{
$message = 'Missing require @copyright tag in file doc comment.';
$phpcsFile->addError($message, $ptr);
}
else if (preg_match('/^\(c\) 2[0-9]{3} phpBB Group\s*$/', $tags['copyright'][0]) === 0)
{
$message = 'Invalid content found for @copyright tag, use "(c) <year> phpBB Group".';
$phpcsFile->addError($message, $tags['copyright'][1]);
}
}
/**
* Checks that the tags array contains a valid license tag
*
* @param PHP_CodeSniffer_File $phpcsFile The context source file instance.
* @param integer The stack pointer for the first comment token.
* @param array(string=>array) $tags The found file doc comment tags.
*
* @return void
*/
protected function processLicense(PHP_CodeSniffer_File $phpcsFile, $ptr, $tags)
{
$license = 'http://opensource.org/licenses/gpl-license.php GNU Public License';
if (!isset($tags['license']))
{
$message = 'Missing require @license tag in file doc comment.';
$phpcsFile->addError($message, $ptr);
}
else if (trim($tags['license'][0]) !== $license)
{
$message = 'Invalid content found for @license tag, use '
. '"' . $license . '".';
$phpcsFile->addError($message, $tags['license'][1]);
}
}
}

View File

@@ -0,0 +1,19 @@
<?php
/**
*
* @package code_sniffer³
* @version $Id: $
* @copyright (c) 2008 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php BSD License
*
*/
?>
<?php
/**
* Broken but not first file doc comment.
*
* @version @package_version@
* @license http://www.opensource.org/licenses/bsd-license.php BSD License
* @copyright (c) 2007 phpBB Group
*
*/

View File

@@ -0,0 +1,51 @@
<?php
/**
*
* @package code_sniffer
* @version $Id: $
* @copyright (c) 2007 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
/**
* Unit test class for the EmptyStatement sniff.
*
* @package code_sniffer
* @author Manuel Pichler <mapi@phpundercontrol.org>
*/
class phpbb_Tests_Commenting_FileCommentUnitTest extends AbstractSniffUnitTest
{
/**
* Returns the lines where errors should occur.
*
* The key of the array should represent the line number and the value
* should represent the number of errors that should occur on that line.
*
* @return array(int => int)
*/
public function getErrorList()
{
return array(
7 => 1 // BSD License error :)
);
}//end getErrorList()
/**
* Returns the lines where warnings should occur.
*
* The key of the array should represent the line number and the value
* should represent the number of warnings that should occur on that line.
*
* @return array(int => int)
*/
public function getWarningList()
{
return array(
4 => 1,
8 => 1
);
}//end getWarningList()
}

View File

@@ -0,0 +1,65 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="code_sniffer" basedir="." default="phpunit">
<property name="cvs.module" value="pear/PHP_CodeSniffer" />
<property name="working.dir" value="${basedir}/_work/code" />
<property name="test.coverage" value="${basedir}/_work/coverage" />
<target name="phpunit" depends="update,prepare">
<exec executable="phpunit">
<arg line="--coverage-html ${test.coverage}
PHP_CodeSniffer_AllTests
${working.dir}/${cvs.module}/tests/AllTests.php" />
</exec>
</target>
<target name="prepare">
<delete dir="${working.dir}/${cvs.module}/CodeSniffer/Standards/phpbb" />
<mkdir dir="${working.dir}/${cvs.module}/CodeSniffer/Standards/phpbb"/>
<copy todir="${working.dir}/${cvs.module}/CodeSniffer/Standards/phpbb/Sniffs">
<fileset dir="${basedir}/Sniffs" />
</copy>
<copy todir="${working.dir}/${cvs.module}/CodeSniffer/Standards/phpbb/Tests">
<fileset dir="${basedir}/Tests" />
</copy>
<copy todir="${working.dir}/${cvs.module}/CodeSniffer/Standards/phpbb">
<fileset file="${basedir}/phpbbCodingStandard.php" />
</copy>
</target>
<target name="cleanup">
<delete dir="${working.dir}" />
</target>
<target name="update">
<exec executable="cvs" dir="${working.dir}/${cvs.module}">
<arg line="up" />
</exec>
</target>
<target name="checkout" depends="cleanup">
<cvspass cvsroot=":pserver:cvsread@cvs.php.net:/repository" password="phpfi" />
<cvs cvsRoot=":pserver:cvsread@cvs.php.net:/repository"
package="${cvs.module}"
dest="${working.dir}" />
</target>
<!--
Installs the sniffs on my local development machine
-->
<target name="install">
<delete dir="/usr/local/pear/PEAR/PHP/CodeSniffer/Standards/phpbb" />
<mkdir dir="/usr/local/pear/PEAR/PHP/CodeSniffer/Standards/phpbb" />
<copy todir="/usr/local/pear/PEAR/PHP/CodeSniffer/Standards/phpbb">
<fileset file="${basedir}/phpbbCodingStandard.php" />
</copy>
<copy todir="/usr/local/pear/PEAR/PHP/CodeSniffer/Standards/phpbb/Sniffs">
<fileset dir="${basedir}/Sniffs" />
</copy>
</target>
</project>

View File

@@ -0,0 +1,43 @@
<?php
/**
*
* @package code_sniffer
* @version $Id: $
* @copyright (c) 2007 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
/**
* @ignore
*/
if (class_exists('PHP_CodeSniffer_Standards_CodingStandard', true) === false) {
throw new PHP_CodeSniffer_Exception(
'Class PHP_CodeSniffer_Standards_CodingStandard not found'
);
}
/**
* Primary class for the phpbb coding standard.
*
* @package code_sniffer
*/
class PHP_CodeSniffer_Standards_phpbb_phpbbCodingStandard extends PHP_CodeSniffer_Standards_CodingStandard
{
/**
* Return a list of external sniffs to include with this standard.
*
* External locations can be single sniffs, a whole directory of sniffs, or
* an entire coding standard. Locations start with the standard name. For
* example:
* PEAR => include all sniffs in this standard
* PEAR/Sniffs/Files => include all sniffs in this dir
* PEAR/Sniffs/Files/LineLengthSniff => include this single sniff
*
* @return array
*/
public function getIncludedSniffs()
{
return array();
}
}

0
phpBB/adm/images/progress_bar.gif Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@@ -15,11 +15,13 @@ define('ADMIN_START', true);
define('NEED_SID', true);
// Include files
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './../';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
require($phpbb_root_path . 'common.' . $phpEx);
require($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
require($phpbb_root_path . 'includes/functions_module.' . $phpEx);
if (!defined('PHPBB_ROOT_PATH')) define('PHPBB_ROOT_PATH', './../');
if (!defined('PHP_EXT')) define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
if (!defined('PHPBB_ADMIN_PATH')) define('PHPBB_ADMIN_PATH', './');
include(PHPBB_ROOT_PATH . 'common.' . PHP_EXT);
require(PHPBB_ROOT_PATH . 'includes/functions_admin.' . PHP_EXT);
require(PHPBB_ROOT_PATH . 'includes/functions_module.' . PHP_EXT);
// Start session management
$user->session_begin();
@@ -28,10 +30,14 @@ $user->setup('acp/common');
// End session management
// Have they authenticated (again) as an admin for this session?
if (!isset($user->data['session_admin']) || !$user->data['session_admin'])
if ($user->data['user_id'] != ANONYMOUS && (!isset($user->data['session_admin']) || !$user->data['session_admin']))
{
login_box('', $user->lang['LOGIN_ADMIN_CONFIRM'], $user->lang['LOGIN_ADMIN_SUCCESS'], true, false);
}
else if ($user->data['user_id'] == ANONYMOUS)
{
login_box('');
}
// Is user any type of admin? No, then stop here, each script needs to
// check specific permissions but this is a catchall
@@ -42,20 +48,16 @@ if (!$auth->acl_get('a_'))
// We define the admin variables now, because the user is now able to use the admin related features...
define('IN_ADMIN', true);
$phpbb_admin_path = (defined('PHPBB_ADMIN_PATH')) ? PHPBB_ADMIN_PATH : './';
// Some oft used variables
$safe_mode = (@ini_get('safe_mode') || @strtolower(ini_get('safe_mode')) == 'on') ? true : false;
$file_uploads = (@ini_get('file_uploads') || strtolower(@ini_get('file_uploads')) == 'on') ? true : false;
$safe_mode = (@ini_get('safe_mode') == '1' || strtolower(@ini_get('safe_mode')) === 'on') ? true : false;
$file_uploads = (@ini_get('file_uploads') == '1' || strtolower(@ini_get('file_uploads')) === 'on') ? true : false;
$module_id = request_var('i', '');
$mode = request_var('mode', '');
// Set custom template for admin area
$template->set_custom_template($phpbb_admin_path . 'style', 'admin');
$template->assign_var('T_TEMPLATE_PATH', $phpbb_admin_path . 'style');
// the acp template is never stored in the database
$user->theme['template_storedb'] = false;
$template->set_custom_template(PHPBB_ADMIN_PATH . 'style', 'admin');
$template->assign_var('T_TEMPLATE_PATH', PHPBB_ADMIN_PATH . 'style');
// Instantiate new module
$module = new p_master();
@@ -68,7 +70,7 @@ $module->set_active($module_id, $mode);
// Assign data to the template engine for the list of modules
// We do this before loading the active module for correct menu display in trigger_error
$module->assign_tpl_vars(append_sid("{$phpbb_admin_path}index.$phpEx"));
$module->assign_tpl_vars(append_sid(PHPBB_ADMIN_PATH . 'index.' . PHP_EXT));
// Load and execute the relevant module
$module->load_active();
@@ -88,7 +90,7 @@ adm_page_footer();
function adm_page_header($page_title)
{
global $config, $db, $user, $template;
global $phpbb_root_path, $phpbb_admin_path, $phpEx, $SID, $_SID;
global $SID, $_SID;
if (defined('HEADER_INC'))
{
@@ -108,35 +110,39 @@ function adm_page_header($page_title)
$template->assign_vars(array(
'PAGE_TITLE' => $page_title,
'USERNAME' => $user->data['username'],
'USERNAME' => ($user->data['user_id'] != ANONYMOUS) ? $user->data['username'] : '',
'SID' => $SID,
'_SID' => $_SID,
'SESSION_ID' => $user->session_id,
'ROOT_PATH' => $phpbb_admin_path,
'ROOT_PATH' => PHPBB_ADMIN_PATH,
'U_LOGOUT' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=logout'),
'U_ADM_INDEX' => append_sid("{$phpbb_admin_path}index.$phpEx"),
'U_INDEX' => append_sid("{$phpbb_root_path}index.$phpEx"),
'U_LOGOUT' => append_sid('ucp', 'mode=logout'),
'U_ADM_LOGOUT' => append_sid(PHPBB_ADMIN_PATH . 'index.' . PHP_EXT, 'action=admlogout'),
'U_ADM_INDEX' => append_sid(PHPBB_ADMIN_PATH . 'index.' . PHP_EXT),
'U_INDEX' => append_sid('index'),
'T_IMAGES_PATH' => "{$phpbb_root_path}images/",
'T_SMILIES_PATH' => "{$phpbb_root_path}{$config['smilies_path']}/",
'T_AVATAR_PATH' => "{$phpbb_root_path}{$config['avatar_path']}/",
'T_AVATAR_GALLERY_PATH' => "{$phpbb_root_path}{$config['avatar_gallery_path']}/",
'T_ICONS_PATH' => "{$phpbb_root_path}{$config['icons_path']}/",
'T_RANKS_PATH' => "{$phpbb_root_path}{$config['ranks_path']}/",
'T_UPLOAD_PATH' => "{$phpbb_root_path}{$config['upload_path']}/",
'S_USER_ADMIN' => $user->data['session_admin'],
'S_USER_LOGGED_IN' => ($user->data['user_id'] != ANONYMOUS && !$user->data['is_bot']),
'ICON_MOVE_UP' => '<img src="' . $phpbb_admin_path . 'images/icon_up.gif" alt="' . $user->lang['MOVE_UP'] . '" title="' . $user->lang['MOVE_UP'] . '" />',
'ICON_MOVE_UP_DISABLED' => '<img src="' . $phpbb_admin_path . 'images/icon_up_disabled.gif" alt="' . $user->lang['MOVE_UP'] . '" title="' . $user->lang['MOVE_UP'] . '" />',
'ICON_MOVE_DOWN' => '<img src="' . $phpbb_admin_path . 'images/icon_down.gif" alt="' . $user->lang['MOVE_DOWN'] . '" title="' . $user->lang['MOVE_DOWN'] . '" />',
'ICON_MOVE_DOWN_DISABLED' => '<img src="' . $phpbb_admin_path . 'images/icon_down_disabled.gif" alt="' . $user->lang['MOVE_DOWN'] . '" title="' . $user->lang['MOVE_DOWN'] . '" />',
'ICON_EDIT' => '<img src="' . $phpbb_admin_path . 'images/icon_edit.gif" alt="' . $user->lang['EDIT'] . '" title="' . $user->lang['EDIT'] . '" />',
'ICON_EDIT_DISABLED' => '<img src="' . $phpbb_admin_path . 'images/icon_edit_disabled.gif" alt="' . $user->lang['EDIT'] . '" title="' . $user->lang['EDIT'] . '" />',
'ICON_DELETE' => '<img src="' . $phpbb_admin_path . 'images/icon_delete.gif" alt="' . $user->lang['DELETE'] . '" title="' . $user->lang['DELETE'] . '" />',
'ICON_DELETE_DISABLED' => '<img src="' . $phpbb_admin_path . 'images/icon_delete_disabled.gif" alt="' . $user->lang['DELETE'] . '" title="' . $user->lang['DELETE'] . '" />',
'ICON_SYNC' => '<img src="' . $phpbb_admin_path . 'images/icon_sync.gif" alt="' . $user->lang['RESYNC'] . '" title="' . $user->lang['RESYNC'] . '" />',
'ICON_SYNC_DISABLED' => '<img src="' . $phpbb_admin_path . 'images/icon_sync_disabled.gif" alt="' . $user->lang['RESYNC'] . '" title="' . $user->lang['RESYNC'] . '" />',
'T_IMAGES_PATH' => PHPBB_ROOT_PATH . 'images/',
'T_SMILIES_PATH' => PHPBB_ROOT_PATH . $config['smilies_path'] . '/',
'T_AVATAR_PATH' => PHPBB_ROOT_PATH . $config['avatar_path'] . '/',
'T_AVATAR_GALLERY_PATH' => PHPBB_ROOT_PATH . $config['avatar_gallery_path'] . '/',
'T_ICONS_PATH' => PHPBB_ROOT_PATH . $config['icons_path'] . '/',
'T_RANKS_PATH' => PHPBB_ROOT_PATH . $config['ranks_path'] . '/',
'T_UPLOAD_PATH' => PHPBB_ROOT_PATH . $config['upload_path'] . '/',
'ICON_MOVE_UP' => '<img src="' . PHPBB_ADMIN_PATH . 'images/icon_up.gif" alt="' . $user->lang['MOVE_UP'] . '" title="' . $user->lang['MOVE_UP'] . '" />',
'ICON_MOVE_UP_DISABLED' => '<img src="' . PHPBB_ADMIN_PATH . 'images/icon_up_disabled.gif" alt="' . $user->lang['MOVE_UP'] . '" title="' . $user->lang['MOVE_UP'] . '" />',
'ICON_MOVE_DOWN' => '<img src="' . PHPBB_ADMIN_PATH . 'images/icon_down.gif" alt="' . $user->lang['MOVE_DOWN'] . '" title="' . $user->lang['MOVE_DOWN'] . '" />',
'ICON_MOVE_DOWN_DISABLED' => '<img src="' . PHPBB_ADMIN_PATH . 'images/icon_down_disabled.gif" alt="' . $user->lang['MOVE_DOWN'] . '" title="' . $user->lang['MOVE_DOWN'] . '" />',
'ICON_EDIT' => '<img src="' . PHPBB_ADMIN_PATH . 'images/icon_edit.gif" alt="' . $user->lang['EDIT'] . '" title="' . $user->lang['EDIT'] . '" />',
'ICON_EDIT_DISABLED' => '<img src="' . PHPBB_ADMIN_PATH . 'images/icon_edit_disabled.gif" alt="' . $user->lang['EDIT'] . '" title="' . $user->lang['EDIT'] . '" />',
'ICON_DELETE' => '<img src="' . PHPBB_ADMIN_PATH . 'images/icon_delete.gif" alt="' . $user->lang['DELETE'] . '" title="' . $user->lang['DELETE'] . '" />',
'ICON_DELETE_DISABLED' => '<img src="' . PHPBB_ADMIN_PATH . 'images/icon_delete_disabled.gif" alt="' . $user->lang['DELETE'] . '" title="' . $user->lang['DELETE'] . '" />',
'ICON_SYNC' => '<img src="' . PHPBB_ADMIN_PATH . 'images/icon_sync.gif" alt="' . $user->lang['RESYNC'] . '" title="' . $user->lang['RESYNC'] . '" />',
'ICON_SYNC_DISABLED' => '<img src="' . PHPBB_ADMIN_PATH . 'images/icon_sync_disabled.gif" alt="' . $user->lang['RESYNC'] . '" title="' . $user->lang['RESYNC'] . '" />',
'S_USER_LANG' => $user->lang['USER_LANG'],
'S_CONTENT_DIRECTION' => $user->lang['DIRECTION'],
@@ -161,7 +167,7 @@ function adm_page_header($page_title)
function adm_page_footer($copyright_html = true)
{
global $db, $config, $template, $user, $auth, $cache;
global $starttime, $phpbb_root_path, $phpbb_admin_path, $phpEx;
global $starttime;
// Output page creation time
if (defined('DEBUG'))
@@ -169,7 +175,7 @@ function adm_page_footer($copyright_html = true)
$mtime = explode(' ', microtime());
$totaltime = $mtime[0] + $mtime[1] - $starttime;
if (!empty($_REQUEST['explain']) && $auth->acl_get('a_') && defined('DEBUG_EXTRA') && method_exists($db, 'sql_report'))
if (request::variable('explain', false) && $auth->acl_get('a_') && defined('DEBUG_EXTRA') && method_exists($db, 'sql_report'))
{
$db->sql_report('display');
}
@@ -184,7 +190,7 @@ function adm_page_footer($copyright_html = true)
{
global $base_memory_usage;
$memory_usage -= $base_memory_usage;
$memory_usage = ($memory_usage >= 1048576) ? round((round($memory_usage / 1048576 * 100) / 100), 2) . ' ' . $user->lang['MB'] : (($memory_usage >= 1024) ? round((round($memory_usage / 1024 * 100) / 100), 2) . ' ' . $user->lang['KB'] : $memory_usage . ' ' . $user->lang['BYTES']);
$memory_usage = get_formatted_filesize($memory_usage);
$debug_output .= ' | Memory Usage: ' . $memory_usage;
}
@@ -367,33 +373,65 @@ function build_cfg_template($tpl_type, $key, &$new, $config_key, $vars)
}
/**
* Going through a config array and validate values, writing errors to $error.
* Going through a config array and validate values, writing errors to $error. The validation method accepts parameters separated by ':' for string and int.
* The first parameter defines the type to be used, the second the lower bound and the third the upper bound. Only the type is required.
*/
function validate_config_vars($config_vars, &$cfg_array, &$error)
{
global $phpbb_root_path, $user;
global $user;
$type = 0;
$min = 1;
$max = 2;
foreach ($config_vars as $config_name => $config_definition)
{
if (!isset($cfg_array[$config_name]) || strpos($config_name, 'legend') !== false)
{
continue;
}
if (!isset($config_definition['validate']))
{
continue;
}
$validator = explode(':', $config_definition['validate']);
// Validate a bit. ;) String is already checked through request_var(), therefore we do not check this again
switch ($config_definition['validate'])
// Validate a bit. ;) (0 = type, 1 = min, 2= max)
switch ($validator[$type])
{
case 'string':
$length = strlen($cfg_array[$config_name]);
// the column is a VARCHAR
$validator[$max] = (isset($validator[$max])) ? min(255, $validator[$max]) : 255;
if (isset($validator[$min]) && $length < $validator[$min])
{
$error[] = sprintf($user->lang['SETTING_TOO_SHORT'], $user->lang[$config_definition['lang']], $validator[$min]);
}
else if (isset($validator[$max]) && $length > $validator[2])
{
$error[] = sprintf($user->lang['SETTING_TOO_LONG'], $user->lang[$config_definition['lang']], $validator[$max]);
}
break;
case 'bool':
$cfg_array[$config_name] = ($cfg_array[$config_name]) ? 1 : 0;
break;
case 'int':
$cfg_array[$config_name] = (int) $cfg_array[$config_name];
if (isset($validator[$min]) && $cfg_array[$config_name] < $validator[$min])
{
$error[] = sprintf($user->lang['SETTING_TOO_LOW'], $user->lang[$config_definition['lang']], $validator[$min]);
}
else if (isset($validator[$max]) && $cfg_array[$config_name] > $validator[$max])
{
$error[] = sprintf($user->lang['SETTING_TOO_BIG'], $user->lang[$config_definition['lang']], $validator[$max]);
}
break;
// Absolute path
@@ -434,13 +472,13 @@ function validate_config_vars($config_vars, &$cfg_array, &$error)
$cfg_array[$config_name] = basename($cfg_array[$config_name]);
if (!file_exists($phpbb_root_path . 'language/' . $cfg_array[$config_name] . '/'))
if (!file_exists(PHPBB_ROOT_PATH . 'language/' . $cfg_array[$config_name] . '/'))
{
$error[] = $user->lang['WRONG_DATA_LANG'];
}
break;
// Relative path (appended $phpbb_root_path)
// Relative path (appended PHPBB_ROOT_PATH)
case 'rpath':
case 'rwpath':
if (!$cfg_array[$config_name])
@@ -482,12 +520,12 @@ function validate_config_vars($config_vars, &$cfg_array, &$error)
break;
}
if (!file_exists($phpbb_root_path . $cfg_array[$config_name]))
if (!file_exists(PHPBB_ROOT_PATH . $cfg_array[$config_name]))
{
$error[] = sprintf($user->lang['DIRECTORY_DOES_NOT_EXIST'], $cfg_array[$config_name]);
}
if (file_exists($phpbb_root_path . $cfg_array[$config_name]) && !is_dir($phpbb_root_path . $cfg_array[$config_name]))
if (file_exists(PHPBB_ROOT_PATH . $cfg_array[$config_name]) && !is_dir(PHPBB_ROOT_PATH . $cfg_array[$config_name]))
{
$error[] = sprintf($user->lang['DIRECTORY_NOT_DIR'], $cfg_array[$config_name]);
}
@@ -495,7 +533,7 @@ function validate_config_vars($config_vars, &$cfg_array, &$error)
// Check if the path is writable
if ($config_definition['validate'] == 'wpath' || $config_definition['validate'] == 'rwpath')
{
if (file_exists($phpbb_root_path . $cfg_array[$config_name]) && !@is_writable($phpbb_root_path . $cfg_array[$config_name]))
if (file_exists(PHPBB_ROOT_PATH . $cfg_array[$config_name]) && !@is_writable(PHPBB_ROOT_PATH . $cfg_array[$config_name]))
{
$error[] = sprintf($user->lang['DIRECTORY_NOT_WRITABLE'], $cfg_array[$config_name]);
}
@@ -508,4 +546,62 @@ function validate_config_vars($config_vars, &$cfg_array, &$error)
return;
}
/**
* Checks whatever or not a variable is OK for use in the Database
* param mixed $value_ary An array of the form array(array('lang' => ..., 'value' => ..., 'column_type' =>))'
* param mixed $error The error array
*/
function validate_range($value_ary, &$error)
{
global $user;
$column_types = array(
'BOOL' => array('php_type' => 'int', 'min' => 0, 'max' => 1),
'USINT' => array('php_type' => 'int', 'min' => 0, 'max' => 65535),
'UINT' => array('php_type' => 'int', 'min' => 0, 'max' => (int) 0x7fffffff),
'INT' => array('php_type' => 'int', 'min' => (int) 0x80000000, 'max' => (int) 0x7fffffff),
'TINT' => array('php_type' => 'int', 'min' => -128, 'max' => 127),
'VCHAR' => array('php_type' => 'string', 'min' => 0, 'max' => 255),
);
foreach ($value_ary as $value)
{
$column = explode(':', $value['column_type']);
$max = $min = 0;
$type = 0;
if (!isset($column_types[$column[0]]))
{
continue;
}
else
{
$type = $column_types[$column[0]];
}
switch ($type['php_type'])
{
case 'string' :
$max = (isset($column[1])) ? min($column[1],$type['max']) : $type['max'];
if (strlen($value['value']) > $max)
{
$error[] = sprintf($user->lang['SETTING_TOO_LONG'], $user->lang[$value['lang']], $max);
}
break;
case 'int':
$min = (isset($column[1])) ? max($column[1],$type['min']) : $type['min'];
$max = (isset($column[2])) ? min($column[2],$type['max']) : $type['max'];
if ($value['value'] < $min)
{
$error[] = sprintf($user->lang['SETTING_TOO_LOW'], $user->lang[$value['lang']], $min);
}
else if ($value['value'] > $max)
{
$error[] = sprintf($user->lang['SETTING_TOO_BIG'], $user->lang[$value['lang']], $max);
}
break;
}
}
}
?>

View File

@@ -122,11 +122,11 @@
{
if (newimage == 'no_image')
{
document.image_upload_icon.src = "{PHPBB_ROOT_PATH}images/spacer.gif";
document.getElementById('image_upload_icon').src = "{PHPBB_ROOT_PATH}images/spacer.gif";
}
else
{
document.image_upload_icon.src = "{PHPBB_ROOT_PATH}{IMG_PATH}/" + newimage;
document.getElementById('image_upload_icon').src = "{PHPBB_ROOT_PATH}{IMG_PATH}/" + newimage;
}
}
@@ -192,7 +192,7 @@
<dd><select name="upload_icon" id="upload_icon" onchange="update_image(this.options[selectedIndex].value);">
<option value="no_image"<!-- IF S_NO_IMAGE --> selected="selected"<!-- ENDIF -->>{L_NO_IMAGE}</option>{S_FILENAME_LIST}
</select></dd>
<dd>&nbsp;<img <!-- IF S_NO_IMAGE -->src="{PHPBB_ROOT_PATH}images/spacer.gif"<!-- ELSE -->src="{UPLOAD_ICON_SRC}"<!-- ENDIF --> name="image_upload_icon" alt="" title="" />&nbsp;</dd>
<dd>&nbsp;<img <!-- IF S_NO_IMAGE -->src="{PHPBB_ROOT_PATH}images/spacer.gif"<!-- ELSE -->src="{UPLOAD_ICON_SRC}"<!-- ENDIF --> id="image_upload_icon" alt="" title="" />&nbsp;</dd>
</dl>
<dl>
<dt><label for="extgroup_filesize">{L_MAX_EXTGROUP_FILESIZE}:</label></dt>

View File

@@ -97,11 +97,11 @@
</dl>
<dl>
<dt><label for="unbanreason">{L_BAN_REASON}:</label></dt>
<dd><input style="border: 0;" type="text" class="text full" disabled="disabled" name="unbanreason" id="unbanreason" /></dd>
<dd><textarea style="border: 0;" class="text full" disabled="disabled" name="unbanreason" id="unbanreason" rows="5" cols="80">&nbsp;</textarea></dd>
</dl>
<dl>
<dt><label for="unbangivereason">{L_BAN_GIVE_REASON}:</label></dt>
<dd><input style="border: 0;" type="text" class="text full" disabled="disabled" name="unbangivereason" id="unbangivereason" /></dd>
<dd><textarea style="border: 0;" class="text full" disabled="disabled" name="unbangivereason" id="unbangivereason" rows="5" cols="80">&nbsp;</textarea></dd>
</dl>
<p class="submit-buttons">

View File

@@ -103,6 +103,10 @@
<td style="text-align: center;">{bbcodes.BBCODE_TAG}</td>
<td style="text-align: right; width: 40px;"><a href="{bbcodes.U_EDIT}">{ICON_EDIT}</a> <a href="{bbcodes.U_DELETE}">{ICON_DELETE}</a></td>
</tr>
<!-- BEGINELSE -->
<tr class="row3">
<td colspan="2">{L_ACP_NO_ITEMS}</td>
</tr>
<!-- END bbcodes -->
</tbody>
</table>

View File

@@ -22,47 +22,34 @@
<dd><label><input type="radio" class="radio" id="enable_post_confirm" name="enable_post_confirm" value="1"<!-- IF POST_ENABLE --> checked="checked"<!-- ENDIF --> /> {L_ENABLED}</label>
<label><input type="radio" class="radio" name="enable_post_confirm" value="0"<!-- IF not POST_ENABLE --> checked="checked"<!-- ENDIF --> /> {L_DISABLED}</label></dd>
</dl>
<!-- IF GD -->
<dl>
<dt><label for="captcha_gd">{L_CAPTCHA_GD}:</label><br /><span>{L_CAPTCHA_GD_EXPLAIN}</span></dt>
<dd><label><input id="captcha_gd" name="captcha_gd" value="1" class="radio" type="radio"<!-- IF CAPTCHA_GD --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input name="captcha_gd" value="0" class="radio" type="radio"<!-- IF not CAPTCHA_GD --> checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl>
<dl>
<dt><label for="captcha_gd_foreground_noise">{L_CAPTCHA_GD_FOREGROUND_NOISE}:</label><br /><span>{L_CAPTCHA_GD_FOREGROUND_NOISE_EXPLAIN}</span></dt>
<dd><label><input id="captcha_gd_foreground_noise" name="captcha_gd_foreground_noise" value="1" class="radio" type="radio"<!-- IF CAPTCHA_GD_FOREGROUND_NOISE --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input name="captcha_gd_foreground_noise" value="0" class="radio" type="radio"<!-- IF not CAPTCHA_GD_FOREGROUND_NOISE --> checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl>
<dl>
<dt><label for="captcha_gd_x_grid">{L_CAPTCHA_GD_X_GRID}:</label><br /><span>{L_CAPTCHA_GD_X_GRID_EXPLAIN}</span></dt>
<dd><input id="captcha_gd_x_grid" name="captcha_gd_x_grid" value="{CAPTCHA_GD_X_GRID}" type="text" /></dd>
</dl>
<dl>
<dt><label for="captcha_gd_y_grid">{L_CAPTCHA_GD_Y_GRID}:</label><br /><span>{L_CAPTCHA_GD_Y_GRID_EXPLAIN}</span></dt>
<dd><input id="captcha_gd_y_grid" name="captcha_gd_y_grid" value="{CAPTCHA_GD_Y_GRID}" type="text" /></dd>
</dl>
<!-- ENDIF -->
</fieldset>
<fieldset>
<legend>{L_AVAILABLE_CAPTCHAS}</legend>
<dl>
<dt><label for="captcha_select">{L_CAPTCHA_SELECT}:</label><br /><span>{L_CAPTCHA_SELECT_EXPLAIN}</span></dt>
<dd><select id="captcha_select" name="select_captcha" onchange="(document.getElementById('acp_captcha')).submit()" >{CAPTCHA_SELECT}</select></dd>
</dl>
<dl>
<dt><label for="configure">{L_CAPTCHA_CONFIGURE}:</label><br /><span>{L_CAPTCHA_CONFIGURE_EXPLAIN}</span></dt>
<dd><input class="button2" type="submit" id="configure" name="configure" value="{L_CONFIGURE}" /></dd>
</dl>
</fieldset>
<!-- IF CAPTCHA_PREVIEW -->
<fieldset>
<legend>{L_PREVIEW}</legend>
<!-- IF PREVIEW -->
<div class="successbox">
<h3>{L_WARNING}</h3>
<p>{L_CAPTCHA_PREVIEW_MSG}</p>
</div>
<!-- ENDIF -->
<dl>
<dt><label for="captcha_preview">{L_PREVIEW}:</label><br /><span>{L_CAPTCHA_PREVIEW_EXPLAIN}</span></dt>
<dd><img src="{CAPTCHA_PREVIEW}" alt="{L_PREVIEW}" <!-- IF CAPTCHA_GD_PREVIEWED -->width="360" height="96"<!-- ELSE --> width="320" height="50"<!-- ENDIF --> id="captcha_preview" /></dd>
</dl>
{CAPTCHA_PREVIEW}
</fieldset>
<!-- ENDIF -->
<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}" />
<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;
{S_FORM_TOKEN}
</fieldset>
</form>

View File

@@ -7,8 +7,9 @@
<p>{L_ACP_RESTORE_EXPLAIN}</p>
<!-- IF .files -->
<form id="acp_backup" method="post" action="{U_ACTION}">
<fieldset>
<legend>{L_RESTORE_OPTIONS}</legend>
<dl>
@@ -16,16 +17,19 @@
<dd><select id="file" name="file" size="10"><!-- BEGIN files --><option value="{files.FILE}"<!-- IF files.S_LAST_ROW --> selected="selected"<!-- ENDIF -->>{files.NAME}</option><!-- END files --></select></dd>
</dl>
<!-- IF .files -->
<p class="submit-buttons">
<input class="button1" type="submit" id="submit" name="submit" value="{L_START_RESTORE}" />&nbsp;
<input class="button2" type="submit" id="delete" name="delete" value="{L_DELETE_BACKUP}" />&nbsp;
<input class="button2" type="submit" id="download" name="download" value="{L_DOWNLOAD_BACKUP}" />
</p>
<!-- ENDIF -->
{S_FORM_TOKEN}
<p class="submit-buttons">
<input class="button1" type="submit" id="submit" name="submit" value="{L_START_RESTORE}" />&nbsp;
<input class="button2" type="submit" id="delete" name="delete" value="{L_DELETE_BACKUP}" />&nbsp;
<input class="button2" type="submit" id="download" name="download" value="{L_DOWNLOAD_BACKUP}" />
</p>
{S_FORM_TOKEN}
</fieldset>
</form>
<!-- ELSE -->
<div class="errorbox">
<p>{L_ACP_NO_ITEMS}</p>
</div>
<!-- ENDIF -->
<!-- ELSE -->
<h1>{L_ACP_BACKUP}</h1>
@@ -77,7 +81,7 @@
<option value="{tables.TABLE}">{tables.TABLE}</option>
<!-- END tables -->
</select></dd>
<dd><a href="#" onclick="selector(true)">{L_SELECT_ALL}</a> :: <a href="#" onclick="selector(false)">{L_DESELECT_ALL}</a></dd>
<dd><a href="#" onclick="selector(true); return false;">{L_SELECT_ALL}</a> :: <a href="#" onclick="selector(false); return false;">{L_DESELECT_ALL}</a></dd>
</dl>
<p class="submit-buttons">

View File

@@ -96,7 +96,7 @@
<a href="{U_BACK}" style="float: {S_CONTENT_FLOW_END};">&laquo; {L_BACK}</a>
<h1>{L_TITLE} :: {FORUM_NAME}</h1>
<h1>{L_TITLE} <!-- IF FORUM_NAME -->:: {FORUM_NAME}<!-- ENDIF --></h1>
<p>{L_FORUM_EDIT_EXPLAIN}</p>
@@ -202,6 +202,11 @@
<dt><label for="forum_status">{L_FORUM_STATUS}:</label></dt>
<dd><select id="forum_status" name="forum_status">{S_STATUS_OPTIONS}</select></dd>
</dl>
<dl>
<dt><label for="display_subforum_list">{L_LIST_SUBFORUMS}:</label><br /><span>{L_LIST_SUBFORUMS_EXPLAIN}</span></dt>
<dd><label><input type="radio" class="radio" name="display_subforum_list" value="1"<!-- IF S_DISPLAY_SUBFORUM_LIST --> id="display_subforum_list" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" class="radio" name="display_subforum_list" value="0"<!-- IF not S_DISPLAY_SUBFORUM_LIST --> id="display_subforum_list" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl>
<dl>
<dt><label for="display_on_index">{L_LIST_INDEX}:</label><br /><span>{L_LIST_INDEX_EXPLAIN}</span></dt>
<dd><label><input type="radio" class="radio" name="display_on_index" value="1"<!-- IF S_DISPLAY_ON_INDEX --> id="display_on_index" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
@@ -445,7 +450,7 @@
<!-- IF forums.S_FIRST_ROW && not forums.S_LAST_ROW -->
{ICON_MOVE_UP_DISABLED}
<a href="{forums.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a>
<!-- ELSEIF not forums.S_FIRST_ROW && not forums.S_LAST_ROW-->
<!-- ELSEIF not forums.S_FIRST_ROW && not forums.S_LAST_ROW -->
<a href="{forums.U_MOVE_UP}">{ICON_MOVE_UP}</a>
<a href="{forums.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a>
<!-- ELSEIF forums.S_LAST_ROW && not forums.S_FIRST_ROW -->

View File

@@ -74,6 +74,10 @@
<dt><label for="group_message_limit">{L_GROUP_MESSAGE_LIMIT}:</label><br /><span>{L_GROUP_MESSAGE_LIMIT_EXPLAIN}</span></dt>
<dd><input name="group_message_limit" type="text" id="group_message_limit" maxlength="4" size="4" value="{GROUP_MESSAGE_LIMIT}" /></dd>
</dl>
<dl>
<dt><label for="group_max_recipients">{L_GROUP_MAX_RECIPIENTS}:</label><br /><span>{L_GROUP_MAX_RECIPIENTS_EXPLAIN}</span></dt>
<dd><input name="group_max_recipients" type="text" id="group_max_recipients" maxlength="10" size="4" value="{GROUP_MAX_RECIPIENTS}" /></dd>
</dl>
<dl>
<dt><label for="group_colour">{L_GROUP_COLOR}:</label><br /><span>{L_GROUP_COLOR_EXPLAIN}</span></dt>
<dd><input name="group_colour" type="text" id="group_colour" value="{GROUP_COLOUR}" size="6" maxlength="6" />&nbsp;&nbsp;<span>[ <a href="{U_SWATCH}" onclick="popup(this.href, 636, 150, '_swatch'); return false">{L_COLOUR_SWATCH}</a> ]</span></dd>

View File

@@ -43,19 +43,19 @@
function toggle_select(icon, display, select)
{
var disp = document.getElementById('order_disp[' + icon + ']');
var nodisp = document.getElementById('order_no_disp[' + icon + ']');
var disp = document.getElementById('order_disp_' + select);
var nodisp = document.getElementById('order_no_disp_' + select);
disp.disabled = !display;
nodisp.disabled = display;
if (display)
{
document.getElementById(select).selectedIndex = 0;
document.getElementById('order_' + select).selectedIndex = 0;
nodisp.className = 'disabled-options';
disp.className = '';
}
else
{
document.getElementById(select).selectedIndex = {S_ORDER_LIST_DISPLAY_COUNT};
document.getElementById('order_' + select).selectedIndex = {S_ORDER_LIST_DISPLAY_COUNT};
disp.className = 'disabled-options';
nodisp.className = '';
}
@@ -111,15 +111,15 @@
<td><input class="text post" type="text" size="3" name="width[{items.IMG}]" value="{items.WIDTH}" /></td>
<td><input class="text post" type="text" size="3" name="height[{items.IMG}]" value="{items.HEIGHT}" /></td>
<td>
<input type="checkbox" class="radio" name="display_on_posting[{items.IMG}]"{items.POSTING_CHECKED} onclick="toggle_select('{items.A_IMG}', this.checked, 'order[{items.A_IMG}]');"/>
<input type="checkbox" class="radio" name="display_on_posting[{items.IMG}]"{items.POSTING_CHECKED} onclick="toggle_select('{items.A_IMG}', this.checked, '{items.S_ROW_COUNT}');"/>
<!-- IF items.S_ID -->
<input type="hidden" name="id[{items.IMG}]" value="{items.ID}" />
<!-- ENDIF -->
</td>
<!-- IF ID or S_ADD -->
<td><select id="order[{items.IMG}]" name="order[{items.IMG}]">
<optgroup id="order_disp[{items.IMG}]" label="{L_DISPLAY_POSTING}" <!-- IF not items.POSTING_CHECKED -->disabled="disabled" class="disabled-options" <!-- ENDIF -->>{S_ORDER_LIST_DISPLAY}</optgroup>
<optgroup id="order_no_disp[{items.IMG}]" label="{L_DISPLAY_POSTING_NO}" <!-- IF items.POSTING_CHECKED -->disabled="disabled" class="disabled-options" <!-- ENDIF -->>{S_ORDER_LIST_UNDISPLAY}</optgroup>
<td><select id="order_{items.S_ROW_COUNT}" name="order[{items.IMG}]">
<optgroup id="order_disp_{items.S_ROW_COUNT}" label="{L_DISPLAY_POSTING}" <!-- IF not items.POSTING_CHECKED -->disabled="disabled" class="disabled-options" <!-- ENDIF -->>{S_ORDER_LIST_DISPLAY}</optgroup>
<optgroup id="order_no_disp_{items.S_ROW_COUNT}" label="{L_DISPLAY_POSTING_NO}" <!-- IF items.POSTING_CHECKED -->disabled="disabled" class="disabled-options" <!-- ENDIF -->>{S_ORDER_LIST_UNDISPLAY}</optgroup>
</select></td>
<!-- ENDIF -->
<!-- IF S_ADD -->
@@ -248,6 +248,10 @@
&nbsp;<a href="{items.U_EDIT}">{ICON_EDIT}</a> <a href="{items.U_DELETE}">{ICON_DELETE}</a>
</td>
</tr>
<!-- BEGINELSE -->
<tr class="row3">
<td colspan="{COLSPAN}">{L_ACP_NO_ITEMS}</td>
</tr>
<!-- END items -->
</tbody>
</table>

0
phpBB/adm/style/acp_inactive.html Executable file → Normal file
View File

View File

@@ -121,9 +121,11 @@
<!--[if lt IE 8]>
<style type="text/css">
/* <![CDATA[ */
input.langvalue, textarea.langvalue {
width: 450px;
}
/* ]]> */
</style>
<![endif]-->

View File

@@ -0,0 +1,46 @@
<!-- INCLUDE overall_header.html -->
<h1>{PAGE_TITLE}</h1>
<p><!-- IF LOGIN_EXPLAIN -->{LOGIN_EXPLAIN}<!-- ELSE -->{L_LOGIN}<!-- ENDIF --></p>
<!-- IF LOGIN_ERROR -->
<div class="errorbox">
<h3>{L_WARNING}</h3>
<p>{LOGIN_ERROR}</p>
</div>
<!-- ENDIF -->
<form action="{S_LOGIN_ACTION}" method="post" id="login">
<fieldset>
<dl>
<dt><label for="{USERNAME_CREDENTIAL}">{L_USERNAME}:</label></dt>
<dd><input type="text" tabindex="1" name="{USERNAME_CREDENTIAL}" id="{USERNAME_CREDENTIAL}" size="25" value="{USERNAME}" class="inputbox autowidth" /></dd>
</dl>
<dl>
<dt><label for="{PASSWORD_CREDENTIAL}">{L_PASSWORD}:</label></dt>
<dd><input type="password" tabindex="2" id="{PASSWORD_CREDENTIAL}" name="{PASSWORD_CREDENTIAL}" size="25" class="inputbox autowidth" /></dd>
<!-- IF S_DISPLAY_FULL_LOGIN and (U_SEND_PASSWORD or U_RESEND_ACTIVATION) -->
<!-- IF U_SEND_PASSWORD --><dd><a href="{U_SEND_PASSWORD}">{L_FORGOT_PASS}</a></dd><!-- ENDIF -->
<!-- IF U_RESEND_ACTIVATION --><dd><a href="{U_RESEND_ACTIVATION}">{L_RESEND_ACTIVATION}</a></dd><!-- ENDIF -->
<!-- ENDIF -->
</dl>
<!-- IF S_CONFIRM_CODE -->
<dl>
<dt><label for="confirm_code">{L_CONFIRM_CODE}:</label><br /><span>{L_CONFIRM_CODE_EXPLAIN}</span></dt>
<dd><input type="hidden" name="confirm_id" value="{CONFIRM_ID}" />{CONFIRM_IMAGE}</dd>
<dd><input type="text" name="confirm_code" id="confirm_code" size="8" maxlength="8" tabindex="3" class="inputbox narrow" title="{L_CONFIRM_CODE}" /></dd>
</dl>
<!-- ENDIF -->
<p class="submit-buttons">
<!-- IF S_DISPLAY_FULL_LOGIN -->
<!-- IF S_AUTOLOGIN_ENABLED --><label for="autologin"><input type="checkbox" name="autologin" id="autologin" tabindex="4" /> {L_LOG_ME_IN}</label><!-- ENDIF -->
<label for="viewonline"><input type="checkbox" name="viewonline" id="viewonline" tabindex="5" /> {L_HIDE_ME}</label>
<!-- ENDIF -->
&nbsp;
{S_HIDDEN_FIELDS}<input type="submit" name="login" tabindex="6" value="{L_LOGIN}" class="button1" />
</p>
</fieldset>
</form>
<!-- INCLUDE overall_footer.html -->

View File

@@ -21,6 +21,12 @@
</div>
<!-- ENDIF -->
<!-- IF S_WRITABLE_CONFIG -->
<div class="errorbox notice">
<p>{L_WRITABLE_CONFIG}</p>
</div>
<!-- ENDIF -->
<table cellspacing="1">
<caption>{L_FORUM_STATS}</caption>
<col class="col1" /><col class="col2" /><col class="col1" /><col class="col2" />

View File

@@ -28,11 +28,11 @@
<p>{L_EXPLAIN}</p>
<form id="acp_roles" method="post" action="{U_ACTION}">
<br />
<a href="#acl">&raquo; {L_SET_ROLE_PERMISSIONS}</a>
<form id="acp_roles" method="post" action="{U_ACTION}">
<fieldset>
<legend>{L_ROLE_DETAILS}</legend>
<dl>
@@ -46,6 +46,7 @@
<p class="quick">
<input type="submit" class="button1" name="submit" value="{L_SUBMIT}" />
{S_FORM_TOKEN}
</p>
</fieldset>
@@ -57,11 +58,15 @@
<!-- ENDIF -->
<p>
<a name="acl"></a>
<a href="#maincontent">&raquo; {L_BACK_TO_TOP}</a><br />
<br /><br />
</p>
<h1>{L_ACL_TYPE}</h1>
<fieldset class="perm nolegend">
@@ -107,9 +112,9 @@
<!-- IF auth.mask.S_ROW_COUNT is even --><tr class="row4"><!-- ELSE --><tr class="row3"><!-- ENDIF -->
<th class="permissions-name<!-- IF auth.mask.S_ROW_COUNT is even --> row4<!-- ELSE --> row3<!-- ENDIF -->">{auth.mask.PERMISSION}</th>
<td class="permissions-yes"><label for="{auth.mask.FIELD_NAME}_y"><input onchange="set_colours('00{auth.S_ROW_COUNT}', false)" id="setting[{auth.mask.FIELD_NAME}]_y" name="setting[{auth.mask.FIELD_NAME}]" class="radio" type="radio"<!-- IF auth.mask.S_YES --> checked="checked"<!-- ENDIF --> value="1" /></label></td>
<td class="permissions-no"><label for="{auth.mask.FIELD_NAME}_u"><input onchange="set_colours('00{auth.S_ROW_COUNT}', false)" id="setting[{auth.mask.FIELD_NAME}]_u" name="setting[{auth.mask.FIELD_NAME}]" class="radio" type="radio"<!-- IF auth.mask.S_NO --> checked="checked"<!-- ENDIF --> value="-1" /></label></td>
<td class="permissions-never"><label for="{auth.mask.FIELD_NAME}_n"><input onchange="set_colours('00{auth.S_ROW_COUNT}', false)" id="setting[{auth.mask.FIELD_NAME}]_n" name="setting[{auth.mask.FIELD_NAME}]" class="radio" type="radio"<!-- IF auth.mask.S_NEVER --> checked="checked"<!-- ENDIF --> value="0" /></label></td>
<td class="permissions-yes"><label for="setting_{auth.mask.FIELD_NAME}_y"><input onchange="set_colours('00{auth.S_ROW_COUNT}', false)" id="setting_{auth.mask.FIELD_NAME}_y" name="setting[{auth.mask.FIELD_NAME}]" class="radio" type="radio"<!-- IF auth.mask.S_YES --> checked="checked"<!-- ENDIF --> value="1" /></label></td>
<td class="permissions-no"><label for="setting_{auth.mask.FIELD_NAME}_u"><input onchange="set_colours('00{auth.S_ROW_COUNT}', false)" id="setting_{auth.mask.FIELD_NAME}_u" name="setting[{auth.mask.FIELD_NAME}]" class="radio" type="radio"<!-- IF auth.mask.S_NO --> checked="checked"<!-- ENDIF --> value="-1" /></label></td>
<td class="permissions-never"><label for="setting_{auth.mask.FIELD_NAME}_n"><input onchange="set_colours('00{auth.S_ROW_COUNT}', false)" id="setting_{auth.mask.FIELD_NAME}_n" name="setting[{auth.mask.FIELD_NAME}]" class="radio" type="radio"<!-- IF auth.mask.S_NEVER --> checked="checked"<!-- ENDIF --> value="0" /></label></td>
</tr>
<!-- END mask -->
</tbody>

View File

@@ -44,7 +44,7 @@
<p>{L_LOOK_UP_FORUMS_EXPLAIN}</p>
<dl>
<dt><label for="forum">{L_LOOK_UP_FORUM}:</label></dt>
<dd><select name="f[]" multiple="multiple" size="10">{S_FORUM_OPTIONS}</select></dd>
<dd><select id="forum" name="f[]" multiple="multiple" size="10">{S_FORUM_OPTIONS}</select></dd>
<dd><label><input type="checkbox" class="radio" name="all_forums" value="1" /> {L_ALL_FORUMS}</label></dd>
</dl>

View File

@@ -459,7 +459,7 @@
</dl>
<dl>
<dt><label for="copyright">{L_COPYRIGHT}:</label></dt>
<dd><!-- IF S_INSTALL --><b id="name">{COPYRIGHT}</b><!-- ELSE --><input type="text" id="copyright" name="copyright" value="{COPYRIGHT}" /><!-- ENDIF --></dd>
<dd><!-- IF S_INSTALL --><b id="copyright">{COPYRIGHT}</b><!-- ELSE --><input type="text" id="copyright" name="copyright" value="{COPYRIGHT}" /><!-- ENDIF --></dd>
</dl>
<!-- IF S_STYLE and not S_BASIS -->
<dl>
@@ -475,13 +475,6 @@
<dd><!-- IF S_INSTALL --><b id="imageset_id">{IMAGESET_NAME}</b><!-- ELSE --><select id="imageset_id" name="imageset_id">{S_IMAGESET_OPTIONS}</select><!-- ENDIF --></dd>
</dl>
<!-- ENDIF -->
<!-- IF S_TEMPLATE or S_THEME -->
<dl>
<dt><label for="store_db">{L_LOCATION}:</label><br /><span>{L_LOCATION_EXPLAIN}</span></dt>
<dd><label><input type="radio" class="radio" name="store_db" value="0"<!-- IF not S_STORE_DB --> id="store_db" checked="checked"<!-- ENDIF --> /> {L_STORE_FILESYSTEM}</label>
<label><input type="radio" class="radio" name="store_db" value="1"<!-- IF S_STORE_DB --> id="store_db" checked="checked"<!-- ENDIF --> /> {L_STORE_DATABASE}</label></dd>
</dl>
<!-- ENDIF -->
<!-- IF S_STYLE -->
</fieldset>

View File

@@ -197,7 +197,7 @@
<a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{S_ON_PAGE}</a> &bull; <span>{PAGINATION}</span>
</div>
<!-- ENDIF -->
<fieldset class="quick">
<input class="button2" type="submit" name="delmarked" value="{L_DELETE_MARKED}" />
<p class="small"><a href="#" onclick="marklist('user_attachments', 'mark', true);">{L_MARK_ALL}</a> &bull; <a href="#" onclick="marklist('user_attachments', 'mark', false);">{L_UNMARK_ALL}</a></p>
@@ -215,7 +215,7 @@
<form id="select_forum" method="post" action="{U_ACTION}">
<fieldset class="quick" style="text-align: left;">
{L_SELECT_FORUM}: <select name="f">{S_FORUM_OPTIONS}</select>
{L_SELECT_FORUM}: <select name="f">{S_FORUM_OPTIONS}</select>
<input class="button2" type="submit" value="{L_GO}" name="select" />
{S_FORM_TOKEN}
</fieldset>

View File

@@ -30,7 +30,7 @@
</dl>
<dl>
<dt><label>{L_POSTS}:</label></dt>
<dd><strong>{USER_POSTS}</strong></dd>
<dd><strong>{USER_POSTS}</strong><!-- IF POSTS_IN_QUEUE and U_MCP_QUEUE --> (<a href="{U_MCP_QUEUE}">{L_POSTS_IN_QUEUE}</a>)<!-- ELSEIF POSTS_IN_QUEUE --> ({L_POSTS_IN_QUEUE})<!-- ENDIF --></dd>
</dl>
<dl>
<dt><label>{L_WARNINGS}:</label></dt>
@@ -138,7 +138,7 @@
</p>
</fieldset>
</form>
<!-- ENDIF -->

View File

@@ -62,6 +62,10 @@
<td style="text-align: center;">{words.REPLACEMENT}</td>
<td>&nbsp;<a href="{words.U_EDIT}">{ICON_EDIT}</a>&nbsp;&nbsp;<a href="{words.U_DELETE}">{ICON_DELETE}</a>&nbsp;</td>
</tr>
<!-- BEGINELSE -->
<tr class="row3">
<td colspan="3">{L_ACP_NO_ITEMS}</td>
</tr>
<!-- END words -->
</tbody>
</table>

View File

@@ -1175,6 +1175,10 @@ input.disabled {
font-weight: bold;
}
.notice {
background-color: #62A5CC;
}
/* Special cases for the error page */
#errorpage #page-header a {
font-weight: bold;
@@ -1333,18 +1337,21 @@ fieldset.permissions .permissions-switch {
fieldset.permissions .padding {
}
.permissions-switch {
margin-top: -6px;
font-size: .9em;
}
.permissions-switch a {
text-decoration: underline;
font-size: 0.90em;
}
.permissions-reset {
margin-top: -6px;
padding-bottom: 10px;
}
.permissions-reset a {
font-size: .8em;
font-size: .85em;
}
/* Tabbed menu */

View File

@@ -0,0 +1,5 @@
<dl>
<dt><label for="captcha_preview">{L_PREVIEW}:</label><br /><span>{L_CAPTCHA_PREVIEW_EXPLAIN}</span></dt>
<dd><img src="{CONFIRM_IMAGE}" alt="{L_PREVIEW}" width="360" height="96" id="captcha_preview" /></dd>
</dl>

View File

@@ -0,0 +1,53 @@
<!-- INCLUDE overall_header.html -->
<a name="maincontent"></a>
<h1>{L_ACP_VC_SETTINGS}</h1>
<p>{L_ACP_VC_SETTINGS_EXPLAIN}</p>
<form id="acp_captcha" method="post" action="{U_ACTION}">
<fieldset>
<legend>{L_GENERAL_OPTIONS}</legend>
<dl>
<dt><label for="captcha_gd_foreground_noise">{L_CAPTCHA_GD_FOREGROUND_NOISE}:</label><br /><span>{L_CAPTCHA_GD_FOREGROUND_NOISE_EXPLAIN}</span></dt>
<dd><label><input id="captcha_gd_foreground_noise" name="captcha_gd_foreground_noise" value="1" class="radio" type="radio"<!-- IF CAPTCHA_GD_FOREGROUND_NOISE --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input name="captcha_gd_foreground_noise" value="0" class="radio" type="radio"<!-- IF not CAPTCHA_GD_FOREGROUND_NOISE --> checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl>
<dl>
<dt><label for="captcha_gd_x_grid">{L_CAPTCHA_GD_X_GRID}:</label><br /><span>{L_CAPTCHA_GD_X_GRID_EXPLAIN}</span></dt>
<dd><input id="captcha_gd_x_grid" name="captcha_gd_x_grid" value="{CAPTCHA_GD_X_GRID}" type="text" /></dd>
</dl>
<dl>
<dt><label for="captcha_gd_y_grid">{L_CAPTCHA_GD_Y_GRID}:</label><br /><span>{L_CAPTCHA_GD_Y_GRID_EXPLAIN}</span></dt>
<dd><input id="captcha_gd_y_grid" name="captcha_gd_y_grid" value="{CAPTCHA_GD_Y_GRID}" type="text" /></dd>
</dl>
</fieldset>
<fieldset>
<legend>{L_PREVIEW}</legend>
<!-- IF PREVIEW -->
<div class="successbox">
<h3>{L_WARNING}</h3>
<p>{L_CAPTCHA_PREVIEW_MSG}</p>
</div>
<!-- ENDIF -->
{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;
<input type="hidden" name="select_captcha" value="{CAPTCHA_NAME}" />
<input type="hidden" name="configure" value="1" />
{S_FORM_TOKEN}
</fieldset>
</form>
<!-- INCLUDE overall_footer.html -->

View File

@@ -0,0 +1,19 @@
<!-- IF S_RECAPTCHA_AVAILABLE -->
<dl>
<script type="text/javascript" src="{RECAPTCHA_SERVER}/challenge?k={RECAPTCHA_PUBKEY}{RECAPTCHA_ERRORGET}">
// <![CDATA[
var RecaptchaOptions = {
lang : {L_RECAPTCHA_LANG}
};
// ]]>
</script>
<noscript>
<iframe src="{RECAPTCHA_SERVER}/noscript?k={RECAPTCHA_PUBKEY}{RECAPTCHA_ERRORGET}" height="300" width="500" frameborder="0"></iframe><br/>
<textarea name="recaptcha_challenge_field" rows="3" cols="40"></textarea>
<input type="hidden" name="recaptcha_response_field" value="manual_challenge"/>
</noscript>
</dl>
<!-- ELSE -->
{L_RECAPTCHA_NOT_AVAILABLE}
<!-- ENDIF -->

View File

@@ -0,0 +1,48 @@
<!-- INCLUDE overall_header.html -->
<a name="maincontent"></a>
<h1>{L_ACP_VC_SETTINGS}</h1>
<p>{L_ACP_VC_SETTINGS_EXPLAIN}</p>
<form id="acp_captcha" method="post" action="{U_ACTION}">
<fieldset>
<legend>{L_GENERAL_OPTIONS}</legend>
<dl>
<dt><label for="recaptcha_pubkey">{L_RECAPTCHA_PUBLIC}:</label><br /><span>{L_RECAPTCHA_PUBLIC_EXPLAIN}</span></dt>
<dd><input id="recaptcha_pubkey" name="recaptcha_pubkey" value="{RECAPTCHA_PUBKEY}" size="50" type="text" /></dd>
</dl>
<dl>
<dt><label for="recaptcha_privkey">{L_RECAPTCHA_PRIVATE}:</label><br /><span>{L_RECAPTCHA_PRIVATE_EXPLAIN}</span></dt>
<dd><input id="recaptcha_privkey" name="recaptcha_privkey" value="{RECAPTCHA_PRIVKEY}" size="50" type="text" /></dd>
</dl>
</fieldset>
<fieldset>
<legend>{L_PREVIEW}</legend>
<!-- IF PREVIEW -->
<div class="successbox">
<h3>{L_WARNING}</h3>
<p>{L_CAPTCHA_PREVIEW_MSG}</p>
</div>
<!-- ENDIF -->
{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;
<input type="hidden" name="select_captcha" value="{CAPTCHA_NAME}" />
<input type="hidden" name="configure" value="1" />
{S_FORM_TOKEN}
</fieldset>
</form>
<!-- INCLUDE overall_footer.html -->

View File

@@ -8,7 +8,7 @@
<title>{L_COLOUR_SWATCH}</title>
<style type="text/css">
<!--
/* <![CDATA[ */
body {
background-color: #404040;
color: #fff;
@@ -29,7 +29,7 @@
img {
border: 0;
}
//-->
/* ]]> */
</style>
</head>

0
phpBB/adm/style/install_convert.html Executable file → Normal file
View File

0
phpBB/adm/style/install_error.html Executable file → Normal file
View File

0
phpBB/adm/style/install_footer.html Executable file → Normal file
View File

0
phpBB/adm/style/install_header.html Executable file → Normal file
View File

0
phpBB/adm/style/install_install.html Executable file → Normal file
View File

0
phpBB/adm/style/install_main.html Executable file → Normal file
View File

View File

@@ -186,7 +186,7 @@
<p>{L_NO_UPDATE_FILES_EXPLAIN}</p><br />
<strong>{NO_UPDATE_FILES}</strong>
</div>
<!-- ENDIF -->
@@ -226,7 +226,7 @@
<!-- IF files.S_CUSTOM -->
<dd style="margin-left: 60%;"><label><input type="checkbox" name="no_update[]" value="{files.FILENAME}" class="radio" /> {L_DO_NOT_UPDATE}</label></dd>
<!-- ENDIF -->
<!-- IF files.STATUS eq 'modified' -->
</dl>
<dl>
@@ -295,7 +295,7 @@
<p>{L_UPDATE_METHOD_EXPLAIN}</p>
<fieldset class="submit-buttons">
<input class="button1" type="submit" name="ftp_upload" value="{L_FTP_UPDATE_METHOD}" />&nbsp; &nbsp;<input class="button1" type="submit" name="download" value="{L_DOWNLOAD_UPDATE_METHOD}" />
<input class="button1" type="submit" name="ftp_upload" value="{L_FTP_UPDATE_METHOD}" />&nbsp; &nbsp;<input class="button1" type="submit" name="download" value="{L_DOWNLOAD_UPDATE_METHOD_BUTTON}" />
</fieldset>
</form>
@@ -360,9 +360,18 @@
<p>{L_CONNECTION_SUCCESS}</p>
</div>
<!-- ELSEIF S_CONNECTION_FAILED -->
<div class="successbox">
<p>{L_TRY_DOWNLOAD_METHOD}</p>
<fieldset class="quick">
<input class="button1" type="submit" name="download" value="{L_TRY_DOWNLOAD_METHOD_BUTTON}" />
</fieldset>
</div>
<div class="errorbox">
<p>{L_CONNECTION_FAILED}<br />{ERROR_MSG}</p>
</div>
<!-- ENDIF -->
<fieldset>
@@ -378,7 +387,7 @@
</dl>
<!-- END data -->
</fieldset>
<fieldset class="submit-buttons">
{S_HIDDEN_FIELDS}
<input class="button2" type="submit" name="check_again" value="{L_BACK}" />

View File

@@ -32,7 +32,7 @@ function resize_panel()
</script>
<style type="text/css">
<!--
/* <![CDATA[ */
#main {
font-size: 1em;
@@ -198,7 +198,7 @@ table.hrdiff caption span {
<!-- ENDIF -->
//-->
/* ]]> */
</style>
</head>

View File

@@ -181,11 +181,12 @@ function switch_menu()
<span class="corners-top"><span></span></span>
<div id="content">
<!-- IF not S_USER_NOTICE -->
<div id="toggle">
<div id="toggle">
<a id="toggle-handle" accesskey="m" title="{L_MENU_TOGGLE}" onclick="switch_menu(); return false;" href="#"></a></div>
<!-- ENDIF -->
<div id="menu">
<p>{L_LOGGED_IN_AS}<br /><strong>{USERNAME}</strong> [&nbsp;<a href="{U_LOGOUT}">{L_LOGOUT}</a>&nbsp;]</p>
<p><!-- IF S_USER_LOGGED_IN --> {L_LOGGED_IN_AS}<br /><strong>{USERNAME}</strong> [&nbsp;<a href="{U_LOGOUT}">{L_LOGOUT}</a>&nbsp;]<!-- ENDIF --><!-- IF S_USER_ADMIN -->[&nbsp;<a href="{U_ADM_LOGOUT}">{L_ADM_LOGOUT}</a>&nbsp;]<!-- ENDIF --></p>
<!-- IF S_USER_ADMIN -->
<ul>
<!-- BEGIN l_block1 -->
<!-- IF l_block1.S_SELECTED -->
@@ -203,6 +204,7 @@ function switch_menu()
<!-- ENDIF -->
<!-- END l_block1 -->
</ul>
<!-- ENDIF -->
</div>
<div id="main">

View File

@@ -68,7 +68,7 @@
<!-- ELSE -->
<li class="permissions-preset-custom<!-- IF p_mask.S_FIRST_ROW and p_mask.f_mask.S_FIRST_ROW and p_mask.f_mask.category.S_FIRST_ROW --> activetab<!-- ENDIF -->" id="tab{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}{p_mask.f_mask.category.S_ROW_COUNT}">
<!-- ENDIF -->
<a href="#" onclick="swap_options('{p_mask.S_ROW_COUNT}', '{p_mask.f_mask.S_ROW_COUNT}', '{p_mask.f_mask.category.S_ROW_COUNT}', false<!-- IF p_mask.S_VIEW -->, true<!-- ENDIF -->); return false;"><span class="tabbg"><span class="colour"></span>{category.CAT_NAME}</span></a></li>
<a href="#" onclick="swap_options('{p_mask.S_ROW_COUNT}', '{p_mask.f_mask.S_ROW_COUNT}', '{p_mask.f_mask.category.S_ROW_COUNT}', false<!-- IF p_mask.S_VIEW -->, true<!-- ENDIF -->); return false;"><span class="tabbg"><span class="colour"></span>{p_mask.f_mask.category.CAT_NAME}</span></a></li>
<!-- END category -->
</ul>
</div>

View File

@@ -13,9 +13,9 @@
*/
define('IN_PHPBB', true);
define('ADMIN_START', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './../';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
if (!defined('PHPBB_ROOT_PATH')) define('PHPBB_ROOT_PATH', './../');
if (!defined('PHP_EXT')) define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
include(PHPBB_ROOT_PATH . 'common.' . PHP_EXT);
// Start session management
$user->session_begin(false);
@@ -23,7 +23,7 @@ $auth->acl($user->data);
$user->setup();
// Set custom template for admin area
$template->set_custom_template($phpbb_root_path . 'adm/style', 'admin');
$template->set_custom_template(PHPBB_ROOT_PATH . CONFIG_ADM_FOLDER . '/style', 'admin');
$template->set_filenames(array(
'body' => 'colour_swatch.html')
@@ -39,7 +39,7 @@ $name = (!preg_match('/^[a-z0-9_-]+$/i', $name)) ? '' : $name;
$template->assign_vars(array(
'OPENER' => $form,
'NAME' => $name,
'T_IMAGES_PATH' => "{$phpbb_root_path}images/",
'T_IMAGES_PATH' => PHPBB_ROOT_PATH . 'images/',
'S_USER_LANG' => $user->lang['USER_LANG'],
'S_CONTENT_DIRECTION' => $user->lang['DIRECTION'],

View File

@@ -6,7 +6,7 @@
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
* Minimum Requirement: PHP 4.3.3
* Minimum Requirement: PHP 5.2.0+
*/
/**
@@ -21,6 +21,7 @@ $starttime = $starttime[1] + $starttime[0];
// Report all errors, except notices
error_reporting(E_ALL ^ E_NOTICE);
date_default_timezone_set('UTC');
/*
* Remove variables created by register_globals from the global scope
@@ -103,7 +104,7 @@ if (version_compare(PHP_VERSION, '6.0.0-dev', '>='))
}
else
{
set_magic_quotes_runtime(0);
@set_magic_quotes_runtime(0);
// Be paranoid with passed vars
if (@ini_get('register_globals') == '1' || strtolower(@ini_get('register_globals')) == 'on' || !function_exists('ini_get'))
@@ -116,22 +117,22 @@ else
if (defined('IN_CRON'))
{
$phpbb_root_path = dirname(__FILE__) . DIRECTORY_SEPARATOR;
@define('PHPBB_ROOT_PATH', dirname(__FILE__) . DIRECTORY_SEPARATOR);
}
if (!file_exists($phpbb_root_path . 'config.' . $phpEx))
if (!file_exists(PHPBB_ROOT_PATH . 'config.' . PHP_EXT))
{
die("<p>The config.$phpEx file could not be found.</p><p><a href=\"{$phpbb_root_path}install/index.$phpEx\">Click here to install phpBB</a></p>");
die('<p>The config.' . PHP_EXT . ' file could not be found.</p><p><a href="' . PHPBB_ROOT_PATH . 'install/index.' . PHP_EXT . '">Click here to install phpBB</a></p>');
}
require($phpbb_root_path . 'config.' . $phpEx);
require(PHPBB_ROOT_PATH . 'config.' . PHP_EXT);
if (!defined('PHPBB_INSTALLED'))
{
// Redirect the user to the installer
// We have to generate a full HTTP/1.1 header here since we can't guarantee to have any of the information
// available as used by the redirect function
$server_name = (!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : getenv('SERVER_NAME');
$server_name = (!empty($_SERVER['HTTP_HOST'])) ? strtolower($_SERVER['HTTP_HOST']) : ((!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : getenv('SERVER_NAME'));
$server_port = (!empty($_SERVER['SERVER_PORT'])) ? (int) $_SERVER['SERVER_PORT'] : (int) getenv('SERVER_PORT');
$secure = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 1 : 0;
@@ -143,14 +144,18 @@ if (!defined('PHPBB_INSTALLED'))
// Replace any number of consecutive backslashes and/or slashes with a single slash
// (could happen on some proxy setups and/or Windows servers)
$script_path = trim(dirname($script_name)) . '/install/index.' . $phpEx;
$script_path = trim(dirname($script_name)) . '/install/index.' . PHP_EXT;
$script_path = preg_replace('#[\\\\/]{2,}#', '/', $script_path);
$url = (($secure) ? 'https://' : 'http://') . $server_name;
if ($server_port && (($secure && $server_port <> 443) || (!$secure && $server_port <> 80)))
{
$url .= ':' . $server_port;
// HTTP HOST can carry a port number...
if (strpos($server_name, ':') === false)
{
$url .= ':' . $server_port;
}
}
$url .= $script_path;
@@ -179,27 +184,30 @@ if (!empty($load_extensions))
}
// Include files
require($phpbb_root_path . 'includes/acm/acm_' . $acm_type . '.' . $phpEx);
require($phpbb_root_path . 'includes/cache.' . $phpEx);
require($phpbb_root_path . 'includes/template.' . $phpEx);
require($phpbb_root_path . 'includes/session.' . $phpEx);
require($phpbb_root_path . 'includes/auth.' . $phpEx);
require(PHPBB_ROOT_PATH . 'includes/acm/acm_' . $acm_type . '.' . PHP_EXT);
require(PHPBB_ROOT_PATH . 'includes/cache.' . PHP_EXT);
require(PHPBB_ROOT_PATH . 'includes/template.' . PHP_EXT);
require(PHPBB_ROOT_PATH . 'includes/session.' . PHP_EXT);
require(PHPBB_ROOT_PATH . 'includes/auth.' . PHP_EXT);
require($phpbb_root_path . 'includes/functions.' . $phpEx);
require($phpbb_root_path . 'includes/functions_content.' . $phpEx);
require(PHPBB_ROOT_PATH . 'includes/functions.' . PHP_EXT);
require(PHPBB_ROOT_PATH . 'includes/functions_content.' . PHP_EXT);
require($phpbb_root_path . 'includes/constants.' . $phpEx);
require($phpbb_root_path . 'includes/db/' . $dbms . '.' . $phpEx);
require($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx);
require(PHPBB_ROOT_PATH . 'includes/constants.' . PHP_EXT);
require(PHPBB_ROOT_PATH . 'includes/db/' . $dbms . '.' . PHP_EXT);
require(PHPBB_ROOT_PATH . 'includes/utf/utf_tools.' . PHP_EXT);
// Set PHP error handler to ours
set_error_handler(defined('PHPBB_MSG_HANDLER') ? PHPBB_MSG_HANDLER : 'msg_handler');
// enforce the use of the request class
request::disable_super_globals();
// Instantiate some basic classes
$user = new user();
$auth = new auth();
$template = new template();
$cache = new cache();
$cache = new acm();
$db = new $sql_db();
// Connect to DB
@@ -209,15 +217,15 @@ $db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false, defined('
unset($dbpasswd);
// Grab global variables, re-cache if necessary
$config = $cache->obtain_config();
$config = cache::obtain_config();
// Add own hook handler
require($phpbb_root_path . 'includes/hooks/index.' . $phpEx);
require(PHPBB_ROOT_PATH . 'includes/hooks/index.' . PHP_EXT);
$phpbb_hook = new phpbb_hook(array('exit_handler', 'phpbb_user_session_handler', 'append_sid', array('template', 'display')));
foreach ($cache->obtain_hooks() as $hook)
foreach (cache::obtain_hooks() as $hook)
{
@include($phpbb_root_path . 'includes/hooks/' . $hook . '.' . $phpEx);
@include(PHPBB_ROOT_PATH . 'includes/hooks/' . $hook . '.' . PHP_EXT);
}
?>

View File

View File

@@ -12,9 +12,9 @@
*/
define('IN_PHPBB', true);
define('IN_CRON', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
if (!defined('PHPBB_ROOT_PATH')) define('PHPBB_ROOT_PATH', './');
if (!defined('PHP_EXT')) define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
include(PHPBB_ROOT_PATH . 'common.' . PHP_EXT);
// Do not update users last page entry
$user->session_begin(false);
@@ -74,7 +74,7 @@ switch ($cron_type)
{
case 'queue':
if (time() - $config['queue_interval'] <= $config['last_queue_run'] || !file_exists($phpbb_root_path . 'cache/queue.' . $phpEx))
if (time() - $config['queue_interval'] <= $config['last_queue_run'] || !file_exists(PHPBB_ROOT_PATH . 'cache/queue.' . PHP_EXT))
{
break;
}
@@ -85,7 +85,7 @@ switch ($cron_type)
$use_shutdown_function = false;
}
include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
include_once(PHPBB_ROOT_PATH . 'includes/functions_messenger.' . PHP_EXT);
$queue = new queue();
if ($use_shutdown_function)
@@ -118,16 +118,16 @@ switch ($cron_type)
break;
case 'tidy_search':
// Select the search method
$search_type = basename($config['search_type']);
if (time() - $config['search_gc'] <= $config['search_last_gc'] || !file_exists($phpbb_root_path . 'includes/search/' . $search_type . '.' . $phpEx))
if (time() - $config['search_gc'] <= $config['search_last_gc'] || !file_exists(PHPBB_ROOT_PATH . 'includes/search/' . $search_type . '.' . PHP_EXT))
{
break;
}
include_once("{$phpbb_root_path}includes/search/$search_type.$phpEx");
include_once(PHPBB_ROOT_PATH . "includes/search/$search_type." . PHP_EXT);
// We do some additional checks in the module to ensure it can actually be utilised
$error = false;
@@ -156,7 +156,7 @@ switch ($cron_type)
break;
}
include_once($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
include_once(PHPBB_ROOT_PATH . 'includes/functions_admin.' . PHP_EXT);
if ($use_shutdown_function)
{
@@ -176,7 +176,7 @@ switch ($cron_type)
break;
}
include_once($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
include_once(PHPBB_ROOT_PATH . 'includes/functions_admin.' . PHP_EXT);
if ($use_shutdown_function)
{
@@ -226,7 +226,7 @@ switch ($cron_type)
// Do the forum Prune thang
if ($row['prune_next'] < time() && $row['enable_prune'])
{
include_once($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
include_once(PHPBB_ROOT_PATH . 'includes/functions_admin.' . PHP_EXT);
if ($row['prune_days'])
{

View File

@@ -20,34 +20,10 @@
//
die("Please read the first lines of this script for instructions on how to enable it");
// This script adds missing permissions
$db = $dbhost = $dbuser = $dbpasswd = $dbport = $dbname = '';
define('IN_PHPBB', 1);
define('ANONYMOUS', 1);
$phpEx = substr(strrchr(__FILE__, '.'), 1);
$phpbb_root_path='./../';
include($phpbb_root_path . 'config.'.$phpEx);
require($phpbb_root_path . 'includes/acm/acm_' . $acm_type . '.'.$phpEx);
require($phpbb_root_path . 'includes/db/' . $dbms . '.'.$phpEx);
include($phpbb_root_path . 'includes/functions.'.$phpEx);
define('ACL_NEVER', 0);
define('ACL_YES', 1);
define('ACL_NO', -1);
define('ACL_GROUPS_TABLE', $table_prefix.'acl_groups');
define('ACL_OPTIONS_TABLE', $table_prefix.'acl_options');
define('ACL_USERS_TABLE', $table_prefix.'acl_users');
define('GROUPS_TABLE', $table_prefix.'groups');
define('USERS_TABLE', $table_prefix.'users');
$cache = new acm();
$db = new sql_db();
// Connect to DB
$db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false);
define('PHPBB_ROOT_PATH', './../');
define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
require(PHPBB_ROOT_PATH . 'common.' . PHP_EXT);
// auth => is_local, is_global
$f_permissions = array(
@@ -250,7 +226,7 @@ function mass_auth($ug_type, $forum_id, $ug_id, $acl_list, $setting)
$sql = 'SELECT group_id FROM ' . GROUPS_TABLE . "
WHERE group_name = '" . strtoupper($ug_id) . "'";
$result = $db->sql_query_limit($sql, 1);
$id = (int) $db->sql_fetchfield('group_id', 0, $result);
$id = (int) $db->sql_fetchfield('group_id', $result);
$db->sql_freeresult($result);
if (!$id)
@@ -414,4 +390,7 @@ function mass_auth($ug_type, $forum_id, $ug_id, $acl_list, $setting)
}
garbage_collection();
exit_handler();
?>

10
phpBB/develop/adjust_avatars.php Executable file → Normal file
View File

@@ -9,9 +9,9 @@ die("Please read the first lines of this script for instructions on how to enabl
set_time_limit(0);
define('IN_PHPBB', true);
$phpbb_root_path = './../';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.'.$phpEx);
define('PHPBB_ROOT_PATH', './../');
define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
include(PHPBB_ROOT_PATH . 'common.' . PHP_EXT);
// Start session management
$user->session_begin();
@@ -130,9 +130,9 @@ $db->sql_close();
function adjust_avatar($old_name, $midfix)
{
global $config, $phpbb_root_path;
global $config;
$avatar_path = $phpbb_root_path . $config['avatar_path'];
$avatar_path = PHPBB_ROOT_PATH . $config['avatar_path'];
$extension = strtolower(substr(strrchr($old_name, '.'), 1));
$new_name = $config['avatar_salt'] . '_' . $midfix . '.' . $extension;

View File

@@ -11,10 +11,10 @@ die("Please read the first lines of this script for instructions on how to enabl
set_time_limit(0);
define('IN_PHPBB', true);
$phpbb_root_path = './../';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.'.$phpEx);
include($phpbb_root_path . 'includes/message_parser.' . $phpEx);
define('PHPBB_ROOT_PATH', './../');
define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
include(PHPBB_ROOT_PATH . 'common.' . PHP_EXT);
include(PHPBB_ROOT_PATH . 'includes/message_parser.' . PHP_EXT);
// Start session management
$user->session_begin();

View File

@@ -10,9 +10,9 @@ die("Please read the first lines of this script for instructions on how to enabl
set_time_limit(0);
define('IN_PHPBB', true);
$phpbb_root_path = './../';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.'.$phpEx);
define('PHPBB_ROOT_PATH', './../');
define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
include(PHPBB_ROOT_PATH . 'common.' . PHP_EXT);
// Start session management
$user->session_begin();

View File

@@ -13,9 +13,9 @@ set_time_limit(0);
@ini_set('memory_limit', '128M');
define('IN_PHPBB', true);
$phpbb_root_path = './../';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.'.$phpEx);
define('PHPBB_ROOT_PATH', './../');
define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
include(PHPBB_ROOT_PATH . 'common.' . PHP_EXT);
// Start session management
$user->session_begin();

View File

@@ -7,9 +7,9 @@ die("Please read the first lines of this script for instructions on how to enabl
set_time_limit(0);
define('IN_PHPBB', true);
$phpbb_root_path = './../';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.'.$phpEx);
define('PHPBB_ROOT_PATH', './../');
define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
include(PHPBB_ROOT_PATH . 'common.' . PHP_EXT);
// Start session management
$user->session_begin();

6
phpBB/develop/adjust_uids.php Executable file → Normal file
View File

@@ -12,9 +12,9 @@ set_time_limit(0);
@ini_set('memory_limit', '512M');
define('IN_PHPBB', true);
$phpbb_root_path = './../';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.'.$phpEx);
define('PHPBB_ROOT_PATH', './../');
define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
include(PHPBB_ROOT_PATH . 'common.' . PHP_EXT);
// Start session management
$user->session_begin();

View File

@@ -9,9 +9,9 @@ die("Please read the first lines of this script for instructions on how to enabl
set_time_limit(0);
define('IN_PHPBB', true);
$phpbb_root_path = './../';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.'.$phpEx);
define('PHPBB_ROOT_PATH', './../');
define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
include(PHPBB_ROOT_PATH . 'common.' . PHP_EXT);
// Start session management
$user->session_begin();

View File

@@ -1,462 +0,0 @@
<?php
//
// Security message:
//
// This script is potentially dangerous.
// Remove or comment the next line (die(".... ) to enable this script.
// Do NOT FORGET to either remove this script or disable it after you have used it.
//
die("Please read the first lines of this script for instructions on how to enable it");
//
// Do not change anything below this line.
//
$phpbb_root_path = "../";
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
include($phpbb_root_path . 'includes/post.'.$phpEx);
include($phpbb_root_path . 'includes/bbcode.'.$phpEx);
srand ((double) microtime() * 1000000);
set_time_limit(240*60);
// Here's the text we stick in posts..
$bigass_text = '
phpBB BBCode test suite v0.0.2
auto-linkification:
http://something.com
www.something.com
nate@phpbb.com
http://something.com/foo.php?this=that&theother=some%20encoded%20string is a link.
[code]
Simple code block with some <html> <tags>.
[/code]
[b]bolded[/b], [i]italic[/i]
[email]james@totalgeek.org[/email]
[url=http://www.totalgeek.org]totalgeek.org[/url]
[url]www.totalgeek.org[/url]
[list]
[*] This is the first bulleted item.
[*] This is the second bulleted item.
[/list]
[list=A]
[*] This is the first bulleted item.
[*] This is the second bulleted item.
[/list]
[quote]
And a quote!
[/quote]
';
// The script expects the ID's in the tables to sequential (1,2,3,4,5),
// so no holes please (1,4,5,8)...
$nr_of_users = nrof(USERS_TABLE);
$nr_of_cats = nrof(CATEGORIES_TABLE);
$nr_of_forums = nrof(FORUMS_TABLE);
$nr_of_posts = nrof(POSTS_TABLE);
$u = $users;
$starttime = microtime();
$usercreationcount = 0;
while($users > 0)
{
$name = "testuser_" . substr(md5(uniqid(rand())), 0, 10);
if (make_user($name))
{
$usercreationcount++;
$users--;
}
if (($usercreationcount % 500) == 0)
{
echo "status: $usercreationcount <br>\n";
flush();
}
}
if ($posts > 0)
{
filldb($posts);
}
$endtime = microtime();
if ($submit="" || !isset($submit))
{
?>
Hello, welcome to this little phpBB Benchmarking script :)<p>
At the moment there are:<br>
<table>
<tr><td align="right"><?php echo $nr_of_users?></td><td>Users</td></tr>
<tr><td align="right"><?php echo $nr_of_forums?></td><td>Forums</td></tr>
<tr><td align="right"><?php echo $nr_of_posts?></td><td>Posts</td></tr>
</table>
<p>
What do you want to create?<p>
<form method="get" action="<?php echo $PHP_SELF?>">
<input type="text" name="users" size="3"> Users<br>
<input type="text" name="posts" size="3"> Posts/topics (optional: post size in <input type="text" name="size" size="3"> bytes)<br>
<input type="submit" name="submit">
</form>
<?php
}
else
{
list ($starttime_msec,$starttime_sec) = explode(" ",$starttime);
list ($endtime_msec,$endtime_sec) = explode(" ",$endtime);
$timetaken_sec = ($endtime_sec+$endtime_msec) - ($starttime_sec+$starttime_msec);
print "<B>TIME TAKEN : ".$timetaken_sec."s</B><BR>\n";
print "<p>\n<a href=\"$PHP_SELF\">Back to the overview page</a>\n";
}
function filldb($newposts)
{
global $nr_of_forums;
global $nr_of_users;
$forum_topic_counts = array();
for ($i = 1; $i <= $nr_of_forums; $i++)
{
$forum_topic_counts[$i] = get_topic_count($i);
}
for($i = 0; $i < $newposts; $i++)
{
$userid = rand(2, $nr_of_users - 1);
$forum = rand(1,$nr_of_forums);
if ((rand(0,30) < 1) || ($forum_topic_count[$forum] == 0))
{
// create a new topic 1 in 30 times (or when there are none);
$topic = make_topic($userid, "Testing topic $i", $forum);
$forum_topic_count[$forum]++;
}
else
{
// Otherwise create a reply(posting) somewhere.
$topic = get_smallest_topic($forum);
create_posting($userid, $topic, $forum, "reply");
}
if (($i % 1000) == 0)
{
echo "status: $i <br>";
flush();
}
}
}
function get_smallest_topic($forum_id)
{
global $db;
$sql = "SELECT topic_id
FROM " . TOPICS_TABLE . "
WHERE (forum_id = $forum_id)
ORDER BY topic_replies ASC LIMIT 1";
if($result = $db->sql_query($sql))
{
$row = $db->sql_fetchrow($result);
$topic_id = $row['topic_id'];
unset($result);
unset($row);
return $topic_id;
}
else
{
message_die(GENERAL_ERROR, "Couldn't get smallest topic.", "", __LINE__, __FILE__, $sql);
}
}
function get_topic_count($forum_id)
{
global $db;
$sql = "SELECT forum_topics
FROM " . FORUMS_TABLE . "
WHERE (forum_id = $forum_id)";
if($result = $db->sql_query($sql))
{
$row = $db->sql_fetchrow($result);
$topic_count = $row['forum_topics'];
unset($result);
unset($row);
return $topic_count;
}
else
{
message_die(GENERAL_ERROR, "Couldn't get topic count.", "", __LINE__, __FILE__, $sql);
}
}
function make_topic($user_id, $subject, $forum_id)
{
global $db;
$topic_type = POST_NORMAL;
$topic_vote = 0;
$current_time = time();
$sql = "INSERT INTO " . TOPICS_TABLE . " (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_vote)
VALUES ('$subject', $user_id, $current_time, $forum_id, " . TOPIC_UNLOCKED . ", $topic_type, $topic_vote)";
if( $result = $db->sql_query($sql, BEGIN_TRANSACTION) )
{
$new_topic_id = $db->sql_nextid();
}
else
{
message_die(GENERAL_ERROR, "Error inserting data into topics table", "", __LINE__, __FILE__, $sql);
}
create_posting($user_id, $new_topic_id, $forum_id);
return $new_topic_id;
}
function create_posting($userid, $topic_id, $forum, $mode='newtopic')
{
$message = generatepost();
return make_post($topic_id, $forum, $userid, "", $message, $mode);
}
function make_post($new_topic_id, $forum_id, $user_id, $post_username, $text, $mode='newtopic')
{
global $db;
$current_time = time();
$user_ip = "ac100202";
$bbcode_on = 1;
$html_on = 1;
$smilies_on = 1;
$attach_sig = 1;
$bbcode_uid = make_bbcode_uid();
$post_subject = 'random subject';
$post_message = prepare_message($text, $html_on, $bbcode_on, $smilies_on, $bbcode_uid);
$sql = "INSERT INTO " . POSTS_TABLE . " (topic_id, forum_id, poster_id, attach_id, icon_id, post_username, post_time, poster_ip, post_approved, bbcode_uid, enable_bbcode, enable_html, enable_smilies, enable_sig, post_subject, post_text)
VALUES ($new_topic_id, $forum_id, $user_id, 0, 0, '$post_username', $current_time, '$user_ip', 1, '$bbcode_uid', $bbcode_on, $html_on, $smilies_on, $attach_sig, '$post_subject', '$post_message')";
$result = $db->sql_query($sql);
if ($result)
{
$new_post_id = $db->sql_nextid();
$sql = "UPDATE " . TOPICS_TABLE . "
SET topic_last_post_id = $new_post_id";
if($mode == "reply")
{
$sql .= ", topic_replies = topic_replies + 1 ";
}
$sql .= " WHERE topic_id = $new_topic_id";
if($db->sql_query($sql))
{
$sql = "UPDATE " . FORUMS_TABLE . "
SET forum_last_post_id = $new_post_id, forum_posts = forum_posts + 1";
if($mode == "newtopic")
{
$sql .= ", forum_topics = forum_topics + 1";
}
$sql .= " WHERE forum_id = $forum_id";
if($db->sql_query($sql))
{
$sql = "UPDATE " . USERS_TABLE . "
SET user_posts = user_posts + 1
WHERE user_id = " . $user_id;
if($db->sql_query($sql, END_TRANSACTION))
{
// SUCCESS.
return true;
}
else
{
message_die(GENERAL_ERROR, "Error updating users table", "", __LINE__, __FILE__, $sql);
}
}
else
{
message_die(GENERAL_ERROR, "Error updating forums table", "", __LINE__, __FILE__, $sql);
}
}
else
{
// Rollback
if($db->sql_layer == "mysql")
{
$sql = "DELETE FROM " . POSTS_TABLE . "
WHERE post_id = $new_post_id";
$db->sql_query($sql);
}
message_die(GENERAL_ERROR, "Error updating topics table", "", __LINE__, __FILE__, $sql);
}
}
else
{
message_die(GENERAL_ERROR, "Error inserting data into posts table", "", __LINE__, __FILE__, $sql);
}
}
function generatepost($size=850)
{
global $bigass_text;
// Returns a string with a length between $size and $size*0.2
$size = rand(0.2*$size, $size);
$textsize = strlen($bigass_text);
$currentsize = 0;
// Add whole $text multiple times
while($currentsize < $size && $size-$currentsize <= $textsize)
{
$message .= $bigass_text;
$currentsize += $textsize;
}
// Add the remainder number of chars and return it.
$message .= substr($bigass_text, 0, $size-$currentsize);
return (addslashes($message));
}
function nrof($table)
{
global $db;
$sql = "SELECT count(*) AS counted FROM $table";
$result = $db->sql_query($sql);
$topics = $db->sql_fetchrow($result);
return $topics[counted];
}
function make_user($username)
{
global $db, $board_config;
$password = md5("benchpass");
$email = "nobody@localhost";
$icq = "12345678";
$website = "http://www.phpbb.com";
$occupation = "phpBB tester";
$location = "phpBB world hq";
$interests = "Eating, sleeping, living, and breathing phpBB";
$signature = "$username: phpBB tester.";
$signature_bbcode_uid = "";
$avatar_filename = "";
$viewemail = 0;
$aim = 0;
$yim = 0;
$msn = 0;
$attachsig = 1;
$allowsmilies = 1;
$allowhtml = 1;
$allowbbcode = 1;
$allowviewonline = 1;
$notifyreply = 0;
$notifypm = 0;
$user_timezone = $board_config['board_timezone'];
$user_dateformat = $board_config['default_dateformat'];
$user_lang = $board_config['default_lang'];
$user_style = $board_config['default_style'];
$sql = "SELECT MAX(user_id) AS total
FROM " . USERS_TABLE;
if($result = $db->sql_query($sql))
{
$row = $db->sql_fetchrow($result);
$new_user_id = $row['total'] + 1;
unset($result);
unset($row);
}
else
{
message_die(GENERAL_ERROR, "Couldn't obtained next user_id information.", "", __LINE__, __FILE__, $sql);
}
$sql = "SELECT MAX(group_id) AS total
FROM " . GROUPS_TABLE;
if($result = $db->sql_query($sql))
{
$row = $db->sql_fetchrow($result);
$new_group_id = $row['total'] + 1;
unset($result);
unset($row);
}
else
{
message_die(GENERAL_ERROR, "Couldn't obtained next user_id information.", "", __LINE__, __FILE__, $sql);
}
$sql = "INSERT INTO " . USERS_TABLE . " (user_id, username, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_sig_bbcode_uid, user_avatar, user_viewemail, user_aim, user_yim, user_msnm, user_attachsig, user_allowsmilies, user_allowhtml, user_allowbbcode, user_allow_viewonline, user_notify, user_notify_pm, user_timezone, user_dateformat, user_lang, user_style, user_level, user_allow_pm, user_active, user_actkey)
VALUES ($new_user_id, '$username', " . time() . ", '$password', '$email', '$icq', '$website', '$occupation', '$location', '$interests', '$signature', '$signature_bbcode_uid', '$avatar_filename', $viewemail, '$aim', '$yim', '$msn', $attachsig, $allowsmilies, $allowhtml, $allowbbcode, $allowviewonline, $notifyreply, $notifypm, $user_timezone, '$user_dateformat', '$user_lang', $user_style, 0, 1, ";
$sql .= "1, '')";
if($result = $db->sql_query($sql, BEGIN_TRANSACTION))
{
$sql = "INSERT INTO " . GROUPS_TABLE . " (group_id, group_name, group_description, group_single_user, group_moderator)
VALUES ($new_group_id, '', 'Personal User', 1, 0)";
if($result = $db->sql_query($sql))
{
$sql = "INSERT INTO " . USER_GROUP_TABLE . " (user_id, group_id, user_pending)
VALUES ($new_user_id, $new_group_id, 0)";
if($result = $db->sql_query($sql, END_TRANSACTION))
{
// SUCCESS.
return true;
}
else
{
message_die(GENERAL_ERROR, "Couldn't insert data into user_group table", "", __LINE__, __FILE__, $sql);
}
}
else
{
message_die(GENERAL_ERROR, "Couldn't insert data into groups table", "", __LINE__, __FILE__, $sql);
}
}
else
{
message_die(GENERAL_ERROR, "Couldn't insert data into users table", "", __LINE__, __FILE__, $sql);
}
}
?>

View File

@@ -21,22 +21,10 @@
die("Please read the first lines of this script for instructions on how to enable it");
@set_time_limit(300);
$db = $dbhost = $dbuser = $dbpasswd = $dbport = $dbname = '';
define('IN_PHPBB', 1);
define('ANONYMOUS', 1);
$phpEx = substr(strrchr(__FILE__, '.'), 1);
$phpbb_root_path='./../';
include($phpbb_root_path . 'config.'.$phpEx);
require($phpbb_root_path . 'includes/acm/acm_' . $acm_type . '.'.$phpEx);
require($phpbb_root_path . 'includes/db/' . $dbms . '.'.$phpEx);
include($phpbb_root_path . 'includes/functions.'.$phpEx);
$cache = new acm();
$db = new sql_db();
// Connect to DB
$db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false);
define('PHPBB_ROOT_PATH', './../');
define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
include(PHPBB_ROOT_PATH . 'common.' . PHP_EXT);
$start = 0;
do

View File

@@ -30,23 +30,9 @@ die("Please read the first lines of this script for instructions on how to enabl
@set_time_limit(2400);
// This script adds missing permissions
$db = $dbhost = $dbuser = $dbpasswd = $dbport = $dbname = '';
define('IN_PHPBB', 1);
define('ANONYMOUS', 1);
$phpEx = substr(strrchr(__FILE__, '.'), 1);
$phpbb_root_path='./../';
include($phpbb_root_path . 'config.'.$phpEx);
require($phpbb_root_path . 'includes/acm/acm_' . $acm_type . '.'.$phpEx);
require($phpbb_root_path . 'includes/db/' . $dbms . '.'.$phpEx);
include($phpbb_root_path . 'includes/functions.'.$phpEx);
$cache = new acm();
$db = new $sql_db();
// Connect to DB
$db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false);
define('PHPBB_ROOT_PATH', './../');
define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
include(PHPBB_ROOT_PATH . 'common.' . PHP_EXT);
$sql = "SELECT post_id, post_text FROM {$table_prefix}posts WHERE post_text LIKE '%{SMILE_PATH}%'";
$result = $db->sql_query($sql);

File diff suppressed because it is too large Load Diff

View File

@@ -21,10 +21,10 @@ die("Please read the first lines of this script for instructions on how to enabl
define('IN_PHPBB', true);
$phpbb_root_path = './../';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.'.$phpEx);
include($phpbb_root_path . 'includes/functions_admin.'.$phpEx);
define('PHPBB_ROOT_PATH', './../');
define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
include(PHPBB_ROOT_PATH . 'common.' . PHP_EXT);
include(PHPBB_ROOT_PATH . 'includes/functions_admin.' . PHP_EXT);
set_time_limit(0);
header('Expires: 0');
@@ -117,14 +117,14 @@ switch ($mode)
if ($topic_id >= $num_topics)
{
echo '<meta http-equiv="refresh" content="10; url=fill.' . $phpEx . '?mode=sync&amp;' . time() . '">And now for something completely different...';
echo '<meta http-equiv="refresh" content="10; url=fill.' . PHP_EXT . '?mode=sync&amp;' . time() . '">And now for something completely different...';
$db->sql_query('ANALYZE TABLES ' . TOPICS_TABLE . ', ' . POSTS_TABLE);
flush();
}
else
{
echo '<meta http-equiv="refresh" content="10; url=fill.' . $phpEx . '?start=' . $topic_id . '&amp;' . time() . '">To the next page... (' . $topic_id . '/' . $num_topics . ')';
echo '<meta http-equiv="refresh" content="10; url=fill.' . PHP_EXT . '?start=' . $topic_id . '&amp;' . time() . '">To the next page... (' . $topic_id . '/' . $num_topics . ')';
flush();
}
break;
@@ -141,7 +141,7 @@ switch ($mode)
$e = explode(' ', microtime());
echo '<pre><b>' . ($e[0] + $e[1] - $s[0] - $s[1]) . '</b></pre>';
echo '<a href="fill.' . $phpEx . '">Here we go again</a>';
echo '<a href="fill.' . PHP_EXT . '">Here we go again</a>';
}
else
{
@@ -157,11 +157,11 @@ switch ($mode)
if ($end < $num_topics)
{
$start += $batch_size;
echo '<meta http-equiv="refresh" content="0; url=fill.' . $phpEx . "?mode=sync&amp;start=$start&amp;" . time() . "\">And now for something completely different... ($start/$num_topics)";
echo '<meta http-equiv="refresh" content="0; url=fill.' . PHP_EXT . "?mode=sync&amp;start=$start&amp;" . time() . "\">And now for something completely different... ($start/$num_topics)";
}
else
{
echo '<a href="fill.' . $phpEx . '">Here we go again</a>';
echo '<a href="fill.' . PHP_EXT . '">Here we go again</a>';
}
}

View File

@@ -25,8 +25,8 @@ die("Please read the first lines of this script for instructions on how to enabl
set_time_limit(0);
define('IN_PHPBB', true);
$phpbb_root_path = '../';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
define('PHPBB_ROOT_PATH', './../');
define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
echo "Checking for required files\n";
download('http://unicode.org/Public/UNIDATA/CaseFolding.txt');
@@ -71,8 +71,8 @@ foreach ($array as $value)
foreach ($uniarray as $idx => $contents)
{
echo "Writing to case_fold_$idx.$phpEx\n";
$fp = fopen($phpbb_root_path . 'includes/utf/data/case_fold_' . strtolower($idx) . '.' . $phpEx, 'wb');
echo "Writing to case_fold_$idx." . PHP_EXT . "\n";
$fp = fopen(PHPBB_ROOT_PATH . 'includes/utf/data/case_fold_' . strtolower($idx) . '.' . PHP_EXT, 'wb');
fwrite($fp, '<?php return ' . my_var_export($contents) . ';');
fclose($fp);
}
@@ -116,9 +116,7 @@ function my_var_export($var)
*/
function download($url)
{
global $phpbb_root_path;
if (file_exists($phpbb_root_path . 'develop/' . basename($url)))
if (file_exists(PHPBB_ROOT_PATH . 'develop/' . basename($url)))
{
return;
}
@@ -130,7 +128,7 @@ function download($url)
die("Can't download from $url\nPlease download it yourself and put it in the develop/ dir, kthxbai");
}
if (!$fpw = fopen($phpbb_root_path . 'develop/' . basename($url), 'wb'))
if (!$fpw = fopen(PHPBB_ROOT_PATH . 'develop/' . basename($url), 'wb'))
{
die("Can't open develop/" . basename($url) . " for output... please check your permissions or something");
}

View File

@@ -25,8 +25,8 @@ die("Please read the first lines of this script for instructions on how to enabl
set_time_limit(0);
define('IN_PHPBB', true);
$phpbb_root_path = '../';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
define('PHPBB_ROOT_PATH', './../');
define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
echo "Checking for required files\n";
download('http://unicode.org/reports/tr39/data/confusables.txt');
@@ -155,9 +155,9 @@ foreach ($array as $value)
$uniarray[utf8_chr(hexdec((string)$value[1]))] = $temp_hold;
}
echo "Writing to confusables.$phpEx\n";
echo "Writing to confusables." . PHP_EXT . "\n";
$fp = fopen($phpbb_root_path . 'includes/utf/data/confusables.' . $phpEx, 'wb');
$fp = fopen(PHPBB_ROOT_PATH . 'includes/utf/data/confusables.' . PHP_EXT, 'wb');
fwrite($fp, '<?php return ' . my_var_export($uniarray) . ';');
fclose($fp);
@@ -200,9 +200,7 @@ function my_var_export($var)
*/
function download($url)
{
global $phpbb_root_path;
if (file_exists($phpbb_root_path . 'develop/' . basename($url)))
if (file_exists(PHPBB_ROOT_PATH . 'develop/' . basename($url)))
{
return;
}
@@ -214,7 +212,7 @@ function download($url)
die("Can't download from $url\nPlease download it yourself and put it in the develop/ dir, kthxbai");
}
if (!$fpw = fopen($phpbb_root_path . 'develop/' . basename($url), 'wb'))
if (!$fpw = fopen(PHPBB_ROOT_PATH . 'develop/' . basename($url), 'wb'))
{
die("Can't open develop/" . basename($url) . " for output... please check your permissions or something");
}

View File

@@ -25,8 +25,8 @@ die("Please read the first lines of this script for instructions on how to enabl
set_time_limit(0);
define('IN_PHPBB', true);
$phpbb_root_path = '../';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
define('PHPBB_ROOT_PATH', './../');
define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
echo "Checking for required files\n";
download('http://www.unicode.org/Public/UNIDATA/CompositionExclusions.txt');
@@ -34,7 +34,7 @@ download('http://www.unicode.org/Public/UNIDATA/DerivedNormalizationProps.txt');
download('http://www.unicode.org/Public/UNIDATA/UnicodeData.txt');
echo "\n";
require_once($phpbb_root_path . 'includes/utf/utf_normalizer.' . $phpEx);
require_once(PHPBB_ROOT_PATH . 'includes/utf/utf_normalizer.' . PHP_EXT);
$file_contents = array();
/**
@@ -172,7 +172,7 @@ fclose($fp);
* Do mappings
*/
echo "Loading Unicode decomposition mappings\n";
$fp = fopen($phpbb_root_path . 'develop/UnicodeData.txt', 'rt');
$fp = fopen(PHPBB_ROOT_PATH . 'develop/UnicodeData.txt', 'rt');
$map = array();
while (!feof($fp))
@@ -266,9 +266,9 @@ foreach ($file_contents as $file => $contents)
/**
* Generate a new file
*/
echo "Writing to $file.$phpEx\n";
echo "Writing to $file." . PHP_EXT . "\n";
if (!$fp = fopen($phpbb_root_path . 'includes/utf/data/' . $file . '.' . $phpEx, 'wb'))
if (!$fp = fopen(PHPBB_ROOT_PATH . 'includes/utf/data/' . $file . '.' . PHP_EXT, 'wb'))
{
trigger_error('Cannot open ' . $file . ' for write');
}
@@ -288,7 +288,7 @@ echo "\n*** UTF-8 normalization tables done\n\n";
*/
echo "Generating search indexer tables\n";
$fp = fopen($phpbb_root_path . 'develop/UnicodeData.txt', 'rt');
$fp = fopen(PHPBB_ROOT_PATH . 'develop/UnicodeData.txt', 'rt');
$map = array();
while ($line = fgets($fp, 1024))
@@ -406,8 +406,8 @@ unset($map);
foreach ($file_contents as $idx => $contents)
{
echo "Writing to search_indexer_$idx.$phpEx\n";
$fp = fopen($phpbb_root_path . 'includes/utf/data/search_indexer_' . $idx . '.' . $phpEx, 'wb');
echo "Writing to search_indexer_$idx." . PHP_EXT . "\n";
$fp = fopen(PHPBB_ROOT_PATH . 'includes/utf/data/search_indexer_' . $idx . '.' . PHP_EXT, 'wb');
fwrite($fp, '<?php return ' . my_var_export($contents) . ';');
fclose($fp);
}
@@ -486,9 +486,7 @@ function my_var_export($var)
*/
function download($url)
{
global $phpbb_root_path;
if (file_exists($phpbb_root_path . 'develop/' . basename($url)))
if (file_exists(PHPBB_ROOT_PATH . 'develop/' . basename($url)))
{
return;
}
@@ -500,7 +498,7 @@ function download($url)
die("Can't download from $url\nPlease download it yourself and put it in the develop/ dir, kthxbai");
}
if (!$fpw = fopen($phpbb_root_path . 'develop/' . basename($url), 'wb'))
if (!$fpw = fopen(PHPBB_ROOT_PATH . 'develop/' . basename($url), 'wb'))
{
die("Can't open develop/" . basename($url) . " for output... please check your permissions or something");
}

View File

@@ -24,13 +24,13 @@ die("Please read the first lines of this script for instructions on how to enabl
// Thanks to arod-1
define('IN_PHPBB', 1);
$phpEx = substr(strrchr(__FILE__, '.'), 1);
$phpbb_root_path='./../';
include($phpbb_root_path . 'common.'.$phpEx);
define('PHPBB_ROOT_PATH', './../');
define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
include(PHPBB_ROOT_PATH . 'common.' . PHP_EXT);
$mode = request_var('mode', '');
$modules = find_modules($phpbb_root_path . 'language/en');
$modules = find_modules(PHPBB_ROOT_PATH . 'language/en');
$kkeys = $keys = array();
$langdir = dirname(__FILE__);
@@ -81,7 +81,7 @@ while ($module = array_shift($keys))
}
$color = '';
if ((basename($module) == "common.$phpEx") || (basename($other_module) == "common.$phpEx"))
if ((basename($module) == "common." . PHP_EXT) || (basename($other_module) == "common." . PHP_EXT))
{
$color = ' style="color:#B00000;"';
}

View File

@@ -1,80 +0,0 @@
<?php
// -------------------------------------------------------------
//
// $Id$
//
// FILENAME : merge_attachment_tables.php
// STARTED : Tue Nov 04, 2003
// COPYRIGHT : <20> 2001, 2003 phpBB Group
// WWW : http://www.phpbb.com/
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
//
// -------------------------------------------------------------
//
// Security message:
//
// This script is potentially dangerous.
// Remove or comment the next line (die(".... ) to enable this script.
// Do NOT FORGET to either remove this script or disable it after you have used it.
//
die("Please read the first lines of this script for instructions on how to enable it");
$db = $dbhost = $dbuser = $dbpasswd = $dbport = $dbname = '';
define('IN_PHPBB', 1);
define('ANONYMOUS', 1);
$phpEx = substr(strrchr(__FILE__, '.'), 1);
$phpbb_root_path='./../';
include($phpbb_root_path . 'config.'.$phpEx);
require($phpbb_root_path . 'includes/acm/acm_' . $acm_type . '.'.$phpEx);
require($phpbb_root_path . 'includes/db/' . $dbms . '.'.$phpEx);
include($phpbb_root_path . 'includes/functions.'.$phpEx);
$cache = new acm();
$db = new sql_db();
// Connect to DB
$db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false);
// Rename the attachments table...
$sql = "RENAME TABLE {$table_prefix}attachments TO {$table_prefix}attach_temp";
$db->sql_query($sql);
$sql = "CREATE TABLE {$table_prefix}attachments
SELECT d.*, a.post_id, a.user_id_from as poster_id, p.topic_id
FROM {$table_prefix}attach_desc d, {$table_prefix}attach_temp a, {$table_prefix}posts p
WHERE a.attach_id = d.attach_id
AND a.post_id = p.post_id";
$db->sql_query($sql);
switch ($db->sql_layer)
{
case 'mysql':
case 'mysql4':
$sql = 'ALTER TABLE ' . $table_prefix . 'attachments
ADD PRIMARY KEY (attach_id),
ADD INDEX filetime (filetime),
ADD INDEX post_id (post_id),
ADD INDEX poster_id (poster_id),
ADD INDEX physical_filename (physical_filename(10)),
ADD INDEX filesize (filesize),
ADD INDEX topic_id (topic_id),
MODIFY COLUMN attach_id mediumint(8) UNSIGNED NOT NULL auto_increment';
break;
case 'mssql':
case 'mssql-odbc':
case 'msaccess':
break;
case 'postgresql':
break;
}
$db->sql_query($sql);
//$db->sql_query("DROP TABLE {$table_prefix}attach_temp");
echo "<p><b>Done</b></p>\n";
?>

View File

@@ -1,209 +0,0 @@
<?php
/***************************************************************************
* merge_clean_posts.php
* -------------------
* begin : Tuesday, February 25, 2003
* copyright : (C) 2003 The phpBB Group
* email : support@phpbb.com
*
* $Id$
*
***************************************************************************/
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
//
// Security message:
//
// This script is potentially dangerous.
// Remove or comment the next line (die(".... ) to enable this script.
// Do NOT FORGET to either remove this script or disable it after you have used it.
//
die("Please read the first lines of this script for instructions on how to enable it");
@set_time_limit(2400);
$db = $dbhost = $dbuser = $dbpasswd = $dbport = $dbname = '';
define('IN_PHPBB', 1);
define('ANONYMOUS', 1);
$phpbb_root_path='./../';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'config.'.$phpEx);
include($phpbb_root_path . 'includes/functions.'.$phpEx);
require($phpbb_root_path . 'includes/acm/cache_' . $acm_type . '.'.$phpEx);
include($phpbb_root_path . 'db/' . $dbms . '.'.$phpEx);
$cache = new acm();
$db = new sql_db($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false);
// Just Do it (tm)
$sql = "RENAME TABLE {$table_prefix}posts TO {$table_prefix}posts_temp";
$db->sql_query($sql);
$sql = "CREATE TABLE {$table_prefix}posts
SELECT p.*, pt.post_subject, pt.post_text, pt.post_checksum, pt.bbcode_bitfield, pt.bbcode_uid
FROM {$table_prefix}posts_temp p, {$table_prefix}posts_text pt
WHERE pt.post_id = p.post_id";
$db->sql_query($sql);
switch ($db->sql_layer)
{
case 'mysql':
case 'mysql4':
$sql = 'ALTER TABLE ' . $table_prefix . 'posts
ADD PRIMARY KEY (post_id),
ADD INDEX topic_id (topic_id),
ADD INDEX poster_ip (poster_ip),
ADD INDEX post_approved (post_approved),
MODIFY COLUMN post_id mediumint(8) UNSIGNED NOT NULL auto_increment,
ADD COLUMN post_encoding varchar(11) DEFAULT \'iso-8859-15\' NOT NULL';
break;
case 'mssql':
case 'mssql-odbc':
case 'msaccess':
break;
case 'postgresql':
break;
}
$db->sql_query($sql);
$sql = "UPDATE {$table_prefix}topics SET topic_poster = 1 WHERE topic_poster = 0 OR topic_poster IS NULL";
$db->sql_query($sql);
$sql = "UPDATE {$table_prefix}topics SET topic_last_poster_id = 1 WHERE topic_last_poster_id = 0 OR topic_last_poster_id IS NULL";
$db->sql_query($sql);
$sql = "UPDATE {$table_prefix}posts SET poster_id = 1 WHERE poster_id = 0 OR poster_id IS NULL";
$db->sql_query($sql);
$sql = "UPDATE {$table_prefix}users SET user_id = 1 WHERE user_id = 0";
$db->sql_query($sql);
$sql = "SELECT t.topic_id
FROM {$table_prefix}topics t
LEFT JOIN {$table_prefix}posts p ON p.topic_id = t.topic_id
WHERE p.topic_id IS NULL";
$result = $db->sql_query($sql);
if ($row = $db->sql_fetchrow($result))
{
$del_sql = '';
do
{
$del_sql .= (($del_sql != '') ? ', ' : '') . $row['topic_id'];
}
while ($row = $db->sql_fetchrow($result));
$sql = "DELETE FROM {$table_prefix}topics
WHERE topic_id IN ($del_sql)";
$db->sql_query($sql);
}
$db->sql_freeresult($result);
$del_sql = '';
$sql = "SELECT topic_id, MIN(post_id) AS first_post_id, MAX(post_id) AS last_post_id, COUNT(post_id) AS total_posts
FROM {$table_prefix}posts
GROUP BY topic_id";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
$del_sql .= (($del_sql != '') ? ', ' : '') . $row['topic_id'];
$sql = "UPDATE {$table_prefix}topics
SET topic_first_post_id = " . $row['first_post_id'] . ", topic_last_post_id = " . $row['last_post_id'] . ", topic_replies = " . ($row['total_posts'] - 1) . "
WHERE topic_id = " . $row['topic_id'];
$db->sql_query($sql);
}
$db->sql_freeresult($result);
$sql = "DELETE FROM {$table_prefix}topics WHERE topic_id NOT IN ($del_sql)";
$db->sql_query($sql);
$topic_count = $post_count = array();
$sql = "SELECT forum_id, COUNT(topic_id) AS topics
FROM {$table_prefix}topics
GROUP BY forum_id";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
$topic_count[$row['forum_id']] = $row['topics'];
}
$db->sql_freeresult($result);
$sql = "SELECT forum_id, COUNT(post_id) AS posts
FROM {$table_prefix}posts
GROUP BY forum_id";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
$post_count[$row['forum_id']] = $row['posts'];
}
$db->sql_freeresult($result);
switch ($db->sql_layer)
{
case 'oracle':
$sql = "SELECT f.*, p.post_time, p.post_username, u.username, u.user_id
FROM " . $table_prefix . "forums f, " . $table_prefix . "posts p, " . $table_prefix . "users u
WHERE p.post_id = f.forum_last_post_id(+)
AND u.user_id = p.poster_id(+)";
break;
default:
$sql = "SELECT f.forum_id, p.post_time, p.post_username, u.username, u.user_id
FROM ((" . $table_prefix . "forums f
LEFT JOIN " . $table_prefix . "posts p ON p.post_id = f.forum_last_post_id)
LEFT JOIN " . $table_prefix . "users u ON u.user_id = p.poster_id)";
break;
}
$result = $db->sql_query($sql);
$sql_ary = array();
while ($row = $db->sql_fetchrow($result))
{
$forum_id = $row['forum_id'];
$sql_ary[] = "UPDATE " . $table_prefix . "forums
SET forum_last_poster_id = " . ((!empty($row['user_id']) && $row['user_id'] != ANONYMOUS) ? $row['user_id'] : ANONYMOUS) . ", forum_last_poster_name = '" . ((!empty($row['user_id']) && $row['user_id'] != ANONYMOUS) ? addslashes($row['username']) : addslashes($row['post_username'])) . "', forum_last_post_time = " . $row['post_time'] . ", forum_posts = " . (($post_count[$forum_id]) ? $post_count[$forum_id] : 0) . ", forum_topics = " . (($topic_count[$forum_id]) ? $topic_count[$forum_id] : 0) . "
WHERE forum_id = $forum_id";
$sql = "SELECT t.topic_id, u.username, u.user_id, u2.username as user2, u2.user_id as id2, p.post_username, p2.post_username AS post_username2, p2.post_time
FROM " . $table_prefix . "topics t, " . $table_prefix . "users u, " . $table_prefix . "posts p, " . $table_prefix . "posts p2, " . $table_prefix . "users u2
WHERE t.forum_id = $forum_id
AND u.user_id = t.topic_poster
AND p.post_id = t.topic_first_post_id
AND p2.post_id = t.topic_last_post_id
AND u2.user_id = p2.poster_id";
$result2 = $db->sql_query($sql);
while ($row2 = $db->sql_fetchrow($result2))
{
$sql_ary[] = "UPDATE " . $table_prefix . "topics
SET topic_poster = " . $row2['user_id'] . ", topic_first_poster_name = '" . ((!empty($row2['user_id']) && $row2['user_id'] != ANONYMOUS) ? addslashes($row2['username']) : addslashes($row2['post_username'])) . "', topic_last_poster_id = " . ((!empty($row2['id2']) && $row2['id2'] != ANONYMOUS) ? $row2['id2'] : ANONYMOUS) . ", topic_last_post_time = " . $row2['post_time'] . ", topic_last_poster_name = '" . ((!empty($row2['id2']) && $row2['id2'] != ANONYMOUS) ? addslashes($row2['user2']) : addslashes($row2['post_username2'])) . "'
WHERE topic_id = " . $row2['topic_id'];
}
$db->sql_freeresult($result2);
unset($row2);
}
$db->sql_freeresult($result);
foreach ($sql_ary as $sql)
{
$sql . "<br />";
$db->sql_query($sql);
}
echo "<p><b>Done</b></p>\n";
?>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,866 @@
<?php
define('IN_PHPBB', true);
define('PHPBB_ROOT_PATH', './../');
define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
include(PHPBB_ROOT_PATH . 'common.' . PHP_EXT);
//$db = new dbal_mysqli();
class posting_api
{
/*
topic table:
topic_id
forum_id
topic_title
topic_status
topic_type
topic_shadow_id // to implement
sec:
topic_posts
topic_shadow_posts
topic_deleted_posts
topic_unapproved_posts
all must be approved:
topic_poster
topic_first_poster_name
topic_first_poster_id
topic_last_post_id
topic_last_poster_name
topic_last_poster_id
topic_last_post_title
topic_last_post_time
*/
/*
post table:
post_id
topic_id
post_subject
post_body
post_status
post_type
post_username
poster_id
forum_id
post_time
/*
forum table:
forum_id
forum_posts
forum_shadow_posts
forum_deleted_posts
forum_unapproved_posts
sec:
forum_topics
forum_shadow_topics
forum_deleted_topics
forum_unapproved_topics
forum_last_poster_name
forum_last_user_id
forum_last_post_title
forum_last_post_time
*/
const NORMAL = 0;
// status
const UNAPPROVED = 1;
const DELETED = 2;
// type
const ANNOUNCEMENT = 1;
const STICKY = 2;
// we, for now, only support the insertion of posts that are not already
// shadow'd and not deleted (it must first exist for it to be shadow'd or deleted!)
static function insert_topic($data)
{
global $db;
// one transaction, we can now garuntee that atomicity of insertions
$db->sql_transaction('begin');
$user_id = (int) $data['user_id'];
$forum_id = (int) $data['forum_id'];
$topic_title = $data['title'];
$post_contents = $data['post_contents'];
$topic_status = (int) $data['status'];
$topic_type = (int) $data['type'];
$approved = (bool) $data['approved'];
$shadow_forums = $data['shadow_forums'];
$time = ($data['time']) ? (int) $data['time'] : time();
if (isset($data['username']))
{
$username = $data['username'];
}
else
{
$sql = 'SELECT username
FROM ' . USERS_TABLE . '
WHERE user_id = ' . $user_id;
$result = $db->sql_query($sql);
$username = (string) $db->sql_fetchfield('username');
$db->sql_freeresult($result);
}
$sql = 'SELECT forum_topics, forum_unapproved_topics, forum_posts, forum_unapproved_posts
FROM ' . FORUMS_TABLE . '
WHERE forum_id = ' . (int) $forum_id;
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
// throw our topic to the dogs
$topic_data = array(
'topic_title' => $topic_title,
'topic_status' => $topic_status,
'topic_type' => $topic_type,
'topic_posts' => 1,
'topic_shadow_posts' => 0,
'topic_deleted_posts' => 0,
'topic_unapproved_posts' => ($approved) ? 0 : 1,
'topic_first_poster_name' => $username,
'topic_poster' => $user_id,
'topic_last_username' => $username,
'topic_last_post_title' => $topic_title,
'topic_last_post_time' => $time,
'topic_last_poster_id' => $user_id,
'forum_id' => $forum_id
);
$db->sql_handle_data('INSERT', TOPICS_TABLE, $topic_data);
$topic_id = $db->sql_nextid();
// I suppose it is time to make us a post, no?
$post_data = array(
'topic_id' => $topic_id,
'post_subject' => $topic_title,
'post_body' => $post_contents,
'post_username' => $username,
'poster_id' => $user_id,
'post_status' => $topic_status, // first post inherits its type from the topic
'post_type' => self::NORMAL, // for now, there are no shadow, global or sticky posts
'forum_id' => $forum_id
);
$db->sql_handle_data('INSERT', POSTS_TABLE, $post_data);
$post_id = $db->sql_nextid();
// time to fill in the blanks
$db->sql_handle_data('UPDATE', TOPICS_TABLE, array('topic_first_post_id' => $post_id, 'topic_last_post_id' => $post_id), "topic_id = $topic_id");
// let's go update the forum table
$forum_data = array(
'forum_posts' => ++$row['forum_posts'],
'forum_topics' => ++$row['forum_topics'],
);
// the last post inserted is always the latest,
// we must update the forum records to make sure everybody knows the good news
if ($approved)
{
$forum_data['forum_last_poster_name'] = $username;
$forum_data['forum_last_user_id'] = $user_id;
$forum_data['forum_last_post_title'] = $topic_title;
$forum_data['forum_last_post_time'] = $time;
}
else
{
$forum_data['forum_unapproved_posts'] = ++$row['forum_unapproved_posts'];
$forum_data['forum_unapproved_topics'] = ++$row['forum_unapproved_topics'];
}
$db->sql_handle_data('UPDATE', FORUMS_TABLE, $forum_data, "forum_id = $forum_id");
foreach ($shadow_forums as $shadow_forum_id)
{
$data['shadow_topic_id'] = $topic_id;
$data['forum_id'] = $shadow_forum_id;
self::insert_shadow_topic($data);
}
// we are consistant, victory is ours
$db->sql_transaction('commit');
}
// inserts a shadow topic into the database
static function insert_shadow_topic($data)
{
global $db;
// one transaction, we can now garuntee that atomicity of insertions
$db->sql_transaction('begin');
$user_id = (int) $data['user_id'];
$forum_id = (int) $data['forum_id'];
$topic_title = $data['title'];
$topic_status = (int) $data['status'];
$topic_type = (int) $data['type'];
$time = ($data['time']) ? (int) $data['time'] : time();
$shadow_topic_id = (int) $data['shadow_topic_id'];
$approved = (bool) $data['approved'];
if (isset($data['username']))
{
$username = $data['username'];
}
else
{
$sql = 'SELECT username
FROM ' . USERS_TABLE . '
WHERE user_id = ' . $user_id;
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$username = $row['username'];
$db->sql_freeresult($result);
}
$sql = 'SELECT forum_topics, forum_shadow_topics
FROM ' . FORUMS_TABLE . '
WHERE forum_id = ' . (int) $forum_id;
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
// throw our topic to the dogs
$topic_data = array(
'topic_title' => $topic_title,
'topic_status' => $topic_status,
'topic_type' => $topic_type,
'topic_posts' => 0,
'topic_shadow_posts' => 0,
'topic_deleted_posts' => 0,
'topic_unapproved_posts' => ($approved ? 0 : 1),
'topic_first_poster_name' => $username,
'topic_poster' => $user_id,
'topic_last_username' => $username,
'topic_last_post_title' => $topic_title,
'topic_last_post_time' => $time,
'topic_last_poster_id' => $user_id,
'forum_id' => $forum_id,
'topic_shadow_id' => $shadow_topic_id
);
$db->sql_handle_data('INSERT', TOPICS_TABLE, $topic_data);
// let's go update the forum table
$forum_data = array(
'forum_topics' => ++$row['forum_topics'],
'forum_shadow_topics' => ++$row['forum_shadow_topics']
);
// an unapproved shadow topic? I suppose...
if (!$approved)
{
$forum_data['forum_unapproved_topics'] = ++$row['forum_unapproved_topics'];
}
$db->sql_handle_data('UPDATE', FORUMS_TABLE, $forum_data, "forum_id = $forum_id");
// we are consistant, victory is ours
$db->transaction('END');
}
static function insert_post($data)
{
global $db;
// one transaction, we can now garuntee that atomicity of insertions
$db->transaction('BEGIN');
$user_id = (int) $data['user_id'];
$topic_id = (int) $data['topic_id'];
// begin massive amounts of hand holding
if (isset($data['forum_id']))
{
$forum_id = (int) $data['forum_id'];
}
else
{
$sql = 'SELECT forum_id
FROM ' . TOPICS_TABLE . '
WHERE topic_id = ' . $topic_id;
$result = $db->sql_query($sql);
$forum_id = (int) $db->sql_fetchfield('forum_id');
$db->sql_freeresult($result);
}
$post_title = $data['title'];
$post_contents = $data['post_contents'];
$time = ($data['time']) ? (int) $data['time'] : time();
if (isset($data['username']))
{
$username = $data['username'];
}
else
{
$sql = 'SELECT username
FROM ' . USERS_TABLE . '
WHERE user_id = ' . $user_id;
$result = $db->sql_query($sql);
$username = (string) $db->sql_fetchfield('username');
$db->sql_freeresult($result);
}
// hand holding complete, lets write some posts
$sql = 'SELECT forum_topics, forum_unapproved_topics, forum_posts, forum_unapproved_posts
FROM ' . FORUMS_TABLE . '
WHERE forum_id = ' . (int) $forum_id;
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
$post_status = (int) $data['post_status'];
$approved = ($post_status === self::NORMAL);
// I suppose it is time to make us a post, no?
$post_data = array(
'topic_id' => $topic_id,
'post_subject' => $post_title,
'post_body' => $post_contents,
'post_username' => $username,
'poster_id' => $user_id,
'post_status' => $post_status,
'forum_id' => $forum_id,
);
$db->sql_handle_data('INSERT', POSTS_TABLE, $post_data);
// what is the new post_id?
$post_id = $db->sql_nextid();
// iceberg ahead! we must only update the topic information if the post is approved ;)
if ($approved)
{
// time to fill in the blanks
$topics_data = array(
'topic_last_poster_id' => $user_id,
'topic_last_post_id' => $post_id,
'topic_last_poster_name'=> $username,
'topic_last_post_title' => $post_title,
'topic_last_post_time' => $time,
);
$db->sql_handle_data('UPDATE', TOPICS_TABLE, $topics_data, "topic_id = $topic_id");
}
// let's go update the forum table
$forum_data = array(
'forum_posts' => ++$row['forum_posts'],
);
// the last post inserted is always the latest,
// we must update the forum records to make sure everybody knows the good news
if ($approved)
{
$forum_data['forum_last_poster_name'] = $username;
$forum_data['forum_last_user_id'] = $user_id;
$forum_data['forum_last_post_title'] = $post_title;
$forum_data['forum_last_post_time'] = $time;
}
else
{
$forum_data['forum_unapproved_posts'] = ++$row['forum_unapproved_posts'];
}
$db->sql_handle_data('UPDATE', FORUMS_TABLE, $forum_data, "forum_id = $forum_id");
// we are consistant, victory is ours
$db->sql_transaction('commit');
}
static function delete_topic($data)
{
// just call the more powerful variant with just one topic :)
self::delete_topics(array('topic_ids' => array($data['topic_id'])));
}
static function delete_topics($data)
{
global $db;
// lets get this party started
$db->sql_transaction('begin');
$topic_ids = array_map('intval', $data['topic_ids']);
// what kind of topic is this? lets find out how much we must tamper with the forum table...
// TODO: investigate how aggregate functions can speed this up/reduce the number of results returned/misc. other benefits
$sql = 'SELECT topic_posts, topic_shadow_posts, topic_deleted_posts, topic_unapproved_posts, topic_shadow_id, forum_id, topic_status
FROM ' . TOPICS_TABLE . '
WHERE ' . $db->sql_in_set('topic_id', $topic_ids);
$result = $db->sql_query($sql);
// the following in an array, key'd by forum id that refers to topic rows
$forum_lookup = array();
while ($topic_row = $db->sql_fetchrow($result))
{
$forum_id = (int) $topic_row['forum_id'];
// deal with posts
$forum_lookup[$forum_id]['forum_posts'] += $topic_row['topic_posts'];
$forum_lookup[$forum_id]['forum_shadow_posts'] += $topic_row['topic_shadow_posts'];
$forum_lookup[$forum_id]['forum_deleted_posts'] += $topic_row['topic_deleted_posts'];
$forum_lookup[$forum_id]['forum_unapproved_posts'] += $topic_row['topic_unapproved_posts'];
// deal with topics
$topic_status = (int) $topic_row['topic_status'];
$forum_lookup[$forum_id]['forum_topics']++; // a topic is a topic
$forum_lookup[$forum_id]['forum_shadow_topics'] += ($topic_row['topic_shadow_id'] != 0);
$forum_lookup[$forum_id]['forum_deleted_topics'] += ($topic_status & self::DELETED);
$forum_lookup[$forum_id]['forum_unapproved_topics'] += ($topic_status & self::UNAPPROVED);
}
$db->sql_freeresult($result);
// goodnight, topics
$db->sql_query('DELETE FROM ' . TOPICS_TABLE . ' WHERE ' . $db->sql_in_set('topic_id', $topic_ids));
// goodnight, posts
$db->sql_query('DELETE FROM ' . POSTS_TABLE . ' WHERE ' . $db->sql_in_set('topic_id', $topic_ids));
$forum_ids = array_keys($forum_lookup);
// what kind of topic is this? lets find out how much we must tamper with the forum table...
$sql = 'SELECT forum_posts, forum_shadow_posts, forum_deleted_posts, forum_unapproved_posts, forum_id
FROM ' . FORUMS_TABLE . '
WHERE ' . $db->sql_in_set('forum_id', $forum_ids);
$result = $db->sql_query($sql);
$forum_rows = array();
while ($forum_row = $db->sql_fetchrow($result))
{
$forum_id = (int) $forum_row['forum_id'];
$forum_rows[$forum_id] = $forum_row;
}
$db->sql_freeresult($result);
$shadow_topic_ids = array();
foreach ($forum_rows as $forum_id => $forum_row)
{
$topic_row = $forum_lookup[$forum_id];
$forum_array = array(
'forum_posts' => max($forum_row['forum_posts'] - $topic_row['forum_posts'], 0),
'forum_shadow_posts' => max($forum_row['forum_shadow_posts'] - $topic_row['forum_shadow_posts'], 0),
'forum_deleted_posts' => max($forum_row['forum_deleted_posts'] - $topic_row['forum_deleted_posts'], 0),
'forum_unapproved_posts' => max($forum_row['forum_unapproved_posts'] - $topic_row['forum_unapproved_posts'], 0),
'forum_topics' => max($forum_row['forum_topics'] - $topic_row['forum_topics'], 0),
'forum_shadow_topics' => max($forum_row['forum_shadow_topics'] - $topic_row['forum_shadow_topics'], 0),
'forum_deleted_topics' => max($forum_row['forum_deleted_topics'] - $topic_row['forum_deleted_topics'], 0),
'forum_unapproved_topics' => max($forum_row['forum_unapproved_topics'] - $topic_row['forum_unapproved_topics'], 0),
);
// get the last "normal" post in the forum, we _must_ update it
$sql = 'SELECT MAX(post_id) as max_post_id
FROM ' . POSTS_TABLE . '
WHERE post_status = ' . self::NORMAL . '
AND forum_id = ' . $forum_id;
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
// anything left?
if ($row)
{
// OK, lets go do some magick
$sql = 'SELECT post_username, poster_id, post_subject, post_time
FROM '. POSTS_TABLE . '
WHERE post_id = ' . (int) $row['max_post_id'];
$result = $db->sql_query($sql);
$last_post = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
$forum_array['forum_last_user_id'] = (int) $last_post['poster_id'];
$forum_array['forum_last_poster_name'] = $last_post['post_username'];
$forum_array['forum_last_post_title'] = $last_post['post_subject'];
$forum_array['forum_last_post_time'] = (int) $last_post['post_time'];
}
else
{
// reset forum state
$forum_array['forum_last_user_id'] = 0;
$forum_array['forum_last_poster_name'] = '';
$forum_array['forum_last_post_title'] = '';
$forum_array['forum_last_post_time'] = 0;
}
$db->sql_handle_data('UPDATE', FORUMS_TABLE, $forum_array, "forum_id = $forum_id");
}
// let's not get too hasty, we can kill off the shadows later,
// instead we compose a list of all shadows and then efficiently kill them off :)
$sql = 'SELECT topic_id
FROM ' . TOPICS_TABLE . '
WHERE ' . $db->sql_in_set('topic_shadow_id', $topic_ids);
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
$shadow_topic_ids[] = $row['topic_id'];
}
$db->sql_freeresult($result);
// recursion, the other white meat.
if (sizeof($shadow_topic_ids))
{
self::delete_topics(array('topic_ids' => $shadow_topic_ids));
}
// goodnight, moon
$db->transaction('commit');
}
static function delete_post($data)
{
// just call the more powerful variant with just one post :)
self::delete_posts(array('post_ids' => array($data['post_id'])));
}
static function delete_posts($data)
{
global $db;
// lets get this party started
$db->sql_transaction('begin');
$post_ids = array_map('intval', $data['post_ids']);
$sql = 'SELECT topic_id, post_status, post_id, post_shadow_id, forum_id
FROM ' . POSTS_TABLE . '
WHERE ' . $db->sql_in_set('post_id', $post_ids);
$result = $db->sql_query($sql);
// the following arrays are designed to allow for much faster updates
$topic_lookup = array();
$forum_lookup = array();
while ($post_row = $db->sql_fetchrow($result))
{
$topic_id = (int) $post_row['topic_id'];
$forum_id = (int) $post_row['forum_id'];
$post_status = (int) $post_row['post_status'];
$topic_lookup[$topic_id]['topic_posts']++; // we remove a post, go figure
$topic_lookup[$topic_id]['topic_shadow_posts'] += ($post_row['post_shadow_id'] != 0); // did we just try to kill a shadow post?!
$topic_lookup[$topic_id]['topic_deleted_posts'] += ($post_status & self::DELETED);
$topic_lookup[$topic_id]['topic_unapproved_posts'] += ($post_status & self::UNAPPROVED);
$forum_lookup[$forum_id]['forum_posts']++;
$forum_lookup[$topic_id]['forum_shadow_posts'] += ($post_row['post_shadow_id'] != 0); // did we just try to kill a shadow post?!
$forum_lookup[$topic_id]['forum_deleted_posts'] += ($post_status & self::DELETED);
$forum_lookup[$topic_id]['forum_unapproved_posts'] += ($post_status & self::UNAPPROVED);
}
$db->sql_freeresult($result);
$topic_ids = array_keys($forum_lookup);
// goodnight, posts
$db->sql_query('DELETE FROM ' . POSTS_TABLE . ' WHERE ' . $db->sql_in_set('topic_id', $topic_ids));
// mangle the forums table
$sql = 'SELECT forum_posts, forum_shadow_posts, forum_deleted_posts, forum_unapproved_posts, forum_id
FROM ' . FORUMS_TABLE . '
WHERE forum_id = ' . $forum_id;
$result = $db->sql_query($sql);
$forum_rows = array();
while ($forum_row = $db->sql_fetchrow($result))
{
$forum_id = (int) $forum_row['forum_id'];
$forum_rows[$forum_id] = $forum_row;
}
$db->sql_freeresult($result);
$shadow_topic_ids = array();
foreach ($forum_rows as $forum_id => $forum_row)
{
$topic_row = $forum_lookup[$forum_id];
$forum_array = array(
'forum_posts' => max($forum_row['forum_posts'] - $topic_row['forum_posts'], 0),
'forum_shadow_posts' => max($forum_row['forum_shadow_posts'] - $topic_row['forum_shadow_posts'], 0),
'forum_deleted_posts' => max($forum_row['forum_deleted_posts'] - $topic_row['forum_deleted_posts'], 0),
'forum_unapproved_posts' => max($forum_row['forum_unapproved_posts'] - $topic_row['forum_unapproved_posts'], 0),
);
// get the last "normal" post in the forum, we _must_ update it
$sql = 'SELECT MAX(post_id) as max_post_id
FROM ' . POSTS_TABLE . '
WHERE post_status = ' . self::NORMAL . '
AND forum_id = ' . $forum_id;
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
// anything left?
if ($row)
{
// OK, lets go do some magick
$sql = 'SELECT post_username, poster_id, post_subject, post_time
FROM '. POSTS_TABLE . '
WHERE post_id = ' . (int) $row['max_post_id'];
$result = $db->sql_query($sql);
$last_post = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
$forum_array['forum_last_user_id'] = (int) $last_post['poster_id'];
$forum_array['forum_last_poster_name'] = $last_post['post_username'];
$forum_array['forum_last_post_title'] = $last_post['post_subject'];
$forum_array['forum_last_post_time'] = (int) $last_post['post_time'];
}
else
{
// reset forum state
$forum_array['forum_last_user_id'] = 0;
$forum_array['forum_last_poster_name'] = '';
$forum_array['forum_last_post_title'] = '';
$forum_array['forum_last_post_time'] = 0;
}
$db->sql_handle_data('UPDATE', FORUMS_TABLE, $forum_array, "forum_id = $forum_id");
}
// mangle the topics table now :)
$sql = 'SELECT topic_posts, topic_shadow_posts, topic_deleted_posts, topic_unapproved_posts, topic_id
FROM ' . TOPICS_TABLE . '
WHERE forum_id = ' . $forum_id;
$result = $db->sql_query($sql);
$topic_rows = array();
while ($topic_row = $db->sql_fetchrow($result))
{
$topic_id = (int) $topic_row['topic_id'];
$topic_rows[$topic_id] = $topic_row;
}
$db->sql_freeresult($result);
$empty_topic_ids = array();
foreach ($topic_rows as $topic_id => $topic_row)
{
$post_row = $topic_lookup[$topic_id];
$topic_array = array(
'topic_posts' => max($topic_row['topic_posts'] - $post_row['topic_posts'], 0),
'topic_shadow_posts' => max($topic_row['topic_shadow_posts'] - $post_row['topic_shadow_posts'], 0),
'topic_deleted_posts' => max($topic_row['topic_deleted_posts'] - $post_row['topic_deleted_posts'], 0),
'topic_unapproved_posts' => max($topic_row['topic_unapproved_posts'] - $post_row['topic_unapproved_posts'], 0),
);
// get the last "normal" post in the topic, we _must_ update it
$sql = 'SELECT MAX(post_id) as max_post_id
FROM ' . POSTS_TABLE . '
WHERE post_status = ' . self::NORMAL . '
AND topic_id = ' . $topic_id;
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
// anything left?
if ($row)
{
// OK, lets go do some magick
$sql = 'SELECT post_username, poster_id, post_subject, post_time
FROM '. POSTS_TABLE . '
WHERE post_id = ' . (int) $row['max_post_id'];
$result = $db->sql_query($sql);
$last_post = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
$topic_array['topic_last_user_id'] = (int) $last_post['poster_id'];
$topic_array['topic_last_poster_name'] = $last_post['post_username'];
$topic_array['topic_last_post_title'] = $last_post['post_subject'];
$topic_array['topic_last_post_time'] = (int) $last_post['post_time'];
}
else
{
// mark this post for execution!
$empty_topic_ids[] = $topic_id;
}
$db->sql_handle_data('UPDATE', TOPICS_TABLE, $topic_array, "topic_id = $topic_id");
}
$shadow_post_ids = array();
// let's not get too hasty, we can kill off the shadows later,
// instead we compose a list of all shadows and then efficiently kill them off :)
$sql = 'SELECT post_id
FROM ' . POSTS_TABLE . '
WHERE ' . $db->sql_in_set('post_shadow_id', $topic_ids);
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
$shadow_post_ids[] = $row['post_id'];
}
$db->sql_freeresult($result);
// recursion, the other white meat.
if (sizeof($shadow_topic_ids))
{
self::delete_posts(array('post_ids' => $shadow_post_ids));
}
// we killed all the posts in a topic, time to kill the topics!
if (sizeof($empty_topic_ids))
{
self::delete_topics(array('topic_ids' => $empty_topic_ids));
}
// goodnight, moon
$db->transaction('commit');
}
static function move_topic($data)
{
self::move_topics(array('topic_forum_mapping' => array(array('topic_id' => $data['topic_id'], 'forum_id' => $data['forum_id'], 'make_shadow' => $data['make_shadow']))));
}
static function move_topics($data)
{
global $db;
// lets get this party started
$db->transaction('begin');
// all of each are indexed by topic id
$to_forum_ids = $shadow_topic_ids = array();
foreach ($data['topic_forum_mapping'] as $mapping)
{
$topic_id = (int) $mapping['topic_id'];
$to_forum_ids[$topic_id] = (int) $mapping['forum_id'];
if ($mapping['make_shadow'])
{
$shadow_topic_ids[] = $topic_id;
}
}
$forum_columns = array('forum_posts', 'forum_shadow_posts', 'forum_deleted_posts', 'forum_unapproved_posts', 'forum_topics', 'forum_shadow_topics', 'forum_deleted_topics', 'forum_unapproved_topics');
$topic_ids = array_keys($to_forum_ids);
// let us first determine how many items we are removing from the pool
$sql = 'SELECT topic_posts, topic_shadow_posts, topic_deleted_posts, topic_unapproved_posts, forum_id, topic_status, topic_type, topic_shadow_id, topic_id
FROM ' . TOPICS_TABLE . '
WHERE ' . $db->sql_in_set('topic_id', $topic_ids);
$result = $db->sql_query($sql);
$forum_lookup = array();
while ($topic_row = $db->sql_fetchrow($result))
{
$topic_id = $topic_row['topic_id'];
$from_forum_id = (int) $topic_row['forum_id'];
$to_forum_id = $to_forum_ids[$topic_id];
// we are iterating one topic at a time...
$forum_lookup[$from_forum_id]['forum_topics'] = $forum_lookup[$to_forum_id]['forum_topics'] = 1;
foreach ($forum_columns as $column)
{
$forum_lookup[$from_forum_id][$column] -= $topic_row['topic_posts'];
$forum_lookup[$to_forum_id][$column] += $topic_row['topic_posts'];
}
}
$db->sql_freeresult($result);
// determine the totals
$sql = 'SELECT forum_posts, forum_shadow_posts, forum_deleted_posts, forum_unapproved_posts, forum_id, forum_topics, forum_deleted_topics, forum_unapproved_topics
FROM ' . FORUMS_TABLE . '
WHERE ' . $db->sql_in_set('forum_id', array_keys($forum_lookup));
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
$forum_id = (int) $row['forum_id'];
foreach ($forum_columns as $column)
{
$forum_lookup[$forum_id][$column] += (int) $row[$column];
}
}
// create a listing of which topics are going in which forums
$update_list = array();
foreach ($to_forum_ids as $topic_id => $forum_id)
{
$update_list[$forum_id][] = $topic_id;
}
// we save as many queries as we can by updating all similar topics at once
foreach ($update_list as $forum_id => $topic_ids)
{
// update the topic itself
$db->sql_handle_data('UPDATE', TOPICS_TABLE, array('forum_id' => $to_forum_id), $db->sql_in_set('topic_id', $topic_ids));
// update the posts now
$db->sql_handle_data('UPDATE', POSTS_TABLE, array('forum_id' => $to_forum_id), $db->sql_in_set('topic_id', $topic_ids));
}
// start building the needed arrays for updating the forum data
foreach ($forum_lookup as $forum_id => $forum_data)
{
foreach ($forum_columns as $column)
{
$forum_data[$column] = max($forum_data[$column], 0); // ensure the result is unsigned
}
// get the last "normal" post in the old forum, we _must_ update it
$sql = 'SELECT MAX(post_id) as max_post_id
FROM ' . POSTS_TABLE . '
WHERE post_status = ' . self::NORMAL . '
AND forum_id = ' . $forum_id;
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
// anything left?
if ($row)
{
// OK, lets go do some magick
$sql = 'SELECT post_username, poster_id, post_subject, post_time
FROM '. POSTS_TABLE . '
WHERE post_id = ' . (int) $row['max_post_id'];
$result = $db->sql_query($sql);
$last_post = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
$forum_data['forum_last_user_id'] = (int) $last_post['poster_id'];
$forum_data['forum_last_poster_name'] = $last_post['post_username'];
$forum_data['forum_last_post_title'] = $last_post['post_subject'];
$forum_data['forum_last_post_time'] = (int) $last_post['post_time'];
}
else
{
// reset forum state
$forum_data['forum_last_user_id'] = 0;
$forum_data['forum_last_poster_name'] = '';
$forum_data['forum_last_post_title'] = '';
$forum_data['forum_last_post_time'] = 0;
}
// update the old forum
$db->sql_handle_data('UPDATE', FORUMS_TABLE, $forum_data, "forum_id = $forum_id");
}
// hooray for code reuse!
foreach ($shadow_topic_ids as $topic_id)
{
$data['shadow_topic_id'] = $topic_id;
$data['forum_id'] = $from_forum_id;
self::insert_shadow_topic($data);
}
$db->sql_transaction('commit');
}
}
?>

View File

@@ -80,4 +80,4 @@ echo 'www.URL: ' . $www_url . "<br />\n";
$relative_url = "$segment$path_abempty(?:\?$query)?(?:\#$fragment)?";
echo 'relative URL: ' . $relative_url . "<br />\n";
?>
?>

12
phpBB/develop/repair_bots.php Executable file → Normal file
View File

@@ -11,10 +11,10 @@ die("Please read the first lines of this script for instructions on how to enabl
set_time_limit(0);
define('IN_PHPBB', true);
$phpbb_root_path = './../';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.'.$phpEx);
include($phpbb_root_path . '/includes/functions_user.'.$phpEx);
define('PHPBB_ROOT_PATH', './../');
define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
include(PHPBB_ROOT_PATH . 'common.' . PHP_EXT);
include(PHPBB_ROOT_PATH . 'includes/functions_user.' . PHP_EXT);
// Start session management
@@ -98,7 +98,7 @@ function add_bots($bots)
$sql = 'SELECT group_id FROM ' . GROUPS_TABLE . " WHERE group_name = 'BOTS'";
$result = $db->sql_query($sql);
$group_id = (int) $db->sql_fetchfield('group_id', false, $result);
$group_id = (int) $db->sql_fetchfield('group_id', $result);
$db->sql_freeresult($result);
$db->sql_query('TRUNCATE TABLE ' . BOTS_TABLE);
@@ -108,7 +108,7 @@ function add_bots($bots)
$sql = 'SELECT group_id FROM ' . GROUPS_TABLE . " WHERE group_name = 'BOTS'";
$result = $db->sql_query($sql);
$group_id = (int) $db->sql_fetchfield('group_id', false, $result);
$group_id = (int) $db->sql_fetchfield('group_id', $result);
$db->sql_freeresult($result);
}

View File

@@ -23,9 +23,9 @@ die("Please read the first lines of this script for instructions on how to enabl
set_time_limit(0);
define('IN_PHPBB', true);
$phpbb_root_path = '../';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.'.$phpEx);
define('PHPBB_ROOT_PATH', './../');
define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
include(PHPBB_ROOT_PATH . 'common.' . PHP_EXT);
// Start session management
$user->session_begin();
@@ -34,12 +34,12 @@ $user->setup();
$search_type = $config['search_type'];
if (!file_exists($phpbb_root_path . 'includes/search/' . $search_type . '.' . $phpEx))
if (!file_exists(PHPBB_ROOT_PATH . 'includes/search/' . $search_type . '.' . PHP_EXT))
{
trigger_error('NO_SUCH_SEARCH_MODULE');
}
require($phpbb_root_path . 'includes/search/' . $search_type . '.' . $phpEx);
require(PHPBB_ROOT_PATH . 'includes/search/' . $search_type . '.' . PHP_EXT);
$error = false;
$search = new $search_type($error);

View File

@@ -98,8 +98,7 @@ function utf8_normalize_nfkc($strings)
if (!class_exists('utf_normalizer'))
{
global $phpbb_root_path, $phpEx;
include($phpbb_root_path . 'includes/utf/utf_normalizer.' . $phpEx);
include(PHPBB_ROOT_PATH . 'includes/utf/utf_normalizer.' . PHP_EXT);
}
if (!is_array($strings))

View File

@@ -26,8 +26,8 @@ set_time_limit(0);
error_reporting(E_ALL);
define('IN_PHPBB', true);
$phpbb_root_path = '../';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
define('PHPBB_ROOT_PATH', './../');
define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
/**
@@ -77,13 +77,13 @@ $test_suite = array(
)
);
require_once($phpbb_root_path . 'includes/utf/utf_normalizer.' . $phpEx);
require_once(PHPBB_ROOT_PATH . 'includes/utf/utf_normalizer.' . PHP_EXT);
$i = $n = 0;
$failed = false;
$tested_chars = array();
$fp = fopen($phpbb_root_path . 'develop/NormalizationTest.txt', 'rb');
$fp = fopen(PHPBB_ROOT_PATH . 'develop/NormalizationTest.txt', 'rb');
while (!feof($fp))
{
$line = fgets($fp);
@@ -158,7 +158,7 @@ fclose($fp);
*/
echo "\n\nTesting for invariants...\n\n";
$fp = fopen($phpbb_root_path . 'develop/UnicodeData.txt', 'rt');
$fp = fopen(PHPBB_ROOT_PATH . 'develop/UnicodeData.txt', 'rt');
$n = 0;
while (!feof($fp))
@@ -184,21 +184,21 @@ while (!feof($fp))
$utf_expected = hex_to_utf($hex_expected);
if ($utf_expected >= UTF8_SURROGATE_FIRST
&& $utf_expected <= UTF8_SURROGATE_LAST)
if ($utf_expected >= utf_normalizer::UTF8_SURROGATE_FIRST
&& $utf_expected <= utf_normalizer::UTF8_SURROGATE_LAST)
{
/**
* Surrogates are illegal on their own, we expect the normalizer
* to return a replacement char
*/
$utf_expected = UTF8_REPLACEMENT;
$utf_expected = utf_normalizer::UTF8_REPLACEMENT;
$hex_expected = utf_to_hexseq($utf_expected);
}
foreach (array('nfc', 'nfkc', 'nfd', 'nfkd') as $form)
{
$utf_result = $utf_expected;
utf_normalizer::$form($utf_result);
call_user_func(array('utf_normalizer', $form), $utf_result);
$hex_result = utf_to_hexseq($utf_result);
// echo "$form($utf_expected) == $utf_result\n";
@@ -227,9 +227,7 @@ die("\n\nALL TESTS PASSED SUCCESSFULLY\n");
*/
function download($url)
{
global $phpbb_root_path;
if (file_exists($phpbb_root_path . 'develop/' . basename($url)))
if (file_exists(PHPBB_ROOT_PATH . 'develop/' . basename($url)))
{
return;
}
@@ -241,7 +239,7 @@ function download($url)
die("Can't download from $url\nPlease download it yourself and put it in the develop/ dir, kthxbai");
}
if (!$fpw = fopen($phpbb_root_path . 'develop/' . basename($url), 'wb'))
if (!$fpw = fopen(PHPBB_ROOT_PATH . 'develop/' . basename($url), 'wb'))
{
die("Can't open develop/" . basename($url) . " for output... please check your permissions or something");
}

View File

@@ -22,13 +22,15 @@ involved in phpBB.
phpBB Lead Developer : Acyd Burn (Meik Sievertsen)
phpBB Developers : DavidMJ (David M.)
phpBB Developers : APTX (Marek A. R.)
DavidMJ (David M.)
dhn (Dominik Dr<44>scher)
kellanved (Henry Sudhof)
naderman (Nils Adermann)
subBlue (Tom Beddard)
ToonArmy (Chris Smith)
Vic D'Elfant (Vic D'Elfant)
-- Previous Contributors --
phpBB Project Manager : theFinn (James Atkinson) [Founder - 04/2007]

View File

@@ -1,570 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en" xml:lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="content-style-type" content="text/css" />
<meta http-equiv="content-language" content="en" />
<meta http-equiv="imagetoolbar" content="no" />
<meta name="resource-type" content="document" />
<meta name="distribution" content="global" />
<meta name="copyright" content="2007 phpBB Group" />
<meta name="keywords" content="" />
<meta name="description" content="phpBB 3.0.x Changelog" />
<title>phpBB3 &bull; Changelog</title>
<link href="stylesheet.css" rel="stylesheet" type="text/css" media="screen, projection" />
</head>
<body id="phpbb" class="section-docs">
<div id="wrap">
<a id="top" name="top" accesskey="t"></a>
<div id="page-header">
<div class="headerbar">
<div class="inner"><span class="corners-top"><span></span></span>
<div id="doc-description">
<a href="../index.php" id="logo"><img src="site_logo.gif" alt="" /></a>
<h1>phpBB 3.0.x Changelog</h1>
<p style="display: none;"><a href="#start_here">Skip</a></p>
</div>
<span class="corners-bottom"><span></span></span></div>
</div>
</div>
<a name="start_here"></a>
<div id="page-body">
<!-- BEGIN DOCUMENT -->
<p>This is a non-exhaustive (but still near complete) changelog for phpBB 3.0.x including release candidate versions. Our thanks to all those people who've contributed bug reports and code fixes.</p>
<h1>Changelog</h1>
<div class="paragraph menu">
<div class="inner"><span class="corners-top"><span></span></span>
<div class="content">
<ol>
<li><a href="#changelog">Changelog</a>
<ol style="list-style-type: lower-roman;">
<li><a href="#v300">Changes since 3.0.0</a></li>
<li><a href="#v30rc8">Changes since RC-8</a></li>
<li><a href="#v30rc7">Changes since RC-7</a></li>
<li><a href="#v30rc6">Changes since RC-6</a></li>
<li><a href="#v30rc5">Changes since RC-5</a></li>
<li><a href="#v30rc4">Changes since RC-4</a></li>
<li><a href="#v30rc3">Changes since RC-3</a></li>
<li><a href="#v30rc2">Changes since RC-2</a></li>
<li><a href="#v30rc1">Changes since RC-1</a></li>
</ol>
</li>
<li><a href="#disclaimer">Copyright and disclaimer</a></li>
</ol>
</div>
<span class="corners-bottom"><span></span></span></div>
</div>
<hr />
<a name="changelog"></a><h2>1. Changelog</h2>
<div class="paragraph">
<div class="inner"><span class="corners-top"><span></span></span>
<div class="content">
<a name="v300"></a><h3>1.i. Changes since 3.0.0</h3>
<ul>
<li>[Change] Validate birthdays (Bug #15004)</li>
<li>[Fix] Allow correct avatar caching for CGI installations. (thanks wildbill)</li>
</ul>
<a name="v30rc8"></a><h3>1.i. Changes since 3.0.RC8</h3>
<ul>
<li>[Fix] Cleaned usernames contain only single spaces, so &quot;a_name&quot; and &quot;a__name&quot; are treated as the same name (Bug #15634)</li>
<li>[Fix] Check &quot;able to disable word censor&quot; option while applying word censor on text (Bug #15974)</li>
<li>[Fix] Rollback changes on failed transaction if returning on sql error is set</li>
<li>[Fix] Call garbage_collection() within database updater to correctly close connections (affects Oracle for example)</li>
</ul>
<a name="v30rc7"></a><h3>1.ii. Changes since 3.0.RC7</h3>
<ul>
<li>[Fix] Fixed MSSQL related bug in the update system</li>
<li>[Fix] Display &quot;Return to&quot; links on unwritable forums (Bug #14824)</li>
<li>[Fix] Mitigating different realpath() handling between PHP versions (fixing confirm box redirects)</li>
<li>[Fix] Fix signature editing - ability to remove signature (Bug #14820)</li>
<li>[Fix] Send correct activation key by forcing reactivation for inactive user (Bug #14819)</li>
<li>[Fix] Adding correct IP for private messages sent by issuing warnings (Bug #14781)</li>
<li>[Fix] Open private message notification (Bug #14773)</li>
<li>[Fix] Fixing false new private message indicator (Bug #14627)</li>
<li>[Fix] Let newly activated passwords work if users were converted (Bug #14787)</li>
<li>[Fix] Quote bbcode fixes. Letting parse quote=&quot;[&quot; and re-allowing whitelisted bbcodes within username portion (Bug #14770)</li>
<li>[Fix] Allow alternative text for styled buttons if images turned off, but CSS staying on</li>
<li>[Sec] Fix bbcode helpline display for custom bbcodes - this requires style changes for any custom style (Bug #14850)</li>
<li>[Fix] Correctly count announcements when filtering forums by date (Bug #14877)</li>
<li>[Fix] Allow charset names containing underscores or spaces</li>
<li>[Fix] Don't allow previous/next links for non-existing topics (Bug #15039)</li>
<li>[Change] Do not assign converted votes to the first option in a vote.</li>
<li>[Fix] Use correct RFC 2822 date format in emails (Bug #15042)</li>
<li>[Fix] Require founder status for some actions on founder-only groups (Bug #15119)</li>
<li>[Fix] Allow changing the &quot;now&quot; option of date CPFs (Bug #15111)</li>
<li>[Change] Some improvements to the caching of avatars</li>
<li>[Change] Set template recompilation to be disabled by default. All mod and style authors and all those who want to modify their styles should enabled it after installation.</li>
<li>[Change] Disable debug mode. All mod and style authors should enable DEBUG and DEBUG_EXTRA.</li>
<li>[Fix] Check error reporting level for all error level. This fixes a problem for hosts having manipulated the error handler. (Bug #14831)</li>
<li>[Feature] Constant PHPBB_DB_NEW_LINK introduced which can be used to force phpBB to create a new database connection instead of reusing an existing one if the dbms supports it (Bug #14927)</li>
<li>[Fix] Automatic URL parsing no longer allows dots in the schema but can parse URLs starting after a dot (Bug #15110)</li>
<li>[Fix] Dynamic width for birthday select boxes (Bug #15149)</li>
<li>[Fix] Recache Moderators when copying permissions. (Bug #15384)</li>
<li>[Fix] Propagate sort options in mcp_forums (Bug #15464)</li>
<li>[Change] Do not allow [size=0] bbcodes (font-size of 0)</li>
<li>[Fix] No duplication of active topics (Bug #15474)</li>
</ul>
<a name="v30rc6"></a><h3>1.iii. Changes since 3.0.RC6</h3>
<ul>
<li>[Fix] Submitting language changes using acp_language (Bug #14736)</li>
<li>[Fix] Fixed wrong bbcode handling for forum rules, forum descriptions and group descriptions</li>
<li>[Fix] Fixed faulty form tokens (Bug #14725, #14762 and #14755)</li>
<li>[Fix] Fixed bbcode uid generation in the phpBB2 converter (Bug #14722)</li>
<li>[Fix] Able to request new password (Bug #14743)</li>
</ul>
<a name="v30rc5"></a><h3>1.iv. Changes since 3.0.RC5</h3>
<ul>
<li>[Feature] Removing constant PHPBB_EMBEDDED in favor of using an exit_handler(); the constant was meant to achive this more or less.</li>
<li>[Feature] Constant PHPBB_ADMIN_PATH introduced, having the same purpose as PHPBB_ROOT_PATH, but for the ACP.</li>
<li>[Fix] Further fixing user profile view (please do not forget to update/refresh your template and style) (Bug #14230)</li>
<li>[Fix] Adjust google adsense bot information (Bug #14296)</li>
<li>[Fix] Fix horizontal scrollbar problem in IE6 (Bug #14228) - fix provided by Danny-dev</li>
<li>[Fix] Use correct size values in ACP user signature screen (Bug #13367)</li>
<li>[Fix] Attachment Place inline won't work with single quotes (Bug #14291)</li>
<li>[Fix] Unable to save email templates through ACP language page (Bug #14266)</li>
<li>[Fix] Correctly set user style for guest user (able to be changed within user management)</li>
<li>[Change] Moved note about dns_get_record function for using GTalk (Jabber) from Jabber log to Jabber ACP panel</li>
<li>[Fix] Do not use register_shutdown_function within cron.php if handling the queue and the mail function being used (Bug #14321)</li>
<li>[Fix] Fixing private message on-hold code if moving messages into folder based on rules (Bug #14309)</li>
<li>[Fix] Allow the merge selection screen to work (Bug #14363)</li>
<li>[Change] Require additional permissions for copying permission when editing forums </li>
<li>[Fix] Local magic URLs no longer get an additional trailing slash (Bug #14362)</li>
<li>[Fix] Do not let the cron script stale for one hour if register_shutdown_function is not able to be called (Bug #14436)</li>
<li>[Feature] Added /includes/db/db_tools.php file, which includes tools for handling cross-db actions such as altering columns, etc.</li>
<li>[Change] Reset the start parameter when the timeframe is changed in the mcp topic page (Ticket #14438)</li>
<li>[Change] Added Code for cleaning the confirm table to the session garbage collection</li>
<li>[Fix] Fixed token handling in jabber class for extremely spec-compliant XMPP server (Bug #14445)</li>
<li>[Fix] Disallowed galleries from using special characters (Bug #14466)</li>
<li>[Change] Listing the board url within the email text instead of appending it to the subject (Bug #14378)</li>
<li>[Fix] Always display the quote button as the most accessible one (this means edit is before quote in prosilver due to the way we lay out profiles)</li>
<li>[Fix] Use correct dimension (width x height) in ACP (Bug #14452)</li>
<li>[Fix] Only display PM history links if there are PM's to be displayed (Bug #14484)</li>
<li>[Feature] Added completely new hook system to allow better application/mod integration - see docs/hook_system.html</li>
<li>[Fix] Correctly delete excess poll options (Bug #14566)</li>
<li>[Fix] Allow names evaluating to false for poll options</li>
<li>[Change] use in-build functions for user online list (Bug #14596) - provided by rxu</li>
<li>[Fix] Fixing google cache display problems with Firefox (Bug #14472) - patch provided by Raimon</li>
<li>[Fix] Prevent topic unlocking if locked by someone else while posting (Bug #10307)</li>
<li>[Change] Allow years in future be selected for date custom profile field (Bug #14519)</li>
<li>[Fix] Don't display &quot;Avatars Disabled&quot; message on edit groups in UCP (Bug #14636)</li>
<li>[Change] Require confirm for deleting inactive users. (Bug #14641)</li>
<li>[Fix] Match custom BBCodes in the same way during first and second pass - patch provided by IBBoard (Bug #14268)</li>
<li>[Fix] Correct quote parsing if opening bracket before opening quote (Bug #14667)</li>
<li>[Fix] Clean post message for checking length to prevent posting empty messages</li>
<li>[Fix] Display jumpbox if needed for functionality (Bug #14702)</li>
<li>[Feature] Added an option to enforce that users spend a configurable amount of time on the terms page during registration</li>
<li>[Fix] Fixed copy permissions box in the ACP</li>
<li>[Fix] Enforce types for the user table during conversions</li>
<li>[Sec] Fixing possible XSS through compromised WHOIS server (#i63, #i64)</li>
<li>[Sec] Missing access control on whois in viewonline.php (#i51)</li>
<li>[Sec] Encoding some variables within user::page array correctly (to cope with browser not doing it correctly) to prevent XSS through functions re-using them (#i61)</li>
<li>[Sec] Fixed XSS through memberlist search feature (#i62)</li>
<li>[Sec] Fixed XSS through colour swatch (#i65)</li>
<li>[Sec] Fixed insecure attachment deletion (#i53)</li>
<li>[Sec] Only allow whitelisted protocols in meta_redirect/redirect (#i66)</li>
<li>[Sec] Check file names to be written in language management panel (#i52)</li>
<li>[Sec] Deregister globals if ini_get has been disabled (#i112)</li>
<li>[Sec] Added form tokens to most forms to enforce a lighter variant of CSRF protection (#i91 - #i96)</li>
<li>[Sec] Use new password hash method for forum passwords (#i43)</li>
<li>[Sec] Changed download file location to prevent flash crossdomain policies taking effect (#i8)</li>
<li>[Sec] Do not allow autocompletion for password on admin re-authentication (#i41)</li>
<li>[Sec] Made sure users are not completely locked out if they have a GLOBALS cookie (#i101)</li>
<li>[Sec] Use the secure hash to generate BBCODE_UIDs (#i71)</li>
<li>[Sec] Increase the length of BBCODE_UIDs (#i72)</li>
<li>[Sec] New password hashing mechanism for storing passwords (#i42)</li>
</ul>
<a name="v30rc4"></a><h3>1.v. Changes since 3.0.RC4</h3>
<ul>
<li>[Fix] MySQL, PostgreSQL and SQLite related database fixes (Bug #13862)</li>
<li>[Fix] Allow MS SQL to properly connect when using the mssql driver and PHP is less than either 4.4.1 or 5.1 (Bug #13874)</li>
<li>[Fix] Ignore files containing HTML special chars in the filenames as gallery avatars (Bug #13906)</li>
<li>[Fix] Multiple PM recipients not separated (Bug #13876)</li>
<li>[Change] Split the select list for the smilie order to clarify which are feasible and which are not (Bug #13911)</li>
<li>[Fix] Convert empty homepage fields (Bug #13917)</li>
<li>[Fix] Use board default DST setting on creating new profiles (Bug #11563)</li>
<li>[Feature] New constant PHPBB_EMBEDDED can be used to let phpBB not call exit; if wrapped/embedded (We may re-check this constant on other code locations later too)</li>
<li>[Feature] append_sid() having a check for the function append_sid_phpbb_hook(). This function is called in favour of append_sid() with the exact same parameters if present.</li>
<li>[Fix] Only list enabled modes within the dropdown at user administration (Bug #13883) - patch provided by damnian</li>
<li>[Fix] Properly display ban reason if selecting banned entries within the ACP (Bug #13896)</li>
<li>[Fix] Properly parse SQL expressions for Oracle (Bug #13916)</li>
<li>[Fix] Added label bindings to the custom profile fields in the ACP (Bug #13936) - patch provided by damnian</li>
<li>[Change] Made group avatar/rank changes more intuitive</li>
<li>[Fix] Give more feedback in icon/smilie management (Bug #13295)</li>
<li>[Fix] Correctly set user::lang_id (Bug #14010)</li>
<li>[Fix] Properly display the smiley export screen (Bug #13968)</li>
<li>[Feature] Add "DECIMAL:", "PDECIMAL", and "PDECIMAL:" to the schema creation code (Bug #13999) - patch provided by poyntesm</li>
<li>[Fix] Don't show the notify checkbox in the approval queue if the only posts are written by ANONYMOUS (Bug #13973)</li>
<li>[Fix] Redirect to bots management page on edit/add (Bug #14073)</li>
<li>[Fix] Display locked icon in viewforum/prosilver if forum locked (Bug #14009)</li>
<li>[Feature] Display message history in compose PM screen</li>
<li>[Change] Do not force login on visiting topic/forum from notification emails (Bug #13818)</li>
<li>[Fix] Fixed cron_lock value for cron execution. This bug led to users having problems with the email queue and other cron related issues.</li>
<li>[Fix] Prevent white pages on php notices with gzip compression enabled (Bug #14096)</li>
<li>[Fix] Propagate the cleaned identifier for CFPs (Bug #14072)</li>
<li>[Fix] Do not display NO_TOPICS message if viewing non-postable category (Bug #13489)</li>
<li>[Fix] Let the theme immediately expire if changed from ACP for at least 30 minutes after change</li>
<li>[Fix] Do not append hilit= in search if highlighting term is empty (Bug #13910)</li>
<li>[Fix] Return to last page after voting in viewtopic instead of first page in topic (Bug #13976)</li>
<li>[Fix] If sending PM's to groups only include activated member (Bug #14040)</li>
<li>[Fix] Correctly wrap words in emails containing utf8 characters (Bug #14109)</li>
<li>[Change] For new posts or editing the first post topic titles have a maxlength of 60 characters. For any subsequent posts the length is extended to 64 to make room for the Re: part, but cutting at 60 characters. The maxlength need to be 64, else users using opera are unable to post (opera does not allow pre-filling a field with more characters than specified within the maxlength attribute)</li>
<li>[Fix] Disable gzip compression for cached stylesheet for Internet Explorer 6 or empty browser (IE6 is not able to properly display the compressed stylesheet) (Bug #14054)</li>
<li>[Fix] Header icons fixed in FF for RTL languages (Bug #14084)</li>
<li>[Change] Words in topic titles and post subjects are highlighted on the search results page and viewtopic too now (Bug #13383)</li>
<li>[Fix] Made sure strip_bbcode cannot get the idea that a smiley is a BBCode (Bug #14030)</li>
<li>[Change] Added a filter for user objects to LDAP configuration and improved explanations (Bug #12627)</li>
<li>[Fix] Display searchable subforums of invisible parents in advanced search forum selection (Bug #11395)</li>
<li>[Fix] Allow line breaks in custom BBCodes (Bug #10758)</li>
<li>[Fix] Ordered BBcode parsing functions in the same way everywhere where they are used</li>
<li>[Fix] Prevent {URL} token in custom BBCodes from make_clickable messing (Bug #14151)</li>
<li>[Sec] Added alternative tokens to custom BBCodes which are safe for CSS/Javascript and changed TEXT token to entitise opening and closing parantheses.</li>
<li>[Fix] Convert 2.0 moderator posting permissions (Bug #14105)</li>
<li>[Fix] Correctly apply PM box limit of 0 to custom folder (Bug #14154)</li>
<li>[Fix] odbc_autocommit causing existing result sets to be dropped (Bug #14182)</li>
</ul>
<a name="v30rc3"></a><h3>1.vi. Changes since 3.0.RC3</h3>
<ul>
<li>[Fix] Fixing some subsilver2 and prosilver style issues</li>
<li>[Fix] Parse error in MCP ban (Bug #13109)</li>
<li>[Fix] Correctly hide online status in the profile (Bug #13059)</li>
<li>[Feature] Let the user choose how to update modified files (merging, using new file or using old file) within automatic updater</li>
<li>[Fix] An extra \ in an Oracle SQL regex was corrected (Bug #13151)</li>
<li>[Fix] Added a missing global to get_file() (Bug #13149)</li>
<li>[Fix] Hide autologin box when autologin is disabled (Bug #13093)</li>
<li>[Fix] Account for the forum id not being part of the request uri in prosilver (Bug #13121)</li>
<li>[Fix] Properly alter PostgreSQL tables</li>
<li>[Fix] Properly cache template files that were stored in the database (Bug #12675)</li>
<li>[Fix] Do not count the deletion of an unapproved topic as a decrease in normally viewable posts (Bug #13167)</li>
<li>[Fix] Allow column_exists() to return true if the column exists but no data is in the table</li>
<li>[Fix] Allow setting the smiley order via the select. Also allow to add smileys at the top. (Bug #13199)</li>
<li>[Fix] Fix php notice on sending jabber messages (Bug #13201)</li>
<li>[Fix] Make the window showing file differences a little wider (Bug #13157)</li>
<li>[Fix] Preserve preview style on search form (Bug #13205)</li>
<li>[Fix] Place attachment filename in new line in posting editor (Bug #9726)</li>
<li>[Fix] Don't allow caching to occur in the update sequence (Bug #13207)</li>
<li>[Fix] Enforce the max password length for automatically generated password created by the password sender (Bug #13181)</li>
<li>[Fix] Handle phpinfo() when expose_php is false (Bug #12777)</li>
<li>[Fix] Allow managing of forum roles without global users (Bug #13249)</li>
<li>[Change] Do not run cron script if board is disabled</li>
<li>[Fix] Correctly destroy sql cache for some query combinations (Bug #13237)</li>
<li>[Fix] Allow link forums being password protected (Bug #12967)</li>
<li>[Fix] Allow wrapping topic/post icons in posting editor (Bug #12843)</li>
<li>[Fix] Display L_RANK only once in template if rank title and image defined (Bug #13231)</li>
<li>[Fix] Make sure selected transfer method exists before calling (Bug #13265)</li>
<li>[Fix] Correctly escape language keys in language editor (Bug #13279)</li>
<li>[Fix] Correctly hide post/reply buttons if permissions are not given (related to Bug #12809)</li>
<li>[Fix] Remove orphan/wrong permission entries for non-existent forums - self-repairing permissions if conversions went &quot;crazy&quot;</li>
<li>[Feature] Allow &quot;older&quot; updates applied with the automatic updater. This allows people using it for updating, say, from 3.0.0 to 3.0.1 (with the correct package of course) and then from 3.0.1 to 3.0.2 if the latest version at this time is 3.0.2. These changes take effect beginning with RC4 or people replacing install/install_update.php manually prior doing the updates.</li>
<li>[Fix] Present correct error message if user tries to edit already read private message (Bug #13271)</li>
<li>[Fix] Also display board disabled notice for admins/mods if board got disabled due to exceeding the load limit (Bug #13267)</li>
<li>[Fix] Correctly deliver avatar if readfile function has been disabled (Bug #13309)</li>
<li>[Fix] Display php information page with the correct direction (Bug #12557)</li>
<li>[Fix] Increased the number of style objects (styles, templates, themes and imagesets) possible from 127 to 65535 for MySQL (Bug #13179)</li>
<li>[Fix] Although theoretically impossible in our code, removed the chance of trying to open a file that does not exist (Bug #13327)</li>
<li>[Fix] Although theoretically impossible in our code, changed the handling of non-existent language files (Bug #13329, #13331)</li>
<li>[Fix] Removed extra ampersand from ACP link (Bug #13315)</li>
<li>[Fix] used cleaned up version of given field identification for pre-filling a new custom profile field (Bug #13319)</li>
<li>[Fix] Correctly convert 2.0 website profile fields. (Bug #13379)</li>
<li>[Fix] Fixed the "Alphanumeric" and "Alphanumeric and spacers" username selection limitations (Bug #13391)</li>
<li>[Fix] Make sure filelist() is only returning array types (Bug #13385)</li>
<li>[Fix] Correctly mark forums read if using cookie based topic tracking (Bug #13245)</li>
<li>[Change] Put custom profile fields into top box and signature into separate box in members profile view (Bug #13357)</li>
<li>[Fix] Only show moderator log entries for forums the user is having moderation rights in (Bug #12481)</li>
<li>[Feature] Show resulting permission alone in trace window (Bug #10952) - thanks to dark/rain for the proposal</li>
<li>[Fix] Fixed bug in realpath replacement letting it actually work again</li>
<li>[Change] Try to be a bit more specific regarding global/local permission trace (Bug #11032)</li>
<li>[Fix] Fixed some strangeness in password validation due to mb_ereg()</li>
<li>[Fix] Subforums of a forum would overwrite the latest post information even if they did not contain the latest post (Bug #11931)</li>
<li>[Fix] Use global username display function on several places (Bug #11080, #11098) - patch by HoL</li>
<li>[Fix] Several viewonline fixes and feature changes. Also displaying the users browser in viewonline list to let the admin easier spot additional search bots, connected to a_user permission (Bug #11088) - patch and suggestions provided by HoL</li>
<li>[Change] u_viewprofile permission also affecting viewonline list now</li>
<li>[Fix] Do not display return to search link in prosilver if search is not allowed (Bug #11393)</li>
<li>[Fix] Use global url validation for img bbcode tag (Bug #11935)</li>
<li>[Fix] Added proper unicode support to style names (Bug #12165)</li>
<li>[Fix] Search result extract should not end in the middle of a multibyte character (Bug #11863)</li>
<li>[Fix] Missing localisation for an imageset no longer triggers a lot of &quot;imageset refreshed&quot; log messages (Bug #12027)</li>
<li>[Fix] Explain that themes which need parsing cannot be stored on the filesystem (Bug #11134)</li>
<li>[Fix] Normalize usernames</li>
<li>[Change] Improved utf8_clean_string with a more complete list of homographs and NFKC normalization</li>
<li>[Fix] Fixed error messages that ACP Database can give (Bug #13463)</li>
<li>[Fix] Fixed potential issues with databases that use tables names is uppercase</li>
<li>[Fix] Handle forum links/redirects within viewforum if no read permission given (to display login box or error message) (Bug #13467)</li>
<li>[Fix] Prevent changing postable forum having subforums to link forum without moving subforums out first</li>
<li>[Fix] Do not display version in admin template (Bug #13495)</li>
<li>[Fix] Allow manual specification of remote avatar dimensions if getimagesize is disabled (Bug #13531)</li>
<li>[Fix] Make viewonline use the session page's added forum parameter (Bug #13597)</li>
<li>[Fix] Correcting BBCode FAQ (Bug #11180)</li>
<li>[Fix] Make to/bcc line in view private message display consistent with other username displays in prosilver (Bug #11989)</li>
<li>[Fix] Send out activation email if admin activation is enabled and user activated through inactive users panel upon registration (Bug #12065)</li>
<li>[Change] Re-implemented All Yes/No/Never links in permission panels for easier changing all categories at once</li>
<li>[Change] Advanced permission link now &quot;marked&quot; if no role is assigned and custom permissions set. With this an admin can instantly see if the object is not set at all or having custom permissions, something you only saw if advanced permissions were viewed before.</li>
<li>[Fix] Change misleading custom BBCodes explanation, regarding tokens and useable template variables (Bug #12403, #5660)</li>
<li>[Feature] Ability to disable birthdays completely with new board features setting</li>
<li>[Fix] Fix disallowed username check (Bug #13511)</li>
<li>[Fix] Allow for unicode usernames to be pruned (Bug #13643)</li>
<li>[Fix] Do not copy forum permissions from self (Bug #13663)</li>
<li>[Fix] Allow for polls to work during preview (Bug #13657) - thanks to Thatbitextra</li>
<li>[Fix] Finer error conditions for sending IM messages (Bugs #13681, #13683)</li>
<li>[Fix] Add a confirmation for log deletion in the MCP (Bug #13693)</li>
<li>[Fix] Do not erase ranks and avatars when changing default groups (Bugs #13701, #13697)</li>
<li>[Fix] Limit author searches to firstpost, if selected (Bug #13579)</li>
<li>[Fix] Properly resync user post counts for users that have no posts (Bug #13581)</li>
<li>[Fix] Do not require space after , in smiley pak files (Bug #13647)</li>
<li>[Fix] Properly display the subscribe link in topic and forum display for Oracle (Bug #13583)</li>
<li>[Change] Add version number to ACP index (Bug #13703)</li>
<li>[Fix] Several fixes for custom profile fields on multi-lingual boards (Bugs #13763, #13527, #13525, #11515)</li>
<li>[Fix] Return to the mode previously selected after disaproving a post (Bug #13796)</li>
<li>[Fix] Cron now uses a locking variable to make sure it does not spawn too many webserver processes (Bug #12741)</li>
<li>[Fix] Cached stylesheet now supporting gzip compression</li>
<li>[Fix] Added link to inbox for deleted PMs (Bug #13813)</li>
<li>[Fix] Re-syncing the board stats also refreshes the newest user (Bug #13831)</li>
<li>[Feature] Ability to externally set $phpbb_root_path if wrapping phpBB3 by defining constant PHPBB_ROOT_PATH</li>
<li>[Fix] Implemented correct left/right floating within ACP in regard to RTL languages (Bug #13777)</li>
<li>[Fix] Fixing session problems when using MySQL strict mode in conjunction with very long browser agent string (Bug #13827)</li>
<li>[Fix] Disallow post/pm subjects entirely made up from non-printable chars and whitespaces (Bug #13800)</li>
<li>[Fix] Allow moving private messages from the sentbox (Bug #13791)</li>
<li>[Fix] Properly export localized imagesets</li>
<li>[Feature] Show the size of Firebird databases</li>
<li>[Fix] Show error when moving topic into a category via quickmod (Bug #11611)</li>
<li>[Fix] Allow Oracle to install on a database without specify the database name</li>
</ul>
<a name="v30rc2"></a><h3>1.vii. Changes since 3.0.RC2</h3>
<ul>
<li>[Fix] Re-allow searching within the memberlist</li>
<li>[Fix] Force prune related values to integers during conversions</li>
<li>[Fix] Updater now detects successfully merged files having conflicts and user chose to merge with modifications (Bug #12685)</li>
<li>[Fix] Updater is no longer listing missing language entries and styles if these had been removed (Bug #12655)</li>
<li>[Fix] Correct approval of posts in global announcements (Bug #12699)</li>
<li>[Sec] Do not allow setup spiders/robots to post, even if permissions are given. We see no reason why this should be possible. (Thanks to Frank Rizzo for convincing us regarding this)</li>
<li>[Sec] Do not display the last active column within the memberlist if u_viewonline permission is not given (Bug #12797)</li>
<li>[Fix] Display custom profile field &quot;date&quot; based on users language (Bug #12787)</li>
<li>[Fix] Allow adding of help language files within subdirectories (Bug #12783)</li>
<li>[Fix] Correctly apply smileys on posting having # within their emotion code</li>
<li>[Fix] Correctly convert smileys having double quotes within their emotion code (Bug #12731)</li>
<li>[Fix] The converter now adds the protocol to user website profile fields missing it (Bug #12819)</li>
<li>[Fix] Correctly escape banned ip/email using wildcard for ban check (Bug #12815)</li>
<li>[Fix] Fixed some very nasty opera bugs (dropdown list bug, cpu spike bug) (Bug #12763, #11609)</li>
<li>[Fix] Font colour list having the correct height in IE (Bug #9571)</li>
<li>[Feature] Added mark/unmark all links to the bots page (Bug #12461)</li>
<li>[Fix] Introduced check on duplicate usernames during bot creation/edit (Bug #12461)</li>
<li>[Fix] Allow multibyte letters for smilie codes(Bug #12321)</li>
<li>[Fix] Correctly chmod created cache files (Bug #12859)</li>
<li>[Fix] Use our global expression for checking email syntax in memberlist (Bug #12827)</li>
<li>[Fix] Correctly retrieve/refresh templates stored in database if using subdirectories within template directory (Bug #12839)</li>
<li>[Fix] Correctly translate special group names in ucp_groups.php (Bug #12597)</li>
<li>[Fix] Search boxes not loosing session id (changing method from get to post) (Bug #12643)</li>
<li>[Fix] Make sure the automatic update is also working for those having fsockopen disabled</li>
<li>[Fix] Simulate recache of theme data on automatic update finished page - recaching it if css data changed</li>
<li>[Feature] Allow dropping in custom &quot;info_[module class]_*.php&quot; files to language/*/mods directory for inclusion into the menu structure without the need to modify phpBB language files for menu placements</li>
<li>[Fix] Added login box to egosearch (Bug #12941)</li>
<li>[Fix] Deal with slashed quotes during quote bbcode conversion (Bug #12607)</li>
<li>[Fix] Minor language and style fixes (Bugs #12235, #12493, #11949)</li>
<li>[Feature] Added backlinks to mcp_report (Bug #12905)</li>
<li>[Fix] Only check usernames in guest posts upon edit (Bug #11349)</li>
<li>[Fix] Consider viewonline permission when viewing friends/foes (Bug #12955)</li>
<li>[Fix] Added proper unicode support to ban reasons (Bug #12947)</li>
<li>[Fix] The forum/topic sync code now recognizes other ways that the latest post in a topic can be expressed (Bug #12947) - patch provided by APTX</li>
<li>[Fix] Topic deletion via the user post deletion mechanism did not take into account statistics for forums that hold shadow topics (Bug #12981)</li>
<li>[Fix] Allow for negative and decimal numbers to be in transposed queries in the Oracle and Firebird DBAL (Bug #13033)</li>
<li>[Fix] Some jabber related bugs (Bug #12989, #11805, #11809)</li>
<li>[Fix] Added UTF-8 support for banning via the MCP (Bug #13013)</li>
<li>[Fix] Properly detect the script name in session::extract_current_page() if PHP_SELF is not defined (Bug #12705) - patch provided by ToonArmy</li>
<li>[Fix] Show role mask for global permission class under Permissions->Permission Roles (Bug #13057)</li>
</ul>
<a name="v30rc1"></a><h3>1.viii. Changes since 3.0.RC1</h3>
<ul>
<li>[Fix] (X)HTML issues within the templates (Bug #11255, #11255)</li>
<li>[Fix] Tiny language and grammar changes</li>
<li>[Fix] Several style related fixes, mainly fixing cross-browser issues</li>
<li>[Fix] Several RTL fixes within prosilver</li>
<li>[Fix] MCP looses forum_id in some panels (Bug #11255)</li>
<li>[Fix] Moderation queue used unfriendly notification of no posts/topics (Bug #11291)</li>
<li>[Fix] Array in Oracle DBAL not always set (Bug #11475)</li>
<li>[Fix] Improper continue; in acp_styles.php (Bug #11523)</li>
<li>[Fix] Imageset editor more friendly (Bug #11511)</li>
<li>[Fix] Made Custom BBCode validation more strict (Bug #11335)</li>
<li>[Fix] Proper sync of data on topic copy (Bug #11335)</li>
<li>[Fix] Introduced ORDER BY clauses to converter queries (Bug #10697)</li>
<li>[Fix] Stopped bots from getting added to the registered users group during conversion (Bug #11283)</li>
<li>[Fix] Filled &quot;SMILIEYS_DISABLED&quot; template variable (Bug #11257)</li>
<li>[Fix] Properly escaped the delimiter in disallowed username comparisons (Bug #11339)</li>
<li>[Fix] Check global purge setting (Bug #11555)</li>
<li>[Fix] Improper magic url parsing applied to already parsed [url=] bbcode tag (Bug #11429)</li>
<li>[Fix] Renamed two indicies for Oracle support (Bug #11457)</li>
<li>[Fix] Added support for ISO-8859-8(-i) in the character set convertor (Bug #11265, #12039)</li>
<li>[Fix] Added support for Oracle's &quot;easy connect naming&quot;</li>
<li>[Fix] Let Mark/Unmark All work in Manage Drafts (Bug #11679)</li>
<li>[Fix] Display correct message if no attachments found in user administration (Bug #11629)</li>
<li>[Fix] Let the &quot;Delete all board cookies&quot; being displayed for guests too (only prosilver) (Bug #11603)</li>
<li>[Fix] Do not display view topic link in MCP while there is no link present (Bug #11573)</li>
<li>[Fix] MySQL now properly sorts by post_subject (Bug #11637)</li>
<li>[Fix] Introduced checks to stop negative postcounts (Bug #11561, #11421)</li>
<li>[Fix] Allow IP v4/v6 urls for remote avatars (Bug #11633)</li>
<li>[Fix] Delete avatar files automatically (Bug #11631)</li>
<li>[Fix] Automatically add selected columns to group by statements in the converter (Bug #11465)</li>
<li>[Fix] Allow posts without subjects to be clicked in the MCP (Bug #11483)</li>
<li>[Fix] Sync the forums that shadow topics reside in when the topic that they point to is deleted</li>
<li>[Fix] Do not use the gen_random_string function to create cookie names during install (Bug #11431)</li>
<li>[Fix] Send stylesheet in style.php even without a valid session id (Bug #11531)</li>
<li>[Fix] request_var should strictly return the requested number of dimensions</li>
<li>[Fix] Correct assignment of custom width to $user-&gt;img(); / Correctly display poll bars in subsilver2 (Bug #11301)</li>
<li>[Fix] Allow removing polls in prosilver</li>
<li>[Fix] Correct link to post in managing users attachments (Bug #11765)</li>
<li>[Fix] Reload confirm screen for selecting new forum for global topic type change if not postable forum is chosen (Bug #11711)</li>
<li>[Fix] Correctly show system default color for disabled options in Internet Explorer which does not support disabled option fields</li>
<li>[Fix] Update query for custom profiles in user management used wrong order for left/right delimiter (affecting mssql) (Bug #11781)</li>
<li>[Fix] Inconsistent display of more smileys link fixed (Bug #11801)</li>
<li>[Fix] Outbox messages are no always neither new nor unread post-conversion (Bug #11461)</li>
<li>[Feature] Replaced outdated jabber class with the one from the flyspray project</li>
<li>[Feature] The converter no longer relies on the smiley ID to decide if it should be displayed on the posting page</li>
<li>[Change] Limit maximum number of allowed characters in messages to 60.000 by default. Admins should increase their PHP time limits if they want to raise this tremedously.</li>
<li>[Change] Some changes to the conversion documentation</li>
<li>[Fix] Only use permissions from existing forums during the conversion (Bug #11417)</li>
<li>[Fix] Do not permit the decimal as a valid prefix character (Bug #11967)</li>
<li>[Fix] Account for the fact that the IM fields might hold non-IM information</li>
<li>[Fix] Make the queue function on post details</li>
<li>[Fix] Check if there are active styles left before deleting a style</li>
<li>[Fix] Correctly update styles after the deletion of an imageset.</li>
<li>[Fix] Replaced jabber validation to use the method used by the new jabber class (Bug #9822)</li>
<li>[Sec] Adding confirm boxes to UCP group actions (ToonArmy)</li>
<li>[Feature] Added the option to disable the flash bbcode globally (DelvarWorld)</li>
<li>[Sec] Changed the embedding of Flash (NeoThermic, DelvarWorld)</li>
<li>[Fix] Use the signature setting for PMs (Bug #12001)</li>
<li>[Fix] Made the DBMS selection use language variables (Bug #11969)</li>
<li>[Fix] Make sure that a folder is used when viewing messages to oneself (Bug #12105)</li>
<li>[Fix] Account for the fact that a board might have no visible Admins (Bug #12185)</li>
<li>[Fix] Change group ranks even if empty (Bug #12231)</li>
<li>[Fix] Correctly propagate variables across the custom profile field wizard (Bug #12237)</li>
<li>[Fix] Correctly move pm's into folders if more than one is received (Bug #12135)</li>
<li>[Fix] Corrected various bugs with CPF on multi-language boards (Bug #11803)</li>
<li>[Fix] Disable notify checkbox in posting editor when board email is disabled (Bug #12263)</li>
<li>[Fix] Removed maxlength from password/username fields (Bugs #12215, #11797)</li>
<li>[Fix] Use icon-unsubscribe in prosilver (Bug #12211)</li>
<li>[Fix] Seperated PREVIOUS/NEXT language vars for pagination and next/previous step (Bug #12197)</li>
<li>[Feature] append_sid() supporting anchor (Bug #11535) - patch provided by Schumi and ToonArmy</li>
<li>[Fix] Remember selected language while registering after submit (Bug #11435)</li>
<li>[Fix] UTF-8 support in theme and template editors (Bug #12251)</li>
<li>[Fix] Allow for posts per page in the MCP to change during topic selection (Bug #12067)</li>
<li>[Fix] Remove group avatars upon deletion from all profiles, not just the people having the group as default (Bug #12275, #12267)</li>
<li>[Fix] Allow for conversions to SQLite (Bug #12279) - patch provided by ToonArmy</li>
<li>[Fix] Apply colours to guests (Bug #12219)</li>
<li>[Fix] Set the Admin group as founder_manage during conversion (Bug #12287)</li>
<li>[Fix] Fixed a special quote BBCode case (Bug #12189)</li>
<li>[Fix] Correctly parse BBCodes in a post when a poll is being used (Bug #11833)</li>
<li>[Fix] Remember attached files on PM edit (Bug #12019)</li>
<li>[Fix] Correctly display poll ending on preview (Bug #12303)</li>
<li>[Feature] Display the success message on posting longer for posts awaiting approval (Bug #12053)</li>
<li>[Fix] Display maximum and entered number of characters for the &quot;maximum number of characters exceeded&quot; error messages (Bug #11981)</li>
<li>[Fix] Wrongly applied setting for allowing links in private messages (used the signature setting instead of the post setting) (Bug #11945)</li>
<li>[Fix] Unread flag for multipage topic wrongly set under some conditions (Bug #12127) - fix provided by asinshesq</li>
<li>[Fix] Able to delete posts within user prune panel (Bug #11849)</li>
<li>[Feature] Allow to specify dimensions of images manually on imageset config (Bug #11675)</li>
<li>[Fix] Correctly re-assign query result id after seeking rows (MSSQL/Firebird) (Bug #12369)</li>
<li>[Feature] Make effect of a changed hideonline permission instantaneous</li>
<li>[Fix] Do not overwrite larger memory values in the installer (Bug #12195)</li>
<li>[Fix] Order forums on role permission mask (Bug #12337)</li>
<li>[Fix] Show "no image" image when a non-selectable item was selected in the acp imageset editor - IE (Bug #12423)</li>
<li>[Fix] Update session information without new pageload (Bug #12393, Bug #12441)</li>
<li>[Fix] Let polls be edited correctly (Bug #12433)</li>
<li>[Fix] Overcome Oracle's inability to handle IN() clauses with over one thousand elements (Bug #12449)</li>
<li>[Fix] Simulate Firebird's affected rows mechanism for older versions of PHP</li>
<li>[Fix] Custom BBCodes properly handle lowercasing of parameterized tags (Bug #12377)</li>
<li>[Fix] Update the forum_id sequence for PostgreSQL during conversion (Bug #11927)</li>
<li>[Fix] Allow for multiple tags containing URL and LOCAL_URL tokens (Bug #12473)</li>
<li>[Fix] Properly display forum list in the MCP Queue (Bug #11313)</li>
<li>[Fix] Use the localised guest name for quotes (Bug #12483)</li>
<li>[Fix] Added post anchor to links in default warning message (Bug #12489)</li>
<li>[Fix] Allow 5 digits in editing time fields (Bug #12489)</li>
<li>[Fix] MS SQL DBAL drivers now write over extension limitations, they are too low for most installations (Bug #12415)</li>
<li>[Fix] Fix sorting by author on "unanswered posts" (Bug #12545)</li>
<li>[Fix] Allow searching for multibyte authors (Bug #11793)</li>
<li>[Fix] Writing directories/files with correct permissions using FTP for transfers on PHP4</li>
<li>[Fix] Oracle sequences during conversions are now corrected (Bug #12555)</li>
<li>[Fix] Allow users to continue after selecting "No" in the merge quickmod confirmation (Bug #12577)</li>
<li>[Fix] Correctly check permissions on the UCP subscription/bookmark pages (Bug #12595)</li>
<li>[Fix] Only convert non-orphaned PMs</li>
<li>[Fix] Fixed a few Postgres related errors (Bug #12587)</li>
<li>[Feature] New DBAL wrapper for LIKE expressions / sql_like_expression()</li>
<li>[Sec] Stricter validation of language entries. </li>
</ul>
</div>
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
<span class="corners-bottom"><span></span></span></div>
</div>
<hr />
<a name="disclaimer"></a><h2>2. Copyright and disclaimer</h2>
<div class="paragraph">
<div class="inner"><span class="corners-top"><span></span></span>
<div class="content">
<p>This application is opensource software released under the <a href="http://opensource.org/licenses/gpl-license.php">GPL</a>. Please see source code and the docs directory for more details. This package and its contents are Copyright (c) 2000, 2002, 2005, 2007 <a href="http://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p>
</div>
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
<span class="corners-bottom"><span></span></span></div>
</div>
<!-- END DOCUMENT -->
<div id="page-footer">
<div class="version">Note that a full list of fixed bugs can be found at the bug tracker (<a href="README.html#bugs">see section on bug reporting</a>)</div>
</div>
</div></div>
<div>
<a id="bottom" name="bottom" accesskey="z"></a>
</div>
</body>
</html>

View File

@@ -273,7 +273,7 @@
<p>This package is meant for those wanting to only replace changed files from a previous version to the latest version. This package normally contains the changed files from up to five previous versions.</p>
<p>This package contains a number of archives, each contains the files changed from a given release to the latest version. You should select the appropriate archive for your current version, e.g. if you currently have <samp>3.0.0</samp> you should select the phpBB-3.0.0_to_3.0.1.zip/tar.gz file.</p>
<p>This package contains a number of archives, each contains the files changed from a given release to the latest version. You should select the appropriate archive for your current version, e.g. if you currently have <samp>3.0.2</samp> you should select the phpBB-3.0.2_to_3.0.3.zip/tar.gz file.</p>
<p>The directory structure has been preserved enabling you (if you wish) to simply upload the contents of the archive to the appropriate location on your server, i.e. simply overwrite the existing files with the new versions. Do not forget that if you have installed any MODs these files will overwrite the originals possibly destroying them in the process. You will need to re-add MODs to any affected file before uploading.</p>
@@ -281,11 +281,11 @@
<a name="update_patch"></a><h3>4.iii. Patch file</h3>
<p>The patch file package is for those wanting to update through the patch application, and being compfortable with it.</p>
<p>The patch file package is for those wanting to update through the patch application, and being comfortable with it.</p>
<p>The patch file is one solution for those with many Modifications (MODs) or other changes who do not want to re-add them back to all the changed files if they use the method explained above. To use this you will need command line access to a standard UNIX type <strong>patch</strong> application. If you do not have access to such an application but still want to use this update approach, we strongly recommend the <a href="update_auto">Automatic update package</a> explained below. It is also the preferred update method.</p>
<p>The patch file is one solution for those with many Modifications (MODs) or other changes who do not want to re-add them back to all the changed files if they use the method explained above. To use this you will need command line access to a standard UNIX type <strong>patch</strong> application. If you do not have access to such an application but still want to use this update approach, we strongly recommend the <a href="#update_auto">Automatic update package</a> explained below. It is also the preferred update method.</p>
<p>A number of patch files are provided to allow you to update from previous stable releases. Select the correct patch, e.g. if your current version is 3.0.0 you need the phpBB-3.0.0_to_3.0.1.patch file. Place the correct patch in the parent directory containing the phpBB3 core files (i.e. index.php, viewforum.php, etc.). With this done you should run the following command: <strong>patch -cl -d [PHPBB DIRECTORY] -p1 &lt; [PATCH NAME]</strong> (where PHPBB DIRECTORY is the directory name your phpBB Installation resides in, for example phpBB3, and where PATCH NAME is the relevant filename of the selected patch file). This should complete quickly, hopefully without any HUNK FAILED comments.</p>
<p>A number of patch files are provided to allow you to update from previous stable releases. Select the correct patch, e.g. if your current version is 3.0.2 you need the phpBB-3.0.2_to_3.0.3.patch file. Place the correct patch in the parent directory containing the phpBB3 core files (i.e. index.php, viewforum.php, etc.). With this done you should run the following command: <strong>patch -cl -d [PHPBB DIRECTORY] -p1 &lt; [PATCH NAME]</strong> (where PHPBB DIRECTORY is the directory name your phpBB Installation resides in, for example phpBB3, and where PATCH NAME is the relevant filename of the selected patch file). This should complete quickly, hopefully without any HUNK FAILED comments.</p>
<p>If you do get failures you should look at using the <a href="#update_files">Changed files only</a> package to replace the files which failed to patch, please note that you will need to manually re-add any Modifications (MODs) to these particular files. Alternatively if you know how you can examine the .rej files to determine what failed where and make manual adjustments to the relevant source.</p>
@@ -295,7 +295,7 @@
<p>This update method is the preferred method for updating. This package allows detecting changed files automatically and merges changes if needed.</p>
<p>The automatic update package is holding - contrary to the others - only the update informations for updating the last released version to the latest available version. These package is meant for use with the automatic update tool.</p>
<p>The automatic update package contains - contrary to the others - only the information required to update the previous release version to the latest available version. These packages are meant for use with the automatic update tool.</p>
<p>To perform the update, either follow the instructions from the <code>Administration Control Panel-&gt;System</code> Tab - this should point out that you are running an outdated version and will guide you through the update - or follow the instructions listed below.</p>
@@ -369,11 +369,11 @@
<p><strong>Password conversion</strong> Due to the utf-8 based handling of passwords in phpBB3, it is not always possible to transfer all passwords. For passwords "lost in translation" the easiest workaround is to use the "forgotten password" function.</p>
<p><strong>Path to your former board</strong> The converter expects the relative path to your old board's files. So, -for instance - if the new board is located at <code>http://www.yourdomain.com/forum</code> and the phpBB3 is located at <code>http://www.yourdomain.com/phpBB3</code>, then the correct value would be <code>../forum</code>. Note that the webserver user must be able to access the source installation's files.</p>
<p><strong>Path to your former board</strong> The converter expects the relative path to your old board's files. So, - for instance - if the old board is located at <code>http://www.yourdomain.com/forum</code> and the phpBB3 installation is located at <code>http://www.yourdomain.com/phpBB3</code>, then the correct value would be <code>../forum</code>. Note that the webserver user must be able to access the source installation's files.</p>
<p><strong>Missing images</strong> If your default board language's language pack does not include all images, then some images might be missing in your installation. Always use a complete language pack as default language.</p>
<p><strong>Missing images</strong> If your default board language's language pack does not include all images, then some images might be missing in your installation. Always use a complete language pack as default language.</p>
<p><strong>Smilies</strong> During the conversion you might see warnings about image files where the copying failed. That can happen if the old board's smilies have the same file names as those on the new board. Copy those files manually after the conversion, if you want to continue using the old smilies.</p>
<p><strong>Smilies</strong> During the conversion you might see warnings about image files where the copying failed. That can happen if the old board's smilies have the same file names as those on the new board. Copy those files manually after the conversion, if you want to continue using the old smilies.</p>
</div>

4
phpBB/docs/changes.txt Normal file
View File

@@ -0,0 +1,4 @@
List of major changes since 3.0.x:
- new stack-based bbcode system
- Migrate phpBB to PHP versions >= 5.2

View File

@@ -110,7 +110,7 @@
<p>If entered with tabs (replace the {TAB}) both equal signs need to be on the same column.</p>
<h3>Linefeeds:</h3>
<p>Ensure that your editor is saving files in the UNIX format. This means lines are terminated with a newline, not with a CR/LF combo as they are on Win32, or whatever the Mac uses. Any decent editor should be able to do this, but it might not always be the default. Know your editor. If you want advice on Windows text editors, just ask one of the developers. Some of them do their editing on Win32.</p>
<p>Ensure that your editor is saving files in the UNIX (LF) line ending format. This means that lines are terminated with a newline, not with Windows Line endings (CR/LF combo) as they are on Win32 or Classic Mac (CR) Line endings. Any decent editor should be able to do this, but it might not always be the default setting. Know your editor. If you want advice for an editor for your Operating System, just ask one of the developers. Some of them do their editing on Win32.
<a name="fileheader"></a><h3>1.ii. File Header</h3>
@@ -188,8 +188,7 @@ class ...
<li><code>/includes/db/firebird.php</code><br />Firebird/Interbase Database Abstraction Layer</li>
<li><code>/includes/db/msssql.php</code><br />MSSQL Database Abstraction Layer</li>
<li><code>/includes/db/mssql_odbc.php</code><br />MSSQL ODBC Database Abstraction Layer for MSSQL</li>
<li><code>/includes/db/mysql.php</code><br />MySQL Database Abstraction Layer for MySQL 3.x/4.0.x</li>
<li><code>/includes/db/mysql4.php</code><br />MySQL4 Database Abstraction Layer for MySQL 4.1.x/5.x</li>
<li><code>/includes/db/mysql.php</code><br />MySQL Database Abstraction Layer for MySQL 3.x/4.0.x/4.1.x/5.x
<li><code>/includes/db/mysqli.php</code><br />MySQLi Database Abstraction Layer</li>
<li><code>/includes/db/oracle.php</code><br />Oracle Database Abstraction Layer</li>
<li><code>/includes/db/postgres.php</code><br />PostgreSQL Database Abstraction Layer</li>
@@ -399,12 +398,12 @@ do_stuff($str);
<p class="bad">// Sometimes single quotes are just not right</p>
<div class="codebox"><pre>
$post_url = $phpbb_root_path . 'posting.' . $phpEx . '?mode=' . $mode . '&amp;amp;start=' . $start;
$some_string = $board_url . 'someurl.php?mode=' . $mode . '&amp;amp;start=' . $start;
</pre></div>
<p class="good">// Double quotes are sometimes needed to not overcroud the line with concentinations</p>
<div class="codebox"><pre>
$post_url = "{$phpbb_root_path}posting.$phpEx?mode=$mode&amp;amp;start=$start";
$some_string = "{$board_url}someurl.php?mode=$mode&amp;amp;start=$start";
</pre></div>
<p>In SQL Statements mixing single and double quotes is partly allowed (following the guidelines listed here about SQL Formatting), else it should be tryed to only use one method - mostly single quotes.</p>
@@ -518,7 +517,7 @@ switch ($mode)
break;
default:
// Always assume that the case got not catched
// Always assume that a case was not caught
break;
}
</pre></div>
@@ -541,7 +540,7 @@ switch ($mode)
default:
// Always assume that the case got not catched
// Always assume that a case was not caught
break;
}
@@ -569,7 +568,7 @@ switch ($mode)
default:
// Always assume that the case got not catched
// Always assume that a case was not caught
break;
}
@@ -690,7 +689,29 @@ $sql = 'UPDATE ' . SOME_TABLE . '
$db-&gt;sql_query($sql);
</pre></div>
<p>The <code>$db-&gt;sql_build_array()</code> function supports the following modes: <code>INSERT</code> (example above), <code>INSERT_SELECT</code> (building query for <code>INSERT INTO table (...) SELECT value, column ...</code> statements), <code>MULTI_INSERT</code> (for returning extended inserts), <code>UPDATE</code> (example above) and <code>SELECT</code> (for building WHERE statement [AND logic]).</p>
<p>The <code>$db-&gt;sql_build_array()</code> function supports the following modes: <code>INSERT</code> (example above), <code>INSERT_SELECT</code> (building query for <code>INSERT INTO table (...) SELECT value, column ...</code> statements), <code>UPDATE</code> (example above) and <code>SELECT</code> (for building WHERE statement [AND logic]).</p>
<h4>sql_multi_insert():</h4>
<p>If you want to insert multiple statements at once, please use the separate <code>sql_multi_insert()</code> method. An example:</p>
<div class="codebox"><pre>
$sql_ary = array();
$sql_ary[] = array(
'somedata' =&gt; $my_string_1,
'otherdata' =&gt; $an_int_1,
'moredata' =&gt; $another_int_1,
);
$sql_ary[] = array(
'somedata' =&gt; $my_string_2,
'otherdata' =&gt; $an_int_2,
'moredata' =&gt; $another_int_2,
);
$db->sql_multi_insert(SOME_TABLE, $sql_ary);
</pre></div>
<h4>sql_in_set():</h4>
@@ -854,7 +875,7 @@ $submit = (isset($HTTP_POST_VARS['submit'])) ? true : false;
<p class="good">// Use request var and define a default variable (use the correct type)</p>
<div class="codebox"><pre>
$start = request_var('start', 0);
$submit = (isset($_POST['submit'])) ? true : false;
$submit = request::is_set_post('submit');
</pre></div>
<p class="bad">// $start is an int, the following use of request_var therefore is not allowed</p>
@@ -925,12 +946,18 @@ trigger_error('NO_MODE', E_USER_ERROR);
<h4>Url formatting</h4>
<p>All urls pointing to internal files need to be prepended by the <code>$phpbb_root_path</code> variable. Within the administration control panel all urls pointing to internal files need to be prepended by the <code>$phpbb_admin_path</code> variable. This makes sure the path is always correct and users being able to just rename the admin folder and the acp still working as intended (though some links will fail and the code need to be slightly adjusted).</p>
<p>All urls pointing to internal files need to be prepended by the <code>PHPBB_ROOT_PATH</code> constant. Within the administration control panel all urls pointing to internal files need to be prepended by the <code>PHPBB_ADMIN_PATH</code> constant. This makes sure the path is always correct and users being able to just rename the admin folder and the acp still working as intended (though some links will fail and the code need to be slightly adjusted).</p>
<p>The <code>append_sid()</code> function from 2.0.x is available too, though does not handle url alterations automatically. Please have a look at the code documentation if you want to get more details on how to use append_sid(). A sample call to append_sid() can look like this:</p>
<div class="codebox"><pre>
append_sid(&quot;{$phpbb_root_path}memberlist.$phpEx&quot;, 'mode=group&amp;amp;g=' . $row['group_id'])
append_sid(PHPBB_ROOT_PATH . 'memberlist.' . PHP_EXT, 'mode=group&amp;amp;g=' . $row['group_id'])
</pre></div>
<p>For shorter writing internal urls are allowed to be written in short notation, not providing the root path and the extension. The append_sid() function will prepend the root path and append the extension automatically (and before calling the hook).</p>
<div class="codebox"><pre>
append_sid('memberlist', 'mode=group&amp;amp;g=' . $row['group_id'])
</pre></div>
<h4>General function usage: </h4>
@@ -973,8 +1000,18 @@ append_sid(&quot;{$phpbb_root_path}memberlist.$phpEx&quot;, 'mode=group&amp;amp;
<div class="inner"><span class="corners-top"><span></span></span>
<div class="content">
<h4>General things</h4>
<a name="cfgfiles"></a><h3>3.i. Style Config Files</h3>
<p>Style cfg files are simple name-value lists with the information necessary for installing a style. Similar cfg files exist for templates, themes and imagesets. These follow the same principle and will not be introduced individually. Styles can use installed components by using the required_theme/required_template/required_imageset entries. The important part of the style configuration file is assigning an unique name.</p>
<div class="codebox"><pre>
# General Information about this style
name = prosilver_duplicate
copyright = &copy; phpBB Group, 2007
version = 3.0.3
required_template = prosilver
required_theme = prosilver
required_imageset = prosilver
</pre></div>
<a name="genstyling"></a><h3>3.2. General Styling Rules</h3>
<p>Templates should be produced in a consistent manner. Where appropriate they should be based off an existing copy, e.g. index, viewforum or viewtopic (the combination of which implement a range of conditional and variable forms). Please also note that the intendation and coding guidelines also apply to templates where possible.</p>
<p>The outer table class <code>forumline</code> has gone and is replaced with <code>tablebg</code>.</p>
@@ -1042,6 +1079,8 @@ append_sid(&quot;{$phpbb_root_path}memberlist.$phpEx&quot;, 'mode=group&amp;amp;
<div class="content">
<a name="templates"></a><h3>4.i. General Templating</h3>
<h4>File naming</h4>
<p>Firstly templates now take the suffix &quot;.html&quot; rather than &quot;.tpl&quot;. This was done simply to make the lifes of some people easier wrt syntax highlighting, etc.</p>
@@ -1059,7 +1098,7 @@ append_sid(&quot;{$phpbb_root_path}memberlist.$phpEx&quot;, 'mode=group&amp;amp;
<span class="comment">&lt;!-- END loopname --&gt;</span>
</pre></div>
<p>A bit later loops will be explained further. To not irretate you we will explain conditionals as well as other statements first.</p>
<p>A bit later loops will be explained further. To not irritate you we will explain conditionals as well as other statements first.</p>
<h4>Including files</h4>
<p>Something that existed in 2.0.x which no longer exists in 3.0.x is the ability to assign a template to a variable. This was used (for example) to output the jumpbox. Instead (perhaps better, perhaps not but certainly more flexible) we now have INCLUDE. This takes the simple form:</p>
@@ -1429,6 +1468,29 @@ div
&lt;/fieldset&gt
&lt;/form&gt
</pre></div><br />
<a name="inheritance"></a><h3>4.ii. Template Inheritance</h3>
<p>When basing a new template on an existing one, it is not necessary to provide all template files. By declaring the template to be &quot;<strong>inheriting</strong>&quot; in the template configuration file.</p>
<p>The limitation on this is that the base style has to be installed and complete, meaning that it is not itself inheriting.</p>
<p>The effect of doing so is that the template engine will use the files in the new template where they exist, but fall back to files in the base template otherwise. Declaring a style to be inheriting also causes it to use some of the configuration settings of the base style, notably database storage.</p>
<p>We strongly encourage the use of inheritance for styles based on the bundled styles, as it will ease the update procedure.</p>
<div class="codebox"><pre>
# General Information about this template
name = inherits
copyright = &copy; phpBB Group, 2007
version = 3.0.3
# Defining a different template bitfield
template_bitfield = lNg=
# Are we inheriting?
inherit_from = prosilver
</pre></div>
</div>
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
@@ -1450,7 +1512,7 @@ div
<h4>What are Unicode, UCS and UTF-8?</h4>
<p>The <a href="http://en.wikipedia.org/wiki/Universal_Character_Set">Universal Character Set (UCS)</a> described in ISO/IEC 10646 consists of a large amount of characters. Each of them has a unique name and a code point which is an integer number. <a href="http://en.wikipedia.org/wiki/Unicode">Unicode</a> - which is an industry standard - complements the Universal Character Set with further information about the characters' properties and alternative character encodings. More information on Unicode can be found on the <a href="http://www.unicode.org/">Unicode Consortium's website</a>. One of the Unicode encodings is the <a href="http://en.wikipedia.org/wiki/UTF-8">8-bit Unicode Transformation Format (UTF-8)</a>. It encodes characters with up to four bytes aiming for maximum compatability with the <a href="http://en.wikipedia.org/wiki/ASCII">American Standard Code for Information Interchange</a> which is a 7-bit encoding of a relatively small subset of the UCS.</p>
<p>The <a href="http://en.wikipedia.org/wiki/Universal_Character_Set">Universal Character Set (UCS)</a> described in ISO/IEC 10646 consists of a large amount of characters. Each of them has a unique name and a code point which is an integer number. <a href="http://en.wikipedia.org/wiki/Unicode">Unicode</a> - which is an industry standard - complements the Universal Character Set with further information about the characters' properties and alternative character encodings. More information on Unicode can be found on the <a href="http://www.unicode.org/">Unicode Consortium's website</a>. One of the Unicode encodings is the <a href="http://en.wikipedia.org/wiki/UTF-8">8-bit Unicode Transformation Format (UTF-8)</a>. It encodes characters with up to four bytes aiming for maximum compatibility with the <a href="http://en.wikipedia.org/wiki/ASCII">American Standard Code for Information Interchange</a> which is a 7-bit encoding of a relatively small subset of the UCS.</p>
<h4>phpBB's use of Unicode</h4>
<p>Unfortunately PHP does not faciliate the use of Unicode prior to version 6. Most functions simply treat strings as sequences of bytes assuming that each character takes up exactly one byte. This behaviour still allows for storing UTF-8 encoded text in PHP strings but many operations on strings have unexpected results. To circumvent this problem we have created some alternative functions to PHP's native string operations which use code points instead of bytes. These functions can be found in <code>/includes/utf/utf_tools.php</code>. They are also covered in the <a href="http://area51.phpbb.com/docs/code/">phpBB3 Sourcecode Documentation</a>. A lot of native PHP functions still work with UTF-8 as long as you stick to certain restrictions. For example <code>explode</code> still works as long as the first and the last character of the delimiter string are ASCII characters.</p>
@@ -2195,6 +2257,13 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
<div class="content">
<h3>Revision 8596+</h3>
<ul>
<li>Removed sql_build_array('MULTI_INSERT'... statements.</li>
<li>Added sql_multi_insert() explanation.</li>
</ul>
<h3>Revision 1.31</h3>
<ul>

View File

@@ -14,7 +14,7 @@
<title>phpBB3 &bull; Hook System</title>
<style type="text/css">
<!--
/* <![CDATA[ */
/*
The original "prosilver" theme for phpBB3
@@ -309,7 +309,7 @@ a:active { color: #368AD2; }
margin-left: 25px;
}
//-->
/* ]]> */
</style>
</head>
@@ -383,10 +383,10 @@ a:active { color: #368AD2; }
<p>There are also valid external constants you may want to use if you embed phpBB3 into your application:</p>
<div class="codebox"><pre>
PHPBB_MSG_HANDLER (overwrite message handler)
PHPBB_MSG_HANDLER (define own message handler)
PHPBB_DB_NEW_LINK (overwrite new_link parameter for sql_connect)
PHPBB_ROOT_PATH (overwrite $phpbb_root_path)
PHPBB_ADMIN_PATH (overwrite $phpbb_admin_path)
PHPBB_ROOT_PATH (define own PHPBB_ROOT_PATH)
PHPBB_ADMIN_PATH (define own PHPBB_ADMIN_PATH)
</pre></div>
</div>

View File

@@ -12,117 +12,78 @@
* @ignore
*/
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './../';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
if (!defined('PHPBB_ROOT_PATH')) define('PHPBB_ROOT_PATH', './../');
if (!defined('PHP_EXT')) define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
include(PHPBB_ROOT_PATH . 'common.' . PHP_EXT);
if (isset($_GET['avatar']))
// Thank you sun.
if (isset($_SERVER['CONTENT_TYPE']))
{
require($phpbb_root_path . 'config.' . $phpEx);
require($phpbb_root_path . 'includes/acm/acm_' . $acm_type . '.' . $phpEx);
require($phpbb_root_path . 'includes/cache.' . $phpEx);
require($phpbb_root_path . 'includes/db/' . $dbms . '.' . $phpEx);
require($phpbb_root_path . 'includes/constants.' . $phpEx);
$db = new $sql_db();
$cache = new cache();
// Connect to DB
if (!@$db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false, false))
if ($_SERVER['CONTENT_TYPE'] === 'application/x-java-archive')
{
exit;
}
unset($dbpasswd);
}
else if (isset($_SERVER['HTTP_USER_AGENT']) && strpos($_SERVER['HTTP_USER_AGENT'], 'Java') !== false)
{
exit;
}
if (request::is_set('avatar', request::GET))
{
// worst-case default
$browser = (!empty($_SERVER['HTTP_USER_AGENT'])) ? htmlspecialchars((string) $_SERVER['HTTP_USER_AGENT']) : 'msie 6.0';
$config = $cache->obtain_config();
$filename = $_GET['avatar'];
$config = cache::obtain_config();
$filename = request::variable('avatar', '', false, request::GET);
$avatar_group = false;
$exit = false;
if ($filename[0] === 'g')
{
$avatar_group = true;
$filename = substr($filename, 1);
}
// '==' is not a bug - . as the first char is as bad as no dot at all
if (strpos($filename, '.') == false)
{
header('HTTP/1.0 403 forbidden');
if (!empty($cache))
{
$cache->unload();
}
$db->sql_close();
exit;
$exit = true;
}
if (!$exit)
{
$ext = substr(strrchr($filename, '.'), 1);
$stamp = (int) substr(stristr($filename, '_'), 1);
$filename = (int) $filename;
$exit = set_modified_headers($stamp, $browser);
}
if (!$exit && !in_array($ext, array('png', 'gif', 'jpg', 'jpeg')))
{
// no way such an avatar could exist. They are not following the rules, stop the show.
header("HTTP/1.0 403 Forbidden");
$exit = true;
}
$ext = substr(strrchr($filename, '.'), 1);
$stamp = (int) substr(stristr($filename, '_'), 1);
$filename = (int) $filename;
// let's see if we have to send the file at all
$last_load = isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) ? strtotime(trim($_SERVER['HTTP_IF_MODIFIED_SINCE'])) : false;
if (strpos(strtolower($browser), 'msie 6.0') === false)
if (!$exit)
{
if ($last_load !== false && $last_load <= $stamp)
if (!$filename)
{
if (@php_sapi_name() === 'CGI')
{
header('Status: 304 Not Modified', true, 304);
}
else
{
header('HTTP/1.0 304 Not Modified', true, 304);
}
// seems that we need those too ... browsers
header('Pragma: public');
header('Expires: ' . gmdate('D, d M Y H:i:s \G\M\T', time() + 31536000));
exit();
}
// no way such an avatar could exist. They are not following the rules, stop the show.
header("HTTP/1.0 403 Forbidden");
}
else
{
header('Last-Modified: ' . gmdate('D, d M Y H:i:s', $stamp) . ' GMT');
send_avatar_to_browser(($avatar_group ? 'g' : '') . $filename . '.' . $ext, $browser);
}
}
if (!in_array($ext, array('png', 'gif', 'jpg', 'jpeg')))
{
// no way such an avatar could exist. They are not following the rules, stop the show.
header("HTTP/1.0 403 forbidden");
if (!empty($cache))
{
$cache->unload();
}
$db->sql_close();
exit;
}
if (!$filename)
{
// no way such an avatar could exist. They are not following the rules, stop the show.
header("HTTP/1.0 403 forbidden");
if (!empty($cache))
{
$cache->unload();
}
$db->sql_close();
exit;
}
send_avatar_to_browser(($avatar_group ? 'g' : '') . $filename . '.' . $ext, $browser);
if (!empty($cache))
{
$cache->unload();
}
$db->sql_close();
exit;
file_gc();
}
// implicit else: we are not in avatar mode
include($phpbb_root_path . 'common.' . $phpEx);
$download_id = request_var('id', 0);
$mode = request_var('mode', '');
$thumbnail = request_var('t', false);
@@ -142,7 +103,7 @@ if (!$config['allow_attachments'] && !$config['allow_pm_attach'])
trigger_error('ATTACHMENT_FUNCTIONALITY_DISABLED');
}
$sql = 'SELECT attach_id, in_message, post_msg_id, extension, is_orphan, poster_id
$sql = 'SELECT attach_id, in_message, post_msg_id, extension, is_orphan, poster_id, filetime
FROM ' . ATTACHMENTS_TABLE . "
WHERE attach_id = $download_id";
$result = $db->sql_query_limit($sql, 1);
@@ -172,7 +133,7 @@ if ($attachment['is_orphan'])
}
// Obtain all extensions...
$extensions = $cache->obtain_attach_extensions(true);
$extensions = cache::obtain_attach_extensions(true);
}
else
{
@@ -208,8 +169,32 @@ else
$row['forum_id'] = false;
if (!$auth->acl_get('u_pm_download'))
{
header('HTTP/1.0 403 forbidden');
trigger_error('SORRY_AUTH_VIEW_ATTACH');
}
// Check if the attachment is within the users scope...
$sql = 'SELECT user_id, author_id
FROM ' . PRIVMSGS_TO_TABLE . '
WHERE msg_id = ' . $attachment['post_msg_id'];
$result = $db->sql_query($sql);
$allowed = false;
while ($user_row = $db->sql_fetchrow($result))
{
if ($user->data['user_id'] == $user_row['user_id'] || $user->data['user_id'] == $user_row['author_id'])
{
$allowed = true;
break;
}
}
$db->sql_freeresult($result);
if (!$allowed)
{
header('HTTP/1.0 403 forbidden');
trigger_error('ERROR_NO_ATTACHMENT');
}
}
// disallowed?
@@ -222,13 +207,14 @@ else
if (!download_allowed())
{
header('HTTP/1.0 403 forbidden');
trigger_error($user->lang['LINKAGE_FORBIDDEN']);
}
$download_mode = (int) $extensions[$attachment['extension']]['download_mode'];
// Fetching filename here to prevent sniffing of filename
$sql = 'SELECT attach_id, is_orphan, in_message, post_msg_id, extension, physical_filename, real_filename, mimetype
$sql = 'SELECT attach_id, is_orphan, in_message, post_msg_id, extension, physical_filename, real_filename, mimetype, filetime
FROM ' . ATTACHMENTS_TABLE . "
WHERE attach_id = $download_id";
$result = $db->sql_query_limit($sql, 1);
@@ -266,9 +252,9 @@ else if (($display_cat == ATTACHMENT_CATEGORY_NONE || $display_cat == ATTACHMENT
$db->sql_query($sql);
}
if ($display_cat == ATTACHMENT_CATEGORY_IMAGE && $mode === 'view' && (strpos($attachment['mimetype'], 'image') === 0) && strpos(strtolower($user->browser), 'msie') !== false)
if ($display_cat == ATTACHMENT_CATEGORY_IMAGE && $mode === 'view' && (strpos($attachment['mimetype'], 'image') === 0) && ((strpos(strtolower($user->browser), 'msie') !== false) && (strpos(strtolower($user->browser), 'msie 8.0') === false)))
{
wrap_img_in_html(append_sid($phpbb_root_path . 'download/file.' . $phpEx, 'id=' . $attachment['attach_id']), $attachment['real_filename']);
wrap_img_in_html(append_sid('download/file', 'id=' . $attachment['attach_id']), $attachment['real_filename']);
}
else
{
@@ -276,18 +262,18 @@ else
if ($download_mode == PHYSICAL_LINK)
{
// This presenting method should no longer be used
if (!@is_dir($phpbb_root_path . $config['upload_path']))
if (!@is_dir(PHPBB_ROOT_PATH . $config['upload_path']))
{
trigger_error($user->lang['PHYSICAL_DOWNLOAD_NOT_POSSIBLE']);
}
redirect($phpbb_root_path . $config['upload_path'] . '/' . $attachment['physical_filename']);
exit;
redirect(PHPBB_ROOT_PATH . $config['upload_path'] . '/' . $attachment['physical_filename']);
file_gc();
}
else
{
send_file_to_browser($attachment, $config['upload_path'], $display_cat);
exit;
file_gc();
}
}
@@ -298,7 +284,7 @@ else
*/
function send_avatar_to_browser($file, $browser)
{
global $config, $phpbb_root_path;
global $config;
$prefix = $config['avatar_salt'] . '_';
$image_dir = $config['avatar_path'];
@@ -314,7 +300,7 @@ function send_avatar_to_browser($file, $browser)
{
$image_dir = '';
}
$file_path = $phpbb_root_path . $image_dir . '/' . $prefix . $file;
$file_path = PHPBB_ROOT_PATH . $image_dir . '/' . $prefix . $file;
if ((@file_exists($file_path) && @is_readable($file_path)) && !headers_sent())
{
@@ -323,7 +309,7 @@ function send_avatar_to_browser($file, $browser)
$image_data = @getimagesize($file_path);
header('Content-Type: ' . image_type_to_mime_type($image_data[2]));
if (strpos(strtolower($browser), 'msie') !== false)
if (strpos(strtolower($browser), 'msie') !== false && strpos(strtolower($browser), 'msie 8.0') === false)
{
header('Content-Disposition: attachment; ' . header_filename($file));
@@ -348,7 +334,7 @@ function send_avatar_to_browser($file, $browser)
header("Content-Length: $size");
}
if (@readfile($file_path) === false)
if (@readfile($file_path) == false)
{
$fp = @fopen($file_path, 'rb');
@@ -396,9 +382,9 @@ function wrap_img_in_html($src, $title)
*/
function send_file_to_browser($attachment, $upload_dir, $category)
{
global $user, $db, $config, $phpbb_root_path;
global $user, $db, $config;
$filename = $phpbb_root_path . $upload_dir . '/' . $attachment['physical_filename'];
$filename = PHPBB_ROOT_PATH . $upload_dir . '/' . $attachment['physical_filename'];
if (!@file_exists($filename))
{
@@ -453,9 +439,10 @@ function send_file_to_browser($attachment, $upload_dir, $category)
*/
// Send out the Headers. Do not set Content-Disposition to inline please, it is a security measure for users using the Internet Explorer.
header('Content-Type: ' . $attachment['mimetype']);
$is_ie8 = (strpos(strtolower($user->browser), 'msie 8.0') !== false);
header('Content-Type: ' . $attachment['mimetype'] . (($is_ie8) ? '; authoritative=true;' : ''));
if (empty($user->browser) || (strpos(strtolower($user->browser), 'msie') !== false))
if (empty($user->browser) || (!$is_ie8 && (strpos(strtolower($user->browser), 'msie') !== false)))
{
header('Content-Disposition: attachment; ' . header_filename(htmlspecialchars_decode($attachment['real_filename'])));
if (empty($user->browser) || (strpos(strtolower($user->browser), 'msie 6.0') !== false))
@@ -466,33 +453,43 @@ function send_file_to_browser($attachment, $upload_dir, $category)
else
{
header('Content-Disposition: ' . ((strpos($attachment['mimetype'], 'image') === 0) ? 'inline' : 'attachment') . '; ' . header_filename(htmlspecialchars_decode($attachment['real_filename'])));
if ($is_ie8 && (strpos($attachment['mimetype'], 'image') !== 0))
{
header('X-Download-Options: noopen');
}
}
if ($size)
{
header("Content-Length: $size");
}
// Try to deliver in chunks
@set_time_limit(0);
// Close the db connection before sending the file
$db->sql_close();
$fp = @fopen($filename, 'rb');
if ($fp !== false)
if (!set_modified_headers($attachment['filetime'], $user->browser))
{
while (!feof($fp))
// Try to deliver in chunks
@set_time_limit(0);
$fp = @fopen($filename, 'rb');
if ($fp !== false)
{
echo fread($fp, 8192);
while (!feof($fp))
{
echo fread($fp, 8192);
}
fclose($fp);
}
else
{
@readfile($filename);
}
fclose($fp);
}
else
{
@readfile($filename);
}
flush();
exit;
flush();
}
file_gc();
}
/**
@@ -556,9 +553,9 @@ function download_allowed()
}
}
}
// Check for own server...
$server_name = (!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : getenv('SERVER_NAME');
$server_name = $user->host;
// Forcing server vars is the only way to specify/override the protocol
if ($config['force_server_vars'] || !$server_name)
@@ -570,7 +567,7 @@ function download_allowed()
{
$allowed = true;
}
// Get IP's and Hostnames
if (!$allowed)
{
@@ -620,8 +617,52 @@ function download_allowed()
}
$db->sql_freeresult($result);
}
return $allowed;
}
/**
* Check if the browser has the file already and set the appropriate headers-
* @returns false if a resend is in order.
*/
function set_modified_headers($stamp, $browser)
{
// let's see if we have to send the file at all
$last_load = isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) ? strtotime(trim($_SERVER['HTTP_IF_MODIFIED_SINCE'])) : false;
if ((strpos(strtolower($browser), 'msie 6.0') === false) && (strpos(strtolower($browser), 'msie 8.0') === false))
{
if ($last_load !== false && $last_load <= $stamp)
{
if (@php_sapi_name() === 'CGI')
{
header('Status: 304 Not Modified', true, 304);
}
else
{
header('HTTP/1.0 304 Not Modified', true, 304);
}
// seems that we need those too ... browsers
header('Pragma: public');
header('Expires: ' . gmdate('D, d M Y H:i:s \G\M\T', time() + 31536000));
return true;
}
else
{
header('Last-Modified: ' . gmdate('D, d M Y H:i:s', $stamp) . ' GMT');
}
}
return false;
}
function file_gc()
{
global $cache, $db;
if (!empty($cache))
{
$cache->unload();
}
$db->sql_close();
exit;
}
?>

0
phpBB/download/index.htm Executable file → Normal file
View File

View File

@@ -12,9 +12,9 @@
* @ignore
*/
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
if (!defined('PHPBB_ROOT_PATH')) define('PHPBB_ROOT_PATH', './');
if (!defined('PHP_EXT')) define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
include(PHPBB_ROOT_PATH . 'common.' . PHP_EXT);
// Start session management
$user->session_begin();
@@ -67,7 +67,7 @@ page_header($l_title);
$template->set_filenames(array(
'body' => 'faq_body.html')
);
make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"));
make_jumpbox(append_sid('viewforum'));
page_footer();

0
phpBB/images/avatars/upload/.htaccess Executable file → Normal file
View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 170 B

After

Width:  |  Height:  |  Size: 407 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 172 B

After

Width:  |  Height:  |  Size: 408 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 498 B

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 413 B

After

Width:  |  Height:  |  Size: 627 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 410 B

After

Width:  |  Height:  |  Size: 628 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 410 B

After

Width:  |  Height:  |  Size: 623 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 420 B

After

Width:  |  Height:  |  Size: 628 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 416 B

After

Width:  |  Height:  |  Size: 630 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 427 B

After

Width:  |  Height:  |  Size: 415 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 422 B

After

Width:  |  Height:  |  Size: 631 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 413 B

After

Width:  |  Height:  |  Size: 630 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 170 B

After

Width:  |  Height:  |  Size: 619 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 236 B

After

Width:  |  Height:  |  Size: 648 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 236 B

After

Width:  |  Height:  |  Size: 632 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 176 B

After

Width:  |  Height:  |  Size: 411 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 336 B

After

Width:  |  Height:  |  Size: 707 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 174 B

After

Width:  |  Height:  |  Size: 646 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 349 B

After

Width:  |  Height:  |  Size: 608 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 171 B

After

Width:  |  Height:  |  Size: 621 B

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