A free, self-hostable news aggregator…
Fix MySQL create table feeds (#2047)
Alexandre Alapetitec8b54ae807f5
diff --git a/app/Controllers/userController.php b/app/Controllers/userController.phpindex 75a4303d6..2f066e25f 100644--- a/app/Controllers/userController.php+++ b/app/Controllers/userController.php@@ -166,7 +166,7 @@ class FreshRSS_user_Controller extends Minz_ActionController {$entryDAO = FreshRSS_Factory::createEntryDao($this->view->current_user);$this->view->nb_articles = $entryDAO->count();- $databaseDAO = FreshRSS_Factory::createDatabaseDAO();+ $databaseDAO = FreshRSS_Factory::createDatabaseDAO($this->view->current_user);$this->view->size_user = $databaseDAO->size();}}diff --git a/app/Models/EntryDAO.php b/app/Models/EntryDAO.phpindex a86de67d6..a01c2227b 100644--- a/app/Models/EntryDAO.php+++ b/app/Models/EntryDAO.php@@ -992,7 +992,7 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo implements FreshRSS_Searchable {$stm = $this->bd->prepare($sql);$stm->execute();$res = $stm->fetchAll(PDO::FETCH_COLUMN, 0);- return $res[0];+ return isset($res[0]) ? $res[0] : 0;}public function countNotRead($minPriority = null) {$sql = 'SELECT COUNT(e.id) AS count FROM `' . $this->prefix . 'entry` e';diff --git a/app/SQL/install.sql.mysql.php b/app/SQL/install.sql.mysql.phpindex eb454b1a3..222f7e8a7 100644--- a/app/SQL/install.sql.mysql.php+++ b/app/SQL/install.sql.mysql.php@@ -18,7 +18,7 @@ CREATE TABLE IF NOT EXISTS `%1$sfeed` (`website` VARCHAR(255) CHARACTER SET latin1,`description` TEXT,`lastUpdate` INT(11) DEFAULT 0, -- Until year 2038- `priority` TINYNT(2) NOT NULL DEFAULT 10,+ `priority` TINYINT(2) NOT NULL DEFAULT 10,`pathEntries` VARCHAR(511) DEFAULT NULL,`httpAuth` VARCHAR(511) DEFAULT NULL,`error` BOOLEAN DEFAULT 0,