From 454d868b911059adb8889a2d6afefa016d6a21f5 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 9 Nov 2012 14:04:41 +0100 Subject: make all sub auth classes call the parent constructor This does nothing currently but allows us adding certain things to the base class later. --- lib/plugins/auth.php | 3 +++ lib/plugins/authad/auth.php | 2 ++ lib/plugins/authldap/auth.php | 2 ++ lib/plugins/authmysql/auth.php | 2 ++ lib/plugins/authpgsql/auth.php | 2 ++ lib/plugins/authplain/auth.php | 1 + 6 files changed, 12 insertions(+) (limited to 'lib/plugins') diff --git a/lib/plugins/auth.php b/lib/plugins/auth.php index cd2f9ac12..cce2370d9 100644 --- a/lib/plugins/auth.php +++ b/lib/plugins/auth.php @@ -42,6 +42,9 @@ class DokuWiki_Auth_Plugin extends DokuWiki_Plugin { * able to operate. Set capabilities in $this->cando * array here * + * For future compatibility, sub classes should always include a call + * to parent::__constructor() in their constructors! + * * Set $this->success to false if checks fail * * @author Christopher Smith diff --git a/lib/plugins/authad/auth.php b/lib/plugins/authad/auth.php index 35c19f471..0900a3f87 100644 --- a/lib/plugins/authad/auth.php +++ b/lib/plugins/authad/auth.php @@ -82,6 +82,8 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { * Constructor */ public function __construct() { + parent::__construct(); + global $conf; $this->cnf = $conf['auth']['ad']; diff --git a/lib/plugins/authldap/auth.php b/lib/plugins/authldap/auth.php index 721abb48e..93683bc16 100644 --- a/lib/plugins/authldap/auth.php +++ b/lib/plugins/authldap/auth.php @@ -19,6 +19,8 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { * Constructor */ function __construct(){ + parent::__construct(); + global $conf; $this->cnf = $conf['auth']['ldap']; diff --git a/lib/plugins/authmysql/auth.php b/lib/plugins/authmysql/auth.php index 8a8f9a488..368bd74a2 100644 --- a/lib/plugins/authmysql/auth.php +++ b/lib/plugins/authmysql/auth.php @@ -28,6 +28,8 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin { * @author Matthias Grimm */ function __construct() { + parent::__construct(); + global $conf; $this->cnf = $conf['auth']['mysql']; diff --git a/lib/plugins/authpgsql/auth.php b/lib/plugins/authpgsql/auth.php index 824a77882..46154b6ca 100644 --- a/lib/plugins/authpgsql/auth.php +++ b/lib/plugins/authpgsql/auth.php @@ -31,6 +31,8 @@ class auth_plugin_authpgsql extends auth_plugin_authmysql * Constructor */ function auth_plugin_authpgsql() { + parent::__construct(); + global $conf; $this->cnf = $conf['auth']['ad']; diff --git a/lib/plugins/authplain/auth.php b/lib/plugins/authplain/auth.php index 570d029ff..2e72bbd79 100644 --- a/lib/plugins/authplain/auth.php +++ b/lib/plugins/authplain/auth.php @@ -23,6 +23,7 @@ class auth_plugin_authplain extends DokuWiki_Auth_Plugin { * @author Christopher Smith */ function __construct() { + parent::__construct(); global $config_cascade; if (!@is_readable($config_cascade['plainauth.users']['default'])){ -- cgit v1.2.3