function isDataValid() { if ($this->pagedata['uri'] == '') { $this->error['URI_NOT_SPECIFIED'] = "Page URI is not specified"; return false; } else { if ($this->pagedata['uri'][0] !== '/') { $this->pagedata['uri'] = '/' . $this->pagedata['uri']; } } $modules = SJB_System::getModulesList(); $is_exist = 0; foreach ($modules as $module) { if ($module == $this->pagedata['module']) { $is_exist = 1; break; } } if ($is_exist == 0) { $this->error['MODULE_NOT_SPECIFIED'] = "Page module is not specified"; return false; } else { $is_exist = 0; $functions = SJB_System::getFunctionsList($this->pagedata['module']); foreach ($functions as $func) { if ($func == $this->pagedata['function']) { $is_exist = 1; break; } } if ($is_exist == 0) { $this->error['FUNCTION_NOT_SPECIFIED'] = "Page function is not specified"; return false; } } return true; }