]> source.dussan.org Git - nextcloud-server.git/commitdiff
simplify SQLite warning
authorMorris Jobke <morris.jobke@gmail.com>
Tue, 3 Jun 2014 10:02:23 +0000 (12:02 +0200)
committerMorris Jobke <morris.jobke@gmail.com>
Tue, 3 Jun 2014 10:02:23 +0000 (12:02 +0200)
settings/admin.php
settings/templates/admin.php

index c26475c3c544a454954685bc236e6567372543e5..fc76d3d74aba74b0c79b55916f6834d4e57b2f9e 100755 (executable)
@@ -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();
index ad4b7a77626212d73f0624d8df88b036032c26d8..c8ca031ec986dd93d09db44c07c04706a3b4fec1 100644 (file)
@@ -102,11 +102,11 @@ if (!$_['isAnnotationsWorking']) {
 if ($_['databaseOverload']) {
        ?>
 <div class="section">
-       <h2><?php p($l->t('Database Performance Warning'));?></h2>
+       <h2><?php p($l->t('Database Performance Info'));?></h2>
 
-       <span class="securitywarning">
-               <?php p($l->t('SQLite will be used as database. For larger installations we recommend to change this.')); ?>
-       </span>
+       <p class="securitywarning">
+               <?php p($l->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\'')); ?>
+       </p>
 
 </div>
 <?php