aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/adm/style/acp_prune_forums.html2
-rw-r--r--phpBB/docs/CHANGELOG.html5
-rw-r--r--phpBB/includes/acm/acm_file.php3
-rw-r--r--phpBB/includes/acp/acp_modules.php47
-rw-r--r--phpBB/includes/functions.php2
-rw-r--r--phpBB/includes/functions_display.php2
-rwxr-xr-xphpBB/install/install_install.php7
-rwxr-xr-xphpBB/language/en/install.php2
-rw-r--r--phpBB/styles/prosilver/template/mcp_topic.html3
-rw-r--r--phpBB/styles/prosilver/template/posting_editor.html2
-rw-r--r--phpBB/styles/subsilver2/template/mcp_topic.html2
-rw-r--r--phpBB/viewforum.php14
12 files changed, 49 insertions, 42 deletions
diff --git a/phpBB/adm/style/acp_prune_forums.html b/phpBB/adm/style/acp_prune_forums.html
index ad8d987a02..5629c11ff7 100644
--- a/phpBB/adm/style/acp_prune_forums.html
+++ b/phpBB/adm/style/acp_prune_forums.html
@@ -44,7 +44,7 @@
<p>{L_LOOK_UP_FORUMS_EXPLAIN}</p>
<dl>
<dt><label for="forum">{L_LOOK_UP_FORUM}:</label></dt>
- <dd><select name="f[]" multiple="multiple" size="5">{S_FORUM_OPTIONS}</select></dd>
+ <dd><select name="f[]" multiple="multiple" size="10">{S_FORUM_OPTIONS}</select></dd>
<dd><label><input type="checkbox" class="radio" name="all_forums" value="1" /> {L_ALL_FORUMS}</label></dd>
</dl>
diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html
index ca61379360..8c5dc27af9 100644
--- a/phpBB/docs/CHANGELOG.html
+++ b/phpBB/docs/CHANGELOG.html
@@ -206,7 +206,10 @@ p a {
<li>[Fix] Enforce the max password length for automatically generated password created by the password sender (Bug #13181)</li>
<li>[Fix] Handle phpinfo() when expose_php is false (Bug #12777)</li>
<li>[Fix] Allow managing of forum roles without global users (Bug #13249)</li>
-
+ <li>[Change] Do not run cron script if board is disabled</li>
+ <li>[Fix] Correctly destroy sql cache for some query combinations (Bug #13237)</li>
+ <li>[Fix] Allow link forums being password protected (Bug #12967)</li>
+ <li>[Fix] Allow wrapping topic/post icons in posting editor (Bug #12843)</li>
</ul>
diff --git a/phpBB/includes/acm/acm_file.php b/phpBB/includes/acm/acm_file.php
index 64a85db0b0..a1734c1c55 100644
--- a/phpBB/includes/acm/acm_file.php
+++ b/phpBB/includes/acm/acm_file.php
@@ -269,7 +269,8 @@ class acm
$found = false;
foreach ($table as $check_table)
{
- if (strpos($check_line, $check_table . ' ') !== false)
+ // Better catch partial table names than no table names. ;)
+ if (strpos($check_line, $check_table) !== false)
{
$found = true;
break;
diff --git a/phpBB/includes/acp/acp_modules.php b/phpBB/includes/acp/acp_modules.php
index 8f4b702d72..3daf5273cb 100644
--- a/phpBB/includes/acp/acp_modules.php
+++ b/phpBB/includes/acp/acp_modules.php
@@ -740,7 +740,7 @@ class acp_modules
$sql = 'SELECT left_id, right_id
FROM ' . MODULES_TABLE . "
WHERE module_class = '" . $db->sql_escape($module_data['module_class']) . "'
- AND module_id = {$module_data['parent_id']}";
+ AND module_id = " . (int) $module_data['parent_id'];
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
@@ -823,7 +823,7 @@ class acp_modules
$sql = 'UPDATE ' . MODULES_TABLE . '
SET ' . $db->sql_build_array('UPDATE', $update_ary) . "
WHERE module_class = '" . $db->sql_escape($module_data['module_class']) . "'
- AND module_id = {$module_data['module_id']}";
+ AND module_id = " . (int) $module_data['module_id'];
$db->sql_query($sql);
if (!$run_inline)
@@ -856,15 +856,15 @@ class acp_modules
$sql = 'UPDATE ' . MODULES_TABLE . "
SET right_id = right_id - $diff
WHERE module_class = '" . $db->sql_escape($this->module_class) . "'
- AND left_id < " . $from_data['right_id'] . "
- AND right_id > " . $from_data['right_id'];
+ AND left_id < " . (int) $from_data['right_id'] . '
+ AND right_id > ' . (int) $from_data['right_id'];
$db->sql_query($sql);
// Resync righthand side of tree
$sql = 'UPDATE ' . MODULES_TABLE . "
SET left_id = left_id - $diff, right_id = right_id - $diff
WHERE module_class = '" . $db->sql_escape($this->module_class) . "'
- AND left_id > " . $from_data['right_id'];
+ AND left_id > " . (int) $from_data['right_id'];
$db->sql_query($sql);
if ($to_parent_id > 0)
@@ -875,7 +875,7 @@ class acp_modules
$sql = 'UPDATE ' . MODULES_TABLE . "
SET right_id = right_id + $diff
WHERE module_class = '" . $db->sql_escape($this->module_class) . "'
- AND " . $to_data['right_id'] . ' BETWEEN left_id AND right_id
+ AND " . (int) $to_data['right_id'] . ' BETWEEN left_id AND right_id
AND ' . $db->sql_in_set('module_id', $moved_ids, true);
$db->sql_query($sql);
@@ -883,7 +883,7 @@ class acp_modules
$sql = 'UPDATE ' . MODULES_TABLE . "
SET left_id = left_id + $diff, right_id = right_id + $diff
WHERE module_class = '" . $db->sql_escape($this->module_class) . "'
- AND left_id > " . $to_data['right_id'] . '
+ AND left_id > " . (int) $to_data['right_id'] . '
AND ' . $db->sql_in_set('module_id', $moved_ids, true);
$db->sql_query($sql);
@@ -908,7 +908,7 @@ class acp_modules
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
- $diff = '+ ' . ($row['right_id'] - $from_data['left_id'] + 1);
+ $diff = '+ ' . (int) ($row['right_id'] - $from_data['left_id'] + 1);
}
$sql = 'UPDATE ' . MODULES_TABLE . "
@@ -941,6 +941,9 @@ class acp_modules
AND module_id = $module_id";
$db->sql_query($sql);
+ $row['right_id'] = (int) $row['right_id'];
+ $row['left_id'] = (int) $row['left_id'];
+
// Resync tree
$sql = 'UPDATE ' . MODULES_TABLE . "
SET right_id = right_id - $diff
@@ -976,8 +979,8 @@ class acp_modules
$sql = 'SELECT module_id, left_id, right_id, module_langname
FROM ' . MODULES_TABLE . "
WHERE module_class = '" . $db->sql_escape($this->module_class) . "'
- AND parent_id = {$module_row['parent_id']}
- AND " . (($action == 'move_up') ? "right_id < {$module_row['right_id']} ORDER BY right_id DESC" : "left_id > {$module_row['left_id']} ORDER BY left_id ASC");
+ AND parent_id = " . (int) $module_row['parent_id'] . '
+ AND ' . (($action == 'move_up') ? 'right_id < ' . (int) $module_row['right_id'] . ' ORDER BY right_id DESC' : 'left_id > ' . (int) $module_row['left_id'] . ' ORDER BY left_id ASC');
$result = $db->sql_query_limit($sql, $steps);
$target = array();
@@ -1002,25 +1005,25 @@ class acp_modules
*/
if ($action == 'move_up')
{
- $left_id = $target['left_id'];
- $right_id = $module_row['right_id'];
+ $left_id = (int) $target['left_id'];
+ $right_id = (int) $module_row['right_id'];
- $diff_up = $module_row['left_id'] - $target['left_id'];
- $diff_down = $module_row['right_id'] + 1 - $module_row['left_id'];
+ $diff_up = (int) ($module_row['left_id'] - $target['left_id']);
+ $diff_down = (int) ($module_row['right_id'] + 1 - $module_row['left_id']);
- $move_up_left = $module_row['left_id'];
- $move_up_right = $module_row['right_id'];
+ $move_up_left = (int) $module_row['left_id'];
+ $move_up_right = (int) $module_row['right_id'];
}
else
{
- $left_id = $module_row['left_id'];
- $right_id = $target['right_id'];
+ $left_id = (int) $module_row['left_id'];
+ $right_id = (int) $target['right_id'];
- $diff_up = $module_row['right_id'] + 1 - $module_row['left_id'];
- $diff_down = $target['right_id'] - $module_row['right_id'];
+ $diff_up = (int) ($module_row['right_id'] + 1 - $module_row['left_id']);
+ $diff_down = (int) ($target['right_id'] - $module_row['right_id']);
- $move_up_left = $module_row['right_id'] + 1;
- $move_up_right = $target['right_id'];
+ $move_up_left = (int) ($module_row['right_id'] + 1);
+ $move_up_right = (int) $target['right_id'];
}
// Now do the dirty job
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index d4947a9ca0..5918b441d0 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -4298,7 +4298,7 @@ function page_footer($run_cron = true)
);
// Call cron-type script
- if (!defined('IN_CRON') && $run_cron)
+ if (!defined('IN_CRON') && $run_cron && !$config['board_disable'])
{
$cron_type = '';
diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php
index 92e636af01..626e1d6dd9 100644
--- a/phpBB/includes/functions_display.php
+++ b/phpBB/includes/functions_display.php
@@ -401,7 +401,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
'L_FORUM_FOLDER_ALT' => $folder_alt,
'L_MODERATOR_STR' => $l_moderator,
- 'U_VIEWFORUM' => ($row['forum_type'] != FORUM_LINK || ($row['forum_flags'] & FORUM_FLAG_LINK_TRACK)) ? append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $row['forum_id']) : $row['forum_link'],
+ 'U_VIEWFORUM' => ($row['forum_type'] != FORUM_LINK || ($row['forum_flags'] & FORUM_FLAG_LINK_TRACK) || $row['forum_password']) ? append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $row['forum_id']) : $row['forum_link'],
'U_LAST_POSTER' => get_username_string('profile', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']),
'U_LAST_POST' => $last_post_url)
);
diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php
index 9c34e4a053..621c91f8cc 100755
--- a/phpBB/install/install_install.php
+++ b/phpBB/install/install_install.php
@@ -1555,10 +1555,11 @@ class install_install extends module
{
continue;
}
+
$module_data = array(
'module_basename' => $module_basename,
'module_enabled' => 1,
- 'module_display' => (isset($row['display'])) ? $row['display'] : 1,
+ 'module_display' => (isset($row['display'])) ? (int) $row['display'] : 1,
'parent_id' => (int) $categories[$cat_name]['id'],
'module_class' => $module_class,
'module_langname' => $row['title'],
@@ -1660,8 +1661,8 @@ class install_install extends module
$module_data = array(
'module_basename' => $row['module_basename'],
- 'module_enabled' => $row['module_enabled'],
- 'module_display' => $row['module_display'],
+ 'module_enabled' => (int) $row['module_enabled'],
+ 'module_display' => (int) $row['module_display'],
'parent_id' => (int) $row2['module_id'],
'module_class' => $row['module_class'],
'module_langname' => $row['module_langname'],
diff --git a/phpBB/language/en/install.php b/phpBB/language/en/install.php
index b946de5d1a..021bc7f2c9 100755
--- a/phpBB/language/en/install.php
+++ b/phpBB/language/en/install.php
@@ -446,7 +446,7 @@ $lang = array_merge($lang, array(
'OLD_UPDATE_FILES' => 'Update files are out of date. The update files found are for updating from phpBB %1$s to phpBB %2$s but the latest version of phpBB is %3$s.',
'PERFORM_DATABASE_UPDATE' => 'Perform database update',
- 'PERFORM_DATABASE_UPDATE_EXPLAIN' => 'Below you will find a button to the database update script. The database update can take a while, so please do not stop the execution if it seems to hang. After the database update had been performed just follow the instructions to continue the update process.',
+ 'PERFORM_DATABASE_UPDATE_EXPLAIN' => 'Below you will find a button to the database update script. The database update can take a while, so please do not stop the execution if it seems to hang. After the database update has been performed just follow the instructions to continue the update process.',
'PREVIOUS_VERSION' => 'Previous version',
'PROGRESS' => 'Progress',
diff --git a/phpBB/styles/prosilver/template/mcp_topic.html b/phpBB/styles/prosilver/template/mcp_topic.html
index 52d815eb8e..4b61c469c8 100644
--- a/phpBB/styles/prosilver/template/mcp_topic.html
+++ b/phpBB/styles/prosilver/template/mcp_topic.html
@@ -60,8 +60,7 @@ onload_functions.push('subPanels()');
<dl>
<dt><label for="icon">{L_TOPIC_ICON}:</label></dt>
<dd><label for="icon"><input type="radio" name="icon" id="icon" value="0" checked="checked" /> {L_NO_TOPIC_ICON}</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 --></dd>
+ <!-- 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 --></dd>
</dl>
<!-- ENDIF -->
diff --git a/phpBB/styles/prosilver/template/posting_editor.html b/phpBB/styles/prosilver/template/posting_editor.html
index affefee8d3..27b435f6ea 100644
--- a/phpBB/styles/prosilver/template/posting_editor.html
+++ b/phpBB/styles/prosilver/template/posting_editor.html
@@ -78,7 +78,7 @@
<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 -->
+ <!-- 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 -->
</dd>
</dl>
<!-- ENDIF -->
diff --git a/phpBB/styles/subsilver2/template/mcp_topic.html b/phpBB/styles/subsilver2/template/mcp_topic.html
index 5cf4ac5ca6..9bcd302c9b 100644
--- a/phpBB/styles/subsilver2/template/mcp_topic.html
+++ b/phpBB/styles/subsilver2/template/mcp_topic.html
@@ -25,7 +25,7 @@
<td class="row2" colspan="2">
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
- <td><span class="genmed nowrap"><input type="radio" class="radio" name="icon" value="0"<!-- IF not S_TOPIC_ICON --> checked="checked"<!-- ENDIF --> />{L_NO_TOPIC_ICON}</span> <!-- BEGIN topic_icon --><span class="nowrap"><input type="radio" class="radio" name="icon" value="{topic_icon.ICON_ID}"<!-- IF topic_icon.S_CHECKED --> checked="checked"<!-- ENDIF --> /><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><span class="genmed nowrap"><input type="radio" class="radio" name="icon" value="0"<!-- IF not S_TOPIC_ICON --> checked="checked"<!-- ENDIF --> />{L_NO_TOPIC_ICON}</span> <!-- BEGIN topic_icon --><span class="nowrap"><input type="radio" class="radio" name="icon" value="{topic_icon.ICON_ID}"<!-- IF topic_icon.S_CHECKED --> checked="checked"<!-- ENDIF --> /><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/viewforum.php b/phpBB/viewforum.php
index 9709b85752..e2fbc1db40 100644
--- a/phpBB/viewforum.php
+++ b/phpBB/viewforum.php
@@ -87,6 +87,13 @@ if (!$auth->acl_gets('f_list', 'f_read', $forum_id))
login_box('', $user->lang['LOGIN_VIEWFORUM']);
}
+// Forum is passworded ... check whether access has been granted to this
+// user this session, if not show login box
+if ($forum_data['forum_password'])
+{
+ login_forum_box($forum_data);
+}
+
// Is this forum a link? ... User got here either because the
// number of clicks is being tracked or they guessed the id
if ($forum_data['forum_type'] == FORUM_LINK && $forum_data['forum_link'])
@@ -103,13 +110,6 @@ if ($forum_data['forum_type'] == FORUM_LINK && $forum_data['forum_link'])
redirect($forum_data['forum_link']);
}
-// Forum is passworded ... check whether access has been granted to this
-// user this session, if not show login box
-if ($forum_data['forum_password'])
-{
- login_forum_box($forum_data);
-}
-
// Build navigation links
generate_forum_nav($forum_data);