diff options
author | ewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-11-02 23:51:12 +0000 |
---|---|---|
committer | ewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-11-02 23:51:12 +0000 |
commit | e4224c70c270a7ebf16e006a8324d6a944de6fbc (patch) | |
tree | c9b89b58f74b8245c974c0029ad1d1df1e9cfc8b /engine/lib/views.php | |
parent | 38c0c73c2f60d7c63cc4da1b20b031cda5851e11 (diff) | |
download | elgg-e4224c70c270a7ebf16e006a8324d6a944de6fbc.tar.gz elgg-e4224c70c270a7ebf16e006a8324d6a944de6fbc.tar.bz2 |
Refs #2360: Deprecated page_draw in favor of elgg_view_page. Updated packaged documentation to reflect this.
git-svn-id: http://code.elgg.org/elgg/trunk@7208 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/views.php')
-rw-r--r-- | engine/lib/views.php | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/engine/lib/views.php b/engine/lib/views.php index 82be10118..f9ceafd2d 100644 --- a/engine/lib/views.php +++ b/engine/lib/views.php @@ -1303,9 +1303,10 @@ function autoregister_views($view_base, $folder, $base_location_path, $viewtype) * @param array $vars Optional vars array to pass to the page * shell. Automatically adds title, body, and sysmessages * - * @return NULL + * @return string The contents of the page + * @since 1.8 */ -function page_draw($title, $body, $page_shell = 'page_shells/default', $vars = array()) { +function elgg_view_page($title, $body, $page_shell = 'page_shells/default', $vars = array()) { // get messages - try for errors first $sysmessages = system_messages(NULL, "errors"); @@ -1327,13 +1328,15 @@ function page_draw($title, $body, $page_shell = 'page_shells/default', $vars = a $vars['page_shell'] = $page_shell; // Allow plugins to mod output - $output = trigger_plugin_hook('output', 'page', $vars, $output); - - $split_output = str_split($output, 1024); + return trigger_plugin_hook('output', 'page', $vars, $output); +} - foreach ($split_output as $chunk) { - echo $chunk; - } +/** + * @deprecated 1.8 Use elgg_view_page() + */ +function page_draw($title, $body, $page_shell = 'page_shells/default', $vars = array()) { + elgg_deprecated_notice("page_draw() was deprecated in favor of elgg_view_page() in 1.8.", 1.8); + echo elgg_view_page($title, $body, $page_shell, $vars); } /** |