* Add the config of view prefix.

This commit is contained in:
ChuJilu
2014-10-10 09:35:33 +08:00
parent 0433f34fb6
commit bf09d39eb2
2 changed files with 5 additions and 2 deletions
+3
View File
@@ -66,6 +66,9 @@ $config->file = new stdclass();
$config->file->dangers = 'php,php3,php4,phtml,php5,jsp,py,rb,asp,asa,cer,cdx,aspl'; // Dangerous files.
$config->file->maxSize = 1024 * 1024; // Max size.
/* View type settings. */
$config->viewPrefix['mhtml'] = 'm';
/* Master database settings. */
$config->db = new stdclass();
$config->db->persistant = false; // Pconnect or not.
+2 -2
View File
@@ -269,7 +269,7 @@ class control
public function setViewPrefix()
{
$this->viewPrefix = '';
if($this->viewType == 'mhtml') $this->viewPrefix = 'm.';
if(isset($this->config->viewPrefix[$this->viewType])) $this->viewPrefix = $this->config->viewPrefix[$this->viewType] . '.';
}
//-------------------- View related methods --------------------//
@@ -292,7 +292,7 @@ class control
/* Set infix for view file in mobile or pc. */
$viewType = $this->viewType;
if($this->viewType == 'mhtml') $viewType = 'html';
if(isset($this->config->viewPrefix[$this->viewType])) $viewType = 'html';
/* The main view file, extension view file and hook file. */
$mainViewFile = $modulePath . 'view' . $this->pathFix . $this->viewPrefix . $methodName . '.' . $viewType . '.php';