aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/adm/style/admin.css2
-rw-r--r--phpBB/adm/style/ajax.js12
-rw-r--r--phpBB/adm/style/overall_footer.html4
-rw-r--r--phpBB/adm/style/overall_header.html2
-rw-r--r--phpBB/adm/style/simple_footer.html2
-rw-r--r--phpBB/adm/style/simple_header.html2
-rw-r--r--phpBB/assets/javascript/core.js6
-rw-r--r--phpBB/common.php2
-rw-r--r--phpBB/develop/fill.php4
-rw-r--r--phpBB/docs/AUTHORS5
-rw-r--r--phpBB/docs/CHANGELOG.html6
-rw-r--r--phpBB/docs/FAQ.html6
-rw-r--r--phpBB/docs/INSTALL.html32
-rw-r--r--phpBB/docs/README.html59
-rw-r--r--phpBB/includes/acp/acp_styles.php2
-rw-r--r--phpBB/includes/bbcode.php2
-rw-r--r--phpBB/includes/functions.php9
-rw-r--r--phpBB/includes/functions_install.php12
-rw-r--r--phpBB/includes/functions_messenger.php3
-rw-r--r--phpBB/includes/mcp/mcp_warn.php4
-rw-r--r--phpBB/includes/style/resource_locator.php2
-rw-r--r--phpBB/includes/style/style.php21
-rw-r--r--phpBB/includes/template/compile.php (renamed from phpBB/includes/style/template_compile.php)4
-rw-r--r--phpBB/includes/template/context.php (renamed from phpBB/includes/style/template_context.php)4
-rw-r--r--phpBB/includes/template/filter.php (renamed from phpBB/includes/style/template_filter.php)8
-rw-r--r--phpBB/includes/template/locator.php121
-rw-r--r--phpBB/includes/template/renderer.php (renamed from phpBB/includes/style/template_renderer.php)4
-rw-r--r--phpBB/includes/template/renderer_eval.php (renamed from phpBB/includes/style/template_renderer_eval.php)6
-rw-r--r--phpBB/includes/template/renderer_include.php (renamed from phpBB/includes/style/template_renderer_include.php)4
-rw-r--r--phpBB/includes/template/template.php (renamed from phpBB/includes/style/template.php)57
-rw-r--r--phpBB/install/convertors/functions_phpbb20.php2
-rw-r--r--phpBB/install/database_update.php175
-rw-r--r--phpBB/install/index.php2
-rw-r--r--phpBB/install/install_install.php57
-rw-r--r--phpBB/install/schemas/schema_data.sql2
-rw-r--r--phpBB/language/en/common.php1
-rw-r--r--phpBB/language/en/install.php2
-rw-r--r--phpBB/language/en/memberlist.php1
-rw-r--r--phpBB/styles/prosilver/style.cfg3
-rw-r--r--phpBB/styles/prosilver/template/overall_footer.html4
-rw-r--r--phpBB/styles/prosilver/template/overall_header.html8
-rw-r--r--phpBB/styles/prosilver/template/posting_editor.html10
-rw-r--r--phpBB/styles/prosilver/template/simple_footer.html2
-rw-r--r--phpBB/styles/prosilver/template/simple_header.html8
-rw-r--r--phpBB/styles/prosilver/theme/stylesheet.css2
-rw-r--r--phpBB/styles/subsilver2/style.cfg3
-rw-r--r--phpBB/styles/subsilver2/template/overall_footer.html2
-rw-r--r--phpBB/styles/subsilver2/template/posting_body.html2
-rw-r--r--phpBB/styles/subsilver2/template/simple_footer.html2
-rw-r--r--phpBB/styles/subsilver2/template/ucp_header.html4
-rw-r--r--phpBB/viewtopic.php3
51 files changed, 503 insertions, 199 deletions
diff --git a/phpBB/adm/style/admin.css b/phpBB/adm/style/admin.css
index 7afcc3d23b..94f421030d 100644
--- a/phpBB/adm/style/admin.css
+++ b/phpBB/adm/style/admin.css
@@ -1,4 +1,4 @@
-/* phpBB 3.0 Admin Style Sheet
+/* phpBB 3.1 Admin Style Sheet
------------------------------------------------------------------------
Original author: subBlue ( http://www.subblue.com/ )
Copyright 2007 phpBB Group ( http://www.phpbb.com/ )
diff --git a/phpBB/adm/style/ajax.js b/phpBB/adm/style/ajax.js
index fd2f7a2122..12541cb057 100644
--- a/phpBB/adm/style/ajax.js
+++ b/phpBB/adm/style/ajax.js
@@ -28,7 +28,8 @@ phpbb.add_ajax_callback('forum_down', function() {
phpbb.ajaxify({
selector: el.parents('span').siblings('.up').children('a'),
- callback: 'forum_up'
+ callback: 'forum_up',
+ overlay: false
});
}
@@ -43,7 +44,8 @@ phpbb.add_ajax_callback('forum_down', function() {
phpbb.ajaxify({
selector: tr.prev().find('.down').children('a'),
- callback: 'forum_down'
+ callback: 'forum_down',
+ overlay: false
});
}
});
@@ -61,7 +63,8 @@ phpbb.add_ajax_callback('forum_up', function() {
phpbb.ajaxify({
selector: el.parents('span').siblings('.down').children('a'),
- callback: 'forum_down'
+ callback: 'forum_down',
+ overlay: false
});
}
@@ -76,7 +79,8 @@ phpbb.add_ajax_callback('forum_up', function() {
phpbb.ajaxify({
selector: tr.next().find('.up').children('a'),
- callback: 'forum_up'
+ callback: 'forum_up',
+ overlay: false
});
}
});
diff --git a/phpBB/adm/style/overall_footer.html b/phpBB/adm/style/overall_footer.html
index 0d88c8bcc5..2bc9ee52d7 100644
--- a/phpBB/adm/style/overall_footer.html
+++ b/phpBB/adm/style/overall_footer.html
@@ -37,8 +37,8 @@
</div>
<script type="text/javascript" src="{T_JQUERY_LINK}"></script>
-<!-- IF S_JQUERY_FALLBACK --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.js" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF -->
-<script type="text/javascript" src="{T_ASSETS_PATH}/javascript/core.js"></script>
+<!-- IF S_JQUERY_FALLBACK --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.js?assets_version={T_ASSETS_VERSION}" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF -->
+<script type="text/javascript" src="{T_ASSETS_PATH}/javascript/core.js?assets_version={T_ASSETS_VERSION}"></script>
<!-- INCLUDEJS ajax.js -->
{SCRIPTS}
diff --git a/phpBB/adm/style/overall_header.html b/phpBB/adm/style/overall_header.html
index be5ac29131..f79c0318b5 100644
--- a/phpBB/adm/style/overall_header.html
+++ b/phpBB/adm/style/overall_header.html
@@ -5,7 +5,7 @@
<!-- IF META -->{META}<!-- ENDIF -->
<title>{PAGE_TITLE}</title>
-<link href="style/admin.css" rel="stylesheet" type="text/css" media="screen" />
+<link href="style/admin.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
diff --git a/phpBB/adm/style/simple_footer.html b/phpBB/adm/style/simple_footer.html
index b6d7ee2f5c..1d5c62b0a3 100644
--- a/phpBB/adm/style/simple_footer.html
+++ b/phpBB/adm/style/simple_footer.html
@@ -17,7 +17,7 @@
</div>
<script type="text/javascript" src="{T_JQUERY_LINK}"></script>
-<!-- IF S_JQUERY_FALLBACK --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.js" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF -->
+<!-- IF S_JQUERY_FALLBACK --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.js?assets_version={T_ASSETS_VERSION}" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF -->
</body>
</html>
diff --git a/phpBB/adm/style/simple_header.html b/phpBB/adm/style/simple_header.html
index 84ff665acc..d4cbcb6cbe 100644
--- a/phpBB/adm/style/simple_header.html
+++ b/phpBB/adm/style/simple_header.html
@@ -5,7 +5,7 @@
<!-- IF META -->{META}<!-- ENDIF -->
<title>{PAGE_TITLE}</title>
-<link href="style/admin.css" rel="stylesheet" type="text/css" media="screen" />
+<link href="style/admin.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
diff --git a/phpBB/assets/javascript/core.js b/phpBB/assets/javascript/core.js
index c41edfa145..958b6c9ff6 100644
--- a/phpBB/assets/javascript/core.js
+++ b/phpBB/assets/javascript/core.js
@@ -245,6 +245,7 @@ phpbb.ajaxify = function(options) {
var elements = $(options.selector),
refresh = options.refresh,
callback = options.callback,
+ overlay = (typeof options.overlay !== 'undefined') ? options.overlay : true,
is_form = elements.is('form'),
event_name = is_form ? 'submit' : 'click';
@@ -382,7 +383,10 @@ phpbb.ajaxify = function(options) {
return;
}
- phpbb.loading_alert();
+ if (overlay)
+ {
+ phpbb.loading_alert();
+ }
$.ajax({
url: action,
diff --git a/phpBB/common.php b/phpBB/common.php
index a00e3e82a8..81fe275008 100644
--- a/phpBB/common.php
+++ b/phpBB/common.php
@@ -124,7 +124,7 @@ $phpbb_extension_manager = new phpbb_extension_manager($db, EXT_TABLE, $phpbb_ro
// Initialize style
$phpbb_style_resource_locator = new phpbb_style_resource_locator();
$phpbb_style_path_provider = new phpbb_style_extension_path_provider($phpbb_extension_manager, new phpbb_style_path_provider());
-$template = new phpbb_style_template($phpbb_root_path, $phpEx, $config, $user, $phpbb_style_resource_locator, $phpbb_style_path_provider);
+$template = new phpbb_template($phpbb_root_path, $phpEx, $config, $user, $phpbb_style_resource_locator);
$phpbb_style = new phpbb_style($phpbb_root_path, $phpEx, $config, $user, $phpbb_style_resource_locator, $phpbb_style_path_provider, $template);
$phpbb_subscriber_loader = new phpbb_event_extension_subscriber_loader($phpbb_dispatcher, $phpbb_extension_manager);
diff --git a/phpBB/develop/fill.php b/phpBB/develop/fill.php
index a4cd90bfca..5c3552265d 100644
--- a/phpBB/develop/fill.php
+++ b/phpBB/develop/fill.php
@@ -39,8 +39,8 @@ $posts_per_topic = 500;
// general vars
-$mode = (isset($_REQUEST['mode'])) ? $_REQUEST['mode'] : 'generate';
-$start = (isset($_REQUEST['start'])) ? intval($_REQUEST['start']) : 0;
+$mode = request_var('mode', 'generate');
+$start = request_var('start', 0);
switch ($mode)
{
diff --git a/phpBB/docs/AUTHORS b/phpBB/docs/AUTHORS
index 8be261706e..e945af8efa 100644
--- a/phpBB/docs/AUTHORS
+++ b/phpBB/docs/AUTHORS
@@ -24,9 +24,8 @@ phpBB Lead Developer: naderman (Nils Adermann)
phpBB Developers: Acyd Burn (Meik Sievertsen) [Lead 09/2005 - 01/2010]
bantu (Andreas Fischer)
- ckwalsh (Cullen Walsh)
+ imkingdavid (David King)
igorw (Igor Wiedler)
- kellanved (Henry Sudhof)
nickvergessen (Joas Schilling)
Oleg (Oleg Pudeyev)
rxu (Ruslan Uzdenov)
@@ -48,9 +47,11 @@ phpBB Developers: A_Jelly_Doughnut (Josh Woody) [01/2010 - 11/2010]
APTX (Marek A. Ruszczyński) [12/2007 - 04/2011]
Ashe (Ludovic Arnaud) [10/2002 - 11/2003, 06/2006 - 10/2006]
BartVB (Bart van Bragt) [11/2000 - 03/2006]
+ ckwalsh (Cullen Walsh) [01/2010 - 07/2011]
DavidMJ (David M.) [12/2005 - 08/2009]
dhn (Dominik Dröscher) [05/2007 - 01/2011]
GrahamJE (Graham Eames) [09/2005 - 11/2006]
+ kellanved (Henry Sudhof) [04/2007 - 03/2011]
TerraFrost (Jim Wigginton) [04/2009 - 01/2011]
Vic D'Elfant (Vic D'Elfant) [04/2007 - 04/2009]
diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html
index ba56d02759..7655aaa71f 100644
--- a/phpBB/docs/CHANGELOG.html
+++ b/phpBB/docs/CHANGELOG.html
@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="keywords" content="" />
-<meta name="description" content="phpBB 3.0.x Changelog" />
+<meta name="description" content="phpBB 3.1.x Changelog" />
<title>phpBB3 &bull; Changelog</title>
<link href="stylesheet.css" rel="stylesheet" type="text/css" media="screen, projection" />
@@ -20,7 +20,7 @@
<div id="doc-description">
<a href="../index.php" id="logo"><img src="site_logo.gif" alt="" /></a>
- <h1>phpBB 3.0.x Changelog</h1>
+ <h1>phpBB 3.1.x Changelog</h1>
<p style="display: none;"><a href="#start_here">Skip</a></p>
</div>
@@ -34,7 +34,7 @@
<!-- 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>
+<p>This is a non-exhaustive (but still near complete) changelog for phpBB 3.1.x including release candidate versions. Our thanks to all those people who've contributed bug reports and code fixes.</p>
<h1>Changelog</h1>
diff --git a/phpBB/docs/FAQ.html b/phpBB/docs/FAQ.html
index 5e83f27142..ebc5d06189 100644
--- a/phpBB/docs/FAQ.html
+++ b/phpBB/docs/FAQ.html
@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="keywords" content="" />
-<meta name="description" content="phpBB 3.0.x frequently asked questions" />
+<meta name="description" content="phpBB 3.1.x frequently asked questions" />
<title>phpBB3 &bull; FAQ</title>
<link href="stylesheet.css" rel="stylesheet" type="text/css" media="screen, projection" />
@@ -20,8 +20,8 @@
<div id="doc-description">
<a href="../index.php" id="logo"><img src="site_logo.gif" alt="" /></a>
- <h1>phpBB 3.0.x FAQ</h1>
- <p>phpBB 3.0.x frequently asked questions</p>
+ <h1>phpBB 3.1.x FAQ</h1>
+ <p>phpBB 3.1.x frequently asked questions</p>
<p style="display: none;"><a href="#start_here">Skip</a></p>
</div>
diff --git a/phpBB/docs/INSTALL.html b/phpBB/docs/INSTALL.html
index e3d56baa36..47cf546ee8 100644
--- a/phpBB/docs/INSTALL.html
+++ b/phpBB/docs/INSTALL.html
@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="keywords" content="" />
-<meta name="description" content="phpBB 3.0.x Installation, updating and conversion informations" />
+<meta name="description" content="phpBB 3.1.x Installation, updating and conversion informations" />
<title>phpBB3 &bull; Install</title>
<link href="stylesheet.css" rel="stylesheet" type="text/css" media="screen, projection" />
@@ -20,8 +20,8 @@
<div id="doc-description">
<a href="../index.php" id="logo"><img src="site_logo.gif" alt="" /></a>
- <h1>phpBB 3.0.x Install</h1>
- <p>phpBB 3.0.x Installation, updating and conversion informations</p>
+ <h1>phpBB 3.1.x Install</h1>
+ <p>phpBB 3.1.x Installation, updating and conversion informations</p>
<p style="display: none;"><a href="#start_here">Skip</a></p>
</div>
@@ -52,7 +52,7 @@
<li><a href="#quickinstall">Quick install</a></li>
<li><a href="#require">Requirements</a></li>
<li><a href="#install">New installation</a></li>
- <li><a href="#update">Updating from stable releases of phpBB 3.0.x</a>
+ <li><a href="#update">Updating from stable releases of phpBB 3.1.x</a>
<ol style="list-style-type: lower-roman;">
<li><a href="#update_full">Full package</a></li>
<li><a href="#update_files">Changed files only</a></li>
@@ -61,7 +61,7 @@
<li><a href="#update_all">All package types</a></li>
</ol>
</li>
- <li><a href="#convert">Conversion from phpBB 2.0.x to phpBB 3.0.x</a>
+ <li><a href="#convert">Conversion from phpBB 2.0.x to phpBB 3.1.x</a>
<ol style="list-style-type: lower-roman;">
<li><a href="#prereq">Requirements before converting</a></li>
<li><a href="#conversion">Converting</a></li>
@@ -124,7 +124,7 @@
<div class="content">
- <p>phpBB3 has a few requirements which must be met before you are able to install and use it.</p>
+ <p>phpBB 3.1.x has a few requirements which must be met before you are able to install and use it.</p>
<ul>
<li>A webserver or web hosting account running on any major Operating System with support for PHP</li>
@@ -134,13 +134,17 @@
<li>PostgreSQL 7.3+</li>
<li>SQLite 2.8.2+</li>
<li>Firebird 2.1+</li>
- <li>MS SQL Server 2000 or above (directly or via ODBC)</li>
+ <li>MS SQL Server 2000 or above (directly or via ODBC or the native adapter)</li>
<li>Oracle</li>
</ul>
</li>
<li><strong>PHP 5.3.2+</strong> with support for the database you intend to use.</li>
+ <li>The following PHP modules are required:</li>
+ <ul>
+ <li>json</li>
+ </ul>
<li>getimagesize() function need to be enabled.</li>
- <li>These optional presence of the following modules within PHP will provide access to additional features, but they are not required.
+ <li>Presence of the following modules within PHP will provide access to additional features, but they are not required:
<ul>
<li>zlib Compression support</li>
<li>Remote FTP support</li>
@@ -151,7 +155,7 @@
</li>
</ul>
- <p>If your server or hosting account does not meet the requirements above we are afraid phpBB3 is not for you.</p>
+ <p>If your server or hosting account does not meet the requirements above we are afraid phpBB 3.1.x is not for you.</p>
</div>
@@ -175,7 +179,7 @@
<p>All .php, .inc, .sql, .cfg, .html and .txt files should be uploaded in <strong>ASCII</strong> mode, while all graphics should be uploaded in <strong>BINARY</strong> mode. If you are unfamiliar with what this means please refer to your FTP client documentation. In most cases this is all handled transparantly by your ftp client but if you encounter problems later you should be sure the files where uploaded correctly as described here.</p>
- <p>phpBB3 comes supplied with english as its standard language. However a number of separate packs for different languages are available. If you are not a native english speaker you may wish to install one or more of these packages before continuing. The installation process below will allow you to select a default language from those available (you can of course change this default at a later stage). For more details of language packs, where to obtain them and how to install them please see the <a href="README.html#i18n">README</a>.</p>
+ <p>phpBB3 comes supplied with British English as its standard language. However a number of separate packs for different languages are available. If you are not a native English speaker you may wish to install one or more of these packages before continuing. The installation process below will allow you to select a default language from those available (you can of course change this default at a later stage). For more details of language packs, where to obtain them and how to install them please see the <a href="README.html#i18n">README</a>.</p>
<p>Once all the files have been uploaded to your site you should point your browser at this location with the addition of <code>install/</code>. For example if your domain name is <em>www.mydomain.tld</em> and you placed phpBB3 in a directory /phpBB3 off your web root you would enter <em>http://www.mydomain.tld/phpBB3/install/</em> or (alternatively) <em>http://www.mydomain.tld/phpBB3/install/index.php</em> into your browser. When you have done this you should see the phpBB3 Installation screen appear.</p>
@@ -242,7 +246,7 @@
<hr />
- <a name="update"></a><h2>4. Updating from stable releases of phpBB 3.0.x</h2>
+ <a name="update"></a><h2>4. Updating from stable releases of phpBB 3.1.x</h2>
<div class="paragraph">
<div class="inner"><span class="corners-top"><span></span></span>
@@ -267,7 +271,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.9</samp> you should select the phpBB-3.0.9_to_3.0.10.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.1.0</samp> you should select the phpBB-3.1.0_to_3.1.1.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>
@@ -279,7 +283,7 @@
<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 recommended 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 <samp>3.0.9</samp> you need the phpBB-3.0.9_to_3.0.10.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 <samp>3.1.0</samp> you need the phpBB-3.1.0_to_3.1.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>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>
@@ -316,7 +320,7 @@
<hr />
- <a name="convert"></a><h2>5. Conversion from phpBB 2.0.x to phpBB 3.0.x</h2>
+ <a name="convert"></a><h2>5. Conversion from phpBB 2.0.x to phpBB 3.1.x</h2>
<div class="paragraph">
<div class="inner"><span class="corners-top"><span></span></span>
diff --git a/phpBB/docs/README.html b/phpBB/docs/README.html
index ccd368fbde..6adc1ee7cb 100644
--- a/phpBB/docs/README.html
+++ b/phpBB/docs/README.html
@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="keywords" content="" />
-<meta name="description" content="phpBB 3.0.x Readme" />
+<meta name="description" content="phpBB 3.1.x Readme" />
<title>phpBB3 &bull; Readme</title>
<link href="stylesheet.css" rel="stylesheet" type="text/css" media="screen, projection" />
@@ -20,7 +20,7 @@
<div id="doc-description">
<a href="../index.php" id="logo"><img src="site_logo.gif" alt="" /></a>
- <h1>phpBB 3.0.x Readme</h1>
+ <h1>phpBB 3.1.x Readme</h1>
<p style="display: none;"><a href="#start_here">Skip</a></p>
</div>
@@ -84,23 +84,26 @@
<div class="content">
- <p>Installation, update and conversion instructions can be found in the <a href="INSTALL.html">INSTALL</a> document contained in this distribution. If you are intending to convert from a previous phpBB 2.0.x installation we highly recommend you backup any existing data before proceeding!</p>
+ <p>Installation, update and conversion instructions can be found in the <a href="INSTALL.html">INSTALL</a> document contained in this distribution. If you are intending to convert from a previous phpBB 2.0.x or 3.0.x installation we highly recommend you backup any existing data before proceeding!</p>
- <p>Users of phpBB3 Beta versions cannot directly update.</p>
+ <p>Users of phpBB 3.0 and 3.1 Beta versions cannot directly update.</p>
<p>Please note that we won't support the following installation types:</p>
<ul>
- <li>Updates from phpBB3 Beta versions to phpBB3 RC1 and higher</li>
- <li>Conversions from phpBB 2.0.x to phpBB3 Beta versions</li>
- <li>phpBB3 Beta installations</li>
+ <li>Updates from phpBB 3.0 Beta versions to phpBB 3.0 RC1 and higher</li>
+ <li>Updates from phpBB 3.1 Beta versions to phpBB 3.1 RC1 and higher</li>
+ <li>Conversions from phpBB 2.0.x to phpBB 3.0 or 3.1 Beta versions</li>
+ <li>phpBB 3.0 or 3.1 Beta installations</li>
</ul>
<p>We give support for the following installation types:</p>
<ul>
- <li>Updates from phpBB3 RC1 to the latest version</li>
+ <li>Updates from phpBB 3.0 RC1 and 3.1 RC1 to the latest version</li>
+ <li>Note: if using the <em>Automatic Update Package</em>, updates are supported from phpBB 3.0.2 onward. To update a pre-3.0.2 installation, first update to 3.0.2 and then update to the current version.</li>
<li>Conversions from phpBB 2.0.x to the latest version</li>
- <li>New installations of phpBB3 - always only the latest released version</li>
+ <li>New installations of phpBB 3.0.x - always only the latest released version</li>
+ <li>New installations of phpBB 3.1.x - always only the latest released version</li>
</ul>
</div>
@@ -129,13 +132,13 @@
<p>This is the <em>official</em> location for all supported language sets. If you download a package from a 3rd party site you do so with the understanding that we cannot offer support. So please, do not ask for help in these cases!</p>
- <p>Installation of these packages is straightforward, simply download the required language pack and unarchive it into the <samp>languages/</samp> folder. Please ensure you retain the directory structure when doing this! Once uploaded go to the <code>Admin-&gt;System-&gt;Language Packs</code> and install the now appeared new language pack. To install the style imageset you should download the imageset for your language and unarchive the file/s into the relevant imageset directory (styles/prosilver/imageset or styles/subsilver2/imageset), again you must retain the directory structure. Once installed the imageset will become immediately available.</p>
+ <p>Installation of these packages is straightforward, simply download the required language pack and unarchive it into the <samp>languages/</samp> folder. Please ensure you retain the directory structure when doing this! Once uploaded go to the <code>Admin-&gt;System-&gt;Language Packs</code> and install the now appearing new language pack. To install the style imageset you should download the imageset for your language and unarchive the file/s into the relevant imageset directory (styles/prosilver/imageset or styles/subsilver2/imageset), again you must retain the directory structure. Once installed the imageset will become immediately available.</p>
<p>If your language is not available please visit our forums where you will find a topic listing translations currently available or in preparation. This topic also gives you information should you wish to volunteer to translate a language not currently listed.</p>
<a name="styles"></a><h3>2.ii. Styles</h3>
- <p>Although phpBB Group are rather proud of the included styles we realise that it may not be to everyones tastes. Therefore phpBB3 allows styles to be switched with relative ease. Firstly you need to locate and download a style you like. We maintain such a site at</p>
+ <p>Although phpBB Group are rather proud of the included styles we realise that they may not be to everyone's tastes. Therefore phpBB3 allows styles to be switched with relative ease. Firstly you need to locate and download a style you like. We maintain such a site at</p>
<p><a href="http://www.phpbb.com/styles/">http://www.phpbb.com/styles/</a></p>
@@ -185,7 +188,7 @@
<p>phpBB Group maintains a thriving community where a number of people have generously decided to donate their time to help support users. This site can be found at:</p>
- <p><a href="http://www.phpbb.com/">http://www.phpbb.com/</a></p>
+ <p><a href="http://www.phpbb.com/community/">http://www.phpbb.com/community/</a></p>
<p>If you do seek help via our forums please be sure to do a Search before posting. This may well save both you and us time and allow the developer, moderator and support groups to spend more time responding to people with unknown issues and problems. Please also remember that phpBB is an entirely volunteer effort, no one receives any compensation for the time they give, this includes moderators as well as developers. So please be respectful and mindful when awaiting responses.</p>
@@ -193,6 +196,8 @@
<p>Another place you may find help is our IRC channel. This operates on the Freenode IRC network, <em>irc.freenode.net</em> and the channel is <em>#phpbb</em> and can be accessed by any good IRC client such as mIRC, XChat, etc. Again, please do not abuse this service and be respectful of other users.</p>
+ <p>There are other IRC channels available, please see <a href="http://www.phpbb.com/support/irc/">http://www.phpbb.com/support/irc/</a> for the complete list.</p>
+
</div>
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
@@ -209,13 +214,13 @@
<div class="content">
- <p>This is the third stable release of phpBB. The 3.0.x line is essentially feature frozen, with only point releases seeing fixes for bugs and security issues, though feature alterations and minor feature additions may be done if deemed absolutely required. Our next major release will be phpBB 3.2 and the planning phase has begun (the unstable development version is 3.1). Please do not post questions asking when 3.2 will be available, no release date has been set.</p>
+ <p>This is a stable release of phpBB. The 3.1.x line is feature frozen, with point releases principally including fixes for bugs and security issues. Feature alterations and minor feature additions may be done if deemed absolutely required. The next major release will be phpBB 3.2 which is currently under development. Please do not post questions asking when 3.2 will be available, no release date has been set.</p>
- <p>For those interested in the development of phpBB should keep an eye on the community forums to see how things are progressing:</p>
+ <p>Those interested in the development of phpBB should keep an eye on the development forums to see how things are progressing:</p>
<p><a href="http://area51.phpbb.com/phpBB/">http://area51.phpbb.com/phpBB/</a></p>
- <p>Please note that this forum should <strong>NOT</strong> be used to obtain support for or ask questions about phpBB 2.0.x or phpBB 3.0.x, the main community forums are the place for this. Any such posts will be locked and go unanswered.</p>
+ <p>Please note that this forum should <strong>NOT</strong> be used to obtain support for phpBB, the main community forums are the place for this.</p>
</div>
@@ -233,31 +238,33 @@
<div class="content">
- <p>The phpBB Group uses a bug tracking system to store, list and manage all reported bugs, it can be found at the location listed below. Please <strong>DO NOT</strong> post bug reports to our forums, they will be locked. In addition please <strong>DO NOT</strong> use the bug tracker for support requests. Posting such a request will only see you directed to the support forums (while taking time away from working on real bugs).</p>
+ <p>The phpBB Group uses a bug tracking system to store, list and manage all reported bugs, it can be found at the location listed below. Please <strong>DO NOT</strong> post bug reports to our forums. In addition please <strong>DO NOT</strong> use the bug tracker for support requests. Posting such a request will only see you directed to the support forums (while taking time away from working on real bugs).</p>
- <p><a href="http://tracker.phpbb.com/">http://tracker.phpbb.com/</a></p>
+ <p><a href="http://tracker.phpbb.com/browse/PHPBB3">http://tracker.phpbb.com/browse/PHPBB3</a></p>
<p>While we very much appreciate receiving bug reports (the more reports the more stable phpBB will be) we ask you carry out a few steps before adding new entries:</p>
<ul>
- <li>Firstly determine if your bug is reproduceable, how to determine this depends on the bug in question. Only if the bug is reproduceable it is likely to be a problem with phpBB3 (or in some way connected). If something cannot be reproduced it may turn out to have been your hosting provider working on something, a user doing something silly, etc. Bug reports for non-reproduceable events can slow down our attempts to fix real, reproduceable issues<br /><br /></li>
+ <li>Firstly determine if your bug is reproduceable, how to determine this depends on the bug in question. Only if the bug is reproduceable it is likely to be a problem with phpBB3 (or in some way connected). If something cannot be reproduced it may turn out to have been your hosting provider working on something, a user doing something silly, etc. Bug reports for non-reproduceable events can slow down our attempts to fix real, reproduceable issues.<br /><br /></li>
<li>Next please read or search through the existing bug reports to see if <em>your</em> bug (or one very similar to it) is already listed. If it is please add to that existing bug rather than creating a new duplicate entry (all this does is slow us down).<br /><br /></li>
- <li>Check the forums (use search!) to see if people have discussed anything that sounds similar to what you are seeing. However, as noted above please <strong>DO NOT</strong> post your particular bug to the forum unless it's non-reproduceable or you are sure it's related to something you have done rather phpBB3<br /><br /></li>
- <li>If no existing bug exists then please feel free to add it</li>
+ <li>Check the forums (use search!) to see if people have discussed anything that sounds similar to what you are seeing. However, as noted above please <strong>DO NOT</strong> post your particular bug to the forum unless it's non-reproduceable or you are sure it's related to something you have done rather phpBB3.<br /><br /></li>
+ <li>If no existing bug exists then please feel free to add it.</li>
</ul>
<p>If you do post a new bug (i.e. one that isn't already listed in the bug tracker) firstly make sure you have logged in (your username and password are the same as for the community forums) then please include the following details:</p>
<ul>
- <li>Your server type/version, e.g. Apache 1.3.28, IIS 4, Sambar, etc.</li>
- <li>PHP version and mode of operation, e.g. PHP 5.1.1 as a module, PHP 4.4.4 running as CGI, etc.</li>
- <li>DB type/version, e.g. MySQL 4.0.1, PostgreSQL 7.3.2, MSSQL Server 2000 SP1, etc.</li>
+ <li>Your server type/version, e.g. Apache 2.2.3, IIS 7, Sambar, etc.</li>
+ <li>PHP version and mode of operation, e.g. PHP 5.3.2 as a module, PHP 5.4.0 running as CGI, etc.</li>
+ <li>DB type/version, e.g. MySQL 5.0.77, PostgreSQL 9.0.6, MSSQL Server 2000 SP1, etc.</li>
</ul>
- <p>The relevant database type/version is listed within the administration control panel</p>
+ <p>The relevant database type/version is listed within the administration control panel.</p>
<p>Please also be as detailed as you can in your report, if possible list the steps required to duplicate the problem. If you have a patch that fixes the issue, please attach it to the ticket or submit a pull request <a href="https://github.com/phpbb/phpbb3">on GitHub</a>.</p>
+ <p>If you create a patch, it is very much appreciated (but not required) if you follow the phpBB coding guidelines. Please note that the coding guidelines are somewhat different between different versions of phpBB. For phpBB 3.1.x the coding guidelines may be found here: <a href="http://area51.phpbb.com/docs/31x/coding-guidelines.html">http://area51.phpbb.com/docs/31x/coding-guidelines.html</a></p>
+
<p>Once a bug has been submitted you will be emailed any follow up comments added to it. <strong>Please</strong> if you are requested to supply additional information, do so! It is frustrating for us to receive bug reports, ask for additional information but get nothing. In these cases we have a policy of closing the bug, which may leave a very real problem in place. Obviously we would rather not have this situation arise.</p>
<a name="securitybugs"></a><h3>5.i. Security related bugs</h3>
@@ -306,11 +313,11 @@
<div class="content">
- <p>phpBB is no longer supported on PHP4 due to several compatibility issues and we recommend that you upgrade to the latest stable release of PHP5 to run phpBB. The minimum version required is PHP 5.3.2.</p>
+ <p>phpBB 3.1.x takes advantage of new features added in PHP 5.3. We recommend that you upgrade to the latest stable release of PHP5 to run phpBB. The minimum version required is PHP 5.3.2.</p>
<p>Please remember that running any application on a developmental version of PHP can lead to strange/unexpected results which may appear to be bugs in the application (which may not be true). Therefore we recommend you upgrade to the newest stable version of PHP before running phpBB3. If you are running a developmental version of PHP please check any bugs you find on a system running a stable release before submitting.</p>
- <p>This board has been developed and tested under Linux and Windows (amongst others) running Apache using MySQL 3.23, 4.x, 5.x, MSSQL Server 2000, PostgreSQL 7.x, Oracle 8, SQLite and Firebird. Versions of PHP used range from 5.3.2 to 5.4.x without problem.</p>
+ <p>This board has been developed and tested under Linux and Windows (amongst others) running Apache using MySQL 3.23, 4.x, 5.x, MSSQL Server 2000, PostgreSQL 8.x, Oracle 8, SQLite and Firebird. Versions of PHP used range from 5.3.x to 5.4.x without problem.</p>
<a name="phpsec"></a><h3>7.i. Notice on PHP security issues</h3>
diff --git a/phpBB/includes/acp/acp_styles.php b/phpBB/includes/acp/acp_styles.php
index d33be274b4..de1f678e38 100644
--- a/phpBB/includes/acp/acp_styles.php
+++ b/phpBB/includes/acp/acp_styles.php
@@ -1056,7 +1056,7 @@ class acp_styles
*/
protected function read_style_cfg($dir)
{
- static $required = array('name', 'version', 'copyright');
+ static $required = array('name', 'phpbb_version', 'copyright');
$cfg = parse_cfg_file($this->styles_path . $dir . '/style.cfg');
// Check if it is a valid file
diff --git a/phpBB/includes/bbcode.php b/phpBB/includes/bbcode.php
index 612ced8ad6..fde917e5b1 100644
--- a/phpBB/includes/bbcode.php
+++ b/phpBB/includes/bbcode.php
@@ -134,7 +134,7 @@ class bbcode
$style_resource_locator = new phpbb_style_resource_locator();
$style_path_provider = new phpbb_style_extension_path_provider($phpbb_extension_manager, new phpbb_style_path_provider());
- $template = new phpbb_style_template($phpbb_root_path, $phpEx, $config, $user, $style_resource_locator, $style_path_provider);
+ $template = new phpbb_template($phpbb_root_path, $phpEx, $config, $user, $style_resource_locator);
$style = new phpbb_style($phpbb_root_path, $phpEx, $config, $user, $style_resource_locator, $style_path_provider, $template);
$style->set_style();
$template->set_filenames(array('bbcode.html' => 'bbcode.html'));
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 9a6af29d69..28f06abbc1 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -343,7 +343,7 @@ function still_on_time($extra_time = 15)
/**
*
-* @version Version 0.1 / slightly modified for phpBB 3.0.x (using $H$ as hash type identifier)
+* @version Version 0.1 / slightly modified for phpBB 3.1.x (using $H$ as hash type identifier)
*
* Portable PHP password hashing framework.
*
@@ -4767,6 +4767,7 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0
'S_SEARCH_HIDDEN_FIELDS' => build_hidden_fields($s_search_hidden_fields),
+ 'T_ASSETS_VERSION' => $config['assets_version'],
'T_ASSETS_PATH' => "{$web_path}assets",
'T_THEME_PATH' => "{$web_path}styles/" . rawurlencode($user->theme['style_path']) . '/theme',
'T_TEMPLATE_PATH' => "{$web_path}styles/" . rawurlencode($user->theme['style_path']) . '/template',
@@ -4778,10 +4779,10 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0
'T_ICONS_PATH' => "{$web_path}{$config['icons_path']}/",
'T_RANKS_PATH' => "{$web_path}{$config['ranks_path']}/",
'T_UPLOAD_PATH' => "{$web_path}{$config['upload_path']}/",
- 'T_STYLESHEET_LINK' => "{$web_path}styles/" . rawurlencode($user->theme['style_path']) . '/theme/stylesheet.css',
- 'T_STYLESHEET_LANG_LINK' => "{$web_path}styles/" . rawurlencode($user->theme['style_path']) . '/theme/' . $user->lang_name . '/stylesheet.css',
+ 'T_STYLESHEET_LINK' => "{$web_path}styles/" . rawurlencode($user->theme['style_path']) . '/theme/stylesheet.css?assets_version=' . $config['assets_version'],
+ 'T_STYLESHEET_LANG_LINK' => "{$web_path}styles/" . rawurlencode($user->theme['style_path']) . '/theme/' . $user->lang_name . '/stylesheet.css?assets_version=' . $config['assets_version'],
'T_STYLESHEET_NAME' => $user->theme['style_name'],
- 'T_JQUERY_LINK' => ($config['load_jquery_cdn'] && !empty($config['load_jquery_url'])) ? $config['load_jquery_url'] : "{$web_path}assets/javascript/jquery.js",
+ 'T_JQUERY_LINK' => ($config['load_jquery_cdn'] && !empty($config['load_jquery_url'])) ? $config['load_jquery_url'] : "{$web_path}assets/javascript/jquery.js?assets_version=" . $config['assets_version'],
'S_JQUERY_FALLBACK' => ($config['load_jquery_cdn']) ? true : false,
'T_THEME_NAME' => rawurlencode($user->theme['style_path']),
diff --git a/phpBB/includes/functions_install.php b/phpBB/includes/functions_install.php
index a49e19f09a..15b388728b 100644
--- a/phpBB/includes/functions_install.php
+++ b/phpBB/includes/functions_install.php
@@ -511,12 +511,22 @@ function adjust_language_keys_callback($matches)
}
}
+/**
+* Creates the output to be stored in a phpBB config.php file
+*
+* @param array $data Array containing the database connection information
+* @param string $dbms The name of the DBAL class to use
+* @param array $load_extensions Array of additional extensions that should be loaded
+* @param bool $debug If the debug constants should be enabled by default or not
+*
+* @return string The output to write to the file
+*/
function phpbb_create_config_file_data($data, $dbms, $load_extensions, $debug = false)
{
$load_extensions = implode(',', $load_extensions);
$config_data = "<?php\n";
- $config_data .= "// phpBB 3.0.x auto-generated configuration file\n// Do not change anything in this file!\n";
+ $config_data .= "// phpBB 3.1.x auto-generated configuration file\n// Do not change anything in this file!\n";
$config_data_array = array(
'dbms' => $dbms,
diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php
index f608c95fe4..e9073553d0 100644
--- a/phpBB/includes/functions_messenger.php
+++ b/phpBB/includes/functions_messenger.php
@@ -210,8 +210,9 @@ class messenger
{
$style_resource_locator = new phpbb_style_resource_locator();
$style_path_provider = new phpbb_style_extension_path_provider($phpbb_extension_manager, new phpbb_style_path_provider());
- $tpl = new phpbb_style_template($phpbb_root_path, $phpEx, $config, $user, $style_resource_locator, $style_path_provider);
+ $tpl = new phpbb_template($phpbb_root_path, $phpEx, $config, $user, $style_resource_locator);
$style = new phpbb_style($phpbb_root_path, $phpEx, $config, $user, $style_resource_locator, $style_path_provider, $tpl);
+
$this->tpl_msg[$template_lang . $template_file] = $tpl;
$fallback_template_path = false;
diff --git a/phpBB/includes/mcp/mcp_warn.php b/phpBB/includes/mcp/mcp_warn.php
index 9d838790a0..c614beea3b 100644
--- a/phpBB/includes/mcp/mcp_warn.php
+++ b/phpBB/includes/mcp/mcp_warn.php
@@ -307,7 +307,7 @@ class mcp_warn
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
}
- $rank_title = $rank_img = '';
+ get_user_rank($user_row['user_rank'], $user_row['user_posts'], $rank_title, $rank_img, $rank_img_src);
$avatar_img = get_user_avatar($user_row['user_avatar'], $user_row['user_avatar_type'], $user_row['user_avatar_width'], $user_row['user_avatar_height']);
$template->assign_vars(array(
@@ -412,7 +412,7 @@ class mcp_warn
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
}
- $rank_title = $rank_img = '';
+ get_user_rank($user_row['user_rank'], $user_row['user_posts'], $rank_title, $rank_img, $rank_img_src);
$avatar_img = get_user_avatar($user_row['user_avatar'], $user_row['user_avatar_type'], $user_row['user_avatar_width'], $user_row['user_avatar_height']);
// OK, they didn't submit a warning so lets build the page for them to do so
diff --git a/phpBB/includes/style/resource_locator.php b/phpBB/includes/style/resource_locator.php
index 3e6dd5d6aa..fafa11c352 100644
--- a/phpBB/includes/style/resource_locator.php
+++ b/phpBB/includes/style/resource_locator.php
@@ -30,7 +30,7 @@ if (!defined('IN_PHPBB'))
*
* @package phpBB3
*/
-class phpbb_style_resource_locator
+class phpbb_style_resource_locator implements phpbb_template_locator
{
/**
* Paths to style directories.
diff --git a/phpBB/includes/style/style.php b/phpBB/includes/style/style.php
index 5ac61c9f10..3f470015f6 100644
--- a/phpBB/includes/style/style.php
+++ b/phpBB/includes/style/style.php
@@ -22,28 +22,33 @@ if (!defined('IN_PHPBB'))
class phpbb_style
{
/**
- * @var phpbb_style_template Template class.
+ * Template class.
* Handles everything related to templates.
+ * @var phpbb_template
*/
private $template;
/**
- * @var string phpBB root path
+ * phpBB root path
+ * @var string
*/
private $phpbb_root_path;
/**
- * @var phpEx PHP file extension
+ * PHP file extension
+ * @var string
*/
private $phpEx;
/**
- * @var phpbb_config phpBB config instance
+ * phpBB config instance
+ * @var phpbb_config
*/
private $config;
/**
- * @var user current user
+ * Current user
+ * @var phpbb_user
*/
private $user;
@@ -66,9 +71,9 @@ class phpbb_style
* @param user $user current user
* @param phpbb_style_resource_locator $locator style resource locator
* @param phpbb_style_path_provider $provider style path provider
- * @param phpbb_style_template $template template
+ * @param phpbb_template $template template
*/
- public function __construct($phpbb_root_path, $phpEx, $config, $user, phpbb_style_resource_locator $locator, phpbb_style_path_provider_interface $provider, phpbb_style_template $template)
+ public function __construct($phpbb_root_path, $phpEx, $config, $user, phpbb_style_resource_locator $locator, phpbb_style_path_provider_interface $provider, phpbb_template $template)
{
$this->phpbb_root_path = $phpbb_root_path;
$this->phpEx = $phpEx;
@@ -119,7 +124,7 @@ class phpbb_style
$this->template->cachepath = $this->phpbb_root_path . 'cache/tpl_' . str_replace('_', '-', $name) . '_';
- $this->template->context = new phpbb_style_template_context();
+ $this->template->context = new phpbb_template_context();
if ($template_path !== false)
{
diff --git a/phpBB/includes/style/template_compile.php b/phpBB/includes/template/compile.php
index fa0928f424..82b301c1a2 100644
--- a/phpBB/includes/style/template_compile.php
+++ b/phpBB/includes/template/compile.php
@@ -15,7 +15,7 @@ if (!defined('IN_PHPBB'))
exit;
}
-stream_filter_register('phpbb_template', 'phpbb_style_template_filter');
+stream_filter_register('phpbb_template', 'phpbb_template_filter');
/**
* Extension of template class - Functions needed for compiling templates only.
@@ -23,7 +23,7 @@ stream_filter_register('phpbb_template', 'phpbb_style_template_filter');
* @package phpBB3
* @uses template_filter As a PHP stream filter to perform compilation of templates
*/
-class phpbb_style_template_compile
+class phpbb_template_compile
{
/**
* Array of parameters to forward to template filter
diff --git a/phpBB/includes/style/template_context.php b/phpBB/includes/template/context.php
index b22f77da2e..ec09da1cf3 100644
--- a/phpBB/includes/style/template_context.php
+++ b/phpBB/includes/template/context.php
@@ -20,7 +20,7 @@ if (!defined('IN_PHPBB'))
*
* @package phpBB3
*/
-class phpbb_style_template_context
+class phpbb_template_context
{
/**
* variable that holds all the data we'll be substituting into
@@ -86,7 +86,7 @@ class phpbb_style_template_context
* Returns a reference to template data array.
*
* This function is public so that template renderer may invoke it.
- * Users should alter template variables via functions in phpbb_style_template.
+ * Users should alter template variables via functions in phpbb_template.
*
* Note: modifying returned array will affect data stored in the context.
*
diff --git a/phpBB/includes/style/template_filter.php b/phpBB/includes/template/filter.php
index d62ad0ba1e..4a2593b757 100644
--- a/phpBB/includes/style/template_filter.php
+++ b/phpBB/includes/template/filter.php
@@ -35,7 +35,7 @@ if (!defined('IN_PHPBB'))
* @see template_compile
* @package phpBB3
*/
-class phpbb_style_template_filter extends php_user_filter
+class phpbb_template_filter extends php_user_filter
{
const REGEX_NS = '[a-z_][a-z_0-9]+';
@@ -138,7 +138,7 @@ class phpbb_style_template_filter extends php_user_filter
/**
* Initializer, called on creation.
*
- * Get the allow_php option, root directory and locator from params,
+ * Get the allow_php option, root directory and locator from params,
* which are passed to stream_filter_append.
*/
public function onCreate()
@@ -895,13 +895,13 @@ class phpbb_style_template_filter extends php_user_filter
// Locate file
$filename = $this->locator->get_first_file_location(array($tag_args), false, true);
-
+
if ($filename === false)
{
// File does not exist, find it during run time
return ' $_template->_js_include(\'' . addslashes($tag_args) . '\', true); ';
}
-
+
if (substr($filename, 0, strlen($this->phpbb_root_path)) != $this->phpbb_root_path)
{
// Absolute path, include as is
diff --git a/phpBB/includes/template/locator.php b/phpBB/includes/template/locator.php
new file mode 100644
index 0000000000..01c79eec4e
--- /dev/null
+++ b/phpBB/includes/template/locator.php
@@ -0,0 +1,121 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2011 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+
+/**
+* Resource locator interface.
+*
+* Objects implementing this interface maintain mapping from template handles
+* to source template file paths and locate templates.
+*
+* Locates style files.
+*
+* Resource locator is aware of styles tree, and can return actual
+* filesystem paths (i.e., the "child" style or the "parent" styles)
+* depending on what files exist.
+*
+* Root paths stored in locator are paths to style directories. Templates are
+* stored in subdirectory that $template_path points to.
+*
+* @package phpBB3
+*/
+interface phpbb_template_locator
+{
+ /**
+ * Sets the template filenames for handles. $filename_array
+ * should be a hash of handle => filename pairs.
+ *
+ * @param array $filname_array Should be a hash of handle => filename pairs.
+ */
+ public function set_filenames(array $filename_array);
+
+ /**
+ * Determines the filename for a template handle.
+ *
+ * The filename comes from array used in a set_filenames call,
+ * which should have been performed prior to invoking this function.
+ * Return value is a file basename (without path).
+ *
+ * @param $handle string Template handle
+ * @return string Filename corresponding to the template handle
+ */
+ public function get_filename_for_handle($handle);
+
+ /**
+ * Determines the source file path for a template handle without
+ * regard for styles tree.
+ *
+ * This function returns the path in "primary" style directory
+ * corresponding to the given template handle. That path may or
+ * may not actually exist on the filesystem. Because this function
+ * does not perform stat calls to determine whether the path it
+ * returns actually exists, it is faster than get_source_file_for_handle.
+ *
+ * Use get_source_file_for_handle to obtain the actual path that is
+ * guaranteed to exist (which might come from the parent style
+ * directory if primary style has parent styles).
+ *
+ * This function will trigger an error if the handle was never
+ * associated with a template file via set_filenames.
+ *
+ * @param $handle string Template handle
+ * @return string Path to source file path in primary style directory
+ */
+ public function get_virtual_source_file_for_handle($handle);
+
+ /**
+ * Determines the source file path for a template handle, accounting
+ * for styles tree and verifying that the path exists.
+ *
+ * This function returns the actual path that may be compiled for
+ * the specified template handle. It will trigger an error if
+ * the template handle was never associated with a template path
+ * via set_filenames or if the template file does not exist on the
+ * filesystem.
+ *
+ * Use get_virtual_source_file_for_handle to just resolve a template
+ * handle to a path without any filesystem or styles tree checks.
+ *
+ * @param string $handle Template handle (i.e. "friendly" template name)
+ * @param bool $find_all If true, each root path will be checked and function
+ * will return array of files instead of string and will not
+ * trigger a error if template does not exist
+ * @return string Source file path
+ */
+ public function get_source_file_for_handle($handle, $find_all = false);
+
+ /**
+ * Locates source file path, accounting for styles tree and verifying that
+ * the path exists.
+ *
+ * Unlike previous functions, this function works without template handle
+ * and it can search for more than one file. If more than one file name is
+ * specified, it will return location of file that it finds first.
+ *
+ * @param array $files List of files to locate.
+ * @param bool $return_default Determines what to return if file does not
+ * exist. If true, function will return location where file is
+ * supposed to be. If false, function will return false.
+ * @param bool $return_full_path If true, function will return full path
+ * to file. If false, function will return file name. This
+ * parameter can be used to check which one of set of files
+ * is available.
+ * @return string or boolean Source file path if file exists or $return_default is
+ * true. False if file does not exist and $return_default is false
+ */
+ public function get_first_file_location($files, $return_default = false, $return_full_path = true);
+}
diff --git a/phpBB/includes/style/template_renderer.php b/phpBB/includes/template/renderer.php
index bd2a786e86..30e234a733 100644
--- a/phpBB/includes/style/template_renderer.php
+++ b/phpBB/includes/template/renderer.php
@@ -23,12 +23,12 @@ if (!defined('IN_PHPBB'))
*
* @package phpBB3
*/
-interface phpbb_style_template_renderer
+interface phpbb_template_renderer
{
/**
* Displays the template managed by this renderer.
*
- * @param phpbb_style_template_context $context Template context to use
+ * @param phpbb_template_context $context Template context to use
* @param array $lang Language entries to use
*/
public function render($context, $lang);
diff --git a/phpBB/includes/style/template_renderer_eval.php b/phpBB/includes/template/renderer_eval.php
index 3e08b06e69..f8e4cb7b10 100644
--- a/phpBB/includes/style/template_renderer_eval.php
+++ b/phpBB/includes/template/renderer_eval.php
@@ -21,7 +21,7 @@ if (!defined('IN_PHPBB'))
*
* @package phpBB3
*/
-class phpbb_style_template_renderer_eval implements phpbb_style_template_renderer
+class phpbb_template_renderer_eval implements phpbb_template_renderer
{
/**
* Template code to be eval'ed.
@@ -33,7 +33,7 @@ class phpbb_style_template_renderer_eval implements phpbb_style_template_rendere
* Template includes are delegated to template object $template.
*
* @param string $code php code of the template
- * @param phpbb_style_template $template template object
+ * @param phpbb_template $template template object
*/
public function __construct($code, $template)
{
@@ -45,7 +45,7 @@ class phpbb_style_template_renderer_eval implements phpbb_style_template_rendere
* Displays the template managed by this renderer by eval'ing php code
* of the template.
*
- * @param phpbb_style_template_context $context Template context to use
+ * @param phpbb_template_context $context Template context to use
* @param array $lang Language entries to use
*/
public function render($context, $lang)
diff --git a/phpBB/includes/style/template_renderer_include.php b/phpBB/includes/template/renderer_include.php
index 91c1a1bb65..f5c9026abf 100644
--- a/phpBB/includes/style/template_renderer_include.php
+++ b/phpBB/includes/template/renderer_include.php
@@ -22,7 +22,7 @@ if (!defined('IN_PHPBB'))
*
* @package phpBB3
*/
-class phpbb_style_template_renderer_include implements phpbb_style_template_renderer
+class phpbb_template_renderer_include implements phpbb_template_renderer
{
/**
* Template path to be included.
@@ -45,7 +45,7 @@ class phpbb_style_template_renderer_include implements phpbb_style_template_rend
* Displays the template managed by this renderer by including
* the php file containing the template.
*
- * @param phpbb_style_template_context $context Template context to use
+ * @param phpbb_template_context $context Template context to use
* @param array $lang Language entries to use
*/
public function render($context, $lang)
diff --git a/phpBB/includes/style/template.php b/phpBB/includes/template/template.php
index 3f15355f7a..e6512c8417 100644
--- a/phpBB/includes/style/template.php
+++ b/phpBB/includes/template/template.php
@@ -29,52 +29,52 @@ if (!defined('IN_PHPBB'))
* Base Template class.
* @package phpBB3
*/
-class phpbb_style_template
+class phpbb_template
{
/**
- * @var phpbb_style_template_context Template context.
+ * Template context.
* Stores template data used during template rendering.
+ * @var phpbb_template_context
*/
public $context;
/**
- * @var string Path of the cache directory for the template
+ * Path of the cache directory for the template
+ * @var string
*/
public $cachepath = '';
/**
- * @var string phpBB root path
+ * phpBB root path
+ * @var string
*/
private $phpbb_root_path;
/**
- * @var phpEx PHP file extension
+ * PHP file extension
+ * @var string
*/
private $phpEx;
/**
- * @var phpbb_config phpBB config instance
+ * phpBB config instance
+ * @var phpbb_config
*/
private $config;
/**
- * @var user current user
+ * Current user
+ * @var phpbb_user
*/
private $user;
/**
- * Style resource locator
- * @var phpbb_style_resource_locator
+ * Template locator
+ * @var phpbb_template_locator
*/
private $locator;
/**
- * Template path provider
- * @var phpbb_style_path_provider
- */
- private $provider;
-
- /**
* Location of templates directory within style directories
* @var string
*/
@@ -85,10 +85,9 @@ class phpbb_style_template
*
* @param string $phpbb_root_path phpBB root path
* @param user $user current user
- * @param phpbb_style_resource_locator $locator style resource locator
- * @param phpbb_style_path_provider $provider style path provider
+ * @param phpbb_template_locator $locator template locator
*/
- public function __construct($phpbb_root_path, $phpEx, $config, $user, phpbb_style_resource_locator $locator, phpbb_style_path_provider_interface $provider)
+ public function __construct($phpbb_root_path, $phpEx, $config, $user, phpbb_template_locator $locator)
{
$this->phpbb_root_path = $phpbb_root_path;
$this->phpEx = $phpEx;
@@ -96,7 +95,6 @@ class phpbb_style_template
$this->user = $user;
$this->locator = $locator;
$this->template_path = $this->locator->template_path;
- $this->provider = $provider;
}
/**
@@ -253,15 +251,15 @@ class phpbb_style_template
* configuration setting may be used to force templates to be always
* recompiled.
*
- * Returns an object implementing phpbb_style_template_renderer, or null
+ * Returns an object implementing phpbb_template_renderer, or null
* if template loading or compilation failed. Call render() on the
* renderer to display the template. This will result in template
* contents sent to the output stream (unless, of course, output
* buffering is in effect).
*
* @param string $handle Handle of the template to load
- * @return phpbb_style_template_renderer Template renderer object, or null on failure
- * @uses phpbb_style_template_compile is used to compile template source
+ * @return phpbb_template_renderer Template renderer object, or null on failure
+ * @uses phpbb_template_compile is used to compile template source
*/
private function _tpl_load($handle)
{
@@ -285,18 +283,18 @@ class phpbb_style_template
// Recompile page if the original template is newer, otherwise load the compiled version
if (!$recompile)
{
- return new phpbb_style_template_renderer_include($output_file, $this);
+ return new phpbb_template_renderer_include($output_file, $this);
}
- $compile = new phpbb_style_template_compile($this->config['tpl_allow_php'], $this->locator, $this->phpbb_root_path);
+ $compile = new phpbb_template_compile($this->config['tpl_allow_php'], $this->locator, $this->phpbb_root_path);
if ($compile->compile_file_to_file($source_file, $output_file) !== false)
{
- $renderer = new phpbb_style_template_renderer_include($output_file, $this);
+ $renderer = new phpbb_template_renderer_include($output_file, $this);
}
else if (($code = $compile->compile_file($source_file)) !== false)
{
- $renderer = new phpbb_style_template_renderer_eval($code, $this);
+ $renderer = new phpbb_template_renderer_eval($code, $this);
}
else
{
@@ -358,7 +356,7 @@ class phpbb_style_template
$this->context->append_var($varname, $varval);
}
- // Docstring is copied from phpbb_style_template_context method with the same name.
+ // Docstring is copied from phpbb_template_context method with the same name.
/**
* Assign key variable pairs from an array to a specified block
* @param string $blockname Name of block to assign $vararray to
@@ -369,7 +367,7 @@ class phpbb_style_template
return $this->context->assign_block_vars($blockname, $vararray);
}
- // Docstring is copied from phpbb_style_template_context method with the same name.
+ // Docstring is copied from phpbb_template_context method with the same name.
/**
* Change already assigned key variable pair (one-dimensional - single loop entry)
*
@@ -507,6 +505,9 @@ class phpbb_style_template
$file = $this->locator->get_first_file_location(array($file), true, true);
}
+ $file .= (strpos($file, '?') === false) ? '?' : '&';
+ $file .= 'assets_version=' . $this->config['assets_version'];
+
// Add HTML code
$code = '<script src="' . htmlspecialchars($file) . '"></script>';
$this->context->append_var('SCRIPTS', $code);
diff --git a/phpBB/install/convertors/functions_phpbb20.php b/phpBB/install/convertors/functions_phpbb20.php
index aea6074637..0b6daeef47 100644
--- a/phpBB/install/convertors/functions_phpbb20.php
+++ b/phpBB/install/convertors/functions_phpbb20.php
@@ -13,7 +13,7 @@ if (!defined('IN_PHPBB'))
}
/**
-* Helper functions for phpBB 2.0.x to phpBB 3.0.x conversion
+* Helper functions for phpBB 2.0.x to phpBB 3.1.x conversion
*/
/**
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php
index be39b12d12..a0892005d2 100644
--- a/phpBB/install/database_update.php
+++ b/phpBB/install/database_update.php
@@ -189,6 +189,12 @@ $config = new phpbb_config_db($db, $cache->get_driver(), CONFIG_TABLE);
set_config(null, null, null, $config);
set_config_count(null, null, null, $config);
+// Update asset_version
+if (isset($config['assets_version']))
+{
+ set_config('assets_version', $config['assets_version'] + 1);
+}
+
// phpbb_db_tools will be taken from new files (under install/update/new)
// if possible, falling back to the board's copy.
$db_tools = new phpbb_db_tools($db, true);
@@ -1104,20 +1110,6 @@ function database_update_info()
'group_legend' => array('UINT', 0),
),
),
- 'drop_columns' => array(
- STYLES_TABLE => array(
- 'imageset_id',
- 'template_id',
- 'theme_id',
- ),
- ),
- 'drop_tables' => array(
- STYLES_IMAGESET_TABLE,
- STYLES_IMAGESET_DATA_TABLE,
- STYLES_TEMPLATE_TABLE,
- STYLES_TEMPLATE_DATA_TABLE,
- STYLES_THEME_TABLE,
- ),
),
);
}
@@ -1129,7 +1121,7 @@ function database_update_info()
*****************************************************************************/
function change_database_data(&$no_updates, $version)
{
- global $db, $errored, $error_ary, $config, $phpbb_root_path, $phpEx;
+ global $db, $errored, $error_ary, $config, $phpbb_root_path, $phpEx, $db_tools;
switch ($version)
{
@@ -2306,13 +2298,6 @@ function change_database_data(&$no_updates, $version)
'auth' => 'acl_a_styles',
'cat' => 'ACP_STYLE_MANAGEMENT',
),
- 'edit' => array(
- 'base' => 'acp_styles',
- 'class' => 'acp',
- 'title' => 'ACP_STYLES_EDIT',
- 'auth' => 'acl_a_styles',
- 'cat' => 'ACP_STYLE_MANAGEMENT',
- ),
'cache' => array(
'base' => 'acp_styles',
'class' => 'acp',
@@ -2325,7 +2310,7 @@ function change_database_data(&$no_updates, $version)
_add_modules($modules_to_install);
$sql = 'DELETE FROM ' . MODULES_TABLE . "
- WHERE (module_basename = 'styles' OR module_basename = 'acp_styles') AND (module_mode = 'imageset' OR module_mode = 'theme' OR module_mode = 'template')";
+ WHERE (module_basename = 'styles' OR module_basename = 'acp_styles') AND (module_mode = 'imageset' OR module_mode = 'theme' OR module_mode = 'template')";
_sql($sql, $errored, $error_ary);
// Localise Global Announcements
@@ -2415,15 +2400,147 @@ function change_database_data(&$no_updates, $version)
{
set_config('teampage_memberships', '1');
}
-
- // Clear styles table and add prosilver entry
- _sql('DELETE FROM ' . STYLES_TABLE, $errored, $error_ary);
- $sql = 'INSERT INTO ' . STYLES_TABLE . " (style_name, style_copyright, style_active, style_path, bbcode_bitfield, style_parent_id, style_parent_tree) VALUES ('prosilver', '&copy; phpBB Group', 1, 'prosilver', 'kNg=', 0, '')";
- _sql($sql, $errored, $error_ary);
-
+ // Check if styles table was already updated
+ if ($db_tools->sql_table_exists(STYLES_THEME_TABLE))
+ {
+ // Get list of valid 3.1 styles
+ $available_styles = array('prosilver');
+
+ $iterator = new DirectoryIterator($phpbb_root_path . 'styles');
+ $skip_dirs = array('.', '..', 'prosilver');
+ foreach ($iterator as $fileinfo)
+ {
+ if ($fileinfo->isDir() && !in_array($fileinfo->getFilename(), $skip_dirs) && file_exists($fileinfo->getPathname() . '/style.cfg'))
+ {
+ $style_cfg = parse_cfg_file($fileinfo->getPathname() . '/style.cfg');
+ if (isset($style_cfg['phpbb_version']) && version_compare($style_cfg['phpbb_version'], '3.1.0-dev', '>='))
+ {
+ // 3.1 style
+ $available_styles[] = $fileinfo->getFilename();
+ }
+ }
+ }
+
+ // Get all installed styles
+ if ($db_tools->sql_table_exists(STYLES_IMAGESET_TABLE))
+ {
+ $sql = 'SELECT s.style_id, t.template_path, t.template_id, t.bbcode_bitfield, t.template_inherits_id, t.template_inherit_path, c.theme_path, c.theme_id, i.imageset_path
+ FROM ' . STYLES_TABLE . ' s, ' . STYLES_TEMPLATE_TABLE . ' t, ' . STYLES_THEME_TABLE . ' c, ' . STYLES_IMAGESET_TABLE . " i
+ WHERE t.template_id = s.template_id
+ AND c.theme_id = s.theme_id
+ AND i.imageset_id = s.imageset_id";
+ }
+ else
+ {
+ $sql = 'SELECT s.style_id, t.template_path, t.template_id, t.bbcode_bitfield, t.template_inherits_id, t.template_inherit_path, c.theme_path, c.theme_id
+ FROM ' . STYLES_TABLE . ' s, ' . STYLES_TEMPLATE_TABLE . ' t, ' . STYLES_THEME_TABLE . " c
+ WHERE t.template_id = s.template_id
+ AND c.theme_id = s.theme_id";
+ }
+ $result = $db->sql_query($sql);
+
+ $styles = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $styles[] = $row;
+ }
+ $db->sql_freeresult($result);
+
+ // Decide which styles to keep, all others will be deleted
+ $valid_styles = array();
+ foreach ($styles as $style_row)
+ {
+ if (
+ // Delete styles with parent style (not supported yet)
+ $style_row['template_inherits_id'] == 0 &&
+ // Check if components match
+ $style_row['template_path'] == $style_row['theme_path'] && (!isset($style_row['imageset_path']) || $style_row['template_path'] == $style_row['imageset_path']) &&
+ // Check if components are valid
+ in_array($style_row['template_path'], $available_styles)
+ )
+ {
+ // Valid style. Keep it
+ $sql_ary = array(
+ 'style_path' => $style_row['template_path'],
+ 'bbcode_bitfield' => $style_row['bbcode_bitfield'],
+ 'style_parent_id' => 0,
+ 'style_parent_tree' => '',
+ );
+ _sql('UPDATE ' . STYLES_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . ' WHERE style_id = ' . $style_row['style_id'], $errored, $error_ary);
+ $valid_styles[] = (int) $style_row['style_id'];
+ }
+ }
+
+ // Remove old styles tables
+ $changes = array(
+ 'drop_columns' => array(
+ STYLES_TABLE => array(
+ 'imageset_id',
+ 'template_id',
+ 'theme_id',
+ ),
+ ),
+
+ 'drop_tables' => array(
+ STYLES_IMAGESET_TABLE,
+ STYLES_IMAGESET_DATA_TABLE,
+ STYLES_TEMPLATE_TABLE,
+ STYLES_TEMPLATE_DATA_TABLE,
+ STYLES_THEME_TABLE,
+ )
+ );
+ $statements = $db_tools->perform_schema_changes($changes);
+
+ foreach ($statements as $sql)
+ {
+ _sql($sql, $errored, $error_ary);
+ }
+
+ // Remove old entries from styles table
+ if (!sizeof($valid_styles))
+ {
+ // No valid styles: remove everything and add prosilver
+ _sql('DELETE FROM ' . STYLES_TABLE, $errored, $error_ary);
+
+ $sql = 'INSERT INTO ' . STYLES_TABLE . " (style_name, style_copyright, style_active, style_path, bbcode_bitfield, style_parent_id, style_parent_tree) VALUES ('prosilver', '&copy; phpBB Group', 1, 'prosilver', 'kNg=', 0, '')";
+ _sql($sql, $errored, $error_ary);
+
+ $sql = 'SELECT style_id
+ FROM ' . $table . "
+ WHERE style_name = 'prosilver'";
+ $result = _sql($sql, $errored, $error_ary);
+ $default_style = $db->sql_fetchfield($result);
+ $db->sql_freeresult($result);
+
+ set_config('default_style', $default_style);
+
+ $sql = 'UPDATE ' . USERS_TABLE . ' SET user_style = 0';
+ _sql($sql, $errored, $error_ary);
+ }
+ else
+ {
+ // There are valid styles in styles table. Remove styles that are outdated
+ _sql('DELETE FROM ' . STYLES_TABLE . ' WHERE ' . $db->sql_in_set('style_id', $valid_styles, true), $errored, $error_ary);
+
+ // Change default style
+ if (!in_array($config['default_style'], $valid_styles))
+ {
+ set_config('default_style', $valid_styles[0]);
+ }
+
+ // Reset styles for users
+ _sql('UPDATE ' . USERS_TABLE . ' SET user_style = 0 WHERE ' . $db->sql_in_set('user_style', $valid_styles, true), $errored, $error_ary);
+ }
+ }
+
$no_updates = false;
+ if (!isset($config['assets_version']))
+ {
+ $config->set('assets_version', '1');
+ }
+
break;
}
}
diff --git a/phpBB/install/index.php b/phpBB/install/index.php
index bb10521bba..f992b67bb7 100644
--- a/phpBB/install/index.php
+++ b/phpBB/install/index.php
@@ -202,7 +202,7 @@ $config = new phpbb_config(array(
$phpbb_style_resource_locator = new phpbb_style_resource_locator();
$phpbb_style_path_provider = new phpbb_style_path_provider();
-$template = new phpbb_style_template($phpbb_root_path, $phpEx, $config, $user, $phpbb_style_resource_locator, $phpbb_style_path_provider);
+$template = new phpbb_template($phpbb_root_path, $phpEx, $config, $user, $phpbb_style_resource_locator);
$phpbb_style = new phpbb_style($phpbb_root_path, $phpEx, $config, $user, $phpbb_style_resource_locator, $phpbb_style_path_provider, $template);
$phpbb_style->set_ext_dir_prefix('adm/');
$phpbb_style->set_custom_style('admin', '../adm/style', '');
diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php
index 7558fde944..9b27a268f5 100644
--- a/phpBB/install/install_install.php
+++ b/phpBB/install/install_install.php
@@ -128,7 +128,7 @@ class install_install extends module
'BODY' => $lang['REQUIREMENTS_EXPLAIN'],
));
- $passed = array('php' => false, 'db' => false, 'files' => false, 'pcre' => false, 'imagesize' => false,);
+ $passed = array('php' => false, 'db' => false, 'files' => false, 'pcre' => false, 'imagesize' => false, 'json' => false,);
// Test for basic PHP settings
$template->assign_block_vars('checks', array(
@@ -165,25 +165,28 @@ class install_install extends module
'S_LEGEND' => false,
));
- // Check for register_globals being enabled
- if (@ini_get('register_globals') == '1' || strtolower(@ini_get('register_globals')) == 'on')
+ // Don't check for register_globals on 5.4+
+ if (version_compare($php_version, '5.4.0-dev') < 0)
{
- $result = '<strong style="color:red">' . $lang['NO'] . '</strong>';
- }
- else
- {
- $result = '<strong style="color:green">' . $lang['YES'] . '</strong>';
- }
-
- $template->assign_block_vars('checks', array(
- 'TITLE' => $lang['PHP_REGISTER_GLOBALS'],
- 'TITLE_EXPLAIN' => $lang['PHP_REGISTER_GLOBALS_EXPLAIN'],
- 'RESULT' => $result,
+ // Check for register_globals being enabled
+ if (@ini_get('register_globals') == '1' || strtolower(@ini_get('register_globals')) == 'on')
+ {
+ $result = '<strong style="color:red">' . $lang['NO'] . '</strong>';
+ }
+ else
+ {
+ $result = '<strong style="color:green">' . $lang['YES'] . '</strong>';
+ }
- 'S_EXPLAIN' => true,
- 'S_LEGEND' => false,
- ));
+ $template->assign_block_vars('checks', array(
+ 'TITLE' => $lang['PHP_REGISTER_GLOBALS'],
+ 'TITLE_EXPLAIN' => $lang['PHP_REGISTER_GLOBALS_EXPLAIN'],
+ 'RESULT' => $result,
+ 'S_EXPLAIN' => true,
+ 'S_LEGEND' => false,
+ ));
+ }
// Check for url_fopen
if (@ini_get('allow_url_fopen') == '1' || strtolower(@ini_get('allow_url_fopen')) == 'on')
@@ -244,6 +247,26 @@ class install_install extends module
'S_EXPLAIN' => true,
'S_LEGEND' => false,
));
+
+ // Check for php json support
+ if (@extension_loaded('json'))
+ {
+ $passed['json'] = true;
+ $result = '<strong style="color:green">' . $lang['YES'] . '</strong>';
+ }
+ else
+ {
+ $result = '<strong style="color:red">' . $lang['NO'] . '</strong>';
+ }
+
+ $template->assign_block_vars('checks', array(
+ 'TITLE' => $lang['PHP_JSON_SUPPORT'],
+ 'TITLE_EXPLAIN' => $lang['PHP_JSON_SUPPORT_EXPLAIN'],
+ 'RESULT' => $result,
+
+ 'S_EXPLAIN' => true,
+ 'S_LEGEND' => false,
+ ));
/**
* Better not enabling and adding to the loaded extensions due to the specific requirements needed
diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql
index 43b09c97f7..ec162754cb 100644
--- a/phpBB/install/schemas/schema_data.sql
+++ b/phpBB/install/schemas/schema_data.sql
@@ -99,7 +99,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('email_package_size
INSERT INTO phpbb_config (config_name, config_value) VALUES ('enable_confirm', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('enable_pm_icons', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('enable_post_confirm', '1');
-INSERT INTO phpbb_config (config_name, config_value) VALUES ('feed_enable', '0');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('feed_enable', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('feed_http_auth', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('feed_limit_post', '15');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('feed_limit_topic', '10');
diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php
index 12f8edad9e..825ff51f4a 100644
--- a/phpBB/language/en/common.php
+++ b/phpBB/language/en/common.php
@@ -492,6 +492,7 @@ $lang = array_merge($lang, array(
'PRIVATE_MESSAGING' => 'Private messaging',
'PROFILE' => 'User Control Panel',
+ 'RANK' => 'Rank',
'READING_FORUM' => 'Viewing topics in %s',
'READING_GLOBAL_ANNOUNCE' => 'Reading global announcement',
'READING_LINK' => 'Following forum link %s',
diff --git a/phpBB/language/en/install.php b/phpBB/language/en/install.php
index ca6045a921..29664ae5f0 100644
--- a/phpBB/language/en/install.php
+++ b/phpBB/language/en/install.php
@@ -292,6 +292,8 @@ $lang = array_merge($lang, array(
'PCRE_UTF_SUPPORT_EXPLAIN' => 'phpBB will <strong>not</strong> run if your PHP installation is not compiled with UTF-8 support in the PCRE extension.',
'PHP_GETIMAGESIZE_SUPPORT' => 'PHP function getimagesize() is available',
'PHP_GETIMAGESIZE_SUPPORT_EXPLAIN' => '<strong>Required</strong> - In order for phpBB to function correctly, the getimagesize function needs to be available.',
+ 'PHP_JSON_SUPPORT' => 'PHP JSON support',
+ 'PHP_JSON_SUPPORT_EXPLAIN' => '<strong>Required</strong> - In order for phpBB to function correctly, the PHP JSON extension needs to be available.',
'PHP_OPTIONAL_MODULE' => 'Optional modules',
'PHP_OPTIONAL_MODULE_EXPLAIN' => '<strong>Optional</strong> - These modules or applications are optional. However, if they are available they will enable extra features.',
'PHP_SUPPORTED_DB' => 'Supported databases',
diff --git a/phpBB/language/en/memberlist.php b/phpBB/language/en/memberlist.php
index c3ab27871e..290f88a367 100644
--- a/phpBB/language/en/memberlist.php
+++ b/phpBB/language/en/memberlist.php
@@ -111,7 +111,6 @@ $lang = array_merge($lang, array(
'POST_IP' => 'Posted from IP/domain',
- 'RANK' => 'Rank',
'REAL_NAME' => 'Recipient name',
'RECIPIENT' => 'Recipient',
'REMOVE_FOE' => 'Remove foe',
diff --git a/phpBB/styles/prosilver/style.cfg b/phpBB/styles/prosilver/style.cfg
index a80f1ed537..633079e4a6 100644
--- a/phpBB/styles/prosilver/style.cfg
+++ b/phpBB/styles/prosilver/style.cfg
@@ -18,7 +18,8 @@
# General Information about this style
name = prosilver
copyright = &copy; phpBB Group, 2007
-version = 3.1.0-dev
+style_version = 3.1.0-dev
+phpbb_version = 3.1.0-dev
# Defining a different template bitfield
# template_bitfield = lNg=
diff --git a/phpBB/styles/prosilver/template/overall_footer.html b/phpBB/styles/prosilver/template/overall_footer.html
index d342b25a2a..2cb721073f 100644
--- a/phpBB/styles/prosilver/template/overall_footer.html
+++ b/phpBB/styles/prosilver/template/overall_footer.html
@@ -50,8 +50,8 @@
</div>
<script type="text/javascript" src="{T_JQUERY_LINK}"></script>
-<!-- IF S_JQUERY_FALLBACK --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.js" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF -->
-<script type="text/javascript" src="{T_ASSETS_PATH}/javascript/core.js"></script>
+<!-- IF S_JQUERY_FALLBACK --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.js?assets_version={T_ASSETS_VERSION}" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF -->
+<script type="text/javascript" src="{T_ASSETS_PATH}/javascript/core.js?assets_version={T_ASSETS_VERSION}"></script>
<!-- INCLUDEJS template/ajax.js -->
{SCRIPTS}
diff --git a/phpBB/styles/prosilver/template/overall_header.html b/phpBB/styles/prosilver/template/overall_header.html
index 53a633b326..349309ab4e 100644
--- a/phpBB/styles/prosilver/template/overall_header.html
+++ b/phpBB/styles/prosilver/template/overall_header.html
@@ -70,18 +70,18 @@
// ]]>
</script>
-<script type="text/javascript" src="{T_SUPER_TEMPLATE_PATH}/forum_fn.js"></script>
+<script type="text/javascript" src="{T_SUPER_TEMPLATE_PATH}/forum_fn.js?assets_version={T_ASSETS_VERSION}"></script>
-<link href="{T_THEME_PATH}/print.css" rel="stylesheet" type="text/css" media="print" title="printonly" />
+<link href="{T_THEME_PATH}/print.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet" type="text/css" media="print" title="printonly" />
<link href="{T_STYLESHEET_LINK}" rel="stylesheet" type="text/css" media="screen, projection" />
<link href="{T_STYLESHEET_LANG_LINK}" rel="stylesheet" type="text/css" media="screen, projection" />
<!-- IF S_CONTENT_DIRECTION eq 'rtl' -->
- <link href="{T_THEME_PATH}/bidi.css" rel="stylesheet" type="text/css" media="screen, projection" />
+ <link href="{T_THEME_PATH}/bidi.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet" type="text/css" media="screen, projection" />
<!-- ENDIF -->
<!--[if lte IE 8]>
- <link href="{T_THEME_PATH}/tweaks.css" rel="stylesheet" type="text/css" media="screen, projection" />
+ <link href="{T_THEME_PATH}/tweaks.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet" type="text/css" media="screen, projection" />
<![endif]-->
</head>
diff --git a/phpBB/styles/prosilver/template/posting_editor.html b/phpBB/styles/prosilver/template/posting_editor.html
index a5b41b6da4..60766495c6 100644
--- a/phpBB/styles/prosilver/template/posting_editor.html
+++ b/phpBB/styles/prosilver/template/posting_editor.html
@@ -37,10 +37,10 @@
<!-- ENDIF -->
<!-- IF not S_EDIT_POST -->
<dl class="pmlist">
- <dt><textarea id="username_list" name="username_list" class="inputbox" cols="50" rows="2"></textarea></dt>
+ <dt><textarea id="username_list" name="username_list" class="inputbox" cols="50" rows="2" tabindex="1"></textarea></dt>
<dd><span><a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a></span></dd>
- <dd><input type="submit" name="add_to" value="{L_ADD}" class="button2" /></dd>
- <dd><input type="submit" name="add_bcc" value="{L_ADD_BCC}" class="button2" /></dd>
+ <dd><input type="submit" name="add_to" value="{L_ADD}" class="button2" tabindex="1" /></dd>
+ <dd><input type="submit" name="add_bcc" value="{L_ADD_BCC}" class="button2" tabindex="1" /></dd>
</dl>
<!-- ENDIF -->
<!-- ELSE -->
@@ -87,8 +87,8 @@
<dl>
<dt><label for="icon">{L_ICON}:</label></dt>
<dd>
- <label for="icon"><input type="radio" name="icon" id="icon" value="0" checked="checked" /> <!-- IF S_SHOW_TOPIC_ICONS -->{L_NO_TOPIC_ICON}<!-- ELSE -->{L_NO_PM_ICON}<!-- ENDIF --></label>
- <!-- BEGIN topic_icon --><label for="icon-{topic_icon.ICON_ID}"><input type="radio" name="icon" id="icon-{topic_icon.ICON_ID}" value="{topic_icon.ICON_ID}" {topic_icon.S_ICON_CHECKED} /><img src="{topic_icon.ICON_IMG}" width="{topic_icon.ICON_WIDTH}" height="{topic_icon.ICON_HEIGHT}" alt="" title="" /></label> <!-- END topic_icon -->
+ <label for="icon"><input type="radio" name="icon" id="icon" value="0" checked="checked" tabindex="1" /> <!-- IF S_SHOW_TOPIC_ICONS -->{L_NO_TOPIC_ICON}<!-- ELSE -->{L_NO_PM_ICON}<!-- ENDIF --></label>
+ <!-- BEGIN topic_icon --><label for="icon-{topic_icon.ICON_ID}"><input type="radio" name="icon" id="icon-{topic_icon.ICON_ID}" value="{topic_icon.ICON_ID}" {topic_icon.S_ICON_CHECKED} tabindex="1" /><img src="{topic_icon.ICON_IMG}" width="{topic_icon.ICON_WIDTH}" height="{topic_icon.ICON_HEIGHT}" alt="" title="" /></label> <!-- END topic_icon -->
</dd>
</dl>
<!-- ENDIF -->
diff --git a/phpBB/styles/prosilver/template/simple_footer.html b/phpBB/styles/prosilver/template/simple_footer.html
index 64dd2ff96b..897e50ced7 100644
--- a/phpBB/styles/prosilver/template/simple_footer.html
+++ b/phpBB/styles/prosilver/template/simple_footer.html
@@ -7,7 +7,7 @@
</div>
<script type="text/javascript" src="{T_JQUERY_LINK}"></script>
-<!-- IF S_JQUERY_FALLBACK --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.js" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF -->
+<!-- IF S_JQUERY_FALLBACK --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.js?assets_version={T_ASSETS_VERSION}" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF -->
{SCRIPTS}
</body>
diff --git a/phpBB/styles/prosilver/template/simple_header.html b/phpBB/styles/prosilver/template/simple_header.html
index f0dcbed5a4..5440d66520 100644
--- a/phpBB/styles/prosilver/template/simple_header.html
+++ b/phpBB/styles/prosilver/template/simple_header.html
@@ -40,18 +40,18 @@
// ]]>
</script>
-<script type="text/javascript" src="{T_SUPER_TEMPLATE_PATH}/forum_fn.js"></script>
+<script type="text/javascript" src="{T_SUPER_TEMPLATE_PATH}/forum_fn.js?assets_version={T_ASSETS_VERSION}"></script>
-<link href="{T_THEME_PATH}/print.css" rel="stylesheet" type="text/css" media="print" title="printonly" />
+<link href="{T_THEME_PATH}/print.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet" type="text/css" media="print" title="printonly" />
<link href="{T_STYLESHEET_LINK}" rel="stylesheet" type="text/css" media="screen, projection" />
<link href="{T_STYLESHEET_LANG_LINK}" rel="stylesheet" type="text/css" media="screen, projection" />
<!-- IF S_CONTENT_DIRECTION eq 'rtl' -->
- <link href="{T_THEME_PATH}/bidi.css" rel="stylesheet" type="text/css" media="screen, projection" />
+ <link href="{T_THEME_PATH}/bidi.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet" type="text/css" media="screen, projection" />
<!-- ENDIF -->
<!--[if lte IE 8]>
- <link href="{T_THEME_PATH}/tweaks.css" rel="stylesheet" type="text/css" media="screen, projection" />
+ <link href="{T_THEME_PATH}/tweaks.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet" type="text/css" media="screen, projection" />
<![endif]-->
<!-- DEFINE $POPUP = 1 -->
diff --git a/phpBB/styles/prosilver/theme/stylesheet.css b/phpBB/styles/prosilver/theme/stylesheet.css
index f7b526780f..419de4e6ec 100644
--- a/phpBB/styles/prosilver/theme/stylesheet.css
+++ b/phpBB/styles/prosilver/theme/stylesheet.css
@@ -1,6 +1,6 @@
/* phpBB3 Style Sheet
--------------------------------------------------------------
- Style name: prosilver (the default phpBB 3.0.x style)
+ Style name: prosilver (the default phpBB 3.1.x style)
Based on style:
Original author: Tom Beddard ( http://www.subblue.com/ )
Modified by: phpBB Group ( http://www.phpbb.com/ )
diff --git a/phpBB/styles/subsilver2/style.cfg b/phpBB/styles/subsilver2/style.cfg
index 1a71e7254d..ca81337d17 100644
--- a/phpBB/styles/subsilver2/style.cfg
+++ b/phpBB/styles/subsilver2/style.cfg
@@ -18,7 +18,8 @@
# General Information about this style
name = subsilver2
copyright = &copy; 2005 phpBB Group
-version = 3.1.0-dev
+style_version = 3.1.0-dev
+phpbb_version = 3.1.0-dev
# Defining a different template bitfield
# template_bitfield = lNg=
diff --git a/phpBB/styles/subsilver2/template/overall_footer.html b/phpBB/styles/subsilver2/template/overall_footer.html
index 4f686cf5e4..24c6f8105c 100644
--- a/phpBB/styles/subsilver2/template/overall_footer.html
+++ b/phpBB/styles/subsilver2/template/overall_footer.html
@@ -9,7 +9,7 @@
</div>
<script type="text/javascript" src="{T_JQUERY_LINK}"></script>
-<!-- IF S_JQUERY_FALLBACK --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.js" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF -->
+<!-- IF S_JQUERY_FALLBACK --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.js?assets_version={T_ASSETS_VERSION}" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF -->
{SCRIPTS}
</body>
diff --git a/phpBB/styles/subsilver2/template/posting_body.html b/phpBB/styles/subsilver2/template/posting_body.html
index 0b44446abd..712c02b856 100644
--- a/phpBB/styles/subsilver2/template/posting_body.html
+++ b/phpBB/styles/subsilver2/template/posting_body.html
@@ -127,7 +127,7 @@
<td class="row2">
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
- <td><input type="radio" class="radio" name="icon" value="0"{S_NO_ICON_CHECKED} /><span class="genmed"><!-- IF S_SHOW_TOPIC_ICONS -->{L_NO_TOPIC_ICON}<!-- ELSE -->{L_NO_PM_ICON}<!-- ENDIF --></span> <!-- BEGIN topic_icon --><span style="white-space: nowrap;"><input type="radio" class="radio" name="icon" value="{topic_icon.ICON_ID}"{topic_icon.S_ICON_CHECKED} /><img src="{topic_icon.ICON_IMG}" width="{topic_icon.ICON_WIDTH}" height="{topic_icon.ICON_HEIGHT}" alt="" title="" hspace="2" vspace="2" /></span> <!-- END topic_icon --></td>
+ <td><input type="radio" class="radio" name="icon" value="0"{S_NO_ICON_CHECKED} tabindex="1" /><span class="genmed"><!-- IF S_SHOW_TOPIC_ICONS -->{L_NO_TOPIC_ICON}<!-- ELSE -->{L_NO_PM_ICON}<!-- ENDIF --></span> <!-- BEGIN topic_icon --><span style="white-space: nowrap;"><input type="radio" class="radio" name="icon" value="{topic_icon.ICON_ID}"{topic_icon.S_ICON_CHECKED} tabindex="1" /><img src="{topic_icon.ICON_IMG}" width="{topic_icon.ICON_WIDTH}" height="{topic_icon.ICON_HEIGHT}" alt="" title="" hspace="2" vspace="2" /></span> <!-- END topic_icon --></td>
</tr>
</table>
</td>
diff --git a/phpBB/styles/subsilver2/template/simple_footer.html b/phpBB/styles/subsilver2/template/simple_footer.html
index 771765ee12..6082b71891 100644
--- a/phpBB/styles/subsilver2/template/simple_footer.html
+++ b/phpBB/styles/subsilver2/template/simple_footer.html
@@ -6,7 +6,7 @@
</div>
<script type="text/javascript" src="{T_JQUERY_LINK}"></script>
-<!-- IF S_JQUERY_FALLBACK --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.js" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF -->
+<!-- IF S_JQUERY_FALLBACK --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.js?assets_version={T_ASSETS_VERSION}" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF -->
{SCRIPTS}
</body>
diff --git a/phpBB/styles/subsilver2/template/ucp_header.html b/phpBB/styles/subsilver2/template/ucp_header.html
index ea64dcb299..1566a15929 100644
--- a/phpBB/styles/subsilver2/template/ucp_header.html
+++ b/phpBB/styles/subsilver2/template/ucp_header.html
@@ -26,7 +26,7 @@
<td class="row1"><b class="genmed">{L_USERNAMES}:</b></td>
</tr>
<tr>
- <td class="row2"><textarea name="username_list" rows="5" cols="22"></textarea><br />
+ <td class="row2"><textarea name="username_list" rows="5" cols="22" tabindex="1"></textarea><br />
[ <a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a> ]
</td>
</tr>
@@ -41,7 +41,7 @@
<!-- ENDIF -->
<!-- IF S_ALLOW_MASS_PM -->
<tr>
- <td class="row1"><div style="float: {S_CONTENT_FLOW_BEGIN};">&nbsp;<input class="post" type="submit" name="add_bcc" value="{L_ADD_BCC}" />&nbsp;</div><div style="float: {S_CONTENT_FLOW_END};">&nbsp;<input class="post" type="submit" name="add_to" value="{L_ADD_TO}" />&nbsp;</div></td>
+ <td class="row1"><div style="float: {S_CONTENT_FLOW_BEGIN};">&nbsp;<input class="post" type="submit" name="add_bcc" value="{L_ADD_BCC}" tabindex="1" />&nbsp;</div><div style="float: {S_CONTENT_FLOW_END};">&nbsp;<input class="post" type="submit" name="add_to" value="{L_ADD_TO}" tabindex="1" />&nbsp;</div></td>
</tr>
<!-- ENDIF -->
</table>
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php
index a43edee5da..1f167ed722 100644
--- a/phpBB/viewtopic.php
+++ b/phpBB/viewtopic.php
@@ -1629,7 +1629,8 @@ else
$all_marked_read = true;
}
-// If there are absolutely no more unread posts in this forum and unread posts shown, we can savely show the #unread link
+// If there are absolutely no more unread posts in this forum
+// and unread posts shown, we can safely show the #unread link
if ($all_marked_read)
{
if ($post_unread)