summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/action.php6
-rw-r--r--lib/mail.php4
-rw-r--r--lib/twitterapi.php24
3 files changed, 18 insertions, 16 deletions
diff --git a/lib/action.php b/lib/action.php
index 6da9adab5..1bdc4daea 100644
--- a/lib/action.php
+++ b/lib/action.php
@@ -450,8 +450,10 @@ class Action extends HTMLOutputter // lawsuit
}
$this->menuItem(common_local_url('doc', array('title' => 'help')),
_('Help'), _('Help me!'), false, 'nav_help');
- $this->menuItem(common_local_url('peoplesearch'),
- _('Search'), _('Search for people or text'), false, 'nav_search');
+ if ($user || !common_config('site', 'private')) {
+ $this->menuItem(common_local_url('peoplesearch'),
+ _('Search'), _('Search for people or text'), false, 'nav_search');
+ }
Event::handle('EndPrimaryNav', array($this));
}
$this->elementEnd('ul');
diff --git a/lib/mail.php b/lib/mail.php
index 33d1eb754..2e471fd6d 100644
--- a/lib/mail.php
+++ b/lib/mail.php
@@ -692,11 +692,11 @@ function mail_facebook_app_removed($user)
$site_name = common_config('site', 'name');
$subject = sprintf(
- _('Your %1$s Facebook application access has been disabled.',
+ _('Your %1\$s Facebook application access has been disabled.',
$site_name));
$body = sprintf(_("Hi, %1\$s. We're sorry to inform you that we are " .
- 'unable to update your Facebook status from %2$s, and have disabled ' .
+ 'unable to update your Facebook status from %2\$s, and have disabled ' .
'the Facebook application for your account. This may be because ' .
'you have removed the Facebook application\'s authorization, or ' .
'have deleted your Facebook account. You can re-enable the ' .
diff --git a/lib/twitterapi.php b/lib/twitterapi.php
index a5dc2067f..583007208 100644
--- a/lib/twitterapi.php
+++ b/lib/twitterapi.php
@@ -188,20 +188,20 @@ class TwitterapiAction extends Action
// Enclosures
$attachments = $notice->attachments();
- $enclosures = array();
- foreach ($attachments as $attachment) {
- if ($attachment->isEnclosure()) {
- $enclosure = array();
- $enclosure['url'] = $attachment->url;
- $enclosure['mimetype'] = $attachment->mimetype;
- $enclosure['size'] = $attachment->size;
- $enclosures[] = $enclosure;
- }
- }
+ if (!empty($attachments)) {
- if (!empty($enclosures)) {
- $twitter_status['attachments'] = $enclosures;
+ $twitter_status['attachments'] = array();
+
+ foreach ($attachments as $attachment) {
+ if ($attachment->isEnclosure()) {
+ $enclosure = array();
+ $enclosure['url'] = $attachment->url;
+ $enclosure['mimetype'] = $attachment->mimetype;
+ $enclosure['size'] = $attachment->size;
+ $twitter_status['attachments'][] = $enclosure;
+ }
+ }
}
if ($include_user) {