/** * Updates the database schema, creating tables & fields as necessary. */ function build() { // The default time limit of 30 seconds is normally not enough increase_time_limit_to(600); // Get all our classes ManifestBuilder::create_manifest_file(); require MANIFEST_FILE; if (isset($_GET['returnURL'])) { echo "<p>Setting up the database; you will be returned to your site shortly....</p>"; $this->doBuild(true); echo "<p>Done!</p>"; Director::redirect($_GET['returnURL']); } else { $this->doBuild(isset($_REQUEST['quiet']) || isset($_REQUEST['from_installer']), !isset($_REQUEST['dont_populate'])); } }
/** * Updates the database schema, creating tables & fields as necessary. */ function build() { // The default time limit of 30 seconds is normally not enough increase_time_limit_to(600); // Get all our classes ManifestBuilder::create_manifest_file(); require MANIFEST_FILE; if (isset($_GET['returnURL'])) { echo "<p>Setting up the database; you will be returned to your site shortly....</p>"; $this->doBuild(true); echo "<p>Done!</p>"; Director::redirect($_GET['returnURL']); } else { if (!Director::is_cli() && Director::urlParam('Controller') == __CLASS__) { echo '<p style="color: red;"><i>db/build</i> has been deprecated. Please use <b>dev/build</b> instead.</p>'; } $this->doBuild(isset($_REQUEST['quiet']) || isset($_REQUEST['from_installer']), !isset($_REQUEST['dont_populate'])); } }
/** * Updates the database schema, creating tables & fields as necessary. */ function build() { if(Director::isLive() && Security::database_is_ready() && !Director::is_cli() && !Permission::check("ADMIN")) { Security::permissionFailure($this, "This page is secured and you need administrator rights to access it. " . "Enter your credentials below and we will send you right along."); return; } // The default time limit of 30 seconds is normally not enough if(ini_get("safe_mode") != "1") { set_time_limit(600); } // Get all our classes ManifestBuilder::create_manifest_file(); require(MANIFEST_FILE); $this->doBuild(isset($_REQUEST['quiet']) || isset($_REQUEST['from_installer']), !isset($_REQUEST['dont_populate'])); }