From 6e8ab94aa23f13b62727d3af42fc012c8eefef9a Mon Sep 17 00:00:00 2001 From: Steve Clay Date: Mon, 19 Sep 2011 15:29:44 -0400 Subject: don't generate false internalid deprecation notices: http://trac.elgg.org/ticket/2921#comment:3 --- engine/lib/views.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/engine/lib/views.php b/engine/lib/views.php index 2f1661e83..f6e5aa6b8 100644 --- a/engine/lib/views.php +++ b/engine/lib/views.php @@ -411,19 +411,25 @@ function elgg_view($view, $vars = array(), $bypass = false, $debug = false, $vie } // internalname => name (1.8) - if (isset($vars['internalname']) && !isset($vars['name'])) { + if (isset($vars['internalname']) && !isset($vars['__ignoreInternalname']) && !isset($vars['name'])) { elgg_deprecated_notice('You should pass $vars[\'name\'] now instead of $vars[\'internalname\']', 1.8, 2); $vars['name'] = $vars['internalname']; $test=false; } elseif (isset($vars['name'])) { + if (!isset($vars['internalname'])) { + $vars['__ignoreInternalname'] = ''; + } $vars['internalname'] = $vars['name']; } // internalid => id (1.8) - if (isset($vars['internalid']) && !isset($vars['name'])) { + if (isset($vars['internalid']) && !isset($vars['__ignoreInternalid']) && !isset($vars['name'])) { elgg_deprecated_notice('You should pass $vars[\'id\'] now instead of $vars[\'internalid\']', 1.8, 2); $vars['id'] = $vars['internalid']; } elseif (isset($vars['id'])) { + if (!isset($vars['internalid'])) { + $vars['__ignoreInternalid'] = ''; + } $vars['internalid'] = $vars['id']; } -- cgit v1.2.3