diff options
author | Andrey Andreev <narf@bofh.bg> | 2011-10-20 08:22:12 +0200 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2011-10-20 08:22:12 +0200 |
commit | d8442dd015d9e16929825bc51f3cac25c2f74c73 (patch) | |
tree | b9d1a059683b0e31cf056150cc375941a91be252 /application | |
parent | 56b21e1233855e9ea87ece7bb92e7994042b9cb3 (diff) | |
parent | 9fca615492ba481f5c27890b3b61f0603f45c55b (diff) |
Merge remote-tracking branch 'upstream/develop' into ci-oci8-driver-php5
Diffstat (limited to 'application')
-rw-r--r-- | application/config/constants.php | 12 | ||||
-rw-r--r-- | application/config/migration.php | 140 | ||||
-rw-r--r-- | application/errors/error_php.php | 17 |
3 files changed, 99 insertions, 70 deletions
diff --git a/application/config/constants.php b/application/config/constants.php index 4a879d360..ee177f5ad 100644 --- a/application/config/constants.php +++ b/application/config/constants.php @@ -36,6 +36,18 @@ define('FOPEN_READ_WRITE_CREATE', 'a+b'); define('FOPEN_WRITE_CREATE_STRICT', 'xb'); define('FOPEN_READ_WRITE_CREATE_STRICT', 'x+b'); +/* +|-------------------------------------------------------------------------- +| Display Debug backtrace +|-------------------------------------------------------------------------- +| +| If set to TRUE, a backtrace will be displayed along with php errors. If +| error_reporting is disabled, the backtrace will not display, regardless +| of this setting +| +*/ +define('SHOW_DEBUG_BACKTRACE', TRUE); + /* End of file constants.php */ /* Location: ./application/config/constants.php */
\ No newline at end of file diff --git a/application/config/migration.php b/application/config/migration.php index 1f532f170..3ca47f688 100644 --- a/application/config/migration.php +++ b/application/config/migration.php @@ -1,71 +1,71 @@ -<?php defined('BASEPATH') OR exit('No direct script access allowed');
-/*
-|--------------------------------------------------------------------------
-| Enable/Disable Migrations
-|--------------------------------------------------------------------------
-|
-| Migrations are disabled by default for security reasons.
-| You should enable migrations whenever you intend to do a schema migration
-| and disable it back when you're done.
-|
-*/
-$config['migration_enabled'] = FALSE;
-
-/*
-|--------------------------------------------------------------------------
-| Migrations table
-|--------------------------------------------------------------------------
-|
-| This is the name of the table that will store the current migrations state.
-| When migrations runs it will store in a database table which migration
-| level the system is at. It then compares the migration level in the this
-| table to the $config['migration_version'] if they are not the same it
-| will migrate up. This must be set.
-|
-*/
-$config['migration_table'] = 'migrations';
-
-
-/*
-|--------------------------------------------------------------------------
-| Auto Migrate To Latest
-|--------------------------------------------------------------------------
-|
-| If this is set to TRUE when you load the migrations class and have
-| $config['migration_enabled'] set to TRUE the system will auto migrate
-| to your latest migration (whatever $config['migration_version'] is
-| set to). This way you do not have to call migrations anywhere else
-| in your code to have the latest migration.
-|
-*/
-$config['migration_auto_latest'] = FALSE;
-
-
-/*
-|--------------------------------------------------------------------------
-| Migrations version
-|--------------------------------------------------------------------------
-|
-| This is used to set migration version that the file system should be on.
-| If you run $this->migration->latest() this is the version that schema will
-| be upgraded / downgraded to.
-|
-*/
-$config['migration_version'] = 0;
-
-
-/*
-|--------------------------------------------------------------------------
-| Migrations Path
-|--------------------------------------------------------------------------
-|
-| Path to your migrations folder.
-| Typically, it will be within your application path.
-| Also, writing permission is required within the migrations path.
-|
-*/
-$config['migration_path'] = APPPATH . 'migrations/';
-
-
-/* End of file migration.php */
+<?php defined('BASEPATH') OR exit('No direct script access allowed'); +/* +|-------------------------------------------------------------------------- +| Enable/Disable Migrations +|-------------------------------------------------------------------------- +| +| Migrations are disabled by default for security reasons. +| You should enable migrations whenever you intend to do a schema migration +| and disable it back when you're done. +| +*/ +$config['migration_enabled'] = FALSE; + +/* +|-------------------------------------------------------------------------- +| Migrations table +|-------------------------------------------------------------------------- +| +| This is the name of the table that will store the current migrations state. +| When migrations runs it will store in a database table which migration +| level the system is at. It then compares the migration level in the this +| table to the $config['migration_version'] if they are not the same it +| will migrate up. This must be set. +| +*/ +$config['migration_table'] = 'migrations'; + + +/* +|-------------------------------------------------------------------------- +| Auto Migrate To Latest +|-------------------------------------------------------------------------- +| +| If this is set to TRUE when you load the migrations class and have +| $config['migration_enabled'] set to TRUE the system will auto migrate +| to your latest migration (whatever $config['migration_version'] is +| set to). This way you do not have to call migrations anywhere else +| in your code to have the latest migration. +| +*/ +$config['migration_auto_latest'] = FALSE; + + +/* +|-------------------------------------------------------------------------- +| Migrations version +|-------------------------------------------------------------------------- +| +| This is used to set migration version that the file system should be on. +| If you run $this->migration->latest() this is the version that schema will +| be upgraded / downgraded to. +| +*/ +$config['migration_version'] = 0; + + +/* +|-------------------------------------------------------------------------- +| Migrations Path +|-------------------------------------------------------------------------- +| +| Path to your migrations folder. +| Typically, it will be within your application path. +| Also, writing permission is required within the migrations path. +| +*/ +$config['migration_path'] = APPPATH . 'migrations/'; + + +/* End of file migration.php */ /* Location: ./application/config/migration.php */
\ No newline at end of file diff --git a/application/errors/error_php.php b/application/errors/error_php.php index f085c2037..514e477e8 100644 --- a/application/errors/error_php.php +++ b/application/errors/error_php.php @@ -7,4 +7,21 @@ <p>Filename: <?php echo $filepath; ?></p> <p>Line Number: <?php echo $line; ?></p> +<?php if(defined('SHOW_DEBUG_BACKTRACE') && SHOW_DEBUG_BACKTRACE === TRUE): ?> + + <p>Backtrace: </p> + <?php foreach(debug_backtrace() as $error): ?> + + <?php if(isset($error['file']) && ! stristr($error['file'], SYSDIR)): ?> + <p style="margin-left:10px"> + File: <?php echo $error['file'] ?><br /> + Line: <?php echo $error['line'] ?><br /> + Function: <?php echo $error['function'] ?> + </p> + <? endif ?> + + <? endforeach ?></p> + +<?php endif ?> + </div>
\ No newline at end of file |