Exemplo n.º 1
0
								<ul>
									<li><b>Hostname:</b> <?php 
    echo \b2db\Core::getHost();
    ?>
:<?php 
    echo \b2db\Core::getPort();
    ?>
</li>
									<li><b>Database:</b> <?php 
    echo \b2db\Core::getDBname();
    ?>
</li>
								</ul>
							</li>
							<li><b>Username:</b> <?php 
    echo \b2db\Core::getUname();
    ?>
</li>
							<li><b>Prefix:</b> <?php 
    echo \b2db\Core::getTablePrefix();
    ?>
</li>
							<li><b>Connection status:</b> <?php 
    echo \b2db\Core::isConnected() ? 'Connected' : 'Not connected';
    ?>
</li>
<?php 
    if (\b2db\Core::isConnected()) {
        ?>
							<li><b>Total query time:</b> <?php 
        if (empty($dbgquerytime)) {
Exemplo n.º 2
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();
         }
     }
 }
Exemplo n.º 3
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();
         }
     }
 }