mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Removing references to deprecated methods and fixing code formatting
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@3126 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
5de968246f
commit
66a3bb94ce
2 changed files with 11 additions and 19 deletions
|
@ -96,7 +96,7 @@ class AjaxHelper extends Helper {
|
|||
* Returns link to remote action
|
||||
*
|
||||
* Returns a link to a remote action defined by <i>options[url]</i>
|
||||
* (using the urlFor format) that's called in the background using
|
||||
* (using the url() format) that's called in the background using
|
||||
* XMLHttpRequest. The result of that request can then be inserted into a
|
||||
* DOM object whose id can be specified with <i>options[update]</i>.
|
||||
* Usually, the result would be a partial prepared by the controller with
|
||||
|
@ -369,7 +369,7 @@ class AjaxHelper extends Helper {
|
|||
* Required +options+ are:
|
||||
* - <i>frequency</i>:: The frequency (in seconds) at which changes to
|
||||
* this field will be detected.
|
||||
* - <i>url</i>:: @see urlFor() -style options for the action to call
|
||||
* - <i>url</i>:: @see url() -style options for the action to call
|
||||
* when the field has changed.
|
||||
*
|
||||
* Additional options are:
|
||||
|
|
|
@ -749,13 +749,6 @@ class HtmlHelper extends Helper {
|
|||
$select[] = sprintf($this->tags['selectend']);
|
||||
return $this->output(implode("\n", $select), $return);
|
||||
}
|
||||
/**
|
||||
* @deprecated Name changed to 'url'. Version 0.9.2.
|
||||
* @see HtmlHelper::url()
|
||||
*/
|
||||
function urlFor($url) {
|
||||
return $this->url($url);
|
||||
}
|
||||
/*************************************************************************
|
||||
* Deprecated methods
|
||||
*************************************************************************/
|
||||
|
@ -769,13 +762,13 @@ class HtmlHelper extends Helper {
|
|||
* @deprecated This is very WYSIWYG unfriendly, use HtmlHelper::url() to get contents of "action" attribute. Version 0.9.2.
|
||||
*/
|
||||
function formTag($target = null, $type = 'post', $htmlAttributes = null) {
|
||||
$htmlAttributes['action']=$this->UrlFor($target);
|
||||
$htmlAttributes['method']=$type == 'get' ? 'get' : 'post';
|
||||
$htmlAttributes['action'] = $this->url($target);
|
||||
$htmlAttributes['method'] = low($type) == 'get' ? 'get' : 'post';
|
||||
$type == 'file' ? $htmlAttributes['enctype'] = 'multipart/form-data' : null;
|
||||
$token='';
|
||||
$token = '';
|
||||
|
||||
if (isset($this->params['_Token']) && !empty($this->params['_Token'])) {
|
||||
$token = $this->hidden('_Token/key', array('value' => $this->params['_Token']['key']), true);
|
||||
$token = $this->hidden('_Token/key', array('value' => $this->params['_Token']['key']), true);
|
||||
}
|
||||
|
||||
return sprintf($this->tags['form'], $this->parseHtmlOptions($htmlAttributes, null, '')) . $token;
|
||||
|
@ -795,16 +788,15 @@ class HtmlHelper extends Helper {
|
|||
function guiListTree($data, $htmlAttributes = null, $bodyKey = 'body', $childrenKey = 'children', $return = false) {
|
||||
$out="<ul" . $this->_parseAttributes($htmlAttributes) . ">\n";
|
||||
foreach($data as $item) {
|
||||
$out .= "<li>{$item[$bodyKey]}\n";
|
||||
if (isset($item[$childrenKey]) && is_array($item[$childrenKey]) && count($item[$childrenKey])) {
|
||||
$out .= $this->guiListTree($item[$childrenKey], $htmlAttributes, $bodyKey, $childrenKey);
|
||||
}
|
||||
$out .= "</li>\n";
|
||||
$out .= "<li>{$item[$bodyKey]}\n";
|
||||
if (isset($item[$childrenKey]) && is_array($item[$childrenKey]) && count($item[$childrenKey])) {
|
||||
$out .= $this->guiListTree($item[$childrenKey], $htmlAttributes, $bodyKey, $childrenKey);
|
||||
}
|
||||
$out .= "</li>\n";
|
||||
}
|
||||
$out .= "</ul>\n";
|
||||
return $this->output($out, $return);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a mailto: link.
|
||||
*
|
||||
|
|
Loading…
Add table
Reference in a new issue