From: Evan Prodromou Date: Fri, 21 Aug 2009 20:17:06 +0000 (-0400) Subject: Merge branch 'dbconfig' into 0.9.x X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=8236037bf0bff51d4bc623646454f39eec4bc6ec;p=quix0rs-gnu-social.git Merge branch 'dbconfig' into 0.9.x Conflicts: lib/common.php --- 8236037bf0bff51d4bc623646454f39eec4bc6ec diff --cc lib/common.php index 84ee5be15f,d95622ecd5..067a5a2a61 --- a/lib/common.php +++ b/lib/common.php @@@ -381,13 -371,25 +383,31 @@@ if ($_db_name != 'laconica' && !array_k $config['db']['ini_'.$_db_name] = INSTALLDIR.'/classes/laconica.ini'; } +// Ignore openidonly if OpenID is disabled + +if (!$config['openid']['enabled']) { + $config['site']['openidonly'] = false; +} + + function __autoload($cls) + { + if (file_exists(INSTALLDIR.'/classes/' . $cls . '.php')) { + require_once(INSTALLDIR.'/classes/' . $cls . '.php'); + } else if (file_exists(INSTALLDIR.'/lib/' . strtolower($cls) . '.php')) { + require_once(INSTALLDIR.'/lib/' . strtolower($cls) . '.php'); + } else if (mb_substr($cls, -6) == 'Action' && + file_exists(INSTALLDIR.'/actions/' . strtolower(mb_substr($cls, 0, -6)) . '.php')) { + require_once(INSTALLDIR.'/actions/' . strtolower(mb_substr($cls, 0, -6)) . '.php'); + } else if ($cls == 'OAuthRequest') { + require_once('OAuth.php'); + } else { + Event::handle('Autoload', array(&$cls)); + } + } + // XXX: how many of these could be auto-loaded on use? + // XXX: note that these files should not use config options + // at compile time since DB config options are not yet loaded. require_once 'Validate.php'; require_once 'markdown.php';