Merge branch '0.9.x' into 1.0.x
This commit is contained in:
commit
aa02f6020e
|
@ -45,6 +45,12 @@ class DeletenoticeAction extends Action
|
|||
parent::prepare($args);
|
||||
|
||||
$this->user = common_current_user();
|
||||
|
||||
if (!$this->user) {
|
||||
common_user_error(_('Not logged in.'));
|
||||
exit;
|
||||
}
|
||||
|
||||
$notice_id = $this->trimmed('notice');
|
||||
$this->notice = Notice::staticGet($notice_id);
|
||||
|
||||
|
@ -63,10 +69,7 @@ class DeletenoticeAction extends Action
|
|||
{
|
||||
parent::handle($args);
|
||||
|
||||
if (!common_logged_in()) {
|
||||
common_user_error(_('Not logged in.'));
|
||||
exit;
|
||||
} else if ($this->notice->profile_id != $this->user_profile->id &&
|
||||
if ($this->notice->profile_id != $this->user_profile->id &&
|
||||
!$this->user->hasRight(Right::DELETEOTHERSNOTICE)) {
|
||||
common_user_error(_('Can\'t delete this notice.'));
|
||||
exit;
|
||||
|
|
|
@ -24,7 +24,9 @@
|
|||
* @author Craig Andrews <candrews@integralblue.com>
|
||||
*/
|
||||
|
||||
if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
|
||||
if (!defined('STATUSNET')) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
class HostMetaAction extends Action
|
||||
{
|
||||
|
|
|
@ -27,6 +27,10 @@
|
|||
* @link http://status.net/
|
||||
*/
|
||||
|
||||
if (!defined('STATUSNET')) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
require_once INSTALLDIR . '/plugins/Facebook/FacebookPlugin.php';
|
||||
|
||||
class FBConnectauthAction extends Action
|
||||
|
|
|
@ -48,6 +48,12 @@ class FacebookremoveAction extends FacebookAction
|
|||
|
||||
$flink = Foreign_link::getByForeignID($this->arg('fb_sig_user'), 2);
|
||||
|
||||
if (!$flink) {
|
||||
common_log(LOG_ERR, "Tried to delete missing foreign_link entry with Facebook ID " . $this->arg('fb_sig_user'));
|
||||
$this->serverError(_m('Couldn\'t remove Facebook user: already deleted.'));
|
||||
return;
|
||||
}
|
||||
|
||||
common_debug("Removing foreign link to Facebook - local user ID: $flink->user_id, Facebook ID: $flink->foreign_id");
|
||||
|
||||
$result = $flink->delete();
|
||||
|
|
|
@ -17,6 +17,10 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
if (!defined('STATUSNET')) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
require_once INSTALLDIR . '/plugins/Facebook/facebook/facebook.php';
|
||||
require_once INSTALLDIR . '/plugins/Facebook/facebookaction.php';
|
||||
require_once INSTALLDIR . '/lib/noticelist.php';
|
||||
|
|
|
@ -17,7 +17,9 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
|
||||
if (!defined('STATUSNET')) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
class IMAPMailHandler extends MailHandler
|
||||
{
|
||||
|
|
|
@ -29,6 +29,10 @@
|
|||
* @link http://status.net/
|
||||
*/
|
||||
|
||||
if (!defined('STATUSNET')) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
class ImapManager extends IoManager
|
||||
{
|
||||
protected $conn = null;
|
||||
|
|
|
@ -22,7 +22,9 @@
|
|||
* @maintainer Brion Vibber <brion@status.net>
|
||||
*/
|
||||
|
||||
if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
|
||||
if (!defined('STATUSNET')) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
set_include_path(get_include_path() . PATH_SEPARATOR . dirname(__FILE__) . '/extlib/');
|
||||
|
||||
|
|
|
@ -22,7 +22,9 @@
|
|||
* @maintainer Brion Vibber <brion@status.net>
|
||||
*/
|
||||
|
||||
if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
|
||||
if (!defined('STATUSNET')) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Key UI methods:
|
||||
|
|
|
@ -22,8 +22,9 @@
|
|||
* @maintainer James Walker <james@status.net>
|
||||
*/
|
||||
|
||||
if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
|
||||
|
||||
if (!defined('STATUSNET')) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
class OStatusInitAction extends Action
|
||||
{
|
||||
|
|
|
@ -22,7 +22,9 @@
|
|||
* @maintainer Brion Vibber <brion@status.net>
|
||||
*/
|
||||
|
||||
if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
|
||||
if (!defined('STATUSNET')) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Key UI methods:
|
||||
|
|
|
@ -22,7 +22,9 @@
|
|||
* @maintainer James Walker <james@status.net>
|
||||
*/
|
||||
|
||||
if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
|
||||
if (!defined('STATUSNET')) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
class OwnerxrdAction extends XrdAction
|
||||
{
|
||||
|
|
|
@ -22,7 +22,9 @@
|
|||
* @maintainer Brion Vibber <brion@status.net>
|
||||
*/
|
||||
|
||||
if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
|
||||
if (!defined('STATUSNET')) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
class PushCallbackAction extends Action
|
||||
{
|
||||
|
|
|
@ -23,6 +23,10 @@
|
|||
* @maintainer Brion Vibber <brion@status.net>
|
||||
*/
|
||||
|
||||
if (!defined('STATUSNET')) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
|
||||
|
|
|
@ -17,7 +17,9 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
if (!defined('STATUSNET')) { exit(1); }
|
||||
if (!defined('STATUSNET')) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @package OStatusPlugin
|
||||
|
|
|
@ -17,6 +17,10 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
if (!defined('STATUSNET')) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @package OStatusPlugin
|
||||
* @maintainer Brion Vibber <brion@status.net>
|
||||
|
|
|
@ -17,6 +17,10 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
if (!defined('STATUSNET')) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* PuSH feed subscription record
|
||||
* @package Hub
|
||||
|
|
|
@ -27,6 +27,10 @@
|
|||
* @link http://status.net/
|
||||
*/
|
||||
|
||||
if (!defined('STATUSNET')) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
require_once 'Crypt/RSA.php';
|
||||
|
||||
class Magicsig extends Memcached_DataObject
|
||||
|
|
|
@ -17,6 +17,10 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
if (!defined('STATUSNET')) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @package OStatusPlugin
|
||||
* @maintainer Brion Vibber <brion@status.net>
|
||||
|
|
|
@ -17,6 +17,10 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
if (!defined('STATUSNET')) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @package OStatusPlugin
|
||||
* @maintainer Brion Vibber <brion@status.net>
|
||||
|
|
|
@ -22,7 +22,9 @@
|
|||
* @maintainer Brion Vibber <brion@status.net>
|
||||
*/
|
||||
|
||||
if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
|
||||
if (!defined('STATUSNET')) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
class FeedSubBadURLException extends FeedSubException
|
||||
{
|
||||
|
|
|
@ -17,6 +17,10 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
if (!defined('STATUSNET')) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Send a PuSH subscription verification from our internal hub.
|
||||
* @package Hub
|
||||
|
|
|
@ -17,6 +17,10 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
if (!defined('STATUSNET')) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Send a raw PuSH atom update from our internal hub.
|
||||
* @package Hub
|
||||
|
|
|
@ -17,6 +17,10 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
if (!defined('STATUSNET')) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* When we have a large batch of PuSH consumers, we break the data set
|
||||
* into smaller chunks. Enqueue final destinations...
|
||||
|
|
|
@ -17,6 +17,10 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
if (!defined('STATUSNET')) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepare PuSH and Salmon distributions for an outgoing message.
|
||||
*
|
||||
|
|
|
@ -17,6 +17,10 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
if (!defined('STATUSNET')) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Process a feed distribution POST from a PuSH hub.
|
||||
* @package FeedSub
|
||||
|
|
|
@ -17,6 +17,10 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
if (!defined('STATUSNET')) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Send a Salmon notification in the background.
|
||||
* @package OStatusPlugin
|
||||
|
|
|
@ -22,7 +22,9 @@
|
|||
* @maintainer James Walker <james@status.net>
|
||||
*/
|
||||
|
||||
if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
|
||||
if (!defined('STATUSNET')) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
class XrdAction extends Action
|
||||
{
|
||||
|
|
|
@ -2,7 +2,10 @@
|
|||
/**
|
||||
* Table Definition for user_openid
|
||||
*/
|
||||
require_once INSTALLDIR.'/classes/Memcached_DataObject.php';
|
||||
|
||||
if (!defined('STATUSNET')) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
class User_openid extends Memcached_DataObject
|
||||
{
|
||||
|
|
|
@ -2,7 +2,10 @@
|
|||
/**
|
||||
* Table Definition for user_openid_trustroot
|
||||
*/
|
||||
require_once INSTALLDIR.'/classes/Memcached_DataObject.php';
|
||||
|
||||
if (!defined('STATUSNET')) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
class User_openid_trustroot extends Memcached_DataObject
|
||||
{
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
* @link http://status.net/
|
||||
*/
|
||||
|
||||
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||
if (!defined('STATUSNET')) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
|
|
@ -17,7 +17,9 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
|
||||
if (!defined('STATUSNET')) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
require_once INSTALLDIR.'/plugins/OpenID/openid.php';
|
||||
|
||||
|
|
|
@ -17,9 +17,9 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
|
||||
|
||||
require_once(INSTALLDIR.'/plugins/OpenID/User_openid.php');
|
||||
if (!defined('STATUSNET')) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
require_once('Auth/OpenID.php');
|
||||
require_once('Auth/OpenID/Consumer.php');
|
||||
|
|
|
@ -17,7 +17,9 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
|
||||
if (!defined('STATUSNET')) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
require_once INSTALLDIR.'/plugins/OpenID/openid.php';
|
||||
|
||||
|
|
|
@ -28,13 +28,11 @@
|
|||
* @link http://status.net/
|
||||
*/
|
||||
|
||||
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||
if (!defined('STATUSNET')) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
require_once INSTALLDIR.'/lib/action.php';
|
||||
require_once INSTALLDIR.'/plugins/OpenID/openid.php';
|
||||
require_once(INSTALLDIR.'/plugins/OpenID/User_openid_trustroot.php');
|
||||
|
||||
/**
|
||||
* Settings for OpenID
|
||||
|
|
|
@ -27,11 +27,10 @@
|
|||
* @link http://status.net/
|
||||
*/
|
||||
|
||||
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||
if (!defined('STATUSNET')) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
require_once INSTALLDIR.'/lib/accountsettingsaction.php';
|
||||
require_once INSTALLDIR.'/plugins/OpenID/openid.php';
|
||||
|
||||
/**
|
||||
|
|
|
@ -17,10 +17,11 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
|
||||
if (!defined('STATUSNET')) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
require_once INSTALLDIR.'/plugins/OpenID/openid.php';
|
||||
require_once(INSTALLDIR.'/plugins/OpenID/User_openid_trustroot.php');
|
||||
|
||||
class OpenidtrustAction extends Action
|
||||
{
|
||||
|
|
|
@ -247,6 +247,11 @@ class TwittersettingsAction extends ConnectSettingsAction
|
|||
$user = common_current_user();
|
||||
$flink = Foreign_link::getByUserID($user->id, TWITTER_SERVICE);
|
||||
|
||||
if (empty($flink)) {
|
||||
$this->clientError(_m('No Twitter connection to remove.'));
|
||||
return;
|
||||
}
|
||||
|
||||
$result = $flink->safeDelete();
|
||||
|
||||
if (empty($result)) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user