applications/dashboard/models/class.importmodel.php
public function ProcessImportDb() {
      // Grab a list of all of the tables.
      $TableNames = $this->SQL->FetchTables(':_z%');
      if (count($TableNames) == 0) {
         throw new Gdn_UserException('Your database does not contain any import tables.');
      }

      $Tables = array();
      foreach ($TableNames as $TableName) {
         $TableName = StringBeginsWith($TableName, $this->Database->DatabasePrefix, TRUE, TRUE);
         $DestTableName = StringBeginsWith($TableName, 'z', TRUE, TRUE);
         $TableInfo = array('Table' => $DestTableName);

         $ColumnInfos = $this->SQL->FetchTableSchema($TableName);
         $Columns = array();
         foreach ($ColumnInfos as $ColumnInfo) {
            $Columns[GetValue('Name', $ColumnInfo)] = Gdn::Structure()->ColumnTypeString($ColumnInfo);
         }
         $TableInfo['Columns'] = $Columns;
         $Tables[$DestTableName] = $TableInfo;
      }
      $this->Data['Tables'] = $Tables;
      return TRUE;
   }
public function ProcessImportDb() {
      // Grab a list of all of the tables.
      $TableNames = $this->SQL->FetchTables(':_z%');
      if (count($TableNames) == 0) {
         throw new Gdn_UserException('Your database does not contain any import tables.');
      }

      $Tables = array();
      foreach ($TableNames as $TableName) {
         $TableName = StringBeginsWith($TableName, $this->Database->DatabasePrefix, TRUE, TRUE);
         $DestTableName = StringBeginsWith($TableName, 'z', TRUE, TRUE);
         $TableInfo = array('Table' => $DestTableName);

         $ColumnInfos = $this->SQL->FetchTableSchema($TableName);
         $Columns = array();
         foreach ($ColumnInfos as $ColumnInfo) {
            $Columns[GetValue('Name', $ColumnInfo)] = Gdn::Structure()->ColumnTypeString($ColumnInfo);
         }
         $TableInfo['Columns'] = $Columns;
         $Tables[$DestTableName] = $TableInfo;
      }
      $this->Data['Tables'] = $Tables;
      return TRUE;
   }
public function ProcessImportDb ( ) { // Grab a list of all of the tables.
 $ TableNames = $ this -> SQL -> FetchTables ( ':_z%' ) ; if ( count ( $ TableNames ) == 0 ) { throw new Gdn_UserException ( 'Your database does not contain any import tables.' ) ; } $ Tables = array ( ) ; foreach ( $ TableNames as $ TableName ) { $ TableName = StringBeginsWith ( $ TableName , $ this -> Database -> DatabasePrefix , TRUE , TRUE ) ; $ DestTableName = StringBeginsWith ( $ TableName , 'z' , TRUE , TRUE ) ; $ TableInfo = array ( 'Table' => $ DestTableName ) ; $ ColumnInfos = $ this -> SQL -> FetchTableSchema ( $ TableName ) ; $ Columns = array ( ) ; foreach ( $ ColumnInfos as $ ColumnInfo ) { $ Columns [ GetValue ( 'Name' , $ ColumnInfo ) ] = Gdn :: Structure ( ) -> ColumnTypeString ( $ ColumnInfo ) ; } $ TableInfo [ 'Columns' ] = $ Columns ; $ Tables [ $ DestTableName ] = $ TableInfo ; } $ this -> Data [ 'Tables' ] = $ Tables ; return TRUE ; }
Process the import tables from the database.
Process the import tables from the database .