aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acp/acp_main.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2006-09-22 22:14:05 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2006-09-22 22:14:05 +0000
commit1d7e3e0fd95fb5baf92937d1f911649cb1a665e9 (patch)
treee452132555a321548f9c61043354a2bfb9481ca0 /phpBB/includes/acp/acp_main.php
parent587ec3fa77d90819148cdeda2b490bbf82632114 (diff)
downloadforums-1d7e3e0fd95fb5baf92937d1f911649cb1a665e9.tar
forums-1d7e3e0fd95fb5baf92937d1f911649cb1a665e9.tar.gz
forums-1d7e3e0fd95fb5baf92937d1f911649cb1a665e9.tar.bz2
forums-1d7e3e0fd95fb5baf92937d1f911649cb1a665e9.tar.xz
forums-1d7e3e0fd95fb5baf92937d1f911649cb1a665e9.zip
some tiny fixes here and there
git-svn-id: file:///svn/phpbb/trunk@6383 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/acp/acp_main.php')
-rw-r--r--phpBB/includes/acp/acp_main.php20
1 files changed, 14 insertions, 6 deletions
diff --git a/phpBB/includes/acp/acp_main.php b/phpBB/includes/acp/acp_main.php
index b1331fa1ae..b0c12c7928 100644
--- a/phpBB/includes/acp/acp_main.php
+++ b/phpBB/includes/acp/acp_main.php
@@ -406,12 +406,19 @@ class acp_main
$files_per_day = $total_files;
}
- $sql = 'SELECT COUNT(attach_id) AS total_orphan
- FROM ' . ATTACHMENTS_TABLE . '
- WHERE is_orphan = 1';
- $result = $db->sql_query($sql);
- $total_orphan = (int) $db->sql_fetchfield('total_orphan');
- $db->sql_freeresult($result);
+ if ($config['allow_attachments'] || $config['allow_pm_attach'])
+ {
+ $sql = 'SELECT COUNT(attach_id) AS total_orphan
+ FROM ' . ATTACHMENTS_TABLE . '
+ WHERE is_orphan = 1';
+ $result = $db->sql_query($sql);
+ $total_orphan = (int) $db->sql_fetchfield('total_orphan');
+ $db->sql_freeresult($result);
+ }
+ else
+ {
+ $total_orphan = false;
+ }
$dbsize = get_database_size();
$s_action_options = build_select(array('online' => 'RESET_ONLINE', 'date' => 'RESET_DATE', 'stats' => 'RESYNC_STATS', 'user' => 'RESYNC_POSTCOUNTS', 'db_track' => 'RESYNC_POST_MARKING'));
@@ -430,6 +437,7 @@ class acp_main
'DBSIZE' => $dbsize,
'UPLOAD_DIR_SIZE' => $upload_dir_size,
'TOTAL_ORPHAN' => $total_orphan,
+ 'S_TOTAL_ORPHAN' => ($total_orphan === false) ? false : true,
'GZIP_COMPRESSION' => ($config['gzip_compress']) ? $user->lang['ON'] : $user->lang['OFF'],
'DATABASE_INFO' => $db->sql_server_info(),