forked from GNUsocial/gnu-social
Merge branch '0.7.x' into 0.8.x
This commit is contained in:
commit
c0853e3040
@ -69,17 +69,6 @@ class AllAction extends ProfileAction
|
||||
sprintf(_('Feed for friends of %s (Atom)'), $this->user->nickname)));
|
||||
}
|
||||
|
||||
/**
|
||||
* Output document relationship links
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function showRelationshipLinks()
|
||||
{
|
||||
$this->sequenceRelationships($this->page > 1, $this->count > NOTICES_PER_PAGE, // FIXME
|
||||
$this->page, 'all', array('nickname' => $this->user->nickname));
|
||||
}
|
||||
|
||||
function showLocalNav()
|
||||
{
|
||||
$nav = new PersonalGroupNav($this);
|
||||
|
@ -221,15 +221,4 @@ class FavoritedAction extends Action
|
||||
$this->pagination($this->page > 1, $cnt > NOTICES_PER_PAGE,
|
||||
$this->page, 'favorited');
|
||||
}
|
||||
|
||||
/**
|
||||
* Output document relationship links
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function showRelationshipLinks()
|
||||
{
|
||||
$this->sequenceRelationships($this->page > 1, $this->count > NOTICES_PER_PAGE, // FIXME
|
||||
$this->page, 'favorited');
|
||||
}
|
||||
}
|
||||
|
@ -137,15 +137,4 @@ class GroupmembersAction extends Action
|
||||
$this->page, 'groupmembers',
|
||||
array('nickname' => $this->group->nickname));
|
||||
}
|
||||
|
||||
/**
|
||||
* Output document relationship links
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function showRelationshipLinks()
|
||||
{
|
||||
$this->sequenceRelationships($this->page > 1, $this->count > NOTICES_PER_PAGE, // FIXME
|
||||
$this->page, 'groupmembers', array('nickname' => $this->group->nickname));
|
||||
}
|
||||
}
|
||||
|
@ -129,15 +129,4 @@ class GroupsAction extends Action
|
||||
$gbm = new GroupsByMembersSection($this);
|
||||
$gbm->show();
|
||||
}
|
||||
|
||||
/**
|
||||
* Output document relationship links
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function showRelationshipLinks()
|
||||
{
|
||||
$this->sequenceRelationships($this->page > 1, $this->count > NOTICES_PER_PAGE, // FIXME
|
||||
$this->page, 'groups', array('nickname' => $this->group->nickname));
|
||||
}
|
||||
}
|
||||
|
@ -63,17 +63,6 @@ class InboxAction extends MailboxAction
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Output document relationship links
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function showRelationshipLinks()
|
||||
{
|
||||
$this->sequenceRelationships($this->page > 1, $this->count > NOTICES_PER_PAGE, // FIXME
|
||||
$this->page, 'inbox', array('nickname' => $this->user->nickname));
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve the messages for this user and this page
|
||||
*
|
||||
|
@ -62,17 +62,6 @@ class OutboxAction extends MailboxAction
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Output document relationship links
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function showRelationshipLinks()
|
||||
{
|
||||
$this->sequenceRelationships($this->page > 1, $this->count > NOTICES_PER_PAGE, // FIXME
|
||||
$this->page, 'outbox', array('nickname' => $this->user->nickname));
|
||||
}
|
||||
|
||||
/**
|
||||
* retrieve the messages for this user and this page
|
||||
*
|
||||
|
@ -135,17 +135,6 @@ class PublicAction extends Action
|
||||
_('Public Stream Feed (Atom)')));
|
||||
}
|
||||
|
||||
/**
|
||||
* Output document relationship links
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function showRelationshipLinks()
|
||||
{
|
||||
$this->sequenceRelationships($this->page > 1, $this->count > NOTICES_PER_PAGE, // FIXME
|
||||
$this->page, 'public');
|
||||
}
|
||||
|
||||
/**
|
||||
* Extra head elements
|
||||
*
|
||||
|
@ -138,17 +138,6 @@ class RepliesAction extends Action
|
||||
return array(new Feed(Feed::RSS1, $rssurl, $rsstitle));
|
||||
}
|
||||
|
||||
/**
|
||||
* Output document relationship links
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function showRelationshipLinks()
|
||||
{
|
||||
$this->sequenceRelationships($this->page > 1, $this->count > NOTICES_PER_PAGE, // FIXME
|
||||
$this->page, 'replies', array('nickname' => $this->user->nickname));
|
||||
}
|
||||
|
||||
/**
|
||||
* show the personal group nav
|
||||
*
|
||||
|
@ -150,18 +150,6 @@ class ShowfavoritesAction extends Action
|
||||
return array(new Feed(Feed::RSS1, $feedurl, $feedtitle));
|
||||
}
|
||||
|
||||
/**
|
||||
* Output document relationship links
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function showRelationshipLinks()
|
||||
{
|
||||
$this->sequenceRelationships($this->page > 1, $this->count > NOTICES_PER_PAGE, // FIXME
|
||||
$this->page, 'showfavorites', array('nickname' => $this->user->nickname));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* show the personal group nav
|
||||
*
|
||||
|
@ -311,17 +311,6 @@ class ShowgroupAction extends Action
|
||||
$this->group->nickname)));
|
||||
}
|
||||
|
||||
/**
|
||||
* Output document relationship links
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function showRelationshipLinks()
|
||||
{
|
||||
$this->sequenceRelationships($this->page > 1, $this->count > NOTICES_PER_PAGE, // FIXME
|
||||
$this->page, 'showgroup', array('nickname' => $this->group->nickname));
|
||||
}
|
||||
|
||||
/**
|
||||
* Fill in the sidebar.
|
||||
*
|
||||
|
@ -147,17 +147,6 @@ class ShowstreamAction extends ProfileAction
|
||||
sprintf(_('FOAF for %s'), $this->user->nickname)));
|
||||
}
|
||||
|
||||
/**
|
||||
* Output document relationship links
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function showRelationshipLinks()
|
||||
{
|
||||
$this->sequenceRelationships($this->page > 1, $this->count > NOTICES_PER_PAGE, // FIXME
|
||||
$this->page, 'showstream', array('nickname' => $this->user->nickname));
|
||||
}
|
||||
|
||||
function extraHead()
|
||||
{
|
||||
// for remote subscriptions etc.
|
||||
|
@ -76,17 +76,6 @@ class TagAction extends Action
|
||||
sprintf(_('Feed for tag %s'), $this->tag)));
|
||||
}
|
||||
|
||||
/**
|
||||
* Output document relationship links
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function showRelationshipLinks()
|
||||
{
|
||||
$this->sequenceRelationships($this->page > 1, $this->count > NOTICES_PER_PAGE, // FIXME
|
||||
$this->page, 'tag', array('tag' => $this->tag));
|
||||
}
|
||||
|
||||
function showPageNotice()
|
||||
{
|
||||
return sprintf(_('Messages tagged "%s", most recent first'), $this->tag);
|
||||
|
@ -178,8 +178,15 @@ $(document).ready(function(){
|
||||
$('#form_notice').append(document._importNode($(".error", xhr.responseXML).get(0), true));
|
||||
}
|
||||
else {
|
||||
var HTTP20x30x = [200, 201, 202, 203, 204, 205, 206, 300, 301, 302, 303, 304, 305, 306, 307];
|
||||
if(jQuery.inArray(parseInt(xhr.status), HTTP20x30x) < 0) {
|
||||
alert("Sorry! We had trouble sending your notice ("+xhr.status+" "+xhr.statusText+"). Please report the problem to the site administrator if this happens again.");
|
||||
}
|
||||
else {
|
||||
$("#notice_data-text").val("");
|
||||
counter();
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
success: function(xml) { if ($("#error", xml).length > 0) {
|
||||
|
@ -124,7 +124,6 @@ class Action extends HTMLOutputter // lawsuit
|
||||
$this->showShortcutIcon();
|
||||
$this->showStylesheets();
|
||||
$this->showScripts();
|
||||
$this->showRelationshipLinks();
|
||||
$this->showOpenSearch();
|
||||
$this->showFeeds();
|
||||
$this->showDescription();
|
||||
@ -267,19 +266,6 @@ class Action extends HTMLOutputter // lawsuit
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Show document relationship links
|
||||
*
|
||||
* SHOULD overload
|
||||
*
|
||||
* @return nothing
|
||||
*/
|
||||
function showRelationshipLinks()
|
||||
{
|
||||
// output <link> elements with appropriate HTML4.01 link types:
|
||||
// http://www.w3.org/TR/html401/types.html#type-links
|
||||
}
|
||||
|
||||
/**
|
||||
* Show OpenSearch headers
|
||||
*
|
||||
@ -1063,36 +1049,4 @@ class Action extends HTMLOutputter // lawsuit
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate document metadata for sequential navigation
|
||||
*
|
||||
* @param boolean $have_before is there something before?
|
||||
* @param boolean $have_after is there something after?
|
||||
* @param integer $page current page
|
||||
* @param string $action current action
|
||||
* @param array $args rest of query arguments
|
||||
*
|
||||
* @return nothing
|
||||
*/
|
||||
function sequenceRelationships($have_next, $have_previous, $page, $action, $args=null)
|
||||
{
|
||||
// Outputs machine-readable pagination in <link> elements.
|
||||
// Pattern taken from $this->pagination() method.
|
||||
|
||||
// "next" is equivalent to "after"
|
||||
if ($have_next) {
|
||||
$pargs = array('page' => $page-1);
|
||||
$this->element('link', array('rel' => 'next',
|
||||
'href' => common_local_url($action, $args, $pargs),
|
||||
'title' => _('Next')));
|
||||
}
|
||||
// "previous" is equivalent to "before"
|
||||
if ($have_previous=true) { // FIXME
|
||||
$pargs = array('page' => $page+1);
|
||||
$this->element('link', array('rel' => 'prev',
|
||||
'href' => common_local_url($action, $args, $pargs),
|
||||
'title' => _('Previous')));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user