From 8362b154c7fd08930bc304fb508e54493e6eed23 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Tue, 26 Apr 2016 10:25:45 +0800 Subject: [PATCH] * change for get viewType. --- framework/helper.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/framework/helper.class.php b/framework/helper.class.php index 7d836596fd..eac1223ed8 100644 --- a/framework/helper.class.php +++ b/framework/helper.class.php @@ -20,7 +20,7 @@ include dirname(__FILE__) . '/base/helper.class.php'; class helper extends baseHelper { - public static function getViewType() + public static function getViewType($source = false) { global $config, $app; if($config->requestType != 'GET') @@ -51,6 +51,7 @@ class helper extends baseHelper $config->default->view = ($config->default->view == 'mhtml' and isset($_GET[$config->moduleVar])) ? 'html' : $config->default->view; } } + if($source and isset($viewType)) return $viewType; if(isset($viewType) and strpos($config->views, ',' . $viewType . ',') === false) $viewType = $config->default->view; return isset($viewType) ? $viewType : $config->default->view;