Example #1
0
 static function processRequest(DevblocksHttpRequest $request, $is_ajax = false)
 {
     /**
      * Override the 'update' URI since we can't count on the database 
      * being populated from XML beforehand when /update loads it.
      */
     if (!$is_ajax && isset($request->path[0]) && 0 == strcasecmp($request->path[0], 'update')) {
         if (null != ($update_controller = new FegUpdateController(null))) {
             $update_controller->handleRequest($request);
         }
     } else {
         // Hand it off to the platform
         DevblocksPlatform::processRequest($request, $is_ajax);
     }
 }
Example #2
0
 * 
 * - Jeff Standen, Mike Fogg, Brenan Cavish, Darren Sugita, Dan Hildebrandt
 * 		and Joe Geck.
 *   WEBGROUP MEDIA LLC. - Developers of PortSensor
 */
if (version_compare(PHP_VERSION, "5.1.2", "<")) {
    die("This project requires PHP 5.1.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;
}
// [TODO] We could also put a temporary lock mode for upgrades here
require APP_PATH . '/api/Application.class.php';
// [JAS]: [TODO] Is an explicit init() really required?  No anonymous static blocks?
DevblocksPlatform::init();
// 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();
// [JAS]: HTTP Request
DevblocksPlatform::processRequest($request);
exit;