mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-07 20:12:42 +00:00
consolidate cake_error and cake_developer to simply "cake_dev"
it's a lot easier for adding new translations to think: is it for the end user? use 'cake' as the domain is it for the developer use 'cake_dev' as the domain is it for the console use 'cake_console' as the domain also neatly avoids the "this message is an error, and it's in cake_developer, why?" - question (because cake_error was intended for anything which is used in trigger_error/exceptions, not a variable named $error
This commit is contained in:
parent
7fa52710f3
commit
32df3156a7
75 changed files with 331 additions and 331 deletions
|
@ -55,7 +55,7 @@ class PhpReader implements ConfigReaderInterface {
|
|||
*/
|
||||
public function read($key) {
|
||||
if (strpos($key, '..') !== false) {
|
||||
throw new ConfigureException(__d('cake_error', 'Cannot load configuration files with ../ in them.'));
|
||||
throw new ConfigureException(__d('cake_dev', 'Cannot load configuration files with ../ in them.'));
|
||||
}
|
||||
if (substr($key, -4) === '.php') {
|
||||
$key = substr($key, 0, -4);
|
||||
|
@ -70,13 +70,13 @@ class PhpReader implements ConfigReaderInterface {
|
|||
if (!file_exists($file)) {
|
||||
$file .= '.php';
|
||||
if (!file_exists($file)) {
|
||||
throw new ConfigureException(__d('cake_error', 'Could not load configuration files: %s or %s', substr($file, 0, -4), $file));
|
||||
throw new ConfigureException(__d('cake_dev', 'Could not load configuration files: %s or %s', substr($file, 0, -4), $file));
|
||||
}
|
||||
}
|
||||
include $file;
|
||||
if (!isset($config)) {
|
||||
throw new ConfigureException(
|
||||
sprintf(__d('cake_error', 'No variable $config found in %s.php'), $file)
|
||||
sprintf(__d('cake_dev', 'No variable $config found in %s.php'), $file)
|
||||
);
|
||||
}
|
||||
return $config;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue