From: x2003bruneau Date: Mon, 22 Jan 2007 13:37:54 +0000 (+0000) Subject: Display becomes a common get arg to force the skin level of the page: X-Git-Tag: xorg/0.9.13~87 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=8a105df2d56f1bb6ed84adb483820c750e4e98c4;p=platal.git Display becomes a common get arg to force the skin level of the page: display=full -> full skin display=light -> simple skin display=row -> no skin Useful to create 'light' popups git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@1384 839d8a87-29fc-0310-9880-83ba4fa771e5 --- diff --git a/classes/platalpage.php b/classes/platalpage.php index ee56a9d..1c91502 100644 --- a/classes/platalpage.php +++ b/classes/platalpage.php @@ -64,9 +64,9 @@ class PlatalPage extends Smarty function changeTpl($tpl, $type = SKINNED) { - $this->_tpl = $tpl; - $this->_page_type = $type; - $this->assign('xorg_tpl', $tpl); + $this->_tpl = $tpl; + $this->_page_type = $type; + $this->assign('xorg_tpl', $tpl); } // }}} @@ -82,6 +82,14 @@ class PlatalPage extends Smarty $this->assign('xorg_failure', $this->_failure); $this->assign('globals', $globals); + if (Env::v('display') == 'light') { + $this->_page_type = SIMPLE; + } elseif (Env::v('display') == 'raw') { + $this->_page_type = NO_SKIN; + } elseif (Env::v('display') == 'full') { + $this->_page_typ = SKINNED; + } + switch ($this->_page_type) { case NO_SKIN: error_reporting(0); diff --git a/htdocs/xorg.php b/htdocs/xorg.php index a048312..82f398b 100644 --- a/htdocs/xorg.php +++ b/htdocs/xorg.php @@ -106,10 +106,6 @@ switch (Env::v('action')) { break; } -if (Env::v('display') == 'light') { - $page->assign('simple', true); -} - $page->assign('perms', $perms); $page->assign('perms_opts', wiki_perms_options());