diff options
| author | Jams H Thompson <jht001@users.sourceforge.net> | 2006-08-23 08:29:29 +0000 |
|---|---|---|
| committer | Jams H Thompson <jht001@users.sourceforge.net> | 2006-08-23 08:29:29 +0000 |
| commit | 7b30ac53e78edcddac94ac22c12b5f7631131b88 (patch) | |
| tree | 582b71a90305f94e7e8869ad2c29f880580787aa /BitInstaller.php | |
| parent | e726b377fa1dbe1f46ed393a4236a46eff29d774 (diff) | |
| download | install-7b30ac53e78edcddac94ac22c12b5f7631131b88.tar.gz install-7b30ac53e78edcddac94ac22c12b5f7631131b88.tar.bz2 install-7b30ac53e78edcddac94ac22c12b5f7631131b88.zip | |
Numerous fixes to upgrade scripts + eliminate ability of users to invalidate each others passwords
Diffstat (limited to 'BitInstaller.php')
| -rw-r--r-- | BitInstaller.php | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/BitInstaller.php b/BitInstaller.php index 56b8317..63cacde 100644 --- a/BitInstaller.php +++ b/BitInstaller.php @@ -1,6 +1,6 @@ <?php /** - * @version $Header: /cvsroot/bitweaver/_bit_install/BitInstaller.php,v 1.22 2006/08/05 16:25:49 squareing Exp $ + * @version $Header: /cvsroot/bitweaver/_bit_install/BitInstaller.php,v 1.23 2006/08/23 08:29:29 jht001 Exp $ * @package install */ @@ -150,11 +150,18 @@ class BitInstaller extends BitSystem { foreach( $dd as $alter ) { foreach( array_keys( $alter ) as $tableName ) { $completeTableName = $tablePrefix.$tableName; - $sql = $dict->ChangeTableSQL( $completeTableName, $alter[$tableName] ); - if( $sql && ($dict->ExecuteSQLArray( $sql ) > 0 ) ) { - } else { - print '<dd><span class="error">Failed to alter '.$completeTableName.' -> '.$alter[$tableName].'</span>'; - array_push( $failedcommands, $sql ); + foreach( $alter[$tableName] as $from => $flds ) { + if (is_string($flds)) { + $sql = $dict->ChangeTableSQL( $completeTableName, $flds ); + } + else { + $sql = $dict->ChangeTableSQL( $completeTableName, array($flds) ); + } + if( $sql && ($dict->ExecuteSQLArray( $sql ) > 0 ) ) { + } else { + print '<dd><span class="error">Failed to alter '.$completeTableName.' -> '.$alter[$tableName].'</span>'; + array_push( $failedcommands, $sql ); + } } } } |
