<?php
-
-require_once "config.php";
-
-require_once "common.php";
-
+require_once "inc/common.php";
require_once "Classes/class-message.php";
static function plugin_exists($name, $version = NULL)
{
foreach(self::$list as $p)
- if (!strcasecmp($p->name,$name) && (!$version || ($version >= $p->version)))
+ if (!strcmp($p->name,$name) && (!$version || ($version >= $p->version)))
return true;
return false;
}
}
-if (defined('PLUGINS'))
+if (get_config("plugins"))
{
- foreach(PLUGINS as $plugin)
+ foreach(get_config("plugins") as $plugin)
Plugins::load($plugin);
}
{
if (!Plugins::plugin_exists($name,$version))
die("Missing plugin: $name v$version");
-}
\ No newline at end of file
+}
+
+/* I'm not a fan of globals */
+class AuthModLoaded
+{
+ public static $status = 0;
+}
+
+function is_auth_provided()
+{
+ return AuthModLoaded::$status;
+}