mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-06 16:56:44 +02:00
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
This commit is contained in:
@@ -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];
|
||||
|
@@ -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)
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user