aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/includes/functions.php22
-rw-r--r--phpBB/includes/mcp/mcp_front.php8
-rwxr-xr-xphpBB/includes/mcp/mcp_reports.php2
-rw-r--r--phpBB/install/database_update.php2
-rw-r--r--phpBB/install/install_convert.php2
-rwxr-xr-xphpBB/language/en/install.php12
-rw-r--r--phpBB/styles/subsilver2/template/ucp_footer.html2
7 files changed, 23 insertions, 27 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 80a6faceca..5ef95761e0 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -89,7 +89,8 @@ function request_var($var_name, $default, $multibyte = false, $cookie = false)
if ($type == 'array')
{
reset($default);
- list($sub_key_type, $sub_type) = each(current($default));
+ $default = current($default);
+ list($sub_key_type, $sub_type) = each($default);
$sub_type = gettype($sub_type);
$sub_type = ($sub_type == 'array') ? 'NULL' : $sub_type;
$sub_key_type = gettype($sub_key_type);
@@ -269,23 +270,12 @@ function phpbb_hash($password)
$random = '';
$count = 6;
- if (($fh = @fopen('/dev/urandom', 'rb')))
+ for ($i = 0; $i < $count; $i += 16)
{
- $random = fread($fh, $count);
- fclose($fh);
- }
-
- if (strlen($random) < $count)
- {
- $random = '';
-
- for ($i = 0; $i < $count; $i += 16)
- {
- $random_state = md5(unique_id() . $random_state);
- $random .= pack('H*', md5($random_state));
- }
- $random = substr($random, 0, $count);
+ $random_state = md5(unique_id() . $random_state);
+ $random .= pack('H*', md5($random_state));
}
+ $random = substr($random, 0, $count);
$hash = _hash_crypt_private($password, _hash_gensalt_private($random, $itoa64), $itoa64);
diff --git a/phpBB/includes/mcp/mcp_front.php b/phpBB/includes/mcp/mcp_front.php
index d67a51cd89..707fe22685 100644
--- a/phpBB/includes/mcp/mcp_front.php
+++ b/phpBB/includes/mcp/mcp_front.php
@@ -73,6 +73,14 @@ function mcp_front_view($id, $mode, $action)
}
$db->sql_freeresult($result);
+ if (empty($post_list))
+ {
+ $total = 0;
+ }
+ }
+
+ if ($total)
+ {
$sql = 'SELECT p.post_id, p.post_subject, p.post_time, p.poster_id, p.post_username, u.username, u.username_clean, t.topic_id, t.topic_title, t.topic_first_post_id, p.forum_id
FROM ' . POSTS_TABLE . ' p, ' . TOPICS_TABLE . ' t, ' . USERS_TABLE . ' u
WHERE ' . $db->sql_in_set('p.post_id', $post_list) . '
diff --git a/phpBB/includes/mcp/mcp_reports.php b/phpBB/includes/mcp/mcp_reports.php
index 0faa1dc8b7..37ea7e5132 100755
--- a/phpBB/includes/mcp/mcp_reports.php
+++ b/phpBB/includes/mcp/mcp_reports.php
@@ -599,7 +599,7 @@ function close_report($report_id_list, $mode, $action)
}
}
- foreach($post_info as $post)
+ foreach ($post_info as $post)
{
$forum_ids[$post['forum_id']] = $post['forum_id'];
$topic_ids[$post['topic_id']] = $post['topic_id'];
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php
index 4c4c1eb690..3f39b7d494 100644
--- a/phpBB/install/database_update.php
+++ b/phpBB/install/database_update.php
@@ -1178,7 +1178,7 @@ if (version_compare($current_version, '3.0.RC2', '<='))
}
$db->sql_freeresult($result);
- foreach($smileys as $id => $code)
+ foreach ($smileys as $id => $code)
{
// 2.0 only entitized lt and gt; We need to do something about double quotes.
if (strchr($code, '"') === false)
diff --git a/phpBB/install/install_convert.php b/phpBB/install/install_convert.php
index 2496018f8e..d1e36ec4a4 100644
--- a/phpBB/install/install_convert.php
+++ b/phpBB/install/install_convert.php
@@ -1177,7 +1177,7 @@ class install_convert extends module
if (!empty($schema['group_by']))
{
$schema['group_by'] = array($schema['group_by']);
- foreach($sql_data['select_fields'] as $select)
+ foreach ($sql_data['select_fields'] as $select)
{
$alias = strpos(strtolower($select), ' as ');
$select = ($alias) ? substr($select, 0, $alias) : $select;
diff --git a/phpBB/language/en/install.php b/phpBB/language/en/install.php
index 55ed3eaa88..de39cf0961 100755
--- a/phpBB/language/en/install.php
+++ b/phpBB/language/en/install.php
@@ -190,8 +190,8 @@ $lang = array_merge($lang, array(
<h2>Go live with your phpBB3!</h2>
<p>Clicking the button below will take you to your Administration Control Panel (ACP). Take some time to examine the options available to you. Remember that help is available online via the <a href="http://www.phpbb.com/support/documentation/3.0/">Documentation</a> and the <a href="http://www.phpbb.com/community/viewforum.php?f=46">support forums</a>, see the <a href="%3$s">README</a> for further information.</p><p><strong>Please now delete, move or rename the install directory before you use your board. If this directory is still present, only the Administration Control Panel (ACP) will be accessible.</strong></p>',
'INSTALL_INTRO' => 'Welcome to Installation',
-// TODO: write some more introductions here
- 'INSTALL_INTRO_BODY' => 'With this option, it is possible to install phpBB onto your server.</p><p>In order to proceed, you will need your database settings. If you do not know your database settings, please contact your host and ask for them. You will not be able to continue without them. You need:</p>
+
+ 'INSTALL_INTRO_BODY' => 'With this option, it is possible to install phpBB3 onto your server.</p><p>In order to proceed, you will need your database settings. If you do not know your database settings, please contact your host and ask for them. You will not be able to continue without them. You need:</p>
<ul>
<li>The Database Type - the database you will be using.</li>
@@ -277,9 +277,9 @@ $lang = array_merge($lang, array(
'NO_CONVERT_SPECIFIED' => 'No convertor specified.',
'NO_LOCATION' => 'Cannot determine location. If you know Imagemagick is installed, you may specify the location later within your administration control panel',
'NO_TABLES_FOUND' => 'No tables found.',
-// TODO: Write some explanatory introduction text
- 'OVERVIEW_BODY' => 'Welcome to our public release candidate of the next-generation of phpBB after 2.0.x, phpBB 3.0! This release is intended for wider scale use to help us identifying last bugs and problematic areas.</p><p>Please read <a href="../docs/INSTALL.html">our installation guide</a> for more information about installing phpBB3</p><p><strong style="text-transform: uppercase;">Note:</strong> This release is <strong style="text-transform: uppercase;">still not final</strong>. You may want to wait for the full final release before running it live.</p><p>This installation system will guide you through the process of installing phpBB, converting from a different software package or updating to the latest version of phpBB. For more information on each option, select it from the menu above.',
+ // TODO: write introduction...
+ 'OVERVIEW_BODY' => 'Introduction body missing...',
'PCRE_UTF_SUPPORT' => 'PCRE UTF-8 support',
'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.',
@@ -305,7 +305,6 @@ $lang = array_merge($lang, array(
'REFRESH_PAGE' => 'Refresh page to continue conversion',
'REFRESH_PAGE_EXPLAIN' => 'If set to yes, the convertor will refresh the page to continue the conversion after having finished a step. If this is your first conversion for testing purposes and to determine any errors in advance, we suggest to set this to No.',
-// 'REQUIRED' => 'Required',
'REQUIREMENTS_TITLE' => 'Installation compatibility',
'REQUIREMENTS_EXPLAIN' => 'Before proceeding with the full installation phpBB will carry out some tests on your server configuration and files to ensure that you are able to install and run phpBB. Please ensure you read through the results thoroughly and do not proceed until all the required tests are passed. If you wish to use any of the features depending on the optional tests, you should ensure that these tests are passed also.',
'RETRY_WRITE' => 'Retry writing config',
@@ -337,8 +336,7 @@ $lang = array_merge($lang, array(
'SUB_LICENSE' => 'License',
'SUB_SUPPORT' => 'Support',
'SUCCESSFUL_CONNECT' => 'Successful connection',
-// TODO: Write some text on obtaining support
- 'SUPPORT_BODY' => 'During the release candidate phase full support will be given at <a href="http://www.phpbb.com/community/viewforum.php?f=46">the phpBB 3.0.x support forums</a>. We will provide answers to general setup questions, configuration problems, conversion problems and support for determining common problems mostly related to bugs. We also allow discussions about modifications and custom code/style additions.</p><p>For additional assistance, please refer to our <a href="http://www.phpbb.com/support/documentation/3.0/quickstart/">Quick Start Guide</a> and <a href="http://www.phpbb.com/support/documentation/3.0/">the online documentation</a>.</p><p>To ensure you stay up to date with the latest news and releases, why not <a href="http://www.phpbb.com/support/">subscribe to our mailing list</a>?',
+ 'SUPPORT_BODY' => '</p><p>Full support will be provided in the <a href="http://www.phpbb.com/community/viewforum.php?f=46">phpBB 3.0.x Support Forums</a>.<br />We will be happy to assist you with:<ul><li>installation</li><li>configuration</li><li>technical questions</li><li>problems relating to potential bugs in the software</li><li>updating from release candidate versions to the latest stable version</li><li>converting from phpBB 2.0.x to phpBB3</li><li>converting from other discussion board software to phpBB3 (please see the <a href="http://www.phpbb.com/community/viewforum.php?f=65">Convertors Forum</a>)</li></ul>For issues relating to MODs, please post in the appropriate <a href="http://www.phpbb.com/community/viewforum.php?f=81">Modifications Forum</a>.<br />For issues relating to styles, imagesets and templates, please post in the appropriate <a href="http://www.phpbb.com/community/viewforum.php?f=80">Styles Forum</a>.</p><p>For additional assistance, please refer to our <a href="http://www.phpbb.com/support/documentation/3.0/quickstart/">Quick Start Guide</a> and <a href="http://www.phpbb.com/support/documentation/3.0/">the online documentation</a>.</p><p>To ensure you stay up to date with the latest news and releases, why not <a href="http://www.phpbb.com/support/">subscribe to our mailing list</a>?',
'SYNC_FORUMS' => 'Starting to synchronise forums',
'SYNC_POST_COUNT' => 'Synchronising post_counts',
'SYNC_POST_COUNT_ID' => 'Synchronising post_counts from <var>entry</var> %1$s to %2$s.',
diff --git a/phpBB/styles/subsilver2/template/ucp_footer.html b/phpBB/styles/subsilver2/template/ucp_footer.html
index 3d246644c2..1681fe3849 100644
--- a/phpBB/styles/subsilver2/template/ucp_footer.html
+++ b/phpBB/styles/subsilver2/template/ucp_footer.html
@@ -2,7 +2,7 @@
<!-- IF not S_PRIVMSGS or S_SHOW_DRAFTS --> {S_FORM_TOKEN}</form><!-- ENDIF --></td>
</tr>
</table>
-<!-- IF S_SHOW_PM_BOX and S_POST_ACTION or S_COMPOSE_PM -->{S_FORM_TOKEN}</form><!-- ENDIF -->
+<!-- IF (S_SHOW_PM_BOX or S_EDIT_POST) and S_POST_ACTION -->{S_FORM_TOKEN}</form><!-- ENDIF -->
<br clear="all" />