From 5bf66662a9bdd62c5bccab15e607cd95cfb8fcab Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Mon, 27 Jul 2020 10:05:23 +0200 Subject: Removed wordpress and phpmyadmin, my server doesn't handle it well and it brings shame on my familly --- .../libraries/classes/Server/Plugins.php | 74 ---------------------- 1 file changed, 74 deletions(-) delete mode 100644 srcs/phpmyadmin/libraries/classes/Server/Plugins.php (limited to 'srcs/phpmyadmin/libraries/classes/Server/Plugins.php') diff --git a/srcs/phpmyadmin/libraries/classes/Server/Plugins.php b/srcs/phpmyadmin/libraries/classes/Server/Plugins.php deleted file mode 100644 index eb8e85a..0000000 --- a/srcs/phpmyadmin/libraries/classes/Server/Plugins.php +++ /dev/null @@ -1,74 +0,0 @@ -dbi = $dbi; - } - - /** - * @return Plugin[] - */ - public function getAll(): array - { - global $cfg; - - $sql = 'SHOW PLUGINS'; - if (! $cfg['Server']['DisableIS']) { - $sql = 'SELECT * FROM information_schema.PLUGINS ORDER BY PLUGIN_TYPE, PLUGIN_NAME'; - } - $result = $this->dbi->query($sql); - $plugins = []; - while ($row = $this->dbi->fetchAssoc($result)) { - $plugins[] = $this->mapRowToPlugin($row); - } - $this->dbi->freeResult($result); - - return $plugins; - } - - /** - * @param array $row Row fetched from database - * @return Plugin - */ - private function mapRowToPlugin(array $row): Plugin - { - return Plugin::fromState([ - 'name' => $row['PLUGIN_NAME'] ?? $row['Name'], - 'version' => $row['PLUGIN_VERSION'] ?? null, - 'status' => $row['PLUGIN_STATUS'] ?? $row['Status'], - 'type' => $row['PLUGIN_TYPE'] ?? $row['Type'], - 'typeVersion' => $row['PLUGIN_TYPE_VERSION'] ?? null, - 'library' => $row['PLUGIN_LIBRARY'] ?? $row['Library'] ?? null, - 'libraryVersion' => $row['PLUGIN_LIBRARY_VERSION'] ?? null, - 'author' => $row['PLUGIN_AUTHOR'] ?? null, - 'description' => $row['PLUGIN_DESCRIPTION'] ?? null, - 'license' => $row['PLUGIN_LICENSE'] ?? $row['License'], - 'loadOption' => $row['LOAD_OPTION'] ?? null, - 'maturity' => $row['PLUGIN_MATURITY'] ?? null, - 'authVersion' => $row['PLUGIN_AUTH_VERSION'] ?? null, - ]); - } -} -- cgit