diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-04-27 21:21:36 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-04-27 21:21:36 +0000 |
commit | 51ac43e54bd9430602e9e754a9d615a8947f4df5 (patch) | |
tree | 3b8462c1025dc4aa46dba394ad40229eb4f7558c /engine | |
parent | 27c49d2f0d4a6f4ed797c0e52626b444364efa4a (diff) | |
download | elgg-51ac43e54bd9430602e9e754a9d615a8947f4df5.tar.gz elgg-51ac43e54bd9430602e9e754a9d615a8947f4df5.tar.bz2 |
Fixed possible WSOD for plugin text file page handler.
git-svn-id: http://code.elgg.org/elgg/trunk@9037 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine')
-rw-r--r-- | engine/lib/admin.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/engine/lib/admin.php b/engine/lib/admin.php index 61f64c8b3..5528a29cc 100644 --- a/engine/lib/admin.php +++ b/engine/lib/admin.php @@ -516,9 +516,11 @@ function admin_markdown_page_handler($pages) { $filename = elgg_extract(1, $pages); $error = false; - if (!$plugin) { $error = elgg_echo('admin:plugins:markdown:unknown_plugin'); + $body = elgg_view_layout('admin', array('content' => $error, 'title' => $error)); + echo elgg_view_page($title, $body, 'admin'); + return true; } $text_files = $plugin->getAvailableTextFiles(); @@ -545,7 +547,9 @@ function admin_markdown_page_handler($pages) { $text = Markdown($file_contents); $body = elgg_view_layout('admin', array( - 'content' => $text, + // setting classes here because there's no way to pass classes + // to the layout + 'content' => '<div class="elgg-markdown">' . $text . '</div>', 'title' => $title )); |