Merge branch 'fatals' into 0.9.x

This commit is contained in:
Brion Vibber 2010-10-08 11:28:51 -07:00
commit 67dc78b621
38 changed files with 134 additions and 31 deletions

View File

@ -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;

View File

@ -27,6 +27,10 @@
* @link http://status.net/
*/
if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR . '/plugins/Facebook/FacebookPlugin.php';
class FBConnectauthAction extends Action

View File

@ -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();

View File

@ -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';

View File

@ -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
{

View File

@ -29,6 +29,10 @@
* @link http://status.net/
*/
if (!defined('STATUSNET')) {
exit(1);
}
class ImapManager extends IoManager
{
protected $conn = null;

View File

@ -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/');

View File

@ -22,7 +22,9 @@
* @maintainer James Walker <james@status.net>
*/
if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
if (!defined('STATUSNET')) {
exit(1);
}
class HostMetaAction extends Action
{

View File

@ -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:

View File

@ -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
{

View File

@ -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:

View File

@ -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
{

View File

@ -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
{

View File

@ -23,6 +23,10 @@
* @maintainer Brion Vibber <brion@status.net>
*/
if (!defined('STATUSNET')) {
exit(1);
}
/**

View File

@ -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

View File

@ -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>

View File

@ -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

View File

@ -27,6 +27,10 @@
* @link http://status.net/
*/
if (!defined('STATUSNET')) {
exit(1);
}
require_once 'Crypt/RSA.php';
class Magicsig extends Memcached_DataObject

View File

@ -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>

View File

@ -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>

View File

@ -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
{

View File

@ -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

View File

@ -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

View File

@ -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...

View File

@ -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.
*

View File

@ -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

View File

@ -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

View File

@ -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
{

View File

@ -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
{

View File

@ -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
{

View File

@ -27,7 +27,7 @@
* @link http://status.net/
*/
if (!defined('STATUSNET') && !defined('LACONICA')) {
if (!defined('STATUSNET')) {
exit(1);
}

View File

@ -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';

View File

@ -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');

View File

@ -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';

View File

@ -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

View File

@ -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';
/**

View File

@ -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
{

View File

@ -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)) {