示例#1
0
 /**
  * Runs the action for the second step of the installation
  * where you enter database information
  *
  * @param framework\Request $request The request object
  *
  * @return null
  */
 public function runInstallStep2(framework\Request $request)
 {
     $this->preloaded = false;
     $this->selected_connection_detail = 'custom';
     if (!$this->error) {
         try {
             $b2db_filename = \THEBUGGENIE_CONFIGURATION_PATH . "b2db.yml";
             if (file_exists($b2db_filename)) {
                 $b2db_config = \Spyc::YAMLLoad($b2db_filename);
                 \b2db\Core::initialize($b2db_config);
             }
         } catch (\Exception $e) {
         }
         if (\b2db\Core::isInitialized()) {
             $this->preloaded = true;
             $this->username = \b2db\Core::getUname();
             $this->password = \b2db\Core::getPasswd();
             $this->dsn = \b2db\Core::getDSN();
             $this->hostname = \b2db\Core::getHost();
             $this->port = \b2db\Core::getPort();
             $this->b2db_dbtype = \b2db\Core::getDBtype();
             $this->db_name = \b2db\Core::getDBname();
         }
     }
 }
示例#2
0
 /**
  * Runs the action for the second step of the installation
  * where you enter database information
  * 
  * @param TBGRequest $request The request object
  * 
  * @return null
  */
 public function runInstallStep2(TBGRequest $request)
 {
     $this->preloaded = false;
     $this->selected_connection_detail = 'custom';
     if (!$this->error) {
         try {
             \b2db\Core::initialize(THEBUGGENIE_CORE_PATH . 'b2db_bootstrap.inc.php');
         } catch (Exception $e) {
         }
         if (\b2db\Core::isInitialized()) {
             $this->preloaded = true;
             $this->username = \b2db\Core::getUname();
             $this->password = \b2db\Core::getPasswd();
             $this->dsn = \b2db\Core::getDSN();
             $this->hostname = \b2db\Core::getHost();
             $this->port = \b2db\Core::getPort();
             $this->b2db_dbtype = \b2db\Core::getDBtype();
             $this->db_name = \b2db\Core::getDBname();
         }
     }
 }