浏览代码

small doc corrections

euromark 12 年之前
父节点
当前提交
94b0d0c1ad
共有 3 个文件被更改,包括 9 次插入3 次删除
  1. 0 1
      Lib/EmailLib.php
  2. 8 1
      Model/MyModel.php
  3. 1 1
      View/Helper/TreeHelper.php

+ 0 - 1
Lib/EmailLib.php

@@ -324,7 +324,6 @@ class EmailLib extends CakeEmail {
 		return $msg;
 	}
 
-
 	/**
 	 * Add attachments to the email message
 	 * @override

+ 8 - 1
Model/MyModel.php

@@ -1539,13 +1539,17 @@ class MyModel extends Model {
 	/**
 	 * Get all related entries that have been used so far
 	 *
+	 * @param string $modelName The related model
+	 * @param string $groupField Field to group by
+	 * @param string $type Find type
+	 * @param array $options
 	 * @return array
 	 */
 	public function getRelatedInUse($modelName, $groupField, $type = 'all', $options = array()) {
 		$defaults = array(
 			'contain' => array($modelName),
 			'group' => $groupField,
-			'order' => array($modelName . '.' . $this->$modelName->displayField => 'ASC'),
+			'order' => $this->$modelName->order ? $this->$modelName->order : array($modelName . '.' . $this->$modelName->displayField => 'ASC'),
 		);
 		if ($type === 'list') {
 			$defaults['fields'] = array($modelName . '.' . $this->$modelName->primaryKey, $modelName . '.' . $this->$modelName->displayField);
@@ -1557,6 +1561,9 @@ class MyModel extends Model {
 	/**
 	 * Get all fields that have been used so far
 	 *
+	 * @param string $groupField Field to group by
+	 * @param string $type Find type
+	 * @param array $options
 	 * @return array
 	 */
 	public function getFieldInUse($groupField, $type = 'all', $options = array()) {

+ 1 - 1
View/Helper/TreeHelper.php

@@ -77,7 +77,7 @@ class TreeHelper extends AppHelper {
  *  'hideUnrelated' => if unrelated (not children, not siblings) should be hidden, needs 'treePath', true/false or array/string for callback
  *  'treePath' => treePath to insert into callback/element
  *	'left' => name of the 'lft' field if not lft. only applies to MPTT data
- *	'right' => name of the 'rght' field if not lft. only applies to MPTT data
+ *	'right' => name of the 'rght' field if not rght. only applies to MPTT data
  *	'depth' => used internally when running recursively, can be used to override the depth in either mode.
  *  'maxDepth' => used to control the depth upto which to generate tree
  *	'firstChild' => used internally when running recursively.