]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Fixes #2642 changed elgg_view_page() to always pick up page_shell views for the page_...
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Tue, 16 Nov 2010 01:18:13 +0000 (01:18 +0000)
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Tue, 16 Nov 2010 01:18:13 +0000 (01:18 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@7325 36083f99-b078-4883-b0ff-0f9b5a30f544

engine/lib/admin.php
engine/lib/elgglib.php
engine/lib/views.php
install/ElggInstaller.php

index 2e2003bc85059ab878f2e58c41a20f1379902a43..1e6f896ae7d909f14af88f029d1bd2edc7f8a886 100644 (file)
@@ -212,7 +212,7 @@ function admin_settings_page_handler($page) {
        }
 
        $body = elgg_view_layout('administration', array('content' => $content));
-       echo elgg_view_page($title, $body, 'page_shells/admin');
+       echo elgg_view_page($title, $body, 'admin');
 }
 
 /**
index d369f0fdc93960b9489b002c44ac0882911af280..cf3d25822d0a9af8c0145d02ad6608ddc70db88d 100644 (file)
@@ -2142,7 +2142,7 @@ function js_page_handler($page) {
 function elgg_walled_garden_index() {
        $login = elgg_view('account/login_walled_garden');
 
-       echo elgg_view_page('', $login, 'page_shells/walled_garden');
+       echo elgg_view_page('', $login, 'walled_garden');
 
        // @hack Index must exit to keep plugins from continuing to extend
        exit;
index 40847d1cd61c1f609e19d55ba81299af1fc59c8c..c296fa1ac3a452c69f42bf77bc89da2e2c26ad2e 100644 (file)
@@ -1266,14 +1266,14 @@ function autoregister_views($view_base, $folder, $base_location_path, $viewtype)
  *
  * @param string $title      Title
  * @param string $body       Body
- * @param string $page_shell Optional page shell to use.
+ * @param string $page_shell Optional page shell to use. See page_shells view directory
  * @param array  $vars       Optional vars array to pass to the page
  *                           shell. Automatically adds title, body, and sysmessages
  *
  * @return string The contents of the page
  * @since  1.8
  */
-function elgg_view_page($title, $body, $page_shell = 'page_shells/default', $vars = array()) {
+function elgg_view_page($title, $body, $page_shell = 'default', $vars = array()) {
        // get messages - try for errors first
        $sysmessages = system_messages(NULL, "errors");
 
@@ -1290,7 +1290,7 @@ function elgg_view_page($title, $body, $page_shell = 'page_shells/default', $var
        $vars['sysmessages'] = $sysmessages;
 
        // Draw the page
-       $output = elgg_view($page_shell, $vars);
+       $output = elgg_view("page_shells/$page_shell", $vars);
 
        $vars['page_shell'] = $page_shell;
 
@@ -1307,7 +1307,7 @@ function page_draw($title, $body, $sidebar = "") {
        $vars = array(
                'sidebar' => $sidebar
        );
-       echo elgg_view_page($title, $body, 'page_shells/default', $vars);
+       echo elgg_view_page($title, $body, 'default', $vars);
 }
 
 /**
index e52e3b0563dcdc853feca677f11e8b1dd8d37ccb..060480791731af49e4cf364e3e94f688e4f629b7 100644 (file)
@@ -187,7 +187,7 @@ class ElggInstaller {
                echo elgg_view_page(
                                $title,
                                $body,
-                               'page_shells/default',
+                               'default',
                                array(
                                        'step' => $step,
                                        'steps' => $this->getSteps(),