aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/FeedBuilder.php
diff options
context:
space:
mode:
Diffstat (limited to 'application/FeedBuilder.php')
-rw-r--r--application/FeedBuilder.php27
1 files changed, 8 insertions, 19 deletions
diff --git a/application/FeedBuilder.php b/application/FeedBuilder.php
index fedd90e6..ebae18b4 100644
--- a/application/FeedBuilder.php
+++ b/application/FeedBuilder.php
@@ -63,11 +63,6 @@ class FeedBuilder
63 protected $hideDates; 63 protected $hideDates;
64 64
65 /** 65 /**
66 * @var string PubSub hub URL.
67 */
68 protected $pubsubhubUrl;
69
70 /**
71 * @var string server locale. 66 * @var string server locale.
72 */ 67 */
73 protected $locale; 68 protected $locale;
@@ -102,6 +97,11 @@ class FeedBuilder
102 */ 97 */
103 public function buildData() 98 public function buildData()
104 { 99 {
100 // Search for untagged links
101 if (isset($this->userInput['searchtags']) && empty($this->userInput['searchtags'])) {
102 $this->userInput['searchtags'] = false;
103 }
104
105 // Optionally filter the results: 105 // Optionally filter the results:
106 $linksToDisplay = $this->linkDB->filterSearch($this->userInput); 106 $linksToDisplay = $this->linkDB->filterSearch($this->userInput);
107 107
@@ -120,7 +120,6 @@ class FeedBuilder
120 } 120 }
121 121
122 $data['language'] = $this->getTypeLanguage(); 122 $data['language'] = $this->getTypeLanguage();
123 $data['pubsubhub_url'] = $this->pubsubhubUrl;
124 $data['last_update'] = $this->getLatestDateFormatted(); 123 $data['last_update'] = $this->getLatestDateFormatted();
125 $data['show_dates'] = !$this->hideDates || $this->isLoggedIn; 124 $data['show_dates'] = !$this->hideDates || $this->isLoggedIn;
126 // Remove leading slash from REQUEST_URI. 125 // Remove leading slash from REQUEST_URI.
@@ -149,11 +148,11 @@ class FeedBuilder
149 $link['url'] = $pageaddr . $link['url']; 148 $link['url'] = $pageaddr . $link['url'];
150 } 149 }
151 if ($this->usePermalinks === true) { 150 if ($this->usePermalinks === true) {
152 $permalink = '<a href="'. $link['url'] .'" title="Direct link">Direct link</a>'; 151 $permalink = '<a href="'. $link['url'] .'" title="'. t('Direct link') .'">'. t('Direct link') .'</a>';
153 } else { 152 } else {
154 $permalink = '<a href="'. $link['guid'] .'" title="Permalink">Permalink</a>'; 153 $permalink = '<a href="'. $link['guid'] .'" title="'. t('Permalink') .'">'. t('Permalink') .'</a>';
155 } 154 }
156 $link['description'] = format_description($link['description'], '', $pageaddr); 155 $link['description'] = format_description($link['description'], '', false, $pageaddr);
157 $link['description'] .= PHP_EOL .'<br>&#8212; '. $permalink; 156 $link['description'] .= PHP_EOL .'<br>&#8212; '. $permalink;
158 157
159 $pubDate = $link['created']; 158 $pubDate = $link['created'];
@@ -183,16 +182,6 @@ class FeedBuilder
183 } 182 }
184 183
185 /** 184 /**
186 * Assign PubSub hub URL.
187 *
188 * @param string $pubsubhubUrl PubSub hub url.
189 */
190 public function setPubsubhubUrl($pubsubhubUrl)
191 {
192 $this->pubsubhubUrl = $pubsubhubUrl;
193 }
194
195 /**
196 * Set this to true to use permalinks instead of direct links. 185 * Set this to true to use permalinks instead of direct links.
197 * 186 *
198 * @param boolean $usePermalinks true to force permalinks. 187 * @param boolean $usePermalinks true to force permalinks.