'versions', 'name' => __('Versions'), 'desc' => __('Versions registered in table "version" of Dotclear'), ]; } protected function actions(): array { return [ new ActionDescriptor([ 'id' => 'delete', 'query' => __('delete "%s" version number'), 'success' => __('"%s" version number deleted'), 'error' => __('Failed to delete "%s" version number'), ]), ]; } public function distributed(): array { return [ 'antispam', 'blogroll', 'blowupConfig', 'core', 'dcCKEditor', 'dcLegacyEditor', 'pages', 'pings', 'simpleMenu', 'tags', 'widgets', ]; } public function values(): array { $res = dcCore::app()->con->select('SELECT * FROM ' . dcCore::app()->prefix . dcCore::VERSION_TABLE_NAME); $rs = []; $i = 0; while ($res->fetch()) { $rs[$i]['key'] = $res->f('module'); $rs[$i]['value'] = $res->f('version'); $i++; } return $rs; } public function execute(string $action, string $ns): bool { if ($action == 'delete') { dcCore::app()->con->execute( 'DELETE FROM ' . dcCore::app()->prefix . dcCore::VERSION_TABLE_NAME . ' ' . "WHERE module = '" . dcCore::app()->con->escapeStr((string) $ns) . "' " ); return true; } return false; } }