Merge branch 'nightly' into deletenotice_form_fix

This commit is contained in:
Mikael Nordfeldth 2015-07-11 10:49:41 +02:00
commit 2a1be57470
83 changed files with 115 additions and 224 deletions

View File

@ -17,24 +17,22 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } if (!defined('GNUSOCIAL')) { exit(1); }
define('LISTENER', 1); define('LISTENER', 1);
define('LISTENEE', -1); define('LISTENEE', -1);
define('BOTH', 0); define('BOTH', 0);
// @todo XXX: Documentation missing. // @todo XXX: Documentation missing.
class FoafAction extends Action class FoafAction extends ManagedAction
{ {
function isReadOnly($args) function isReadOnly($args)
{ {
return true; return true;
} }
function prepare($args) protected function doPreparation()
{ {
parent::prepare($args);
$nickname_arg = $this->arg('nickname'); $nickname_arg = $this->arg('nickname');
if (empty($nickname_arg)) { if (empty($nickname_arg)) {
@ -69,10 +67,8 @@ class FoafAction extends Action
return true; return true;
} }
function handle($args) public function showPage()
{ {
parent::handle($args);
header('Content-Type: application/rdf+xml'); header('Content-Type: application/rdf+xml');
$this->startXML(); $this->startXML();

View File

@ -28,9 +28,7 @@
* @link http://status.net/ * @link http://status.net/
*/ */
if (!defined('STATUSNET') && !defined('LACONICA')) { if (!defined('GNUSOCIAL')) { exit(1); }
exit(1);
}
/** /**
* A list of the user's subscriptions * A list of the user's subscriptions
@ -60,7 +58,7 @@ class SubscriptionsAction extends GalleryAction
function showPageNotice() function showPageNotice()
{ {
if ($this->scoped instanceof Profile && $this->scoped->id === $this->target->id) { if ($this->scoped instanceof Profile && $this->scoped->sameAs($this->getTarget())) {
$this->element('p', null, $this->element('p', null,
// TRANS: Page notice for page with an overview of all subscriptions // TRANS: Page notice for page with an overview of all subscriptions
// TRANS: of the logged in user's own profile. // TRANS: of the logged in user's own profile.

View File

@ -52,12 +52,12 @@ class UsergroupsAction extends GalleryAction
if ($this->page == 1) { if ($this->page == 1) {
// TRANS: Page title for first page of groups for a user. // TRANS: Page title for first page of groups for a user.
// TRANS: %s is a nickname. // TRANS: %s is a nickname.
return sprintf(_('%s groups'), $this->user->nickname); return sprintf(_('%s groups'), $this->getTarget()->getNickname());
} else { } else {
// TRANS: Page title for all but the first page of groups for a user. // TRANS: Page title for all but the first page of groups for a user.
// TRANS: %1$s is a nickname, %2$d is a page number. // TRANS: %1$s is a nickname, %2$d is a page number.
return sprintf(_('%1$s groups, page %2$d'), return sprintf(_('%1$s groups, page %2$d'),
$this->user->nickname, $this->getTarget()->getNickname(),
$this->page); $this->page);
} }
} }
@ -82,14 +82,14 @@ class UsergroupsAction extends GalleryAction
$offset = ($this->page-1) * GROUPS_PER_PAGE; $offset = ($this->page-1) * GROUPS_PER_PAGE;
$limit = GROUPS_PER_PAGE + 1; $limit = GROUPS_PER_PAGE + 1;
$groups = $this->user->getGroups($offset, $limit); $groups = $this->getTarget()->getGroups($offset, $limit);
if ($groups instanceof User_group) { if ($groups instanceof User_group) {
$gl = new GroupList($groups, $this->user, $this); $gl = new GroupList($groups, $this->getTarget(), $this);
$cnt = $gl->show(); $cnt = $gl->show();
$this->pagination($this->page > 1, $cnt > GROUPS_PER_PAGE, $this->pagination($this->page > 1, $cnt > GROUPS_PER_PAGE,
$this->page, 'usergroups', $this->page, 'usergroups',
array('nickname' => $this->user->nickname)); array('nickname' => $this->getTarget()->getNickname()));
} else { } else {
$this->showEmptyListMessage(); $this->showEmptyListMessage();
} }
@ -102,11 +102,11 @@ class UsergroupsAction extends GalleryAction
{ {
// TRANS: Text on group page for a user that is not a member of any group. // TRANS: Text on group page for a user that is not a member of any group.
// TRANS: %s is a user nickname. // TRANS: %s is a user nickname.
$message = sprintf(_('%s is not a member of any group.'), $this->user->nickname) . ' '; $message = sprintf(_('%s is not a member of any group.'), $this->getTarget()->getNickname()) . ' ';
if (common_logged_in()) { if (common_logged_in()) {
$current_user = common_current_user(); $current_user = common_current_user();
if ($this->user->id === $current_user->id) { if ($this->scoped->sameAs($this->getTarget())) {
// TRANS: Text on group page for a user that is not a member of any group. This message contains // TRANS: Text on group page for a user that is not a member of any group. This message contains
// TRANS: a Markdown link in the form [link text](link) and a variable that should not be changed. // TRANS: a Markdown link in the form [link text](link) and a variable that should not be changed.
$message .= _('Try [searching for groups](%%action.groupsearch%%) and joining them.'); $message .= _('Try [searching for groups](%%action.groupsearch%%) and joining them.');
@ -119,7 +119,7 @@ class UsergroupsAction extends GalleryAction
function showProfileBlock() function showProfileBlock()
{ {
$block = new AccountProfileBlock($this, $this->profile); $block = new AccountProfileBlock($this, $this->getTarget());
$block->show(); $block->show();
} }
} }

0
avatar/.gitignore vendored Executable file → Normal file
View File

View File

@ -1230,7 +1230,7 @@ class Notice extends Managed_DataObject
} }
$stream = new ConversationNoticeStream($this->conversation); $stream = new ConversationNoticeStream($this->conversation);
$notices = $stream->getNotices(/*offset*/ 1, /*limit*/ 1); $notice = $stream->getNotices(/*offset*/ 1, /*limit*/ 1);
// if our "offset 1, limit 1" query got a result, return true else false // if our "offset 1, limit 1" query got a result, return true else false
return $notice->N > 0; return $notice->N > 0;

View File

@ -47,10 +47,10 @@ class Subscription_queue extends Managed_DataObject
return $rq; return $rq;
} }
public function exists(Profile $subscriber, Profile $other) static function exists(Profile $subscriber, Profile $other)
{ {
$sub = Subscription_queue::pkeyGet(array('subscriber' => $subscriber->id, $sub = Subscription_queue::pkeyGet(array('subscriber' => $subscriber->getID(),
'subscribed' => $other->id)); 'subscribed' => $other->getID()));
return ($sub instanceof Subscription_queue); return ($sub instanceof Subscription_queue);
} }

0
extlib/DB/DataObject.php Executable file → Normal file
View File

0
extlib/DB/DataObject/Cast.php Executable file → Normal file
View File

0
extlib/DB/DataObject/Error.php Executable file → Normal file
View File

0
extlib/DB/DataObject/Generator.php Executable file → Normal file
View File

0
extlib/Mail.php Executable file → Normal file
View File

0
extlib/Mail/RFC822.php Executable file → Normal file
View File

0
extlib/Mail/mail.php Executable file → Normal file
View File

0
extlib/Mail/mock.php Executable file → Normal file
View File

0
extlib/Mail/null.php Executable file → Normal file
View File

0
extlib/Mail/sendmail.php Executable file → Normal file
View File

0
extlib/Mail/smtp.php Executable file → Normal file
View File

0
extlib/Mail/smtpmx.php Executable file → Normal file
View File

0
extlib/Net/URL2.php Executable file → Normal file
View File

View File

@ -1081,12 +1081,12 @@ var SN = { // StatusNet
label.attr('title', label.text()); label.attr('title', label.text());
check.change(function () { check.change(function () {
if (check.prop('checked') === true || $.cookie(SN.C.S.NoticeDataGeoCookie) === null) { if (check.prop('checked') === true || $.cookie(SN.C.S.NoticeDataGeoCookie) === undefined) {
label label
.attr('title', NoticeDataGeo_text.ShareDisable) .attr('title', NoticeDataGeo_text.ShareDisable)
.addClass('checked'); .addClass('checked');
if ($.cookie(SN.C.S.NoticeDataGeoCookie) === null || $.cookie(SN.C.S.NoticeDataGeoCookie) == 'disabled') { if ($.cookie(SN.C.S.NoticeDataGeoCookie) === undefined || $.cookie(SN.C.S.NoticeDataGeoCookie) == 'disabled') {
if (navigator.geolocation) { if (navigator.geolocation) {
SN.U.NoticeGeoStatus(form, 'Requesting location from browser...'); SN.U.NoticeGeoStatus(form, 'Requesting location from browser...');
navigator.geolocation.getCurrentPosition( navigator.geolocation.getCurrentPosition(
@ -1297,7 +1297,7 @@ var SN = { // StatusNet
* @fixme what is this? * @fixme what is this?
*/ */
Delete: function () { Delete: function () {
$.cookie(SN.C.S.StatusNetInstance, null); $.removeCookie(SN.C.S.StatusNetInstance);
} }
}, },

10
lib/apiaction.php Executable file → Normal file
View File

@ -248,7 +248,7 @@ class ApiAction extends Action
$twitter_user['friends_count'] = $profile->subscriptionCount(); $twitter_user['friends_count'] = $profile->subscriptionCount();
$twitter_user['created_at'] = $this->dateTwitter($profile->created); $twitter_user['created_at'] = self::dateTwitter($profile->created);
$timezone = 'UTC'; $timezone = 'UTC';
@ -322,7 +322,7 @@ class ApiAction extends Action
$twitter_status = array(); $twitter_status = array();
$twitter_status['text'] = $notice->content; $twitter_status['text'] = $notice->content;
$twitter_status['truncated'] = false; # Not possible on StatusNet $twitter_status['truncated'] = false; # Not possible on StatusNet
$twitter_status['created_at'] = $this->dateTwitter($notice->created); $twitter_status['created_at'] = self::dateTwitter($notice->created);
try { try {
// We could just do $notice->reply_to but maybe the future holds a // We could just do $notice->reply_to but maybe the future holds a
// different story for parenting. // different story for parenting.
@ -440,8 +440,8 @@ class ApiAction extends Action
$twitter_group['homepage'] = $group->homepage; $twitter_group['homepage'] = $group->homepage;
$twitter_group['description'] = $group->description; $twitter_group['description'] = $group->description;
$twitter_group['location'] = $group->location; $twitter_group['location'] = $group->location;
$twitter_group['created'] = $this->dateTwitter($group->created); $twitter_group['created'] = self::dateTwitter($group->created);
$twitter_group['modified'] = $this->dateTwitter($group->modified); $twitter_group['modified'] = self::dateTwitter($group->modified);
return $twitter_group; return $twitter_group;
} }
@ -1196,7 +1196,7 @@ class ApiAction extends Action
$this->endDocument('xml'); $this->endDocument('xml');
} }
function dateTwitter($dt) static function dateTwitter($dt)
{ {
$dateStr = date('d F Y H:i:s', strtotime($dt)); $dateStr = date('d F Y H:i:s', strtotime($dt));
$d = new DateTime($dateStr, new DateTimeZone('UTC')); $d = new DateTime($dateStr, new DateTimeZone('UTC'));

View File

@ -23,7 +23,7 @@ define('GNUSOCIAL_ENGINE', 'GNU social');
define('GNUSOCIAL_ENGINE_URL', 'https://www.gnu.org/software/social/'); define('GNUSOCIAL_ENGINE_URL', 'https://www.gnu.org/software/social/');
define('GNUSOCIAL_BASE_VERSION', '1.2.0'); define('GNUSOCIAL_BASE_VERSION', '1.2.0');
define('GNUSOCIAL_LIFECYCLE', 'alpha1'); // 'dev', 'alpha[0-9]+', 'beta[0-9]+', 'rc[0-9]+', 'release' define('GNUSOCIAL_LIFECYCLE', 'alpha2'); // 'dev', 'alpha[0-9]+', 'beta[0-9]+', 'rc[0-9]+', 'release'
define('GNUSOCIAL_VERSION', GNUSOCIAL_BASE_VERSION . '-' . GNUSOCIAL_LIFECYCLE); define('GNUSOCIAL_VERSION', GNUSOCIAL_BASE_VERSION . '-' . GNUSOCIAL_LIFECYCLE);

View File

@ -37,7 +37,8 @@ class ProfileListItem extends Widget
/** Action object using us. */ /** Action object using us. */
var $action = null; var $action = null;
function __construct(Profile $target, HTMLOutputter $action) // FIXME: Directory plugin sends a User_group here, but should send a Profile and handle User_group specifics itself
function __construct($target, HTMLOutputter $action)
{ {
parent::__construct($action); parent::__construct($action);

View File

@ -115,11 +115,10 @@ class TagCloudSection extends Section
function tagUrl($tag) function tagUrl($tag)
{ {
if ('showstream' === $this->out->trimmed('action')) { if ($this->out instanceof ShowstreamAction) {
return common_local_url('showstream', array('nickname' => $this->out->profile->nickname, 'tag' => $tag)); return common_local_url('showstream', array('nickname' => $this->out->getTarget()->getNickname(), 'tag' => $tag));
} else {
return common_local_url('tag', array('tag' => $tag));
} }
return common_local_url('tag', array('tag' => $tag));
} }
function divId() function divId()

View File

@ -0,0 +1,46 @@
<?php
/**
* StatusNet, the distributed open-source microblogging tool
*
* Base class for RSS 1.0 feed actions
*
* PHP version 5
*
* LICENCE: This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* @category Mail
* @package StatusNet
* @author Evan Prodromou <evan@status.net>
* @author Earle Martin <earle@downlode.org>
* @copyright 2008-9 StatusNet, Inc.
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
if (!defined('GNUSOCIAL')) { exit(1); }
class TargetedRss10Action extends Rss10Action
{
protected $target = null;
protected function doStreamPreparation()
{
$this->target = User::getByNickname($this->trimmed('nickname'))->getProfile();
}
function getImage()
{
return $this->target->avatarUrl(AVATAR_PROFILE_SIZE);
}
}

0
plugins/AntiBrute/AntiBrutePlugin.php Executable file → Normal file
View File

View File

@ -27,11 +27,7 @@
* @link http://status.net/ * @link http://status.net/
*/ */
if (!defined('STATUSNET')) { if (!defined('GNUSOCIAL')) { exit(1); }
exit(1);
}
require_once INSTALLDIR . '/lib/subscriptionlist.php';
/** /**
* Widget to show a sortable list of subscriptions * Widget to show a sortable list of subscriptions
@ -44,16 +40,6 @@ require_once INSTALLDIR . '/lib/subscriptionlist.php';
*/ */
class SortableGroupList extends SortableSubscriptionList class SortableGroupList extends SortableSubscriptionList
{ {
/** Owner of this list */
var $owner = null;
function __construct($profile, $owner=null, $action=null)
{
parent::__construct($profile, $owner, $action);
$this->owner = $owner;
}
function startList() function startList()
{ {
$this->out->elementStart('table', array('class' => 'profile_list xoxo')); $this->out->elementStart('table', array('class' => 'profile_list xoxo'));
@ -119,25 +105,14 @@ class SortableGroupList extends SortableSubscriptionList
$this->out->elementStart('tbody'); $this->out->elementStart('tbody');
} }
function newListItem($profile, $odd) function newListItem($profile)
{ {
return new SortableGroupListItem($profile, $this->owner, $this->action, $odd); return new SortableGroupListItem($profile, $this->owner, $this->action);
} }
} }
class SortableGroupListItem extends SortableSubscriptionListItem class SortableGroupListItem extends SortableSubscriptionListItem
{ {
/** Owner of this list */
var $owner = null;
function __construct($profile, $owner, $action, $alt)
{
parent::__construct($profile, $owner, $action, $alt);
$this->alt = $alt; // is this row alternate?
$this->owner = $owner;
}
function showHomepage() function showHomepage()
{ {
if (!empty($this->profile->homepage)) { if (!empty($this->profile->homepage)) {

View File

@ -40,16 +40,6 @@ if (!defined('GNUSOCIAL')) { exit(1); }
*/ */
class SortableSubscriptionList extends SubscriptionList class SortableSubscriptionList extends SubscriptionList
{ {
/** Owner of this list */
var $owner = null;
function __construct($profile, $owner=null, $action=null)
{
parent::__construct($profile, $owner, $action);
$this->owner = $owner;
}
function startList() function startList()
{ {
$this->out->elementStart('table', array('class' => 'profile_list xoxo')); $this->out->elementStart('table', array('class' => 'profile_list xoxo'));
@ -132,16 +122,6 @@ class SortableSubscriptionList extends SubscriptionList
class SortableSubscriptionListItem extends SubscriptionListItem class SortableSubscriptionListItem extends SubscriptionListItem
{ {
/** Owner of this list */
var $owner = null;
function __construct($profile, $owner, $action)
{
parent::__construct($profile, $owner, $action);
$this->owner = $owner;
}
function startItem() function startItem()
{ {
$attr = array( $attr = array(

View File

0
plugins/DomainStatusNetwork/scripts/proposesite.php Normal file → Executable file
View File

0
plugins/DomainStatusNetwork/scripts/sitefordomain.php Normal file → Executable file
View File

View File

View File

0
plugins/EmailReminder/scripts/sendemailreminder.php Normal file → Executable file
View File

View File

@ -27,13 +27,7 @@
* @link http://status.net/ * @link http://status.net/
*/ */
if (!defined('STATUSNET') && !defined('LACONICA')) { if (!defined('GNUSOCIAL')) { exit(1); }
exit(1);
}
require_once INSTALLDIR.'/lib/personalgroupnav.php';
require_once INSTALLDIR.'/lib/noticelist.php';
require_once INSTALLDIR.'/lib/feedlist.php';
/** /**
* List of replies * List of replies
@ -44,119 +38,29 @@ require_once INSTALLDIR.'/lib/feedlist.php';
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/ * @link http://status.net/
*/ */
class ShowfavoritesAction extends Action class ShowfavoritesAction extends ShowstreamAction
{ {
/** User we're getting the faves of */
var $user = null;
/** Page of the faves we're on */
var $page = null;
/**
* Is this a read-only page?
*
* @return boolean true
*/
function isReadOnly($args)
{
return true;
}
/**
* Title of the page
*
* Includes name of user and page number.
*
* @return string title of page
*/
function title() function title()
{ {
if ($this->page == 1) { if ($this->page == 1) {
// TRANS: Title for first page of favourite notices of a user. // TRANS: Title for first page of favourite notices of a user.
// TRANS: %s is the user for whom the favourite notices are displayed. // TRANS: %s is the user for whom the favourite notices are displayed.
return sprintf(_('%s\'s favorite notices'), $this->user->nickname); return sprintf(_('%s\'s favorite notices'), $this->getTarget()->getNickname());
} else { } else {
// TRANS: Title for all but the first page of favourite notices of a user. // TRANS: Title for all but the first page of favourite notices of a user.
// TRANS: %1$s is the user for whom the favourite notices are displayed, %2$d is the page number. // TRANS: %1$s is the user for whom the favourite notices are displayed, %2$d is the page number.
return sprintf(_('%1$s\'s favorite notices, page %2$d'), return sprintf(_('%1$s\'s favorite notices, page %2$d'),
$this->user->nickname, $this->getTarget()->getNickname(),
$this->page); $this->page);
} }
} }
/** public function getStream()
* Prepare the object
*
* Check the input values and initialize the object.
* Shows an error page on bad input.
*
* @param array $args $_REQUEST data
*
* @return boolean success flag
*/
function prepare($args)
{ {
parent::prepare($args); $own = $this->scoped instanceof Profile ? $this->scoped->sameAs($this->getTarget()) : false;
return new FaveNoticeStream($this->getTarget()->getID(), $own);
$nickname = common_canonical_nickname($this->arg('nickname'));
$this->user = User::getKV('nickname', $nickname);
if (!$this->user) {
// TRANS: Client error displayed when trying to display favourite notices for a non-existing user.
$this->clientError(_('No such user.'));
}
$this->page = $this->trimmed('page');
if (!$this->page) {
$this->page = 1;
}
common_set_returnto($this->selfUrl());
$cur = common_current_user();
// Show imported/gateway notices as well as local if
// the user is looking at their own favorites, otherwise not.
$this->notice = Fave::stream($this->user->id,
($this->page-1)*NOTICES_PER_PAGE, // offset
NOTICES_PER_PAGE + 1, // limit
(!empty($cur) && $cur->id == $this->user->id) // own feed?
);
if (empty($this->notice)) {
// TRANS: Server error displayed when favourite notices could not be retrieved from the database.
$this->serverError(_('Could not retrieve favorite notices.'));
}
if($this->page > 1 && $this->notice->N == 0){
// TRANS: Client error when page not found (404)
$this->clientError(_('No such page.'), 404);
}
return true;
} }
/**
* Handle a request
*
* Just show the page. All args already handled.
*
* @param array $args $_REQUEST data
*
* @return void
*/
function handle($args)
{
parent::handle($args);
$this->showPage();
}
/**
* Feeds for the <head> section
*
* @return array Feed objects to show
*/
function getFeeds() function getFeeds()
{ {
return array(new Feed(Feed::JSON, return array(new Feed(Feed::JSON,
@ -223,7 +127,7 @@ class ShowfavoritesAction extends Action
* *
* @return void * @return void
*/ */
function showContent() function showNotices()
{ {
$nl = new FavoritesNoticeList($this->notice, $this); $nl = new FavoritesNoticeList($this->notice, $this);
@ -234,7 +138,7 @@ class ShowfavoritesAction extends Action
$this->pagination($this->page > 1, $cnt > NOTICES_PER_PAGE, $this->pagination($this->page > 1, $cnt > NOTICES_PER_PAGE,
$this->page, 'showfavorites', $this->page, 'showfavorites',
array('nickname' => $this->user->nickname)); array('nickname' => $this->getTarget()->getNickname()));
} }
function showPageNotice() { function showPageNotice() {

0
plugins/FeedPoller/scripts/pollfeed.php Normal file → Executable file
View File

View File

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

@ -1072,7 +1072,7 @@ class OStatusPlugin extends Plugin
$action->elementStart('div', 'entity_actions'); $action->elementStart('div', 'entity_actions');
$action->elementStart('p', array('id' => 'entity_remote_subscribe', $action->elementStart('p', array('id' => 'entity_remote_subscribe',
'class' => 'entity_subscribe')); 'class' => 'entity_subscribe'));
$action->element('a', array('href' => common_local_url($action->getTarget()), $action->element('a', array('href' => common_local_url($target),
'class' => 'entity_remote_subscribe'), 'class' => 'entity_remote_subscribe'),
// TRANS: Link text for link to remote subscribe. // TRANS: Link text for link to remote subscribe.
_m('Remote')); _m('Remote'));

0
plugins/OStatus/extlib/phpseclib/Crypt/RC2.php Executable file → Normal file
View File

View File

@ -50,8 +50,8 @@ class MagicEnvelope
*/ */
public function __construct($xml=null) { public function __construct($xml=null) {
if (!empty($xml)) { if (!empty($xml)) {
$dom = DOMDocument::loadXML($xml); $dom = new DOMDocument();
if (!$dom instanceof DOMDocument) { if (!$dom->loadXML($xml)) {
throw new ServerException('Tried to load malformed XML as DOM'); throw new ServerException('Tried to load malformed XML as DOM');
} elseif (!$this->fromDom($dom)) { } elseif (!$this->fromDom($dom)) {
throw new ServerException('Could not load MagicEnvelope from DOM'); throw new ServerException('Could not load MagicEnvelope from DOM');

0
plugins/OStatus/scripts/fixup-shadow.php Normal file → Executable file
View File

0
plugins/OStatus/scripts/gcfeeds.php Normal file → Executable file
View File

0
plugins/OStatus/scripts/renew-feeds.php Normal file → Executable file
View File

0
plugins/OStatus/scripts/resub-feed.php Normal file → Executable file
View File

0
plugins/OStatus/scripts/rm_bad_feedsubs.php Normal file → Executable file
View File

0
plugins/OStatus/scripts/testfeed.php Normal file → Executable file
View File

0
plugins/OStatus/scripts/update-profile-data.php Normal file → Executable file
View File

0
plugins/OStatus/scripts/update-profile.php Normal file → Executable file
View File

0
plugins/OStatus/scripts/update_ostatus_profiles.php Normal file → Executable file
View File

0
plugins/OStatus/tests/slap.php Normal file → Executable file
View File

0
plugins/Realtime/scripts/cleanupchannels.php Normal file → Executable file
View File

View File

View File

@ -28,9 +28,7 @@
* @link http://status.net/ * @link http://status.net/
*/ */
if (!defined('STATUSNET') && !defined('LACONICA')) { if (!defined('GNUSOCIAL')) { exit(1); }
exit(1);
}
/** /**
* A list of the user's subscriptions * A list of the user's subscriptions
@ -48,20 +46,19 @@ class SearchSubsAction extends GalleryAction
if ($this->page == 1) { if ($this->page == 1) {
// TRANS: Header for subscriptions overview for a user (first page). // TRANS: Header for subscriptions overview for a user (first page).
// TRANS: %s is a user nickname. // TRANS: %s is a user nickname.
return sprintf(_m('%s\'s search subscriptions'), $this->user->nickname); return sprintf(_m('%s\'s search subscriptions'), $this->getTarget()->getNickname());
} else { } else {
// TRANS: Header for subscriptions overview for a user (not first page). // TRANS: Header for subscriptions overview for a user (not first page).
// TRANS: %1$s is a user nickname, %2$d is the page number. // TRANS: %1$s is a user nickname, %2$d is the page number.
return sprintf(_m('%1$s\'s search subscriptions, page %2$d'), return sprintf(_m('%1$s\'s search subscriptions, page %2$d'),
$this->user->nickname, $this->getTarget()->getNickname(),
$this->page); $this->page);
} }
} }
function showPageNotice() function showPageNotice()
{ {
$user = common_current_user(); if ($this->scoped instanceof Profile && $this->scoped->sameAs($this->getTarget())) {
if ($user && ($user->id == $this->profile->id)) {
$this->element('p', null, $this->element('p', null,
// TRANS: Page notice for page with an overview of all search subscriptions // TRANS: Page notice for page with an overview of all search subscriptions
// TRANS: of the logged in user's own profile. // TRANS: of the logged in user's own profile.
@ -71,7 +68,7 @@ class SearchSubsAction extends GalleryAction
// TRANS: Page notice for page with an overview of all subscriptions of a user other // TRANS: Page notice for page with an overview of all subscriptions of a user other
// TRANS: than the logged in user. %s is the user nickname. // TRANS: than the logged in user. %s is the user nickname.
sprintf(_m('%s has subscribed to receive all notices on this site matching the following searches:'), sprintf(_m('%s has subscribed to receive all notices on this site matching the following searches:'),
$this->profile->nickname)); $this->getTarget()->getNickname()));
} }
} }
@ -86,12 +83,12 @@ class SearchSubsAction extends GalleryAction
$cnt = 0; $cnt = 0;
$searchsub = new SearchSub(); $searchsub = new SearchSub();
$searchsub->profile_id = $this->user->id; $searchsub->profile_id = $this->getTarget()->getID();
$searchsub->limit($limit, $offset); $searchsub->limit($limit, $offset);
$searchsub->find(); $searchsub->find();
if ($searchsub->N) { if ($searchsub->N) {
$list = new SearchSubscriptionsList($searchsub, $this->user, $this); $list = new SearchSubscriptionsList($searchsub, $this->getTarget(), $this);
$cnt = $list->show(); $cnt = $list->show();
if (0 == $cnt) { if (0 == $cnt) {
$this->showEmptyListMessage(); $this->showEmptyListMessage();
@ -102,7 +99,7 @@ class SearchSubsAction extends GalleryAction
$this->pagination($this->page > 1, $cnt > PROFILES_PER_PAGE, $this->pagination($this->page > 1, $cnt > PROFILES_PER_PAGE,
$this->page, 'searchsubs', $this->page, 'searchsubs',
array('nickname' => $this->user->nickname)); array('nickname' => $this->getTarget()->getNickname()));
Event::handle('EndShowTagSubscriptionsContent', array($this)); Event::handle('EndShowTagSubscriptionsContent', array($this));
@ -112,8 +109,7 @@ class SearchSubsAction extends GalleryAction
function showEmptyListMessage() function showEmptyListMessage()
{ {
if (common_logged_in()) { if (common_logged_in()) {
$current_user = common_current_user(); if ($this->scoped->sameAs($this->getTarget())) {
if ($this->user->id === $current_user->id) {
// TRANS: Search subscription list text when the logged in user has no search subscriptions. // TRANS: Search subscription list text when the logged in user has no search subscriptions.
$message = _m('You are not subscribed to any text searches right now. You can push the "Subscribe" button ' . $message = _m('You are not subscribed to any text searches right now. You can push the "Subscribe" button ' .
'on any notice text search to automatically receive any public messages on this site that match that ' . 'on any notice text search to automatically receive any public messages on this site that match that ' .
@ -121,13 +117,13 @@ class SearchSubsAction extends GalleryAction
} else { } else {
// TRANS: Search subscription list text when looking at the subscriptions for a of a user other // TRANS: Search subscription list text when looking at the subscriptions for a of a user other
// TRANS: than the logged in user that has no search subscriptions. %s is the user nickname. // TRANS: than the logged in user that has no search subscriptions. %s is the user nickname.
$message = sprintf(_m('%s is not subscribed to any searches.'), $this->user->nickname); $message = sprintf(_m('%s is not subscribed to any searches.'), $this->getTarget()->getNickname());
} }
} }
else { else {
// TRANS: Subscription list text when looking at the subscriptions for a of a user that has none // TRANS: Subscription list text when looking at the subscriptions for a of a user that has none
// TRANS: as an anonymous user. %s is the user nickname. // TRANS: as an anonymous user. %s is the user nickname.
$message = sprintf(_m('%s is not subscribed to any searches.'), $this->user->nickname); $message = sprintf(_m('%s is not subscribed to any searches.'), $this->getTarget()->getNickname());
} }
$this->elementStart('div', 'guide'); $this->elementStart('div', 'guide');

0
plugins/Sitemap/scripts/updatecounts.php Normal file → Executable file
View File

View File

@ -28,9 +28,7 @@
* @link http://status.net/ * @link http://status.net/
*/ */
if (!defined('STATUSNET') && !defined('LACONICA')) { if (!defined('GNUSOCIAL')) { exit(1); }
exit(1);
}
/** /**
* A list of the user's subscriptions * A list of the user's subscriptions
@ -48,20 +46,19 @@ class TagSubsAction extends GalleryAction
if ($this->page == 1) { if ($this->page == 1) {
// TRANS: Header for subscriptions overview for a user (first page). // TRANS: Header for subscriptions overview for a user (first page).
// TRANS: %s is a user nickname. // TRANS: %s is a user nickname.
return sprintf(_m('%s\'s tag subscriptions'), $this->user->nickname); return sprintf(_m('%s\'s tag subscriptions'), $this->getTarget()->getNickname());
} else { } else {
// TRANS: Header for subscriptions overview for a user (not first page). // TRANS: Header for subscriptions overview for a user (not first page).
// TRANS: %1$s is a user nickname, %2$d is the page number. // TRANS: %1$s is a user nickname, %2$d is the page number.
return sprintf(_m('%1$s\'s tag subscriptions, page %2$d'), return sprintf(_m('%1$s\'s tag subscriptions, page %2$d'),
$this->user->nickname, $this->getTarget()->getNickname(),
$this->page); $this->page);
} }
} }
function showPageNotice() function showPageNotice()
{ {
$user = common_current_user(); if ($this->scoped instanceof Profile && $this->scoped->sameAs($this->getTarget())) {
if ($user && ($user->id == $this->profile->id)) {
$this->element('p', null, $this->element('p', null,
// TRANS: Page notice for page with an overview of all tag subscriptions // TRANS: Page notice for page with an overview of all tag subscriptions
// TRANS: of the logged in user's own profile. // TRANS: of the logged in user's own profile.
@ -71,7 +68,7 @@ class TagSubsAction extends GalleryAction
// TRANS: Page notice for page with an overview of all subscriptions of a user other // TRANS: Page notice for page with an overview of all subscriptions of a user other
// TRANS: than the logged in user. %s is the user nickname. // TRANS: than the logged in user. %s is the user nickname.
sprintf(_m('%s has subscribed to receive all notices on this site containing the following tags:'), sprintf(_m('%s has subscribed to receive all notices on this site containing the following tags:'),
$this->profile->nickname)); $this->getTarget()->getNickname()));
} }
} }
@ -86,12 +83,12 @@ class TagSubsAction extends GalleryAction
$cnt = 0; $cnt = 0;
$tagsub = new TagSub(); $tagsub = new TagSub();
$tagsub->profile_id = $this->user->id; $tagsub->profile_id = $this->getTarget()->getID();
$tagsub->limit($limit, $offset); $tagsub->limit($limit, $offset);
$tagsub->find(); $tagsub->find();
if ($tagsub->N) { if ($tagsub->N) {
$list = new TagSubscriptionsList($tagsub, $this->user, $this); $list = new TagSubscriptionsList($tagsub, $this->getTarget(), $this);
$cnt = $list->show(); $cnt = $list->show();
if (0 == $cnt) { if (0 == $cnt) {
$this->showEmptyListMessage(); $this->showEmptyListMessage();
@ -102,7 +99,7 @@ class TagSubsAction extends GalleryAction
$this->pagination($this->page > 1, $cnt > PROFILES_PER_PAGE, $this->pagination($this->page > 1, $cnt > PROFILES_PER_PAGE,
$this->page, 'tagsubs', $this->page, 'tagsubs',
array('nickname' => $this->user->nickname)); array('nickname' => $this->getTarget()->getNickname()));
Event::handle('EndShowTagSubscriptionsContent', array($this)); Event::handle('EndShowTagSubscriptionsContent', array($this));
@ -112,8 +109,7 @@ class TagSubsAction extends GalleryAction
function showEmptyListMessage() function showEmptyListMessage()
{ {
if (common_logged_in()) { if (common_logged_in()) {
$current_user = common_current_user(); if ($this->scoped->sameAs($this->getTarget())) {
if ($this->user->id === $current_user->id) {
// TRANS: Tag subscription list text when the logged in user has no tag subscriptions. // TRANS: Tag subscription list text when the logged in user has no tag subscriptions.
$message = _m('You are not listening to any hash tags right now. You can push the "Subscribe" button ' . $message = _m('You are not listening to any hash tags right now. You can push the "Subscribe" button ' .
'on any hashtag page to automatically receive any public messages on this site that use that ' . 'on any hashtag page to automatically receive any public messages on this site that use that ' .
@ -121,13 +117,13 @@ class TagSubsAction extends GalleryAction
} else { } else {
// TRANS: Tag subscription list text when looking at the subscriptions for a of a user other // TRANS: Tag subscription list text when looking at the subscriptions for a of a user other
// TRANS: than the logged in user that has no tag subscriptions. %s is the user nickname. // TRANS: than the logged in user that has no tag subscriptions. %s is the user nickname.
$message = sprintf(_m('%s is not following any tags.'), $this->user->nickname); $message = sprintf(_m('%s is not following any tags.'), $this->getTarget()->getNickname());
} }
} }
else { else {
// TRANS: Subscription list text when looking at the subscriptions for a of a user that has none // TRANS: Subscription list text when looking at the subscriptions for a of a user that has none
// TRANS: as an anonymous user. %s is the user nickname. // TRANS: as an anonymous user. %s is the user nickname.
$message = sprintf(_m('%s is not following any tags.'), $this->user->nickname); $message = sprintf(_m('%s is not following any tags.'), $this->getTarget()->getNickname());
} }
$this->elementStart('div', 'guide'); $this->elementStart('div', 'guide');

0
plugins/TwitterBridge/daemons/twitterdaemon.php Normal file → Executable file
View File

View File

0
scripts/clearcache.php Normal file → Executable file
View File

0
scripts/createsim.php Normal file → Executable file
View File

0
scripts/dumpschema.php Normal file → Executable file
View File

0
scripts/flushrouter.php Normal file → Executable file
View File

0
scripts/flushsite.php Normal file → Executable file
View File

0
scripts/gnusocialversion.php Normal file → Executable file
View File

0
scripts/importtwitteratom.php Normal file → Executable file
View File

0
scripts/make-release.php Normal file → Executable file
View File

0
scripts/makegroupadmin.php Normal file → Executable file
View File

0
scripts/registeruser.php Normal file → Executable file
View File

0
scripts/sessiongc.php Normal file → Executable file
View File

0
scripts/settag.php Normal file → Executable file
View File

0
scripts/showcache.php Normal file → Executable file
View File

0
scripts/showtable.php Normal file → Executable file
View File

0
scripts/uncache_users.php Normal file → Executable file
View File

0
scripts/updatelocation.php Normal file → Executable file
View File

0
scripts/updateurls.php Normal file → Executable file
View File

0
scripts/upgrade.php Normal file → Executable file
View File

0
scripts/userrole.php Normal file → Executable file
View File

0
tests/atompub/atompub_test.php Normal file → Executable file
View File

0
tests/oauth/oauth_post_notice.php Normal file → Executable file
View File

0
theme/neo-quitter/LICENSE Executable file → Normal file
View File

0
theme/neo-quitter/default-avatar-mini.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

0
theme/neo-quitter/default-avatar-profile.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 8.9 KiB

After

Width:  |  Height:  |  Size: 8.9 KiB

0
theme/neo-quitter/default-avatar-stream.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

0
theme/neo-quitter/favicon.ico Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB