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

Save memory

This commit is contained in:
Jakub Vrana
2011-01-20 23:12:34 +01:00
parent 33aec2c764
commit ef9d6d4512
2 changed files with 10 additions and 2 deletions

View File

@@ -106,7 +106,15 @@ function referencable_primary($self) {
* @return null
*/
function textarea($name, $value, $rows = 10, $cols = 80) {
echo "<textarea name='$name' rows='$rows' cols='$cols' style='width: 98%;' spellcheck='false' onkeypress='return textareaKeypress(this, event, true);'>" . h($value) . "</textarea>"; // spellcheck - not valid before HTML5
echo "<textarea name='$name' rows='$rows' cols='$cols' style='width: 98%;' spellcheck='false' onkeypress='return textareaKeypress(this, event, true);'>"; // spellcheck - not valid before HTML5
if (is_array($value)) {
foreach ($value as $val) { // not implode() to save memory
echo h($val) . ";\n\n\n"; // rtrim(, ';') would possibly damage DELIMITER
}
} else {
echo h($value);
}
echo "</textarea>";
}
/** Format time difference