- Timestamp:
- 03/10/2010 01:35:30 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/omcollab_multilang/_InstallationResources/build.php
r1306 r1412 482 482 $sTmpFilename = "_InstallationResources/om{$sApp}_temp.sql"; 483 483 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 } 484 496 } 485 497 }else{ … … 587 599 exec( $sCommand, $aOutput ); 588 600 $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 } 589 615 } 590 616 }
Note: See TracChangeset
for help on using the changeset viewer.
