1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-08 07:36:44 +02:00

Plugin which shows sql structure comments in field names title

This commit is contained in:
Adam Kusmierz
2016-12-20 09:43:55 +01:00
committed by Jakub Vrana
parent cbd3adc564
commit fd3d1c7e2e

View File

@@ -0,0 +1,14 @@
<?php
/** Show comments of sql structure in more places (mainly where you edit things)
* @link https://www.adminer.org/plugins/#use
* @author Adam Kuśmierz, http://kusmierz.be/
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
*/
class AdminerStructComments {
function fieldName(&$field, $order = 0) {
return '<span title="' . h($field["full_type"]) . (!empty($field["comment"]) ? ': ' . $field["comment"] : '') . '">' . h($field["field"]) . '</span>';
}
}