diff options
| author | 2017-10-01 18:31:28 +0200 | |
|---|---|---|
| committer | 2017-10-01 18:31:28 +0200 | |
| commit | ceda55c75b158fc1cf4813fe0f258527754b9289 (patch) | |
| tree | 7c84ac32cc845ab1d70ea5a3fb263c6613de34b0 /app/Models/CategoryDAO.php | |
| parent | cb7ba3e47576aa1d0c3f53e5966f831e6540bbc3 (diff) | |
| parent | f241fc1841df89285ecb6f124f0d70198d712b2f (diff) | |
Merge pull request #1651 from FreshRSS/dev1.8.0
Release 1.8.0
Diffstat (limited to 'app/Models/CategoryDAO.php')
| -rw-r--r-- | app/Models/CategoryDAO.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/app/Models/CategoryDAO.php b/app/Models/CategoryDAO.php index c2d57c241..f219c275f 100644 --- a/app/Models/CategoryDAO.php +++ b/app/Models/CategoryDAO.php @@ -2,7 +2,7 @@ class FreshRSS_CategoryDAO extends Minz_ModelPdo implements FreshRSS_Searchable { - const defaultCategoryId = 1; + const DEFAULTCATEGORYID = 1; public function addCategory($valuesTmp) { $sql = 'INSERT INTO `' . $this->prefix . 'category`(name) VALUES(?)'; @@ -53,7 +53,7 @@ class FreshRSS_CategoryDAO extends Minz_ModelPdo implements FreshRSS_Searchable } public function deleteCategory($id) { - if ($id <= self::defaultCategoryId) { + if ($id <= self::DEFAULTCATEGORYID) { return false; } $sql = 'DELETE FROM `' . $this->prefix . 'category` WHERE id=?'; @@ -123,7 +123,7 @@ class FreshRSS_CategoryDAO extends Minz_ModelPdo implements FreshRSS_Searchable } public function getDefault() { - $sql = 'SELECT * FROM `' . $this->prefix . 'category` WHERE id=' . self::defaultCategoryId; + $sql = 'SELECT * FROM `' . $this->prefix . 'category` WHERE id=' . self::DEFAULTCATEGORYID; $stm = $this->bd->prepare($sql); $stm->execute(); @@ -137,11 +137,11 @@ class FreshRSS_CategoryDAO extends Minz_ModelPdo implements FreshRSS_Searchable } } public function checkDefault() { - $def_cat = $this->searchById(self::defaultCategoryId); + $def_cat = $this->searchById(self::DEFAULTCATEGORYID); if ($def_cat == null) { $cat = new FreshRSS_Category(_t('gen.short.default_category')); - $cat->_id(self::defaultCategoryId); + $cat->_id(self::DEFAULTCATEGORYID); $values = array( 'id' => $cat->id(), |
