* @author wkpark at gmail.com * @since 2012/11/26 * @license GPLv2 */ define('INC_MONIWIKI', 1); $topdir = realpath(dirname(__FILE__) . '/../'); include_once $topdir . "/wiki.php"; // Start Main $Config = getConfig($topdir . '/config.php'); require_once $topdir . '/wikilib.php'; require_once $topdir . '/lib/win32fix.php'; require_once $topdir . '/lib/wikiconfig.php'; require_once $topdir . '/lib/cache.text.php'; require_once $topdir . '/lib/timer.php'; include_once dirname(__FILE__) . '/utils.php'; $Config = wikiConfig($Config); $DBInfo = new WikiDB($Config); $p = $DBInfo->getPage('FrontPage'); $formatter = new Formatter($p); if (empty($formatter->wordrule)) { $formatter->set_wordrule(); } $params = array(); if (class_exists('Timer')) { $timing = new Timer(); $params['timer'] =& $timing; $params['timer']->Check("load"); } $options = array(); $options[] = array('f', '', "force update redirect caches"); $options[] = array('d', '', "debug");
function load_site_config($topdir, $site, &$conf, &$deps) { // dependency $deps = array($topdir . '/config.php', dirname(__FILE__) . '/lib/wikiconfig.php'); // override some $conf vars to control site specific options if (!empty($site)) { $configfile = $topdir . '/config/config.' . $site . '.php'; if (file_exists($configfile)) { $deps[] = $configfile; $local = _load_php_vars($configfile); // update $conf foreach ($local as $k => $v) { $conf[$k] = $v; } } } require_once dirname(__FILE__) . '/lib/wikiconfig.php'; $conf = wikiConfig($conf); }