* Use oldPages in framework control display function.
This commit is contained in:
@@ -941,7 +941,9 @@ class baseControl
|
||||
$modulePath = $this->app->getModulePath($this->appName, $moduleName);
|
||||
$viewType = $this->viewType == 'mhtml' ? 'html' : $this->viewType;
|
||||
$mainViewFile = $modulePath . 'ui' . DS . $this->devicePrefix . strtolower($methodName) . '.' . $viewType . '.php';
|
||||
if($moduleName != 'screen' || $methodName != 'view') return $this->render($moduleName, $methodName);
|
||||
|
||||
if($moduleName != 'index') $this->app->loadModuleConfig('index');
|
||||
if(!in_array("{$moduleName}-{$methodName}", $this->config->index->oldPages)) return $this->render($moduleName, $methodName);
|
||||
}
|
||||
|
||||
if(empty($this->output)) $this->parse($moduleName, $methodName);
|
||||
|
||||
@@ -24,3 +24,4 @@ $config->index->appGroup['user'] = 'admin';
|
||||
|
||||
$config->index->oldPages = array();
|
||||
$config->index->oldPages[] = 'screen-view';
|
||||
$config->index->oldPages[] = 'screen-burn';
|
||||
|
||||
@@ -67,6 +67,7 @@ class screenModel extends model
|
||||
public function getByID(int $screenID, int $year = 0, int $dept = 0, string $account = ''): object|bool
|
||||
{
|
||||
$screen = $this->dao->select('*')->from(TABLE_SCREEN)->where('id')->eq($screenID)->fetch();
|
||||
if($screen->id == 5) return $screen;
|
||||
if(!$screen) return false;
|
||||
|
||||
if(empty($screen->scheme)) $screen->scheme = file_get_contents(__DIR__ . '/json/screen.json');
|
||||
|
||||
Reference in New Issue
Block a user