summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2017-09-09 16:08:00 +0200
committerFlorian Pritz <bluewind@xinu.at>2017-09-09 16:08:00 +0200
commit19f0aab3221dd7760387cbec745c1eca9b215af7 (patch)
treed2d166a68ee322087a793fa712498e03ac58ebfe
parent27639d64d06b62f237bbde253c46cd28fdce8884 (diff)
WIP: CI3 migration
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rw-r--r--NEWS5
-rw-r--r--application/config/config.php4
-rw-r--r--application/config/example/database.php1
-rw-r--r--application/config/migration.php2
-rw-r--r--application/config/routes.php6
-rw-r--r--application/controllers/Api.php (renamed from application/controllers/api.php)0
-rw-r--r--application/controllers/Main.php (renamed from application/controllers/file/file_default.php)2
-rw-r--r--application/controllers/Tools.php (renamed from application/controllers/tools.php)0
-rw-r--r--application/controllers/User.php (renamed from application/controllers/user.php)0
-rw-r--r--application/controllers/file/Multipaste.php (renamed from application/controllers/file/multipaste.php)0
-rw-r--r--application/libraries/Duser/Duser.php2
-rw-r--r--application/models/Mfile.php (renamed from application/models/mfile.php)0
-rw-r--r--application/models/Mmultipaste.php (renamed from application/models/mmultipaste.php)0
-rw-r--r--application/models/Muser.php (renamed from application/models/muser.php)0
-rw-r--r--application/views/errors/html/error_404.php2
-rw-r--r--application/views/errors/html/error_db.php2
-rw-r--r--public_html/index.php58
-rw-r--r--system/libraries/Driver.php1
18 files changed, 72 insertions, 13 deletions
diff --git a/NEWS b/NEWS
index d661e9020..0ce9f981f 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,10 @@
This file lists major, incompatible or otherwise important changes, you should look at it after every update.
+3.0.0
+
+ - INCOMPATIBLE:
+ + Change pconnect in database.php to FALSE
+
2.1.3 2017-07-04
- API 2.1.1: Fix incorrect types of empty objects returned by file/history and file/delete
diff --git a/application/config/config.php b/application/config/config.php
index 1f71d74eb..40212b2f3 100644
--- a/application/config/config.php
+++ b/application/config/config.php
@@ -384,7 +384,7 @@ $config['encryption_key'] = '';
$config['sess_driver'] = 'database';
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 7200;
-$config['sess_save_path'] = NULL;
+$config['sess_save_path'] = "ci_sessions";
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 300;
$config['sess_regenerate_destroy'] = FALSE;
@@ -641,4 +641,4 @@ $config['download_nginx_location'] = '/protected-uploads';
if (file_exists(APPPATH.'config/config-local.php')) {
include APPPATH.'config/config-local.php';
-} \ No newline at end of file
+}
diff --git a/application/config/example/database.php b/application/config/example/database.php
index 7776851ae..b4cb64039 100644
--- a/application/config/example/database.php
+++ b/application/config/example/database.php
@@ -96,4 +96,3 @@ $db['default'] = array(
'save_queries' => TRUE
);
-} \ No newline at end of file
diff --git a/application/config/migration.php b/application/config/migration.php
index dad6fcbf7..5b71fc184 100644
--- a/application/config/migration.php
+++ b/application/config/migration.php
@@ -29,7 +29,7 @@ $config['migration_enabled'] = true;
| defaults to 'sequential' for backward compatibility with CI2.
|
*/
-$config['migration_type'] = 'timestamp';
+$config['migration_type'] = 'sequential';
/*
|--------------------------------------------------------------------------
diff --git a/application/config/routes.php b/application/config/routes.php
index 896d9d63f..1accd7b95 100644
--- a/application/config/routes.php
+++ b/application/config/routes.php
@@ -49,12 +49,12 @@ defined('BASEPATH') OR exit('No direct script access allowed');
| Examples: my-controller/index -> my_controller/index
| my-controller/my-method -> my_controller/my_method
*/
-$route['default_controller'] = "file/file_default";
+$route['default_controller'] = "main";
$route['user/(:any)'] = "user/$1";
$route['file/multipaste/(:any)'] = "file/multipaste/$1";
$route['file/(:any)'] = "file/file_default/$1";
$route['tools/(:any)'] = "tools/$1";
-$route['api/(:any)'] = "api/route/$1";
-$route['(:any)'] = "file/file_default/index/$1";
+$route['api/(.+)'] = "api/route/$1";
+$route['(.+)'] = "file/file_default/index/$1";
$route['404_override'] = '';
$route['translate_uri_dashes'] = FALSE;
diff --git a/application/controllers/api.php b/application/controllers/Api.php
index 9540f1ff7..9540f1ff7 100644
--- a/application/controllers/api.php
+++ b/application/controllers/Api.php
diff --git a/application/controllers/file/file_default.php b/application/controllers/Main.php
index 9ef7d0880..b1ec81710 100644
--- a/application/controllers/file/file_default.php
+++ b/application/controllers/Main.php
@@ -7,7 +7,7 @@
*
*/
-class File_default extends MY_Controller {
+class Main extends MY_Controller {
function __construct()
{
diff --git a/application/controllers/tools.php b/application/controllers/Tools.php
index 9e0ddfb5f..9e0ddfb5f 100644
--- a/application/controllers/tools.php
+++ b/application/controllers/Tools.php
diff --git a/application/controllers/user.php b/application/controllers/User.php
index d87b544c7..d87b544c7 100644
--- a/application/controllers/user.php
+++ b/application/controllers/User.php
diff --git a/application/controllers/file/multipaste.php b/application/controllers/file/Multipaste.php
index 50367697c..50367697c 100644
--- a/application/controllers/file/multipaste.php
+++ b/application/controllers/file/Multipaste.php
diff --git a/application/libraries/Duser/Duser.php b/application/libraries/Duser/Duser.php
index 8005a00bb..0007fabd8 100644
--- a/application/libraries/Duser/Duser.php
+++ b/application/libraries/Duser/Duser.php
@@ -50,7 +50,7 @@ class Duser extends CI_Driver_Library {
protected $_adapter = null;
protected $valid_drivers = array(
- 'duser_db', 'duser_ldap', 'duser_fluxbb'
+ 'db', 'ldap', 'fluxbb'
);
function __construct()
diff --git a/application/models/mfile.php b/application/models/Mfile.php
index 977240c89..977240c89 100644
--- a/application/models/mfile.php
+++ b/application/models/Mfile.php
diff --git a/application/models/mmultipaste.php b/application/models/Mmultipaste.php
index 52ea4dfb4..52ea4dfb4 100644
--- a/application/models/mmultipaste.php
+++ b/application/models/Mmultipaste.php
diff --git a/application/models/muser.php b/application/models/Muser.php
index 1ee6c259a..1ee6c259a 100644
--- a/application/models/muser.php
+++ b/application/models/Muser.php
diff --git a/application/views/errors/html/error_404.php b/application/views/errors/html/error_404.php
index 2e69d7e00..b71da106d 100644
--- a/application/views/errors/html/error_404.php
+++ b/application/views/errors/html/error_404.php
@@ -1,3 +1,3 @@
<?php
$title = "404 Page Not Found";
-include APPPATH."errors/error_general.php";
+include VIEWPATH."errors/html/error_general.php";
diff --git a/application/views/errors/html/error_db.php b/application/views/errors/html/error_db.php
index 827d7cc31..adff63559 100644
--- a/application/views/errors/html/error_db.php
+++ b/application/views/errors/html/error_db.php
@@ -1,3 +1,3 @@
<?php
$title = "Database Error";
-include APPPATH."errors/error_general.php";
+include VIEWPATH."errors/html/error_general.php";
diff --git a/public_html/index.php b/public_html/index.php
index 8373760fa..1bc7408f5 100644
--- a/public_html/index.php
+++ b/public_html/index.php
@@ -38,6 +38,60 @@
/*
*---------------------------------------------------------------
+ * APPLICATION ENVIRONMENT
+ *---------------------------------------------------------------
+ *
+ * You can load different configurations depending on your
+ * current environment. Setting the environment also influences
+ * things like logging and error reporting.
+ *
+ * This can be set to anything, but default usage is:
+ *
+ * development
+ * testing
+ * production
+ *
+ * NOTE: If you change these, also change the error_reporting() code below
+ */
+ define('ENVIRONMENT', 'development');
+/*
+ *---------------------------------------------------------------
+ * ERROR REPORTING
+ *---------------------------------------------------------------
+ *
+ * Different environments will require different levels of error reporting.
+ * By default development will show errors but testing and live will hide them.
+ */
+if (false) {
+switch (ENVIRONMENT)
+{
+ case 'development':
+ error_reporting(-1);
+ ini_set('display_errors', 1);
+ break;
+
+ case 'testing':
+ case 'production':
+ ini_set('display_errors', 0);
+ if (version_compare(PHP_VERSION, '5.3', '>='))
+ {
+ error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT & ~E_USER_NOTICE & ~E_USER_DEPRECATED);
+ }
+ else
+ {
+ error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT & ~E_USER_NOTICE);
+ }
+ break;
+
+ default:
+ header('HTTP/1.1 503 Service Unavailable.', TRUE, 503);
+ echo 'The application environment is not set correctly.';
+ exit(1); // EXIT_ERROR
+}
+}
+
+/*
+ *---------------------------------------------------------------
* SYSTEM DIRECTORY NAME
*---------------------------------------------------------------
*
@@ -264,8 +318,8 @@ require APPPATH.'libraries/ExceptionHandler.php';
\libraries\ExceptionHandler::setup();
// wrapper for CI so that it calls our handler rather than it's own
-function _exception_handler($severity, $message, $filepath, $line) {
- return \libraries\ExceptionHandler::error_handler($severity, $message, $filepath, $line);
+function _exception_handler($ex) {
+ return \libraries\ExceptionHandler::exception_handler($ex);
}
// Source: http://stackoverflow.com/a/15875555
diff --git a/system/libraries/Driver.php b/system/libraries/Driver.php
index 00e8416f9..e0affe6d2 100644
--- a/system/libraries/Driver.php
+++ b/system/libraries/Driver.php
@@ -102,6 +102,7 @@ class CI_Driver_Library {
// The child will be prefixed with the parent lib
$child_name = $this->lib_name.'_'.$child;
+ var_dump($child, $this->valid_drivers);
// See if requested child is a valid driver
if ( ! in_array($child, $this->valid_drivers))
{