Skip to content

Commit 656202f

Browse files
committed
Updated Plain_Migration to load custom migration file if it is found
It will then figure the latest migration to use
1 parent 7fb18af commit 656202f

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

application/libraries/Plain_Migration.php

+10
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,16 @@ class Plain_Migration extends CI_Migration
44
{
55
public function __construct($config = array())
66
{
7+
$main_config = $config;
8+
unset($config);
9+
if (file_exists(CUSTOMPATH . 'config/migration.php')) {
10+
include CUSTOMPATH . 'config/migration.php';
11+
$custom_config = $config;
12+
unset($config);
13+
$config = $main_config;
14+
}
15+
16+
$config['migration_version'] = (isset($custom_config['migration_version']) && $custom_config['migration_version'] > $config['migration_version']) ? $custom_config['migration_version'] : $config['migration_version'];
717
parent::__construct($config);
818
self::checkForInnoDB();
919
}

system/core/Common.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -514,16 +514,16 @@ function _exception_handler($severity, $message, $filepath, $line)
514514
function remove_invisible_characters($str, $url_encoded = TRUE)
515515
{
516516
$non_displayables = array();
517-
517+
518518
// every control character except newline (dec 10)
519519
// carriage return (dec 13), and horizontal tab (dec 09)
520-
520+
521521
if ($url_encoded)
522522
{
523523
$non_displayables[] = '/%0[0-8bcef]/'; // url encoded 00-08, 11, 12, 14, 15
524524
$non_displayables[] = '/%1[0-9a-f]/'; // url encoded 16-31
525525
}
526-
526+
527527
$non_displayables[] = '/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F]+/S'; // 00-08, 11, 12, 14-31, 127
528528

529529
do

0 commit comments

Comments
 (0)