Explorar o código

Fix name of default category (#2638)

Fix https://github.com/FreshRSS/FreshRSS/issues/2637
Alexandre Alapetite %!s(int64=6) %!d(string=hai) anos
pai
achega
61878794a9
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  1. 6 0
      app/Models/CategoryDAO.php

+ 6 - 0
app/Models/CategoryDAO.php

@@ -45,6 +45,12 @@ class FreshRSS_CategoryDAO extends Minz_ModelPdo implements FreshRSS_Searchable
 				} else {
 					$this->pdo->exec('DROP INDEX IF EXISTS feed_keep_history_index');	//SQLite at least drop index
 				}
+
+				$stm = $this->pdo->prepare('UPDATE `_category` SET name = :name WHERE id = :id');
+				$stm->bindValue(':id', self::DEFAULTCATEGORYID, PDO::PARAM_INT);
+				$stm->bindValue(':name', 'Uncategorized');
+				$stm->execute();
+
 				return $ok;
 			}
 		} catch (Exception $e) {