Skip to content
This repository
Browse code

Merge remote branch 'origin/1.3' into 1.3

  • Loading branch information...
commit 7d81d81176b1bbd882812eedaefc5468315ffb16 2 parents 7334fdf + e6664f0
Graham Weldon authored March 09, 2010

Showing 34 changed files with 423 additions and 226 deletions. Show diff stats Hide diff stats

  1. 8  cake/console/libs/bake.php
  2. 60  cake/console/libs/tasks/bake.php
  3. 20  cake/console/libs/tasks/controller.php
  4. 40  cake/console/libs/tasks/fixture.php
  5. 29  cake/console/libs/tasks/model.php
  6. 6  cake/console/libs/tasks/project.php
  7. 23  cake/console/libs/tasks/test.php
  8. 20  cake/console/libs/tasks/view.php
  9. 3  cake/console/templates/default/views/form.ctp
  10. 2  cake/dispatcher.php
  11. 4  cake/libs/cache.php
  12. 2  cake/libs/controller/controller.php
  13. 2  cake/libs/model/connection_manager.php
  14. 13  cake/libs/model/datasources/dbo_source.php
  15. 101  cake/libs/model/model.php
  16. 77  cake/libs/view/helpers/form.php
  17. 11  cake/libs/view/helpers/jquery_engine.php
  18. 8  cake/libs/view/helpers/mootools_engine.php
  19. 10  cake/libs/view/helpers/prototype_engine.php
  20. 58  cake/tests/cases/console/libs/tasks/controller.test.php
  21. 32  cake/tests/cases/console/libs/tasks/fixture.test.php
  22. 34  cake/tests/cases/console/libs/tasks/model.test.php
  23. 1  cake/tests/cases/console/libs/tasks/test.test.php
  24. 21  cake/tests/cases/console/libs/tasks/view.test.php
  25. 2  cake/tests/cases/dispatcher.test.php
  26. 8  cake/tests/cases/libs/debugger.test.php
  27. 2  cake/tests/cases/libs/model/connection_manager.test.php
  28. 27  cake/tests/cases/libs/model/datasources/dbo/dbo_postgres.test.php
  29. 10  cake/tests/cases/libs/model/model_behavior.test.php
  30. 2  cake/tests/cases/libs/router.test.php
  31. 2  cake/tests/cases/libs/security.test.php
  32. 7  cake/tests/cases/libs/view/helpers/form.test.php
  33. 2  cake/tests/cases/libs/xml.test.php
  34. 2  cake/tests/lib/code_coverage_manager.php
8  cake/console/libs/bake.php
@@ -48,10 +48,6 @@ function loadTasks() {
48 48
 		parent::loadTasks();
49 49
 		$task = Inflector::classify($this->command);
50 50
 		if (isset($this->{$task}) && !in_array($task, array('Project', 'DbConfig'))) {
51  
-			if (empty($this->{$task}->path)) {
52  
-				$path = Inflector::underscore(Inflector::pluralize($this->command));
53  
-				$this->{$task}->path = $this->params['working'] . DS . $path . DS;
54  
-			}
55 51
 			if (isset($this->params['connection'])) {
56 52
 				$this->{$task}->connection = $this->params['connection'];
57 53
 			}
@@ -64,10 +60,6 @@ function loadTasks() {
64 60
 			if (isset($this->params['plugin'])) {
65 61
 				$this->{$task}->plugin = $this->params['plugin'];
66 62
 			}
67  
-			if (!is_dir($this->{$task}->path)) {
68  
-				$this->err(sprintf(__("%s directory could not be found.\nBe sure you have created %s", true), $task, $this->{$task}->path));
69  
-				$this->_stop();
70  
-			}
71 63
 		}
72 64
 	}
73 65
 
60  cake/console/libs/tasks/bake.php
... ...
@@ -0,0 +1,60 @@
  1
+<?php
  2
+/**
  3
+ * Base class for Bake Tasks.
  4
+ *
  5
+ * PHP versions 4 and 5
  6
+ *
  7
+ * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
  8
+ * Copyright 2005-2010, Cake Software Foundation, Inc.
  9
+ *
  10
+ * Licensed under The MIT License
  11
+ * Redistributions of files must retain the above copyright notice.
  12
+ *
  13
+ * @copyright     Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
  14
+ * @link          http://cakephp.org CakePHP(tm) Project
  15
+ * @package       cake
  16
+ * @subpackage    cake.cake.console.libs.tasks
  17
+ * @since         CakePHP(tm) v 1.3
  18
+ * @license       MIT License (http://www.opensource.org/licenses/mit-license.php)
  19
+ */
  20
+class BakeTask extends Shell {
  21
+
  22
+/**
  23
+ * Name of plugin
  24
+ *
  25
+ * @var string
  26
+ * @access public
  27
+ */
  28
+	var $plugin = null;
  29
+
  30
+/**
  31
+ * The db connection being used for baking
  32
+ *
  33
+ * @var string
  34
+ * @access public
  35
+ */
  36
+	var $connection = null;
  37
+
  38
+/**
  39
+ * Flag for interactive mode
  40
+ *
  41
+ * @var boolean
  42
+ */
  43
+	var $interactive = false;
  44
+
  45
+/**
  46
+ * Gets the path for output.  Checks the plugin property
  47
+ * and returns the correct path.
  48
+ *
  49
+ * @return string Path to output.
  50
+ * @access public
  51
+ */
  52
+	function getPath() {
  53
+		$path = $this->path;
  54
+		if (isset($this->plugin)) {
  55
+			$name = substr($this->name, 0, strlen($this->name) - 4);
  56
+			$path = $this->_pluginPath($this->plugin) . Inflector::pluralize(Inflector::underscore($name)) . DS;
  57
+		}
  58
+		return $path;
  59
+	}
  60
+}
20  cake/console/libs/tasks/controller.php
@@ -18,21 +18,15 @@
18 18
  * @license       MIT License (http://www.opensource.org/licenses/mit-license.php)
19 19
  */
20 20
 
  21
+include_once dirname(__FILE__) . DS . 'bake.php';
  22
+
21 23
 /**
22 24
  * Task class for creating and updating controller files.
23 25
  *
24 26
  * @package       cake
25 27
  * @subpackage    cake.cake.console.libs.tasks
26 28
  */
27  
-class ControllerTask extends Shell {
28  
-
29  
-/**
30  
- * Name of plugin
31  
- *
32  
- * @var string
33  
- * @access public
34  
- */
35  
-	var $plugin = null;
  29
+class ControllerTask extends BakeTask {
36 30
 
37 31
 /**
38 32
  * Tasks to be loaded by this Task
@@ -76,7 +70,7 @@ function execute() {
76 70
 				return $this->all();
77 71
 			}
78 72
 
79  
-			$controller = Inflector::camelize($this->args[0]);
  73
+			$controller = $this->_controllerName($this->args[0]);
80 74
 			$actions = 'scaffold';
81 75
 
82 76
 			if (!empty($this->args[1]) && ($this->args[1] == 'public' || $this->args[1] == 'scaffold')) {
@@ -318,10 +312,7 @@ function bake($controllerName, $actions = '', $helpers = null, $components = nul
318 312
 		$this->Template->set(compact('controllerName', 'actions', 'helpers', 'components', 'isScaffold'));
319 313
 		$contents = $this->Template->generate('classes', 'controller');
320 314
 
321  
-		$path = $this->path;
322  
-		if (isset($this->plugin)) {
323  
-			$path = $this->_pluginPath($this->plugin) . 'controllers' . DS;
324  
-		}
  315
+		$path = $this->getPath();
325 316
 		$filename = $path . $this->_controllerPath($controllerName) . '_controller.php';
326 317
 		if ($this->createFile($filename, $contents)) {
327 318
 			return $contents;
@@ -339,6 +330,7 @@ function bake($controllerName, $actions = '', $helpers = null, $components = nul
339 330
 	function bakeTest($className) {
340 331
 		$this->Test->plugin = $this->plugin;
341 332
 		$this->Test->connection = $this->connection;
  333
+		$this->Test->interactive = $this->interactive;
342 334
 		return $this->Test->bake('Controller', $className);
343 335
 	}
344 336
 
40  cake/console/libs/tasks/fixture.php
@@ -17,22 +17,14 @@
17 17
  * @since         CakePHP(tm) v 1.3
18 18
  * @license       MIT License (http://www.opensource.org/licenses/mit-license.php)
19 19
  */
20  
-
  20
+include_once dirname(__FILE__) . DS . 'bake.php';
21 21
 /**
22 22
  * Task class for creating and updating fixtures files.
23 23
  *
24 24
  * @package       cake
25 25
  * @subpackage    cake.cake.console.libs.tasks
26 26
  */
27  
-class FixtureTask extends Shell {
28  
-
29  
-/**
30  
- * Name of plugin
31  
- *
32  
- * @var string
33  
- * @access public
34  
- */
35  
-	var $plugin = null;
  27
+class FixtureTask extends BakeTask {
36 28
 
37 29
 /**
38 30
  * Tasks to be loaded by this Task
@@ -51,14 +43,6 @@ class FixtureTask extends Shell {
51 43
 	var $path = null;
52 44
 
53 45
 /**
54  
- * The db connection being used for baking
55  
- *
56  
- * @var string
57  
- * @access public
58  
- */
59  
-	var $connection = null;
60  
-
61  
-/**
62 46
  * Schema instance
63 47
  *
64 48
  * @var object
@@ -95,7 +79,7 @@ function execute() {
95 79
 			if (strtolower($this->args[0]) == 'all') {
96 80
 				return $this->all();
97 81
 			}
98  
-			$model = Inflector::camelize($this->args[0]);
  82
+			$model = $this->_modelName($this->args[0]);
99 83
 			$this->bake($model);
100 84
 		}
101 85
 	}
@@ -238,10 +222,7 @@ function generateFixtureFile($model, $otherVars) {
238 222
 		$defaults = array('table' => null, 'schema' => null, 'records' => null, 'import' => null, 'fields' => null);
239 223
 		$vars = array_merge($defaults, $otherVars);
240 224
 
241  
-		$path = $this->path;
242  
-		if (isset($this->plugin)) {
243  
-			$path = $this->_pluginPath($this->plugin) . 'tests' . DS . 'fixtures' . DS;
244  
-		}
  225
+		$path = $this->getPath();
245 226
 		$filename = Inflector::underscore($model) . '_fixture.php';
246 227
 
247 228
 		$this->Template->set('model', $model);
@@ -254,6 +235,19 @@ function generateFixtureFile($model, $otherVars) {
254 235
 	}
255 236
 
256 237
 /**
  238
+ * Get the path to the fixtures.
  239
+ *
  240
+ * @return void
  241
+ */
  242
+	function getPath() {
  243
+		$path = $this->path;
  244
+		if (isset($this->plugin)) {
  245
+			$path = $this->_pluginPath($this->plugin) . 'tests' . DS . 'fixtures' . DS;
  246
+		}
  247
+		return $path;
  248
+	}
  249
+
  250
+/**
257 251
  * Generates a string representation of a schema.
258 252
  *
259 253
  * @param array $table Table schema array
29  cake/console/libs/tasks/model.php
@@ -18,29 +18,15 @@
18 18
  * @license       MIT License (http://www.opensource.org/licenses/mit-license.php)
19 19
  */
20 20
 
  21
+include_once dirname(__FILE__) . DS . 'bake.php';
  22
+
21 23
 /**
22 24
  * Task class for creating and updating model files.
23 25
  *
24 26
  * @package       cake
25 27
  * @subpackage    cake.cake.console.libs.tasks
26 28
  */
27  
-class ModelTask extends Shell {
28  
-
29  
-/**
30  
- * Name of plugin
31  
- *
32  
- * @var string
33  
- * @access public
34  
- */
35  
-	var $plugin = null;
36  
-
37  
-/**
38  
- * Name of the db connection used.
39  
- *
40  
- * @var string
41  
- * @access public
42  
- */
43  
-	var $connection = null;
  29
+class ModelTask extends BakeTask {
44 30
 
45 31
 /**
46 32
  * path to MODELS directory
@@ -102,7 +88,7 @@ function execute() {
102 88
 			if (strtolower($this->args[0]) == 'all') {
103 89
 				return $this->all();
104 90
 			}
105  
-			$model = Inflector::camelize($this->args[0]);
  91
+			$model = $this->_modelName($this->args[0]);
106 92
 			$object = $this->_getModelObject($model);
107 93
 			if ($this->bake($object, false)) {
108 94
 				if ($this->_checkUnitTest()) {
@@ -751,10 +737,7 @@ function bake($name, $data = array()) {
751 737
 		$this->Template->set('plugin', Inflector::camelize($this->plugin));
752 738
 		$out = $this->Template->generate('classes', 'model');
753 739
 
754  
-		$path = $this->path;
755  
-		if (isset($this->plugin)) {
756  
-			$path = $this->_pluginPath($this->plugin) . 'models' . DS;
757  
-		}
  740
+		$path = $this->getPath();
758 741
 		$filename = $path . Inflector::underscore($name) . '.php';
759 742
 		$this->out("\nBaking model class for $name...");
760 743
 		$this->createFile($filename, $out);
@@ -769,6 +752,7 @@ function bake($name, $data = array()) {
769 752
  * @access private
770 753
  */
771 754
 	function bakeTest($className) {
  755
+		$this->Test->interactive = $this->interactive;
772 756
 		$this->Test->plugin = $this->plugin;
773 757
 		$this->Test->connection = $this->connection;
774 758
 		return $this->Test->bake('Model', $className);
@@ -928,6 +912,7 @@ function help() {
928 912
  * @see FixtureTask::bake
929 913
  */
930 914
 	function bakeFixture($className, $useTable = null) {
  915
+		$this->Fixture->interactive = $this->interactive;
931 916
 		$this->Fixture->connection = $this->connection;
932 917
 		$this->Fixture->plugin = $this->plugin;
933 918
 		$this->Fixture->bake($className, $useTable);
6  cake/console/libs/tasks/project.php
@@ -314,13 +314,13 @@ function getPrefix() {
314 314
 		$admin = '';
315 315
 		$prefixes = Configure::read('Routing.prefixes');
316 316
 		if (!empty($prefixes)) {
  317
+			if (count($prefixes) == 1) {
  318
+				return $prefixes[0] . '_';
  319
+			}
317 320
 			if ($this->interactive) {
318 321
 				$this->out();
319 322
 				$this->out(__('You have more than one routing prefix configured', true));
320 323
 			}
321  
-			if (count($prefixes) == 1) {
322  
-				return $prefixes[0] . '_';
323  
-			}
324 324
 			$options = array();
325 325
 			foreach ($prefixes as $i => $prefix) {
326 326
 				$options[] = $i + 1;
23  cake/console/libs/tasks/test.php
@@ -18,21 +18,15 @@
18 18
  * @license       MIT License (http://www.opensource.org/licenses/mit-license.php)
19 19
  */
20 20
 
  21
+include_once dirname(__FILE__) . DS . 'bake.php';
  22
+
21 23
 /**
22 24
  * Task class for creating and updating test files.
23 25
  *
24 26
  * @package       cake
25 27
  * @subpackage    cake.cake.console.libs.tasks
26 28
  */
27  
-class TestTask extends Shell {
28  
-
29  
-/**
30  
- * Name of plugin
31  
- *
32  
- * @var string
33  
- * @access public
34  
- */
35  
-	var $plugin = null;
  29
+class TestTask extends BakeTask {
36 30
 
37 31
 /**
38 32
  * path to TESTS directory
@@ -66,12 +60,6 @@ class TestTask extends Shell {
66 60
  */
67 61
 	var $_fixtures = array();
68 62
 
69  
-/**
70  
- * Flag for interactive mode
71  
- *
72  
- * @var boolean
73  
- */
74  
-	var $interactive = false;
75 63
 
76 64
 /**
77 65
  * Execution method always used for tasks
@@ -434,10 +422,7 @@ function generateConstructor($type, $fullClassName) {
434 422
  * @access public
435 423
  */
436 424
 	function testCaseFileName($type, $className) {
437  
-		$path = $this->path;
438  
-		if (isset($this->plugin)) {
439  
-			$path = $this->_pluginPath($this->plugin) . 'tests' . DS;
440  
-		}
  425
+		$path = $this->getPath();;
441 426
 		$path .= 'cases' . DS . Inflector::tableize($type) . DS;
442 427
 		if (strtolower($type) == 'controller') {
443 428
 			$className = $this->getRealClassName($type, $className);
20  cake/console/libs/tasks/view.php
@@ -18,6 +18,7 @@
18 18
  * @license       MIT License (http://www.opensource.org/licenses/mit-license.php)
19 19
  */
20 20
 App::import('Controller', 'Controller', false);
  21
+include_once dirname(__FILE__) . DS . 'bake.php';
21 22
 
22 23
 /**
23 24
  * Task class for creating and updating view files.
@@ -25,15 +26,7 @@
25 26
  * @package       cake
26 27
  * @subpackage    cake.cake.console.libs.tasks
27 28
  */
28  
-class ViewTask extends Shell {
29  
-
30  
-/**
31  
- * Name of plugin
32  
- *
33  
- * @var string
34  
- * @access public
35  
- */
36  
-	var $plugin = null;
  29
+class ViewTask extends BakeTask {
37 30
 
38 31
 /**
39 32
  * Tasks to be loaded by this Task
@@ -116,8 +109,8 @@ function execute() {
116 109
 			$this->connection = 'default';
117 110
 		}
118 111
 		$controller = $action = $alias = null;
119  
-		$this->controllerName = Inflector::camelize($this->args[0]);
120  
-		$this->controllerPath = Inflector::underscore($this->controllerName);
  112
+		$this->controllerName = $this->_controllerName($this->args[0]);
  113
+		$this->controllerPath = $this->_controllerPath($this->controllerName);
121 114
 
122 115
 		$this->Project->interactive = false;
123 116
 		if (strtolower($this->args[0]) == 'all') {
@@ -370,10 +363,7 @@ function bake($action, $content = '') {
370 363
 		if ($content === true) {
371 364
 			$content = $this->getContent($action);
372 365
 		}
373  
-		$path = $this->path;
374  
-		if (isset($this->plugin)) {
375  
-			$path = $this->_pluginPath($this->plugin) . 'views' . DS;
376  
-		}
  366
+		$path = $this->getPath();
377 367
 		$filename = $path . $this->controllerPath . DS . Inflector::underscore($action) . '.ctp';
378 368
 		return $this->createFile($filename, $content);
379 369
 	}
3  cake/console/templates/default/views/form.ctp
@@ -45,7 +45,8 @@
45 45
 <div class="actions">
46 46
 	<h3><?php echo "<?php __('Actions'); ?>"; ?></h3>
47 47
 	<ul>
48  
-<?php if ($action != 'add'):?>
  48
+
  49
+<?php if (strpos($action, 'add') === false): ?>
49 50
 		<li><?php echo "<?php echo \$this->Html->link(__('Delete', true), array('action' => 'delete', \$this->Form->value('{$modelClass}.{$primaryKey}')), null, sprintf(__('Are you sure you want to delete # %s?', true), \$this->Form->value('{$modelClass}.{$primaryKey}'))); ?>";?></li>
50 51
 <?php endif;?>
51 52
 		<li><?php echo "<?php echo \$this->Html->link(sprintf(__('List %s', true), __('{$pluralHumanName}', true)), array('action' => 'index'));?>";?></li>
2  cake/dispatcher.php
@@ -603,7 +603,7 @@ function asset($url) {
603 603
 			header('HTTP/1.1 404 Not Found');
604 604
 			return $this->_stop();
605 605
 		} elseif ($isCss) {
606  
-			include WWW_ROOT . DS . $filter['css'];
  606
+			include WWW_ROOT . DS . $filters['css'];
607 607
 			$this->_stop();
608 608
 		} elseif ($isJs) {
609 609
 			include WWW_ROOT . DS . $filters['js'];
4  cake/libs/cache.php
@@ -163,7 +163,7 @@ function _buildEngine($name) {
163 163
  * @return array Array of configured Cache config names.
164 164
  */
165 165
 	function configured() {
166  
-		$self = Cache::getInstance();
  166
+		$self =& Cache::getInstance();
167 167
 		return array_keys($self->__config);
168 168
 	}
169 169
 
@@ -176,7 +176,7 @@ function configured() {
176 176
  * @return boolen success of the removal, returns false when the config does not exist.
177 177
  */
178 178
 	function drop($name) {
179  
-		$self = Cache::getInstance();
  179
+		$self =& Cache::getInstance();
180 180
 		if (!isset($self->__config[$name])) {
181 181
 			return false;
182 182
 		}
2  cake/libs/controller/controller.php
@@ -653,7 +653,7 @@ function loadModel($modelClass = null, $id = null) {
653 653
 
654 654
 			if ($this->persistModel === true) {
655 655
 				$this->_persist($modelClass, true, $this->{$modelClass});
656  
-				$registry = ClassRegistry::getInstance();
  656
+				$registry =& ClassRegistry::getInstance();
657 657
 				$this->_persist($modelClass . 'registry', true, $registry->__objects, 'registry');
658 658
 			}
659 659
 		} else {
2  cake/libs/model/connection_manager.php
@@ -61,8 +61,8 @@ class ConnectionManager extends Object {
61 61
 	function __construct() {
62 62
 		if (class_exists('DATABASE_CONFIG')) {
63 63
 			$this->config =& new DATABASE_CONFIG();
  64
+			$this->_getConnectionObjects();
64 65
 		}
65  
-		$this->_getConnectionObjects();
66 66
 	}
67 67
 
68 68
 /**
13  cake/libs/model/datasources/dbo_source.php
@@ -475,9 +475,6 @@ function name($data) {
475 475
 		if ($data === '*') {
476 476
 			return '*';
477 477
 		}
478  
-		if (is_object($data) && isset($data->type)) {
479  
-			return $data->value;
480  
-		}
481 478
 		if (is_array($data)) {
482 479
 			foreach ($data as $i => $dataItem) {
483 480
 				$data[$i] = $this->name($dataItem);
@@ -1876,9 +1873,6 @@ function fields(&$model, $alias = null, $fields = array(), $quote = true) {
1876 1873
 		}
1877 1874
 		$fields = array_values(array_filter($fields));
1878 1875
 
1879  
-		if (!$quote) {
1880  
-			return $fields;
1881  
-		}
1882 1876
 		$virtual = array();
1883 1877
 		$virtualFields = $model->getVirtualField();
1884 1878
 		if (!empty($virtualFields)) {
@@ -1895,6 +1889,13 @@ function fields(&$model, $alias = null, $fields = array(), $quote = true) {
1895 1889
 			}
1896 1890
 			$fields = array_values($fields);
1897 1891
 		}
  1892
+
  1893
+		if (!$quote) {
  1894
+			if (!empty($virtual)) {
  1895
+				$fields = array_merge($fields, $this->_constructVirtualFields($model, $alias, $virtual));
  1896
+			}
  1897
+			return $fields;
  1898
+		}
1898 1899
 		$count = count($fields);
1899 1900
 
1900 1901
 		if ($count >= 1 && !in_array($fields[0], array('*', 'COUNT(*)'))) {
101  cake/libs/model/model.php
@@ -50,7 +50,7 @@ class Model extends Overloadable {
50 50
  *
51 51
  * @var string
52 52
  * @access public
53  
- * @link http://book.cakephp.org/view/435/useDbConfig
  53
+ * @link http://book.cakephp.org/view/1057/Model-Attributes#useDbConfig-1058
54 54
  */
55 55
 	var $useDbConfig = 'default';
56 56
 
@@ -59,7 +59,7 @@ class Model extends Overloadable {
59 59
  *
60 60
  * @var string
61 61
  * @access public
62  
- * @link http://book.cakephp.org/view/436/useTable
  62
+ * @link http://book.cakephp.org/view/1057/Model-Attributes#useTable-1059
63 63
  */
64 64
 	var $useTable = null;
65 65
 
@@ -68,7 +68,7 @@ class Model extends Overloadable {
68 68
  *
69 69
  * @var string
70 70
  * @access public
71  
- * @link http://book.cakephp.org/view/438/displayField
  71
+ * @link http://book.cakephp.org/view/1057/Model-Attributes#displayField-1062
72 72
  */
73 73
 	var $displayField = null;
74 74
 
@@ -86,7 +86,7 @@ class Model extends Overloadable {
86 86
  *
87 87
  * @var array
88 88
  * @access public
89  
- * @link http://book.cakephp.org/view/441/data
  89
+ * @link http://book.cakephp.org/view/1057/Model-Attributes#data-1065
90 90
  */
91 91
 	var $data = array();
92 92
 
@@ -103,7 +103,7 @@ class Model extends Overloadable {
103 103
  *
104 104
  * @var string
105 105
  * @access public
106  
- * @link http://book.cakephp.org/view/437/primaryKey
  106
+ * @link http://book.cakephp.org/view/1057/Model-Attributes#primaryKey-1061
107 107
  */
108 108
 	var $primaryKey = null;
109 109
 
@@ -112,7 +112,7 @@ class Model extends Overloadable {
112 112
  *
113 113
  * @var array
114 114
  * @access protected
115  
- * @link http://book.cakephp.org/view/442/_schema
  115
+ * @link http://book.cakephp.org/view/1057/Model-Attributes#_schema-1066
116 116
  */
117 117
 	var $_schema = null;
118 118
 
@@ -122,8 +122,8 @@ class Model extends Overloadable {
122 122
  *
123 123
  * @var array
124 124
  * @access public
125  
- * @link http://book.cakephp.org/view/443/validate
126  
- * @link http://book.cakephp.org/view/125/Data-Validation
  125
+ * @link http://book.cakephp.org/view/1057/Model-Attributes#validate-1067
  126
+ * @link http://book.cakephp.org/view/1143/Data-Validation
127 127
  */
128 128
 	var $validate = array();
129 129
 
@@ -132,7 +132,7 @@ class Model extends Overloadable {
132 132
  *
133 133
  * @var array
134 134
  * @access public
135  
- * @link http://book.cakephp.org/view/410/Validating-Data-from-the-Controller
  135
+ * @link http://book.cakephp.org/view/1182/Validating-Data-from-the-Controller
136 136
  */
137 137
 	var $validationErrors = array();
138 138
 
@@ -141,7 +141,7 @@ class Model extends Overloadable {
141 141
  *
142 142
  * @var string
143 143
  * @access public
144  
- * @link http://book.cakephp.org/view/475/tablePrefix
  144
+ * @link http://book.cakephp.org/view/1057/Model-Attributes#tablePrefix-1060
145 145
  */
146 146
 	var $tablePrefix = null;
147 147
 
@@ -150,7 +150,7 @@ class Model extends Overloadable {
150 150
  *
151 151
  * @var string
152 152
  * @access public
153  
- * @link http://book.cakephp.org/view/444/name
  153
+ * @link http://book.cakephp.org/view/1057/Model-Attributes#name-1068
154 154
  */
155 155
 	var $name = null;
156 156
 
@@ -192,7 +192,7 @@ class Model extends Overloadable {
192 192
  *
193 193
  * @var boolean
194 194
  * @access public
195  
- * @link http://book.cakephp.org/view/445/cacheQueries
  195
+ * @link http://book.cakephp.org/view/1057/Model-Attributes#cacheQueries-1069
196 196
  */
197 197
 	var $cacheQueries = false;
198 198
 
@@ -201,7 +201,7 @@ class Model extends Overloadable {
201 201
  *
202 202
  * @var array
203 203
  * @access public
204  
- * @link http://book.cakephp.org/view/81/belongsTo
  204
+ * @link http://book.cakephp.org/view/1042/belongsTo
205 205
  */
206 206
 	var $belongsTo = array();
207 207
 
@@ -210,7 +210,7 @@ class Model extends Overloadable {
210 210
  *
211 211
  * @var array
212 212
  * @access public
213  
- * @link http://book.cakephp.org/view/80/hasOne
  213
+ * @link http://book.cakephp.org/view/1041/hasOne
214 214
  */
215 215
 	var $hasOne = array();
216 216
 
@@ -219,7 +219,7 @@ class Model extends Overloadable {
219 219
  *
220 220
  * @var array
221 221
  * @access public
222  
- * @link http://book.cakephp.org/view/82/hasMany
  222
+ * @link http://book.cakephp.org/view/1043/hasMany
223 223
  */
224 224
 	var $hasMany = array();
225 225
 
@@ -228,7 +228,7 @@ class Model extends Overloadable {
228 228
  *
229 229
  * @var array
230 230
  * @access public
231  
- * @link http://book.cakephp.org/view/83/hasAndBelongsToMany-HABTM
  231
+ * @link http://book.cakephp.org/view/1044/hasAndBelongsToMany-HABTM
232 232
  */
233 233
 	var $hasAndBelongsToMany = array();
234 234
 
@@ -240,7 +240,7 @@ class Model extends Overloadable {
240 240
  *
241 241
  * @var array
242 242
  * @access public
243  
- * @link http://book.cakephp.org/view/90/Using-Behaviors
  243
+ * @link http://book.cakephp.org/view/1072/Using-Behaviors
244 244
  */
245 245
 	var $actsAs = null;
246 246
 
@@ -282,7 +282,7 @@ class Model extends Overloadable {
282 282
  *
283 283
  * @var integer
284 284
  * @access public
285  
- * @link http://book.cakephp.org/view/439/recursive
  285
+ * @link http://book.cakephp.org/view/1057/Model-Attributes#recursive-1063
286 286
  */
287 287
 	var $recursive = 1;
288 288
 
@@ -294,7 +294,7 @@ class Model extends Overloadable {
294 294
  *
295 295
  * @var string
296 296
  * @access public
297  
- * @link http://book.cakephp.org/view/440/order
  297
+ * @link http://book.cakephp.org/view/1057/Model-Attributes#order-1064
298 298
  */
299 299
 	var $order = null;
300 300
 
@@ -531,7 +531,7 @@ function call__($method, $params) {
531 531
  * @param boolean $reset Set to false to make the binding permanent
532 532
  * @return boolean Success
533 533
  * @access public
534  
- * @link http://book.cakephp.org/view/86/Creating-and-Destroying-Associations-on-the-Fly
  534
+ * @link http://book.cakephp.org/view/1045/Creating-and-Destroying-Associations-on-the-Fly
535 535
  */
536 536
 	function bindModel($params, $reset = true) {
537 537
 		foreach ($params as $assoc => $model) {
@@ -570,7 +570,7 @@ function bindModel($params, $reset = true) {
570 570
  * @param boolean $reset  Set to false to make the unbinding permanent
571 571
  * @return boolean Success
572 572
  * @access public
573  
- * @link http://book.cakephp.org/view/86/Creating-and-Destroying-Associations-on-the-Fly
  573
+ * @link http://book.cakephp.org/view/1045/Creating-and-Destroying-Associations-on-the-Fly
574 574
  */
575 575
 	function unbindModel($params, $reset = true) {
576 576
 		foreach ($params as $assoc => $models) {
@@ -795,6 +795,7 @@ function setSource($tableName) {
795 795
  * @param string $two Value string for the alternative indata method
796 796
  * @return array Data with all of $one's keys and values
797 797
  * @access public
  798
+ * @link http://book.cakephp.org/view/1031/Saving-Your-Data
798 799
  */
799 800
 	function set($one, $two = null) {
800 801
 		if (!$one) {
@@ -1076,7 +1077,7 @@ function getVirtualField($field = null) {
1076 1077
  * @param boolean $filterKey If true, overwrites any primary key input with an empty value
1077 1078
  * @return array The current Model::data; after merging $data and/or defaults from database
1078 1079
  * @access public
1079  
- * @link http://book.cakephp.org/view/75/Saving-Your-Data
  1080
+ * @link http://book.cakephp.org/view/1031/Saving-Your-Data
1080 1081
  */
1081 1082
 	function create($data = array(), $filterKey = false) {
1082 1083
 		$defaults = array();
@@ -1107,6 +1108,7 @@ function create($data = array(), $filterKey = false) {
1107 1108
  * @param mixed $id The ID of the record to read
1108 1109
  * @return array Array of database fields, or false if not found
1109 1110
  * @access public
  1111
+ * @link http://book.cakephp.org/view/1017/Retrieving-Your-Data#read-1029
1110 1112
  */
1111 1113
 	function read($fields = null, $id = null) {
1112 1114
 		$this->validationErrors = array();
@@ -1141,7 +1143,7 @@ function read($fields = null, $id = null) {
1141 1143
  * @param string $order SQL ORDER BY fragment
1142 1144
  * @return string field contents, or false if not found
1143 1145
  * @access public
1144  
- * @link http://book.cakephp.org/view/453/field
  1146
+ * @link http://book.cakephp.org/view/1017/Retrieving-Your-Data#field-1028
1145 1147
  */
1146 1148
 	function field($name, $conditions = null, $order = null) {
1147 1149
 		if ($conditions === null && $this->id !== false) {
@@ -1182,7 +1184,7 @@ function field($name, $conditions = null, $order = null) {
1182 1184
  * @return boolean See Model::save()
1183 1185
  * @access public
1184 1186
  * @see Model::save()
1185  
- * @link http://book.cakephp.org/view/75/Saving-Your-Data
  1187
+ * @link http://book.cakephp.org/view/1031/Saving-Your-Data
1186 1188
  */
1187 1189
 	function saveField($name, $value, $validate = false) {
1188 1190
 		$id = $this->id;
@@ -1207,7 +1209,7 @@ function saveField($name, $value, $validate = false) {
1207 1209
  * @param array $fieldList List of fields to allow to be written
1208 1210
  * @return mixed On success Model::$data if its not empty or true, false on failure
1209 1211
  * @access public
1210  
- * @link http://book.cakephp.org/view/75/Saving-Your-Data
  1212
+ * @link http://book.cakephp.org/view/1031/Saving-Your-Data
1211 1213
  */
1212 1214
 	function save($data = null, $validate = true, $fieldList = array()) {
1213 1215
 		$defaults = array('validate' => true, 'fieldList' => array(), 'callbacks' => true);
@@ -1523,7 +1525,7 @@ function updateCounterCache($keys = array(), $created = false) {
1523 1525
  *
1524 1526
  * @param array $data The fields of the record that will be updated
1525 1527
  * @return array Returns updated foreign key values, along with an 'old' key containing the old
1526  
- *               values, or empty if no foreign keys are updated.
  1528
+ *     values, or empty if no foreign keys are updated.
1527 1529
  * @access protected
1528 1530
  */
1529 1531
 	function _prepareUpdateFields($data) {
@@ -1557,17 +1559,17 @@ function _prepareUpdateFields($data) {
1557 1559
  *   validate the records, but not save them.
1558 1560
  * - atomic: If true (default), will attempt to save all records in a single transaction.
1559 1561
  *   Should be set to false if database/table does not support transactions.
1560  
- *   If false, we return an array similar to the $data array passed, but values are set to true/false
1561  
- *   depending on whether each record saved successfully.
1562 1562
  * - fieldList: Equivalent to the $fieldList parameter in Model::save()
1563 1563
  *
1564 1564
  * @param array $data Record data to save.  This can be either a numerically-indexed array (for saving multiple
1565 1565
  *     records of the same type), or an array indexed by association name.
1566 1566
  * @param array $options Options to use when saving record data, See $options above.
1567  
- * @return mixed True on success, or false on failure
  1567
+ * @return mixed If atomic: True on success, or false on failure.
  1568
+ *    Otherwise: array similar to the $data array passed, but values are set to true/false
  1569
+ *    depending on whether each record saved successfully.
1568 1570
  * @access public
1569  
- * @link http://book.cakephp.org/view/84/Saving-Related-Model-Data-hasOne-hasMany-belongsTo
1570  
- * @link http://book.cakephp.org/view/75/Saving-Your-Data
  1571
+ * @link http://book.cakephp.org/view/1032/Saving-Related-Model-Data-hasOne-hasMany-belongsTo
  1572
+ * @link http://book.cakephp.org/view/1031/Saving-Your-Data
1571 1573
  */
1572 1574
 	function saveAll($data = null, $options = array()) {
1573 1575
 		if (empty($data)) {
@@ -1764,7 +1766,7 @@ function __save($data, $options) {
1764 1766
  * @param mixed $conditions Conditions to match, true for all records
1765 1767
  * @return boolean True on success, false on failure
1766 1768
  * @access public
1767  
- * @link http://book.cakephp.org/view/75/Saving-Your-Data
  1769
+ * @link http://book.cakephp.org/view/1031/Saving-Your-Data
1768 1770
  */
1769 1771
 	function updateAll($fields, $conditions = true) {
1770 1772
 		$db =& ConnectionManager::getDataSource($this->useDbConfig);
@@ -1778,7 +1780,7 @@ function updateAll($fields, $conditions = true) {
1778 1780
  * @param boolean $cascade Set to true to delete records that depend on this record
1779 1781
  * @return boolean True on success
1780 1782
  * @access public
1781  
- * @link http://book.cakephp.org/view/690/del
  1783
+ * @link http://book.cakephp.org/view/1036/delete
1782 1784
  */
1783 1785
 	function delete($id = null, $cascade = true) {
1784 1786
 		if (!empty($id)) {
@@ -1890,7 +1892,7 @@ function _deleteLinks($id) {
1890 1892
  * @param boolean $callbacks Run callbacks (not being used)
1891 1893
  * @return boolean True on success, false on failure
1892 1894
  * @access public
1893  
- * @link http://book.cakephp.org/view/692/deleteAll
  1895
+ * @link http://book.cakephp.org/view/1038/deleteAll
1894 1896
  */
1895 1897
 	function deleteAll($conditions, $cascade = true, $callbacks = false) {
1896 1898
 		if (empty($conditions)) {
@@ -2014,7 +2016,7 @@ function hasAny($conditions = null) {
2014 2016
  * @param integer $recursive The number of levels deep to fetch associated records
2015 2017
  * @return array Array of records
2016 2018
  * @access public
2017  
- * @link http://book.cakephp.org/view/449/find
  2019
+ * @link http://book.cakephp.org/view/1018/find
2018 2020
  */
2019 2021
 	function find($conditions = null, $fields = array(), $order = null, $recursive = null) {
2020 2022
 		if (!is_string($conditions) || (is_string($conditions) && !array_key_exists($conditions, $this->_findMethods))) {
@@ -2405,7 +2407,7 @@ function isUnique($fields, $or = true) {
2405 2407
  * @param string $sql SQL statement
2406 2408
  * @return array Resultset
2407 2409
  * @access public
2408  
- * @link http://book.cakephp.org/view/456/query
  2410
+ * @link http://book.cakephp.org/view/1027/query
2409 2411
  */
2410 2412
 	function query() {
2411 2413
 		$params = func_get_args();
@@ -2422,7 +2424,7 @@ function query() {
2422 2424
  * @param string $options An optional array of custom options to be made available in the beforeValidate callback
2423 2425
  * @return boolean True if there are no errors
2424 2426
  * @access public
2425  
- * @link http://book.cakephp.org/view/410/Validating-Data-from-the-Controller
  2427
+ * @link http://book.cakephp.org/view/1182/Validating-Data-from-the-Controller
2426 2428
  */
2427 2429
 	function validates($options = array()) {
2428 2430
 		$errors = $this->invalidFields($options);
@@ -2442,7 +2444,7 @@ function validates($options = array()) {
2442 2444
  * @return array Array of invalid fields
2443 2445
  * @see Model::validates()
2444 2446
  * @access public
2445  
- * @link http://book.cakephp.org/view/410/Validating-Data-from-the-Controller
  2447
+ * @link http://book.cakephp.org/view/1182/Validating-Data-from-the-Controller
2446 2448
  */
2447 2449
 	function invalidFields($options = array()) {
2448 2450
 		if (
@@ -2632,7 +2634,7 @@ function __validateWithModels($options) {
2632 2634
  *
2633 2635
  * @param string $field The name of the field to invalidate
2634 2636
  * @param mixed $value Name of validation rule that was not failed, or validation message to
2635  
- *                     be returned. If no validation key is provided, defaults to true.
  2637
+ *    be returned. If no validation key is provided, defaults to true.
2636 2638
  * @access public
2637 2639
  */
2638 2640
 	function invalidate($field, $value = true) {
@@ -2660,7 +2662,8 @@ function isForeignKey($field) {
2660 2662
 	}
2661 2663
 
2662 2664
 /**
2663  
- * Escapes the field name and prepends the model name. Escaping is done according to the current database driver's rules.
  2665
+ * Escapes the field name and prepends the model name. Escaping is done according to the 
  2666
+ * current database driver's rules.
2664 2667
  *
2665 2668
  * @param string $field Field to escape (e.g: id)
2666 2669
  * @param string $alias Alias for the model (e.g: Post)
@@ -2882,7 +2885,7 @@ function joinModel($assoc, $keys = array()) {
2882 2885
  * @return mixed true if the operation should continue, false if it should abort; or, modified
2883 2886
  *               $queryData to continue with new $queryData
2884 2887
  * @access public
2885  
- * @link http://book.cakephp.org/view/680/beforeFind
  2888
+ * @link http://book.cakephp.org/view/1048/Callback-Methods#beforeFind-1049
2886 2889
  */
2887 2890
 	function beforeFind($queryData) {
2888 2891
 		return true;
@@ -2896,7 +2899,7 @@ function beforeFind($queryData) {
2896 2899
  * @param boolean $primary Whether this model is being queried directly (vs. being queried as an association)
2897 2900
  * @return mixed Result of the find operation
2898 2901
  * @access public
2899  
- * @link http://book.cakephp.org/view/681/afterFind
  2902
+ * @link http://book.cakephp.org/view/1048/Callback-Methods#afterFind-1050
2900 2903
  */
2901 2904
 	function afterFind($results, $primary = false) {
2902 2905
 		return $results;
@@ -2908,7 +2911,7 @@ function afterFind($results, $primary = false) {
2908 2911
  *
2909 2912
  * @return boolean True if the operation should continue, false if it should abort
2910 2913
  * @access public
2911  
- * @link http://book.cakephp.org/view/683/beforeSave
  2914
+ * @link http://book.cakephp.org/view/1048/Callback-Methods#beforeSave-1052
2912 2915
  */
2913 2916
 	function beforeSave($options = array()) {
2914 2917
 		return true;
@@ -2919,7 +2922,7 @@ function beforeSave($options = array()) {
2919 2922
  *
2920 2923
  * @param boolean $created True if this save created a new record
2921 2924
  * @access public
2922  
- * @link http://book.cakephp.org/view/684/afterSave
  2925
+ * @link http://book.cakephp.org/view/1048/Callback-Methods#afterSave-1053
2923 2926
  */
2924 2927
 	function afterSave($created) {
2925 2928
 	}
@@ -2930,7 +2933,7 @@ function afterSave($created) {
2930 2933
  * @param boolean $cascade If true records that depend on this record will also be deleted
2931 2934
  * @return boolean True if the operation should continue, false if it should abort
2932 2935
  * @access public
2933  
- * @link http://book.cakephp.org/view/685/beforeDelete
  2936
+ * @link http://book.cakephp.org/view/1048/Callback-Methods#beforeDelete-1054
2934 2937
  */
2935 2938
 	function beforeDelete($cascade = true) {
2936 2939
 		return true;
@@ -2940,7 +2943,7 @@ function beforeDelete($cascade = true) {
2940 2943
  * Called after every deletion operation.
2941 2944
  *
2942 2945
  * @access public
2943  
- * @link http://book.cakephp.org/view/686/afterDelete
  2946
+ * @link http://book.cakephp.org/view/1048/Callback-Methods#afterDelete-1055
2944 2947
  */
2945 2948
 	function afterDelete() {
2946 2949
 	}
@@ -2952,7 +2955,7 @@ function afterDelete() {
2952 2955
  * @return boolean True if validate operation should continue, false to abort
2953 2956
  * @param $options array Options passed from model::save(), see $options of model::save().
2954 2957
  * @access public
2955  
- * @link http://book.cakephp.org/view/682/beforeValidate
  2958
+ * @link http://book.cakephp.org/view/1048/Callback-Methods#beforeValidate-1051
2956 2959
  */
2957 2960
 	function beforeValidate($options = array()) {
2958 2961
 		return true;
@@ -2962,7 +2965,7 @@ function beforeValidate($options = array()) {
2962 2965
  * Called when a DataSource-level error occurs.
2963 2966
  *
2964 2967
  * @access public
2965  
- * @link http://book.cakephp.org/view/687/onError
  2968
+ * @link http://book.cakephp.org/view/1048/Callback-Methods#onError-1056
2966 2969
  */
2967 2970
 	function onError() {
2968 2971
 	}
@@ -2971,7 +2974,7 @@ function onError() {
2971 2974
  * Private method. Clears cache for this model.
2972 2975
  *
2973 2976
  * @param string $type If null this deletes cached views if Cache.check is true
2974  
- *                     Will be used to allow deleting query cache also
  2977
+ *     Will be used to allow deleting query cache also
2975 2978
  * @return boolean true on delete
2976 2979
  * @access protected
2977 2980
  * @todo
77  cake/libs/view/helpers/form.php
@@ -803,32 +803,7 @@ function input($fieldName, $options = array()) {
803 803
 		}
804 804
 
805 805
 		if ($label !== false) {
806  
-			$labelAttributes = $this->domId(array(), 'for');
807  
-			if ($options['type'] === 'date' || $options['type'] === 'datetime') {
808  
-				if (isset($options['dateFormat']) && $options['dateFormat'] === 'NONE') {
809  
-					$labelAttributes['for'] .= 'Hour';
810  
-				} else {
811  
-					$labelAttributes['for'] .= 'Month';
812  
-				}
813  
-			} elseif ($options['type'] === 'time') {
814  
-				$labelAttributes['for'] .= 'Hour';
815  
-			}
816  
-
817  
-			if (is_array($label)) {
818  
-				$labelText = null;
819  
-				if (isset($label['text'])) {
820  
-					$labelText = $label['text'];
821  
-					unset($label['text']);
822  
-				}
823  
-				$labelAttributes = array_merge($labelAttributes, $label);
824  
-			} else {
825  
-				$labelText = $label;
826  
-			}
827  
-
828  
-			if (isset($options['id'])) {
829  
-				$labelAttributes = array_merge($labelAttributes, array('for' => $options['id']));
830  
-			}
831  
-			$label = $this->label($fieldName, $labelText, $labelAttributes);
  806
+			$label = $this->_inputLabel($fieldName, $label, $options);
832 807
 		}
833 808
 
834 809
 		$error = $this->_extractOption('error', $options, null);
@@ -941,6 +916,50 @@ function _extractOption($name, $options, $default = null) {
941 916
 	}
942 917
 
943 918
 /**
  919
+ * Generate a label for an input() call.
  920
+ *
  921
+ * @param array $options Options for the label element.
  922
+ * @return string Generated label element
  923
+ * @access protected
  924
+ */
  925
+	function _inputLabel($fieldName, $label, $options) {
  926
+		$labelAttributes = $this->domId(array(), 'for');
  927
+		if ($options['type'] === 'date' || $options['type'] === 'datetime') {
  928
+			if (isset($options['dateFormat']) && $options['dateFormat'] === 'NONE') {
  929
+				$labelAttributes['for'] .= 'Hour';
  930
+				$idKey = 'hour';
  931
+			} else {
  932
+				$labelAttributes['for'] .= 'Month';
  933
+				$idKey = 'month';
  934
+			}
  935
+			if (isset($options['id']) && isset($options['id'][$idKey])) {
  936
+				$labelAttributes['for'] = $options['id'][$idKey];
  937
+			}
  938
+		} elseif ($options['type'] === 'time') {
  939
+			$labelAttributes['for'] .= 'Hour';
  940
+			if (isset($options['id']) && isset($options['id']['hour'])) {
  941
+				$labelAttributes['for'] = $options['id']['hour'];
  942
+			}
  943
+		}
  944
+
  945
+		if (is_array($label)) {
  946
+			$labelText = null;
  947
+			if (isset($label['text'])) {
  948
+				$labelText = $label['text'];
  949
+				unset($label['text']);
  950
+			}
  951
+			$labelAttributes = array_merge($labelAttributes, $label);
  952
+		} else {
  953
+			$labelText = $label;
  954
+		}
  955
+
  956
+		if (isset($options['id']) && is_string($options['id'])) {
  957
+			$labelAttributes = array_merge($labelAttributes, array('for' => $options['id']));
  958
+		}
  959
+		return $this->label($fieldName, $labelText, $labelAttributes);
  960
+	}
  961
+
  962
+/**
944 963
  * Creates a checkbox input widget.
945 964
  *
946 965
  * ### Options:
@@ -1752,7 +1771,7 @@ function dateTime($fieldName, $dateFormat = 'DMY', $timeFormat = '12', $selected
1752 1771
 			}
1753 1772
 		}
1754 1773
 
1755  
-		$elements = array('Day','Month','Year','Hour','Minute','Meridian');
  1774
+		$elements = array('Day', 'Month', 'Year', 'Hour', 'Minute', 'Meridian');
1756 1775
 		$defaults = array(
1757 1776
 			'minYear' => null, 'maxYear' => null, 'separator' => '-',
1758 1777
 			'interval' => 1, 'monthNames' => true
@@ -1779,6 +1798,10 @@ function dateTime($fieldName, $dateFormat = 'DMY', $timeFormat = '12', $selected
1779 1798
 				}
1780 1799
 			} elseif (is_array($attributes['id'])) {
1781 1800
 				// check for missing ones and build selectAttr for each element
  1801
+				$attributes['id'] += array(
  1802
+					'month' => '', 'year' => '', 'day' => '',
  1803
+					'hour' => '', 'minute' => '', 'meridian' => ''
  1804
+				);
1782 1805
 				foreach ($elements as $element) {
1783 1806
 					$selectAttrName = 'select' . $element . 'Attr';
1784 1807
 					${$selectAttrName} = $attributes;
11  cake/libs/view/helpers/jquery_engine.php
@@ -245,6 +245,7 @@ function effect($name, $options = array()) {
245 245
  * @param array $options See JsHelper::request() for options.
246 246
  * @return string The completed ajax call.
247 247
  * @access public
  248
+ * @see JsBaseEngineHelper::request() for options list.
248 249
  */
249 250
 	function request($url, $options = array()) {
250 251
 		$url = $this->url($url);
@@ -282,7 +283,7 @@ function request($url, $options = array()) {
282 283
  * @param array $options Array of options for the sortable.
283 284
  * @return string Completed sortable script.
284 285
  * @access public
285  
- * @see JsHelper::sortable() for options list.