1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2026-02-10 07:01:32 +00:00

for the most part, deal with filter rules UI

This commit is contained in:
Andrew Dolgov
2021-02-21 09:35:07 +03:00
parent b4e96374bc
commit 94560132dd
12 changed files with 510 additions and 189 deletions

View File

@@ -37,7 +37,18 @@ class Labels
}
}
static function get_all_labels($owner_uid) {
static function get_as_hash($owner_uid) {
$rv = [];
$labels = Labels::get_all($owner_uid);
foreach ($labels as $i => $label) {
$rv[$label["id"]] = $labels[$i];
}
return $rv;
}
static function get_all($owner_uid) {
$rv = array();
$pdo = Db::pdo();
@@ -46,7 +57,7 @@ class Labels
WHERE owner_uid = ? ORDER BY caption");
$sth->execute([$owner_uid]);
while ($line = $sth->fetch()) {
while ($line = $sth->fetch(PDO::FETCH_ASSOC)) {
array_push($rv, $line);
}