* Add the config of view prefix.
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user