summaryrefslogtreecommitdiff
path: root/app/Models
diff options
context:
space:
mode:
Diffstat (limited to 'app/Models')
-rw-r--r--app/Models/BooleanSearch.php8
-rw-r--r--app/Models/EntryDAO.php4
-rw-r--r--app/Models/Feed.php2
-rw-r--r--app/Models/Search.php8
4 files changed, 19 insertions, 3 deletions
diff --git a/app/Models/BooleanSearch.php b/app/Models/BooleanSearch.php
index 6e016f7e9..88eeea73c 100644
--- a/app/Models/BooleanSearch.php
+++ b/app/Models/BooleanSearch.php
@@ -45,6 +45,14 @@ class FreshRSS_BooleanSearch {
return $this->searches;
}
+ public function add($search) {
+ if ($search instanceof FreshRSS_Search) {
+ $this->searches[] = $search;
+ return $search;
+ }
+ return null;
+ }
+
public function __toString() {
return $this->getRawInput();
}
diff --git a/app/Models/EntryDAO.php b/app/Models/EntryDAO.php
index 708d01a69..6d77a33cd 100644
--- a/app/Models/EntryDAO.php
+++ b/app/Models/EntryDAO.php
@@ -921,8 +921,8 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo implements FreshRSS_Searchable {
return self::daoToEntries($stm->fetchAll(PDO::FETCH_ASSOC));
}
- public function listIdsWhere($type = 'a', $id = '', $state = FreshRSS_Entry::STATE_ALL, $order = 'DESC', $limit = 1, $firstId = '', $filters = null, $date_min = 0) { //For API
- list($values, $sql) = $this->sqlListWhere($type, $id, $state, $order, $limit, $firstId, $filters, $date_min);
+ public function listIdsWhere($type = 'a', $id = '', $state = FreshRSS_Entry::STATE_ALL, $order = 'DESC', $limit = 1, $firstId = '', $filters = null) { //For API
+ list($values, $sql) = $this->sqlListWhere($type, $id, $state, $order, $limit, $firstId, $filters);
$stm = $this->bd->prepare($sql);
$stm->execute($values);
diff --git a/app/Models/Feed.php b/app/Models/Feed.php
index e1dd2990d..a5ef33d6b 100644
--- a/app/Models/Feed.php
+++ b/app/Models/Feed.php
@@ -424,7 +424,7 @@ class FreshRSS_Feed extends Minz_Model {
$author_names = '';
if (is_array($authors)) {
foreach ($authors as $author) {
- $author_names .= html_only_entity_decode(strip_tags($author->name == '' ? $author->email : $author->name)) . '; ';
+ $author_names .= escapeToUnicodeAlternative(strip_tags($author->name == '' ? $author->email : $author->name)) . '; ';
}
}
$author_names = substr($author_names, 0, -2);
diff --git a/app/Models/Search.php b/app/Models/Search.php
index c52e391fa..f9cda7354 100644
--- a/app/Models/Search.php
+++ b/app/Models/Search.php
@@ -73,10 +73,18 @@ class FreshRSS_Search {
return $this->min_date;
}
+ public function setMinDate($value) {
+ return $this->min_date = $value;
+ }
+
public function getMaxDate() {
return $this->max_date;
}
+ public function setMaxDate($value) {
+ return $this->max_date = $value;
+ }
+
public function getMinPubdate() {
return $this->min_pubdate;
}