diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-03-09 05:40:42 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-03-09 05:40:42 +0000 |
commit | 292fac1bb91fc7b13e3e39e7061c2e75a3d45ffb (patch) | |
tree | d174a81e0609c1449beff7e5d64ffdf56ab19f82 /engine | |
parent | c5df1bc76bd40356ab88d8f2a593f2b13e833e61 (diff) | |
download | elgg-292fac1bb91fc7b13e3e39e7061c2e75a3d45ffb.tar.gz elgg-292fac1bb91fc7b13e3e39e7061c2e75a3d45ffb.tar.bz2 |
Fixes #3059. elgg_view_layout() checks for deprecated layouts in canvas/layouts/ and elgg_view_page() checks for deprecated pageshells in pageshells/pageshell.
git-svn-id: http://code.elgg.org/elgg/trunk@8642 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine')
-rw-r--r-- | engine/lib/views.php | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/engine/lib/views.php b/engine/lib/views.php index 905458a9a..25d5ea58a 100644 --- a/engine/lib/views.php +++ b/engine/lib/views.php @@ -600,9 +600,17 @@ function elgg_view_page($title, $body, $page_shell = 'default', $vars = array()) $vars['title'] = $title; $vars['body'] = $body; $vars['sysmessages'] = $messages; - - // Draw the page - $output = elgg_view("page/$page_shell", $vars); + + // check for deprecated view + if (elgg_view_exists('pageshells/pageshell')) { + elgg_deprecated_notice("pageshells/pageshell is deprecated by page/$page_shell", 1.8); + global $CONFIG; + + $vars['config'] = $CONFIG; + $output = elgg_view('pageshells/pageshell', $vars); + } else { + $output = elgg_view("page/$page_shell", $vars); + } $vars['page_shell'] = $page_shell; @@ -656,7 +664,11 @@ function elgg_view_layout($layout_name, $vars = array()) { $param_array = $vars; } - if (elgg_view_exists("page/layouts/$layout_name")) { + // check deprecated location + if (elgg_view_exists("canvas/layouts/$layout_name")) { + elgg_deprecated_notice("canvas/layouts/$layout_name is deprecated by page/layouts/$layout_name", 1.8); + return elgg_view("canvas/layouts/$layout_name", $param_array); + } elseif (elgg_view_exists("page/layouts/$layout_name")) { return elgg_view("page/layouts/$layout_name", $param_array); } else { return elgg_view("page/layouts/default", $param_array); |