summaryrefslogtreecommitdiff
path: root/lib/api.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api.php')
-rw-r--r--lib/api.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/api.php b/lib/api.php
index 4ed49e452..d21851d50 100644
--- a/lib/api.php
+++ b/lib/api.php
@@ -140,12 +140,14 @@ class ApiAction extends Action
// Note: some profiles don't have an associated user
+ $defaultDesign = Design::siteDesign();
+
if (!empty($user)) {
$design = $user->getDesign();
}
if (empty($design)) {
- $design = Design::siteDesign();
+ $design = $defaultDesign;
}
$color = Design::toWebColor(empty($design->backgroundcolor) ? $defaultDesign->backgroundcolor : $design->backgroundcolor);
@@ -787,7 +789,7 @@ class ApiAction extends Action
$from = $message->getFrom();
- $entry['title'] = sprintf('Message from %s to %s',
+ $entry['title'] = sprintf('Message from %1$s to %2$s',
$from->nickname, $message->getTo()->nickname);
$entry['content'] = common_xml_safe_str($message->rendered);