From ad572219ec9a66f66f24c30e0a28ad21c2c5bceb Mon Sep 17 00:00:00 2001 From: abarrau Date: Sat, 10 Apr 2021 04:41:49 +0200 Subject: [PATCH 1/6] load class from controller path from third_party --- system/core/CodeIgniter.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/system/core/CodeIgniter.php b/system/core/CodeIgniter.php index 0d03293f..d8318f2d 100644 --- a/system/core/CodeIgniter.php +++ b/system/core/CodeIgniter.php @@ -402,13 +402,17 @@ if ( ! is_php('5.4')) $class = ucfirst($RTR->class); $method = $RTR->method; - if (empty($class) OR ! file_exists(APPPATH.'controllers/'.$RTR->directory.$class.'.php')) + if (empty($class) OR !(file_exists(APPPATH.'controllers/'.$RTR->directory.$class.'.php') OR file_exists(APPPATH.'third_party/controllers/'.$RTR->directory.$class.'.php'))) { $e404 = TRUE; } else { - require_once(APPPATH.'controllers/'.$RTR->directory.$class.'.php'); + if (file_exists(APPPATH.'third_party/controllers/'.$RTR->directory.$class.'.php')) { + require_once(APPPATH.'third_party/controllers/'.$RTR->directory.$class.'.php'); + } else { + require_once(APPPATH.'controllers/'.$RTR->directory.$class.'.php'); + } if ( ! class_exists($class, FALSE) OR $method[0] === '_' OR method_exists('CI_Controller', $method)) { From 5c9fd1a3e6a7ade6a96bd1a1571c28f5f63b9208 Mon Sep 17 00:00:00 2001 From: abarrau Date: Sat, 10 Apr 2021 05:02:01 +0200 Subject: [PATCH 2/6] load custom.css file from third_party --- application/views/interface_assets/header.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/application/views/interface_assets/header.php b/application/views/interface_assets/header.php index 088d02da..8040cf57 100644 --- a/application/views/interface_assets/header.php +++ b/application/views/interface_assets/header.php @@ -39,7 +39,10 @@ uri->segment(1) == "adif") { ?> - + + '; } ?> + + <?php if(isset($page_title)) { echo $page_title; } ?> - Cloudlog From de52e91cde241c2db95e30a77d68b6eab1d21782 Mon Sep 17 00:00:00 2001 From: abarrau Date: Sat, 10 Apr 2021 05:03:44 +0200 Subject: [PATCH 3/6] load custom.css file from third_party --- application/views/interface_assets/mini_header.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/application/views/interface_assets/mini_header.php b/application/views/interface_assets/mini_header.php index 4e93e899..450b0b46 100644 --- a/application/views/interface_assets/mini_header.php +++ b/application/views/interface_assets/mini_header.php @@ -18,8 +18,10 @@ - + '; } ?> + + <?php if(isset($page_title)) { echo $page_title; } ?> - Cloudlog - \ No newline at end of file + From 1ca1bc13e90807c80197445bd027ff04f15356c3 Mon Sep 17 00:00:00 2001 From: abarrau Date: Sat, 10 Apr 2021 05:20:42 +0200 Subject: [PATCH 4/6] load custom.css from assets path --- application/views/interface_assets/header.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/views/interface_assets/header.php b/application/views/interface_assets/header.php index 8040cf57..fb5e33e4 100644 --- a/application/views/interface_assets/header.php +++ b/application/views/interface_assets/header.php @@ -40,7 +40,7 @@ - '; } ?> + '; } ?> From 7ed5a89253b7301ad1559d69241cbf3fac7795ad Mon Sep 17 00:00:00 2001 From: abarrau Date: Sat, 10 Apr 2021 05:21:22 +0200 Subject: [PATCH 5/6] load custom.css from assets path --- application/views/interface_assets/mini_header.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/views/interface_assets/mini_header.php b/application/views/interface_assets/mini_header.php index 450b0b46..82674545 100644 --- a/application/views/interface_assets/mini_header.php +++ b/application/views/interface_assets/mini_header.php @@ -18,7 +18,7 @@ - '; } ?> + '; } ?> From 62e2562cef0db7cff0d8ab442168f93b106dd917 Mon Sep 17 00:00:00 2001 From: abarrau Date: Sun, 11 Apr 2021 08:34:55 +0200 Subject: [PATCH 6/6] add to use english language if ask not found add to use the english language file, if the ask language not found --- system/core/Lang.php | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/system/core/Lang.php b/system/core/Lang.php index 569b0236..cc371cd4 100644 --- a/system/core/Lang.php +++ b/system/core/Lang.php @@ -146,8 +146,22 @@ class CI_Lang { break; } } + // try to load in default language (english) // + if (($found !== TRUE)&&($idiom != 'english')) { + $idiom = 'english'; + foreach (get_instance()->load->get_package_paths(TRUE) as $package_path) + { + $package_path .= 'language/'.$idiom.'/'.$langfile; + if ($basepath !== $package_path && file_exists($package_path)) + { + include($package_path); + $found = TRUE; + break; + } + } + } } - + if ($found !== TRUE) { show_error('Unable to load the requested language file: language/'.$idiom.'/'.$langfile);