2011-03-01 15:47:01 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/** Use <textarea> for char and varchar
|
2015-09-08 16:23:25 +00:00
|
|
|
* @link https://www.adminer.org/plugins/#use
|
2017-02-27 12:43:33 +00:00
|
|
|
* @author Jakub Vrana, https://www.vrana.cz/
|
2011-03-01 15:47:01 +00:00
|
|
|
* @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 AdminerEditTextarea {
|
2013-07-24 23:26:41 +00:00
|
|
|
|
2011-03-01 15:47:01 +00:00
|
|
|
function editInput($table, $field, $attrs, $value) {
|
2013-07-24 23:26:41 +00:00
|
|
|
if (preg_match('~char~', $field["type"])) {
|
2011-03-21 12:53:48 +00:00
|
|
|
return "<textarea cols='30' rows='1' style='height: 1.2em;'$attrs>" . h($value) . '</textarea>';
|
2011-03-01 15:47:01 +00:00
|
|
|
}
|
|
|
|
}
|
2013-07-24 23:26:41 +00:00
|
|
|
|
2011-03-01 15:47:01 +00:00
|
|
|
}
|