diff options
author | Piotr Przybylski <piotrprz@gmail.com> | 2011-06-01 15:19:10 +0400 |
---|---|---|
committer | Piotr Przybylski <piotrprz@gmail.com> | 2011-06-01 15:19:10 +0400 |
commit | 940042c6b37b4b93788256395df2c27824a271cb (patch) | |
tree | b5ccf0ad0d05944bab975827740875820ec575b4 | |
parent | 946cc6a5599d20133273bdd3846577b6d4817b8e (diff) |
Add Plugins server tab for Drizzle
-rw-r--r-- | libraries/server_links.inc.php | 6 | ||||
-rw-r--r-- | server_plugins.php | 127 | ||||
-rw-r--r-- | themes/original/css/theme_right.css.php | 4 | ||||
-rw-r--r-- | themes/pmahomme/css/theme_right.css.php | 4 |
4 files changed, 136 insertions, 5 deletions
diff --git a/libraries/server_links.inc.php b/libraries/server_links.inc.php index dd45f3df67..bbd2ae59f6 100644 --- a/libraries/server_links.inc.php +++ b/libraries/server_links.inc.php @@ -80,7 +80,11 @@ if (!$GLOBALS['is_ajax_request']) { $tabs['charset']['link'] = 'server_collations.php'; $tabs['charset']['text'] = __('Charsets'); - if (!PMA_DRIZZLE) { + if (PMA_DRIZZLE) { + $tabs['plugins']['icon'] = 'b_engine.png'; + $tabs['plugins']['link'] = 'server_plugins.php'; + $tabs['plugins']['text'] = __('Plugins'); + } else { $tabs['engine']['icon'] = 'b_engine.png'; $tabs['engine']['link'] = 'server_engines.php'; $tabs['engine']['text'] = __('Engines'); diff --git a/server_plugins.php b/server_plugins.php new file mode 100644 index 0000000000..d85701c04c --- /dev/null +++ b/server_plugins.php @@ -0,0 +1,127 @@ +<?php +/* vim: set expandtab sw=4 ts=4 sts=4: */ +/** + * + * @package phpMyAdmin + */ + +/** + * no need for variables importing + * @ignore + */ +if (! defined('PMA_NO_VARIABLES_IMPORT')) { + define('PMA_NO_VARIABLES_IMPORT', true); +} + +/** + * requirements + */ +require_once './libraries/common.inc.php'; + +/** + * Does the common work + */ +require './libraries/server_common.inc.php'; + + +/** + * Displays the links + */ +require './libraries/server_links.inc.php'; + + +/** + * Displays the sub-page heading + */ +echo '<h2>' . "\n" + . ($GLOBALS['cfg']['MainPageIconic'] + ? '<img class="icon" src="' . $pmaThemeImage . 'b_engine.png"' + .' width="16" height="16" alt="" />' : '') + . "\n" . __('Plugins') . "\n" + . '</h2>' . "\n"; + + +/** + * Prepare plugin list + */ +$sql = "SELECT p.plugin_name, p.plugin_type, p.is_active, m.module_name, m.module_library, + m.module_version, m.module_author, m.module_description, m.module_license + FROM data_dictionary.plugins p + JOIN data_dictionary.modules m USING (module_name) + ORDER BY m.module_name, p.plugin_type, p.plugin_name"; +$res = PMA_DBI_query($sql); +$modules = array(); +while ($row = PMA_DBI_fetch_assoc($res)) { + $modules[$row['module_name']]['info'] = $row; + $modules[$row['module_name']]['plugins'][$row['plugin_type']][] = $row; +} +PMA_DBI_free_result($res); + +/** + * Displays the page + */ +?> +<table class="data"> +<thead> + <tr> + <th><?php echo __('Module'); ?></th> + <th><?php echo __('Description'); ?></th> + <th><?php echo __('Library'); ?></th> + <th><?php echo __('Version'); ?></th> + <th><?php echo __('Author'); ?></th> + <th><?php echo __('License'); ?></th> + </tr> +</thead> +<tbody> +<?php +$odd_row = false; +foreach ($modules as $module_name => $module) { + $odd_row = !$odd_row; +?> + <tr class="noclick <?php echo $odd_row ? 'odd' : 'even'; ?>"> + <th rowspan="2"><?php echo htmlspecialchars($module_name); ?></th> + <td><?php echo htmlspecialchars($module['info']['module_description']); ?></td> + <td><?php echo htmlspecialchars($module['info']['module_library']); ?></td> + <td><?php echo htmlspecialchars($module['info']['module_version']); ?></td> + <td><?php echo htmlspecialchars($module['info']['module_author']); ?></td> + <td><?php echo htmlspecialchars($module['info']['module_license']); ?></td> + </tr> + <tr class="noclick <?php echo $odd_row ? 'odd' : 'even'; ?>"> + <td colspan="5"> + <table> + <tbody> + <?php + foreach ($module['plugins'] as $plugin_type => $plugin_list) { + ?> + <tr class="noclick"> + <td><b class="plugin-type"><?php echo htmlspecialchars($plugin_type); ?></b></td> + <td> + <?php + for ($i = 0; $i < count($plugin_list); $i++) { + echo ($i != 0 ? '<br />' : '') . htmlspecialchars($plugin_list[$i]['plugin_name']); + if (!$plugin_list[$i]['is_active']) { + echo ' <small class="attention">' . __('disabled') . '</small>'; + } + } + ?> + </td> + </tr> + <?php + } + ?> + </tbody> + </table> + </td> + </tr> +<?php +} +?> +</tbody> +</table> +<?php +/** + * Sends the footer + */ +require './libraries/footer.inc.php'; + +?> diff --git a/themes/original/css/theme_right.css.php b/themes/original/css/theme_right.css.php index 406dc9d8e9..e0a8617478 100644 --- a/themes/original/css/theme_right.css.php +++ b/themes/original/css/theme_right.css.php @@ -273,11 +273,11 @@ table [class=value] { font-family: <?php echo $GLOBALS['cfg']['FontFamilyFixed']; ?>; } <?php } ?> -.value .attention { +.attention { color: red; font-weight: bold; } -.value .allfine { +.allfine { color: green; } diff --git a/themes/pmahomme/css/theme_right.css.php b/themes/pmahomme/css/theme_right.css.php index 5d6c66b3fe..1cfebe553d 100644 --- a/themes/pmahomme/css/theme_right.css.php +++ b/themes/pmahomme/css/theme_right.css.php @@ -445,11 +445,11 @@ table [class=value] { font-family: <?php echo $GLOBALS['cfg']['FontFamilyFixed']; ?>; } <?php } ?> -.value .attention { +.attention { color: red; font-weight: bold; } -.value .allfine { +.allfine { color: green; } |