function __construct() { if (isset($GLOBALS["DBS"]["preprints"])) { parent::__construct($GLOBALS["DBS"]["preprints"]["name"], $GLOBALS["DBS"]["preprints"]["host"], $GLOBALS["DBS"]["preprints"]["user"], $GLOBALS["DBS"]["preprints"]["pass"], FALSE); } $this->dbprefix = isset($GLOBALS["DBS"]["preprints"]["dbprefix"]) ? $GLOBALS["DBS"]["preprints"]["dbprefix"] : ""; }
public function __construct() { $dbName = isInPath("_test") || isset($_REQUEST["test"]) ? "preprints_test" : "preprints"; if (isset($GLOBALS["DBS"][$dbName])) { parent::__construct($GLOBALS["DBS"][$dbName]["name"], $GLOBALS["DBS"][$dbName]["host"], $GLOBALS["DBS"][$dbName]["user"], $GLOBALS["DBS"][$dbName]["pass"], FALSE); } $this->dbprefix = isset($GLOBALS["DBS"][$dbName]["dbprefix"]) ? $GLOBALS["DBS"][$dbName]["dbprefix"] : ""; }