diff options
| author | 2013-04-11 21:27:29 +0200 | |
|---|---|---|
| committer | 2013-04-11 21:27:29 +0200 | |
| commit | e2171de4e6b090fbbad07d8852a068ec7ca050c0 (patch) | |
| tree | e47188b3a589099d41125445bedfd39963d94b11 /app/models/Feed.php | |
| parent | 61943f1661383bf8017b4c2a76fd11618e4adae0 (diff) | |
Fix issue #37 : possibilité de sortir un site du flux principal (utile pour les sites qui publient beaucoup)
Diffstat (limited to 'app/models/Feed.php')
| -rw-r--r-- | app/models/Feed.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/app/models/Feed.php b/app/models/Feed.php index 2e6782921..50632f5a7 100644 --- a/app/models/Feed.php +++ b/app/models/Feed.php @@ -9,6 +9,7 @@ class Feed extends Model { private $website = ''; private $description = ''; private $lastUpdate = 0; + private $priority = 10; private $pathEntries = ''; private $httpAuth = ''; @@ -48,6 +49,9 @@ class Feed extends Model { public function lastUpdate () { return $this->lastUpdate; } + public function priority () { + return $this->priority; + } public function pathEntries () { return $this->pathEntries; } @@ -108,6 +112,12 @@ class Feed extends Model { public function _lastUpdate ($value) { $this->lastUpdate = $value; } + public function _priority ($value) { + if (!is_int (intval ($value))) { + $value = 10; + } + $this->priority = $value; + } public function _pathEntries ($value) { $this->pathEntries = $value; } @@ -382,6 +392,7 @@ class HelperFeed { $list[$key]->_website ($dao['website']); $list[$key]->_description ($dao['description']); $list[$key]->_lastUpdate ($dao['lastUpdate']); + $list[$key]->_priority ($dao['priority']); $list[$key]->_pathEntries ($dao['pathEntries']); $list[$key]->_httpAuth ($dao['httpAuth']); |
