summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-10-08 11:23:53 -0700
committerBrion Vibber <brion@pobox.com>2010-10-08 11:23:53 -0700
commita30ea4568ff4b2a324a8a6a8870d1d72fa9ddab3 (patch)
tree1093590e54c15396cd6d06dc1bc0ac28713bada1
parent5fe59322bc9e2be876952c29a52ff43513f46463 (diff)
Normalize execution guards in OpenID plugin files; avoids annoying fatal errors when .php files get spidered.
-rw-r--r--plugins/OpenID/User_openid.php5
-rw-r--r--plugins/OpenID/User_openid_trustroot.php5
-rw-r--r--plugins/OpenID/finishaddopenid.php2
-rw-r--r--plugins/OpenID/finishopenidlogin.php4
-rw-r--r--plugins/OpenID/openid.php6
-rw-r--r--plugins/OpenID/openidlogin.php4
-rw-r--r--plugins/OpenID/openidserver.php4
-rw-r--r--plugins/OpenID/openidsettings.php3
-rw-r--r--plugins/OpenID/openidtrust.php5
9 files changed, 23 insertions, 15 deletions
diff --git a/plugins/OpenID/User_openid.php b/plugins/OpenID/User_openid.php
index 1beff9ea3..e34cf21f2 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 17c03afb0..69e0a3f3e 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 47b3f7fb1..6eb2f2d20 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 0c03b5c4d..01dd61edb 100644
--- a/plugins/OpenID/finishopenidlogin.php
+++ b/plugins/OpenID/finishopenidlogin.php
@@ -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';
diff --git a/plugins/OpenID/openid.php b/plugins/OpenID/openid.php
index 1b93163e5..ad251aa2c 100644
--- a/plugins/OpenID/openid.php
+++ b/plugins/OpenID/openid.php
@@ -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');
diff --git a/plugins/OpenID/openidlogin.php b/plugins/OpenID/openidlogin.php
index 20d6e070c..4046068cf 100644
--- a/plugins/OpenID/openidlogin.php
+++ b/plugins/OpenID/openidlogin.php
@@ -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';
diff --git a/plugins/OpenID/openidserver.php b/plugins/OpenID/openidserver.php
index b2cf1f8ac..ed9db4fd2 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 505e7d0ee..b7d5bd084 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 ed6ca73a4..89f3150f6 100644
--- a/plugins/OpenID/openidtrust.php
+++ b/plugins/OpenID/openidtrust.php
@@ -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
{