|
|
@@ -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;
|