From 25c676f203b7716b6ddd33b68a287939a1a7ef55 Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Tue, 3 Jun 2014 12:02:23 +0200 Subject: [PATCH] simplify SQLite warning --- settings/admin.php | 22 +--------------------- settings/templates/admin.php | 8 ++++---- 2 files changed, 5 insertions(+), 25 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(); diff --git a/settings/templates/admin.php b/settings/templates/admin.php index ad4b7a77626..c8ca031ec98 100644 --- a/settings/templates/admin.php +++ b/settings/templates/admin.php @@ -102,11 +102,11 @@ if (!$_['isAnnotationsWorking']) { if ($_['databaseOverload']) { ?>
-

t('Database Performance Warning'));?>

+

t('Database Performance Info'));?>

- - t('SQLite will be used as database. For larger installations we recommend to change this.')); ?> - +

+ t('SQLite is used as database. For larger installations we recommend to change this. To migrate to another database use the command line tool: \'occ db:convert-type\'')); ?> +