forked from GNUsocial/gnu-social
Merge branch '0.8.x' of git@gitorious.org:laconica/dev into 0.8.x
This commit is contained in:
commit
5953d56fe2
@ -143,6 +143,25 @@ class FavoritedAction extends Action
|
||||
$this->elementStart('div', 'instructions');
|
||||
$this->raw($output);
|
||||
$this->elementEnd('div');
|
||||
|
||||
$favorite = new Fave;
|
||||
|
||||
if ($favorite->count()) {
|
||||
return;
|
||||
}
|
||||
|
||||
$message = _('Favorite notices appear on this page but noone has favorited one yet.') . ' ';
|
||||
|
||||
if (common_logged_in()) {
|
||||
$message .= _('Be the first to add a notice to your favorites by clicking the fave button next to any notice you like.');
|
||||
}
|
||||
else {
|
||||
$message .= _('Why not [register an account](%%action.register%%) and be the first to add a notice to your favorites!');
|
||||
}
|
||||
|
||||
$this->elementStart('div', 'blankfiller');
|
||||
$this->raw(common_markup_to_html($message));
|
||||
$this->elementEnd('div');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -168,14 +168,13 @@ class PublicAction extends Action
|
||||
|
||||
function showPageNotice()
|
||||
{
|
||||
$notice = Notice::publicStream(0, 1);
|
||||
$notice = new Notice;
|
||||
|
||||
if (!$notice) {
|
||||
$this->serverError(_('Could not retrieve public stream.'));
|
||||
return;
|
||||
}
|
||||
|
||||
// no notices in the public stream, let's get out of here
|
||||
if ($notice->count()) {
|
||||
return;
|
||||
}
|
||||
|
@ -63,7 +63,7 @@ class PublictagcloudAction extends Action
|
||||
sprintf(_('These are most popular recent tags on %s '),
|
||||
common_config('site', 'name')));
|
||||
|
||||
$tags = new Notice_tag();
|
||||
$tags = new Notice_tag;
|
||||
if ($tags->count()) {
|
||||
return;
|
||||
}
|
||||
|
@ -45,4 +45,5 @@ VALUES
|
||||
('twitux','Twitux','http://live.gnome.org/DanielMorales/Twitux', now()),
|
||||
('twitvim','TwitVim','http://vim.sourceforge.net/scripts/script.php?script_id=2204', now()),
|
||||
('urfastr','urfastr','http://urfastr.net/', now()),
|
||||
('adium', 'Adium', 'http://www.adiumx.com/', now());
|
||||
('adium', 'Adium', 'http://www.adiumx.com/', now()),
|
||||
('yatca','Yatca','http://www.yatca.com/', now());
|
||||
|
@ -581,10 +581,8 @@ function common_shorten_link($url, $reverse = false)
|
||||
|
||||
function common_xml_safe_str($str)
|
||||
{
|
||||
$xmlStr = htmlentities(iconv('UTF-8', 'UTF-8//IGNORE', $str), ENT_NOQUOTES, 'UTF-8');
|
||||
|
||||
// Replace control, formatting, and surrogate characters with '*', ala Twitter
|
||||
return preg_replace('/[\p{Cc}\p{Cf}\p{Cs}]/u', '*', $str);
|
||||
// Neutralize control codes and surrogates
|
||||
return preg_replace('/[\p{Cc}\p{Cs}]/u', '*', $str);
|
||||
}
|
||||
|
||||
function common_tag_link($tag)
|
||||
|
Loading…
Reference in New Issue
Block a user