* adjust code.
This commit is contained in:
@@ -297,7 +297,7 @@ class control
|
||||
/* The main view file, extension view file and hook file. */
|
||||
$mainViewFile = $modulePath . 'view' . $this->pathFix . $this->viewPrefix . $methodName . '.' . $viewType . '.php';
|
||||
$extViewFile = $viewExtPath . $this->viewPrefix . $methodName . ".{$viewType}.php";
|
||||
$extHookFiles = glob($viewExtPath . $this->viewPrefix . $methodName . "*.{$viewType}.hook.php");
|
||||
$extHookFiles = glob($viewExtPath . $this->viewPrefix . $methodName . ".*.{$viewType}.hook.php");
|
||||
|
||||
$viewFile = file_exists($extViewFile) ? $extViewFile : $mainViewFile;
|
||||
if(!is_file($viewFile)) $this->app->triggerError("the view file $viewFile not found", __FILE__, __LINE__, $exit = true);
|
||||
|
||||
@@ -214,7 +214,8 @@ class validater
|
||||
public static function checkAccount($var)
|
||||
{
|
||||
global $config;
|
||||
return self::checkREG($var, $config->accountRule);
|
||||
$accountRule = empty($config->accountRule) ? '|^[a-zA-Z0-9_]{1}[a-zA-Z0-9_\.]{1,}[a-zA-Z0-9_]{1}$|' : $config->accountRule;
|
||||
return self::checkREG($var, $accountRule);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user