Ignore:
Timestamp:
03/10/2010 01:35:30 PM (2 years ago)
Author:
Xiping.Wang
Message:

[omcollab_multilang] Create another set of tables for new language

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/omcollab_multilang/_InstallationResources/build.php

    r1306 r1412  
    482482    $sTmpFilename =  "_InstallationResources/om{$sApp}_temp.sql"; 
    483483    file_put_contents( $sTmpFilename, $sSqlConfigure ); 
     484 
     485    // xiping.wang@gmail.com 2010-03-10  
     486    //Create wiki tables for multi-lang  
     487    if($sApp == 'wiki') { 
     488        $sSqlConfigure = file_get_contents( "_InstallationResources/om{$sApp}.sql" ); 
     489        // replace  
     490        $sSqlConfigure = str_replace( '{omwiki_database_name}', $build['omwiki_database_name'], $sSqlConfigure ); 
     491        $sSqlConfigure = str_replace( '{omcollab_db_table_prefix}', 'zh_', $sSqlConfigure ); 
     492                                              
     493        $sTmpFilename =  "_InstallationResources/om{$sApp}zh_temp.sql"; 
     494        file_put_contents( $sTmpFilename, $sSqlConfigure ); 
     495    } 
    484496  } 
    485497}else{ 
     
    587599    exec( $sCommand, $aOutput ); 
    588600    $aExecResults[$sCommand][] = $aOutput; 
     601 
     602    if ($sDb == 'wiki'){ 
     603        // xiping.wang@gmail.com 2010-03-10 
     604        // create another language 
     605        $sCommand = "$sMySqlExecutable " 
     606              . "-h {$build['omcollab_db_hostname']} " 
     607              . "-u {$DbIni[$sDb]['Username']} " 
     608              . "-p{$DbIni[$sDb]['Password']} " 
     609              . "{$DbIni[$sDb]['Database']} < " 
     610              . realpath("_InstallationResources/om{$sDb}zh_temp.sql"); 
     611        echo " * Building $sDb database {$DbIni[$sDb]['Database']} for {$DbIni[$sDb]['Username']}/{$DbIni[$sDb]['Password']}\n"; 
     612        exec( $sCommand, $aOutput ); 
     613        $aExecResults[$sCommand][] = $aOutput; 
     614    } 
    589615  } 
    590616} 
Note: See TracChangeset for help on using the changeset viewer.