public function __construct($cfg_vals = null) { try { /* * If the database that the user is trying to install to does not * exist, the parent constructor will throw an exception. If it * does exist, installation will continue. This is so that users * who are trying to install to an already existing database won't * get caught by the CREATE TABLE IF NOT EXISTS statement in the * createInstallDatabase() function (even if the database exists, * the function will return false if you do not have the correct * privileges). */ parent::__construct($cfg_vals); } catch (Exception $e) { //if the database does not exist, create it then continue. if ($this->createInstallDatabase($cfg_vals) === false) { //if something fails in creating the database, throw exception throw new InstallerException($e->getMessage()); } //call the parent constructor to continue the installation. parent::__construct($cfg_vals); } }
public function __construct() { parent::__construct(); $this->stream_conditionals_order = "AND i.filename != 'dashboard' ORDER BY date DESC, emphasis DESC, " . "filename, time_updated DESC, i.id DESC LIMIT :start_on_record, :limit;"; }