]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Merge branch '0.9.x' into 1.0.x
authorBrion Vibber <brion@pobox.com>
Fri, 8 Oct 2010 18:47:50 +0000 (11:47 -0700)
committerBrion Vibber <brion@pobox.com>
Fri, 8 Oct 2010 18:47:50 +0000 (11:47 -0700)
38 files changed:
actions/deletenotice.php
actions/hostmeta.php
plugins/Facebook/FBConnectAuth.php
plugins/Facebook/facebookremove.php
plugins/Facebook/facebookutil.php
plugins/Imap/imapmailhandler.php
plugins/Imap/imapmanager.php
plugins/OStatus/OStatusPlugin.php
plugins/OStatus/actions/ostatusgroup.php
plugins/OStatus/actions/ostatusinit.php
plugins/OStatus/actions/ostatussub.php
plugins/OStatus/actions/ownerxrd.php
plugins/OStatus/actions/pushcallback.php
plugins/OStatus/actions/pushhub.php
plugins/OStatus/actions/userxrd.php
plugins/OStatus/classes/FeedSub.php
plugins/OStatus/classes/HubSub.php
plugins/OStatus/classes/Magicsig.php
plugins/OStatus/classes/Ostatus_profile.php
plugins/OStatus/classes/Ostatus_source.php
plugins/OStatus/lib/feeddiscovery.php
plugins/OStatus/lib/hubconfqueuehandler.php
plugins/OStatus/lib/huboutqueuehandler.php
plugins/OStatus/lib/hubprepqueuehandler.php
plugins/OStatus/lib/ostatusqueuehandler.php
plugins/OStatus/lib/pushinqueuehandler.php
plugins/OStatus/lib/salmonqueuehandler.php
plugins/OStatus/lib/xrdaction.php
plugins/OpenID/User_openid.php
plugins/OpenID/User_openid_trustroot.php
plugins/OpenID/finishaddopenid.php
plugins/OpenID/finishopenidlogin.php
plugins/OpenID/openid.php
plugins/OpenID/openidlogin.php
plugins/OpenID/openidserver.php
plugins/OpenID/openidsettings.php
plugins/OpenID/openidtrust.php
plugins/TwitterBridge/twittersettings.php

index 68c43040b0a30e85923fbbf180c9e35521b72a37..2879faa5df70003521961f692049abe8bbc9619b 100644 (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;
index be73665f2962b708a1345a4555245d0bc46381a7..b7beee5a86d75faff99031962d079ff63a484dab 100644 (file)
@@ -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
 {
index f06dffaaabbd789a71b6f4ee535fc48ffba0cd85..d6d3786261e6ebc6f2ea91224e3966ca66df3423 100644 (file)
  * @link      http://status.net/
  */
 
+if (!defined('STATUSNET')) {
+    exit(1);
+}
+
 require_once INSTALLDIR . '/plugins/Facebook/FacebookPlugin.php';
 
 class FBConnectauthAction extends Action
index b048a435f5744bf98e344920ff9553193cb737f6..bc76daaef6f91d9d02a086fbb459f36e51161421 100644 (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();
index e78856f7c474eb0733e90109c685afcd5e88a1e8..fb70c51bc542efbb1d3f27adc7b07efb7d2e4742 100644 (file)
  * 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';
index 3d4b6113a9abf8c99e8fd6171dccf18702d47c2b..92abf64747846529dc21301a8774bffea90da658 100644 (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
 {
index c49c060921faafd8dbfc1798a7c9e3eedc0888f7..2d27ac97a87ecb37cdfa794e4726aa0007f4fa24 100644 (file)
  * @link      http://status.net/
  */
 
+if (!defined('STATUSNET')) {
+    exit(1);
+}
+
 class ImapManager extends IoManager
 {
     protected $conn = null;
index f7900110f3298d0ba4b6fdfc4e3a205cdb6c9248..e38d52d3d78cc5ef6b16919d754be1b7a75fe21f 100644 (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/');
 
index 7db00ffbef1997591548d6964c2b0e03389a5a72..24fbaac9ca3ffb532e5de38d01a40f05a48f46d3 100644 (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:
index f576823e314f831e866d98eacf4080b5e2dec12d..91c36203c88ff8d0d6accae6a6f482f7a031177e 100644 (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
 {
index 493b519657de346ad64991d97390b9fe76ad300c..a293fda5dba7d3863dcfc6afc094920f049518e7 100644 (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:
index 9e84f72ecb968642d7897ea4400be9cff904b568..3f99e1cbd0d2c50df24bd06a5b54c506df47e70f 100644 (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
 {
index 6eec1ad16ec945f971d6643891e8cff53f647bdb..9b83d43c4ddd7528fc41aedc5c728895c3b4a65b 100644 (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
 {
index 68035ab5cc20aaad6e6a760e0aeb6154e18e8a2c..bfd51ec02f65b1d5ce17dc7d537f3c3528aaf9ad 100644 (file)
  * @maintainer Brion Vibber <brion@status.net>
  */
 
+if (!defined('STATUSNET')) {
+    exit(1);
+}
+
 /**
 
 
index 8179505a55d6b7ce108cb5d5c82c4a2949435651..c9b1d0a5be4effca2c12eb8024059f4f2aa52856 100644 (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
index 58beec673836460912729c9b70e091c8c072ac51..140f323846498c91817d6dc59a20d083dbebd04d 100644 (file)
  * 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>
index 825d36ebd64c656367a79c9a64bb1d686b04e53f..e7ac23af5821ee5dfdfa4e480d0ddc1c4b301b94 100644 (file)
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+if (!defined('STATUSNET')) {
+    exit(1);
+}
+
 /**
  * PuSH feed subscription record
  * @package Hub
index 20025c37a6a8c0e3a8aa7ba9afa80d4c778b8e3d..e057deb144d981611face4b6eb00c8c6d76586a6 100644 (file)
  * @link      http://status.net/
  */
 
+if (!defined('STATUSNET')) {
+    exit(1);
+}
+
 require_once 'Crypt/RSA.php';
 
 class Magicsig extends Memcached_DataObject
index 10cee917e1163a906d94b8d3a25ce7749c794a1a..47aee15f8a2d3011e18266d6c8cfe039a7a141f9 100644 (file)
  * 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>
index b76bbce56ceb35e33ca3823b30086961d8a2cd17..0fd74e48ba6aa44042f27dbf8efa052cdbf48e73 100644 (file)
  * 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>
index 8a166a0be56f339d0aeb54cfb08629aef15ae83c..d978cc6745c12550567fc703e3878d9c4fc5f0f1 100644 (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
 {
index 8219f8420e79b4cec4c44766da2829a9087384c7..d26c45be04a3461b44372b934c46c0231d8d97e1 100644 (file)
  * 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
index 3ad94646e6ddd98e51b0674b1b3536cd69a3e619..67a9d9e36b8aee0d167d79efe5c8e9864c219fb8 100644 (file)
  * 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
index 0d585938f462c8fc568c13b58a943e70b265a043..0ed6a3ec57ac686eb4b663d001c132d3c67e7a45 100644 (file)
  * 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...
index 5e0ab46a5b842657afd760b04226141f36e15e44..d5ee0c50417295a191f4ffa03542a30f8bda273a 100644 (file)
  * 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.
  *
index 965d042668b461c7b97a18751d2e9601efa41b8c..ec1911653a9c7611f97d492cbe28d0c8a7a49a5b 100644 (file)
  * 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
index 56d3c9eff2e21a702e45787d30300da27292baa7..e70d5ff521d9e4793c458eef4772856785a4326b 100644 (file)
  * 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
index c8b5beff379732d7bee653324071558e9035ffd2..d1488dbdec73441147456724f2148f08ba5125cd 100644 (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
 {
index 1beff9ea304afebbeeec5c1391137ae0c802c2df..e34cf21f2cd142db5015c81d6d77a74e3b1e2d6a 100644 (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
 {
index 17c03afb02aee3dd707ac88c7fe077408e490b7c..69e0a3f3e0eb6485bd93462926bb4c4fffffb9aa 100644 (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
 {
index 47b3f7fb167c9de4890d8708013eb85e840edba4..6eb2f2d20637ec65c101326a090b55e3787b728a 100644 (file)
@@ -27,7 +27,7 @@
  * @link      http://status.net/
  */
 
-if (!defined('STATUSNET') && !defined('LACONICA')) {
+if (!defined('STATUSNET')) {
     exit(1);
 }
 
index 0c03b5c4db8b5758e9947c2c1d124aef9ddaed82..01dd61edb12002b756c6b9e177147f2a30dcbb2a 100644 (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';
 
index 1b93163e5f5efb307828e5aba64815e79ffa3ff8..ad251aa2cd93d577e7cc14cdf0786ead909d727e 100644 (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');
index f3a5c8847934be2aa5c4b477a1570bf179e21e34..8d25a2e9ac9beb6378867a621da025e97070f12d 100644 (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';
 
index b2cf1f8ac35fc3bed4351b7ec508a90ba99f6d31..ed9db4fd2865f728b21eaf1b6200195dad7c1e98 100644 (file)
  * @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
index 505e7d0ee36574660804ad9d894a968ed9155333..b7d5bd084d10142a86c8c8740ef90af025d8635c 100644 (file)
  * @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';
 
 /**
index ed6ca73a47f71ca11e84d8cbf32f30c8a459f163..89f3150f6358344eda2fb832e2f137d2f8723489 100644 (file)
  * 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
 {
index dab8ab34fe2514595ec53c3fad22434e085e1b0b..33c5eb65bb23c3c291022f2fd7f5589a6cf33511 100644 (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)) {