diff options
| author | 2013-03-17 15:13:19 +0100 | |
|---|---|---|
| committer | 2013-03-17 15:13:19 +0100 | |
| commit | fd171e8f9517dd5a046d4f7f159cde3002e7706a (patch) | |
| tree | b236935155c0da7e61ddd9f73bce6474fc581f4b /app/models/Feed.php | |
| parent | 001c425acd3345e363fe36c014f776069dd587dc (diff) | |
Fix bug #31 : catégorie par défaut ne peut plus être supprimée mais peut être renommée. Ajout gestion flux tronqués directement dans l'interface (+ intégré en base de données). Attention, la BDD a changé (+ 4 champs : 2 pour feed, 2 pour entry)
Diffstat (limited to 'app/models/Feed.php')
| -rw-r--r-- | app/models/Feed.php | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/app/models/Feed.php b/app/models/Feed.php index 046e5af92..2f471f0a4 100644 --- a/app/models/Feed.php +++ b/app/models/Feed.php @@ -3,12 +3,14 @@ class Feed extends Model { private $id = null; private $url; - private $category = ''; + private $category = '000000'; private $entries = null; private $name = ''; private $website = ''; private $description = ''; private $lastUpdate = 0; + private $pathEntries = ''; + private $httpAuth = ''; public function __construct ($url) { $this->_url ($url); @@ -46,6 +48,12 @@ class Feed extends Model { public function lastUpdate () { return $this->lastUpdate; } + public function pathEntries () { + return $this->pathEntries; + } + public function httpAuth () { + return $this->httpAuth; + } public function nbEntries () { $feedDAO = new FeedDAO (); return $feedDAO->countEntries ($this->id ()); @@ -89,6 +97,12 @@ class Feed extends Model { public function _lastUpdate ($value) { $this->lastUpdate = $value; } + public function _pathEntries ($value) { + $this->pathEntries = $value; + } + public function _httpAuth ($value) { + $this->httpAuth = $value; + } public function load () { if (!is_null ($this->url)) { @@ -122,7 +136,7 @@ class Feed extends Model { // Gestion du contenu // On cherche à récupérer les articles en entier... même si le flux ne le propose pas - $path = get_path ($this->website ()); + $path = $this->pathEntries (); if ($path) { try { $content = get_content_by_parsing ($item->get_permalink (), $path); @@ -306,6 +320,8 @@ class HelperFeed { $list[$key]->_website ($dao['website']); $list[$key]->_description ($dao['description']); $list[$key]->_lastUpdate ($dao['lastUpdate']); + $list[$key]->_pathEntries ($dao['pathEntries']); + $list[$key]->_httpAuth ($dao['httpAuth']); if (isset ($dao['id'])) { $list[$key]->_id ($dao['id']); |
