Fix MySQL create table feeds (#2047)

https://github.com/FreshRSS/FreshRSS/issues/2042
This commit is contained in:
Alexandre Alapetite authored and GitHub committed 2018-10-14 13:48:59 +02:00
1 parent 8221c807a1
commit c8b54ae807
3 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -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();
}
}
+1 -1
View File
@@ -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';
+1 -1
View File
@@ -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,