From d0d2c2ccc7a22e24aad3d0c7b15e07ccebbb7735 Mon Sep 17 00:00:00 2001 From: ewinslow Date: Mon, 14 Feb 2011 22:44:15 +0000 Subject: Refs #2124: Adding backwards compatibility conversions for internalname/internalid git-svn-id: http://code.elgg.org/elgg/trunk@8232 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/views.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'engine/lib/views.php') diff --git a/engine/lib/views.php b/engine/lib/views.php index f58e374db..6118be030 100644 --- a/engine/lib/views.php +++ b/engine/lib/views.php @@ -393,6 +393,22 @@ function elgg_view($view, $vars = array(), $bypass = false, $debug = false, $vie if (!isset($vars['url'])) { $vars['url'] = elgg_get_site_url(); } + + // internalname => name (1.8) + if (isset($vars['internalname'])) { + elgg_deprecated_notice('You should pass $vars[\'name\'] now instead of $vars[\'internalname\']', 1.8); + $vars['name'] = $vars['internalname']; + } elseif (isset($vars['name'])) { + $vars['internalname'] = $vars['name']; + } + + // internalid => id (1.8) + if (isset($vars['internalid'])) { + elgg_deprecated_notice('You should pass $vars[\'id\'] now instead of $vars[\'internalid\']', 1.8); + $vars['id'] = $vars['internalid']; + } elseif (isset($vars['id'])) { + $vars['internalid'] = $vars['id']; + } // If it's been requested, pass off to a template handler instead if ($bypass == false && isset($CONFIG->template_handler) && !empty($CONFIG->template_handler)) { -- cgit v1.2.3