summaryrefslogtreecommitdiffstats
path: root/settings/admin.php
diff options
context:
space:
mode:
authorMorris Jobke <morris.jobke@gmail.com>2014-06-03 12:02:23 +0200
committerMorris Jobke <morris.jobke@gmail.com>2014-06-03 12:02:23 +0200
commit25c676f203b7716b6ddd33b68a287939a1a7ef55 (patch)
tree3e759580b44cfbfb30b95a84195fb3faaa7e026b /settings/admin.php
parentf88482355f01209d6f0d2cc553f9d1822dc35c58 (diff)
downloadnextcloud-server-25c676f203b7716b6ddd33b68a287939a1a7ef55.tar.gz
nextcloud-server-25c676f203b7716b6ddd33b68a287939a1a7ef55.zip
simplify SQLite warning
Diffstat (limited to 'settings/admin.php')
-rwxr-xr-xsettings/admin.php22
1 files changed, 1 insertions, 21 deletions
diff --git a/settings/admin.php b/settings/admin.php
index c26475c3c54..fc76d3d74ab 100755
--- a/settings/admin.php
+++ b/settings/admin.php
@@ -89,27 +89,7 @@ foreach($forms as $form) {
$tmpl->append('forms', $form);
}
-$databaseOverload = false;
-if(strpos(\OCP\Config::getSystemValue('dbtype'), 'sqlite') !== false){
- // > 5 users
- $userCount = 0;
- foreach (\OC::$server->getUserManager()->countUsers() as $classname => $count) {
- $userCount += $count;
- }
- if($userCount >= 5){
- $databaseOverload = true;
- }
-
- // OR > 1000 files
- $sql = 'SELECT COUNT(*) FROM *PREFIX*filecache;';
- $query = \OCP\DB::prepare($sql);
- $row = $query->execute()->fetchRow();
- $fileCount = $row['COUNT(*)'];
-
- if($fileCount >= 1000){
- $databaseOverload = true;
- }
-}
+$databaseOverload = (strpos(\OCP\Config::getSystemValue('dbtype'), 'sqlite') !== false);
$tmpl->assign('databaseOverload', $databaseOverload);
$tmpl->printPage();