From: Brion Vibber Date: Fri, 8 Oct 2010 17:42:59 +0000 (-0700) Subject: Normalize execution guards on OStatus php files; mostly helps cut down on annoying... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=69b13cb279d7b60cb3a7beb9ad39cfe3a3b7745b;p=quix0rs-gnu-social.git Normalize execution guards on OStatus php files; mostly helps cut down on annoying 'class not found' errors when something spiders the dirs. :P --- diff --git a/plugins/OStatus/OStatusPlugin.php b/plugins/OStatus/OStatusPlugin.php index 9c6696439a..4ab2023cbe 100644 --- a/plugins/OStatus/OStatusPlugin.php +++ b/plugins/OStatus/OStatusPlugin.php @@ -22,7 +22,9 @@ * @maintainer Brion Vibber */ -if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } +if (!defined('STATUSNET')) { + exit(1); +} set_include_path(get_include_path() . PATH_SEPARATOR . dirname(__FILE__) . '/extlib/'); diff --git a/plugins/OStatus/actions/hostmeta.php b/plugins/OStatus/actions/hostmeta.php index db4c913e16..14f69ac192 100644 --- a/plugins/OStatus/actions/hostmeta.php +++ b/plugins/OStatus/actions/hostmeta.php @@ -22,7 +22,9 @@ * @maintainer James Walker */ -if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } +if (!defined('STATUSNET')) { + exit(1); +} class HostMetaAction extends Action { diff --git a/plugins/OStatus/actions/ostatusgroup.php b/plugins/OStatus/actions/ostatusgroup.php index 7db00ffbef..24fbaac9ca 100644 --- a/plugins/OStatus/actions/ostatusgroup.php +++ b/plugins/OStatus/actions/ostatusgroup.php @@ -22,7 +22,9 @@ * @maintainer Brion Vibber */ -if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } +if (!defined('STATUSNET')) { + exit(1); +} /** * Key UI methods: diff --git a/plugins/OStatus/actions/ostatusinit.php b/plugins/OStatus/actions/ostatusinit.php index f576823e31..91c36203c8 100644 --- a/plugins/OStatus/actions/ostatusinit.php +++ b/plugins/OStatus/actions/ostatusinit.php @@ -22,8 +22,9 @@ * @maintainer James Walker */ -if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } - +if (!defined('STATUSNET')) { + exit(1); +} class OStatusInitAction extends Action { diff --git a/plugins/OStatus/actions/ostatussub.php b/plugins/OStatus/actions/ostatussub.php index 493b519657..a293fda5db 100644 --- a/plugins/OStatus/actions/ostatussub.php +++ b/plugins/OStatus/actions/ostatussub.php @@ -22,7 +22,9 @@ * @maintainer Brion Vibber */ -if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } +if (!defined('STATUSNET')) { + exit(1); +} /** * Key UI methods: diff --git a/plugins/OStatus/actions/ownerxrd.php b/plugins/OStatus/actions/ownerxrd.php index 9e84f72ecb..3f99e1cbd0 100644 --- a/plugins/OStatus/actions/ownerxrd.php +++ b/plugins/OStatus/actions/ownerxrd.php @@ -22,7 +22,9 @@ * @maintainer James Walker */ -if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } +if (!defined('STATUSNET')) { + exit(1); +} class OwnerxrdAction extends XrdAction { diff --git a/plugins/OStatus/actions/pushcallback.php b/plugins/OStatus/actions/pushcallback.php index 6eec1ad16e..9b83d43c4d 100644 --- a/plugins/OStatus/actions/pushcallback.php +++ b/plugins/OStatus/actions/pushcallback.php @@ -22,7 +22,9 @@ * @maintainer Brion Vibber */ -if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } +if (!defined('STATUSNET')) { + exit(1); +} class PushCallbackAction extends Action { diff --git a/plugins/OStatus/actions/pushhub.php b/plugins/OStatus/actions/pushhub.php index 68035ab5cc..bfd51ec02f 100644 --- a/plugins/OStatus/actions/pushhub.php +++ b/plugins/OStatus/actions/pushhub.php @@ -23,6 +23,10 @@ * @maintainer Brion Vibber */ +if (!defined('STATUSNET')) { + exit(1); +} + /** diff --git a/plugins/OStatus/actions/userxrd.php b/plugins/OStatus/actions/userxrd.php index 8179505a55..c9b1d0a5be 100644 --- a/plugins/OStatus/actions/userxrd.php +++ b/plugins/OStatus/actions/userxrd.php @@ -17,7 +17,9 @@ * along with this program. If not, see . */ -if (!defined('STATUSNET')) { exit(1); } +if (!defined('STATUSNET')) { + exit(1); +} /** * @package OStatusPlugin diff --git a/plugins/OStatus/classes/FeedSub.php b/plugins/OStatus/classes/FeedSub.php index 58beec6738..140f323846 100644 --- a/plugins/OStatus/classes/FeedSub.php +++ b/plugins/OStatus/classes/FeedSub.php @@ -17,6 +17,10 @@ * along with this program. If not, see . */ +if (!defined('STATUSNET')) { + exit(1); +} + /** * @package OStatusPlugin * @maintainer Brion Vibber diff --git a/plugins/OStatus/classes/HubSub.php b/plugins/OStatus/classes/HubSub.php index 825d36ebd6..e7ac23af58 100644 --- a/plugins/OStatus/classes/HubSub.php +++ b/plugins/OStatus/classes/HubSub.php @@ -17,6 +17,10 @@ * along with this program. If not, see . */ +if (!defined('STATUSNET')) { + exit(1); +} + /** * PuSH feed subscription record * @package Hub diff --git a/plugins/OStatus/classes/Magicsig.php b/plugins/OStatus/classes/Magicsig.php index 20025c37a6..e057deb144 100644 --- a/plugins/OStatus/classes/Magicsig.php +++ b/plugins/OStatus/classes/Magicsig.php @@ -27,6 +27,10 @@ * @link http://status.net/ */ +if (!defined('STATUSNET')) { + exit(1); +} + require_once 'Crypt/RSA.php'; class Magicsig extends Memcached_DataObject diff --git a/plugins/OStatus/classes/Ostatus_profile.php b/plugins/OStatus/classes/Ostatus_profile.php index 10cee917e1..47aee15f8a 100644 --- a/plugins/OStatus/classes/Ostatus_profile.php +++ b/plugins/OStatus/classes/Ostatus_profile.php @@ -17,6 +17,10 @@ * along with this program. If not, see . */ +if (!defined('STATUSNET')) { + exit(1); +} + /** * @package OStatusPlugin * @maintainer Brion Vibber diff --git a/plugins/OStatus/classes/Ostatus_source.php b/plugins/OStatus/classes/Ostatus_source.php index b76bbce56c..0fd74e48ba 100644 --- a/plugins/OStatus/classes/Ostatus_source.php +++ b/plugins/OStatus/classes/Ostatus_source.php @@ -17,6 +17,10 @@ * along with this program. If not, see . */ +if (!defined('STATUSNET')) { + exit(1); +} + /** * @package OStatusPlugin * @maintainer Brion Vibber diff --git a/plugins/OStatus/lib/feeddiscovery.php b/plugins/OStatus/lib/feeddiscovery.php index 8a166a0be5..d978cc6745 100644 --- a/plugins/OStatus/lib/feeddiscovery.php +++ b/plugins/OStatus/lib/feeddiscovery.php @@ -22,7 +22,9 @@ * @maintainer Brion Vibber */ -if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } +if (!defined('STATUSNET')) { + exit(1); +} class FeedSubBadURLException extends FeedSubException { diff --git a/plugins/OStatus/lib/hubconfqueuehandler.php b/plugins/OStatus/lib/hubconfqueuehandler.php index 8219f8420e..d26c45be04 100644 --- a/plugins/OStatus/lib/hubconfqueuehandler.php +++ b/plugins/OStatus/lib/hubconfqueuehandler.php @@ -17,6 +17,10 @@ * along with this program. If not, see . */ +if (!defined('STATUSNET')) { + exit(1); +} + /** * Send a PuSH subscription verification from our internal hub. * @package Hub diff --git a/plugins/OStatus/lib/huboutqueuehandler.php b/plugins/OStatus/lib/huboutqueuehandler.php index 3ad94646e6..67a9d9e36b 100644 --- a/plugins/OStatus/lib/huboutqueuehandler.php +++ b/plugins/OStatus/lib/huboutqueuehandler.php @@ -17,6 +17,10 @@ * along with this program. If not, see . */ +if (!defined('STATUSNET')) { + exit(1); +} + /** * Send a raw PuSH atom update from our internal hub. * @package Hub diff --git a/plugins/OStatus/lib/hubprepqueuehandler.php b/plugins/OStatus/lib/hubprepqueuehandler.php index 0d585938f4..0ed6a3ec57 100644 --- a/plugins/OStatus/lib/hubprepqueuehandler.php +++ b/plugins/OStatus/lib/hubprepqueuehandler.php @@ -17,6 +17,10 @@ * along with this program. If not, see . */ +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... diff --git a/plugins/OStatus/lib/ostatusqueuehandler.php b/plugins/OStatus/lib/ostatusqueuehandler.php index 5e0ab46a5b..d5ee0c5041 100644 --- a/plugins/OStatus/lib/ostatusqueuehandler.php +++ b/plugins/OStatus/lib/ostatusqueuehandler.php @@ -17,6 +17,10 @@ * along with this program. If not, see . */ +if (!defined('STATUSNET')) { + exit(1); +} + /** * Prepare PuSH and Salmon distributions for an outgoing message. * diff --git a/plugins/OStatus/lib/pushinqueuehandler.php b/plugins/OStatus/lib/pushinqueuehandler.php index 965d042668..ec1911653a 100644 --- a/plugins/OStatus/lib/pushinqueuehandler.php +++ b/plugins/OStatus/lib/pushinqueuehandler.php @@ -17,6 +17,10 @@ * along with this program. If not, see . */ +if (!defined('STATUSNET')) { + exit(1); +} + /** * Process a feed distribution POST from a PuSH hub. * @package FeedSub diff --git a/plugins/OStatus/lib/salmonqueuehandler.php b/plugins/OStatus/lib/salmonqueuehandler.php index 56d3c9eff2..e70d5ff521 100644 --- a/plugins/OStatus/lib/salmonqueuehandler.php +++ b/plugins/OStatus/lib/salmonqueuehandler.php @@ -17,6 +17,10 @@ * along with this program. If not, see . */ +if (!defined('STATUSNET')) { + exit(1); +} + /** * Send a Salmon notification in the background. * @package OStatusPlugin diff --git a/plugins/OStatus/lib/xrdaction.php b/plugins/OStatus/lib/xrdaction.php index c8b5beff37..d1488dbdec 100644 --- a/plugins/OStatus/lib/xrdaction.php +++ b/plugins/OStatus/lib/xrdaction.php @@ -22,7 +22,9 @@ * @maintainer James Walker */ -if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } +if (!defined('STATUSNET')) { + exit(1); +} class XrdAction extends Action {