diff options
| author | 2018-10-14 13:48:59 +0200 | |
|---|---|---|
| committer | 2018-10-14 13:48:59 +0200 | |
| commit | c8b54ae807f583723748b5a8cebf9925fb288f9d (patch) | |
| tree | 64e29b39d69c704f2b389369072304ba9544ea70 | |
| parent | 8221c807a10942c77309547e9c7dc709146f7117 (diff) | |
Fix MySQL create table feeds (#2047)
https://github.com/FreshRSS/FreshRSS/issues/2042
| -rw-r--r-- | app/Controllers/userController.php | 2 | ||||
| -rw-r--r-- | app/Models/EntryDAO.php | 2 | ||||
| -rw-r--r-- | app/SQL/install.sql.mysql.php | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/app/Controllers/userController.php b/app/Controllers/userController.php index 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.php index 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.php index 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, |
