Skip to content
Browse files

Merge branch 'prep-release-3.0.9'

* prep-release-3.0.9: (359 commits)
  [prep-release-3.0.9] Bumping version number for 3.0.9 final.
  [prep-release-3.0.9] Update Changelog for 3.0.9-RC4 release.
  [prep-release-3.0.9] Decreasing version for an RC4 release.
  [ticket/9859] Changing all phpBB footers to match the new credit line
  [ticket/9859] New footer copyright line with registered symbol
  [ticket/10250] The site_logo hash is different depending on imageset & language
  [ticket/10250] Destroy cached md5 hash of site_logo on refreshing an imageset
  [ticket/10250] Overwrite the site_logo width&height when the phpbb logo is used
  [ticket/10247] Remove attempt_id as primary key from database_update.php
  [ticket/10250] Added the new phpBB Logo with the Registered Trademark Symbol
  [ticket/10247] Use COUNT(*) instead of COUNT(attempt_id)
  [prep-release-3.0.9] Update Changelog for 3.0.9 release.
  [prep-release-3.0.9] Bumping version number for the final 3.0.9 release.
  [ticket/10247] Removing attempt_id column from the 3.0.8 to 3.0.9-RC1 updater.
  [ticket/10247] Add a db_tools test for the removal of a primary key column.
  [ticket/10247] Add empty data section to database update for RC4
  [ticket/10247] Remove unecessary attempt_id primary key column
  [prep-release-3.0.9] Bump database version to RC3 too.
  [prep-release-3.0.9] Update Changelog for 3.0.9-RC3 release.
  [prep-release-3.0.9] Bumping version number for 3.0.9-RC3.
  ...
  • Loading branch information...
2 parents 7f21a5f + e6572b7 commit c8da5ad9f42d8ced1aead79a42cc5caee5c5a2ff @bantu bantu committed
Showing with 4,883 additions and 1,489 deletions.
  1. +4 −0 .gitignore
  2. +20 −0 README.md
  3. +25 −13 build/build.xml
  4. +1 −1 build/build_helper.php
  5. +145 −0 build/phpdoc-phpbb.ini
  6. +36 −5 git-tools/hooks/commit-msg
  7. +2 −2 git-tools/hooks/prepare-commit-msg
  8. +175 −0 git-tools/merge.php
  9. +248 −0 git-tools/setup_github_network.php
  10. +10 −6 phpBB/adm/index.php
  11. +1 −1 phpBB/adm/style/acp_ban.html
  12. +4 −0 phpBB/adm/style/acp_email.html
  13. +9 −9 phpBB/adm/style/acp_forums.html
  14. +2 −2 phpBB/adm/style/acp_ranks.html
  15. +16 −1 phpBB/adm/style/acp_styles.html
  16. +4 −4 phpBB/adm/style/acp_users_overview.html
  17. +1 −1 phpBB/adm/style/captcha_recaptcha.html
  18. +2 −13 phpBB/adm/style/install_footer.html
  19. +2 −13 phpBB/adm/style/overall_footer.html
  20. +1 −12 phpBB/adm/style/simple_footer.html
  21. +1 −106 phpBB/common.php
  22. +12 −84 phpBB/cron.php
  23. +33 −2 phpBB/develop/create_schema_files.php
  24. +3 −3 phpBB/develop/create_variable_overview.php
  25. +3 −2 phpBB/develop/mysql_upgrader.php
  26. +14 −13 phpBB/docs/AUTHORS
  27. +388 −19 phpBB/docs/CHANGELOG.html
  28. +2 −2 phpBB/docs/FAQ.html
  29. +11 −4 phpBB/docs/INSTALL.html
  30. +2 −2 phpBB/docs/README.html
  31. +2 −2 phpBB/docs/auth_api.html
  32. +8 −3 phpBB/docs/coding-guidelines.html
  33. +4 −2 phpBB/docs/hook_system.html
  34. +60 −0 phpBB/docs/lighttpd.sample.conf
  35. +25 −6 phpBB/docs/{nginx.conf.sample → nginx.sample.conf}
  36. +14 −7 phpBB/download/file.php
  37. +27 −19 phpBB/feed.php
  38. +2 −2 phpBB/includes/acm/acm_file.php
  39. +145 −0 phpBB/includes/acm/acm_redis.php
  40. +84 −0 phpBB/includes/acm/acm_wincache.php
  41. +1 −1 phpBB/includes/acp/acp_bbcodes.php
  42. +13 −3 phpBB/includes/acp/acp_board.php
  43. +12 −0 phpBB/includes/acp/acp_disallow.php
  44. +35 −10 phpBB/includes/acp/acp_email.php
  45. +4 −0 phpBB/includes/acp/acp_icons.php
  46. +6 −6 phpBB/includes/acp/acp_language.php
  47. +1 −1 phpBB/includes/acp/acp_main.php
  48. +1 −1 phpBB/includes/acp/acp_profile.php
  49. +16 −2 phpBB/includes/acp/acp_search.php
  50. +218 −43 phpBB/includes/acp/acp_styles.php
  51. +3 −0 phpBB/includes/acp/acp_words.php
  52. +12 −2 phpBB/includes/auth.php
  53. +61 −4 phpBB/includes/auth/auth_db.php
  54. +1 −1 phpBB/includes/auth/auth_ldap.php
  55. +1 −18 phpBB/includes/cache.php
  56. +28 −28 phpBB/includes/captcha/captcha_gd.php
  57. +2 −2 phpBB/includes/captcha/captcha_gd_wave.php
  58. +2 −2 phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php
  59. +9 −4 phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php
  60. +6 −2 phpBB/includes/constants.php
  61. +304 −7 phpBB/includes/db/db_tools.php
  62. +11 −1 phpBB/includes/db/dbal.php
  63. +46 −3 phpBB/includes/db/firebird.php
  64. +10 −2 phpBB/includes/db/mssqlnative.php
  65. +2 −1 phpBB/includes/db/oracle.php
  66. +35 −1 phpBB/includes/db/postgres.php
  67. +61 −0 phpBB/includes/error_collector.php
  68. +115 −34 phpBB/includes/functions.php
  69. +14 −10 phpBB/includes/functions_admin.php
  70. +1 −0 phpBB/includes/functions_convert.php
  71. +1 −2 phpBB/includes/functions_display.php
  72. +105 −3 phpBB/includes/functions_posting.php
  73. +13 −1 phpBB/includes/functions_profile_fields.php
  74. +1 −1 phpBB/includes/functions_template.php
  75. +2 −2 phpBB/includes/functions_upload.php
  76. +44 −59 phpBB/includes/functions_user.php
  77. +1 −1 phpBB/includes/mcp/mcp_front.php
  78. +26 −25 phpBB/includes/mcp/mcp_main.php
  79. +2 −2 phpBB/includes/mcp/mcp_post.php
  80. +28 −16 phpBB/includes/message_parser.php
  81. +78 −25 phpBB/includes/session.php
  82. +150 −0 phpBB/includes/startup.php
  83. +2 −2 phpBB/includes/template.php
  84. +7 −0 phpBB/includes/ucp/ucp_activate.php
  85. +2 −2 phpBB/includes/ucp/ucp_pm.php
  86. +26 −5 phpBB/includes/ucp/ucp_pm_compose.php
  87. +1 −0 phpBB/includes/ucp/ucp_pm_viewfolder.php
  88. +4 −1 phpBB/includes/ucp/ucp_pm_viewmessage.php
  89. +1 −1 phpBB/includes/ucp/ucp_prefs.php
  90. +2 −2 phpBB/includes/ucp/ucp_register.php
  91. +2 −2 phpBB/install/convertors/convert_phpbb20.php
  92. +3 −0 phpBB/install/convertors/functions_phpbb20.php
  93. +460 −29 phpBB/install/database_update.php
  94. +13 −96 phpBB/install/index.php
  95. +1 −1 phpBB/install/install_install.php
  96. +17 −1 phpBB/install/schemas/firebird_schema.sql
  97. +29 −1 phpBB/install/schemas/mssql_schema.sql
  98. +18 −2 phpBB/install/schemas/mysql_40_schema.sql
  99. +18 −2 phpBB/install/schemas/mysql_41_schema.sql
  100. +25 −2 phpBB/install/schemas/oracle_schema.sql
  101. +20 −2 phpBB/install/schemas/postgres_schema.sql
  102. +15 −12 phpBB/install/schemas/schema_data.sql
  103. +18 −2 phpBB/install/schemas/sqlite_schema.sql
  104. +18 −12 phpBB/language/en/acp/board.php
  105. +1 −1 phpBB/language/en/acp/common.php
  106. +4 −2 phpBB/language/en/acp/email.php
  107. +1 −1 phpBB/language/en/acp/groups.php
  108. +5 −4 phpBB/language/en/acp/posting.php
  109. +6 −2 phpBB/language/en/acp/styles.php
  110. +3 −3 phpBB/language/en/captcha_recaptcha.php
  111. +4 −2 phpBB/language/en/common.php
  112. +3 −3 phpBB/language/en/install.php
  113. +2 −3 phpBB/language/en/mcp.php
  114. +1 −2 phpBB/language/en/memberlist.php
  115. +1 −0 phpBB/language/en/search.php
  116. +2 −0 phpBB/language/en/ucp.php
  117. +27 −3 phpBB/memberlist.php
  118. +11 −32 phpBB/posting.php
  119. +34 −22 phpBB/search.php
  120. +1 −12 phpBB/style.php
  121. +1 −1 phpBB/styles/prosilver/imageset/imageset.cfg
  122. BIN phpBB/styles/prosilver/imageset/site_logo.gif
  123. +1 −1 phpBB/styles/prosilver/style.cfg
  124. +2 −2 phpBB/styles/prosilver/template/attachment.html
  125. +1 −1 phpBB/styles/prosilver/template/login_body.html
  126. +2 −2 phpBB/styles/prosilver/template/mcp_post.html
  127. +1 −1 phpBB/styles/prosilver/template/mcp_topic.html
  128. +1 −1 phpBB/styles/prosilver/template/memberlist_im.html
  129. +1 −1 phpBB/styles/prosilver/template/memberlist_search.html
  130. +1 −12 phpBB/styles/prosilver/template/overall_footer.html
  131. +6 −11 phpBB/styles/prosilver/template/overall_header.html
  132. +1 −1 phpBB/styles/prosilver/template/posting_buttons.html
  133. +1 −1 phpBB/styles/prosilver/template/posting_smilies.html
  134. +1 −11 phpBB/styles/prosilver/template/simple_footer.html
  135. +2 −3 phpBB/styles/prosilver/template/simple_header.html
  136. +1 −1 phpBB/styles/prosilver/template/template.cfg
  137. +1 −1 phpBB/styles/prosilver/template/ucp_groups_manage.html
  138. +1 −11 phpBB/styles/prosilver/template/ucp_pm_viewmessage_print.html
  139. +3 −3 phpBB/styles/prosilver/template/viewforum_body.html
  140. +2 −3 phpBB/styles/prosilver/template/viewtopic_body.html
  141. +1 −12 phpBB/styles/prosilver/template/viewtopic_print.html
  142. +15 −5 phpBB/styles/prosilver/theme/colours.css
  143. +7 −5 phpBB/styles/prosilver/theme/cp.css
  144. +4 −1 phpBB/styles/prosilver/theme/forms.css
  145. +11 −7 phpBB/styles/prosilver/theme/links.css
  146. +2 −2 phpBB/styles/prosilver/theme/print.css
  147. +1 −1 phpBB/styles/prosilver/theme/theme.cfg
  148. +9 −0 phpBB/styles/prosilver/theme/tweaks.css
  149. +1 −1 phpBB/styles/subsilver2/imageset/imageset.cfg
  150. +1 −1 phpBB/styles/subsilver2/style.cfg
  151. +2 −2 phpBB/styles/subsilver2/template/attachment.html
  152. +1 −1 phpBB/styles/subsilver2/template/login_body.html
  153. +1 −1 phpBB/styles/subsilver2/template/mcp_topic.html
  154. +1 −1 phpBB/styles/subsilver2/template/memberlist_im.html
  155. +1 −12 phpBB/styles/subsilver2/template/overall_footer.html
  156. +2 −7 phpBB/styles/subsilver2/template/overall_header.html
  157. +1 −1 phpBB/styles/subsilver2/template/posting_body.html
  158. +1 −1 phpBB/styles/subsilver2/template/posting_buttons.html
  159. +1 −1 phpBB/styles/subsilver2/template/posting_smilies.html
  160. +1 −1 phpBB/styles/subsilver2/template/quickreply_editor.html
  161. +1 −1 phpBB/styles/subsilver2/template/searchbox.html
  162. +1 −12 phpBB/styles/subsilver2/template/simple_footer.html
  163. +0 −1 phpBB/styles/subsilver2/template/simple_header.html
  164. +1 −1 phpBB/styles/subsilver2/template/template.cfg
  165. +1 −10 phpBB/styles/subsilver2/template/ucp_pm_viewmessage_print.html
  166. +1 −1 phpBB/styles/subsilver2/template/viewtopic_body.html
  167. +1 −10 phpBB/styles/subsilver2/template/viewtopic_print.html
  168. +10 −4 phpBB/styles/subsilver2/theme/stylesheet.css
  169. +1 −1 phpBB/styles/subsilver2/theme/theme.cfg
  170. +6 −0 phpBB/ucp.php
  171. +8 −1 phpBB/viewforum.php
  172. +13 −2 phpBB/viewtopic.php
  173. +1 −1 phpBB/web.config
  174. +25 −0 phpunit.xml.all
  175. +31 −0 phpunit.xml.dist
  176. +13 −4 tests/RUNNING_TESTS.txt
  177. +0 −69 tests/all_tests.php
  178. +63 −0 tests/bbcode/url_bbcode_test.php
  179. +9 −15 tests/{test_framework/framework.php → bootstrap.php}
  180. +0 −42 tests/dbal/all_tests.php
  181. +276 −0 tests/dbal/db_tools_test.php
  182. +25 −2 tests/dbal/{select.php → select_test.php}
  183. +1 −2 tests/dbal/{write.php → write_test.php}
  184. +73 −0 tests/mock/cache.php
  185. +63 −0 tests/mock/session_testable.php
  186. +20 −0 tests/mock_user.php
  187. +0 −40 tests/network/all_tests.php
  188. +4 −2 tests/network/{checkdnsrr.php → checkdnsrr_test.php}
  189. +55 −0 tests/profile/custom_test.php
  190. +31 −0 tests/profile/fixtures/profile_fields.xml
  191. +0 −40 tests/random/all_tests.php
  192. +1 −2 tests/random/{gen_rand_string.php → gen_rand_string_test.php}
  193. +46 −0 tests/random/mt_rand.php
  194. +0 −46 tests/regex/all_tests.php
  195. +50 −0 tests/regex/censor_test.php
  196. +1 −2 tests/regex/{email.php → email_test.php}
  197. +1 −2 tests/regex/{ipv4.php → ipv4_test.php}
  198. +1 −2 tests/regex/{ipv6.php → ipv6_test.php}
  199. +81 −0 tests/regex/password_complexity_test.php
  200. +1 −2 tests/regex/{url.php → url_test.php}
  201. +0 −41 tests/request/all_tests.php
  202. +2 −2 tests/request/{request_var.php → request_var_test.php}
  203. +1 −33 tests/security/{all_tests.php → base.php}
  204. +4 −4 tests/security/{extract_current_page.php → extract_current_page_test.php}
  205. +21 −0 tests/security/hash_test.php
  206. +7 −5 tests/security/{redirect.php → redirect_test.php}
Sorry, we could not display the entire diff because it was too big.
View
4 .gitignore
@@ -1,8 +1,12 @@
*~
+phpunit.xml
phpBB/cache/*.php
+phpBB/cache/queue.php.lock
phpBB/config.php
phpBB/files/*
+phpBB/images/avatars/gallery/*
phpBB/images/avatars/upload/*
phpBB/store/*
tests/phpbb_unit_tests.sqlite2
tests/test_config.php
+tests/utf/data/*.txt
View
20 README.md
@@ -0,0 +1,20 @@
+[![phpBB](http://www.phpbb.com/theme/images/logos/blue/160x52.png)](http://www.phpbb.com)
+
+## ABOUT
+
+phpBB is a free bulletin board written in PHP.
+
+## COMMUNITY
+
+Find support and lots more on [phpBB.com](http://www.phpbb.com)! Discuss the development on [area51](http://area51.phpbb.com/phpBB/index.php).
+
+## CONTRIBUTE
+
+1. [Create an account on phpBB.com](http://www.phpbb.com/community/ucp.php?mode=register)
+2. [Create a ticket (unless there already is one)](http://tracker.phpbb.com/secure/CreateIssue!default.jspa)
+3. [Read our Git Contribution Guidelines](http://wiki.phpbb.com/Git); if you're new to git, also read [the introduction guide](http://wiki.phpbb.com/display/DEV/Working+with+Git)
+4. Send us a pull request
+
+## LICENSE
+
+[GNU General Public License v2](http://opensource.org/licenses/gpl-2.0.php)
View
38 build/build.xml
@@ -2,9 +2,9 @@
<project name="phpBB" description="The phpBB forum software" default="all" basedir="../">
<!-- a few settings for the build -->
- <property name="newversion" value="3.0.8" />
- <property name="prevversion" value="3.0.8-RC1" />
- <property name="olderversions" value="3.0.2, 3.0.3, 3.0.4, 3.0.5, 3.0.6, 3.0.7-PL1" />
+ <property name="newversion" value="3.0.9" />
+ <property name="prevversion" value="3.0.8" />
+ <property name="olderversions" value="3.0.2, 3.0.3, 3.0.4, 3.0.5, 3.0.6, 3.0.7, 3.0.7-PL1, 3.0.9-RC1, 3.0.9-RC2, 3.0.9-RC3, 3.0.9-RC4" />
<!-- no configuration should be needed beyond this point -->
<property name="oldversions" value="${olderversions}, ${prevversion}" />
@@ -12,7 +12,8 @@
<!-- These are the main targets which you will probably want to use -->
<target name="package" depends="clean,prepare,create-package" />
- <target name="all" depends="clean,prepare,test,create-package" />
+ <target name="all" depends="clean,prepare,test,docs,create-package" />
+ <target name="build" depends="clean,prepare,test,docs" />
<target name="prepare">
<mkdir dir="build/logs" />
@@ -42,12 +43,11 @@
<delete dir="build/save" />
</target>
- <target name="test">
- <exec dir="tests"
- command="phpunit --log-junit ../build/logs/phpunit.xml
- --coverage-clover ../build/logs/clover.xml
- --coverage-html ../build/coverage
- phpbb_all_tests all_tests.php"
+ <target name="test" depends="clean,prepare">
+ <exec dir="."
+ command="phpunit --log-junit build/logs/phpunit.xml
+ --coverage-clover build/logs/clover.xml
+ --coverage-html build/coverage"
passthru="true" />
@@ -64,6 +64,18 @@
-->
</target>
+ <target name="docs">
+ <!-- only works if you setup phpdoctor:
+ git clone https://github.com/peej/phpdoctor.git
+ and then create an executable phpdoctor in your path containing
+ #!/bin/sh
+ php -f /path/to/phpdoctor/phpdoc.php $@
+ -->
+ <exec dir="build"
+ command="phpdoctor phpdoc-phpbb.ini"
+ passthru="true" />
+ </target>
+
<target name="old-version-diffs">
<foreach list="${oldversions}" param="version" target="old-version-diff" />
</target>
@@ -121,7 +133,7 @@
-->
<target name="export">
<exec dir="phpBB"
- command="git archive ${revision} | tar -x -C ../${dir}"
+ command="git archive ${revision} | tar -xf - -C ../${dir}"
checkreturn="true" />
<delete file="${dir}/config.php" />
<delete dir="${dir}/develop" />
@@ -129,8 +141,8 @@
<echo msg="Setting permissions for checkout of ${revision} in ${dir}" />
<!-- set permissions of all files to 644, directories to 755 -->
- <exec dir="${dir}" command="find -type f|xargs chmod 644" escape="false" />
- <exec dir="${dir}" command="find -type d|xargs chmod 755" escape="false" />
+ <exec dir="${dir}" command="find . -type f|xargs chmod 644" escape="false" />
+ <exec dir="${dir}" command="find . -type d|xargs chmod 755" escape="false" />
<!-- set permissions of some directories to 777 -->
<chmod mode="0777" file="${dir}/cache" />
<chmod mode="0777" file="${dir}/store" />
View
2 build/build_helper.php
@@ -177,7 +177,7 @@ function collect_diff_files($diff_filename, $package_name)
}
// Is binary?
- if (preg_match('/^Binary files ' . $package_name . '\/(.*) and [a-z0-9_-]+\/\1 differ/i', $line, $match))
+ if (preg_match('/^Binary files ' . $package_name . '\/(.*) and [a-z0-9._-]+\/\1 differ/i', $line, $match))
{
$binary[] = trim($match[1]);
}
View
145 build/phpdoc-phpbb.ini
@@ -0,0 +1,145 @@
+; Default configuration file for PHPDoctor
+
+; This config file will cause PHPDoctor to generate API documentation of
+; itself.
+
+
+; PHPDoctor settings
+; -----------------------------------------------------------------------------
+
+; Names of files to parse. This can be a single filename, or a comma separated
+; list of filenames. Wildcards are allowed.
+
+files = "*.php"
+
+; Names of files or directories to ignore. This can be a single filename, or a
+; comma separated list of filenames. Wildcards are NOT allowed.
+
+;ignore = "CVS, .svn, .git, _compiled"
+ignore = templates_c/,*HTML/default/*,spec/,*config.php*,*CVS/,test_chora.php,testupdate/,cache/,store/,*proSilver/,develop/,includes/utf/data/,includes/captcha/fonts/,install/update/,install/update.new/,files/,*phpinfo.php*,*update_script.php*,*upgrade.php*,*convert.php*,install/converter/,language/de/,script/,*swatch.php*,*test.php*,*test2.php*,*install.php*,*functions_diff.php*,*acp_update.php*,acm_xcache.php
+
+; The directory to look for files in, if not used the PHPDoctor will look in
+; the current directory (the directory it is run from).
+
+source_path = "../phpBB/"
+
+; If you do not want PHPDoctor to look in each sub directory for files
+; uncomment this line.
+
+;subdirs = off
+
+; Set how loud PHPDoctor is as it runs. Quiet mode suppresses all output other
+; than warnings and errors. Verbose mode outputs additional messages during
+; execution.
+
+quiet = on
+;verbose = on
+
+; Select the doclet to use for generating output.
+
+doclet = standard
+;doclet = debug
+
+; The directory to find the doclet in. Doclets control the HTML output of
+; phpDoctor and can be modified to suit your needs. They are expected to be
+; in a directory named after themselves at the location given.
+
+;doclet_path = ./doclets
+
+; Select the formatter to use for generating output.
+
+;formatter = htmlStandardFormatter
+
+; The directory to find the formatter in. Formatters convert textual markup
+; for use by the doclet.
+
+;formatter_path = ./formatters
+
+; The directory to find taglets in. Taglets allow you to make PHPDoctor handle
+; new tags and to alter the behavour of existing tags and their output.
+
+;taglet_path = ./taglets
+
+; If the code you are parsing does not use package tags or not all elements
+; have package tags, use this setting to place unbound elements into a
+; particular package.
+
+default_package = "phpBB"
+
+use_class_path_as_package = off
+
+ignore_package_tags = off
+
+; Specifies the name of a HTML file containing text for the overview
+; documentation to be placed on the overview page. The path is relative to
+; "source_path" unless an absolute path is given.
+
+overview = ../README.md
+
+; Package comments will be looked for in a file named package.html in the same
+; directory as the first source file parsed in that package or in the directory
+; given below. If package comments are placed in the directory given below then
+; they should be named "<packageName>.html".
+
+package_comment_dir = ./
+
+; Parse out global variables and/or global constants?
+
+;globals = off
+;constants = off
+
+; Generate documentation for all class members
+
+;private = on
+
+; Generate documentation for public and protected class members
+
+;protected = on
+
+; Generate documentation for only public class members
+
+;public = on
+
+; Use the PEAR compatible handling of the docblock first sentence
+
+;pear_compat = on
+
+; Standard doclet settings
+; -----------------------------------------------------------------------------
+
+; The directory to place generated documentation in. If the given path is
+; relative to it will be relative to "source_path".
+
+d = "../build/api/"
+
+; Specifies the title to be placed in the HTML <title> tag.
+
+windowtitle = "phpBB3"
+
+; Specifies the title to be placed near the top of the overview summary file.
+
+doctitle = "phpBB3 Sourcecode Documentation"
+
+; Specifies the header text to be placed at the top of each output file. The
+; header will be placed to the right of the upper navigation bar.
+
+header = "phpBB3"
+
+; Specifies the footer text to be placed at the bottom of each output file. The
+; footer will be placed to the right of the lower navigation bar.
+
+footer = "phpBB3"
+
+; Specifies the text to be placed at the bottom of each output file. The text
+; will be placed at the bottom of the page, below the lower navigation bar.
+
+;bottom = "This document was generated by <a href="http://peej.github.com/phpdoctor/">PHPDoctor: The PHP Documentation Creator</a>"
+
+; Create a class tree?
+
+;tree = off
+
+; Use GeSHi to include formatted source files in the documentation. PHPDoctor will look in the current doclet directory for a /geshi subdirectory. Unpack the GeSHi archive from http://qbnz.com/highlighter to get this directory - it will contain a php script and a subdirectory with formatting files.
+
+include_source = off
+
View
41 git-tools/hooks/commit-msg
@@ -55,12 +55,24 @@ quit()
fi
}
-msg=$(grep -nE '.{81,}' "$1");
+# Check for empty commit message
+if ! grep -qv '^#' "$1"
+then
+ # Commit message is empty (or contains only comments).
+ # Let git handle this.
+ # It will abort with a message like so:
+ #
+ # Aborting commit due to empty commit message.
+ exit 0
+fi
+
+msg=$(grep -v '^#' "$1" |grep -nE '.{81,}')
if [ $? -eq 0 ]
then
- echo "The following lines are greater than 80 characters long:\n" >&2;
- echo $msg >&2;
+ echo "The following lines are greater than 80 characters long:" >&2;
+ echo >&2
+ echo "$msg" >&2;
quit $ERR_LENGTH;
fi
@@ -107,7 +119,19 @@ do
case $expect in
"header")
err=$ERR_HEADER;
- echo "$line" | grep -Eq "^\[(ticket/[0-9]+|feature/$branch_regex|task/$branch_regex)\] [A-Z].+$"
+ echo "$line" | grep -Eq "^\[(ticket/[0-9]+|feature/$branch_regex|task/$branch_regex)\] .+$"
+ result=$?
+ if ! echo "$line" | grep -Eq "^\[(ticket/[0-9]+|feature/$branch_regex|task/$branch_regex)\] [A-Z].+$"
+ then
+ # Don't be too strict.
+ # Commits may be temporary, intended to be squashed later.
+ # Just issue a warning here.
+ echo "Warning: heading should be a sentence beginning with a capital letter." 1>&2
+ echo "You entered:" 1>&2
+ echo "$line" 1>&2
+ fi
+ # restore exit code
+ (exit $result)
;;
"empty")
err=$ERR_EMPTY;
@@ -128,6 +152,10 @@ do
# Should not end up here
false
;;
+ "possibly-eof")
+ # Allow empty and/or comment lines at the end
+ ! tail -n +"$i" "$1" |grep -qvE '^($|#)'
+ ;;
"comment")
echo "$line" | grep -Eq "^#";
;;
@@ -188,7 +216,7 @@ do
in_description=1;
;;
"footer")
- expecting="footer eof";
+ expecting="footer possibly-eof";
if [ "$tickets" = "" ]
then
tickets="$line";
@@ -199,6 +227,9 @@ do
"comment")
# Comments should expect the same thing again
;;
+ "possibly-eof")
+ expecting="eof";
+ ;;
*)
echo "Unrecognised token $expect" >&2;
quit 254;
View
4 git-tools/hooks/prepare-commit-msg
@@ -35,8 +35,8 @@ then
# Branch is prefixed with 'ticket/', append ticket ID to message
if [ "$branch" != "${branch##ticket/}" ];
then
- tail="\n\nPHPBB3-${branch##ticket/}";
+ tail="$(printf "\n\nPHPBB3-${branch##ticket/}")";
fi
- echo "[$branch]$tail $(cat "$1")" > "$1"
+ echo "[$branch] $tail$(cat "$1")" > "$1"
fi
View
175 git-tools/merge.php
@@ -0,0 +1,175 @@
+#!/usr/bin/env php
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2011 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+function show_usage()
+{
+ $filename = basename(__FILE__);
+
+ echo "$filename merges a github pull request.\n";
+ echo "\n";
+
+ echo "Usage: [php] $filename -p pull_request_id [OPTIONS]\n";
+ echo "\n";
+
+ echo "Options:\n";
+ echo " -p pull_request_id The pull request id to be merged (mandatory)\n";
+ echo " -r remote Remote of upstream, defaults to 'upstream' (optional)\n";
+ echo " -d Outputs the commands instead of running them (optional)\n";
+ echo " -h This help text\n";
+
+ exit(2);
+}
+
+// Handle arguments
+$opts = getopt('p:r:dh');
+
+if (empty($opts) || isset($opts['h']))
+{
+ show_usage();
+}
+
+$pull_id = get_arg($opts, 'p', '');
+$remote = get_arg($opts, 'r', 'upstream');
+$dry_run = !get_arg($opts, 'd', true);
+
+try
+{
+ exit(work($pull_id, $remote));
+}
+catch (RuntimeException $e)
+{
+ echo $e->getMessage();
+ exit($e->getCode());
+}
+
+function work($pull_id, $remote)
+{
+ // Get some basic data
+ $pull = get_pull('phpbb', 'phpbb3', $pull_id);
+
+ if (!$pull_id)
+ {
+ show_usage();
+ }
+
+ if ($pull['state'] != 'open')
+ {
+ throw new RuntimeException(sprintf("Error: pull request is closed\n",
+ $target_branch), 5);
+ }
+
+ $pull_user = $pull['head'][0];
+ $pull_branch = $pull['head'][1];
+ $target_branch = $pull['base'][1];
+
+ switch ($target_branch)
+ {
+ case 'develop-olympus':
+ run("git checkout develop-olympus");
+ run("git pull $remote develop-olympus");
+
+ add_remote($pull_user, 'phpbb3');
+ run("git fetch $pull_user");
+ run("git merge --no-ff $pull_user/$pull_branch");
+ run("phpunit");
+
+ run("git checkout develop");
+ run("git pull $remote develop");
+ run("git merge --no-ff develop-olympus");
+ run("phpunit");
+ break;
+
+ case 'develop':
+ run("git checkout develop");
+ run("git pull $remote develop");
+
+ add_remote($pull_user, 'phpbb3');
+ run("git fetch $pull_user");
+ run("git merge --no-ff $pull_user/$pull_branch");
+ run("phpunit");
+ break;
+
+ default:
+ throw new RuntimeException(sprintf("Error: pull request target branch '%s' is not a main branch\n",
+ $target_branch), 5);
+ break;
+ }
+}
+
+function add_remote($username, $repository, $pushable = false)
+{
+ $url = get_repository_url($username, $repository, false);
+ run("git remote add $username $url", true);
+
+ if ($pushable)
+ {
+ $ssh_url = get_repository_url($username, $repository, true);
+ run("git remote set-url --push $username $ssh_url");
+ }
+}
+
+function get_repository_url($username, $repository, $ssh = false)
+{
+ $url_base = ($ssh) ? 'git@github.com:' : 'git://github.com/';
+
+ return $url_base . $username . '/' . $repository . '.git';
+}
+
+function api_request($query)
+{
+ $contents = file_get_contents("http://github.com/api/v2/json/$query");
+
+ if ($contents === false)
+ {
+ throw new RuntimeException("Error: failed to retrieve pull request data\n", 4);
+ }
+
+ return json_decode($contents);
+}
+
+function get_pull($username, $repository, $pull_id)
+{
+ $request = api_request("pulls/$username/$repository/$pull_id");
+
+ $pull = $request->pull;
+
+ $pull_data = array(
+ 'base' => array($pull->base->user->login, $pull->base->ref),
+ 'head' => array($pull->head->user->login, $pull->head->ref),
+ 'state' => $pull->state,
+ );
+
+ return $pull_data;
+}
+
+function get_arg($array, $index, $default)
+{
+ return isset($array[$index]) ? $array[$index] : $default;
+}
+
+function run($cmd, $ignore_fail = false)
+{
+ global $dry_run;
+
+ if (!empty($dry_run))
+ {
+ echo "$cmd\n";
+ }
+ else
+ {
+ passthru(escapeshellcmd($cmd), $status);
+
+ if ($status != 0 && !$ignore_fail)
+ {
+ throw new RuntimeException(sprintf("Error: command '%s' failed with status %s'\n",
+ $cmd, $status), 6);
+ }
+ }
+}
View
248 git-tools/setup_github_network.php
@@ -0,0 +1,248 @@
+#!/usr/bin/env php
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2011 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+function show_usage()
+{
+ $filename = basename(__FILE__);
+
+ echo "$filename adds repositories of a github network as remotes to a local git repository.\n";
+ echo "\n";
+
+ echo "Usage: [php] $filename -s collaborators|organisation|contributors|network [OPTIONS]\n";
+ echo "\n";
+
+ echo "Scopes:\n";
+ echo " collaborators Repositories of people who have push access to the specified repository\n";
+ echo " contributors Repositories of people who have contributed to the specified repository\n";
+ echo " organisation Repositories of members of the organisation at github\n";
+ echo " network All repositories of the whole github network\n";
+ echo "\n";
+
+ echo "Options:\n";
+ echo " -s scope See description above (mandatory)\n";
+ echo " -u github_username Overwrites the github username (optional)\n";
+ echo " -r repository_name Overwrites the repository name (optional)\n";
+ echo " -m your_github_username Sets up ssh:// instead of git:// for pushable repositories (optional)\n";
+ echo " -d Outputs the commands instead of running them (optional)\n";
+ echo " -h This help text\n";
+
+ exit(1);
+}
+
+// Handle arguments
+$opts = getopt('s:u:r:m:dh');
+
+if (empty($opts) || isset($opts['h']))
+{
+ show_usage();
+}
+
+$scope = get_arg($opts, 's', '');
+$username = get_arg($opts, 'u', 'phpbb');
+$repository = get_arg($opts, 'r', 'phpbb3');
+$developer = get_arg($opts, 'm', '');
+$dry_run = !get_arg($opts, 'd', true);
+run(null, $dry_run);
+exit(work($scope, $username, $repository, $developer));
+
+function work($scope, $username, $repository, $developer)
+{
+ // Get some basic data
+ $network = get_network($username, $repository);
+ $collaborators = get_collaborators($username, $repository);
+
+ if ($network === false || $collaborators === false)
+ {
+ echo "Error: failed to retrieve network or collaborators\n";
+ return 1;
+ }
+
+ switch ($scope)
+ {
+ case 'collaborators':
+ $remotes = array_intersect_key($network, $collaborators);
+ break;
+
+ case 'organisation':
+ $remotes = array_intersect_key($network, get_organisation_members($username));
+ break;
+
+ case 'contributors':
+ $remotes = array_intersect_key($network, get_contributors($username, $repository));
+ break;
+
+ case 'network':
+ $remotes = $network;
+ break;
+
+ default:
+ show_usage();
+ }
+
+ if (file_exists('.git'))
+ {
+ add_remote($username, $repository, isset($collaborators[$developer]));
+ }
+ else
+ {
+ clone_repository($username, $repository, isset($collaborators[$developer]));
+ }
+
+ // Add private security repository for developers
+ if ($username == 'phpbb' && $repository == 'phpbb3' && isset($collaborators[$developer]))
+ {
+ run("git remote add $username-security " . get_repository_url($username, "$repository-security", true));
+ }
+
+ // Skip blessed repository.
+ unset($remotes[$username]);
+
+ foreach ($remotes as $remote)
+ {
+ add_remote($remote['username'], $remote['repository'], $remote['username'] == $developer);
+ }
+
+ run('git remote update');
+}
+
+function clone_repository($username, $repository, $pushable = false)
+{
+ $url = get_repository_url($username, $repository, false);
+ run("git clone $url ./ --origin $username");
+
+ if ($pushable)
+ {
+ $ssh_url = get_repository_url($username, $repository, true);
+ run("git remote set-url --push $username $ssh_url");
+ }
+}
+
+function add_remote($username, $repository, $pushable = false)
+{
+ $url = get_repository_url($username, $repository, false);
+ run("git remote add $username $url");
+
+ if ($pushable)
+ {
+ $ssh_url = get_repository_url($username, $repository, true);
+ run("git remote set-url --push $username $ssh_url");
+ }
+}
+
+function get_repository_url($username, $repository, $ssh = false)
+{
+ $url_base = ($ssh) ? 'git@github.com:' : 'git://github.com/';
+
+ return $url_base . $username . '/' . $repository . '.git';
+}
+
+function api_request($query)
+{
+ $contents = file_get_contents("http://github.com/api/v2/json/$query");
+ if ($contents === false)
+ {
+ return false;
+ }
+ return json_decode($contents);
+}
+
+function get_contributors($username, $repository)
+{
+ $request = api_request("repos/show/$username/$repository/contributors");
+ if ($request === false)
+ {
+ return false;
+ }
+
+ $usernames = array();
+ foreach ($request->contributors as $contributor)
+ {
+ $usernames[$contributor->login] = $contributor->login;
+ }
+
+ return $usernames;
+}
+
+function get_organisation_members($username)
+{
+ $request = api_request("organizations/$username/public_members");
+ if ($request === false)
+ {
+ return false;
+ }
+
+ $usernames = array();
+ foreach ($request->users as $member)
+ {
+ $usernames[$member->login] = $member->login;
+ }
+
+ return $usernames;
+}
+
+function get_collaborators($username, $repository)
+{
+ $request = api_request("repos/show/$username/$repository/collaborators");
+ if ($request === false)
+ {
+ return false;
+ }
+
+ $usernames = array();
+ foreach ($request->collaborators as $collaborator)
+ {
+ $usernames[$collaborator] = $collaborator;
+ }
+
+ return $usernames;
+}
+
+function get_network($username, $repository)
+{
+ $request = api_request("repos/show/$username/$repository/network");
+ if ($request === false)
+ {
+ return false;
+ }
+
+ $usernames = array();
+ foreach ($request->network as $network)
+ {
+ $usernames[$network->owner] = array(
+ 'username' => $network->owner,
+ 'repository' => $network->name,
+ );
+ }
+
+ return $usernames;
+}
+
+function get_arg($array, $index, $default)
+{
+ return isset($array[$index]) ? $array[$index] : $default;
+}
+
+function run($cmd, $dry = false)
+{
+ static $dry_run;
+
+ if (is_null($cmd))
+ {
+ $dry_run = $dry;
+ }
+ else if (!empty($dry_run))
+ {
+ echo "$cmd\n";
+ }
+ else
+ {
+ passthru(escapeshellcmd($cmd));
+ }
+}
View
16 phpBB/adm/index.php
@@ -237,7 +237,7 @@ function build_select($option_ary, $option_default = false)
/**
* Build radio fields in acp pages
*/
-function h_radio($name, &$input_ary, $input_default = false, $id = false, $key = false)
+function h_radio($name, $input_ary, $input_default = false, $id = false, $key = false, $separator = '')
{
global $user;
@@ -246,7 +246,7 @@ function h_radio($name, &$input_ary, $input_default = false, $id = false, $key =
foreach ($input_ary as $value => $title)
{
$selected = ($input_default !== false && $value == $input_default) ? ' checked="checked"' : '';
- $html .= '<label><input type="radio" name="' . $name . '"' . (($id && !$id_assigned) ? ' id="' . $id . '"' : '') . ' value="' . $value . '"' . $selected . (($key) ? ' accesskey="' . $key . '"' : '') . ' class="radio" /> ' . $user->lang[$title] . '</label>';
+ $html .= '<label><input type="radio" name="' . $name . '"' . (($id && !$id_assigned) ? ' id="' . $id . '"' : '') . ' value="' . $value . '"' . $selected . (($key) ? ' accesskey="' . $key . '"' : '') . ' class="radio" /> ' . $user->lang[$title] . '</label>' . $separator;
$id_assigned = true;
}
@@ -276,7 +276,7 @@ function build_cfg_template($tpl_type, $key, &$new, $config_key, $vars)
$size = (int) $tpl_type[1];
$maxlength = (int) $tpl_type[2];
- $tpl = '<input id="' . $key . '" type="' . $tpl_type[0] . '"' . (($size) ? ' size="' . $size . '"' : '') . ' maxlength="' . (($maxlength) ? $maxlength : 255) . '" name="' . $name . '" value="' . $new[$config_key] . '" />';
+ $tpl = '<input id="' . $key . '" type="' . $tpl_type[0] . '"' . (($size) ? ' size="' . $size . '"' : '') . ' maxlength="' . (($maxlength) ? $maxlength : 255) . '" name="' . $name . '" value="' . $new[$config_key] . '"' . (($tpl_type[0] === 'password') ? ' autocomplete="off"' : '') . ' />';
break;
case 'dimension':
@@ -402,7 +402,7 @@ function validate_config_vars($config_vars, &$cfg_array, &$error)
switch ($validator[$type])
{
case 'string':
- $length = strlen($cfg_array[$config_name]);
+ $length = utf8_strlen($cfg_array[$config_name]);
// the column is a VARCHAR
$validator[$max] = (isset($validator[$max])) ? min(255, $validator[$max]) : 255;
@@ -573,7 +573,11 @@ function validate_range($value_ary, &$error)
'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),
+ // Do not use (int) 0x80000000 - it evaluates to different
+ // values on 32-bit and 64-bit systems.
+ // Apparently -2147483648 is a float on 32-bit systems,
+ // despite fitting in an int, thus explicit cast is needed.
+ 'INT' => array('php_type' => 'int', 'min' => (int) -2147483648, 'max' => (int) 0x7fffffff),
'TINT' => array('php_type' => 'int', 'min' => -128, 'max' => 127),
'VCHAR' => array('php_type' => 'string', 'min' => 0, 'max' => 255),
@@ -596,7 +600,7 @@ function validate_range($value_ary, &$error)
{
case 'string' :
$max = (isset($column[1])) ? min($column[1],$type['max']) : $type['max'];
- if (strlen($value['value']) > $max)
+ if (utf8_strlen($value['value']) > $max)
{
$error[] = sprintf($user->lang['SETTING_TOO_LONG'], $user->lang[$value['lang']], $max);
}
View
2 phpBB/adm/style/acp_ban.html
@@ -33,7 +33,7 @@
{
document.getElementById('acp_unban').unbangivereason.innerHTML = ban_give_reason[option];
document.getElementById('acp_unban').unbanreason.innerHTML = ban_reason[option];
- document.getElementById('acp_unban').unbanlength.innerHTML = ban_length[option];
+ document.getElementById('acp_unban').unbanlength.value = ban_length[option];
}
// ]]>
View
4 phpBB/adm/style/acp_email.html
@@ -39,6 +39,10 @@
<dd><select id="priority" name="mail_priority_flag">{S_PRIORITY_OPTIONS}</select></dd>
</dl>
<dl>
+ <dt><label for="banned">{L_MAIL_BANNED}:</label><br /><span>{L_MAIL_BANNED_EXPLAIN}</span></dt>
+ <dd><input id="banned" name="mail_banned_flag" type="checkbox" class="radio" /></dd>
+</dl>
+<dl>
<dt><label for="send">{L_SEND_IMMEDIATELY}:</label></dt>
<dd><input id="send" type="checkbox" class="radio" name="send_immediately" checked="checked" /></dd>
</dl>
View
18 phpBB/adm/style/acp_forums.html
@@ -58,7 +58,7 @@
/**
* Init the wanted display functionality if javascript is enabled.
- * If javascript is not available, the user is still able to properly administrate.
+ * If javascript is not available, the user is still able to properly administer.
*/
onload = function()
{
@@ -140,6 +140,12 @@
<dt><label for="parent">{L_FORUM_PARENT}:</label></dt>
<dd><select id="parent" name="forum_parent_id"><option value="0"<!-- IF not S_FORUM_PARENT_ID --> selected="selected"<!-- ENDIF -->>{L_NO_PARENT}</option>{S_PARENT_OPTIONS}</select></dd>
</dl>
+ <!-- IF S_CAN_COPY_PERMISSIONS -->
+ <dl>
+ <dt><label for="forum_perm_from">{L_COPY_PERMISSIONS}:</label><br /><span>{L_COPY_PERMISSIONS_EXPLAIN}</span></dt>
+ <dd><select id="forum_perm_from" name="forum_perm_from"><option value="0">{L_NO_PERMISSIONS}</option>{S_FORUM_OPTIONS}</select></dd>
+ </dl>
+ <!-- ENDIF -->
<dl>
<dt><label for="forum_name">{L_FORUM_NAME}:</label></dt>
<dd><input class="text medium" type="text" id="forum_name" name="forum_name" value="{FORUM_NAME}" maxlength="255" /></dd>
@@ -160,11 +166,11 @@
</dl>
<dl>
<dt><label for="forum_password">{L_FORUM_PASSWORD}:</label><br /><span>{L_FORUM_PASSWORD_EXPLAIN}</span></dt>
- <dd><input type="password" id="forum_password" name="forum_password" value="<!-- IF S_FORUM_PASSWORD_SET -->&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;<!-- ENDIF -->" /></dd>
+ <dd><input type="password" id="forum_password" name="forum_password" value="<!-- IF S_FORUM_PASSWORD_SET -->&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;<!-- ENDIF -->" autocomplete="off" /></dd>
</dl>
<dl>
<dt><label for="forum_password_confirm">{L_FORUM_PASSWORD_CONFIRM}:</label><br /><span>{L_FORUM_PASSWORD_CONFIRM_EXPLAIN}</span></dt>
- <dd><input type="password" id="forum_password_confirm" name="forum_password_confirm" value="<!-- IF S_FORUM_PASSWORD_SET -->&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;<!-- ENDIF -->" /></dd>
+ <dd><input type="password" id="forum_password_confirm" name="forum_password_confirm" value="<!-- IF S_FORUM_PASSWORD_SET -->&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;<!-- ENDIF -->" autocomplete="off" /></dd>
</dl>
<!-- IF S_FORUM_PASSWORD_SET -->
<dl>
@@ -176,12 +182,6 @@
<dt><label for="forum_style">{L_FORUM_STYLE}:</label></dt>
<dd><select id="forum_style" name="forum_style"><option value="0">{L_DEFAULT_STYLE}</option>{S_STYLES_OPTIONS}</select></dd>
</dl>
- <!-- IF S_CAN_COPY_PERMISSIONS -->
- <dl>
- <dt><label for="forum_perm_from">{L_COPY_PERMISSIONS}:</label><br /><span>{L_COPY_PERMISSIONS_EXPLAIN}</span></dt>
- <dd><select id="forum_perm_from" name="forum_perm_from"><option value="0">{L_NO_PERMISSIONS}</option>{S_FORUM_OPTIONS}</select></dd>
- </dl>
- <!-- ENDIF -->
</fieldset>
<div id="forum_cat_options">
View
4 phpBB/adm/style/acp_ranks.html
@@ -35,8 +35,8 @@
</dl>
<dl>
<dt><label for="special_rank">{L_RANK_SPECIAL}:</label></dt>
- <dd><label><input onchange="dE('posts', -1)" type="radio" class="radio" name="special_rank" value="1" id="special_rank"<!-- IF S_SPECIAL_RANK --> checked="checked"<!-- ENDIF --> />{L_YES}</label>
- <label><input onchange="dE('posts', 1)" type="radio" class="radio" name="special_rank" value="0"<!-- IF not S_SPECIAL_RANK --> checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
+ <dd><label><input onclick="dE('posts', -1)" type="radio" class="radio" name="special_rank" value="1" id="special_rank"<!-- IF S_SPECIAL_RANK --> checked="checked"<!-- ENDIF --> />{L_YES}</label>
+ <label><input onclick="dE('posts', 1)" type="radio" class="radio" name="special_rank" value="0"<!-- IF not S_SPECIAL_RANK --> checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl>
<!-- IF S_SPECIAL_RANK --><div id="posts" style="display: none;"><!-- ELSE --><div id="posts"><!-- ENDIF -->
<dl>
View
17 phpBB/adm/style/acp_styles.html
@@ -22,6 +22,21 @@
<dt><label for="new_id">{L_REPLACE}:</label><br /><span>{L_REPLACE_EXPLAIN}</span></dt>
<dd><select id="new_id" name="new_id">{S_REPLACE_OPTIONS}</select></dd>
</dl>
+ <!-- IF S_DELETE_STYLE -->
+ <hr />
+ <dl>
+ <dt><label for="new_template_id">{L_DELETE_TEMPLATE}:</label><br /><span>{L_REPLACE_TEMPLATE_EXPLAIN}</span></dt>
+ <dd><select id="new_template_id" name="new_template_id">{S_REPLACE_TEMPLATE_OPTIONS}</select></dd>
+ </dl>
+ <dl>
+ <dt><label for="new_theme_id">{L_DELETE_THEME}:</label><br /><span>{L_REPLACE_THEME_EXPLAIN}</span></dt>
+ <dd><select id="new_theme_id" name="new_theme_id">{S_REPLACE_THEME_OPTIONS}</select></dd>
+ </dl>
+ <dl>
+ <dt><label for="new_imageset_id">{L_DELETE_IMAGESET}:</label><br /><span>{L_REPLACE_IMAGESET_EXPLAIN}</span></dt>
+ <dd><select id="new_imageset_id" name="new_imageset_id">{S_REPLACE_IMAGESET_OPTIONS}</select></dd>
+ </dl>
+ <!-- ENDIF -->
<p class="quick">
<input class="button1" type="submit" name="update" value="{L_DELETE}" />
@@ -77,7 +92,7 @@
/**
* Init the wanted display functionality if javascript is enabled.
- * If javascript is not available, the user is still able to properly administrate.
+ * If javascript is not available, the user is still able to properly administer.
*/
onload = function()
{
View
8 phpBB/adm/style/acp_users_overview.html
@@ -43,19 +43,19 @@
</dl>
<dl>
<dt><label for="user_email">{L_EMAIL}:</label></dt>
- <dd><input class="text medium" type="text" id="user_email" name="user_email" value="{USER_EMAIL}" /></dd>
+ <dd><input class="text medium" type="text" id="user_email" name="user_email" value="{USER_EMAIL}" autocomplete="off" /></dd>
</dl>
<dl>
<dt><label for="email_confirm">{L_CONFIRM_EMAIL}:</label><br /><span>{L_CONFIRM_EMAIL_EXPLAIN}</span></dt>
- <dd><input class="text medium" type="text" id="email_confirm" name="email_confirm" value="" /></dd>
+ <dd><input class="text medium" type="text" id="email_confirm" name="email_confirm" value="" autocomplete="off" /></dd>
</dl>
<dl>
<dt><label for="new_password">{L_NEW_PASSWORD}:</label><br /><span>{L_CHANGE_PASSWORD_EXPLAIN}</span></dt>
- <dd><input type="password" id="new_password" name="new_password" value="" /></dd>
+ <dd><input type="password" id="new_password" name="new_password" value="" autocomplete="off" /></dd>
</dl>
<dl>
<dt><label for="password_confirm">{L_CONFIRM_PASSWORD}:</label><br /><span>{L_CONFIRM_PASSWORD_EXPLAIN}</span></dt>
- <dd><input type="password" id="password_confirm" name="password_confirm" value="" /></dd>
+ <dd><input type="password" id="password_confirm" name="password_confirm" value="" autocomplete="off" /></dd>
</dl>
<p class="quick">
View
2 phpBB/adm/style/captcha_recaptcha.html
@@ -5,7 +5,7 @@
// <![CDATA[
var RecaptchaOptions = {
lang : '{LA_RECAPTCHA_LANG}',
- theme : 'clean',
+ theme : 'clean'
};
// ]]>
</script>
View
15 phpBB/adm/style/install_footer.html
@@ -6,20 +6,9 @@
</div>
</div>
</div>
-
- <!--
- We request you retain the full copyright notice below including the link to www.phpbb.com.
- This not only gives respect to the large amount of time given freely by the developers
- but also helps build interest, traffic and use of phpBB. If you (honestly) cannot retain
- the full copyright we ask you at least leave in place the "Powered by phpBB" line, with
- "phpBB" linked to www.phpbb.com. If you refuse to include even this then support on our
- forums may be affected.
-
- The phpBB Group : 2006
- // -->
-
+
<div id="page-footer">
- Powered by phpBB &copy; 2000, 2002, 2005, 2007 <a href="http://www.phpbb.com/">phpBB Group</a>
+ Powered by <a href="http://www.phpbb.com/">phpBB</a>&reg; Forum Software &copy; phpBB Group
</div>
</div>
View
15 phpBB/adm/style/overall_footer.html
@@ -6,21 +6,10 @@
</div>
</div>
</div>
-
- <!--
- We request you retain the full copyright notice below including the link to www.phpbb.com.
- This not only gives respect to the large amount of time given freely by the developers
- but also helps build interest, traffic and use of phpBB. If you (honestly) cannot retain
- the full copyright we ask you at least leave in place the "Powered by phpBB" line, with
- "phpBB" linked to www.phpbb.com. If you refuse to include even this then support on our
- forums may be affected.
-
- The phpBB Group : 2006
- // -->
-
+
<div id="page-footer">
<!-- IF S_COPYRIGHT_HTML -->
- Powered by phpBB &copy; 2000, 2002, 2005, 2007 <a href="http://www.phpbb.com/">phpBB Group</a>
+ Powered by <a href="http://www.phpbb.com/">phpBB</a>&reg; Forum Software &copy; phpBB Group
<!-- IF TRANSLATION_INFO --><br />{TRANSLATION_INFO}<!-- ENDIF -->
<!-- ENDIF -->
View
13 phpBB/adm/style/simple_footer.html
@@ -2,21 +2,10 @@
<br /><br />
</div>
-<!--
- We request you retain the full copyright notice below including the link to www.phpbb.com.
- This not only gives respect to the large amount of time given freely by the developers
- but also helps build interest, traffic and use of phpBB. If you (honestly) cannot retain
- the full copyright we ask you at least leave in place the "Powered by phpBB" line, with
- "phpBB" linked to www.phpbb.com. If you refuse to include even this then support on our
- forums may be affected.
-
- The phpBB Group : 2006
-// -->
-
<div id="page-footer">
<!-- IF S_COPYRIGHT_HTML -->
- <br />Powered by phpBB &copy; 2000, 2002, 2005, 2007 <a href="http://www.phpbb.com/">phpBB Group</a>
+ <br />Powered by <a href="http://www.phpbb.com/">phpBB</a>&reg; Forum Software &copy; phpBB Group
<!-- IF TRANSLATION_INFO --><br />{TRANSLATION_INFO}<!-- ENDIF -->
<!-- ENDIF -->
View
107 phpBB/common.php
@@ -16,112 +16,7 @@
exit;
}
-$starttime = explode(' ', microtime());
-$starttime = $starttime[1] + $starttime[0];
-
-// Report all errors, except notices and deprecation messages
-if (!defined('E_DEPRECATED'))
-{
- define('E_DEPRECATED', 8192);
-}
-error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED);
-
-/*
-* Remove variables created by register_globals from the global scope
-* Thanks to Matt Kavanagh
-*/
-function deregister_globals()
-{
- $not_unset = array(
- 'GLOBALS' => true,
- '_GET' => true,
- '_POST' => true,
- '_COOKIE' => true,
- '_REQUEST' => true,
- '_SERVER' => true,
- '_SESSION' => true,
- '_ENV' => true,
- '_FILES' => true,
- 'phpEx' => true,
- 'phpbb_root_path' => true
- );
-
- // Not only will array_merge and array_keys give a warning if
- // a parameter is not an array, array_merge will actually fail.
- // So we check if _SESSION has been initialised.
- if (!isset($_SESSION) || !is_array($_SESSION))
- {
- $_SESSION = array();
- }
-
- // Merge all into one extremely huge array; unset this later
- $input = array_merge(
- array_keys($_GET),
- array_keys($_POST),
- array_keys($_COOKIE),
- array_keys($_SERVER),
- array_keys($_SESSION),
- array_keys($_ENV),
- array_keys($_FILES)
- );
-
- foreach ($input as $varname)
- {
- if (isset($not_unset[$varname]))
- {
- // Hacking attempt. No point in continuing unless it's a COOKIE
- if ($varname !== 'GLOBALS' || isset($_GET['GLOBALS']) || isset($_POST['GLOBALS']) || isset($_SERVER['GLOBALS']) || isset($_SESSION['GLOBALS']) || isset($_ENV['GLOBALS']) || isset($_FILES['GLOBALS']))
- {
- exit;
- }
- else
- {
- $cookie = &$_COOKIE;
- while (isset($cookie['GLOBALS']))
- {
- foreach ($cookie['GLOBALS'] as $registered_var => $value)
- {
- if (!isset($not_unset[$registered_var]))
- {
- unset($GLOBALS[$registered_var]);
- }
- }
- $cookie = &$cookie['GLOBALS'];
- }
- }
- }
-
- unset($GLOBALS[$varname]);
- }
-
- unset($input);
-}
-
-// If we are on PHP >= 6.0.0 we do not need some code
-if (version_compare(PHP_VERSION, '6.0.0-dev', '>='))
-{
- /**
- * @ignore
- */
- define('STRIP', false);
-}
-else
-{
- @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'))
- {
- deregister_globals();
- }
-
- define('STRIP', (get_magic_quotes_gpc()) ? true : false);
-}
-
-if (defined('IN_CRON'))
-{
- $phpbb_root_path = dirname(__FILE__) . DIRECTORY_SEPARATOR;
-}
+require($phpbb_root_path . 'includes/startup.' . $phpEx);
if (file_exists($phpbb_root_path . 'config.' . $phpEx))
{
View
96 phpBB/cron.php
@@ -21,7 +21,6 @@
$auth->acl($user->data);
$cron_type = request_var('cron_type', '');
-$use_shutdown_function = (@function_exists('register_shutdown_function')) ? true : false;
// Output transparent gif
header('Cache-Control: no-cache');
@@ -30,10 +29,9 @@
echo base64_decode('R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==');
-// test without flush ;)
-// flush();
+// Flush here to prevent browser from showing the page as loading while running cron.
+flush();
-//
if (!isset($config['cron_lock']))
{
set_config('cron_lock', '0', true);
@@ -79,23 +77,10 @@
break;
}
- // A user reported using the mail() function while using shutdown does not work. We do not want to risk that.
- if ($use_shutdown_function && !$config['smtp_delivery'])
- {
- $use_shutdown_function = false;
- }
-
include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
$queue = new queue();
- if ($use_shutdown_function)
- {
- register_shutdown_function(array(&$queue, 'process'));
- }
- else
- {
- $queue->process();
- }
+ $queue->process();
break;
@@ -106,14 +91,7 @@
break;
}
- if ($use_shutdown_function)
- {
- register_shutdown_function(array(&$cache, 'tidy'));
- }
- else
- {
- $cache->tidy();
- }
+ $cache->tidy();
break;
@@ -138,14 +116,7 @@
break;
}
- if ($use_shutdown_function)
- {
- register_shutdown_function(array(&$search, 'tidy'));
- }
- else
- {
- $search->tidy();
- }
+ $search->tidy();
break;
@@ -158,14 +129,7 @@
include_once($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
- if ($use_shutdown_function)
- {
- register_shutdown_function('tidy_warnings');
- }
- else
- {
- tidy_warnings();
- }
+ tidy_warnings();
break;
@@ -178,14 +142,7 @@
include_once($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
- if ($use_shutdown_function)
- {
- register_shutdown_function('tidy_database');
- }
- else
- {
- tidy_database();
- }
+ tidy_database();
break;
@@ -196,14 +153,7 @@
break;
}
- if ($use_shutdown_function)
- {
- register_shutdown_function(array(&$user, 'session_gc'));
- }
- else
- {
- $user->session_gc();
- }
+ $user->session_gc();
break;
@@ -230,26 +180,12 @@
if ($row['prune_days'])
{
- if ($use_shutdown_function)
- {
- register_shutdown_function('auto_prune', $row['forum_id'], 'posted', $row['forum_flags'], $row['prune_days'], $row['prune_freq']);
- }
- else
- {
- auto_prune($row['forum_id'], 'posted', $row['forum_flags'], $row['prune_days'], $row['prune_freq']);
- }
+ auto_prune($row['forum_id'], 'posted', $row['forum_flags'], $row['prune_days'], $row['prune_freq']);
}
if ($row['prune_viewed'])
{
- if ($use_shutdown_function)
- {
- register_shutdown_function('auto_prune', $row['forum_id'], 'viewed', $row['forum_flags'], $row['prune_viewed'], $row['prune_freq']);
- }
- else
- {
- auto_prune($row['forum_id'], 'viewed', $row['forum_flags'], $row['prune_viewed'], $row['prune_freq']);
- }
+ auto_prune($row['forum_id'], 'viewed', $row['forum_flags'], $row['prune_viewed'], $row['prune_freq']);
}
}
@@ -257,16 +193,8 @@
}
// Unloading cache and closing db after having done the dirty work.
-if ($use_shutdown_function)
-{
- register_shutdown_function('unlock_cron');
- register_shutdown_function('garbage_collection');
-}
-else
-{
- unlock_cron();
- garbage_collection();
-}
+unlock_cron();
+garbage_collection();
exit;
View
35 phpBB/develop/create_schema_files.php
@@ -329,6 +329,15 @@
// Write columns one by one...
foreach ($table_data['COLUMNS'] as $column_name => $column_data)
{
+ if (strlen($column_name) > 30)
+ {
+ trigger_error("Column name '$column_name' on table '$table_name' is too long. The maximum is 30 characters.", E_USER_ERROR);
+ }
+ if (isset($column_data[2]) && $column_data[2] == 'auto_increment' && strlen($column_name) > 26) // "${column_name}_gen"
+ {
+ trigger_error("Index name '${column_name}_gen' on table '$table_name' is too long. The maximum is 30 characters.", E_USER_ERROR);
+ }
+
// Get type
if (strpos($column_data[0], ':') !== false)
{
@@ -632,6 +641,11 @@
$key_data[1] = array($key_data[1]);
}
+ if (strlen($table_name . $key_name) > 30)
+ {
+ trigger_error("Index name '${table_name}_$key_name' on table '$table_name' is too long. The maximum is 30 characters.", E_USER_ERROR);
+ }
+
switch ($dbms)
{
case 'mysql_40':
@@ -926,7 +940,7 @@ function get_schema_struct()
$schema_data['phpbb_bbcodes'] = array(
'COLUMNS' => array(
- 'bbcode_id' => array('TINT:3', 0),
+ 'bbcode_id' => array('USINT', 0),
'bbcode_tag' => array('VCHAR:16', ''),
'bbcode_helpline' => array('VCHAR_UNI', ''),
'display_on_posting' => array('BOOL', 0),
@@ -1207,6 +1221,24 @@ function get_schema_struct()
),
);
+ $schema_data['phpbb_login_attempts'] = array(
+ 'COLUMNS' => array(
+ 'attempt_ip' => array('VCHAR:40', ''),
+ 'attempt_browser' => array('VCHAR:150', ''),
+ 'attempt_forwarded_for' => array('VCHAR:255', ''),
+ 'attempt_time' => array('TIMESTAMP', 0),
+ 'user_id' => array('UINT', 0),
+ 'username' => array('VCHAR_UNI:255', 0),
+ 'username_clean' => array('VCHAR_CI', 0),
+ ),
+ 'KEYS' => array(
+ 'att_ip' => array('INDEX', array('attempt_ip', 'attempt_time')),
+ 'att_for' => array('INDEX', array('attempt_forwarded_for', 'attempt_time')),
+ 'att_time' => array('INDEX', array('attempt_time')),
+ 'user_id' => array('INDEX', 'user_id'),
+ ),
+ );
+
$schema_data['phpbb_moderator_cache'] = array(
'COLUMNS' => array(
'forum_id' => array('UINT', 0),
@@ -2047,4 +2079,3 @@ function custom_data($dbms)
echo 'done';
-?>
View
6 phpBB/develop/create_variable_overview.php
@@ -83,7 +83,7 @@
$html_skeleton .= '
<br><br>
-<div class="copyright" align="center">Powered by phpBB 2.2 &copy; <a href="http://www.phpbb.com/" target="_phpbb" class="copyright">phpBB Group</a>, 2003</div>
+<div class="copyright" align="center">Powered by <a href="http://www.phpbb.com/">phpBB</a>&reg; Forum Software &copy; phpBB Group</div>
<br clear="all" /></td>
</tr>
@@ -405,7 +405,7 @@
$html_data .= '
</ol><br><br>
-<div class="copyright" align="center">Powered by phpBB 2.2 &copy; <a href="http://www.phpbb.com/" target="_phpbb" class="copyright">phpBB Group</a>, 2003</div>
+<div class="copyright" align="center">Powered by <a href="http://www.phpbb.com/">phpBB</a>&reg; Forum Software &copy; phpBB Group</div>
<br clear="all" /></td>
</tr>
@@ -528,7 +528,7 @@
$html_data .= '
<br><br>
-<div class="copyright" align="center">Powered by phpBB 2.2 &copy; <a href="http://www.phpbb.com/" target="_phpbb" class="copyright">phpBB Group</a>, 2003</div>
+<div class="copyright" align="center">Powered by <a href="http://www.phpbb.com/">phpBB</a>&reg; Forum Software &copy; phpBB Group</div>
<br clear="all" /></td>
</tr>
View
5 phpBB/develop/mysql_upgrader.php
@@ -21,6 +21,7 @@
die("Please read the first lines of this script for instructions on how to enable it");
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);
@@ -252,7 +253,7 @@
// Do we now need to re-add the fulltext index? ;)
if ($table_name == ($prefix . 'posts') && $drop_index)
{
- echo "ALTER TABLE $table_name ADD FULLTEXT (post_subject), ADD FULLTEXT (post_text), ADD FULLTEXT post_content (post_subject, post_text){$newline}";
+ echo "ALTER TABLE $table_name ADD FULLTEXT (post_subject), ADD FULLTEXT (post_text), ADD FULLTEXT post_content (post_subject, post_text);{$newline}";
}
}
@@ -414,7 +415,7 @@ function get_schema_struct()
$schema_data['phpbb_bbcodes'] = array(
'COLUMNS' => array(
- 'bbcode_id' => array('TINT:3', 0),
+ 'bbcode_id' => array('USINT', 0),
'bbcode_tag' => array('VCHAR:16', ''),
'bbcode_helpline' => array('VCHAR_UNI', ''),
'display_on_posting' => array('BOOL', 0),
View
27 phpBB/docs/AUTHORS
@@ -1,6 +1,6 @@
/**
*
-* phpBB3 © Copyright 2000, 2002, 2005, 2007 phpBB Group
+* phpBB3 © Copyright phpBB Group
* http://www.phpbb.com
*
* This program is free software: you can redistribute it and/or modify