RFE #772991 - shorten dropdown fields
This commit is contained in:
@@ -8,6 +8,8 @@ $Source$
|
||||
2003-08-05 Garvin Hicking <me@supergarv.de>
|
||||
* libraries/common.lib.php3: Moved docu function (PHP3 compatbility)
|
||||
(Bug #782966)
|
||||
* tbl_change.php3: RFE #772991: Shorten dropdown field using
|
||||
$cfg['LimitChars']
|
||||
|
||||
2003-08-05 Michal Cihar <nijel@users.sourceforge.net>
|
||||
* sql.php3: Fixed regular expression.
|
||||
|
@@ -440,8 +440,19 @@ for ($i = 0; $i < $fields_cnt; $i++) {
|
||||
echo "\n";
|
||||
while ($relrow = @PMA_mysql_fetch_array($disp)) {
|
||||
$key = $relrow[$foreign_field];
|
||||
if (strlen($relrow[$foreign_display]) <= $cfg['LimitChars']) {
|
||||
$value = (($foreign_display != FALSE) ? ' - ' . htmlspecialchars($relrow[$foreign_display]) : '');
|
||||
$vtitle = '';
|
||||
} else {
|
||||
$vtitle = htmlspecialchars($relrow[$foreign_display]);
|
||||
$value = (($foreign_display != FALSE) ? ' - ' . htmlspecialchars(substr($vtitle, 0, $cfg['LimitChars']) . '...') : '');
|
||||
}
|
||||
|
||||
echo ' <option value="' . htmlspecialchars($key) . '"';
|
||||
if ($vtitle != '') {
|
||||
echo ' title="' . $vtitle . '"';
|
||||
}
|
||||
|
||||
if ($key == $data) {
|
||||
echo ' selected="selected"';
|
||||
} // end if
|
||||
|
Reference in New Issue
Block a user