summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/api.php18
-rw-r--r--lib/atom10feed.php8
-rw-r--r--lib/atomnoticefeed.php4
3 files changed, 26 insertions, 4 deletions
diff --git a/lib/api.php b/lib/api.php
index fd07bbbbe..8f1fe1ef7 100644
--- a/lib/api.php
+++ b/lib/api.php
@@ -1321,4 +1321,22 @@ class ApiAction extends Action
}
}
+ function getSelfUri($action, $aargs)
+ {
+ parse_str($_SERVER['QUERY_STRING'], $params);
+ $pstring = '';
+ if (!empty($params)) {
+ unset($params['p']);
+ $pstring = http_build_query($params);
+ }
+
+ $uri = common_local_url($action, $aargs);
+
+ if (!empty($pstring)) {
+ $uri .= '?' . $pstring;
+ }
+
+ return $uri;
+ }
+
}
diff --git a/lib/atom10feed.php b/lib/atom10feed.php
index a37f6521a..ccca76a09 100644
--- a/lib/atom10feed.php
+++ b/lib/atom10feed.php
@@ -27,7 +27,7 @@
* @link http://status.net/
*/
-if (!defined('STATUSNET')
+if (!defined('STATUSNET'))
{
exit(1);
}
@@ -108,7 +108,11 @@ class Atom10Feed extends XMLStringer
$this->element('id', null, $this->id);
$this->element('title', null, $this->title);
$this->element('subtitle', null, $this->subtitle);
- $this->element('logo', null, $this->logo);
+
+ if (!empty($this->logo)) {
+ $this->element('logo', null, $this->logo);
+ }
+
$this->element('updated', null, $this->updated);
$this->renderLinks();
diff --git a/lib/atomnoticefeed.php b/lib/atomnoticefeed.php
index a626ab549..34ed44b2e 100644
--- a/lib/atomnoticefeed.php
+++ b/lib/atomnoticefeed.php
@@ -27,7 +27,7 @@
* @link http://status.net/
*/
-if (!defined('STATUSNET')
+if (!defined('STATUSNET'))
{
exit(1);
}
@@ -85,7 +85,7 @@ class AtomNoticeFeed extends Atom10Feed
}
} else {
while ($notices->fetch()) {
- $this->addEntryFromNotice($notice);
+ $this->addEntryFromNotice($notices);
}
}
}