private function _getRowData($class, $condition_field, $analyzed_sql_results, $meta, $map, $data, $transformation_plugin, $default_function, $nowrap, $where_comparison, $transform_options, $is_field_truncated, $original_length = '')
{
$relational_display = $_SESSION['tmpval']['relational_display'];
$printview = $this->__get('printview');
$decimals = isset($meta->decimals) ? $meta->decimals : '-1';
$result = '<td data-decimals="' . $decimals . '"' . ' data-type="' . $meta->type . '"';
if (!empty($original_length)) {
// cannot use data-original-length
$result .= ' data-originallength="' . $original_length . '"';
}
$result .= ' class="' . $this->_addClass($class, $condition_field, $meta, $nowrap, $is_field_truncated, $transformation_plugin, $default_function) . '">';
if (!empty($analyzed_sql_results['statement']->expr)) {
foreach ($analyzed_sql_results['statement']->expr as $expr) {
if (empty($expr->alias) || empty($expr->column)) {
continue;
}
if (strcasecmp($meta->name, $expr->alias) == 0) {
$meta->name = $expr->column;
}
}
}
if (isset($map[$meta->name])) {
// Field to display from the foreign table?
if (isset($map[$meta->name][2]) && strlen($map[$meta->name][2]) > 0) {
$dispval = $this->_getFromForeign($map, $meta, $where_comparison);
} else {
$dispval = '';
}
// end if... else...
if (isset($printview) && $printview == '1') {
$result .= ($transformation_plugin != $default_function ? $transformation_plugin->applyTransformation($data, $transform_options, $meta) : $default_function($data)) . ' <code>[->' . $dispval . ']</code>';
} else {
if ($relational_display == self::RELATIONAL_KEY) {
// user chose "relational key" in the display options, so
// the title contains the display field
$title = !empty($dispval) ? ' title="' . htmlspecialchars($dispval) . '"' : '';
} else {
$title = ' title="' . htmlspecialchars($data) . '"';
}
$_url_params = array('db' => $map[$meta->name][3], 'table' => $map[$meta->name][0], 'pos' => '0', 'sql_query' => 'SELECT * FROM ' . Util::backquote($map[$meta->name][3]) . '.' . Util::backquote($map[$meta->name][0]) . ' WHERE ' . Util::backquote($map[$meta->name][1]) . $where_comparison);
$result .= '<a class="ajax" href="sql.php' . URL::getCommon($_url_params) . '"' . $title . '>';
if ($transformation_plugin != $default_function) {
// always apply a transformation on the real data,
// not on the display field
$result .= $transformation_plugin->applyTransformation($data, $transform_options, $meta);
} else {
if ($relational_display == self::RELATIONAL_DISPLAY_COLUMN && !empty($map[$meta->name][2])) {
// user chose "relational display field" in the
// display options, so show display field in the cell
$result .= $default_function($dispval);
} else {
// otherwise display data in the cell
$result .= $default_function($data);
}
}
$result .= '</a>';
}
} else {
$result .= $transformation_plugin != $default_function ? $transformation_plugin->applyTransformation($data, $transform_options, $meta) : $default_function($data);
}
$result .= '</td>' . "\n";
return $result;
}