Translated using Weblate (Portuguese)
[phpmyadmin.git] / server_plugins.php
blobca53ef3a3c2d60585310aa50de9409b96fc7df6c
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * object the server plugin page
6 * @package PhpMyAdmin
7 */
9 /**
10 * requirements
12 require_once 'libraries/common.inc.php';
14 /**
15 * JS includes
17 $response = PMA_Response::getInstance();
18 $header = $response->getHeader();
19 $scripts = $header->getScripts();
20 $scripts->addFile('jquery/jquery.tablesorter.js');
21 $scripts->addFile('server_plugins.js');
23 /**
24 * Does the common work
26 require 'libraries/server_common.inc.php';
27 require 'libraries/server_plugins.lib.php';
29 /**
30 * Prepare plugin list
32 $sql = "SELECT p.plugin_name, p.plugin_type, p.is_active, m.module_name,
33 m.module_library, m.module_version, m.module_author,
34 m.module_description, m.module_license
35 FROM data_dictionary.plugins p
36 JOIN data_dictionary.modules m USING (module_name)
37 ORDER BY m.module_name, p.plugin_type, p.plugin_name";
38 $res = $GLOBALS['dbi']->query($sql);
39 $plugins = array();
40 $modules = array();
41 while ($row = $GLOBALS['dbi']->fetchAssoc($res)) {
42 $plugins[$row['plugin_type']][] = $row;
43 $modules[$row['module_name']]['info'] = $row;
44 $modules[$row['module_name']]['plugins'][$row['plugin_type']][] = $row;
46 $GLOBALS['dbi']->freeResult($res);
48 // sort plugin list (modules are already sorted)
49 ksort($plugins);
51 /**
52 * Displays the page
54 $response->addHTML(PMA_getHtmlForSubPageHeader('plugins'));
55 $response->addHTML(PMA_getPluginAndModuleInfo($plugins, $modules));
57 exit;