Exemple #1
0
 * A legitimate license entitles you to support, access to the developer 
 * mailing list, the ability to participate in betas and the warm fuzzy 
 * feeling of feeding a couple obsessed developers who want to help you get 
 * more done than 'the other guy'.
 *
 * - Jeff Standen, Mike Fogg, Brenan Cavish, Darren Sugita, Dan Hildebrandt
 * 		and Joe Geck.
 *   WEBGROUP MEDIA LLC. - Developers of Cerberus Helpdesk
 */
if (version_compare(PHP_VERSION, "5.2", "<")) {
    die("Cerberus Helpdesk 5.x requires PHP 5.2 or later.");
}
require getcwd() . '/framework.config.php';
require DEVBLOCKS_PATH . 'Devblocks.class.php';
// If this is our first run, redirect to the installer
if ('' == APP_DB_DRIVER || '' == APP_DB_HOST || '' == APP_DB_DATABASE || null == ($db = DevblocksPlatform::getDatabaseService()) || DevblocksPlatform::isDatabaseEmpty()) {
    header('Location: ' . dirname($_SERVER['PHP_SELF']) . '/install/index.php');
    // [TODO] change this to a meta redirect
    exit;
}
require APP_PATH . '/api/Application.class.php';
DevblocksPlatform::init();
DevblocksPlatform::setExtensionDelegate('C4_DevblocksExtensionDelegate');
// Request
$request = DevblocksPlatform::readRequest();
// Patches (if not on the patch page)
if (@0 != strcasecmp(@$request->path[0], "update") && !DevblocksPlatform::versionConsistencyCheck()) {
    DevblocksPlatform::redirect(new DevblocksHttpResponse(array('update', 'locked')));
}
//DevblocksPlatform::readPlugins();
$session = DevblocksPlatform::getSessionService();
Exemple #2
0
         $tpl->assign('db_driver', $db_driver);
         $tpl->assign('db_server', $db_server);
         $tpl->assign('db_name', $db_name);
         $tpl->assign('db_user', $db_user);
         $tpl->assign('db_pass', $db_pass);
         $tpl->assign('failed', true);
         $tpl->assign('result', $result);
         $tpl->assign('config_path', APP_PATH . "/framework.config.php");
         $tpl->assign('template', 'steps/step_config_file.tpl');
     }
     break;
     // Initialize the database
 // Initialize the database
 case STEP_INIT_DB:
     // [TODO] Add current user to patcher/upgrade authorized IPs
     if (DevblocksPlatform::isDatabaseEmpty()) {
         // install
         try {
             DevblocksPlatform::update();
         } catch (Exception $e) {
             $tpl->assign('error', $e->getMessage());
             $tpl->assign('template', 'steps/step_init_db.tpl');
         }
         // Read in plugin information from the filesystem to the database
         DevblocksPlatform::readPlugins();
         $plugins = DevblocksPlatform::getPluginRegistry();
         // Tailor which plugins are enabled by default
         if (is_array($plugins)) {
             foreach ($plugins as $plugin) {
                 /* @var $plugin DevblocksPluginManifest */
                 switch ($plugin->id) {