public function fileChecksumRebase() { DB::exec(DB::DEF, 'TRUNCATE tblFileCheck'); $dirList = PHPExt::dirSearch(Cfg::get('site_path'), '/^[^_].*$/'); $len = strlen(Cfg::get('site_path')) + 1; $fileCount = 0; foreach ($dirList as $fullPath) { $fileCount++; DB::exec(DB::DEF, 'INSERT INTO tblFileCheck VALUES(?,?,?,?)', [DBMaintenance::dbNextNumber(DB::DEF, 'tblFileCheck'), substr($fullPath, $len), filesize($fullPath), sha1_file($fullPath)]); } return "Updated {$fileCount} files<br/>" . $this->fileChecksum(); }