diff options
| author | 2019-09-29 17:55:08 +0200 | |
|---|---|---|
| committer | 2019-09-29 17:55:08 +0200 | |
| commit | ef00513a816ae8f902d1ad5b1163ee81a3f26c46 (patch) | |
| tree | 6202592b4dcb389865ef2b8fcf1f414fa296dac4 /p/api | |
| parent | e3e5954394f4523850c78e80e496f1b916622677 (diff) | |
Quick fix: API PDO visibility bug (#2545)
Introduced in https://github.com/FreshRSS/FreshRSS/pull/2522
Diffstat (limited to 'p/api')
| -rw-r--r-- | p/api/greader.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/p/api/greader.php b/p/api/greader.php index 77e498524..24c43128b 100644 --- a/p/api/greader.php +++ b/p/api/greader.php @@ -76,6 +76,10 @@ function multiplePosts($name) { //https://bugs.php.net/bug.php?id=51633 return $result; } +class MyPDO extends Minz_ModelPdo { + public $pdo; +} + function debugInfo() { if (function_exists('getallheaders')) { $ALL_HEADERS = getallheaders(); @@ -233,7 +237,7 @@ function userInfo() { //https://github.com/theoldreader/api#user-info function tagList() { header('Content-Type: application/json; charset=UTF-8'); - $model = new Minz_ModelPdo(); + $model = new MyPDO(); $stm = $model->pdo->query('SELECT c.name FROM `_category` c'); $res = $stm->fetchAll(PDO::FETCH_COLUMN, 0); @@ -270,7 +274,7 @@ function tagList() { function subscriptionList() { header('Content-Type: application/json; charset=UTF-8'); - $model = new Minz_ModelPdo(); + $model = new MyPDO(); $stm = $model->pdo->prepare('SELECT f.id, f.name, f.url, f.website, c.id as c_id, c.name as c_name FROM `_feed` f INNER JOIN `_category` c ON c.id = f.category AND f.priority >= :priority_normal'); $stm->bindValue(':priority_normal', FreshRSS_Feed::PRIORITY_NORMAL, PDO::PARAM_INT); |
