diff --git a/build/index.php b/build/index.php index fbc95e6..3212f5e 100644 --- a/build/index.php +++ b/build/index.php @@ -154,9 +154,11 @@ $guiConfig = <<<'GUICONFIG' } GUICONFIG; +$settingsFilename = "peppermint.json"; + $guiConfig = json_decode($guiConfig); $settings = new stdClass(); -if(!file_exists("peppermint.json")) +if(!file_exists($settingsFilename)) { // Copy the default settings over to the main settings array foreach ($guiConfig as $key => $value) @@ -313,19 +315,19 @@ if($settings->css === "auto") /////////////////////////////////////////////////////////////////////////////////////////////// $version = "v0.13-dev"; /// Environment /// -$env = new stdClass(); -$env->action = $settings->defaultaction; -$env->page = ""; -$env->page_filename = ""; -$env->is_history_revision = false; -$env->history = new stdClass(); -$env->history->revision_number = -1; -$env->history->revision_data = false; -$env->user = "Anonymous"; -$env->is_logged_in = false; -$env->is_admin = false; -$env->storage_prefix = $settings->data_storage_dir . DIRECTORY_SEPARATOR; -$env->perfdata = new stdClass(); +$env = new stdClass(); // The environment object +$env->action = $settings->defaultaction; // The action requested by the user +$env->page = ""; // The page name +$env->page_filename = ""; // The filename that the page is stored in +$env->is_history_revision = false; // Whether we are looking at a history revision +$env->history = new stdClass(); // History revision information +$env->history->revision_number = -1; // The revision number of the current page +$env->history->revision_data = false; // The revision data object from the page index +$env->user = "Anonymous"; // The user's name +$env->is_logged_in = false; // Whether the user is logged in +$env->is_admin = false; // Whether the user is an admin (moderator) +$env->storage_prefix = $settings->data_storage_dir . DIRECTORY_SEPARATOR; // The data storage directory +$env->perfdata = new stdClass(); // Performance data /// Paths /// $paths = new stdClass(); $paths->pageindex = "pageindex.json"; // The pageindex @@ -337,6 +339,7 @@ foreach ($paths as &$path) { $path = $env->storage_prefix . $path; } +$paths->settings_file = $settingsFilename; // The master settings file $paths->upload_file_prefix = "Files/"; // The prefix to add to uploaded files session_start(); @@ -1947,7 +1950,8 @@ register_module([ } $content = "
This page lets you configure the site settings. Please be careful - you can break things easily on this page if you're not careful!
\n"; + $content .= "This page lets you configure $settings->sitename's master settings. Please be careful - you can break things easily on this page if you're not careful!
\n"; + $content .= "Mouse over the name of each the settings to see a description of what it does.
\n"; $content .= "