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);
{
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;
* @author Craig Andrews <candrews@integralblue.com>
*/
-if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
+if (!defined('STATUSNET')) {
+ exit(1);
+}
class HostMetaAction extends Action
{
* @link http://status.net/
*/
+if (!defined('STATUSNET')) {
+ exit(1);
+}
+
require_once INSTALLDIR . '/plugins/Facebook/FacebookPlugin.php';
class FBConnectauthAction extends Action
$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();
* 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';
* 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
{
* @link http://status.net/
*/
+if (!defined('STATUSNET')) {
+ exit(1);
+}
+
class ImapManager extends IoManager
{
protected $conn = null;
* @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/');
* @maintainer Brion Vibber <brion@status.net>
*/
-if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
+if (!defined('STATUSNET')) {
+ exit(1);
+}
/**
* Key UI methods:
* @maintainer James Walker <james@status.net>
*/
-if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
-
+if (!defined('STATUSNET')) {
+ exit(1);
+}
class OStatusInitAction extends Action
{
* @maintainer Brion Vibber <brion@status.net>
*/
-if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
+if (!defined('STATUSNET')) {
+ exit(1);
+}
/**
* Key UI methods:
* @maintainer James Walker <james@status.net>
*/
-if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
+if (!defined('STATUSNET')) {
+ exit(1);
+}
class OwnerxrdAction extends XrdAction
{
* @maintainer Brion Vibber <brion@status.net>
*/
-if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
+if (!defined('STATUSNET')) {
+ exit(1);
+}
class PushCallbackAction extends Action
{
* @maintainer Brion Vibber <brion@status.net>
*/
+if (!defined('STATUSNET')) {
+ exit(1);
+}
+
/**
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-if (!defined('STATUSNET')) { exit(1); }
+if (!defined('STATUSNET')) {
+ exit(1);
+}
/**
* @package OStatusPlugin
* 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>
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+if (!defined('STATUSNET')) {
+ exit(1);
+}
+
/**
* PuSH feed subscription record
* @package Hub
* @link http://status.net/
*/
+if (!defined('STATUSNET')) {
+ exit(1);
+}
+
require_once 'Crypt/RSA.php';
class Magicsig extends Memcached_DataObject
* 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>
* 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>
* @maintainer Brion Vibber <brion@status.net>
*/
-if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
+if (!defined('STATUSNET')) {
+ exit(1);
+}
class FeedSubBadURLException extends FeedSubException
{
* 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
* 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
* 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...
* 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.
*
* 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
* 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
* @maintainer James Walker <james@status.net>
*/
-if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
+if (!defined('STATUSNET')) {
+ exit(1);
+}
class XrdAction extends Action
{
/**
* Table Definition for user_openid
*/
-require_once INSTALLDIR.'/classes/Memcached_DataObject.php';
+
+if (!defined('STATUSNET')) {
+ exit(1);
+}
class User_openid extends Memcached_DataObject
{
/**
* 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
{
* @link http://status.net/
*/
-if (!defined('STATUSNET') && !defined('LACONICA')) {
+if (!defined('STATUSNET')) {
exit(1);
}
* 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';
* 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');
* 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';
* @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
* @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';
/**
* 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
{
$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)) {