Refactoring Helper::setFormTag()

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4660 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
phpnut 2007-03-23 10:50:41 +00:00
parent c20a8c80f3
commit 7cee084212

View file

@ -322,12 +322,7 @@ class Helper extends Overloadable {
*/
function setFormTag($tagValue) {
$view =& ClassRegistry::getObject('view');
if(strpos($tagValue, '.') !== false) {
$parts = explode(".", $tagValue);
} else {
$parts = explode("/", $tagValue);
}
$parts = preg_split('/\/|\./', $tagValue);
if (count($parts) == 1) {
$view->field = $parts[0];