aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2020-06-21 10:30:12 +0200
committerGravatar GitHub <noreply@github.com> 2020-06-21 10:30:12 +0200
commit051f1649f705dd77febd39c8f4a53c97f4c1115f (patch)
treec9da7a9de33103fb5efff4af19d53127681f958a
parent17d7fd46ee5055c7f845a15f67ce4b1ef885b2d3 (diff)
FeedMe table manage feeds + fix warning addFeed (#3075)
FeedMe is able to add/remove subscriptions. Fix minor bug introduced by https://github.com/FreshRSS/FreshRSS/pull/1731 If the category ID is provided, we must first search for the existing category before trying to add a category with the provided name. Fix: ``` SQL error addCategory: ["23000",19,"UNIQUE constraint failed: category.name"] ```
-rw-r--r--README.fr.md2
-rw-r--r--README.md2
-rwxr-xr-xapp/Controllers/feedController.php7
3 files changed, 6 insertions, 5 deletions
diff --git a/README.fr.md b/README.fr.md
index 7958375c0..17a68dd73 100644
--- a/README.fr.md
+++ b/README.fr.md
@@ -179,7 +179,7 @@ et [l’API Fever](https://freshrss.github.io/FreshRSS/fr/users/06_Fever_API.htm
| App | Plateforme | Logiciel libre | Maintenu & Dévelopé | API | Mode hors-ligne | Sync rapide | Récupère plus d’articles dans les vues individuelles | Rrécupère les articles lus | Favoris | Étiquettes | Podcasts | Gestion des flux |
|:--------------------------------------------------------------------------------------|:-----------:|:-------------------------------------------------------------:|:----------------------:|:----------------:|:-------------:|:---------:|:------------------------------:|:-------------------:|:----------:|:------:|:--------:|:------------:|
| [News+](https://play.google.com/store/apps/details?id=com.noinnion.android.newsplus) with [Google Reader extension](https://play.google.com/store/apps/details?id=com.noinnion.android.newsplus.extension.google_reader) | Android | [Partially](https://github.com/noinnion/newsplus/blob/master/extensions/GoogleReaderCloneExtension/src/com/noinnion/android/newsplus/extension/google_reader/) | 2015 | GReader | ✔️ | ⭐⭐⭐ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
-| [FeedMe](https://play.google.com/store/apps/details?id=com.seazon.feedme) | Android | ➖ | ✔️✔️ | GReader | ✔️ | ⭐⭐ | ➖ | ➖ | ✔️ | ✓ | ✔️ | ➖ |
+| [FeedMe](https://play.google.com/store/apps/details?id=com.seazon.feedme) | Android | ➖ | ✔️✔️ | GReader | ✔️ | ⭐⭐ | ➖ | ➖ | ✔️ | ✓ | ✔️ | ✔️ |
| [EasyRSS](https://github.com/Alkarex/EasyRSS) | Android | [✔️](https://github.com/Alkarex/EasyRSS) | ✔️ | GReader | Bug | ⭐⭐ | ➖ | ➖ | ✔️ | ➖ | ➖ | ➖ |
| [Readrops](https://github.com/readrops/Readrops) | Android | [✔️](https://github.com/readrops/Readrops) | ✔️✔️ | GReader | ✔️ | ⭐⭐⭐ | ➖ | ➖ | ➖ | ➖ | ➖ | ✔️ |
| [Readably](https://play.google.com/store/apps/details?id=com.isaiasmatewos.readably) | Android | ➖ | ✔️✔️ | Fever | ✔️ | ⭐ | ➖ | ➖ | ✔️ | ➖ | ➖ | ➖ |
diff --git a/README.md b/README.md
index 169f14c1e..62cf1fa07 100644
--- a/README.md
+++ b/README.md
@@ -102,7 +102,7 @@ and [Fever API](https://freshrss.github.io/FreshRSS/en/users/06_Fever_API.html)
| App | Platform | Free Software | Maintained & Developed | API | Works offline | Fast sync | Fetch more in individual views | Fetch read articles | Favourites | Labels | Podcasts | Manage feeds |
|:--------------------------------------------------------------------------------------|:-----------:|:-------------------------------------------------------------:|:----------------------:|:----------------:|:-------------:|:---------:|:------------------------------:|:-------------------:|:----------:|:------:|:--------:|:------------:|
| [News+](https://play.google.com/store/apps/details?id=com.noinnion.android.newsplus) with [Google Reader extension](https://play.google.com/store/apps/details?id=com.noinnion.android.newsplus.extension.google_reader) | Android | [Partially](https://github.com/noinnion/newsplus/blob/master/extensions/GoogleReaderCloneExtension/src/com/noinnion/android/newsplus/extension/google_reader/) | 2015 | GReader | ✔️ | ⭐⭐⭐ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
-| [FeedMe](https://play.google.com/store/apps/details?id=com.seazon.feedme) | Android | ➖ | ✔️✔️ | GReader | ✔️ | ⭐⭐ | ➖ | ➖ | ✔️ | ✓ | ✔️ | ➖ |
+| [FeedMe](https://play.google.com/store/apps/details?id=com.seazon.feedme) | Android | ➖ | ✔️✔️ | GReader | ✔️ | ⭐⭐ | ➖ | ➖ | ✔️ | ✓ | ✔️ | ✔️ |
| [EasyRSS](https://github.com/Alkarex/EasyRSS) | Android | [✔️](https://github.com/Alkarex/EasyRSS) | ✔️ | GReader | Bug | ⭐⭐ | ➖ | ➖ | ✔️ | ➖ | ➖ | ➖ |
| [Readrops](https://github.com/readrops/Readrops) | Android | [✔️](https://github.com/readrops/Readrops) | ✔️✔️ | GReader | ✔️ | ⭐⭐⭐ | ➖ | ➖ | ➖ | ➖ | ➖ | ✔️ |
| [Readably](https://play.google.com/store/apps/details?id=com.isaiasmatewos.readably) | Android | ➖ | ✔️✔️ | Fever | ✔️ | ⭐ | ➖ | ➖ | ✔️ | ➖ | ➖ | ➖ |
diff --git a/app/Controllers/feedController.php b/app/Controllers/feedController.php
index fda6ddfcd..c0843ffba 100755
--- a/app/Controllers/feedController.php
+++ b/app/Controllers/feedController.php
@@ -54,11 +54,12 @@ class FreshRSS_feed_Controller extends Minz_ActionController {
}
$cat = null;
- if ($new_cat_name != '') {
+ if ($cat_id > 0) {
+ $cat = $catDAO->searchById($cat_id);
+ }
+ if ($cat == null && $new_cat_name != '') {
$new_cat_id = $catDAO->addCategory(array('name' => $new_cat_name));
$cat_id = $new_cat_id > 0 ? $new_cat_id : $cat_id;
- }
- if ($cat_id > 0) {
$cat = $catDAO->searchById($cat_id);
}
if ($cat == null) {