foreach ($required_paths as $path) { if (!$path->fix(TRUE)) { $required_paths_okay = FALSE; } } if (!$required_paths_okay) { output("Could not fix all files/directories.\n"); exit(1); } } } else { output("Files and directory permissions are okay.\n\n"); } $config = new Config($config_path, $config_template_path); // offer a random encryption key as default in the config: if (is_object($config->get_entry("ENCRYPTION_KEY"))) { $encryption_key = ""; $encryption_charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.-_!\$"; for ($i = 0; $i < 20; $i++) { $encryption_key .= $encryption_charset[rand(0, strlen($encryption_charset) - 1)]; } $config_encryption_key = $config->get_entry('ENCRYPTION_KEY')->get_config_answer(); if (empty($config_encryption_key)) { $config->get_entry('ENCRYPTION_KEY')->set_answer($encryption_key); $config->get_entry("ENCRYPTION_KEY")->set_default_answer($encryption_key); } } // offer the current semester as a default in the config: if (is_object($config->get_entry("STEAM_CURRENT_SEMESTER"))) { $current_semester = ""; if ((int) date("m") < 7) {