@@ 379-397 (lines=19) @@ | ||
376 | $path = $this->determine_migration_path($type); |
|
377 | ||
378 | // Load all *_*.php files in the migrations path |
|
379 | foreach (glob($path.'*_*.php') as $file) |
|
380 | { |
|
381 | $name = basename($file, '.php'); |
|
382 | ||
383 | // Filter out non-migration files |
|
384 | if (preg_match($this->_migration_regex, $name)) |
|
385 | { |
|
386 | $number = $this->_get_migration_number($name); |
|
387 | ||
388 | // There cannot be duplicate migration numbers |
|
389 | if (isset($migrations[$number])) |
|
390 | { |
|
391 | $this->_error_string = sprintf($this->lang->line('migration_multiple_version'), $number); |
|
392 | show_error($this->_error_string); |
|
393 | } |
|
394 | ||
395 | $migrations[$number] = $file; |
|
396 | } |
|
397 | } |
|
398 | ||
399 | ksort($migrations); |
|
400 | return $migrations; |
@@ 352-370 (lines=19) @@ | ||
349 | $migrations = array(); |
|
350 | ||
351 | // Load all *_*.php files in the migrations path |
|
352 | foreach (glob($this->_migration_path.'*_*.php') as $file) |
|
353 | { |
|
354 | $name = basename($file, '.php'); |
|
355 | ||
356 | // Filter out non-migration files |
|
357 | if (preg_match($this->_migration_regex, $name)) |
|
358 | { |
|
359 | $number = $this->_get_migration_number($name); |
|
360 | ||
361 | // There cannot be duplicate migration numbers |
|
362 | if (isset($migrations[$number])) |
|
363 | { |
|
364 | $this->_error_string = sprintf($this->lang->line('migration_multiple_version'), $number); |
|
365 | show_error($this->_error_string); |
|
366 | } |
|
367 | ||
368 | $migrations[$number] = $file; |
|
369 | } |
|
370 | } |
|
371 | ||
372 | ksort($migrations); |
|
373 | return $migrations; |