From 99a420c8efb327cb18d90b85a64bda220e0cf385 Mon Sep 17 00:00:00 2001 From: nate Date: Sat, 11 Nov 2006 21:05:00 +0000 Subject: [PATCH] Refactoring code, adding error message to deprecated method (View::setLayout), and updating method references git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@3858 3807eeeb-6ff5-0310-8944-8be069107fe0 --- cake/libs/view/helpers/rss.php | 14 ++++++++----- cake/libs/view/helpers/xml.php | 38 +--------------------------------- cake/libs/view/view.php | 1 + 3 files changed, 11 insertions(+), 42 deletions(-) diff --git a/cake/libs/view/helpers/rss.php b/cake/libs/view/helpers/rss.php index 7c24f60e8..59814816e 100644 --- a/cake/libs/view/helpers/rss.php +++ b/cake/libs/view/helpers/rss.php @@ -36,7 +36,11 @@ uses('view' . DS . 'helpers' . DS . 'xml'); class RssHelper extends XmlHelper { - var $helpers = array('Html', 'Text', 'Time'); + var $Html = null; + + var $Time = null; + + var $helpers = array('Time'); /** * Base URL * @@ -180,14 +184,14 @@ class RssHelper extends XmlHelper { unset($attrib['url']); $val = $val['url']; } - $val = $this->Html->url($val, true); + $val = Router::url($val, true); break; case 'source': if (is_array($val) && isset($val['url'])) { - $attrib['url'] = $this->Html->url($val['url'], true); + $attrib['url'] = Router::url($val['url'], true); $val = $val['title']; } elseif (is_array($val)) { - $attrib['url'] = $this->Html->url($val[0], true); + $attrib['url'] = Router::url($val[0], true); $val = $val[1]; } break; @@ -200,7 +204,7 @@ class RssHelper extends XmlHelper { $val['type'] = mime_content_type(WWW_ROOT . $val['url']); } } - $val['url'] = $html->Html->url($val['url'], true); + $val['url'] = Router::url($val['url'], true); $attrib = $val; $val = null; break; diff --git a/cake/libs/view/helpers/xml.php b/cake/libs/view/helpers/xml.php index c1e56a897..0a9c47ef4 100644 --- a/cake/libs/view/helpers/xml.php +++ b/cake/libs/view/helpers/xml.php @@ -36,42 +36,6 @@ uses('set'); */ class XmlHelper extends AppHelper { - var $helpers = array('Html'); -/** - * Base URL - * - * @access public - * @var string - */ - var $base = null; -/** - * URL to current action. - * - * @access public - * @var string - */ - var $here = null; -/** - * Parameter array. - * - * @access public - * @var array - */ - var $params = array(); -/** - * Current action. - * - * @access public - * @var string - */ - var $action = null; -/** - * POSTed model data - * - * @access public - * @var array - */ - var $data = null; /** * Name of the current model * @@ -254,7 +218,7 @@ class XmlHelper extends AppHelper { $out .= $this->__composeContent($content[$keys[$i]]); } elseif (is_array($content[$keys[$i]])) { $attr = $child = array(); - if (countdim($content[$keys[$i]]) >= 2) { + if (Set::countDim($content[$keys[$i]]) >= 2) { } else { diff --git a/cake/libs/view/view.php b/cake/libs/view/view.php index 2428d6e5a..0cef9c7b6 100644 --- a/cake/libs/view/view.php +++ b/cake/libs/view/view.php @@ -522,6 +522,7 @@ class View extends Object { * @deprecated */ function setLayout($layout) { + trigger_error('(View::setLayout) Deprecated: Use $this->layout = "..." instead', E_USER_WARNING); $this->layout = $layout; } /**