コード例 #1
0
ファイル: undev.php プロジェクト: junpataleta/mdk
// Allow themes to be changed from the URL.
$default = $settings->allowthemechangeonurl->get_defaultsetting();
mdk_set_config('allowthemechangeonurl', $default);
// Enable designer mode.
$default = $settings->themedesignermode->get_defaultsetting();
mdk_set_config('themedesignermode', $default);
// Language settings.
$settingspage = $adminroot->locate('langsettings', true);
$settings = $settingspage->settings;
// Restore core_string_manager application caching.
$default = $settings->langstringcache->get_defaultsetting();
mdk_set_config('langstringcache', $default);
// Javascript settings.
$settingspage = $adminroot->locate('ajax', true);
$settings = $settingspage->settings;
// Do not cache JavaScript.
$default = $settings->cachejs->get_defaultsetting();
mdk_set_config('cachejs', $default);
// Do not use YUI combo loading.
$default = $settings->yuicomboloading->get_defaultsetting();
mdk_set_config('yuicomboloading', $default);
// Restore modintro for conciencious devs.
$resources = array('book', 'folder', 'imscp', 'page', 'resource', 'url');
foreach ($resources as $r) {
    $settingpage = $adminroot->locate('modsetting' . $r, true);
    $settings = $settingpage->settings;
    if (isset($settings->requiremodintro)) {
        $default = $settings->requiremodintro->get_defaultsetting();
        mdk_set_config('requiremodintro', $default, $r);
    }
}
コード例 #2
0
ファイル: dev.php プロジェクト: junpataleta/mdk
mdk_set_config('perfdebug', 15);
// Debug the information of the page.
mdk_set_config('debugpageinfo', 1);
// Allow themes to be changed from the URL.
mdk_set_config('allowthemechangeonurl', 1);
// Enable theme designer mode.
mdk_set_config('themedesignermode', 1);
// Do not cache JavaScript.
mdk_set_config('cachejs', 0);
// Prevent core_string_manager application caching
mdk_set_config('langstringcache', 0);
// Do not use YUI combo loading.
mdk_set_config('yuicomboloading', 0);
// Disable modintro for lazy devs.
mdk_set_config('requiremodintro', 0, 'book');
mdk_set_config('requiremodintro', 0, 'folder');
mdk_set_config('requiremodintro', 0, 'imscp');
mdk_set_config('requiremodintro', 0, 'page');
mdk_set_config('requiremodintro', 0, 'resource');
mdk_set_config('requiremodintro', 0, 'url');
// Adds FirePHP
$firephp = "\n// FirePHP\nif (@include_once('FirePHPCore/fb.php')) {\n    ob_start();\n}\n";
$conffile = dirname(__FILE__) . '/config.php';
if ($content = file_get_contents($conffile)) {
    if (strpos($content, "include_once('FirePHPCore/fb.php')") === false) {
        if ($f = fopen($conffile, 'a')) {
            fputs($f, $firephp);
            fclose($f);
        }
    }
}