diff --git a/cake/libs/model/model.php b/cake/libs/model/model.php index f22559a51..5b7db83d9 100644 --- a/cake/libs/model/model.php +++ b/cake/libs/model/model.php @@ -837,22 +837,6 @@ class Model extends Overloadable { } return $this->_schema; } -/** - * @deprecated - * @see Model::schema() - */ - function loadInfo($clear = false) { - trigger_error(__('(Model::loadInfo) Deprecated - See Model::schema()', true), E_USER_WARNING); - $info = $this->schema($clear); - if (is_array($info)) { - $fields = array(); - foreach($info as $field => $value) { - $fields[] = array_merge(array('name'=> $field), $value); - } - unset($info); - return new Set($fields); - } - } /** * Returns an associative array of field names and column types. * @@ -2026,14 +2010,6 @@ class Model extends Overloadable { return $return; } } -/** - * @deprecated - * @see Model::find('all') - */ - function findAll($conditions = null, $fields = null, $order = null, $limit = null, $page = 1, $recursive = null) { - //trigger_error(__('(Model::findAll) Deprecated, use Model::find("all")', true), E_USER_WARNING); - return $this->find('all', compact('conditions', 'fields', 'order', 'limit', 'page', 'recursive')); - } /** * Passes query results through model and behavior afterFilter() methods * @@ -2077,36 +2053,6 @@ class Model extends Overloadable { $this->__backAssociation = array(); return true; } -/** - * @deprecated - * @see Model::query - */ - function execute($data) { - trigger_error(__('(Model::execute) Deprecated, use Model::query', true), E_USER_WARNING); - $db =& ConnectionManager::getDataSource($this->useDbConfig); - $data = $db->fetchAll($data, $this->cacheQueries); - - foreach ($data as $key => $value) { - foreach ($this->tableToModel as $key1 => $value1) { - if (isset($data[$key][$key1])) { - $newData[$key][$value1] = $data[$key][$key1]; - } - } - } - - if (!empty($newData)) { - return $newData; - } - return $data; - } -/** - * @deprecated - * @see Model::find('count') - */ - function findCount($conditions = null, $recursive = 0) { - //trigger_error(__('(Model::findCount) Deprecated, use Model::find("count")', true), E_USER_WARNING); - return $this->find('count', compact('conditions', 'recursive')); - } /** * False if any fields passed match any (by default, all if $or = false) of their matching values. * @@ -2149,27 +2095,6 @@ class Model extends Overloadable { } return ($this->find('count', array('conditions' => $fields)) == 0); } -/** - * @deprecated - * @see Model::find('threaded') - */ - function findAllThreaded($conditions = null, $fields = null, $order = null) { - trigger_error(__('(Model::findAllThreaded) Deprecated, use Model::find("threaded")', true), E_USER_WARNING); - return $this->find('threaded', compact('conditions', 'fields', 'order')); - } -/** - * @deprecated - * @see Model::find('neighbors') - */ - function findNeighbours($conditions = null, $field, $value) { - trigger_error(__('(Model::findNeighbours) Deprecated, use Model::find("neighbors")', true), E_USER_WARNING); - $query = compact('conditions', 'field', 'value'); - $query['fields'] = $field; - if (is_array($field)) { - $query['field'] = $field[0]; - } - return $this->find('neighbors', $query); - } /** * Returns a resultset for given SQL statement. Generic SQL queries should be made with this method. * @@ -2335,41 +2260,6 @@ class Model extends Overloadable { function getDisplayField() { return $this->displayField; } -/** - * @deprecated - */ - function generateList($conditions = null, $order = null, $limit = null, $keyPath = null, $valuePath = null, $groupPath = null) { - trigger_error(__('(Model::generateList) Deprecated, use Model::find("list") or Model::find("all") and Set::combine()', true), E_USER_WARNING); - - if ($keyPath == null && $valuePath == null && $groupPath == null && $this->hasField($this->displayField)) { - $fields = array($this->primaryKey, $this->displayField); - } else { - $fields = null; - } - $recursive = $this->recursive; - - if ($groupPath == null && $recursive >= 1) { - $this->recursive = -1; - } elseif ($groupPath && $recursive >= 1) { - $this->recursive = 0; - } - $result = $this->findAll($conditions, $fields, $order, $limit); - $this->recursive = $recursive; - - if (!$result) { - return false; - } - - if ($keyPath == null) { - $keyPath = "{n}.{$this->alias}.{$this->primaryKey}"; - } - - if ($valuePath == null) { - $valuePath = "{n}.{$this->alias}.{$this->displayField}"; - } - - return Set::combine($result, $keyPath, $valuePath, $groupPath); - } /** * Escapes the field name and prepends the model name. Escaping will be done according to the current database driver's rules. * @@ -2732,8 +2622,45 @@ class Model extends Overloadable { */ function __wakeup() { } +/** + * @deprecated + * @see Model::find('all') + */ + function findAll($conditions = null, $fields = null, $order = null, $limit = null, $page = 1, $recursive = null) { + //trigger_error(__('(Model::findAll) Deprecated, use Model::find("all")', true), E_USER_WARNING); + return $this->find('all', compact('conditions', 'fields', 'order', 'limit', 'page', 'recursive')); + } +/** + * @deprecated + * @see Model::find('count') + */ + function findCount($conditions = null, $recursive = 0) { + //trigger_error(__('(Model::findCount) Deprecated, use Model::find("count")', true), E_USER_WARNING); + return $this->find('count', compact('conditions', 'recursive')); + } +/** + * @deprecated + * @see Model::find('threaded') + */ + function findAllThreaded($conditions = null, $fields = null, $order = null) { + //trigger_error(__('(Model::findAllThreaded) Deprecated, use Model::find("threaded")', true), E_USER_WARNING); + return $this->find('threaded', compact('conditions', 'fields', 'order')); + } +/** + * @deprecated + * @see Model::find('neighbors') + */ + function findNeighbours($conditions = null, $field, $value) { + //trigger_error(__('(Model::findNeighbours) Deprecated, use Model::find("neighbors")', true), E_USER_WARNING); + $query = compact('conditions', 'field', 'value'); + $query['fields'] = $field; + if (is_array($field)) { + $query['field'] = $field[0]; + } + return $this->find('neighbors', $query); + } } if (!defined('CAKEPHP_UNIT_TEST_EXECUTION')) { Overloadable::overload('Model'); } -?> +?> \ No newline at end of file diff --git a/cake/libs/view/helper.php b/cake/libs/view/helper.php index 921828483..bce1ca9c3 100644 --- a/cake/libs/view/helper.php +++ b/cake/libs/view/helper.php @@ -301,12 +301,6 @@ class Helper extends Overloadable { } return $attribute; } -/** - * @deprecated - */ - function setFormTag($tagValue, $setScope = false) { - return $this->setEntity($tagValue, $setScope); - } /** * Sets this helper's model and field properties to the dot-separated value-pair in $entity. * @@ -759,5 +753,13 @@ class Helper extends Overloadable { $this->__cleaned = preg_replace('#]*>#i',"",$this->__cleaned); } while ($oldstring != $this->__cleaned); } + +/** + * @deprecated + */ + function setFormTag($tagValue, $setScope = false) { + trigger_error(__('Helper::setFormTag() Deprecated, use Helper::setEntity()', true), E_USER_WARNING); + return $this->setEntity($tagValue, $setScope); + } } -?> +?> \ No newline at end of file diff --git a/cake/libs/view/helpers/form.php b/cake/libs/view/helpers/form.php index 4cfe41064..346cfa46a 100644 --- a/cake/libs/view/helpers/form.php +++ b/cake/libs/view/helpers/form.php @@ -1058,18 +1058,6 @@ class FormHelper extends AppHelper { } return $out; } -/** - * @deprecated - */ - function submitImage($path, $options = array()) { - trigger_error("FormHelper::submitImage() is deprecated. Use \$form->submit('path/to/img.gif')", E_USER_WARNING); - if (strpos($path, '://')) { - $url = $path; - } else { - $url = $this->webroot(IMAGES_URL . $path); - } - return $this->output(sprintf($this->Html->tags['submitimage'], $url, $this->_parseAttributes($options, null, '', ' '))); - } /** * Returns a formatted SELECT element. *