From: Steve Clay Date: Mon, 19 Sep 2011 19:29:44 +0000 (-0400) Subject: don't generate false internalid deprecation notices: http://trac.elgg.org/ticket... X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=6e8ab94aa23f13b62727d3af42fc012c8eefef9a;p=lorea%2Felgg.git don't generate false internalid deprecation notices: http://trac.elgg.org/ticket/2921#comment:3 --- 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']; }