Skip to content

Commit

Permalink
Fix coding style
Browse files Browse the repository at this point in the history
  • Loading branch information
lem9 committed Oct 11, 2013
1 parent ea5850b commit 26cde1a
Showing 1 changed file with 30 additions and 12 deletions.
42 changes: 30 additions & 12 deletions libraries/TableSearch.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,8 @@ private function _getSubTabs()
*/
private function _getGeometricalInputBox($column_index, $in_fbs)
{
$html_output = '<input type="text" name="criteriaValues[' . $column_index . ']"'
$html_output = '<input type="text" name="criteriaValues['
. $column_index . ']"'
. ' size="40" class="textfield" id="field_' . $column_index . '" />';

if ($in_fbs) {
Expand Down Expand Up @@ -276,7 +277,8 @@ private function _getForeignKeyInputBox($foreignData, $column_name,
$html_output .= '</select>';

} elseif ($foreignData['foreign_link'] == true) {
$html_output .= '<input type="text" id="' . $column_id . $column_index . '"'
$html_output .= '<input type="text" id="' . $column_id
. $column_index . '"'
. ' name="criteriaValues[' . $column_index . ']" id="field_'
. md5($column_name) . '[' . $column_index .']" class="textfield"'
. (isset($criteriaValues[$column_index])
Expand Down Expand Up @@ -500,7 +502,8 @@ private function _getGeomWhereClause($criteriaValues, $names,
// If the function takes two parameters
// create gis data from the criteria input
$gis_data = PMA_Util::createGISData($criteriaValues);
$where = $geom_func . '(' . PMA_Util::backquote($names) . ',' . $gis_data . ')';
$where = $geom_func . '(' . PMA_Util::backquote($names)
. ',' . $gis_data . ')';
return $where;
}

Expand Down Expand Up @@ -677,7 +680,9 @@ private function _generateWhereClause()
// else continue to form the where clause from column criteria values
$fullWhereClause = $charsets = array();
reset($_POST['criteriaColumnOperators']);
while (list($column_index, $operator) = each($_POST['criteriaColumnOperators'])) {
while (list($column_index, $operator) = each(
$_POST['criteriaColumnOperators']
)) {
list($charsets[$column_index]) = explode(
'_', $_POST['criteriaColumnCollations'][$column_index]
);
Expand Down Expand Up @@ -780,7 +785,8 @@ private function _getOptions()
. '</option>' . "\n";
} // end for
$html_output .= '</select>'
. '<input type="checkbox" name="distinct" value="DISTINCT" id="oDistinct" />'
. '<input type="checkbox" name="distinct" value="DISTINCT"'
. ' id="oDistinct" />'
. '<label for="oDistinct">DISTINCT</label></fieldset>';

/**
Expand Down Expand Up @@ -853,8 +859,10 @@ private function _getOptionsZoom($dataLabel)
&& $dataLabel == htmlspecialchars($this->_columnNames[$j])
) {
$html_output .= '<option value="'
. htmlspecialchars($this->_columnNames[$j]) . '" selected="selected">'
. htmlspecialchars($this->_columnNames[$j]) . '</option>';
. htmlspecialchars($this->_columnNames[$j])
. '" selected="selected">'
. htmlspecialchars($this->_columnNames[$j])
. '</option>';
} else {
$html_output .= '<option value="'
. htmlspecialchars($this->_columnNames[$j]) . '" >'
Expand Down Expand Up @@ -934,8 +942,14 @@ private function _getRowsNormal()
$odd_row = true;
$html_output = '';
// for every column present in table
for ($column_index = 0; $column_index < count($this->_columnNames); $column_index++) {
$html_output .= '<tr class="noclick ' . ($odd_row ? 'odd' : 'even') . '">';
for (
$column_index = 0;
$column_index < count($this->_columnNames);
$column_index++
) {
$html_output .= '<tr class="noclick '
. ($odd_row ? 'odd' : 'even')
. '">';
$odd_row = !$odd_row;
//If 'Function' column is present
$html_output .= $this->_getGeomFuncHtml($column_index);
Expand Down Expand Up @@ -989,7 +1003,9 @@ private function _getRowsZoom()
$html_output .= __("Additional search criteria");
$html_output .= '</td></tr>';
}
$html_output .= '<tr class="noclick ' . ($odd_row ? 'odd' : 'even') . '">';
$html_output .= '<tr class="noclick '
. ($odd_row ? 'odd' : 'even')
. '">';
$odd_row = ! $odd_row;
//Select options for column names
$html_output .= '<th><select name="criteriaColumnNames[]" id="'
Expand All @@ -1001,8 +1017,10 @@ private function _getRowsZoom()
&& $_POST['criteriaColumnNames'][$i] == htmlspecialchars($this->_columnNames[$j])
) {
$html_output .= '<option value="'
. htmlspecialchars($this->_columnNames[$j]) . '" selected="selected">'
. htmlspecialchars($this->_columnNames[$j]) . '</option>';
. htmlspecialchars($this->_columnNames[$j])
. '" selected="selected">'
. htmlspecialchars($this->_columnNames[$j])
. '</option>';
} else {
$html_output .= '<option value="'
. htmlspecialchars($this->_columnNames[$j]) . '">'
Expand Down

0 comments on commit 26cde1a

Please sign in to comment.