aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/views.php
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-04-22 21:16:17 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-04-22 21:16:17 +0000
commit24a76071b2cc491cc6a2f781cc3759ba2bde17e8 (patch)
tree0284ffb4cccaa452855527bf7abac25cc34ad711 /engine/lib/views.php
parent3798083dc2ad26fa48a58e58234ae88f587e78f2 (diff)
downloadelgg-24a76071b2cc491cc6a2f781cc3759ba2bde17e8.tar.gz
elgg-24a76071b2cc491cc6a2f781cc3759ba2bde17e8.tar.bz2
Fixed rewriting for internalid and internalname to not cause false deprecation notices if passed among views.
git-svn-id: http://code.elgg.org/elgg/trunk@9016 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/views.php')
-rw-r--r--engine/lib/views.php11
1 files changed, 6 insertions, 5 deletions
diff --git a/engine/lib/views.php b/engine/lib/views.php
index c2685b073..45b2c35f8 100644
--- a/engine/lib/views.php
+++ b/engine/lib/views.php
@@ -398,7 +398,7 @@ function elgg_view($view, $vars = array(), $bypass = false, $debug = false, $vie
// check if full_view is set because that means we've already rewritten it and this is
// coming from another view passing $vars directly.
if (isset($vars['full']) && !isset($vars['full_view'])) {
- elgg_deprecated_notice("Use \$vars['full_view'] instead of \$vars['full']", 1.8);
+ elgg_deprecated_notice("Use \$vars['full_view'] instead of \$vars['full']", 1.8, 2);
$vars['full_view'] = $vars['full'];
}
if (isset($vars['full_view'])) {
@@ -406,16 +406,17 @@ function elgg_view($view, $vars = array(), $bypass = false, $debug = false, $vie
}
// internalname => name (1.8)
- if (isset($vars['internalname'])) {
- elgg_deprecated_notice('You should pass $vars[\'name\'] now instead of $vars[\'internalname\']', 1.8);
+ if (isset($vars['internalname']) && !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'])) {
$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);
+ if (isset($vars['internalid']) && !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'])) {
$vars['internalid'] = $vars['id'];