diff options
| author | 2013-11-24 17:08:48 +0100 | |
|---|---|---|
| committer | 2013-11-24 17:08:48 +0100 | |
| commit | 08ff116f040f4c735722963e39fd6eb3716ef352 (patch) | |
| tree | f4716b8d7303701bfb6f5cec1d11ca0b6808c2d6 /app/models | |
| parent | 2e387749d55fe6a39e9c77c7272faf9c8d71591b (diff) | |
OPML : corrections import/export
À tester plus.
En particulier, ne supporte pas bien les fichiers OPML qui sont à la
fois avec des entités HTML et pas en UTF-8.
Devrait corriger https://github.com/marienfressinaud/FreshRSS/issues/287
Diffstat (limited to 'app/models')
| -rwxr-xr-x | app/models/Category.php | 2 | ||||
| -rwxr-xr-x | app/models/Entry.php | 2 | ||||
| -rw-r--r-- | app/models/Feed.php | 10 |
3 files changed, 7 insertions, 7 deletions
diff --git a/app/models/Category.php b/app/models/Category.php index 1ae324ace..a01034f4e 100755 --- a/app/models/Category.php +++ b/app/models/Category.php @@ -95,7 +95,7 @@ class CategoryDAO extends Model_pdo { ); if ($stm && $stm->execute ($values)) { - return $stm->rowCount(); + return $this->bd->lastInsertId(); } else { $info = $stm->errorInfo(); Minz_Log::record ('SQL error : ' . $info[2], Minz_Log::ERROR); diff --git a/app/models/Entry.php b/app/models/Entry.php index da296227a..e2493e266 100755 --- a/app/models/Entry.php +++ b/app/models/Entry.php @@ -213,7 +213,7 @@ class EntryDAO extends Model_pdo { ); if ($stm && $stm->execute ($values)) { - return $stm->rowCount(); + return $this->bd->lastInsertId(); } else { $info = $stm->errorInfo(); if ((int)($info[0] / 1000) !== 23) { //Filter out "SQLSTATE Class code 23: Constraint Violation" because of expected duplicate entries diff --git a/app/models/Feed.php b/app/models/Feed.php index 46ba7bd47..822f6e703 100644 --- a/app/models/Feed.php +++ b/app/models/Feed.php @@ -270,7 +270,7 @@ class Feed extends Model { $entries = array (); foreach ($feed->get_items () as $item) { - $title = self::html_only_entity_decode (strip_tags ($item->get_title ())); + $title = html_only_entity_decode (strip_tags ($item->get_title ())); $author = $item->get_author (); $link = $item->get_permalink (); $date = strtotime ($item->get_date ()); @@ -280,11 +280,11 @@ class Feed extends Model { $tags = array (); if (!is_null ($tags_tmp)) { foreach ($tags_tmp as $tag) { - $tags[] = self::html_only_entity_decode ($tag->get_label ()); + $tags[] = html_only_entity_decode ($tag->get_label ()); } } - $content = self::html_only_entity_decode ($item->get_content ()); + $content = html_only_entity_decode ($item->get_content ()); $elinks = array(); foreach ($item->get_enclosures() as $enclosure) { @@ -301,7 +301,7 @@ class Feed extends Model { $this->id (), $item->get_id (), !is_null ($title) ? $title : '', - !is_null ($author) ? self::html_only_entity_decode ($author->name) : '', + !is_null ($author) ? html_only_entity_decode ($author->name) : '', !is_null ($content) ? $content : '', !is_null ($link) ? $link : '', $date ? $date : time () @@ -333,7 +333,7 @@ class FeedDAO extends Model_pdo { ); if ($stm && $stm->execute ($values)) { - return $stm->rowCount(); + return $this->bd->lastInsertId(); } else { $info = $stm->errorInfo(); Minz_Log::record ('SQL error : ' . $info[2], Minz_Log::ERROR); |
