aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@phpbb.com>2009-06-08 22:33:30 +0000
committerAndreas Fischer <bantu@phpbb.com>2009-06-08 22:33:30 +0000
commit2af8393d0f5fa08b95df989ab879ce1b7d4cab21 (patch)
tree3ca91808ebbba185ce5f913b0952bdf93cf949b3 /phpBB
parent9f21f1ab5e2b70da18459ef26c14a2372bc0eb76 (diff)
downloadforums-2af8393d0f5fa08b95df989ab879ce1b7d4cab21.tar
forums-2af8393d0f5fa08b95df989ab879ce1b7d4cab21.tar.gz
forums-2af8393d0f5fa08b95df989ab879ce1b7d4cab21.tar.bz2
forums-2af8393d0f5fa08b95df989ab879ce1b7d4cab21.tar.xz
forums-2af8393d0f5fa08b95df989ab879ce1b7d4cab21.zip
Fix bug #45705 - Show error in the ACP when template folder is not readable.
Authorised by: acydburn git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9565 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/docs/CHANGELOG.html1
-rw-r--r--phpBB/includes/acp/acp_attachments.php2
-rw-r--r--phpBB/includes/acp/acp_styles.php5
-rw-r--r--phpBB/includes/functions_admin.php2
4 files changed, 8 insertions, 2 deletions
diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html
index 952304b836..1d3abd62bc 100644
--- a/phpBB/docs/CHANGELOG.html
+++ b/phpBB/docs/CHANGELOG.html
@@ -95,6 +95,7 @@
<li>[Fix] Correctly show private message history (Bug #46065 - Patch by bantu)
<li>[Fix] Various XHTML mistakes in prosilver and subsilver2. (Bugs #38555, #45505 - Patch by Raimon, #45785, #45865)</li>
<li>[Fix] Move post bump information markup to the template. (Bug #34295 - Patch by bantu)</li>
+ <li>[Fix] Show error in the ACP when template folder is not readable. (Bug #45705 - Patch by bantu)</li>
<li>[Change] Change the data format of the default file ACM to be more secure from tampering and have better performance.</li>
<li>[Change] Add index on log_time to the log table to prevent slowdown on boards with many log entries. (Bug #44665 - Patch by bantu)</li>
<li>[Feature] Backported 3.2 captcha plugins.</li>
diff --git a/phpBB/includes/acp/acp_attachments.php b/phpBB/includes/acp/acp_attachments.php
index ef20b48cec..de4092036e 100644
--- a/phpBB/includes/acp/acp_attachments.php
+++ b/phpBB/includes/acp/acp_attachments.php
@@ -694,7 +694,7 @@ class acp_attachments
$imglist = filelist($phpbb_root_path . $img_path);
- if (sizeof($imglist))
+ if (!empty($imglist['']))
{
$imglist = array_values($imglist);
$imglist = $imglist[0];
diff --git a/phpBB/includes/acp/acp_styles.php b/phpBB/includes/acp/acp_styles.php
index 184c40f218..48802c79df 100644
--- a/phpBB/includes/acp/acp_styles.php
+++ b/phpBB/includes/acp/acp_styles.php
@@ -827,6 +827,11 @@ parse_css_file = {PARSE_CSS_FILE}
unset($file_info);
}
+ if (empty($filelist['']))
+ {
+ trigger_error($user->lang['NO_TEMPLATE'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
// Now create the categories
$filelist_cats[''] = array();
foreach ($filelist as $pathfile => $file_ary)
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php
index 79282c0358..a1f34792e0 100644
--- a/phpBB/includes/functions_admin.php
+++ b/phpBB/includes/functions_admin.php
@@ -359,7 +359,7 @@ function get_forum_branch($forum_id, $type = 'all', $order = 'descending', $incl
*/
function filelist($rootdir, $dir = '', $type = 'gif|jpg|jpeg|png')
{
- $matches = array();
+ $matches = array($dir => array());
// Remove initial / if present
$rootdir = (substr($rootdir, 0, 1) == '/') ? substr($rootdir, 1) : $rootdir;