aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2011-09-19 15:05:46 -0700
committerCash Costello <cash.costello@gmail.com>2011-09-19 15:05:46 -0700
commitc4ba4f5fadb75bbb93186bfc72af977e3a8475a6 (patch)
tree91787c50e7d3f10186cd73fe4dc68a2c9ed995ab
parent4900853196f83a902a2acac11ae1bd4813bcb3fc (diff)
parent6e8ab94aa23f13b62727d3af42fc012c8eefef9a (diff)
downloadelgg-c4ba4f5fadb75bbb93186bfc72af977e3a8475a6.tar.gz
elgg-c4ba4f5fadb75bbb93186bfc72af977e3a8475a6.tar.bz2
Merge pull request #68 from mrclay/issue2921
Refs #2921 fixing false internalid/internalname deprecation notices
-rw-r--r--engine/lib/views.php10
1 files 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'];
}