Revision 2117
Added by darkviper almost 10 years ago
SqlImport.php | ||
---|---|---|
206 | 206 |
/* *** ATTENTION:: Do Not Change The Order Of Search-Replace Statements !! *** */ |
207 | 207 |
// define basic array of searches |
208 | 208 |
$aSearch[] = '/\{TABLE_PREFIX\}/'; /* step 0 */ |
209 |
$aSearch[] = '/\{FIELD_COLLATION\}/'; /* step 1 */ |
|
210 |
$aSearch[] = '/\{TABLE_ENGINE\}/'; /* step 2 */ |
|
211 |
$aSearch[] = '/\{TABLE_ENGINE=([a-zA-Z_0-9]*)\}/'; /* step 3 */ |
|
212 |
$aSearch[] = '/\{CHARSET\}/'; /* step 4 */ |
|
213 |
$aSearch[] = '/\{COLLATION\}/'; /* step 5 */ |
|
209 |
$aSearch[] = '/\{FIELD_CHARSET\}/'; /* step 1 */ |
|
210 |
$aSearch[] = '/\{FIELD_COLLATION\}/'; /* step 2 */ |
|
211 |
$aSearch[] = '/\{TABLE_ENGINE\}/'; /* step 3 */ |
|
212 |
$aSearch[] = '/\{TABLE_ENGINE=([a-zA-Z_0-9]*)\}/'; /* step 4 */ |
|
213 |
$aSearch[] = '/\{CHARSET\}/'; /* step 5 */ |
|
214 |
$aSearch[] = '/\{COLLATION\}/'; /* step 6 */ |
|
214 | 215 |
// get from addReplacements |
215 | 216 |
$aReplace = $this->aReplacements['value']; |
216 | 217 |
// define basic array of replacements |
217 | 218 |
$aReplace[] = $this->sTablePrefix; /* step 0 */ |
218 |
$aReplace[] = ' COLLATE {COLLATION}'; /* step 1 */ |
|
219 |
$aReplace[] = ' {TABLE_ENGINE='.$this->sEngine.'}'; /* step 2 */ |
|
220 |
$aReplace[] = ' ENGINE=$1 DEFAULT CHARSET={CHARSET} COLLATE={COLLATION}'; /* step 3 */ |
|
221 |
$aReplace[] = $sCharset; /* step 4 */ |
|
222 |
$aReplace[] = $this->sCollation; /* step 5 */ |
|
219 |
$aReplace[] = ' CHARACTER SET {CHARSET}'; /* step 1 */ |
|
220 |
$aReplace[] = ' COLLATE {COLLATION}'; /* step 2 */ |
|
221 |
$aReplace[] = ' {TABLE_ENGINE='.$this->sEngine.'}'; /* step 3 */ |
|
222 |
$aReplace[] = ' ENGINE=$1 DEFAULT CHARSET={CHARSET} COLLATE={COLLATION}'; /* step 4 */ |
|
223 |
$aReplace[] = $sCharset; /* step 5 */ |
|
224 |
$aReplace[] = $this->sCollation; /* step 6 */ |
|
223 | 225 |
|
224 | 226 |
$sql = ''; // buffer for statements |
225 | 227 |
$aSql = file($this->sStructFile, FILE_SKIP_EMPTY_LINES|FILE_IGNORE_NEW_LINES); |
Also available in: Unified diff
28 Dec-2014 Build 2117 Manuela v.d.Decken(DarkViper)
! framework/SqlImport updated for new phpMAdmin field formats