From: Brion Vibber Date: Fri, 8 Oct 2010 18:23:53 +0000 (-0700) Subject: Normalize execution guards in OpenID plugin files; avoids annoying fatal errors when... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=a30ea4568ff4b2a324a8a6a8870d1d72fa9ddab3;p=quix0rs-gnu-social.git Normalize execution guards in OpenID plugin files; avoids annoying fatal errors when .php files get spidered. --- diff --git a/plugins/OpenID/User_openid.php b/plugins/OpenID/User_openid.php index 1beff9ea30..e34cf21f2c 100644 --- a/plugins/OpenID/User_openid.php +++ b/plugins/OpenID/User_openid.php @@ -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 { diff --git a/plugins/OpenID/User_openid_trustroot.php b/plugins/OpenID/User_openid_trustroot.php index 17c03afb02..69e0a3f3e0 100644 --- a/plugins/OpenID/User_openid_trustroot.php +++ b/plugins/OpenID/User_openid_trustroot.php @@ -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 { diff --git a/plugins/OpenID/finishaddopenid.php b/plugins/OpenID/finishaddopenid.php index 47b3f7fb16..6eb2f2d206 100644 --- a/plugins/OpenID/finishaddopenid.php +++ b/plugins/OpenID/finishaddopenid.php @@ -27,7 +27,7 @@ * @link http://status.net/ */ -if (!defined('STATUSNET') && !defined('LACONICA')) { +if (!defined('STATUSNET')) { exit(1); } diff --git a/plugins/OpenID/finishopenidlogin.php b/plugins/OpenID/finishopenidlogin.php index 0c03b5c4db..01dd61edb1 100644 --- a/plugins/OpenID/finishopenidlogin.php +++ b/plugins/OpenID/finishopenidlogin.php @@ -17,7 +17,9 @@ * along with this program. If not, see . */ -if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } +if (!defined('STATUSNET')) { + exit(1); +} require_once INSTALLDIR.'/plugins/OpenID/openid.php'; diff --git a/plugins/OpenID/openid.php b/plugins/OpenID/openid.php index 1b93163e5f..ad251aa2cd 100644 --- a/plugins/OpenID/openid.php +++ b/plugins/OpenID/openid.php @@ -17,9 +17,9 @@ * along with this program. If not, see . */ -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'); diff --git a/plugins/OpenID/openidlogin.php b/plugins/OpenID/openidlogin.php index 20d6e070cd..4046068cfa 100644 --- a/plugins/OpenID/openidlogin.php +++ b/plugins/OpenID/openidlogin.php @@ -17,7 +17,9 @@ * along with this program. If not, see . */ -if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } +if (!defined('STATUSNET')) { + exit(1); +} require_once INSTALLDIR.'/plugins/OpenID/openid.php'; diff --git a/plugins/OpenID/openidserver.php b/plugins/OpenID/openidserver.php index b2cf1f8ac3..ed9db4fd28 100644 --- a/plugins/OpenID/openidserver.php +++ b/plugins/OpenID/openidserver.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 diff --git a/plugins/OpenID/openidsettings.php b/plugins/OpenID/openidsettings.php index 505e7d0ee3..b7d5bd084d 100644 --- a/plugins/OpenID/openidsettings.php +++ b/plugins/OpenID/openidsettings.php @@ -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'; /** diff --git a/plugins/OpenID/openidtrust.php b/plugins/OpenID/openidtrust.php index ed6ca73a47..89f3150f63 100644 --- a/plugins/OpenID/openidtrust.php +++ b/plugins/OpenID/openidtrust.php @@ -17,10 +17,11 @@ * along with this program. If not, see . */ -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 {