mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Merge branch '1.3' of github.com:cakephp/cakephp1x into 1.3
This commit is contained in:
commit
24c0883fad
51 changed files with 136 additions and 153 deletions
|
@ -27,10 +27,10 @@
|
||||||
function <?php echo $admin ?>view($id = null) {
|
function <?php echo $admin ?>view($id = null) {
|
||||||
if (!$id) {
|
if (!$id) {
|
||||||
<?php if ($wannaUseSession): ?>
|
<?php if ($wannaUseSession): ?>
|
||||||
$this->Session->setFlash(__('Invalid <?php echo strtolower($singularHumanName) ?>', true));
|
$this->Session->setFlash(sprintf(__('Invalid %s', true), '<?php echo strtolower($singularHumanName) ?>'));
|
||||||
$this->redirect(array('action' => 'index'));
|
$this->redirect(array('action' => 'index'));
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
$this->flash(__('Invalid <?php echo strtolower($singularHumanName); ?>', true), array('action' => 'index'));
|
$this->flash(sprintf(__('Invalid %s', true), '<?php echo strtolower($singularHumanName); ?>'), array('action' => 'index'));
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
}
|
}
|
||||||
$this->set('<?php echo $singularName; ?>', $this-><?php echo $currentModelName; ?>->read(null, $id));
|
$this->set('<?php echo $singularName; ?>', $this-><?php echo $currentModelName; ?>->read(null, $id));
|
||||||
|
@ -42,14 +42,14 @@
|
||||||
$this-><?php echo $currentModelName; ?>->create();
|
$this-><?php echo $currentModelName; ?>->create();
|
||||||
if ($this-><?php echo $currentModelName; ?>->save($this->data)) {
|
if ($this-><?php echo $currentModelName; ?>->save($this->data)) {
|
||||||
<?php if ($wannaUseSession): ?>
|
<?php if ($wannaUseSession): ?>
|
||||||
$this->Session->setFlash(__('The <?php echo strtolower($singularHumanName); ?> has been saved', true));
|
$this->Session->setFlash(sprintf(__('The %s has been saved', true), '<?php echo strtolower($singularHumanName); ?>'));
|
||||||
$this->redirect(array('action' => 'index'));
|
$this->redirect(array('action' => 'index'));
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
$this->flash(__('<?php echo ucfirst(strtolower($currentModelName)); ?> saved.', true), array('action' => 'index'));
|
$this->flash(sprintf(__('%s saved.', true), '<?php echo ucfirst(strtolower($currentModelName)); ?>'), array('action' => 'index'));
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
} else {
|
} else {
|
||||||
<?php if ($wannaUseSession): ?>
|
<?php if ($wannaUseSession): ?>
|
||||||
$this->Session->setFlash(__('The <?php echo strtolower($singularHumanName); ?> could not be saved. Please, try again.', true));
|
$this->Session->setFlash(sprintf(__('The %s could not be saved. Please, try again.', true), '<?php echo strtolower($singularHumanName); ?>'));
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -74,23 +74,23 @@
|
||||||
function <?php echo $admin; ?>edit($id = null) {
|
function <?php echo $admin; ?>edit($id = null) {
|
||||||
if (!$id && empty($this->data)) {
|
if (!$id && empty($this->data)) {
|
||||||
<?php if ($wannaUseSession): ?>
|
<?php if ($wannaUseSession): ?>
|
||||||
$this->Session->setFlash(__('Invalid <?php echo strtolower($singularHumanName); ?>', true));
|
$this->Session->setFlash(sprintf(__('Invalid %s', true), '<?php echo strtolower($singularHumanName); ?>'));
|
||||||
$this->redirect(array('action' => 'index'));
|
$this->redirect(array('action' => 'index'));
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
$this->flash(__('Invalid <?php echo strtolower($singularHumanName); ?>', true), array('action' => 'index'));
|
$this->flash(sprintf(__('Invalid %s', true), '<?php echo strtolower($singularHumanName); ?>'), array('action' => 'index'));
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
}
|
}
|
||||||
if (!empty($this->data)) {
|
if (!empty($this->data)) {
|
||||||
if ($this-><?php echo $currentModelName; ?>->save($this->data)) {
|
if ($this-><?php echo $currentModelName; ?>->save($this->data)) {
|
||||||
<?php if ($wannaUseSession): ?>
|
<?php if ($wannaUseSession): ?>
|
||||||
$this->Session->setFlash(__('The <?php echo strtolower($singularHumanName); ?> has been saved', true));
|
$this->Session->setFlash(sprintf(__('The %s has been saved', true), '<?php echo strtolower($singularHumanName); ?>'));
|
||||||
$this->redirect(array('action' => 'index'));
|
$this->redirect(array('action' => 'index'));
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
$this->flash(__('The <?php echo strtolower($singularHumanName); ?> has been saved.', true), array('action' => 'index'));
|
$this->flash(sprintf(__('The %s has been saved.', true), '<?php echo strtolower($singularHumanName); ?>'), array('action' => 'index'));
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
} else {
|
} else {
|
||||||
<?php if ($wannaUseSession): ?>
|
<?php if ($wannaUseSession): ?>
|
||||||
$this->Session->setFlash(__('The <?php echo strtolower($singularHumanName); ?> could not be saved. Please, try again.', true));
|
$this->Session->setFlash(sprintf(__('The %s could not be saved. Please, try again.', true), '<?php echo strtolower($singularHumanName); ?>'));
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -117,24 +117,24 @@
|
||||||
function <?php echo $admin; ?>delete($id = null) {
|
function <?php echo $admin; ?>delete($id = null) {
|
||||||
if (!$id) {
|
if (!$id) {
|
||||||
<?php if ($wannaUseSession): ?>
|
<?php if ($wannaUseSession): ?>
|
||||||
$this->Session->setFlash(__('Invalid id for <?php echo strtolower($singularHumanName); ?>', true));
|
$this->Session->setFlash(sprintf(__('Invalid id for %s', true), '<?php echo strtolower($singularHumanName); ?>'));
|
||||||
$this->redirect(array('action'=>'index'));
|
$this->redirect(array('action'=>'index'));
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
$this->flash(__('Invalid <?php echo strtolower($singularHumanName); ?>', true), array('action' => 'index'));
|
$this->flash(sprintf(__('Invalid %s', true), '<?php echo strtolower($singularHumanName); ?>'), array('action' => 'index'));
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
}
|
}
|
||||||
if ($this-><?php echo $currentModelName; ?>->delete($id)) {
|
if ($this-><?php echo $currentModelName; ?>->delete($id)) {
|
||||||
<?php if ($wannaUseSession): ?>
|
<?php if ($wannaUseSession): ?>
|
||||||
$this->Session->setFlash(__('<?php echo ucfirst(strtolower($singularHumanName)); ?> deleted', true));
|
$this->Session->setFlash(sprintf(__('%s deleted', true), '<?php echo ucfirst(strtolower($singularHumanName)); ?>'));
|
||||||
$this->redirect(array('action'=>'index'));
|
$this->redirect(array('action'=>'index'));
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
$this->flash(__('<?php echo ucfirst(strtolower($singularHumanName)); ?> deleted', true), array('action' => 'index'));
|
$this->flash(sprintf(__('%s deleted', true), '<?php echo ucfirst(strtolower($singularHumanName)); ?>'), array('action' => 'index'));
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
}
|
}
|
||||||
<?php if ($wannaUseSession): ?>
|
<?php if ($wannaUseSession): ?>
|
||||||
$this->Session->setFlash(__('<?php echo ucfirst(strtolower($singularHumanName)); ?> was not deleted', true));
|
$this->Session->setFlash(sprintf(__('%s was not deleted', true), '<?php echo ucfirst(strtolower($singularHumanName)); ?>'));
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
$this->flash(__('<?php echo ucfirst(strtolower($singularHumanName)); ?> was not deleted', true), array('action' => 'index'));
|
$this->flash(sprintf(__('%s was not deleted', true), '<?php echo ucfirst(strtolower($singularHumanName)); ?>'), array('action' => 'index'));
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
$this->redirect(array('action' => 'index'));
|
$this->redirect(array('action' => 'index'));
|
||||||
}
|
}
|
|
@ -24,7 +24,7 @@ endif;
|
||||||
\$settings = Cache::settings();
|
\$settings = Cache::settings();
|
||||||
if (!empty(\$settings)):
|
if (!empty(\$settings)):
|
||||||
echo '<span class=\"notice success\">';
|
echo '<span class=\"notice success\">';
|
||||||
echo sprintf(__('The %s is being used for caching. To change the config edit APP/config/core.php ', true), '<em>'. \$settings['engine'] . 'Engine</em>');
|
printf(__('The %s is being used for caching. To change the config edit APP/config/core.php ', true), '<em>'. \$settings['engine'] . 'Engine</em>');
|
||||||
echo '</span>';
|
echo '</span>';
|
||||||
else:
|
else:
|
||||||
echo '<span class=\"notice\">';
|
echo '<span class=\"notice\">';
|
||||||
|
@ -75,7 +75,7 @@ $output .= "<?php endif;?>\n";
|
||||||
$output .= "<h3><?php __('Editing this Page') ?></h3>\n";
|
$output .= "<h3><?php __('Editing this Page') ?></h3>\n";
|
||||||
$output .= "<p>\n";
|
$output .= "<p>\n";
|
||||||
$output .= "<?php\n";
|
$output .= "<?php\n";
|
||||||
$output .= "\techo sprintf(__('To change the content of this page, edit: %s\n";
|
$output .= "\tprintf(__('To change the content of this page, edit: %s\n";
|
||||||
$output .= "\t\tTo change its layout, edit: %s\n";
|
$output .= "\t\tTo change its layout, edit: %s\n";
|
||||||
$output .= "\t\tYou can also add some CSS styles for your pages at: %s', true),\n";
|
$output .= "\t\tYou can also add some CSS styles for your pages at: %s', true),\n";
|
||||||
$output .= "\t\tAPP . 'views' . DS . 'pages' . DS . 'home.ctp.<br />', APP . 'views' . DS . 'layouts' . DS . 'default.ctp.<br />', APP . 'webroot' . DS . 'css');\n";
|
$output .= "\t\tAPP . 'views' . DS . 'pages' . DS . 'home.ctp.<br />', APP . 'views' . DS . 'layouts' . DS . 'default.ctp.<br />', APP . 'webroot' . DS . 'css');\n";
|
||||||
|
|
|
@ -245,7 +245,7 @@ class CakeSession extends Object {
|
||||||
* @deprecated Use CakeSession::delete instead
|
* @deprecated Use CakeSession::delete instead
|
||||||
*/
|
*/
|
||||||
function del($name) {
|
function del($name) {
|
||||||
trigger_error('CakeSession::del() is deprecated, use CakeSession::delete() instead.', E_USER_WARNING);
|
trigger_error(__('CakeSession::del() is deprecated, use CakeSession::delete() instead.', true), E_USER_WARNING);
|
||||||
return $this->delete($name);
|
return $this->delete($name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -259,12 +259,12 @@ class CakeSession extends Object {
|
||||||
function delete($name) {
|
function delete($name) {
|
||||||
if ($this->check($name)) {
|
if ($this->check($name)) {
|
||||||
if (in_array($name, $this->watchKeys)) {
|
if (in_array($name, $this->watchKeys)) {
|
||||||
trigger_error('Deleting session key {' . $name . '}', E_USER_NOTICE);
|
trigger_error(sprintf(__('Deleting session key {%s}', true), $name), E_USER_NOTICE);
|
||||||
}
|
}
|
||||||
$this->__overwrite($_SESSION, Set::remove($_SESSION, $name));
|
$this->__overwrite($_SESSION, Set::remove($_SESSION, $name));
|
||||||
return ($this->check($name) == false);
|
return ($this->check($name) == false);
|
||||||
}
|
}
|
||||||
$this->__setError(2, "$name doesn't exist");
|
$this->__setError(2, sprintf(__("%s doesn't exist", true), $name));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -423,7 +423,7 @@ class CakeSession extends Object {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (in_array($name, $this->watchKeys)) {
|
if (in_array($name, $this->watchKeys)) {
|
||||||
trigger_error('Writing session key {' . $name . '}: ' . Debugger::exportVar($value), E_USER_NOTICE);
|
trigger_error(sprintf(__('Writing session key {%s}: %s', true), $name, Debugger::exportVar($value)), E_USER_NOTICE);
|
||||||
}
|
}
|
||||||
$this->__overwrite($_SESSION, Set::insert($_SESSION, $name, $value));
|
$this->__overwrite($_SESSION, Set::insert($_SESSION, $name, $value));
|
||||||
return (Set::classicExtract($_SESSION, $name) === $value);
|
return (Set::classicExtract($_SESSION, $name) === $value);
|
||||||
|
|
|
@ -261,8 +261,7 @@ class Configure extends Object {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isset($config)) {
|
if (!isset($config)) {
|
||||||
$error = __("Configure::load() - no variable \$config found in %s.php", true);
|
trigger_error(sprintf(__('Configure::load() - no variable $config found in %s.php', true), $fileName), E_USER_WARNING);
|
||||||
trigger_error(sprintf($error, $fileName), E_USER_WARNING);
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return Configure::write($config);
|
return Configure::write($config);
|
||||||
|
@ -398,7 +397,7 @@ class Configure extends Object {
|
||||||
$cache = Cache::config('default');
|
$cache = Cache::config('default');
|
||||||
|
|
||||||
if (empty($cache['settings'])) {
|
if (empty($cache['settings'])) {
|
||||||
trigger_error('Cache not configured properly. Please check Cache::config(); in APP/config/core.php', E_USER_WARNING);
|
trigger_error(__('Cache not configured properly. Please check Cache::config(); in APP/config/core.php', true), E_USER_WARNING);
|
||||||
$cache = Cache::config('default', array('engine' => 'File'));
|
$cache = Cache::config('default', array('engine' => 'File'));
|
||||||
}
|
}
|
||||||
$path = $prefix = $duration = null;
|
$path = $prefix = $duration = null;
|
||||||
|
|
|
@ -248,12 +248,12 @@ class DbAcl extends AclBase {
|
||||||
$acoPath = $this->Aco->node($aco);
|
$acoPath = $this->Aco->node($aco);
|
||||||
|
|
||||||
if (empty($aroPath) || empty($acoPath)) {
|
if (empty($aroPath) || empty($acoPath)) {
|
||||||
trigger_error("DbAcl::check() - Failed ARO/ACO node lookup in permissions check. Node references:\nAro: " . print_r($aro, true) . "\nAco: " . print_r($aco, true), E_USER_WARNING);
|
trigger_error(__("DbAcl::check() - Failed ARO/ACO node lookup in permissions check. Node references:\nAro: ", true) . print_r($aro, true) . "\nAco: " . print_r($aco, true), E_USER_WARNING);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($acoPath == null || $acoPath == array()) {
|
if ($acoPath == null || $acoPath == array()) {
|
||||||
trigger_error("DbAcl::check() - Failed ACO node lookup in permissions check. Node references:\nAro: " . print_r($aro, true) . "\nAco: " . print_r($aco, true), E_USER_WARNING);
|
trigger_error(__("DbAcl::check() - Failed ACO node lookup in permissions check. Node references:\nAro: ", true) . print_r($aro, true) . "\nAco: " . print_r($aco, true), E_USER_WARNING);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -403,9 +403,7 @@ class AuthComponent extends Object {
|
||||||
if (isset($controller->Acl)) {
|
if (isset($controller->Acl)) {
|
||||||
$this->Acl =& $controller->Acl;
|
$this->Acl =& $controller->Acl;
|
||||||
} else {
|
} else {
|
||||||
$err = 'Could not find AclComponent. Please include Acl in ';
|
trigger_error(__('Could not find AclComponent. Please include Acl in Controller::$components.', true), E_USER_WARNING);
|
||||||
$err .= 'Controller::$components.';
|
|
||||||
trigger_error(__($err, true), E_USER_WARNING);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'model':
|
case 'model':
|
||||||
|
@ -514,10 +512,8 @@ class AuthComponent extends Object {
|
||||||
case 'crud':
|
case 'crud':
|
||||||
$this->mapActions();
|
$this->mapActions();
|
||||||
if (!isset($this->actionMap[$this->params['action']])) {
|
if (!isset($this->actionMap[$this->params['action']])) {
|
||||||
$err = 'Auth::startup() - Attempted access of un-mapped action "%1$s" in';
|
|
||||||
$err .= ' controller "%2$s"';
|
|
||||||
trigger_error(
|
trigger_error(
|
||||||
sprintf(__($err, true), $this->params['action'], $this->params['controller']),
|
sprintf(__('Auth::startup() - Attempted access of un-mapped action "%1$s" in controller "%2$s"', true), $this->params['action'], $this->params['controller']),
|
||||||
E_USER_WARNING
|
E_USER_WARNING
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -263,7 +263,7 @@ class CookieComponent extends Object {
|
||||||
* @deprecated use delete()
|
* @deprecated use delete()
|
||||||
*/
|
*/
|
||||||
function del($key) {
|
function del($key) {
|
||||||
trigger_error('Deprecated method, use CookieComponent::delete instead', E_USER_WARNING);
|
trigger_error(__('Deprecated method, use CookieComponent::delete instead', true), E_USER_WARNING);
|
||||||
return $this->delete($key);
|
return $this->delete($key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -611,7 +611,7 @@ class EmailComponent extends Object{
|
||||||
$formatted = array();
|
$formatted = array();
|
||||||
|
|
||||||
if ($this->_lineLength !== null) {
|
if ($this->_lineLength !== null) {
|
||||||
trigger_error('_lineLength cannot be accessed please use lineLength', E_USER_WARNING);
|
trigger_error(__('_lineLength cannot be accessed please use lineLength', true), E_USER_WARNING);
|
||||||
$this->lineLength = $this->_lineLength;
|
$this->lineLength = $this->_lineLength;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -425,7 +425,7 @@ class RequestHandlerComponent extends Object {
|
||||||
* @deprecated use getReferer()
|
* @deprecated use getReferer()
|
||||||
*/
|
*/
|
||||||
function getReferrer() {
|
function getReferrer() {
|
||||||
trigger_error('Deprecated method, use RequestHandlerComponent::getReferer instead', E_USER_WARNING);
|
trigger_error(__('Deprecated method, use RequestHandlerComponent::getReferer instead', true), E_USER_WARNING);
|
||||||
return $this->getReferer();
|
return $this->getReferer();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -141,7 +141,7 @@ class SessionComponent extends CakeSession {
|
||||||
* @deprecated use delete
|
* @deprecated use delete
|
||||||
*/
|
*/
|
||||||
function del($name) {
|
function del($name) {
|
||||||
trigger_error('Deprecated method, use SessionComponent::delete instead', E_USER_WARNING);
|
trigger_error(__('Deprecated method, use SessionComponent::delete instead', true), E_USER_WARNING);
|
||||||
if ($this->__active === true) {
|
if ($this->__active === true) {
|
||||||
$this->__start();
|
$this->__start();
|
||||||
return parent::del($name);
|
return parent::del($name);
|
||||||
|
|
|
@ -723,7 +723,7 @@ class Folder extends Object {
|
||||||
* @access public
|
* @access public
|
||||||
*/
|
*/
|
||||||
function ls($sort = true, $exceptions = false) {
|
function ls($sort = true, $exceptions = false) {
|
||||||
trigger_error('Deprecated method, use Folder::read instead', E_USER_WARNING);
|
trigger_error(__('Deprecated method, use Folder::read instead', true), E_USER_WARNING);
|
||||||
return $this->read($sort, $exceptions);
|
return $this->read($sort, $exceptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -735,7 +735,7 @@ class Folder extends Object {
|
||||||
* @access public
|
* @access public
|
||||||
*/
|
*/
|
||||||
function mkdir($pathname, $mode = 0755) {
|
function mkdir($pathname, $mode = 0755) {
|
||||||
trigger_error('Deprecated method, use Folder::create instead', E_USER_WARNING);
|
trigger_error(__('Deprecated method, use Folder::create instead', true), E_USER_WARNING);
|
||||||
return $this->create($pathname, $mode);
|
return $this->create($pathname, $mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -747,7 +747,7 @@ class Folder extends Object {
|
||||||
* @access public
|
* @access public
|
||||||
*/
|
*/
|
||||||
function cp($options) {
|
function cp($options) {
|
||||||
trigger_error('Deprecated method, use Folder::copy instead', E_USER_WARNING);
|
trigger_error(__('Deprecated method, use Folder::copy instead', true), E_USER_WARNING);
|
||||||
return $this->copy($options);
|
return $this->copy($options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -759,7 +759,7 @@ class Folder extends Object {
|
||||||
* @access public
|
* @access public
|
||||||
*/
|
*/
|
||||||
function mv($options) {
|
function mv($options) {
|
||||||
trigger_error('Deprecated method, use Folder::move instead', E_USER_WARNING);
|
trigger_error(__('Deprecated method, use Folder::move instead', true), E_USER_WARNING);
|
||||||
return $this->move($options);
|
return $this->move($options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -771,7 +771,7 @@ class Folder extends Object {
|
||||||
* @access public
|
* @access public
|
||||||
*/
|
*/
|
||||||
function rm($path) {
|
function rm($path) {
|
||||||
trigger_error('Deprecated method, use Folder::delete instead', E_USER_WARNING);
|
trigger_error(__('Deprecated method, use Folder::delete instead', true), E_USER_WARNING);
|
||||||
return $this->delete($path);
|
return $this->delete($path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -59,7 +59,7 @@ class AclBehavior extends ModelBehavior {
|
||||||
$model->{$type} =& ClassRegistry::init($type);
|
$model->{$type} =& ClassRegistry::init($type);
|
||||||
}
|
}
|
||||||
if (!method_exists($model, 'parentNode')) {
|
if (!method_exists($model, 'parentNode')) {
|
||||||
trigger_error("Callback parentNode() not defined in {$model->alias}", E_USER_WARNING);
|
trigger_error(sprintf(__('Callback parentNode() not defined in %s', true), $model->alias), E_USER_WARNING);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -545,7 +545,7 @@ class CakeSchema extends Object {
|
||||||
$value['key'] = 'primary';
|
$value['key'] = 'primary';
|
||||||
}
|
}
|
||||||
if (!isset($db->columns[$value['type']])) {
|
if (!isset($db->columns[$value['type']])) {
|
||||||
trigger_error('Schema generation error: invalid column type ' . $value['type'] . ' does not exist in DBO', E_USER_NOTICE);
|
trigger_error(sprintf(__('Schema generation error: invalid column type %s does not exist in DBO', true), $value['type']), E_USER_NOTICE);
|
||||||
continue;
|
continue;
|
||||||
} else {
|
} else {
|
||||||
$defaultCol = $db->columns[$value['type']];
|
$defaultCol = $db->columns[$value['type']];
|
||||||
|
|
|
@ -181,8 +181,7 @@ class ConnectionManager extends Object {
|
||||||
$class = "{$conn['plugin']}.{$conn['classname']}";
|
$class = "{$conn['plugin']}.{$conn['classname']}";
|
||||||
|
|
||||||
if (!App::import('Datasource', $class, false)) {
|
if (!App::import('Datasource', $class, false)) {
|
||||||
$error = __('ConnectionManager::loadDataSource - Unable to import DataSource class %s', true);
|
trigger_error(sprintf(__('ConnectionManager::loadDataSource - Unable to import DataSource class %s', true), $class), E_USER_ERROR);
|
||||||
trigger_error(sprintf($error, $class), E_USER_ERROR);
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -111,7 +111,7 @@ class DboMssql extends DboSource {
|
||||||
function __construct($config, $autoConnect = true) {
|
function __construct($config, $autoConnect = true) {
|
||||||
if ($autoConnect) {
|
if ($autoConnect) {
|
||||||
if (!function_exists('mssql_min_message_severity')) {
|
if (!function_exists('mssql_min_message_severity')) {
|
||||||
trigger_error("PHP SQL Server interface is not installed, cannot continue. For troubleshooting information, see http://php.net/mssql/", E_USER_WARNING);
|
trigger_error(__("PHP SQL Server interface is not installed, cannot continue. For troubleshooting information, see http://php.net/mssql/", true), E_USER_WARNING);
|
||||||
}
|
}
|
||||||
mssql_min_message_severity(15);
|
mssql_min_message_severity(15);
|
||||||
mssql_min_error_severity(2);
|
mssql_min_error_severity(2);
|
||||||
|
|
|
@ -583,7 +583,7 @@ class DboOracle extends DboSource {
|
||||||
*/
|
*/
|
||||||
function constraint($action, $table) {
|
function constraint($action, $table) {
|
||||||
if (empty($table)) {
|
if (empty($table)) {
|
||||||
trigger_error(__('Must specify table to operate on constraints'));
|
trigger_error(__('Must specify table to operate on constraints', true));
|
||||||
}
|
}
|
||||||
|
|
||||||
$table = strtoupper($table);
|
$table = strtoupper($table);
|
||||||
|
@ -641,7 +641,7 @@ class DboOracle extends DboSource {
|
||||||
return $constraints;
|
return $constraints;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
trigger_error(__('DboOracle::constraint() accepts only enable, disable, or list'));
|
trigger_error(__('DboOracle::constraint() accepts only enable, disable, or list', true));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -490,12 +490,12 @@ class DboSqlite extends DboSource {
|
||||||
extract($column);
|
extract($column);
|
||||||
|
|
||||||
if (empty($name) || empty($type)) {
|
if (empty($name) || empty($type)) {
|
||||||
trigger_error('Column name or type not defined in schema', E_USER_WARNING);
|
trigger_error(__('Column name or type not defined in schema', true), E_USER_WARNING);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isset($this->columns[$type])) {
|
if (!isset($this->columns[$type])) {
|
||||||
trigger_error("Column type {$type} does not exist", E_USER_WARNING);
|
trigger_error(sprintf(__('Column type %s does not exist', true), $type), E_USER_WARNING);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -632,11 +632,11 @@ class DboSource extends DataSource {
|
||||||
if (Configure::read() > 0) {
|
if (Configure::read() > 0) {
|
||||||
$out = null;
|
$out = null;
|
||||||
if ($error) {
|
if ($error) {
|
||||||
trigger_error("<span style = \"color:Red;text-align:left\"><b>SQL Error:</b> {$this->error}</span>", E_USER_WARNING);
|
trigger_error('<span style="color:Red;text-align:left"><b>' . __('SQL Error:', true) . "</b> {$this->error}</span>", E_USER_WARNING);
|
||||||
} else {
|
} else {
|
||||||
$out = ("<small>[Aff:{$this->affected} Num:{$this->numRows} Took:{$this->took}ms]</small>");
|
$out = ('<small>[' . sprintf(__('Aff:%s Num:%s Took:%sms', true), $this->affected, $this->numRows, $this->took) . ']</small>');
|
||||||
}
|
}
|
||||||
pr(sprintf("<p style = \"text-align:left\"><b>Query:</b> %s %s</p>", $sql, $out));
|
pr(sprintf('<p style="text-align:left"><b>' . __('Query:', true) . '</b> %s %s</p>', $sql, $out));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2386,7 +2386,7 @@ class DboSource extends DataSource {
|
||||||
*/
|
*/
|
||||||
function length($real) {
|
function length($real) {
|
||||||
if (!preg_match_all('/([\w\s]+)(?:\((\d+)(?:,(\d+))?\))?(\sunsigned)?(\szerofill)?/', $real, $result)) {
|
if (!preg_match_all('/([\w\s]+)(?:\((\d+)(?:,(\d+))?\))?(\sunsigned)?(\szerofill)?/', $real, $result)) {
|
||||||
trigger_error(__('FIXME: Can\'t parse field: ' . $real, true), E_USER_WARNING);
|
trigger_error(__("FIXME: Can't parse field: " . $real, true), E_USER_WARNING);
|
||||||
$col = str_replace(array(')', 'unsigned'), '', $real);
|
$col = str_replace(array(')', 'unsigned'), '', $real);
|
||||||
$limit = null;
|
$limit = null;
|
||||||
|
|
||||||
|
@ -2585,12 +2585,12 @@ class DboSource extends DataSource {
|
||||||
extract(array_merge(array('null' => true), $column));
|
extract(array_merge(array('null' => true), $column));
|
||||||
|
|
||||||
if (empty($name) || empty($type)) {
|
if (empty($name) || empty($type)) {
|
||||||
trigger_error('Column name or type not defined in schema', E_USER_WARNING);
|
trigger_error(__('Column name or type not defined in schema', true), E_USER_WARNING);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isset($this->columns[$type])) {
|
if (!isset($this->columns[$type])) {
|
||||||
trigger_error("Column type {$type} does not exist", E_USER_WARNING);
|
trigger_error(sprintf(__('Column type %s does not exist', true), $type), E_USER_WARNING);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -142,7 +142,7 @@ class AclNode extends AppModel {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($model)) {
|
if (empty($model)) {
|
||||||
trigger_error("Model class '$name' not found in AclNode::node() when trying to bind {$this->alias} object", E_USER_WARNING);
|
trigger_error(sprintf(__("Model class '%s' not found in AclNode::node() when trying to bind %s object", true), $type, $this->alias), E_USER_WARNING);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -187,7 +187,7 @@ class AclNode extends AppModel {
|
||||||
$result = $db->read($this, $queryData, -1);
|
$result = $db->read($this, $queryData, -1);
|
||||||
|
|
||||||
if (!$result) {
|
if (!$result) {
|
||||||
trigger_error("AclNode::node() - Couldn't find {$type} node identified by \"" . print_r($ref, true) . "\"", E_USER_WARNING);
|
trigger_error(sprintf(__("AclNode::node() - Couldn't find %s node identified by \"%s\"", true), $type, print_r($ref, true)), E_USER_WARNING);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $result;
|
return $result;
|
||||||
|
|
|
@ -530,7 +530,7 @@ class Model extends Overloadable {
|
||||||
* @deprecated Use Model::bindModel() instead.
|
* @deprecated Use Model::bindModel() instead.
|
||||||
*/
|
*/
|
||||||
function bind($model, $options = array(), $permanent = true) {
|
function bind($model, $options = array(), $permanent = true) {
|
||||||
trigger_error('Deprecated method, use Model::bindModel instead', E_USER_WARNING);
|
trigger_error(__('Deprecated method, use Model::bindModel instead', true), E_USER_WARNING);
|
||||||
if (!is_array($model)) {
|
if (!is_array($model)) {
|
||||||
$model = array($model => $options);
|
$model = array($model => $options);
|
||||||
}
|
}
|
||||||
|
@ -1809,7 +1809,7 @@ class Model extends Overloadable {
|
||||||
* @link http://book.cakephp.org/view/691/remove
|
* @link http://book.cakephp.org/view/691/remove
|
||||||
*/
|
*/
|
||||||
function remove($id = null, $cascade = true) {
|
function remove($id = null, $cascade = true) {
|
||||||
trigger_error('Deprecated method, use Model::delete instead', E_USER_WARNING);
|
trigger_error(__('Deprecated method, use Model::delete instead', true), E_USER_WARNING);
|
||||||
return $this->delete($id, $cascade);
|
return $this->delete($id, $cascade);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1862,7 +1862,7 @@ class Model extends Overloadable {
|
||||||
* @deprecated
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
function del($id = null, $cascade = true) {
|
function del($id = null, $cascade = true) {
|
||||||
trigger_error('Deprecated method, use Model::delete instead', E_USER_WARNING);
|
trigger_error(__('Deprecated method, use Model::delete instead', true), E_USER_WARNING);
|
||||||
return $this->delete($id, $cascade);
|
return $this->delete($id, $cascade);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2615,12 +2615,7 @@ class Model extends Overloadable {
|
||||||
} elseif (!is_array($validator['rule'])) {
|
} elseif (!is_array($validator['rule'])) {
|
||||||
$valid = preg_match($rule, $data[$fieldName]);
|
$valid = preg_match($rule, $data[$fieldName]);
|
||||||
} elseif (Configure::read('debug') > 0) {
|
} elseif (Configure::read('debug') > 0) {
|
||||||
$error = sprintf(
|
trigger_error(sprintf(__('Could not find validation handler %s for %s', true), $rule, $fieldName), E_USER_WARNING);
|
||||||
__('Could not find validation handler %s for %s', true),
|
|
||||||
$rule,
|
|
||||||
$fieldName
|
|
||||||
);
|
|
||||||
trigger_error($error, E_USER_WARNING);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$valid || (is_string($valid) && strlen($valid) > 0)) {
|
if (!$valid || (is_string($valid) && strlen($valid) > 0)) {
|
||||||
|
@ -2727,7 +2722,7 @@ class Model extends Overloadable {
|
||||||
* @deprecated
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
function getDisplayField() {
|
function getDisplayField() {
|
||||||
trigger_error('Deprecated method, use Model::$displayField instead', E_USER_WARNING);
|
trigger_error(__('Deprecated method, use Model::$displayField instead', true), E_USER_WARNING);
|
||||||
return $this->displayField;
|
return $this->displayField;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -441,7 +441,7 @@ class BehaviorCollection extends Object {
|
||||||
$call = null;
|
$call = null;
|
||||||
|
|
||||||
if ($strict && !$found) {
|
if ($strict && !$found) {
|
||||||
trigger_error("BehaviorCollection::dispatchMethod() - Method {$method} not found in any attached behavior", E_USER_WARNING);
|
trigger_error(sprintf(__("BehaviorCollection::dispatchMethod() - Method %s not found in any attached behavior", true), $method), E_USER_WARNING);
|
||||||
return null;
|
return null;
|
||||||
} elseif ($found) {
|
} elseif ($found) {
|
||||||
$methods = array_combine($methods, array_values($this->__methods));
|
$methods = array_combine($methods, array_values($this->__methods));
|
||||||
|
|
|
@ -828,7 +828,7 @@ class Set {
|
||||||
* @deprecated
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
function isEqual($val1, $val2 = null) {
|
function isEqual($val1, $val2 = null) {
|
||||||
trigger_error('Set::isEqual() is deprecated. Please use standard comparison operators instead.', E_USER_WARNING);
|
trigger_error(__('Set::isEqual() is deprecated. Please use standard comparison operators instead.', true), E_USER_WARNING);
|
||||||
return ($val1 == $val2);
|
return ($val1 == $val2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,5 +20,5 @@
|
||||||
<h2><?php echo $name; ?></h2>
|
<h2><?php echo $name; ?></h2>
|
||||||
<p class="error">
|
<p class="error">
|
||||||
<strong><?php __('Error'); ?>: </strong>
|
<strong><?php __('Error'); ?>: </strong>
|
||||||
<?php echo sprintf(__('The requested address %s was not found on this server.', true), "<strong>'{$message}'</strong>")?>
|
<?php printf(__('The requested address %s was not found on this server.', true), "<strong>'{$message}'</strong>"); ?>
|
||||||
</p>
|
</p>
|
|
@ -20,5 +20,5 @@
|
||||||
<h2><?php echo $name; ?></h2>
|
<h2><?php echo $name; ?></h2>
|
||||||
<p class="error">
|
<p class="error">
|
||||||
<strong><?php __('Error'); ?>: </strong>
|
<strong><?php __('Error'); ?>: </strong>
|
||||||
<?php echo sprintf(__('An Internal Error Has Occurred.', true), "<strong>'{$message}'</strong>")?>
|
<?php printf(__('An Internal Error Has Occurred.', true), "<strong>'{$message}'</strong>"); ?>
|
||||||
</p>
|
</p>
|
||||||
|
|
|
@ -17,14 +17,14 @@
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
?>
|
?>
|
||||||
<h2><?php echo sprintf(__('Missing Method in %s', true), $controller);?></h2>
|
<h2><?php printf(__('Missing Method in %s', true), $controller); ?></h2>
|
||||||
<p class="error">
|
<p class="error">
|
||||||
<strong><?php __('Error') ?>: </strong>
|
<strong><?php __('Error'); ?>: </strong>
|
||||||
<?php echo sprintf(__('The action %1$s is not defined in controller %2$s', true), '<em>' . $action . '</em>', '<em>' . $controller . '</em>');?>
|
<?php printf(__('The action %1$s is not defined in controller %2$s', true), '<em>' . $action . '</em>', '<em>' . $controller . '</em>'); ?>
|
||||||
</p>
|
</p>
|
||||||
<p class="error">
|
<p class="error">
|
||||||
<strong><?php __('Error') ?>: </strong>
|
<strong><?php __('Error'); ?>: </strong>
|
||||||
<?php echo sprintf(__('Create %1$s%2$s in file: %3$s.', true), '<em>' . $controller . '::</em>', '<em>' . $action . '()</em>', APP_DIR . DS . 'controllers' . DS . Inflector::underscore($controller) . '.php');?>
|
<?php printf(__('Create %1$s%2$s in file: %3$s.', true), '<em>' . $controller . '::</em>', '<em>' . $action . '()</em>', APP_DIR . DS . 'controllers' . DS . Inflector::underscore($controller) . '.php'); ?>
|
||||||
</p>
|
</p>
|
||||||
<pre>
|
<pre>
|
||||||
<?php
|
<?php
|
||||||
|
@ -41,6 +41,6 @@ class <?php echo $controller;?> extends AppController {
|
||||||
?>
|
?>
|
||||||
</pre>
|
</pre>
|
||||||
<p class="notice">
|
<p class="notice">
|
||||||
<strong><?php __('Notice') ?>: </strong>
|
<strong><?php __('Notice'); ?>: </strong>
|
||||||
<?php echo sprintf(__('If you want to customize this error message, create %s.', true), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'missing_action.ctp');?>
|
<?php printf(__('If you want to customize this error message, create %s.', true), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'missing_action.ctp'); ?>
|
||||||
</p>
|
</p>
|
|
@ -20,11 +20,11 @@
|
||||||
<h2><?php __('Missing Behavior Class'); ?></h2>
|
<h2><?php __('Missing Behavior Class'); ?></h2>
|
||||||
<p class="error">
|
<p class="error">
|
||||||
<strong><?php __('Error'); ?>: </strong>
|
<strong><?php __('Error'); ?>: </strong>
|
||||||
<?php echo sprintf(__('The behavior class <em>%s</em> can not be found or does not exist.', true), $behaviorClass);?>
|
<?php printf(__('The behavior class <em>%s</em> can not be found or does not exist.', true), $behaviorClass); ?>
|
||||||
</p>
|
</p>
|
||||||
<p class="error">
|
<p class="error">
|
||||||
<strong><?php __('Error'); ?>: </strong>
|
<strong><?php __('Error'); ?>: </strong>
|
||||||
<?php echo sprintf(__('Create the class below in file: %s', true), APP_DIR . DS . 'models' . DS . 'behaviors' . DS . $file);?>
|
<?php printf(__('Create the class below in file: %s', true), APP_DIR . DS . 'models' . DS . 'behaviors' . DS . $file); ?>
|
||||||
</p>
|
</p>
|
||||||
<pre>
|
<pre>
|
||||||
<?php
|
<?php
|
||||||
|
@ -35,5 +35,5 @@ class <?php echo $behaviorClass;?> extends ModelBehavior {
|
||||||
</pre>
|
</pre>
|
||||||
<p class="notice">
|
<p class="notice">
|
||||||
<strong><?php __('Notice'); ?>: </strong>
|
<strong><?php __('Notice'); ?>: </strong>
|
||||||
<?php echo sprintf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'missing_behavior_class.ctp');?>
|
<?php printf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'missing_behavior_class.ctp'); ?>
|
||||||
</p>
|
</p>
|
|
@ -20,11 +20,11 @@
|
||||||
<h2><?php __('Missing Behavior File'); ?></h2>
|
<h2><?php __('Missing Behavior File'); ?></h2>
|
||||||
<p class="error">
|
<p class="error">
|
||||||
<strong><?php __('Error'); ?>: </strong>
|
<strong><?php __('Error'); ?>: </strong>
|
||||||
<?php echo sprintf(__('The Behavior file %s can not be found or does not exist.', true), APP_DIR . DS . 'models' . DS . 'behaviors' . DS . $file);?>
|
<?php printf(__('The Behavior file %s can not be found or does not exist.', true), APP_DIR . DS . 'models' . DS . 'behaviors' . DS . $file); ?>
|
||||||
</p>
|
</p>
|
||||||
<p class="error">
|
<p class="error">
|
||||||
<strong><?php __('Error'); ?>: </strong>
|
<strong><?php __('Error'); ?>: </strong>
|
||||||
<?php echo sprintf(__('Create the class below in file: %s', true), APP_DIR . DS . 'models' . DS . 'behaviors' . DS . $file);?>
|
<?php printf(__('Create the class below in file: %s', true), APP_DIR . DS . 'models' . DS . 'behaviors' . DS . $file); ?>
|
||||||
</p>
|
</p>
|
||||||
<pre>
|
<pre>
|
||||||
<?php
|
<?php
|
||||||
|
@ -35,5 +35,5 @@ class <?php echo $behaviorClass;?> extends ModelBehavior {
|
||||||
</pre>
|
</pre>
|
||||||
<p class="notice">
|
<p class="notice">
|
||||||
<strong><?php __('Notice'); ?>: </strong>
|
<strong><?php __('Notice'); ?>: </strong>
|
||||||
<?php echo sprintf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'missing_behavior_file.ctp');?>
|
<?php printf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'missing_behavior_file.ctp'); ?>
|
||||||
</p>
|
</p>
|
||||||
|
|
|
@ -20,11 +20,11 @@
|
||||||
<h2><?php __('Missing Component Class'); ?></h2>
|
<h2><?php __('Missing Component Class'); ?></h2>
|
||||||
<p class="error">
|
<p class="error">
|
||||||
<strong><?php __('Error'); ?>: </strong>
|
<strong><?php __('Error'); ?>: </strong>
|
||||||
<?php echo sprintf(__('Component class %1$s in %2$s was not found.', true), '<em>' . $component . 'Component</em>', '<em>' . $controller . 'Controller</em>');?>
|
<?php printf(__('Component class %1$s in %2$s was not found.', true), '<em>' . $component . 'Component</em>', '<em>' . $controller . 'Controller</em>'); ?>
|
||||||
</p>
|
</p>
|
||||||
<p class="error">
|
<p class="error">
|
||||||
<strong><?php __('Error'); ?>: </strong>
|
<strong><?php __('Error'); ?>: </strong>
|
||||||
<?php echo sprintf(__('Create the class %s in file: %s', true), '<em>' . $component . 'Component</em>', APP_DIR . DS . 'controllers' . DS . 'components' . DS . $file);?>
|
<?php printf(__('Create the class %s in file: %s', true), '<em>' . $component . 'Component</em>', APP_DIR . DS . 'controllers' . DS . 'components' . DS . $file); ?>
|
||||||
</p>
|
</p>
|
||||||
<pre>
|
<pre>
|
||||||
<?php
|
<?php
|
||||||
|
@ -35,5 +35,5 @@ class <?php echo $component;?>Component extends Object {<br />
|
||||||
</pre>
|
</pre>
|
||||||
<p class="notice">
|
<p class="notice">
|
||||||
<strong><?php __('Notice'); ?>: </strong>
|
<strong><?php __('Notice'); ?>: </strong>
|
||||||
<?php echo sprintf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'missing_component_class.ctp');?>
|
<?php printf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'missing_component_class.ctp'); ?>
|
||||||
</p>
|
</p>
|
|
@ -24,7 +24,7 @@
|
||||||
</p>
|
</p>
|
||||||
<p class="error">
|
<p class="error">
|
||||||
<strong><?php __('Error'); ?>: </strong>
|
<strong><?php __('Error'); ?>: </strong>
|
||||||
<?php echo sprintf(__('Create the class %s in file: %s', true), '<em>' . $component . 'Component</em>', APP_DIR . DS . 'controllers' . DS . 'components' . DS . $file);?>
|
<?php printf(__('Create the class %s in file: %s', true), '<em>' . $component . 'Component</em>', APP_DIR . DS . 'controllers' . DS . 'components' . DS . $file); ?>
|
||||||
</p>
|
</p>
|
||||||
<pre>
|
<pre>
|
||||||
<?php
|
<?php
|
||||||
|
@ -35,5 +35,5 @@ class <?php echo $component;?>Component extends Object {<br />
|
||||||
</pre>
|
</pre>
|
||||||
<p class="notice">
|
<p class="notice">
|
||||||
<strong><?php __('Notice'); ?>: </strong>
|
<strong><?php __('Notice'); ?>: </strong>
|
||||||
<?php echo sprintf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'missing_component_file.ctp');?>
|
<?php printf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'missing_component_file.ctp'); ?>
|
||||||
</p>
|
</p>
|
|
@ -20,13 +20,13 @@
|
||||||
<h2><?php __('Missing Database Connection'); ?></h2>
|
<h2><?php __('Missing Database Connection'); ?></h2>
|
||||||
<p class="error">
|
<p class="error">
|
||||||
<strong><?php __('Error'); ?>: </strong>
|
<strong><?php __('Error'); ?>: </strong>
|
||||||
<?php echo sprintf(__('%s requires a database connection', true), $model);?>
|
<?php printf(__('%s requires a database connection', true), $model); ?>
|
||||||
</p>
|
</p>
|
||||||
<p class="error">
|
<p class="error">
|
||||||
<strong><?php __('Error'); ?>: </strong>
|
<strong><?php __('Error'); ?>: </strong>
|
||||||
<?php echo sprintf(__('Confirm you have created the file : %s.', true), APP_DIR . DS . 'config' . DS . 'database.php');?>
|
<?php printf(__('Confirm you have created the file : %s.', true), APP_DIR . DS . 'config' . DS . 'database.php'); ?>
|
||||||
</p>
|
</p>
|
||||||
<p class="notice">
|
<p class="notice">
|
||||||
<strong><?php __('Notice'); ?>: </strong>
|
<strong><?php __('Notice'); ?>: </strong>
|
||||||
<?php echo sprintf(__('If you want to customize this error message, create %s.', true), APP_DIR . DS . 'views' . DS . 'errors' . DS . basename(__FILE__));?>
|
<?php printf(__('If you want to customize this error message, create %s.', true), APP_DIR . DS . 'views' . DS . 'errors' . DS . basename(__FILE__)); ?>
|
||||||
</p>
|
</p>
|
|
@ -20,11 +20,11 @@
|
||||||
<h2><?php __('Missing Controller'); ?></h2>
|
<h2><?php __('Missing Controller'); ?></h2>
|
||||||
<p class="error">
|
<p class="error">
|
||||||
<strong><?php __('Error'); ?>: </strong>
|
<strong><?php __('Error'); ?>: </strong>
|
||||||
<?php echo sprintf(__('%s could not be found.', true), '<em>' . $controller . '</em>');?>
|
<?php printf(__('%s could not be found.', true), '<em>' . $controller . '</em>'); ?>
|
||||||
</p>
|
</p>
|
||||||
<p class="error">
|
<p class="error">
|
||||||
<strong><?php __('Error'); ?>: </strong>
|
<strong><?php __('Error'); ?>: </strong>
|
||||||
<?php echo sprintf(__('Create the class %s below in file: %s', true), '<em>' . $controller . '</em>', APP_DIR . DS . 'controllers' . DS . Inflector::underscore($controller) . '.php');?>
|
<?php printf(__('Create the class %s below in file: %s', true), '<em>' . $controller . '</em>', APP_DIR . DS . 'controllers' . DS . Inflector::underscore($controller) . '.php'); ?>
|
||||||
</p>
|
</p>
|
||||||
<pre>
|
<pre>
|
||||||
<?php
|
<?php
|
||||||
|
@ -36,5 +36,5 @@ class <?php echo $controller;?> extends AppController {
|
||||||
</pre>
|
</pre>
|
||||||
<p class="notice">
|
<p class="notice">
|
||||||
<strong><?php __('Notice'); ?>: </strong>
|
<strong><?php __('Notice'); ?>: </strong>
|
||||||
<?php echo sprintf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'missing_controller.ctp');?>
|
<?php printf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'missing_controller.ctp'); ?>
|
||||||
</p>
|
</p>
|
|
@ -20,11 +20,11 @@
|
||||||
<h2><?php __('Missing Helper Class'); ?></h2>
|
<h2><?php __('Missing Helper Class'); ?></h2>
|
||||||
<p class="error">
|
<p class="error">
|
||||||
<strong><?php __('Error'); ?>: </strong>
|
<strong><?php __('Error'); ?>: </strong>
|
||||||
<?php echo sprintf(__('The helper class <em>%s</em> can not be found or does not exist.', true), $helperClass);?>
|
<?php printf(__('The helper class <em>%s</em> can not be found or does not exist.', true), $helperClass); ?>
|
||||||
</p>
|
</p>
|
||||||
<p class="error">
|
<p class="error">
|
||||||
<strong><?php __('Error'); ?>: </strong>
|
<strong><?php __('Error'); ?>: </strong>
|
||||||
<?php echo sprintf(__('Create the class below in file: %s', true), APP_DIR . DS . 'views' . DS . 'helpers' . DS . $file);?>
|
<?php printf(__('Create the class below in file: %s', true), APP_DIR . DS . 'views' . DS . 'helpers' . DS . $file); ?>
|
||||||
</p>
|
</p>
|
||||||
<pre>
|
<pre>
|
||||||
<?php
|
<?php
|
||||||
|
@ -35,5 +35,5 @@ class <?php echo $helperClass;?> extends AppHelper {
|
||||||
</pre>
|
</pre>
|
||||||
<p class="notice">
|
<p class="notice">
|
||||||
<strong><?php __('Notice'); ?>: </strong>
|
<strong><?php __('Notice'); ?>: </strong>
|
||||||
<?php echo sprintf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'missing_helper_class.ctp');?>
|
<?php printf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'missing_helper_class.ctp'); ?>
|
||||||
</p>
|
</p>
|
|
@ -20,11 +20,11 @@
|
||||||
<h2><?php __('Missing Helper File'); ?></h2>
|
<h2><?php __('Missing Helper File'); ?></h2>
|
||||||
<p class="error">
|
<p class="error">
|
||||||
<strong><?php __('Error'); ?>: </strong>
|
<strong><?php __('Error'); ?>: </strong>
|
||||||
<?php echo sprintf(__('The helper file %s can not be found or does not exist.', true), APP_DIR . DS . 'views' . DS . 'helpers' . DS . $file);?>
|
<?php printf(__('The helper file %s can not be found or does not exist.', true), APP_DIR . DS . 'views' . DS . 'helpers' . DS . $file); ?>
|
||||||
</p>
|
</p>
|
||||||
<p class="error">
|
<p class="error">
|
||||||
<strong><?php __('Error'); ?>: </strong>
|
<strong><?php __('Error'); ?>: </strong>
|
||||||
<?php echo sprintf(__('Create the class below in file: %s', true), APP_DIR . DS . 'views' . DS . 'helpers' . DS . $file);?>
|
<?php printf(__('Create the class below in file: %s', true), APP_DIR . DS . 'views' . DS . 'helpers' . DS . $file); ?>
|
||||||
</p>
|
</p>
|
||||||
<pre>
|
<pre>
|
||||||
<?php
|
<?php
|
||||||
|
@ -35,5 +35,5 @@ class <?php echo $helperClass;?> extends AppHelper {
|
||||||
</pre>
|
</pre>
|
||||||
<p class="notice">
|
<p class="notice">
|
||||||
<strong><?php __('Notice'); ?>: </strong>
|
<strong><?php __('Notice'); ?>: </strong>
|
||||||
<?php echo sprintf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'missing_helper_file.ctp');?>
|
<?php printf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'missing_helper_file.ctp'); ?>
|
||||||
</p>
|
</p>
|
||||||
|
|
|
@ -20,13 +20,13 @@
|
||||||
<h2><?php __('Missing Layout'); ?></h2>
|
<h2><?php __('Missing Layout'); ?></h2>
|
||||||
<p class="error">
|
<p class="error">
|
||||||
<strong><?php __('Error'); ?>: </strong>
|
<strong><?php __('Error'); ?>: </strong>
|
||||||
<?php echo sprintf(__('The layout file %s can not be found or does not exist.', true), '<em>' . $file . '</em>');?>
|
<?php printf(__('The layout file %s can not be found or does not exist.', true), '<em>' . $file . '</em>'); ?>
|
||||||
</p>
|
</p>
|
||||||
<p class="error">
|
<p class="error">
|
||||||
<strong><?php __('Error'); ?>: </strong>
|
<strong><?php __('Error'); ?>: </strong>
|
||||||
<?php echo sprintf(__('Confirm you have created the file: %s', true), '<em>' . $file . '</em>');?>
|
<?php printf(__('Confirm you have created the file: %s', true), '<em>' . $file . '</em>'); ?>
|
||||||
</p>
|
</p>
|
||||||
<p class="notice">
|
<p class="notice">
|
||||||
<strong><?php __('Notice'); ?>: </strong>
|
<strong><?php __('Notice'); ?>: </strong>
|
||||||
<?php echo sprintf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'missing_layout.ctp');?>
|
<?php printf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'missing_layout.ctp'); ?>
|
||||||
</p>
|
</p>
|
|
@ -20,11 +20,11 @@
|
||||||
<h2><?php __('Missing Model'); ?></h2>
|
<h2><?php __('Missing Model'); ?></h2>
|
||||||
<p class="error">
|
<p class="error">
|
||||||
<strong><?php __('Error'); ?>: </strong>
|
<strong><?php __('Error'); ?>: </strong>
|
||||||
<?php echo sprintf(__('<em>%s</em> could not be found.', true), $model);?>
|
<?php printf(__('<em>%s</em> could not be found.', true), $model); ?>
|
||||||
</p>
|
</p>
|
||||||
<p class="error">
|
<p class="error">
|
||||||
<strong><?php __('Error'); ?>: </strong>
|
<strong><?php __('Error'); ?>: </strong>
|
||||||
<?php echo sprintf(__('Create the class %s in file: %s', true), '<em>' . $model . '</em>', APP_DIR . DS . 'models' . DS . Inflector::underscore($model) . '.php');?>
|
<?php printf(__('Create the class %s in file: %s', true), '<em>' . $model . '</em>', APP_DIR . DS . 'models' . DS . Inflector::underscore($model) . '.php'); ?>
|
||||||
</p>
|
</p>
|
||||||
<pre>
|
<pre>
|
||||||
<?php
|
<?php
|
||||||
|
@ -37,5 +37,5 @@ class <?php echo $model;?> extends AppModel {
|
||||||
</pre>
|
</pre>
|
||||||
<p class="notice">
|
<p class="notice">
|
||||||
<strong><?php __('Notice'); ?>: </strong>
|
<strong><?php __('Notice'); ?>: </strong>
|
||||||
<?php echo sprintf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'missing_model.ctp');?>
|
<?php printf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'missing_model.ctp'); ?>
|
||||||
</p>
|
</p>
|
|
@ -24,9 +24,9 @@
|
||||||
</p>
|
</p>
|
||||||
<p class="error">
|
<p class="error">
|
||||||
<strong><?php __('Error'); ?>: </strong>
|
<strong><?php __('Error'); ?>: </strong>
|
||||||
<?php echo sprintf(__('Confirm you have created the file: %s', true), APP_DIR . DS . 'config' . DS . 'database.php');?>
|
<?php printf(__('Confirm you have created the file: %s', true), APP_DIR . DS . 'config' . DS . 'database.php'); ?>
|
||||||
</p>
|
</p>
|
||||||
<p class="notice">
|
<p class="notice">
|
||||||
<strong><?php __('Notice'); ?>: </strong>
|
<strong><?php __('Notice'); ?>: </strong>
|
||||||
<?php echo sprintf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'missing_scaffolddb.ctp');?>
|
<?php printf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'missing_scaffolddb.ctp'); ?>
|
||||||
</p>
|
</p>
|
|
@ -20,9 +20,9 @@
|
||||||
<h2><?php __('Missing Database Table'); ?></h2>
|
<h2><?php __('Missing Database Table'); ?></h2>
|
||||||
<p class="error">
|
<p class="error">
|
||||||
<strong><?php __('Error'); ?>: </strong>
|
<strong><?php __('Error'); ?>: </strong>
|
||||||
<?php echo sprintf(__('Database table %1$s for model %2$s was not found.', true), '<em>' . $table . '</em>', '<em>' . $model . '</em>');?>
|
<?php printf(__('Database table %1$s for model %2$s was not found.', true), '<em>' . $table . '</em>', '<em>' . $model . '</em>'); ?>
|
||||||
</p>
|
</p>
|
||||||
<p class="notice">
|
<p class="notice">
|
||||||
<strong><?php __('Notice'); ?>: </strong>
|
<strong><?php __('Notice'); ?>: </strong>
|
||||||
<?php echo sprintf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'missing_table.ctp');?>
|
<?php printf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'missing_table.ctp'); ?>
|
||||||
</p>
|
</p>
|
|
@ -20,13 +20,13 @@
|
||||||
<h2><?php __('Missing View'); ?></h2>
|
<h2><?php __('Missing View'); ?></h2>
|
||||||
<p class="error">
|
<p class="error">
|
||||||
<strong><?php __('Error'); ?>: </strong>
|
<strong><?php __('Error'); ?>: </strong>
|
||||||
<?php echo sprintf(__('The view for %1$s%2$s was not found.', true), '<em>' . $controller . 'Controller::</em>', '<em>' . $action . '()</em>');?>
|
<?php printf(__('The view for %1$s%2$s was not found.', true), '<em>' . $controller . 'Controller::</em>', '<em>' . $action . '()</em>'); ?>
|
||||||
</p>
|
</p>
|
||||||
<p class="error">
|
<p class="error">
|
||||||
<strong><?php __('Error'); ?>: </strong>
|
<strong><?php __('Error'); ?>: </strong>
|
||||||
<?php echo sprintf(__('Confirm you have created the file: %s', true), $file);?>
|
<?php printf(__('Confirm you have created the file: %s', true), $file); ?>
|
||||||
</p>
|
</p>
|
||||||
<p class="notice">
|
<p class="notice">
|
||||||
<strong><?php __('Notice'); ?>: </strong>
|
<strong><?php __('Notice'); ?>: </strong>
|
||||||
<?php echo sprintf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'missing_view.ctp');?>
|
<?php printf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'missing_view.ctp'); ?>
|
||||||
</p>
|
</p>
|
|
@ -17,12 +17,12 @@
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
?>
|
?>
|
||||||
<h2><?php echo sprintf(__('Private Method in %s', true), $controller);?></h2>
|
<h2><?php printf(__('Private Method in %s', true), $controller); ?></h2>
|
||||||
<p class="error">
|
<p class="error">
|
||||||
<strong><?php __('Error'); ?>: </strong>
|
<strong><?php __('Error'); ?>: </strong>
|
||||||
<?php echo sprintf(__('%s%s cannot be accessed directly.', true), '<em>' . $controller . '::</em>', '<em>' . $action . '()</em>');?>
|
<?php printf(__('%s%s cannot be accessed directly.', true), '<em>' . $controller . '::</em>', '<em>' . $action . '()</em>'); ?>
|
||||||
</p>
|
</p>
|
||||||
<p class="notice">
|
<p class="notice">
|
||||||
<strong><?php __('Notice'); ?>: </strong>
|
<strong><?php __('Notice'); ?>: </strong>
|
||||||
<?php echo sprintf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'private_action.ctp');?>
|
<?php printf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'private_action.ctp'); ?>
|
||||||
</p>
|
</p>
|
|
@ -24,7 +24,7 @@
|
||||||
</p>
|
</p>
|
||||||
<p class="notice">
|
<p class="notice">
|
||||||
<strong><?php __('Notice'); ?>: </strong>
|
<strong><?php __('Notice'); ?>: </strong>
|
||||||
<?php echo sprintf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'scaffold_error.ctp');?>
|
<?php printf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'scaffold_error.ctp'); ?>
|
||||||
</p>
|
</p>
|
||||||
<pre>
|
<pre>
|
||||||
<?php
|
<?php
|
||||||
|
|
|
@ -92,11 +92,7 @@ class PaginatorHelper extends AppHelper {
|
||||||
App::import('Helper', $ajaxProvider);
|
App::import('Helper', $ajaxProvider);
|
||||||
$classname = $ajaxProvider . 'Helper';
|
$classname = $ajaxProvider . 'Helper';
|
||||||
if (!is_callable(array($classname, 'link'))) {
|
if (!is_callable(array($classname, 'link'))) {
|
||||||
$message = sprintf(
|
trigger_error(sprintf(__('%s does not implement a link() method, it is incompatible with PaginatorHelper', true), $classname), E_USER_WARNING);
|
||||||
__('%s does not implement a link() method, it is incompatible with PaginatorHelper', true),
|
|
||||||
$classname
|
|
||||||
);
|
|
||||||
trigger_error($message, E_USER_WARNING);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -273,7 +273,7 @@ class TextHelper extends AppHelper {
|
||||||
* @access public
|
* @access public
|
||||||
*/
|
*/
|
||||||
function trim() {
|
function trim() {
|
||||||
trigger_error('TextHelper::trim() is deprecated. Use TextHelper::truncate() instead', E_USER_WARNING);
|
trigger_error(__('TextHelper::trim() is deprecated. Use TextHelper::truncate() instead', true), E_USER_WARNING);
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
return call_user_func_array(array(&$this, 'truncate'), $args);
|
return call_user_func_array(array(&$this, 'truncate'), $args);
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@ if (Configure::read() == 0):
|
||||||
$this->cakeError('error404');
|
$this->cakeError('error404');
|
||||||
endif;
|
endif;
|
||||||
?>
|
?>
|
||||||
<h2><?php echo sprintf(__('Release Notes for CakePHP %s.', true), Configure::version()); ?></h2>
|
<h2><?php printf(__('Release Notes for CakePHP %s.', true), Configure::version()); ?></h2>
|
||||||
<?php
|
<?php
|
||||||
echo $this->Html->link(__('Read the changelog', true), 'http://code.cakephp.org/wiki/changelog/1_3_0-alpha');
|
echo $this->Html->link(__('Read the changelog', true), 'http://code.cakephp.org/wiki/changelog/1_3_0-alpha');
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ endif;
|
||||||
$settings = Cache::settings();
|
$settings = Cache::settings();
|
||||||
if (!empty($settings)):
|
if (!empty($settings)):
|
||||||
echo '<span class="notice success">';
|
echo '<span class="notice success">';
|
||||||
echo sprintf(__('The %s is being used for caching. To change the config edit APP/config/core.php ', true), '<em>'. $settings['engine'] . 'Engine</em>');
|
printf(__('The %s is being used for caching. To change the config edit APP/config/core.php ', true), '<em>'. $settings['engine'] . 'Engine</em>');
|
||||||
echo '</span>';
|
echo '</span>';
|
||||||
else:
|
else:
|
||||||
echo '<span class="notice">';
|
echo '<span class="notice">';
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
*/
|
*/
|
||||||
?>
|
?>
|
||||||
<div class="<?php echo $pluralVar;?> view">
|
<div class="<?php echo $pluralVar;?> view">
|
||||||
<h2><?php echo sprintf(__("View %s", true), $singularHumanName);?></h2>
|
<h2><?php printf(__("View %s", true), $singularHumanName); ?></h2>
|
||||||
<dl>
|
<dl>
|
||||||
<?php
|
<?php
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
@ -72,7 +72,7 @@ foreach ($scaffoldFields as $_field) {
|
||||||
if (!empty($associations['hasOne'])) :
|
if (!empty($associations['hasOne'])) :
|
||||||
foreach ($associations['hasOne'] as $_alias => $_details): ?>
|
foreach ($associations['hasOne'] as $_alias => $_details): ?>
|
||||||
<div class="related">
|
<div class="related">
|
||||||
<h3><?php echo sprintf(__("Related %s", true), Inflector::humanize($_details['controller']));?></h3>
|
<h3><?php printf(__("Related %s", true), Inflector::humanize($_details['controller'])); ?></h3>
|
||||||
<?php if (!empty(${$singularVar}[$_alias])):?>
|
<?php if (!empty(${$singularVar}[$_alias])):?>
|
||||||
<dl>
|
<dl>
|
||||||
<?php
|
<?php
|
||||||
|
@ -111,7 +111,7 @@ foreach ($relations as $_alias => $_details):
|
||||||
$otherSingularVar = Inflector::variable($_alias);
|
$otherSingularVar = Inflector::variable($_alias);
|
||||||
?>
|
?>
|
||||||
<div class="related">
|
<div class="related">
|
||||||
<h3><?php echo sprintf(__("Related %s", true), Inflector::humanize($_details['controller']));?></h3>
|
<h3><?php printf(__("Related %s", true), Inflector::humanize($_details['controller'])); ?></h3>
|
||||||
<?php if (!empty(${$singularVar}[$_alias])):?>
|
<?php if (!empty(${$singularVar}[$_alias])):?>
|
||||||
<table cellpadding="0" cellspacing="0">
|
<table cellpadding="0" cellspacing="0">
|
||||||
<tr>
|
<tr>
|
||||||
|
|
|
@ -420,8 +420,7 @@ class View extends Object {
|
||||||
$this->hasRendered = true;
|
$this->hasRendered = true;
|
||||||
} else {
|
} else {
|
||||||
$out = $this->_render($viewFileName, $this->viewVars);
|
$out = $this->_render($viewFileName, $this->viewVars);
|
||||||
$msg = __("Error in view %s, got: <blockquote>%s</blockquote>", true);
|
trigger_error(sprintf(__("Error in view %s, got: <blockquote>%s</blockquote>", true), $viewFileName, $out), E_USER_ERROR);
|
||||||
trigger_error(sprintf($msg, $viewFileName, $out), E_USER_ERROR);
|
|
||||||
}
|
}
|
||||||
return $out;
|
return $out;
|
||||||
}
|
}
|
||||||
|
@ -464,8 +463,7 @@ class View extends Object {
|
||||||
|
|
||||||
if ($this->output === false) {
|
if ($this->output === false) {
|
||||||
$this->output = $this->_render($layoutFileName, $data_for_layout);
|
$this->output = $this->_render($layoutFileName, $data_for_layout);
|
||||||
$msg = __("Error in layout %s, got: <blockquote>%s</blockquote>", true);
|
trigger_error(sprintf(__("Error in layout %s, got: <blockquote>%s</blockquote>", true), $layoutFileName, $this->output), E_USER_ERROR);
|
||||||
trigger_error(sprintf($msg, $layoutFileName, $this->output), E_USER_ERROR);
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -402,7 +402,7 @@ class XmlNode extends Object {
|
||||||
|
|
||||||
if (is_object($child)) {
|
if (is_object($child)) {
|
||||||
if ($this->compare($child)) {
|
if ($this->compare($child)) {
|
||||||
trigger_error('Cannot append a node to itself.');
|
trigger_error(__('Cannot append a node to itself.', true));
|
||||||
$return = false;
|
$return = false;
|
||||||
return $return;
|
return $return;
|
||||||
}
|
}
|
||||||
|
@ -909,7 +909,7 @@ class Xml extends XmlNode {
|
||||||
} elseif (file_exists($input)) {
|
} elseif (file_exists($input)) {
|
||||||
$this->__rawData = file_get_contents($input);
|
$this->__rawData = file_get_contents($input);
|
||||||
} else {
|
} else {
|
||||||
trigger_error('XML cannot be read');
|
trigger_error(__('XML cannot be read', true));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return $this->parse();
|
return $this->parse();
|
||||||
|
|
|
@ -533,7 +533,7 @@ class CakeTestCase extends UnitTestCase {
|
||||||
$fixture->truncate($this->db);
|
$fixture->truncate($this->db);
|
||||||
$fixture->insert($this->db);
|
$fixture->insert($this->db);
|
||||||
} else {
|
} else {
|
||||||
trigger_error("Referenced fixture class {$class} not found", E_USER_WARNING);
|
trigger_error(sprintf(__('Referenced fixture class %s not found', true), $class), E_USER_WARNING);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -101,7 +101,7 @@ class CodeCoverageManager {
|
||||||
$thisFile = str_replace('.php', '.test.php', basename(__FILE__));
|
$thisFile = str_replace('.php', '.test.php', basename(__FILE__));
|
||||||
|
|
||||||
if (strpos($testCaseFile, $thisFile) !== false) {
|
if (strpos($testCaseFile, $thisFile) !== false) {
|
||||||
trigger_error('Xdebug supports no parallel coverage analysis - so this is not possible.', E_USER_ERROR);
|
trigger_error(__('Xdebug supports no parallel coverage analysis - so this is not possible.', true), E_USER_ERROR);
|
||||||
}
|
}
|
||||||
$manager->setParams($reporter);
|
$manager->setParams($reporter);
|
||||||
$manager->testCaseFile = $testCaseFile;
|
$manager->testCaseFile = $testCaseFile;
|
||||||
|
@ -223,7 +223,7 @@ class CodeCoverageManager {
|
||||||
$testObjectFile = $this->__testObjectFilesFromGroupFile($this->testCaseFile, $this->appTest);
|
$testObjectFile = $this->__testObjectFilesFromGroupFile($this->testCaseFile, $this->appTest);
|
||||||
foreach ($testObjectFile as $file) {
|
foreach ($testObjectFile as $file) {
|
||||||
if (!file_exists($file)) {
|
if (!file_exists($file)) {
|
||||||
trigger_error('This test object file is invalid: ' . $file);
|
trigger_error(sprintf(__('This test object file is invalid: %s', true), $file));
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -236,7 +236,7 @@ class CodeCoverageManager {
|
||||||
$testObjectFile = $this->__testObjectFileFromCaseFile($this->testCaseFile, $this->appTest);
|
$testObjectFile = $this->__testObjectFileFromCaseFile($this->testCaseFile, $this->appTest);
|
||||||
|
|
||||||
if (!file_exists($testObjectFile)) {
|
if (!file_exists($testObjectFile)) {
|
||||||
trigger_error('This test object file is invalid: ' . $testObjectFile);
|
trigger_error(sprintf(__('This test object file is invalid: %s', true), $testObjectFile));
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -551,7 +551,7 @@ class CodeCoverageManager {
|
||||||
$path .= DS . $groupFile . $testManager->_groupExtension;
|
$path .= DS . $groupFile . $testManager->_groupExtension;
|
||||||
|
|
||||||
if (!file_exists($path)) {
|
if (!file_exists($path)) {
|
||||||
trigger_error('This group file does not exist!');
|
trigger_error(__('This group file does not exist!', true));
|
||||||
return array();
|
return array();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -736,7 +736,7 @@ class CodeCoverageManager {
|
||||||
*/
|
*/
|
||||||
function __calcCoverage($lineCount, $coveredCount) {
|
function __calcCoverage($lineCount, $coveredCount) {
|
||||||
if ($coveredCount > $lineCount) {
|
if ($coveredCount > $lineCount) {
|
||||||
trigger_error('Sorry, you cannot have more covered lines than total lines!');
|
trigger_error(__('Sorry, you cannot have more covered lines than total lines!', true));
|
||||||
}
|
}
|
||||||
return ($lineCount != 0)
|
return ($lineCount != 0)
|
||||||
? round(100 * $coveredCount / $lineCount, 2)
|
? round(100 * $coveredCount / $lineCount, 2)
|
||||||
|
|
|
@ -101,11 +101,11 @@ class TestManager {
|
||||||
function runAllTests(&$reporter, $testing = false) {
|
function runAllTests(&$reporter, $testing = false) {
|
||||||
$testCases =& $this->_getTestFileList($this->_getTestsPath());
|
$testCases =& $this->_getTestFileList($this->_getTestsPath());
|
||||||
if ($this->appTest) {
|
if ($this->appTest) {
|
||||||
$test =& new TestSuite('All App Tests');
|
$test =& new TestSuite(__('All App Tests', true));
|
||||||
} else if ($this->pluginTest) {
|
} else if ($this->pluginTest) {
|
||||||
$test =& new TestSuite('All ' . Inflector::humanize($this->pluginTest) . ' Plugin Tests');
|
$test =& new TestSuite(sprintf(__('All %s Plugin Tests', true), Inflector::humanize($manager->pluginTest)));
|
||||||
} else {
|
} else {
|
||||||
$test =& new TestSuite('All Core Tests');
|
$test =& new TestSuite(__('All Core Tests', true));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($testing) {
|
if ($testing) {
|
||||||
|
@ -132,7 +132,7 @@ class TestManager {
|
||||||
$testCaseFileWithPath = $this->_getTestsPath() . DS . $testCaseFile;
|
$testCaseFileWithPath = $this->_getTestsPath() . DS . $testCaseFile;
|
||||||
|
|
||||||
if (!file_exists($testCaseFileWithPath)) {
|
if (!file_exists($testCaseFileWithPath)) {
|
||||||
trigger_error("Test case {$testCaseFile} cannot be found", E_USER_ERROR);
|
trigger_error(sprintf(__('Test case %s cannot be found', true), $testCaseFile), E_USER_ERROR);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -140,7 +140,7 @@ class TestManager {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$test =& new TestSuite("Individual test case: " . $testCaseFile);
|
$test =& new TestSuite(sprintf(__('Individual test case: %s', true), $testCaseFile));
|
||||||
$test->addTestFile($testCaseFileWithPath);
|
$test->addTestFile($testCaseFileWithPath);
|
||||||
return $test->run($reporter);
|
return $test->run($reporter);
|
||||||
}
|
}
|
||||||
|
@ -157,11 +157,11 @@ class TestManager {
|
||||||
$filePath = $this->_getTestsPath('groups') . DS . strtolower($groupTestName) . $this->_groupExtension;
|
$filePath = $this->_getTestsPath('groups') . DS . strtolower($groupTestName) . $this->_groupExtension;
|
||||||
|
|
||||||
if (!file_exists($filePath)) {
|
if (!file_exists($filePath)) {
|
||||||
trigger_error("Group test {$groupTestName} cannot be found at {$filePath}", E_USER_ERROR);
|
trigger_error(sprintf(__('Group test %s cannot be found at %s', true), $groupTestName, $filePath), E_USER_ERROR);
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once $filePath;
|
require_once $filePath;
|
||||||
$test =& new TestSuite($groupTestName . ' group test');
|
$test =& new TestSuite(sprintf(__('%s group test', true), $groupTestName));
|
||||||
foreach ($this->_getGroupTestClassNames($filePath) as $groupTest) {
|
foreach ($this->_getGroupTestClassNames($filePath) as $groupTest) {
|
||||||
$testCase = new $groupTest();
|
$testCase = new $groupTest();
|
||||||
$test->addTestCase($testCase);
|
$test->addTestCase($testCase);
|
||||||
|
|
|
@ -23,7 +23,7 @@ endif;
|
||||||
$settings = Cache::settings();
|
$settings = Cache::settings();
|
||||||
if (!empty($settings)):
|
if (!empty($settings)):
|
||||||
echo '<span class="notice success">';
|
echo '<span class="notice success">';
|
||||||
echo sprintf(__('The %s is being used for caching. To change the config edit APP/config/core.php ', true), '<em>'. $settings['engine'] . 'Engine</em>');
|
printf(__('The %s is being used for caching. To change the config edit APP/config/core.php ', true), '<em>'. $settings['engine'] . 'Engine</em>');
|
||||||
echo '</span>';
|
echo '</span>';
|
||||||
else:
|
else:
|
||||||
echo '<span class="notice">';
|
echo '<span class="notice">';
|
||||||
|
@ -74,7 +74,7 @@ if (!empty($filePresent)):
|
||||||
<h3><?php __('Editing this Page') ?></h3>
|
<h3><?php __('Editing this Page') ?></h3>
|
||||||
<p>
|
<p>
|
||||||
<?php
|
<?php
|
||||||
echo sprintf(__('To change the content of this page, edit: %s
|
printf(__('To change the content of this page, edit: %s
|
||||||
To change its layout, edit: %s
|
To change its layout, edit: %s
|
||||||
You can also add some CSS styles for your pages at: %s', true),
|
You can also add some CSS styles for your pages at: %s', true),
|
||||||
APP . 'views' . DS . 'pages' . DS . 'home.ctp.<br />', APP . 'views' . DS . 'layouts' . DS . 'default.ctp.<br />', APP . 'webroot' . DS . 'css');
|
APP . 'views' . DS . 'pages' . DS . 'home.ctp.<br />', APP . 'views' . DS . 'layouts' . DS . 'default.ctp.<br />', APP . 'webroot' . DS . 'css');
|
||||||
|
|
|
@ -96,7 +96,7 @@ if (!empty($filePresent)):
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<h2><?php echo sprintf(__('Release Notes for CakePHP %s.', true), Configure::version()); ?></h2>
|
<h2><?php printf(__('Release Notes for CakePHP %s.', true), Configure::version()); ?></h2>
|
||||||
<a href="https://trac.cakephp.org/wiki/notes/1.2.x.x"><?php __('Read the release notes and get the latest version'); ?> </a>
|
<a href="https://trac.cakephp.org/wiki/notes/1.2.x.x"><?php __('Read the release notes and get the latest version'); ?> </a>
|
||||||
<h2><?php __('Editing this Page'); ?></h2>
|
<h2><?php __('Editing this Page'); ?></h2>
|
||||||
<p>
|
<p>
|
||||||
|
|
Loading…
Reference in a new issue