diff options
author | ewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-02-14 22:44:15 +0000 |
---|---|---|
committer | ewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-02-14 22:44:15 +0000 |
commit | d0d2c2ccc7a22e24aad3d0c7b15e07ccebbb7735 (patch) | |
tree | 05c76e58b9e5a4aa4c73211135762220addbaf5d /engine | |
parent | 9c7cdaa96ceae5cfacac8120dfe4a5de22376982 (diff) | |
download | elgg-d0d2c2ccc7a22e24aad3d0c7b15e07ccebbb7735.tar.gz elgg-d0d2c2ccc7a22e24aad3d0c7b15e07ccebbb7735.tar.bz2 |
Refs #2124: Adding backwards compatibility conversions for internalname/internalid
git-svn-id: http://code.elgg.org/elgg/trunk@8232 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine')
-rw-r--r-- | engine/lib/views.php | 16 |
1 files changed, 16 insertions, 0 deletions
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)) { |