Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch '2.0' into 2.1

Conflicts:
	lib/Cake/Test/Case/Model/ModelReadTest.php
	lib/Cake/Utility/Debugger.php
  • Loading branch information...
commit 389072708a9d507ff16d15cf40cd5796633a612e 2 parents c8fd7c0 + 7339640
@ADmad ADmad authored
Showing with 533 additions and 431 deletions.
  1. +2 −2 lib/Cake/Cache/Engine/FileEngine.php
  2. +1 −1  lib/Cake/Cache/Engine/MemcacheEngine.php
  3. +2 −2 lib/Cake/Console/Command/ApiShell.php
  4. +3 −3 lib/Cake/Console/Command/Task/ProjectTask.php
  5. +1 −0  lib/Cake/Console/Command/UpgradeShell.php
  6. +4 −4 lib/Cake/Controller/Component/AclComponent.php
  7. +1 −1  lib/Cake/Controller/Component/AuthComponent.php
  8. +3 −3 lib/Cake/Controller/Controller.php
  9. +1 −1  lib/Cake/Core/App.php
  10. +3 −3 lib/Cake/I18n/I18n.php
  11. +1 −1  lib/Cake/I18n/Multibyte.php
  12. +1 −1  lib/Cake/Model/AclNode.php
  13. +1 −0  lib/Cake/Model/Aco.php
  14. +1 −0  lib/Cake/Model/Aro.php
  15. +2 −2 lib/Cake/Model/Behavior/ContainableBehavior.php
  16. +20 −20 lib/Cake/Model/Behavior/TranslateBehavior.php
  17. +8 −9 lib/Cake/Model/Behavior/TreeBehavior.php
  18. +2 −2 lib/Cake/Model/Datasource/CakeSession.php
  19. +8 −8 lib/Cake/Model/Datasource/Database/Postgres.php
  20. +1 −1  lib/Cake/Model/Datasource/Database/Sqlite.php
  21. +1 −1  lib/Cake/Model/Datasource/Database/Sqlserver.php
  22. +1 −1  lib/Cake/Model/Datasource/DboSource.php
  23. +4 −11 lib/Cake/Model/Model.php
  24. +1 −1  lib/Cake/Network/CakeResponse.php
  25. +2 −2 lib/Cake/Network/CakeSocket.php
  26. +3 −3 lib/Cake/Routing/Dispatcher.php
  27. +11 −11 lib/Cake/Test/Case/Cache/Engine/MemcacheEngineTest.php
  28. +3 −3 lib/Cake/Test/Case/Console/Command/AclShellTest.php
  29. +4 −4 lib/Cake/Test/Case/Console/Command/Task/ExtractTaskTest.php
  30. +2 −2 lib/Cake/Test/Case/Console/Command/Task/ModelTaskTest.php
  31. +1 −1  lib/Cake/Test/Case/Console/Command/Task/ProjectTaskTest.php
  32. +2 −2 lib/Cake/Test/Case/Console/ShellTest.php
  33. +7 −24 lib/Cake/Test/Case/Controller/Component/AuthComponentTest.php
  34. +6 −6 lib/Cake/Test/Case/Controller/ScaffoldTest.php
  35. +5 −5 lib/Cake/Test/Case/Core/AppTest.php
  36. +3 −3 lib/Cake/Test/Case/Model/Behavior/ContainableBehaviorTest.php
  37. +1 −1  lib/Cake/Test/Case/Model/Behavior/TranslateBehaviorTest.php
  38. +51 −0 lib/Cake/Test/Case/Model/Behavior/TreeBehaviorNumberTest.php
  39. +1 −1  lib/Cake/Test/Case/Model/ConnectionManagerTest.php
  40. +1 −1  lib/Cake/Test/Case/Model/Datasource/Database/MysqlTest.php
  41. +4 −4 lib/Cake/Test/Case/Model/Datasource/Database/PostgresTest.php
  42. +1 −1  lib/Cake/Test/Case/Model/DbAclTest.php
  43. +7 −7 lib/Cake/Test/Case/Model/ModelDeleteTest.php
  44. +25 −2 lib/Cake/Test/Case/Model/ModelIntegrationTest.php
  45. +1 −1  lib/Cake/Test/Case/Model/ModelReadTest.php
  46. +11 −11 lib/Cake/Test/Case/Model/ModelWriteTest.php
  47. +5 −5 lib/Cake/Test/Case/Model/models.php
  48. +14 −14 lib/Cake/Test/Case/Network/Email/CakeEmailTest.php
  49. +4 −2 lib/Cake/Test/Case/Routing/DispatcherTest.php
  50. +6 −6 lib/Cake/Test/Case/Utility/DebuggerTest.php
  51. +2 −2 lib/Cake/Test/Case/Utility/FileTest.php
  52. +0 −1  lib/Cake/Test/Case/Utility/FolderTest.php
  53. +2 −2 lib/Cake/Test/Case/Utility/InflectorTest.php
  54. +43 −43 lib/Cake/Test/Case/Utility/SetTest.php
  55. +1 −1  lib/Cake/Test/Case/Utility/ValidationTest.php
  56. +33 −14 lib/Cake/Test/Case/View/Helper/CacheHelperTest.php
  57. +14 −2 lib/Cake/Test/Case/View/Helper/HtmlHelperTest.php
  58. +2 −2 lib/Cake/Test/Case/View/Helper/JsHelperTest.php
  59. +6 −6 lib/Cake/Test/Case/View/Helper/NumberHelperTest.php
  60. +3 −3 lib/Cake/Test/Case/View/Helper/TextHelperTest.php
  61. +2 −2 lib/Cake/Test/Fixture/CounterCachePostFixture.php
  62. +2 −2 lib/Cake/Test/Fixture/CounterCachePostNonstandardPrimaryKeyFixture.php
  63. +30 −26 lib/Cake/Test/Fixture/GroupUpdateAllFixture.php
  64. +33 −30 lib/Cake/Test/Fixture/ProductUpdateAllFixture.php
  65. +1 −1  lib/Cake/Test/test_app/View/Pages/home.ctp
  66. +3 −0  lib/Cake/TestSuite/CakeTestCase.php
  67. +1 −1  lib/Cake/TestSuite/CakeTestRunner.php
  68. +9 −11 lib/Cake/TestSuite/CakeTestSuiteCommand.php
  69. +1 −1  lib/Cake/TestSuite/Reporter/CakeHtmlReporter.php
  70. +1 −1  lib/Cake/TestSuite/Reporter/CakeTextReporter.php
  71. +8 −8 lib/Cake/Utility/Debugger.php
  72. +1 −1  lib/Cake/Utility/File.php
  73. +20 −8 lib/Cake/Utility/Folder.php
  74. +1 −1  lib/Cake/Utility/Inflector.php
  75. +2 −2 lib/Cake/Utility/Set.php
  76. +1 −1  lib/Cake/Utility/String.php
  77. +17 −15 lib/Cake/Utility/Validation.php
  78. +2 −2 lib/Cake/View/Helper/CacheHelper.php
  79. +0 −4 lib/Cake/View/Helper/FormHelper.php
  80. +9 −9 lib/Cake/View/Helper/HtmlHelper.php
  81. +9 −9 lib/Cake/View/Helper/JsBaseEngineHelper.php
  82. +1 −1  lib/Cake/View/Helper/TextHelper.php
  83. +4 −4 lib/Cake/View/Helper/TimeHelper.php
  84. +4 −4 lib/Cake/View/Scaffolds/view.ctp
  85. +11 −11 lib/Cake/bootstrap.php
View
4 lib/Cake/Cache/Engine/FileEngine.php
@@ -129,14 +129,14 @@ public function write($key, $data, $duration) {
$contents = $expires . $lineBreak . $data . $lineBreak;
if ($this->settings['lock']) {
- $this->_File->flock(LOCK_EX);
+ $this->_File->flock(LOCK_EX);
}
$this->_File->rewind();
$success = $this->_File->ftruncate(0) && $this->_File->fwrite($contents) && $this->_File->fflush();
if ($this->settings['lock']) {
- $this->_File->flock(LOCK_UN);
+ $this->_File->flock(LOCK_UN);
}
return $success;
View
2  lib/Cake/Cache/Engine/MemcacheEngine.php
@@ -104,7 +104,7 @@ protected function _parseServerString($server) {
$position++;
}
} else {
- $position = strpos($server, ':');
+ $position = strpos($server, ':');
}
$port = 11211;
$host = $server;
View
4 lib/Cake/Console/Command/ApiShell.php
@@ -101,7 +101,7 @@ public function main() {
$this->_stop();
}
$method = $parsed[$this->params['method']];
- $this->out($class .'::'.$method['method'] . $method['parameters']);
+ $this->out($class . '::' . $method['method'] . $method['parameters']);
$this->hr();
$this->out($method['comment'], true);
} else {
@@ -127,7 +127,7 @@ public function main() {
if (isset($methods[--$number])) {
$method = $parsed[$methods[$number]];
$this->hr();
- $this->out($class .'::'.$method['method'] . $method['parameters']);
+ $this->out($class . '::' . $method['method'] . $method['parameters']);
$this->hr();
$this->out($method['comment'], true);
}
View
6 lib/Cake/Console/Command/Task/ProjectTask.php
@@ -269,7 +269,7 @@ public function securitySalt($path) {
$contents = $File->read();
if (preg_match('/([\s]*Configure::write\(\'Security.salt\',[\s\'A-z0-9]*\);)/', $contents, $match)) {
$string = Security::generateAuthKey();
- $result = str_replace($match[0], "\t" . 'Configure::write(\'Security.salt\', \''.$string.'\');', $contents);
+ $result = str_replace($match[0], "\t" . 'Configure::write(\'Security.salt\', \'' . $string . '\');', $contents);
if ($File->write($result)) {
return true;
}
@@ -290,7 +290,7 @@ public function securityCipherSeed($path) {
if (preg_match('/([\s]*Configure::write\(\'Security.cipherSeed\',[\s\'A-z0-9]*\);)/', $contents, $match)) {
App::uses('Security', 'Utility');
$string = substr(bin2hex(Security::generateAuthKey()), 0, 30);
- $result = str_replace($match[0], "\t" . 'Configure::write(\'Security.cipherSeed\', \''.$string.'\');', $contents);
+ $result = str_replace($match[0], "\t" . 'Configure::write(\'Security.cipherSeed\', \'' . $string . '\');', $contents);
if ($File->write($result)) {
return true;
}
@@ -357,7 +357,7 @@ public function cakeAdmin($name) {
$File = new File($path . 'core.php');
$contents = $File->read();
if (preg_match('%(\s*[/]*Configure::write\(\'Routing.prefixes\',[\s\'a-z,\)\(]*\);)%', $contents, $match)) {
- $result = str_replace($match[0], "\n" . 'Configure::write(\'Routing.prefixes\', array(\''.$name.'\'));', $contents);
+ $result = str_replace($match[0], "\n" . 'Configure::write(\'Routing.prefixes\', array(\'' . $name . '\'));', $contents);
if ($File->write($result)) {
Configure::write('Routing.prefixes', array($name));
return true;
View
1  lib/Cake/Console/Command/UpgradeShell.php
@@ -222,6 +222,7 @@ public function helpers() {
$plugins = App::objects('plugin');
$pluginHelpers = array();
foreach ($plugins as $plugin) {
+ CakePlugin::load($plugin);
$pluginHelpers = array_merge(
$pluginHelpers,
App::objects('helper', App::pluginPath($plugin) . DS . 'views' . DS . 'helpers' . DS, false)
View
8 lib/Cake/Controller/Component/AclComponent.php
@@ -488,11 +488,11 @@ public function getAclLink($aro, $aco) {
}
return array(
- 'aro' => Set::extract($obj, 'Aro.0.'.$this->Aro->alias.'.id'),
- 'aco' => Set::extract($obj, 'Aco.0.'.$this->Aco->alias.'.id'),
+ 'aro' => Set::extract($obj, 'Aro.0.' . $this->Aro->alias . '.id'),
+ 'aco' => Set::extract($obj, 'Aco.0.' . $this->Aco->alias . '.id'),
'link' => $this->Aro->Permission->find('all', array('conditions' => array(
- $this->Aro->Permission->alias . '.aro_id' => Set::extract($obj, 'Aro.0.'.$this->Aro->alias.'.id'),
- $this->Aro->Permission->alias . '.aco_id' => Set::extract($obj, 'Aco.0.'.$this->Aco->alias.'.id')
+ $this->Aro->Permission->alias . '.aro_id' => Set::extract($obj, 'Aro.0.' . $this->Aro->alias . '.id'),
+ $this->Aro->Permission->alias . '.aco_id' => Set::extract($obj, 'Aco.0.' . $this->Aco->alias . '.id')
)))
);
}
View
2  lib/Cake/Controller/Component/AuthComponent.php
@@ -314,7 +314,7 @@ public function startup($controller) {
if (!$this->_getUser()) {
if (!$request->is('ajax')) {
$this->flash($this->authError);
- $this->Session->write('Auth.redirect', Router::reverse($request));
+ $this->Session->write('Auth.redirect', $request->here());
$controller->redirect($loginAction);
return false;
} elseif (!empty($this->ajaxLogin)) {
View
6 lib/Cake/Controller/Controller.php
@@ -981,7 +981,7 @@ public function postConditions($data = array(), $op = null, $bool = 'AND', $excl
$arrayOp = is_array($op);
foreach ($data as $model => $fields) {
foreach ($fields as $field => $value) {
- $key = $model.'.'.$field;
+ $key = $model . '.' . $field;
$fieldOp = $op;
if ($arrayOp) {
if (array_key_exists($key, $op)) {
@@ -998,9 +998,9 @@ public function postConditions($data = array(), $op = null, $bool = 'AND', $excl
$fieldOp = strtoupper(trim($fieldOp));
if ($fieldOp === 'LIKE') {
$key = $key.' LIKE';
- $value = '%'.$value.'%';
+ $value = '%' . $value . '%';
} elseif ($fieldOp && $fieldOp != '=') {
- $key = $key.' '.$fieldOp;
+ $key = $key.' ' . $fieldOp;
}
$cond[$key] = $value;
}
View
2  lib/Cake/Core/App.php
@@ -681,7 +681,7 @@ protected static function _loadClass($name, $plugin, $type, $originalType, $pare
}
App::uses($extends, $extendType);
if ($plugin && in_array($originalType, array('controller', 'model'))) {
- App::uses($plugin . $extends, $plugin . '.' .$type);
+ App::uses($plugin . $extends, $plugin . '.' . $type);
}
}
if ($plugin) {
View
6 lib/Cake/I18n/I18n.php
@@ -164,7 +164,7 @@ public static function translate($singular, $plural = null, $domain = null, $cat
}
if ($_this->category == 'LC_TIME') {
- return $_this->_translateTime($singular,$domain);
+ return $_this->_translateTime($singular, $domain);
}
if (!isset($count)) {
@@ -466,7 +466,7 @@ protected function _loadPo($file, $domain) {
} while (!feof($file));
fclose($file);
$merge[""] = $header;
- return $this->_domains[$domain][$this->_lang][$this->category] = array_merge($merge ,$translations);
+ return $this->_domains[$domain][$this->_lang][$this->category] = array_merge($merge, $translations);
}
/**
@@ -486,7 +486,7 @@ protected function _loadLocaleDefinition($file, $domain = null) {
if (empty($line) || $line[0] === $comment) {
continue;
}
- $parts = preg_split("/[[:space:]]+/",$line);
+ $parts = preg_split("/[[:space:]]+/", $line);
if ($parts[0] === 'comment_char') {
$comment = $parts[1];
continue;
View
2  lib/Cake/I18n/Multibyte.php
@@ -893,7 +893,7 @@ public static function strtoupper($string) {
* @param string $haystack The string being checked.
* @param string $needle The string being found.
* @return integer The number of times the $needle substring occurs in the $haystack string.
- */
+ */
public static function substrCount($haystack, $needle) {
$count = 0;
$haystack = Multibyte::utf8($haystack);
View
2  lib/Cake/Model/AclNode.php
@@ -95,7 +95,7 @@ public function node($ref = null) {
$queryData['joins'][] = array(
'table' => $table,
'alias' => "{$type}{$i}",
- 'type' => 'LEFT',
+ 'type' => 'LEFT',
'conditions' => array(
$db->name("{$type}{$i}.lft") . ' > ' . $db->name("{$type}{$j}.lft"),
$db->name("{$type}{$i}.rght") . ' < ' . $db->name("{$type}{$j}.rght"),
View
1  lib/Cake/Model/Aco.php
@@ -17,6 +17,7 @@
*/
App::uses('AppModel', 'Model');
+App::uses('AclNode', 'Model');
/**
* Access Control Object
View
1  lib/Cake/Model/Aro.php
@@ -17,6 +17,7 @@
*/
App::uses('AppModel', 'Model');
+App::uses('AclNode', 'Model');
/**
* Access Request Object
View
4 lib/Cake/Model/Behavior/ContainableBehavior.php
@@ -308,10 +308,10 @@ public function containments($Model, $contain, $containments = array(), $throwEr
$val = preg_split('/\s*,\s*/', substr(substr($key, 1), 0, -1));
} elseif (preg_match('/ASC|DESC$/', $key)) {
$option = 'order';
- $val = $Model->{$name}->alias.'.'.$key;
+ $val = $Model->{$name}->alias . '.' . $key;
} elseif (preg_match('/[ =!]/', $key)) {
$option = 'conditions';
- $val = $Model->{$name}->alias.'.'.$key;
+ $val = $Model->{$name}->alias . '.' . $key;
}
$children[$option] = is_array($val) ? $val : array($val);
$newChildren = null;
View
40 lib/Cake/Model/Behavior/TranslateBehavior.php
@@ -104,8 +104,8 @@ public function beforeFind($model, $query) {
$joinTable->table = $RuntimeModel->table;
$joinTable->schemaName = $RuntimeModel->getDataSource()->getSchemaName();
- if (is_string($query['fields']) && 'COUNT(*) AS '.$db->name('count') == $query['fields']) {
- $query['fields'] = 'COUNT(DISTINCT('.$db->name($model->alias . '.' . $model->primaryKey) . ')) ' . $db->alias . 'count';
+ if (is_string($query['fields']) && 'COUNT(*) AS ' . $db->name('count') == $query['fields']) {
+ $query['fields'] = 'COUNT(DISTINCT(' . $db->name($model->alias . '.' . $model->primaryKey) . ')) ' . $db->alias . 'count';
$query['joins'][] = array(
'type' => 'INNER',
'alias' => $RuntimeModel->alias,
@@ -127,7 +127,7 @@ public function beforeFind($model, $query) {
foreach ($fields as $key => $value) {
$field = (is_numeric($key)) ? $value : $key;
- if (in_array($model->alias.'.*', $query['fields']) || in_array($model->alias.'.'.$field, $query['fields']) || in_array($field, $query['fields'])) {
+ if (in_array($model->alias.'.*', $query['fields']) || in_array($model->alias.'.' . $field, $query['fields']) || in_array($field, $query['fields'])) {
$addFields[] = $field;
}
}
@@ -138,7 +138,7 @@ public function beforeFind($model, $query) {
foreach ($addFields as $_f => $field) {
$aliasField = is_numeric($_f) ? $field : $_f;
- foreach (array($aliasField, $model->alias.'.'.$aliasField) as $_field) {
+ foreach (array($aliasField, $model->alias . '.' . $aliasField) as $_field) {
$key = array_search($_field, (array)$query['fields']);
if ($key !== false) {
@@ -148,36 +148,36 @@ public function beforeFind($model, $query) {
if (is_array($locale)) {
foreach ($locale as $_locale) {
- $model->virtualFields['i18n_'.$field.'_'.$_locale] = 'I18n__'.$field.'__'.$_locale.'.content';
+ $model->virtualFields['i18n_' . $field . '_' . $_locale] = 'I18n__' . $field . '__' . $_locale . '.content';
if (!empty($query['fields'])) {
- $query['fields'][] = 'i18n_'.$field.'_'.$_locale;
+ $query['fields'][] = 'i18n_' . $field . '_' . $_locale;
}
$query['joins'][] = array(
'type' => 'LEFT',
- 'alias' => 'I18n__'.$field.'__'.$_locale,
+ 'alias' => 'I18n__' . $field . '__' . $_locale,
'table' => $joinTable,
'conditions' => array(
$model->alias . '.' . $model->primaryKey => $db->identifier("I18n__{$field}__{$_locale}.foreign_key"),
- 'I18n__'.$field.'__'.$_locale.'.model' => $model->name,
- 'I18n__'.$field.'__'.$_locale.'.'.$RuntimeModel->displayField => $aliasField,
- 'I18n__'.$field.'__'.$_locale.'.locale' => $_locale
+ 'I18n__' . $field . '__' . $_locale . '.model' => $model->name,
+ 'I18n__' . $field . '__' . $_locale . '.' . $RuntimeModel->displayField => $aliasField,
+ 'I18n__' . $field . '__' . $_locale . '.locale' => $_locale
)
);
}
} else {
- $model->virtualFields['i18n_'.$field] = 'I18n__'.$field.'.content';
+ $model->virtualFields['i18n_' . $field] = 'I18n__' . $field . '.content';
if (!empty($query['fields'])) {
- $query['fields'][] = 'i18n_'.$field;
+ $query['fields'][] = 'i18n_' . $field;
}
$query['joins'][] = array(
'type' => 'INNER',
- 'alias' => 'I18n__'.$field,
+ 'alias' => 'I18n__' . $field,
'table' => $joinTable,
'conditions' => array(
$model->alias . '.' . $model->primaryKey => $db->identifier("I18n__{$field}.foreign_key"),
- 'I18n__'.$field.'.model' => $model->name,
- 'I18n__'.$field.'.'.$RuntimeModel->displayField => $aliasField,
- 'I18n__'.$field.'.locale' => $locale
+ 'I18n__' . $field . '.model' => $model->name,
+ 'I18n__' . $field . '.' . $RuntimeModel->displayField => $aliasField,
+ 'I18n__' . $field . '.locale' => $locale
)
);
}
@@ -212,11 +212,11 @@ public function afterFind($model, $results, $primary) {
if (is_array($locale)) {
foreach ($locale as $_locale) {
- if (!isset($row[$model->alias][$aliasField]) && !empty($row[$model->alias]['i18n_'.$field.'_'.$_locale])) {
- $row[$model->alias][$aliasField] = $row[$model->alias]['i18n_'.$field.'_'.$_locale];
+ if (!isset($row[$model->alias][$aliasField]) && !empty($row[$model->alias]['i18n_' . $field . '_' . $_locale])) {
+ $row[$model->alias][$aliasField] = $row[$model->alias]['i18n_' . $field . '_' . $_locale];
$row[$model->alias]['locale'] = $_locale;
}
- unset($row[$model->alias]['i18n_'.$field.'_'.$_locale]);
+ unset($row[$model->alias]['i18n_' . $field . '_' . $_locale]);
}
if (!isset($row[$model->alias][$aliasField])) {
@@ -421,7 +421,7 @@ public function bindTranslation($model, $fields, $reset = true) {
foreach (array('hasOne', 'hasMany', 'belongsTo', 'hasAndBelongsToMany') as $type) {
if (isset($model->{$type}[$association]) || isset($model->__backAssociation[$type][$association])) {
trigger_error(
- __d('cake_dev', 'Association %s is already binded to model %s', $association, $model->alias),
+ __d('cake_dev', 'Association %s is already bound to model %s', $association, $model->alias),
E_USER_ERROR
);
return false;
View
17 lib/Cake/Model/Behavior/TreeBehavior.php
@@ -163,8 +163,8 @@ public function beforeSave($Model) {
$this->_addToWhitelist($Model, $parent);
} else {
$values = $Model->find('first', array(
- 'conditions' => array($scope,$Model->escapeField() => $Model->id),
- 'fields' => array($Model->primaryKey, $parent, $left, $right ), 'recursive' => $recursive)
+ 'conditions' => array($scope, $Model->escapeField() => $Model->id),
+ 'fields' => array($Model->primaryKey, $parent, $left, $right), 'recursive' => $recursive)
);
if ($values === false) {
@@ -503,7 +503,7 @@ public function moveUp($Model, $id = null, $number = 1) {
extract($this->settings[$Model->alias]);
list($node) = array_values($Model->find('first', array(
'conditions' => array($scope, $Model->escapeField() => $id),
- 'fields' => array($Model->primaryKey, $left, $right, $parent ), 'recursive' => $recursive
+ 'fields' => array($Model->primaryKey, $left, $right, $parent), 'recursive' => $recursive
)));
if ($node[$parent]) {
list($parentNode) = array_values($Model->find('first', array(
@@ -527,7 +527,7 @@ public function moveUp($Model, $id = null, $number = 1) {
}
$edge = $this->_getMax($Model, $scope, $right, $recursive);
$this->_sync($Model, $edge - $previousNode[$left] +1, '+', 'BETWEEN ' . $previousNode[$left] . ' AND ' . $previousNode[$right]);
- $this->_sync($Model, $node[$left] - $previousNode[$left], '-', 'BETWEEN ' .$node[$left] . ' AND ' . $node[$right]);
+ $this->_sync($Model, $node[$left] - $previousNode[$left], '-', 'BETWEEN ' . $node[$left] . ' AND ' . $node[$right]);
$this->_sync($Model, $edge - $previousNode[$left] - ($node[$right] - $node[$left]), '-', '> ' . $edge);
if (is_int($number)) {
$number--;
@@ -577,7 +577,6 @@ public function recover($Model, $mode = 'parent', $missingParentAction = null) {
if ($missingParentAction == 'return') {
foreach ($missingParents as $id => $display) {
$this->errors[] = 'cannot find the parent for ' . $Model->alias . ' with id ' . $id . '(' . $display . ')';
-
}
return false;
} elseif ($missingParentAction == 'delete') {
@@ -588,13 +587,14 @@ public function recover($Model, $mode = 'parent', $missingParentAction = null) {
}
$count = 1;
foreach ($Model->find('all', array('conditions' => $scope, 'fields' => array($Model->primaryKey), 'order' => $left)) as $array) {
- $Model->id = $array[$Model->alias][$Model->primaryKey];
$lft = $count++;
$rght = $count++;
+ $Model->create(false);
+ $Model->id = $array[$Model->alias][$Model->primaryKey];
$Model->save(array($left => $lft, $right => $rght), array('callbacks' => false));
}
foreach ($Model->find('all', array('conditions' => $scope, 'fields' => array($Model->primaryKey, $parent), 'order' => $left)) as $array) {
- $Model->create();
+ $Model->create(false);
$Model->id = $array[$Model->alias][$Model->primaryKey];
$this->_setParent($Model, $array[$Model->alias][$parent]);
}
@@ -846,11 +846,10 @@ protected function _setParent($Model, $parentId = null, $created = false) {
if (($Model->id == $parentId)) {
return false;
-
} elseif (($node[$left] < $parentNode[$left]) && ($parentNode[$right] < $node[$right])) {
return false;
}
- if (empty ($node[$left]) && empty ($node[$right])) {
+ if (empty($node[$left]) && empty($node[$right])) {
$this->_sync($Model, 2, '+', '>= ' . $parentNode[$right], $created);
$result = $Model->save(
array($left => $parentNode[$right], $right => $parentNode[$right] + 1, $parent => $parentId),
View
4 lib/Cake/Model/Datasource/CakeSession.php
@@ -158,10 +158,10 @@ protected static function _setPath($base = null) {
return;
}
if (strpos($base, 'index.php') !== false) {
- $base = str_replace('index.php', '', $base);
+ $base = str_replace('index.php', '', $base);
}
if (strpos($base, '?') !== false) {
- $base = str_replace('?', '', $base);
+ $base = str_replace('?', '', $base);
}
self::$path = $base;
}
View
16 lib/Cake/Model/Datasource/Database/Postgres.php
@@ -67,7 +67,7 @@ class Postgres extends DboSource {
*/
public $columns = array(
'primary_key' => array('name' => 'serial NOT NULL'),
- 'string' => array('name' => 'varchar', 'limit' => '255'),
+ 'string' => array('name' => 'varchar', 'limit' => '255'),
'text' => array('name' => 'text'),
'integer' => array('name' => 'integer', 'formatter' => 'intval'),
'float' => array('name' => 'float', 'formatter' => 'floatval'),
@@ -78,7 +78,7 @@ class Postgres extends DboSource {
'binary' => array('name' => 'bytea'),
'boolean' => array('name' => 'boolean'),
'number' => array('name' => 'numeric'),
- 'inet' => array('name' => 'inet')
+ 'inet' => array('name' => 'inet')
);
/**
@@ -218,14 +218,14 @@ public function describe($model) {
$length = null;
}
$fields[$c->name] = array(
- 'type' => $this->column($type),
- 'null' => ($c->null == 'NO' ? false : true),
+ 'type' => $this->column($type),
+ 'null' => ($c->null == 'NO' ? false : true),
'default' => preg_replace(
"/^'(.*)'$/",
"$1",
preg_replace('/::.*/', '', $c->default)
),
- 'length' => $length
+ 'length' => $length
);
if ($model instanceof Model) {
if ($c->name == $model->primaryKey) {
@@ -419,7 +419,7 @@ protected function _quoteFunctionField($match) {
$match[1] = $this->name($match[1]);
}
}
- return '(' . $prepend .$match[1] . ')';
+ return '(' . $prepend . $match[1] . ')';
}
/**
@@ -487,13 +487,13 @@ public function alterSchema($compare, $table = null) {
case 'add':
foreach ($column as $field => $col) {
$col['name'] = $field;
- $colList[] = 'ADD COLUMN '.$this->buildColumn($col);
+ $colList[] = 'ADD COLUMN ' . $this->buildColumn($col);
}
break;
case 'drop':
foreach ($column as $field => $col) {
$col['name'] = $field;
- $colList[] = 'DROP COLUMN '.$this->name($field);
+ $colList[] = 'DROP COLUMN ' . $this->name($field);
}
break;
case 'change':
View
2  lib/Cake/Model/Datasource/Database/Sqlite.php
@@ -238,7 +238,7 @@ public function column($real) {
if (is_array($real)) {
$col = $real['name'];
if (isset($real['limit'])) {
- $col .= '('.$real['limit'].')';
+ $col .= '(' . $real['limit'] . ')';
}
return $col;
}
View
2  lib/Cake/Model/Datasource/Database/Sqlserver.php
@@ -302,7 +302,7 @@ public function fields($model, $alias = null, $fields = array(), $quote = true)
$fieldAlias = $this->name($alias . '__' . $fields[$i]);
} else {
$build = explode('.', $fields[$i]);
- $this->_fieldMappings[$build[0] . '__' .$build[1]] = $fields[$i];
+ $this->_fieldMappings[$build[0] . '__' . $build[1]] = $fields[$i];
$fieldName = $this->name($build[0] . '.' . $build[1]);
$fieldAlias = $this->name(preg_replace("/^\[(.+)\]$/", "$1", $build[0]) . '__' . $build[1]);
}
View
2  lib/Cake/Model/Datasource/DboSource.php
@@ -787,7 +787,7 @@ public function name($data) {
}
return $data;
}
- $cacheKey = crc32($this->startQuote.$data.$this->endQuote);
+ $cacheKey = crc32($this->startQuote . $data . $this->endQuote);
if ($return = $this->cacheMethod(__FUNCTION__, $cacheKey)) {
return $return;
}
View
15 lib/Cake/Model/Model.php
@@ -680,10 +680,7 @@ public function __construct($id = false, $table = null, $ds = null) {
}
if (is_subclass_of($this, 'AppModel')) {
- $merge = array('findMethods');
- if ($this->actsAs !== null || $this->actsAs !== false) {
- $merge[] = 'actsAs';
- }
+ $merge = array('actsAs', 'findMethods');
$parentClass = get_parent_class($this);
if ($parentClass !== 'AppModel') {
$this->_mergeVars($merge, $parentClass);
@@ -772,7 +769,7 @@ public function __isset($name) {
}
}
}
- }
+ }
if (!$className) {
return false;
@@ -2454,7 +2451,7 @@ public function hasAny($conditions = null) {
* Queries the datasource and returns a result set array.
*
* Also used to perform notation finds, where the first argument is type of find operation to perform
- * (all / first / count / neighbors / list / threaded ),
+ * (all / first / count / neighbors / list / threaded),
* second parameter options for finding ( indexed array, including: 'conditions', 'limit',
* 'recursive', 'page', 'fields', 'offset', 'order')
*
@@ -3201,11 +3198,7 @@ public function getID($list = 0) {
return false;
}
- foreach ($this->id as $id) {
- return $id;
- }
-
- return false;
+ return current($this->id);
}
/**
View
2  lib/Cake/Network/CakeResponse.php
@@ -372,7 +372,7 @@ protected function _setContentLength() {
$this->_headers['Content-Length'] = $offset + strlen($this->_body);
}
}
- }
+ }
/**
* Sends a header to the client.
View
4 lib/Cake/Network/CakeSocket.php
@@ -106,9 +106,9 @@ public function connect() {
}
if ($this->config['persistent'] == true) {
- $this->connection = @pfsockopen($scheme.$this->config['host'], $this->config['port'], $errNum, $errStr, $this->config['timeout']);
+ $this->connection = @pfsockopen($scheme . $this->config['host'], $this->config['port'], $errNum, $errStr, $this->config['timeout']);
} else {
- $this->connection = @fsockopen($scheme.$this->config['host'], $this->config['port'], $errNum, $errStr, $this->config['timeout']);
+ $this->connection = @fsockopen($scheme . $this->config['host'], $this->config['port'], $errNum, $errStr, $this->config['timeout']);
}
if (!empty($errNum) || !empty($errStr)) {
View
6 lib/Cake/Routing/Dispatcher.php
@@ -68,7 +68,7 @@ public function __construct($base = false) {
* are encountered.
*/
public function dispatch(CakeRequest $request, CakeResponse $response, $additionalParams = array()) {
- if ($this->asset($request->url, $response) || $this->cached($request->here)) {
+ if ($this->asset($request->url, $response) || $this->cached($request->here())) {
return;
}
@@ -203,7 +203,7 @@ protected function _loadRoutes() {
/**
* Outputs cached dispatch view cache
*
- * @param string $path Requested URL path
+ * @param string $path Requested URL path with any query string parameters
* @return string|boolean False if is not cached or output
*/
public function cached($path) {
@@ -313,7 +313,7 @@ protected function _deliverAsset(CakeResponse $response, $assetFile, $ext) {
$response->type($contentType);
}
if (!$compressionEnabled) {
- $response->header('Content-Length', filesize($assetFile));
+ $response->header('Content-Length', filesize($assetFile));
}
$response->cache(filemtime($assetFile));
$response->send();
View
22 lib/Cake/Test/Case/Cache/Engine/MemcacheEngineTest.php
@@ -169,11 +169,11 @@ public function testParseServerStringNonLatin() {
*
* @return void
*/
- function testParseServerStringUnix() {
- $Memcache =& new TestMemcacheEngine();
- $result = $Memcache->parseServerString('unix:///path/to/memcached.sock');
- $this->assertEquals($result, array('unix:///path/to/memcached.sock', 0));
- }
+ function testParseServerStringUnix() {
+ $Memcache =& new TestMemcacheEngine();
+ $result = $Memcache->parseServerString('unix:///path/to/memcached.sock');
+ $this->assertEquals($result, array('unix:///path/to/memcached.sock', 0));
+ }
/**
* testReadAndWriteCache method
@@ -311,14 +311,14 @@ public function testIncrement() {
*/
public function testConfigurationConflict() {
Cache::config('long_memcache', array(
- 'engine' => 'Memcache',
- 'duration' => '+2 seconds',
- 'servers' => array('127.0.0.1:11211'),
+ 'engine' => 'Memcache',
+ 'duration' => '+2 seconds',
+ 'servers' => array('127.0.0.1:11211'),
));
Cache::config('short_memcache', array(
- 'engine' => 'Memcache',
- 'duration' => '+1 seconds',
- 'servers' => array('127.0.0.1:11211'),
+ 'engine' => 'Memcache',
+ 'duration' => '+1 seconds',
+ 'servers' => array('127.0.0.1:11211'),
));
Cache::config('some_file', array('engine' => 'File'));
View
6 lib/Cake/Test/Case/Console/Command/AclShellTest.php
@@ -289,9 +289,9 @@ public function testGetPath() {
$first = $node[0]['Aro']['id'];
$second = $node[1]['Aro']['id'];
$last = $node[2]['Aro']['id'];
- $this->Task->expects($this->at(2))->method('out')->with('['.$last.'] ROOT');
- $this->Task->expects($this->at(3))->method('out')->with(' ['.$second.'] admins');
- $this->Task->expects($this->at(4))->method('out')->with(' ['.$first.'] Elrond');
+ $this->Task->expects($this->at(2))->method('out')->with('[' . $last . '] ROOT');
+ $this->Task->expects($this->at(3))->method('out')->with(' [' . $second . '] admins');
+ $this->Task->expects($this->at(4))->method('out')->with(' [' . $first . '] Elrond');
$this->Task->getPath();
}
View
8 lib/Cake/Test/Case/Console/Command/Task/ExtractTaskTest.php
@@ -329,10 +329,10 @@ public function testExtractModelValidationWithDomainInModel() {
$this->Task->execute();
$result = file_get_contents($this->path . DS . 'test_plugin.pot');
- $pattern = preg_quote('#Plugin' . DS. 'TestPlugin' . DS. 'Model' . DS. 'TestPluginPost.php:validation for field title#', '\\');
+ $pattern = preg_quote('#Plugin' . DS . 'TestPlugin' . DS . 'Model' . DS . 'TestPluginPost.php:validation for field title#', '\\');
$this->assertRegExp($pattern, $result);
- $pattern = preg_quote('#Plugin' . DS. 'TestPlugin' . DS. 'Model' . DS. 'TestPluginPost.php:validation for field body#', '\\');
+ $pattern = preg_quote('#Plugin' . DS . 'TestPlugin' . DS . 'Model' . DS . 'TestPluginPost.php:validation for field body#', '\\');
$this->assertRegExp($pattern, $result);
$pattern = '#msgid "Post title is required"#';
@@ -369,10 +369,10 @@ public function testExtractModelValidationInPlugin() {
$this->Task->execute();
$result = file_get_contents($this->path . DS . 'test_plugin.pot');
- $pattern = preg_quote('#Model' . DS. 'TestPluginPost.php:validation for field title#', '\\');
+ $pattern = preg_quote('#Model' . DS . 'TestPluginPost.php:validation for field title#', '\\');
$this->assertRegExp($pattern, $result);
- $pattern = preg_quote('#Model' . DS. 'TestPluginPost.php:validation for field body#', '\\');
+ $pattern = preg_quote('#Model' . DS . 'TestPluginPost.php:validation for field body#', '\\');
$this->assertRegExp($pattern, $result);
$pattern = '#msgid "Post title is required"#';
View
4 lib/Cake/Test/Case/Console/Command/Task/ModelTaskTest.php
@@ -948,7 +948,7 @@ public function testExecuteIntoAll() {
*
* @return void
*/
- public function testExecuteIntoAllOddTables() {
+ public function testExecuteIntoAllOddTables() {
$out = $this->getMock('ConsoleOutput', array(), array(), '', false);
$in = $this->getMock('ConsoleInput', array(), array(), '', false);
$this->Task = $this->getMock('ModelTask',
@@ -1003,7 +1003,7 @@ public function testExecuteIntoAllOddTables() {
*
* @return void
*/
- public function testExecuteIntoBakeOddTables() {
+ public function testExecuteIntoBakeOddTables() {
$out = $this->getMock('ConsoleOutput', array(), array(), '', false);
$in = $this->getMock('ConsoleInput', array(), array(), '', false);
$this->Task = $this->getMock('ModelTask',
View
2  lib/Cake/Test/Case/Console/Command/Task/ProjectTaskTest.php
@@ -301,7 +301,7 @@ public function testGetPrefixWithMultiplePrefixes() {
* @return void
*/
public function testExecute() {
- $this->Task->params['skel'] = CAKE . 'Console' . DS. 'Templates' . DS . 'skel';
+ $this->Task->params['skel'] = CAKE . 'Console' . DS . 'Templates' . DS . 'skel';
$this->Task->params['working'] = TMP . 'tests' . DS;
$path = $this->Task->path . 'bake_test_app';
View
4 lib/Cake/Test/Case/Console/ShellTest.php
@@ -380,8 +380,8 @@ public function testHr() {
$bar = '---------------------------------------------------------------';
$this->Shell->stdout->expects($this->at(0))->method('write')->with('', 0);
- $this->Shell->stdout->expects($this->at(1))->method('write')->with($bar, 1);
- $this->Shell->stdout->expects($this->at(2))->method('write')->with('', 0);
+ $this->Shell->stdout->expects($this->at(1))->method('write')->with($bar, 1);
+ $this->Shell->stdout->expects($this->at(2))->method('write')->with('', 0);
$this->Shell->stdout->expects($this->at(3))->method('write')->with("", true);
$this->Shell->stdout->expects($this->at(4))->method('write')->with($bar, 1);
View
31 lib/Cake/Test/Case/Controller/Component/AuthComponentTest.php
@@ -795,10 +795,11 @@ public function testLoginRedirect() {
//Ticket #4750
//named params
+ $this->Controller->request = $this->Auth->request;
$this->Auth->Session->delete('Auth');
$url = '/posts/index/year:2008/month:feb';
$this->Auth->request->addParams(Router::parse($url));
- $this->Auth->request->url = Router::normalize($url);
+ $this->Auth->request->url = $this->Auth->request->here = Router::normalize($url);
$this->Auth->initialize($this->Controller);
$this->Auth->loginAction = array('controller' => 'AuthTest', 'action' => 'login');
$this->Auth->startup($this->Controller);
@@ -809,24 +810,24 @@ public function testLoginRedirect() {
$this->Auth->Session->delete('Auth');
$url = '/posts/view/1';
$this->Auth->request->addParams(Router::parse($url));
- $this->Auth->request->url = Router::normalize($url);
+ $this->Auth->request->url = $this->Auth->request->here = Router::normalize($url);
$this->Auth->initialize($this->Controller);
$this->Auth->loginAction = array('controller' => 'AuthTest', 'action' => 'login');
$this->Auth->startup($this->Controller);
$expected = Router::normalize('posts/view/1');
$this->assertEquals($expected, $this->Auth->Session->read('Auth.redirect'));
- // QueryString parameters
+ // QueryString parameters
$_back = $_GET;
$_GET = array(
- 'url' => '/posts/index/29',
'print' => 'true',
'refer' => 'menu'
);
$this->Auth->Session->delete('Auth');
$url = '/posts/index/29';
- $this->Auth->request = $this->Controller->request = new CakeRequest($url);
$this->Auth->request->addParams(Router::parse($url));
+ $this->Auth->request->url = $this->Auth->request->here = Router::normalize($url);
+ $this->Auth->request->query = $_GET;
$this->Auth->initialize($this->Controller);
$this->Auth->loginAction = array('controller' => 'AuthTest', 'action' => 'login');
@@ -834,33 +835,15 @@ public function testLoginRedirect() {
$expected = Router::normalize('posts/index/29?print=true&refer=menu');
$this->assertEquals($expected, $this->Auth->Session->read('Auth.redirect'));
- $_GET = array(
- 'url' => '/posts/index/29',
- 'print' => 'true',
- 'refer' => 'menu'
- );
- $this->Auth->Session->delete('Auth');
- $url = '/posts/index/29';
- $this->Auth->request = $this->Controller->request = new CakeRequest($url);
- $this->Auth->request->addParams(Router::parse($url));
-
- $this->Auth->initialize($this->Controller);
- $this->Auth->loginAction = array('controller' => 'AuthTest', 'action' => 'login');
- $this->Auth->startup($this->Controller);
- $expected = Router::normalize('posts/index/29?print=true&refer=menu');
- $this->assertEquals($expected, $this->Auth->Session->read('Auth.redirect'));
$_GET = $_back;
//external authed action
$_SERVER['HTTP_REFERER'] = 'http://webmail.example.com/view/message';
- $_GET = array(
- 'url' => '/posts/edit/1'
- );
$this->Auth->Session->delete('Auth');
$url = '/posts/edit/1';
$this->Auth->request = $this->Controller->request = new CakeRequest($url);
$this->Auth->request->addParams(Router::parse($url));
- $this->Auth->request->url = Router::normalize($url);
+ $this->Auth->request->url = $this->Auth->request->here = Router::normalize($url);
$this->Auth->initialize($this->Controller);
$this->Auth->loginAction = array('controller' => 'AuthTest', 'action' => 'login');
$this->Auth->startup($this->Controller);
View
12 lib/Cake/Test/Case/Controller/ScaffoldTest.php
@@ -90,18 +90,18 @@ class TestScaffoldMock extends Scaffold {
*
* @param unknown_type $params
*/
- function _scaffold(CakeRequest $request) {
- $this->_params = $request;
- }
+ function _scaffold(CakeRequest $request) {
+ $this->_params = $request;
+ }
/**
* Get Params from the Controller.
*
* @return unknown
*/
- function getParams() {
- return $this->_params;
- }
+ function getParams() {
+ return $this->_params;
+ }
}
/**
View
10 lib/Cake/Test/Case/Core/AppTest.php
@@ -751,13 +751,13 @@ public function testLoadingVendor() {
$this->assertEquals($text, 'This is a file with dot in file name');
ob_start();
- $result = App::import('Vendor', 'TestHello', array('file' => 'Test'.DS.'hello.php'));
+ $result = App::import('Vendor', 'TestHello', array('file' => 'Test' . DS . 'hello.php'));
$text = ob_get_clean();
$this->assertTrue($result);
$this->assertEquals($text, 'This is the hello.php file in Test directory');
ob_start();
- $result = App::import('Vendor', 'MyTest', array('file' => 'Test'.DS.'MyTest.php'));
+ $result = App::import('Vendor', 'MyTest', array('file' => 'Test' . DS . 'MyTest.php'));
$text = ob_get_clean();
$this->assertTrue($result);
$this->assertEquals($text, 'This is the MyTest.php file');
@@ -824,13 +824,13 @@ public function testPaths() {
*
* @return void
*/
- public function testPluginLibClasses() {
- App::build(array(
+ public function testPluginLibClasses() {
+ App::build(array(
'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
), App::RESET);
CakePlugin::loadAll();
$this->assertFalse(class_exists('TestPluginOtherLibrary', false));
App::uses('TestPluginOtherLibrary', 'TestPlugin.Lib');
$this->assertTrue(class_exists('TestPluginOtherLibrary'));
- }
+ }
}
View
6 lib/Cake/Test/Case/Model/Behavior/ContainableBehaviorTest.php
@@ -3600,8 +3600,8 @@ public function testFindAllReturn() {
* @return void
*/
public function testLazyLoad() {
- // Local set up
- $this->User = ClassRegistry::init('User');
+ // Local set up
+ $this->User = ClassRegistry::init('User');
$this->User->bindModel(array(
'hasMany' => array('Article', 'ArticleFeatured', 'Comment')
), false);
@@ -3614,7 +3614,7 @@ public function testLazyLoad() {
} catch (Exception $e) {
$exceptions = true;
}
- $this->assertTrue(empty($exceptions));
+ $this->assertTrue(empty($exceptions));
}
/**
View
2  lib/Cake/Test/Case/Model/Behavior/TranslateBehaviorTest.php
@@ -766,7 +766,7 @@ public function testTranslateWithAssociations() {
'user' => 'mariano',
'password' => '5f4dcc3b5aa765d61d8327deb882cf99',
'created' => '2007-03-17 01:16:23',
- 'updated' => '2007-03-17 01:18:31'
+ 'updated' => '2007-03-17 01:18:31'
)
);
$this->assertEquals($expected, $result);
View
51 lib/Cake/Test/Case/Model/Behavior/TreeBehaviorNumberTest.php
@@ -174,6 +174,57 @@ public function testDetectNoneExistantParent() {
}
/**
+ * testRecoverUsingParentMode method
+ *
+ * @return void
+ */
+ public function testRecoverUsingParentMode() {
+ extract($this->settings);
+ $this->Tree = new $modelClass();
+ $this->Tree->Behaviors->disable('Tree');
+
+ $this->Tree->save(array('parent_id' => null, 'name' => 'Main', $parentField => null, $leftField => 0, $rightField => 0));
+ $node1 = $this->Tree->id;
+
+ $this->Tree->create();
+ $this->Tree->save(array('parent_id' => null, 'name' => 'About Us', $parentField => $node1, $leftField => 0, $rightField => 0));
+ $node11 = $this->Tree->id;
+ $this->Tree->create();
+ $this->Tree->save(array('parent_id' => null, 'name' => 'Programs', $parentField => $node1, $leftField => 0, $rightField => 0));
+ $node12 = $this->Tree->id;
+ $this->Tree->create();
+ $this->Tree->save(array('parent_id' => null, 'name' => 'Mission and History', $parentField => $node11, $leftField => 0, $rightField => 0));
+ $this->Tree->create();
+ $this->Tree->save(array('parent_id' => null, 'name' => 'Overview', $parentField => $node12, $leftField => 0, $rightField => 0));
+
+ $this->Tree->Behaviors->enable('Tree');
+
+ $result = $this->Tree->verify();
+ $this->assertNotSame($result, true);
+
+ $result = $this->Tree->recover();
+ $this->assertTrue($result);
+
+ $result = $this->Tree->verify();
+ $this->assertTrue($result);
+
+ $result = $this->Tree->find('first', array(
+ 'fields' => array('name', $parentField, $leftField, $rightField),
+ 'conditions' => array('name' => 'Main'),
+ 'recursive' => -1
+ ));
+ $expected = array(
+ $modelClass => array(
+ 'name' => 'Main',
+ $parentField => null,
+ $leftField => 1,
+ $rightField => 10
+ )
+ );
+ $this->assertEquals($expected, $result);
+ }
+
+/**
* testRecoverFromMissingParent method
*
* @return void
View
2  lib/Cake/Test/Case/Model/ConnectionManagerTest.php
@@ -277,7 +277,7 @@ public function testConnectionData() {
), App::RESET);
CakePlugin::loadAll();
$expected = array(
- 'datasource' => 'Test2Source'
+ 'datasource' => 'Test2Source'
);
ConnectionManager::create('connection1', array('datasource' => 'Test2Source'));
View
2  lib/Cake/Test/Case/Model/Datasource/Database/MysqlTest.php
@@ -3192,7 +3192,7 @@ public function testVirtualFieldsFetch() {
);
$conditions = array('comment_count >' => 2);
- $query = 'SELECT ' . join(',',$this->Dbo->fields($Article, null, array('id', 'comment_count'))) .
+ $query = 'SELECT ' . join(',', $this->Dbo->fields($Article, null, array('id', 'comment_count'))) .
' FROM ' . $this->Dbo->fullTableName($Article) . ' Article ' . $this->Dbo->conditions($conditions, true, true, $Article);
$result = $this->Dbo->fetchAll($query);
$expected = array(array(
View
8 lib/Cake/Test/Case/Model/Datasource/Database/PostgresTest.php
@@ -285,10 +285,10 @@ public function testFieldQuoting() {
$result = $this->Dbo->fields($this->model, null, array('*', 'PostgresClientTestModel.*'));
$expected = array_merge($fields, array(
'"PostgresClientTestModel"."id" AS "PostgresClientTestModel__id"',
- '"PostgresClientTestModel"."name" AS "PostgresClientTestModel__name"',
- '"PostgresClientTestModel"."email" AS "PostgresClientTestModel__email"',
- '"PostgresClientTestModel"."created" AS "PostgresClientTestModel__created"',
- '"PostgresClientTestModel"."updated" AS "PostgresClientTestModel__updated"'));
+ '"PostgresClientTestModel"."name" AS "PostgresClientTestModel__name"',
+ '"PostgresClientTestModel"."email" AS "PostgresClientTestModel__email"',
+ '"PostgresClientTestModel"."created" AS "PostgresClientTestModel__created"',
+ '"PostgresClientTestModel"."updated" AS "PostgresClientTestModel__updated"'));
$this->assertEquals($expected, $result);
}
View
2  lib/Cake/Test/Case/Model/DbAclTest.php
@@ -355,7 +355,7 @@ public function testNodeAliasParenting() {
$result = $Aco->find('all');
$expected = array(
array('DbAcoTest' => array('id' => '1', 'parent_id' => null, 'model' => null, 'foreign_key' => null, 'alias' => 'Application', 'lft' => '1', 'rght' => '4'), 'DbAroTest' => array()),
- array('DbAcoTest' => array('id' => '2', 'parent_id' => '1', 'model' => null, 'foreign_key' => null, 'alias' => 'Pages', 'lft' => '2', 'rght' => '3', ), 'DbAroTest' => array())
+ array('DbAcoTest' => array('id' => '2', 'parent_id' => '1', 'model' => null, 'foreign_key' => null, 'alias' => 'Pages', 'lft' => '2', 'rght' => '3'), 'DbAroTest' => array())
);
$this->assertEquals($expected, $result);
}
View
14 lib/Cake/Test/Case/Model/ModelDeleteTest.php
@@ -767,7 +767,7 @@ public function testDeleteHabtmPostgresFailure() {
)), true);
// Article 1 should have Tag.1 and Tag.2
- $before = $Article->find("all", array(
+ $before = $Article->find("all", array(
"conditions" => array("Article.id" => 1),
));
$this->assertEquals(count($before[0]['Tag']), 2, 'Tag count for Article.id = 1 is incorrect, should be 2 %s');
@@ -781,17 +781,17 @@ public function testDeleteHabtmPostgresFailure() {
);
$Tag->save($submitted_data);
- // One more submission (The other way around) to make sure the reverse save looks good.
- $submitted_data = array(
+ // One more submission (The other way around) to make sure the reverse save looks good.
+ $submitted_data = array(
"Article" => array("id" => 2, 'title' => 'second article'),
"Tag" => array(
"Tag" => array(2, 3)
)
);
- // ERROR:
- // Postgresql: DELETE FROM "articles_tags" WHERE tag_id IN ('1', '3')
- // MySQL: DELETE `ArticlesTag` FROM `articles_tags` AS `ArticlesTag` WHERE `ArticlesTag`.`article_id` = 2 AND `ArticlesTag`.`tag_id` IN (1, 3)
- $Article->save($submitted_data);
+ // ERROR:
+ // Postgresql: DELETE FROM "articles_tags" WHERE tag_id IN ('1', '3')
+ // MySQL: DELETE `ArticlesTag` FROM `articles_tags` AS `ArticlesTag` WHERE `ArticlesTag`.`article_id` = 2 AND `ArticlesTag`.`tag_id` IN (1, 3)
+ $Article->save($submitted_data);
// Want to make sure Article #1 has Tag #1 and Tag #2 still.
$after = $Article->find("all", array(
View
27 lib/Cake/Test/Case/Model/ModelIntegrationTest.php
@@ -255,7 +255,7 @@ function testFindWithJoinsOption() {
array(
'table' => 'articles',
'alias' => 'Article',
- 'type' => 'LEFT',
+ 'type' => 'LEFT',
'conditions' => array(
'User.id = Article.user_id',
),
@@ -2174,7 +2174,6 @@ public function testCreation() {
/**
* testEscapeField to prove it escapes the field well even when it has part of the alias on it
- * @see ttp://cakephp.lighthouseapp.com/projects/42648-cakephp-1x/tickets/473-escapefield-doesnt-consistently-prepend-modelname
*
* @return void
*/
@@ -2205,6 +2204,30 @@ public function testEscapeField() {
}
/**
+ * testGetID
+ *
+ * @return void
+ */
+ public function testGetID() {
+ $TestModel = new Test();
+
+ $result = $TestModel->getID();
+ $this->assertFalse($result);
+
+ $TestModel->id = 9;
+ $result = $TestModel->getID();
+ $this->assertEquals(9, $result);
+
+ $TestModel->id = array(10, 9, 8, 7);
+ $result = $TestModel->getID(2);
+ $this->assertEquals(8, $result);
+
+ $TestModel->id = array(array(), 1, 2, 3);
+ $result = $TestModel->getID();
+ $this->assertFalse($result);
+ }
+
+/**
* test that model->hasMethod checks self and behaviors.
*
* @return void
View
2  lib/Cake/Test/Case/Model/ModelReadTest.php
@@ -7651,7 +7651,7 @@ public function testVirtualFieldAsAString() {
$this->loadFixtures('Post', 'Author');
$Post = new Post();
$Post->virtualFields = array(
- 'writer' => 'Author.user'
+ 'writer' => 'Author.user'
);
$result = $Post->find('first');
$this->assertTrue(isset($result['Post']['writer']), 'virtual field not fetched %s');
View
22 lib/Cake/Test/Case/Model/ModelWriteTest.php
@@ -3780,7 +3780,7 @@ public function testSaveAllValidateFirstAtomicFalse() {
),
array(
'body' => 3,
- 'published' => 'sd',
+ 'published' => 'sd',
),
);
$Something->create();
@@ -5320,7 +5320,7 @@ public function testFindAllForeignKey() {
$expected = array(
'0' => array(
'ProductUpdateAll' => array(
- 'id' => 1,
+ 'id' => 1,
'name' => 'product one',
'groupcode' => 120,
'group_id' => 1),
@@ -5331,7 +5331,7 @@ public function testFindAllForeignKey() {
),
'1' => array(
'ProductUpdateAll' => array(
- 'id' => 2,
+ 'id' => 2,
'name' => 'product two',
'groupcode' => 120,
'group_id' => 1),
@@ -5384,7 +5384,7 @@ public function testUpdateAllWithJoins() {
$expected = array(
'0' => array(
'ProductUpdateAll' => array(
- 'id' => 1,
+ 'id' => 1,
'name' => 'new product',
'groupcode' => 120,
'group_id' => 1),
@@ -5395,7 +5395,7 @@ public function testUpdateAllWithJoins() {
),
'1' => array(
'ProductUpdateAll' => array(
- 'id' => 2,
+ 'id' => 2,
'name' => 'new product',
'groupcode' => 120,
'group_id' => 1),
@@ -5412,7 +5412,7 @@ public function testUpdateAllWithJoins() {
*
* @return void
*/
- function testUpdateAllWithoutForeignKey() {
+ public function testUpdateAllWithoutForeignKey() {
$this->skipIf(!$this->db instanceof Mysql, 'Currently, there is no way of doing joins in an update statement in postgresql');
$this->loadFixtures('ProductUpdateAll', 'GroupUpdateAll');
@@ -5420,12 +5420,12 @@ function testUpdateAllWithoutForeignKey() {
$conditions = array('Group.name' => 'group one');
- $ProductUpdateAll->bindModel(array('belongsTo' => array(
+ $ProductUpdateAll->bindModel(array('belongsTo' => array(
'Group' => array('className' => 'GroupUpdateAll')
)));
- $ProductUpdateAll->belongsTo = array(
- 'Group' => array(
+ $ProductUpdateAll->belongsTo = array(
+ 'Group' => array(
'className' => 'GroupUpdateAll',
'foreignKey' => false,
'conditions' => 'ProductUpdateAll.groupcode = Group.code'
@@ -5437,7 +5437,7 @@ function testUpdateAllWithoutForeignKey() {
$expected = array(
'0' => array(
'ProductUpdateAll' => array(
- 'id' => 1,
+ 'id' => 1,
'name' => 'new product',
'groupcode' => 120,
'group_id' => 1),
@@ -5448,7 +5448,7 @@ function testUpdateAllWithoutForeignKey() {
),
'1' => array(
'ProductUpdateAll' => array(
- 'id' => 2,
+ 'id' => 2,
'name' => 'new product',
'groupcode' => 120,
'group_id' => 1),
View
10 lib/Cake/Test/Case/Model/models.php
@@ -2504,7 +2504,7 @@ class UnconventionalTree extends NumberTree {
public $actsAs = array(
'Tree' => array(
'parent' => 'join',
- 'left' => 'left',
+ 'left' => 'left',
'right' => 'right'
)
);
@@ -3131,7 +3131,7 @@ class CounterCachePost extends CakeTestModel {
class CounterCacheUserNonstandardPrimaryKey extends CakeTestModel {
public $name = 'CounterCacheUserNonstandardPrimaryKey';
public $alias = 'User';
- public $primaryKey = 'uid';
+ public $primaryKey = 'uid';
public $hasMany = array('Post' => array(
'className' => 'CounterCachePostNonstandardPrimaryKey',
@@ -3142,7 +3142,7 @@ class CounterCacheUserNonstandardPrimaryKey extends CakeTestModel {
class CounterCachePostNonstandardPrimaryKey extends CakeTestModel {
public $name = 'CounterCachePostNonstandardPrimaryKey';
public $alias = 'Post';
- public $primaryKey = 'pid';
+ public $primaryKey = 'pid';
public $belongsTo = array('User' => array(
'className' => 'CounterCacheUserNonstandardPrimaryKey',
@@ -4491,8 +4491,8 @@ public function schema($field = false) {
class PrefixTestModel extends CakeTestModel {
}
class PrefixTestUseTableModel extends CakeTestModel {
- public $name = 'PrefixTest';
- public $useTable = 'prefix_tests';
+ public $name = 'PrefixTest';
+ public $useTable = 'prefix_tests';
}
/**
View
28 lib/Cake/Test/Case/Network/Email/CakeEmailTest.php
@@ -301,11 +301,11 @@ public function testFormatAddressJapanese() {
$result = $this->CakeEmail->formatAddress(array('cake@cakephp.org' => '寿限無寿限無五劫の擦り切れ海砂利水魚の水行末雲来末風来末食う寝る処に住む処やぶら小路の藪柑子パイポパイポパイポのシューリンガンシューリンガンのグーリンダイグーリンダイのポンポコピーのポンポコナーの長久命の長助'));
$expected = array("=?ISO-2022-JP?B?GyRCPHc4Qkw1PHc4Qkw1OF45ZSROOyQkakBaJGwzJDo9TXg/ZTV7GyhC?=\r\n"
- ." =?ISO-2022-JP?B?GyRCJE4/ZTlUS3YxQE1oS3ZJd01oS3Y/KSQmPzIkaz1oJEs9OyRgGyhC?=\r\n"
- ." =?ISO-2022-JP?B?GyRCPWgkZCRWJGk+Lk8pJE5pLjQ7O1IlUSUkJV0lUSUkJV0lUSUkGyhC?=\r\n"
- ." =?ISO-2022-JP?B?GyRCJV0kTiU3JWUhPCVqJXMlLCVzJTclZSE8JWolcyUsJXMkTiUwGyhC?=\r\n"
- ." =?ISO-2022-JP?B?GyRCITwlaiVzJUAlJCUwITwlaiVzJUAlJCROJV0lcyVdJTMlVCE8GyhC?=\r\n"
- ." =?ISO-2022-JP?B?GyRCJE4lXSVzJV0lMyVKITwkTkQ5NVdMPyRORDk9dRsoQg==?= <cake@cakephp.org>");
+ ." =?ISO-2022-JP?B?GyRCJE4/ZTlUS3YxQE1oS3ZJd01oS3Y/KSQmPzIkaz1oJEs9OyRgGyhC?=\r\n"
+ ." =?ISO-2022-JP?B?GyRCPWgkZCRWJGk+Lk8pJE5pLjQ7O1IlUSUkJV0lUSUkJV0lUSUkGyhC?=\r\n"
+ ." =?ISO-2022-JP?B?GyRCJV0kTiU3JWUhPCVqJXMlLCVzJTclZSE8JWolcyUsJXMkTiUwGyhC?=\r\n"
+ ." =?ISO-2022-JP?B?GyRCITwlaiVzJUAlJCUwITwlaiVzJUAlJCROJV0lcyVdJTMlVCE8GyhC?=\r\n"
+ ." =?ISO-2022-JP?B?GyRCJE4lXSVzJV0lMyVKITwkTkQ5NVdMPyRORDk9dRsoQg==?= <cake@cakephp.org>");
$this->assertSame($expected, $result);
}
@@ -402,19 +402,19 @@ public function testSubject() {
*/
public function testSubjectJapanese() {
$this->skipIf(!function_exists('mb_convert_encoding'));
- mb_internal_encoding('UTF-8');
+ mb_internal_encoding('UTF-8');
- $this->CakeEmail->headerCharset = 'ISO-2022-JP';
+ $this->CakeEmail->headerCharset = 'ISO-2022-JP';
$this->CakeEmail->subject('日本語のSubjectにも対応するよ');
- $expected = '=?ISO-2022-JP?B?GyRCRnxLXDhsJE4bKEJTdWJqZWN0GyRCJEskYkJQMX4kOSRrJGgbKEI=?=';
+ $expected = '=?ISO-2022-JP?B?GyRCRnxLXDhsJE4bKEJTdWJqZWN0GyRCJEskYkJQMX4kOSRrJGgbKEI=?=';
$this->assertSame($this->CakeEmail->subject(), $expected);
$this->CakeEmail->subject('長い長い長いSubjectの場合はfoldingするのが正しいんだけどいったいどうなるんだろう?');
- $expected = "=?ISO-2022-JP?B?GyRCRDkkJEQ5JCREOSQkGyhCU3ViamVjdBskQiROPmw5ZyRPGyhCZm9s?=\r\n"
- ." =?ISO-2022-JP?B?ZGluZxskQiQ5JGskTiQsQDUkNyQkJHMkQCQxJEkkJCRDJD8kJCRJGyhC?=\r\n"
- ." =?ISO-2022-JP?B?GyRCJCYkSiRrJHMkQCRtJCYhKRsoQg==?=";
+ $expected = "=?ISO-2022-JP?B?GyRCRDkkJEQ5JCREOSQkGyhCU3ViamVjdBskQiROPmw5ZyRPGyhCZm9s?=\r\n"
+ ." =?ISO-2022-JP?B?ZGluZxskQiQ5JGskTiQsQDUkNyQkJHMkQCQxJEkkJCRDJD8kJCRJGyhC?=\r\n"
+ ." =?ISO-2022-JP?B?GyRCJCYkSiRrJHMkQCRtJCYhKRsoQg==?=";
$this->assertSame($this->CakeEmail->subject(), $expected);
- }
+ }
/**
@@ -1355,8 +1355,8 @@ public function testEncode() {
$this->CakeEmail->headerCharset = 'ISO-2022-JP';
$result = $this->CakeEmail->encode('長い長い長いSubjectの場合はfoldingするのが正しいんだけどいったいどうなるんだろう?');
$expected = "=?ISO-2022-JP?B?GyRCRDkkJEQ5JCREOSQkGyhCU3ViamVjdBskQiROPmw5ZyRPGyhCZm9s?=\r\n"
- . " =?ISO-2022-JP?B?ZGluZxskQiQ5JGskTiQsQDUkNyQkJHMkQCQxJEkkJCRDJD8kJCRJGyhC?=\r\n"
- . " =?ISO-2022-JP?B?GyRCJCYkSiRrJHMkQCRtJCYhKRsoQg==?=";
+ . " =?ISO-2022-JP?B?ZGluZxskQiQ5JGskTiQsQDUkNyQkJHMkQCQxJEkkJCRDJD8kJCRJGyhC?=\r\n"
+ . " =?ISO-2022-JP?B?GyRCJCYkSiRrJHMkQCRtJCYhKRsoQg==?=";
$this->assertSame($expected, $result);
}
}
View
6 lib/Cake/Test/Case/Routing/DispatcherTest.php
@@ -1360,6 +1360,7 @@ public function testAssetFilterForThemeAndPlugins() {
* - Test simple views
* - Test views with nocache tags
* - Test requests with named + passed params.
+ * - Test requests with query string params
* - Test themed views.
*
* @return array
@@ -1373,6 +1374,7 @@ public static function cacheActionProvider() {
array('TestCachedPages/test_nocache_tags'),
array('test_cached_pages/view/param/param'),
array('test_cached_pages/view/foo:bar/value:goo'),
+ array('test_cached_pages/view?q=cakephp'),
array('test_cached_pages/themed'),
);
}
@@ -1405,7 +1407,7 @@ public function testFullPageCachingDispatch($url) {
$out = ob_get_clean();
ob_start();
- $dispatcher->cached($request->here);
+ $dispatcher->cached($request->here());
$cached = ob_get_clean();
$result = str_replace(array("\t", "\r\n", "\n"), "", $out);
@@ -1414,7 +1416,7 @@ public function testFullPageCachingDispatch($url) {
$this->assertEquals($expected, $result);
- $filename = $this->__cachePath($request->here);
+ $filename = $this->__cachePath($request->here());
unlink($filename);
}
View
12 lib/Cake/Test/Case/Utility/DebuggerTest.php
@@ -140,8 +140,8 @@ public function testOutput() {
'a' => array(
'href' => "javascript:void(0);",
'onclick' => "preg:/document\.getElementById\('cakeErr[a-z0-9]+\-trace'\)\.style\.display = " .
- "\(document\.getElementById\('cakeErr[a-z0-9]+\-trace'\)\.style\.display == 'none'" .
- " \? '' \: 'none'\);/"
+ "\(document\.getElementById\('cakeErr[a-z0-9]+\-trace'\)\.style\.display == 'none'" .
+ " \? '' \: 'none'\);/"
),
'b' => array(), 'Notice', '/b', ' (8)',
));
@@ -162,14 +162,14 @@ public function testChangeOutputFormats() {
Debugger::output('js', array(
'traceLine' => '{:reference} - <a href="txmt://open?url=file://{:file}' .
- '&line={:line}">{:path}</a>, line {:line}'
+ '&line={:line}">{:path}</a>, line {:line}'
));
$result = Debugger::trace();
$this->assertRegExp('/' . preg_quote('txmt://open?url=file://', '/') . '(\/|[A-Z]:\\\\)' . '/', $result);
Debugger::output('xml', array(
'error' => '<error><code>{:code}</code><file>{:file}</file><line>{:line}</line>' .
- '{:description}</error>',
+ '{:description}</error>',
'context' => "<context>{:context}</context>",
'trace' => "<stack>{:trace}</stack>",
));
@@ -221,7 +221,7 @@ public function testAddFormat() {
Debugger::addFormat('js', array(
'traceLine' => '{:reference} - <a href="txmt://open?url=file://{:file}' .
- '&line={:line}">{:path}</a>, line {:line}'
+ '&line={:line}">{:path}</a>, line {:line}'
));
Debugger::outputAs('js');
@@ -230,7 +230,7 @@ public function testAddFormat() {
Debugger::addFormat('xml', array(
'error' => '<error><code>{:code}</code><file>{:file}</file><line>{:line}</line>' .
- '{:description}</error>',
+ '{:description}</error>',
));
Debugger::outputAs('xml');
View
4 lib/Cake/Test/Case/Utility/FileTest.php
@@ -230,7 +230,7 @@ public function testClose() {
* @return void
*/
public function testCreate() {
- $tmpFile = TMP.'tests'.DS.'cakephp.file.test.tmp';
+ $tmpFile = TMP.'tests' . DS . 'cakephp.file.test.tmp';
$File = new File($tmpFile, true, 0777);
$this->assertTrue($File->exists());
}
@@ -391,7 +391,7 @@ public function testAppend() {
$r = $TmpFile->append($fragment);
$this->assertTrue($r);
$this->assertTrue(file_exists($tmpFile));
- $data = $data.$fragment;
+ $data = $data . $fragment;
$this->assertEquals($data, file_get_contents($tmpFile));
$TmpFile->close();
}
View
1  lib/Cake/Test/Case/Utility/FolderTest.php
@@ -431,7 +431,6 @@ public function testFolderTreeWithHiddenFiles() {
),
array(
$Folder->path . DS . 'not_hidden.txt',
- $Folder->path . DS . '.svn' . DS . 'InHiddenFolder.php',
),
);
View
4 lib/Cake/Test/Case/Utility/InflectorTest.php
@@ -230,7 +230,7 @@ public function testInflectorSlug() {
* @return void
*/
public function testInflectorSlugWithMap() {
- Inflector::rules('transliteration', array('/r/' => '1'));
+ Inflector::rules('transliteration', array('/r/' => '1'));
$result = Inflector::slug('replace every r');
$expected = '1eplace_eve1y_1';
$this->assertEquals($expected, $result);
@@ -246,7 +246,7 @@ public function testInflectorSlugWithMap() {
* @return void
*/
public function testInflectorSlugWithMapOverridingDefault() {
- Inflector::rules('transliteration', array('/å/' => 'aa', '/ø/' => 'oe'));
+ Inflector::rules('transliteration', array('/å/' => 'aa', '/ø/' => 'oe'));
$result = Inflector::slug('Testing æ ø å', '-');
$expected = 'Testing-ae-oe-aa';
$this->assertEquals($expected, $result);
View
86 lib/Cake/Test/Case/Utility/SetTest.php
@@ -2815,26 +2815,26 @@ public function testXmlSetReverse() {
$string = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<rss version="2.0">
- <channel>
- <title>Cake PHP Google Group</title>
- <link>http://groups.google.com/group/cake-php</link>
- <description>Search this group before posting anything. There are over 20,000 posts and it&amp;#39;s very likely your question was answered before. Visit the IRC channel #cakephp at irc.freenode.net for live chat with users and developers of Cake. If you post, tell us the version of Cake, PHP, and database.</description>
- <language>en</language>
- <item>
- <title>constructng result array when using findall</title>
- <link>http://groups.google.com/group/cake-php/msg/49bc00f3bc651b4f</link>
- <description>i&#39;m using cakephp to construct a logical data model array that will be &lt;br&gt; passed to a flex app. I have the following model association: &lt;br&gt; ServiceDay-&amp;gt;(hasMany)ServiceTi me-&amp;gt;(hasMany)ServiceTimePrice. So what &lt;br&gt; the current output from my findall is something like this example: &lt;br&gt; &lt;p&gt;Array( &lt;br&gt; [0] =&amp;gt; Array(</description>
- <guid isPermaLink="true">http://groups.google.com/group/cake-php/msg/49bc00f3bc651b4f</guid>
- <author>bmil...@gmail.com(bpscrugs)</author>
- <pubDate>Fri, 28 Dec 2007 00:44:14 UT</pubDate>
- </item>
- <item>
- <title>Re: share views between actions?</title>
- <link>http://groups.google.com/group/cake-php/msg/8b350d898707dad8</link>
- <description>Then perhaps you might do us all a favour and refrain from replying to &lt;br&gt; things you do not understand. That goes especially for asinine comments. &lt;br&gt; Indeed. &lt;br&gt; To sum up: &lt;br&gt; No comment. &lt;br&gt; In my day, a simple &amp;quot;RTFM&amp;quot; would suffice. I&#39;ll keep in mind to ignore any &lt;br&gt; further responses from you. &lt;br&gt; You (and I) were referring to the *online documentation*, not other</description>
- <guid isPermaLink="true">http://groups.google.com/group/cake-php/msg/8b350d898707dad8</guid>
- <author>subtropolis.z...@gmail.com(subtropolis zijn)</author>
- <pubDate>Fri, 28 Dec 2007 00:45:01 UT</pubDate>
+ <channel>
+ <title>Cake PHP Google Group</title>
+ <link>http://groups.google.com/group/cake-php</link>
+ <description>Search this group before posting anything. There are over 20,000 posts and it&amp;#39;s very likely your question was answered before. Visit the IRC channel #cakephp at irc.freenode.net for live chat with users and developers of Cake. If you post, tell us the version of Cake, PHP, and database.</description>