PMA\libraries\DisplayResults::_getCommentForRow PHP Method

_getCommentForRow() private method

Get comment for row
See also: _getTableHeaders()
private _getCommentForRow ( array $comments_map, array $fields_meta ) : string
$comments_map array comments array
$fields_meta array set of field properties
return string $comment html content
    private function _getCommentForRow($comments_map, $fields_meta)
    {
        $comments = '';
        if (isset($comments_map[$fields_meta->table]) && isset($comments_map[$fields_meta->table][$fields_meta->name])) {
            $sanitized_comments = htmlspecialchars($comments_map[$fields_meta->table][$fields_meta->name]);
            $comments = '<span class="tblcomment" title="' . $sanitized_comments . '">';
            $limitChars = $GLOBALS['cfg']['LimitChars'];
            if (mb_strlen($sanitized_comments) > $limitChars) {
                $sanitized_comments = mb_substr($sanitized_comments, 0, $limitChars) . '…';
            }
            $comments .= $sanitized_comments;
            $comments .= '</span>';
        }
        return $comments;
    }
DisplayResults