src/libraries/adapters/DatabaseMySql.php
/**
    * Initialize the database by creating the database and tables needed.
    * This is called from the Setup controller.
    *
    * @return boolean
    */
Initialize the database by creating the database and tables needed.
This is called from the Setup controller.

@return boolean
Initialize the database by creating the database and tables needed . This is called from the Setup controller . @return boolean
public function initialize($isEditMode)
  {
    $version = $this->version();
    if($version !== '0.0.0' && $isEditMode === false)
    {
      $user = true;
      if($this->owner != '')
        $user = $this->getUser($this->owner);
      if($user === null)
        return true;
      getLogger()->crit(sprintf('Could not initialize user for MySql due to email conflict (%s).', $this->owner));
      return false;
    }
    elseif($version === '0.0.0')
    {
      try
      {
        return $this->executeScript(sprintf('%s/upgrade/db/mysql/mysql-base.php', getConfig()->get('paths')->configs), 'mysql');
      }
      catch(EpiDatabaseException $e)
      {
        getLogger()->crit($e->getMessage());
        return false;
      }
    }
    return true;
  }
public function initialize ( $ isEditMode ) { $ version = $ this -> version ( ) ; if ( $ version !== '0.0.0' && $ isEditMode === false ) { $ user = true ; if ( $ this -> owner != '' ) $ user = $ this -> getUser ( $ this -> owner ) ; if ( $ user === null ) return true ; getLogger ( ) -> crit ( sprintf ( 'Could not initialize user for MySql due to email conflict (%s).' , $ this -> owner ) ) ; return false ; } elseif ( $ version === '0.0.0' ) { try { return $ this -> executeScript ( sprintf ( '%s/upgrade/db/mysql/mysql-base.php' , getConfig ( ) -> get ( 'paths' ) -> configs ) , 'mysql' ) ; } catch ( EpiDatabaseException $ e ) { getLogger ( ) -> crit ( $ e -> getMessage ( ) ) ; return false ; } } return true ; }
Initialize the database by creating the database and tables needed.
Initialize the database by creating the database and tables needed .
// we're not running setup for the first time and we're not in edit mode // email address has to be unique // getting a null back from getUser() means we can proceed // getUser returns null if the user does not exist