diff --git a/lib/Cake/Model/AclNode.php b/lib/Cake/Model/AclNode.php index cbd1dce1d..a425df7a5 100644 --- a/lib/Cake/Model/AclNode.php +++ b/lib/Cake/Model/AclNode.php @@ -133,7 +133,7 @@ class AclNode extends AppModel { $model = ClassRegistry::init(array('class' => $name, 'alias' => $name)); if (empty($model)) { - trigger_error(__d('cake', "Model class '%s' not found in AclNode::node() when trying to bind %s object", $type, $this->alias), E_USER_WARNING); + trigger_error(__d('cake_error', "Model class '%s' not found in AclNode::node() when trying to bind %s object", $type, $this->alias), E_USER_WARNING); return null; } @@ -178,7 +178,7 @@ class AclNode extends AppModel { $result = $db->read($this, $queryData, -1); if (!$result) { - trigger_error(__d('cake', "AclNode::node() - Couldn't find %s node identified by \"%s\"", $type, print_r($ref, true)), E_USER_WARNING); + trigger_error(__d('cake_error', "AclNode::node() - Couldn't find %s node identified by \"%s\"", $type, print_r($ref, true)), E_USER_WARNING); } } return $result; diff --git a/lib/Cake/Model/Behavior/AclBehavior.php b/lib/Cake/Model/Behavior/AclBehavior.php index 38cd7c443..0b5a49265 100644 --- a/lib/Cake/Model/Behavior/AclBehavior.php +++ b/lib/Cake/Model/Behavior/AclBehavior.php @@ -54,7 +54,7 @@ class AclBehavior extends ModelBehavior { } $model->{$type} = ClassRegistry::init($type); if (!method_exists($model, 'parentNode')) { - trigger_error(__d('cake', 'Callback parentNode() not defined in %s', $model->alias), E_USER_WARNING); + trigger_error(__d('cake_error', 'Callback parentNode() not defined in %s', $model->alias), E_USER_WARNING); } } diff --git a/lib/Cake/Model/Behavior/ContainableBehavior.php b/lib/Cake/Model/Behavior/ContainableBehavior.php index 60c6b6414..d9181724a 100644 --- a/lib/Cake/Model/Behavior/ContainableBehavior.php +++ b/lib/Cake/Model/Behavior/ContainableBehavior.php @@ -359,7 +359,7 @@ class ContainableBehavior extends ModelBehavior { if (!isset($Model->{$name}) || !is_object($Model->{$name})) { if ($throwErrors) { - trigger_error(__d('cake', 'Model "%s" is not associated with model "%s"', $Model->alias, $name), E_USER_WARNING); + trigger_error(__d('cake_error', 'Model "%s" is not associated with model "%s"', $Model->alias, $name), E_USER_WARNING); } continue; } diff --git a/lib/Cake/Model/Behavior/TranslateBehavior.php b/lib/Cake/Model/Behavior/TranslateBehavior.php index 0ab2b880f..21ceaff74 100644 --- a/lib/Cake/Model/Behavior/TranslateBehavior.php +++ b/lib/Cake/Model/Behavior/TranslateBehavior.php @@ -55,7 +55,7 @@ class TranslateBehavior extends ModelBehavior { $db = ConnectionManager::getDataSource($model->useDbConfig); if (!$db->connected) { trigger_error( - __d('cake', 'Datasource %s for TranslateBehavior of model %s is not connected', $model->useDbConfig, $model->alias), + __d('cake_error', 'Datasource %s for TranslateBehavior of model %s is not connected', $model->useDbConfig, $model->alias), E_USER_ERROR ); return false; @@ -426,7 +426,7 @@ class TranslateBehavior extends ModelBehavior { foreach (array('hasOne', 'hasMany', 'belongsTo', 'hasAndBelongsToMany') as $type) { if (isset($model->{$type}[$association]) || isset($model->__backAssociation[$type][$association])) { trigger_error( - __d('cake', 'Association %s is already binded to model %s', $association, $model->alias), + __d('cake_error', 'Association %s is already binded to model %s', $association, $model->alias), E_USER_ERROR ); return false; diff --git a/lib/Cake/Model/BehaviorCollection.php b/lib/Cake/Model/BehaviorCollection.php index 445688313..540810ba0 100644 --- a/lib/Cake/Model/BehaviorCollection.php +++ b/lib/Cake/Model/BehaviorCollection.php @@ -219,7 +219,7 @@ class BehaviorCollection extends ObjectCollection { $method = $this->hasMethod($method, true); if ($strict && empty($method)) { - trigger_error(__d('cake', "BehaviorCollection::dispatchMethod() - Method %s not found in any attached behavior", $method), E_USER_WARNING); + trigger_error(__d('cake_error', "BehaviorCollection::dispatchMethod() - Method %s not found in any attached behavior", $method), E_USER_WARNING); return null; } if (empty($method)) { diff --git a/lib/Cake/Model/CakeSchema.php b/lib/Cake/Model/CakeSchema.php index e34a1393c..9ba8eff82 100644 --- a/lib/Cake/Model/CakeSchema.php +++ b/lib/Cake/Model/CakeSchema.php @@ -592,7 +592,7 @@ class CakeSchema extends Object { $value['key'] = 'primary'; } if (!isset($db->columns[$value['type']])) { - trigger_error(__d('cake', 'Schema generation error: invalid column type %s does not exist in DBO', $value['type']), E_USER_NOTICE); + trigger_error(__d('cake_error', 'Schema generation error: invalid column type %s does not exist in DBO', $value['type']), E_USER_NOTICE); continue; } else { $defaultCol = $db->columns[$value['type']]; diff --git a/lib/Cake/Model/Datasource/CakeSession.php b/lib/Cake/Model/Datasource/CakeSession.php index 04118e428..6f1b39a6f 100644 --- a/lib/Cake/Model/Datasource/CakeSession.php +++ b/lib/Cake/Model/Datasource/CakeSession.php @@ -254,7 +254,7 @@ class CakeSession { self::__overwrite($_SESSION, Set::remove($_SESSION, $name)); return (self::check($name) == false); } - self::__setError(2, __d('cake', "%s doesn't exist", $name)); + self::__setError(2, __d('cake_error', "%s doesn't exist", $name)); return false; } @@ -480,7 +480,7 @@ class CakeSession { foreach ($sessionConfig['ini'] as $setting => $value) { if (ini_set($setting, $value) === false) { throw new CakeSessionException(sprintf( - __d('cake', 'Unable to configure the session, setting %s failed.'), + __d('cake_error', 'Unable to configure the session, setting %s failed.'), $setting )); } @@ -514,13 +514,13 @@ class CakeSession { list($plugin, $class) = pluginSplit($handler, true); App::uses($class, $plugin . 'Model/Datasource/Session'); if (!class_exists($class)) { - throw new CakeSessionException(__d('cake', 'Could not load %s to handle the session.', $class)); + throw new CakeSessionException(__d('cake_error', 'Could not load %s to handle the session.', $class)); } $handler = new $class(); if ($handler instanceof CakeSessionHandlerInterface) { return $handler; } - throw new CakeSessionException(__d('cake', 'Chosen SessionHandler does not implement CakeSessionHandlerInterface it cannot be used with an engine key.')); + throw new CakeSessionException(__d('cake_error', 'Chosen SessionHandler does not implement CakeSessionHandlerInterface it cannot be used with an engine key.')); } /** diff --git a/lib/Cake/Model/Datasource/Database/Mssql.php b/lib/Cake/Model/Datasource/Database/Mssql.php index e1cef1905..506a8e40d 100644 --- a/lib/Cake/Model/Datasource/Database/Mssql.php +++ b/lib/Cake/Model/Datasource/Database/Mssql.php @@ -116,7 +116,7 @@ class DboMssql extends DboSource { function __construct($config, $autoConnect = true) { if ($autoConnect) { if (!function_exists('mssql_min_message_severity')) { - trigger_error(__d('cake', "PHP SQL Server interface is not installed, cannot continue. For troubleshooting information, see http://php.net/mssql/"), E_USER_WARNING); + trigger_error(__d('cake_error', "PHP SQL Server interface is not installed, cannot continue. For troubleshooting information, see http://php.net/mssql/"), E_USER_WARNING); } mssql_min_message_severity(15); mssql_min_error_severity(2); diff --git a/lib/Cake/Model/Datasource/Database/Mysql.php b/lib/Cake/Model/Datasource/Database/Mysql.php index 3eecf0261..8249e72fe 100644 --- a/lib/Cake/Model/Datasource/Database/Mysql.php +++ b/lib/Cake/Model/Datasource/Database/Mysql.php @@ -298,7 +298,7 @@ class Mysql extends DboSource { $fields = false; $cols = $this->_execute('SHOW FULL COLUMNS FROM ' . $this->fullTableName($model)); if (!$cols) { - throw new CakeException(__d('cake', 'Could not describe table for %s', $model->name)); + throw new CakeException(__d('cake_error', 'Could not describe table for %s', $model->name)); } foreach ($cols as $column) { diff --git a/lib/Cake/Model/Datasource/Database/Oracle.php b/lib/Cake/Model/Datasource/Database/Oracle.php index 2edcab6dc..d0750dbb7 100644 --- a/lib/Cake/Model/Datasource/Database/Oracle.php +++ b/lib/Cake/Model/Datasource/Database/Oracle.php @@ -571,7 +571,7 @@ class DboOracle extends DboSource { */ function constraint($action, $table) { if (empty($table)) { - trigger_error(__d('cake', 'Must specify table to operate on constraints')); + trigger_error(__d('cake_error', 'Must specify table to operate on constraints')); } $table = strtoupper($table); @@ -629,7 +629,7 @@ class DboOracle extends DboSource { return $constraints; break; default: - trigger_error(__d('cake', 'DboOracle::constraint() accepts only enable, disable, or list')); + trigger_error(__d('cake_error', 'DboOracle::constraint() accepts only enable, disable, or list')); } } return true; @@ -976,7 +976,7 @@ class DboOracle extends DboSource { if ($query = $this->generateAssociationQuery($model, $linkModel, $type, $association, $assocData, $queryData, $external, $resultSet)) { if (!isset($resultSet) || !is_array($resultSet)) { if (Configure::read('debug') > 0) { - echo '
' . __d('cake', 'Query:') . ' %s %s
', $sql, $out)); + pr(sprintf('' . __d('cake_developer', 'Query:') . ' %s %s
', $sql, $out)); } } @@ -1169,7 +1169,7 @@ class DboSource extends DataSource { if ($query = $this->generateAssociationQuery($model, $linkModel, $type, $association, $assocData, $queryData, $external, $resultSet)) { if (!is_array($resultSet)) { if (Configure::read('debug') > 0) { - echo '