summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
Diffstat (limited to 'classes')
-rw-r--r--classes/api.php5
-rw-r--r--classes/feeds.php3
-rw-r--r--classes/pluginhost.php5
3 files changed, 9 insertions, 4 deletions
diff --git a/classes/api.php b/classes/api.php
index 5e7ec6573..b9168cf93 100644
--- a/classes/api.php
+++ b/classes/api.php
@@ -655,6 +655,11 @@ class API extends Handler {
$headline_row["always_display_attachments"] = sql_bool_to_bool($line["always_display_enclosures"]);
+ global $pluginhost;
+ foreach ($pluginhost->get_hooks($pluginhost::HOOK_RENDER_ARTICLE_API) as $p) {
+ $headline_row = $p->hook_render_article_api($headline_row);
+ }
+
array_push($headlines, $headline_row);
}
diff --git a/classes/feeds.php b/classes/feeds.php
index 79aaa8e55..b8ef1f544 100644
--- a/classes/feeds.php
+++ b/classes/feeds.php
@@ -637,8 +637,7 @@ class Feeds extends Handler_Protected {
$always_display_enclosures = sql_bool_to_bool($line["always_display_enclosures"]);
- $reply['content'] .= format_article_enclosures($this->link, $id, $always_display_enclosures,
- $line["content"]);
+ $reply['content'] .= format_article_enclosures($this->link, $id, $always_display_enclosures, $line["content"], sql_bool_to_bool($line["hide_images"]));
$reply['content'] .= "</div>";
diff --git a/classes/pluginhost.php b/classes/pluginhost.php
index 79544b01b..7dabd42a8 100644
--- a/classes/pluginhost.php
+++ b/classes/pluginhost.php
@@ -22,6 +22,7 @@ class PluginHost {
const HOOK_RENDER_ARTICLE_CDM = 11;
const HOOK_FEED_FETCHED = 12;
const HOOK_SANITIZE = 13;
+ const HOOK_RENDER_ARTICLE_API = 14;
const KIND_ALL = 1;
const KIND_SYSTEM = 2;
@@ -171,7 +172,7 @@ class PluginHost {
}
function add_command($command, $description, $sender) {
- $command = "-" . str_replace("-", "_", strtolower($command));
+ $command = str_replace("-", "_", strtolower($command));
$this->commands[$command] = array("description" => $description,
"class" => $sender);
@@ -201,7 +202,7 @@ class PluginHost {
function run_commands($args) {
foreach ($this->get_commands() as $command => $data) {
- if (in_array($command, $args)) {
+ if (isset($args[$command])) {
$command = str_replace("-", "", $command);
$data["class"]->$command($args);
}