Browse Source

using the domain cake_error for messages not intended for end users

AD7six 15 years ago
parent
commit
9b092f4bf2
2 changed files with 7 additions and 7 deletions
  1. 2 2
      lib/Cake/Configure/IniReader.php
  2. 5 5
      lib/Cake/Configure/PhpReader.php

+ 2 - 2
lib/Cake/Configure/IniReader.php

@@ -27,7 +27,7 @@
  * you to create nested arrays structures in an ini config file. For example:
  *
  * `db.password = secret` would turn into `array('db' => array('password' => 'secret'))`
- * 
+ *
  * You can nest properties as deeply as needed using .'s.  IniReader also manipulates
  * how the special ini values of 'yes', 'no', 'on', 'off', 'null' are handled.
  * These values will be converted to their boolean equivalents.
@@ -74,7 +74,7 @@ class IniReader implements ConfigReaderInterface {
 		if (!file_exists($filename)) {
 			$filename .= '.ini';
 			if (!file_exists($filename)) {
-				throw new ConfigureException(__d('cake', 'Could not load configuration files: %s or %s', substr($filename, 0, -4), $filename));
+				throw new ConfigureException(__d('cake_error', 'Could not load configuration files: %s or %s', substr($filename, 0, -4), $filename));
 			}
 		}
 		$contents = parse_ini_file($filename, true);

+ 5 - 5
lib/Cake/Configure/PhpReader.php

@@ -18,7 +18,7 @@
  */
 
 /**
- * PHP Reader allows Configure to load configuration values from 
+ * PHP Reader allows Configure to load configuration values from
  * files containing simple PHP arrays.
  *
  * @package cake.libs.config
@@ -55,13 +55,13 @@ class PhpReader implements ConfigReaderInterface {
  */
 	public function read($key) {
 		if (strpos($key, '..') !== false) {
-			throw new ConfigureException(__d('cake', 'Cannot load configuration files with ../ in them.'));
+			throw new ConfigureException(__d('cake_error', 'Cannot load configuration files with ../ in them.'));
 		}
 		if (substr($key, -4) === '.php') {
 			$key = substr($key, 0, -4);
 		}
 		list($plugin, $key) = pluginSplit($key);
-		
+
 		if ($plugin) {
 			$file = App::pluginPath($plugin) . 'config' . DS . $key;
 		} else {
@@ -70,13 +70,13 @@ class PhpReader implements ConfigReaderInterface {
 		if (!file_exists($file)) {
 			$file .= '.php';
 			if (!file_exists($file)) {
-				throw new ConfigureException(__d('cake', 'Could not load configuration files: %s or %s', substr($file, 0, -4), $file));
+				throw new ConfigureException(__d('cake_error', 'Could not load configuration files: %s or %s', substr($file, 0, -4), $file));
 			}
 		}
 		include $file;
 		if (!isset($config)) {
 			throw new ConfigureException(
-				sprintf(__d('cake', 'No variable $config found in %s.php'), $file)
+				sprintf(__d('cake_error', 'No variable $config found in %s.php'), $file)
 			);
 		}
 		return $config;