Skip to content

Commit

Permalink
Resolved conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
Chanaka committed Jun 27, 2012
2 parents 7664661 + 9d2a8ca commit 1cc49d3
Show file tree
Hide file tree
Showing 104 changed files with 120,848 additions and 118,612 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ VerboseMultiSubmit, ReplaceHelpImg
- bug #3531586 [unterface] Add user form prints JSON when user presses enter
- bug #3534121 [config] duplicate line in config.sample.inc.php
- bug #3534311 [interface] Grid editing incorrectly parses ENUM/SET values
- bug #3510196 [core] More clever URL rewriting with ForceSSL

3.5.1.0 (2012-05-03)
- bug #3510784 [edit] Limit clause ignored when sort order is remembered
Expand Down
8 changes: 6 additions & 2 deletions js/db_search.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function loadResult(result_path, table_name, link, ajaxEnable)
$(function() {
if(ajaxEnable) {
/** Hides the results shown by the delete criteria */
var $msg = PMA_ajaxShowMessage();
var $msg = PMA_ajaxShowMessage(PMA_messages['strBrowsing'], false);
$('#sqlqueryform').hide();
$('#togglequerybox').hide();
/** Load the browse results to the page */
Expand Down Expand Up @@ -81,11 +81,15 @@ function deleteResult(result_path, msg, ajaxEnable)
/** Refresh the search results after the deletion */
document.getElementById('buttonGo').click();
$('#togglequerybox').html(PMA_messages['strHideQueryBox']);
PMA_ajaxRemoveMessage($msg);
/** Show the results of the deletion option */
$('#browse-results').show();
$('#sqlqueryform').show();
$('#togglequerybox').show();
$('html, body')
.animate({
scrollTop: $("#browse-results").offset().top
}, 1000);
PMA_ajaxRemoveMessage($msg);
});
} else {
event.preventDefault();
Expand Down
43 changes: 0 additions & 43 deletions js/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -2494,49 +2494,6 @@ $(function() {
}); //end of Drop Database Ajax action
}); // end of $() for Drop Database

/**
* Attach Ajax event handlers for 'Create Database'. Used wherever libraries/
* display_create_database.lib.php is used, ie main.php and server_databases.php
*
* @see $cfg['AjaxEnable']
*/
$(function() {

$('#create_database_form.ajax').live('submit', function(event) {
event.preventDefault();

$form = $(this);

PMA_ajaxShowMessage(PMA_messages['strProcessingRequest']);
PMA_prepareForAjaxRequest($form);

$.post($form.attr('action'), $form.serialize(), function(data) {
if (data.success == true) {
PMA_ajaxShowMessage(data.message);

//Append database's row to table
$("#tabledatabases")
.find('tbody')
.append(data.new_db_string)
.PMA_sort_table('.name')
.find('#db_summary_row')
.appendTo('#tabledatabases tbody')
.removeClass('odd even');

var $databases_count_object = $('#databases_count');
var databases_count = parseInt($databases_count_object.text()) + 1;
$databases_count_object.text(databases_count);
//Refresh navigation frame as a new database has been added
if (window.parent && window.parent.frame_navigation) {
window.parent.frame_navigation.location.reload();
}
} else {
PMA_ajaxShowMessage(data.error, false);
}
}); // end $.post()
}); // end $().live()
}); // end $() for Create Database

/**
* Validates the password field in a form
*
Expand Down
56 changes: 54 additions & 2 deletions js/server_databases.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ $(function() {
*/
var selected_dbs = [];
$form.find('input:checkbox:checked').each(function () {
$(this).closest('tr').addClass('removeMe');
selected_dbs[selected_dbs.length] = 'DROP DATABASE `' + escapeHtml($(this).val()) + '`;';
});
if (! selected_dbs.length) {
Expand All @@ -55,14 +56,65 @@ $(function() {
$.post(url, function(data) {
if(data.success == true) {
PMA_ajaxShowMessage(data.message);

var $rowsToRemove = $form.find('tr.removeMe');
var $databasesCount = $('#databases_count');
var newCount = parseInt($databasesCount.text()) - $rowsToRemove.length;
$databasesCount.text(newCount);

$rowsToRemove.remove();
$form.find('tbody').PMA_sort_table('.name');
if (window.parent && window.parent.frame_navigation) {
window.parent.frame_navigation.location.reload();
}
$('#tableslistcontainer').load('server_databases.php form#dbStatsForm');
} else {
PMA_ajaxShowMessage(PMA_messages.strErrorProcessingRequest + ": " + data.error, false);
$form.find('tr.removeMe').removeClass('removeMe');
PMA_ajaxShowMessage(data.error, false);
}
}); // end $.post()
}); // end $.PMA_confirm()
}) ; //end of Drop Database action

/**
* Attach Ajax event handlers for 'Create Database'.
*
* @see $cfg['AjaxEnable']
*/
$('#create_database_form.ajax').live('submit', function(event) {
event.preventDefault();

$form = $(this);

var newDbNameInput = $form.find('input[name=new_db]');
if (newDbNameInput.val() === '') {
newDbNameInput.focus();
alert(PMA_messages['strFormEmpty']);
return;
}

PMA_ajaxShowMessage(PMA_messages['strProcessingRequest']);
PMA_prepareForAjaxRequest($form);

$.post($form.attr('action'), $form.serialize(), function(data) {
if (data.success == true) {
PMA_ajaxShowMessage(data.message);

//Append database's row to table
$("#tabledatabases")
.find('tbody')
.append(data.new_db_string)
.PMA_sort_table('.name');

var $databases_count_object = $('#databases_count');
var databases_count = parseInt($databases_count_object.text()) + 1;
$databases_count_object.text(databases_count);
//Refresh navigation frame as a new database has been added
if (window.parent && window.parent.frame_navigation) {
window.parent.frame_navigation.location.reload();
}
} else {
PMA_ajaxShowMessage(data.error, false);
}
}); // end $.post()
}); // end $().live()
}); // end $()
16 changes: 8 additions & 8 deletions libraries/DisplayResults.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -4651,7 +4651,7 @@ private function _handleNonPrintableContents(
* @param string $default_function default function
* @param string $nowrap 'nowrap' if the content should not be
* wrapped
* @param string $where_comparison data for the where cluase
* @param string $where_comparison data for the where clause
* @param array $transform_options array of options for transformation
* @param bool $is_field_truncated whether the field is truncated
*
Expand Down Expand Up @@ -4831,8 +4831,8 @@ private function _getRowData(
* @param array $is_display array with explicit indexes for all
* the display elements
* @param string $row_no the row number
* @param string $where_clause_html url encoded where cluase
* @param array $condition_array array of conditions in the where cluase
* @param string $where_clause_html url encoded where clause
* @param array $condition_array array of conditions in the where clause
* @param string $del_query delete query
* @param string $id_suffix suffix for the id
* @param string $class css classes for the td element
Expand Down Expand Up @@ -4883,8 +4883,8 @@ private function _getCheckboxForMultiRowSubmissions(
* @param string $edit_url edit url
* @param string $class css classes for td element
* @param string $edit_str text for the edit link
* @param string $where_clause where cluase
* @param string $where_clause_html url encoded where cluase
* @param string $where_clause where clause
* @param string $where_clause_html url encoded where clause
*
* @return string the generated HTML
*
Expand Down Expand Up @@ -4925,7 +4925,7 @@ private function _getEditLink(
* @param string $copy_url copy url
* @param string $copy_str text for the copy link
* @param string $where_clause where clause
* @param string $where_clause_html url encoded where cluase
* @param string $where_clause_html url encoded where clause
* @param string $class css classes for the td element
*
* @return string the generated HTML
Expand Down Expand Up @@ -5014,8 +5014,8 @@ private function _getDeleteLink($del_url, $del_str, $js_conf, $class)
* display elements
* @param string $row_no row number
* @param string $where_clause where clause
* @param string $where_clause_html url encoded where cluase
* @param array $condition_array array of conditions in the where cluase
* @param string $where_clause_html url encoded where clause
* @param array $condition_array array of conditions in the where clause
* @param string $del_query delete query
* @param string $id_suffix suffix for the id
* @param string $edit_url edit url
Expand Down
3 changes: 2 additions & 1 deletion libraries/Error_Handler.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,8 @@ public function getDispErrors()
} else {
ob_start();
var_dump($error);
$retval .= ob_end_clean();
$retval .= ob_get_contents();
ob_end_clean();
}
}
} else {
Expand Down
3 changes: 2 additions & 1 deletion libraries/File.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,8 @@ function setName($name)
/**
* Gets file content
*
* @return string binary file content
* @return mixed the binary file content as a string,
* or false if no content
*
* @access public
*/
Expand Down
6 changes: 4 additions & 2 deletions libraries/Footer.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,8 @@ private function _getDebugMessage()

ob_start();
print_r($_SESSION['debug']);
$retval .= ob_end_clean();
$retval .= ob_get_contents();
ob_end_clean();

$retval .= '</pre>';
$retval .= '</div>';
Expand Down Expand Up @@ -322,7 +323,8 @@ public function getDisplay()
if (file_exists(CUSTOM_FOOTER_FILE)) {
ob_start();
include CUSTOM_FOOTER_FILE;
$retval .= ob_end_clean();
$retval .= ob_get_contents();
ob_end_clean();
}
} else if (! $this->_isAjax) {
$retval .= "</body></html>";
Expand Down
3 changes: 2 additions & 1 deletion libraries/Header.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,8 @@ public function getDisplay()
if (file_exists(CUSTOM_HEADER_FILE)) {
ob_start();
include CUSTOM_HEADER_FILE;
$retval .= ob_end_clean();
$retval .= ob_get_contents();
ob_end_clean();
}
// offer to load user preferences from localStorage
if ($this->_userprefsOfferImport) {
Expand Down
2 changes: 1 addition & 1 deletion libraries/Menu.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ private function _getMenu()
} else {
$tabs = $this->_getServerTabs();
}
return $this->getCommonFunctions()->generateHtmlTabs($tabs, $url_params);
return $this->getCommonFunctions()->getHtmlTabs($tabs, $url_params);
}

/**
Expand Down
1 change: 1 addition & 0 deletions libraries/Scripts.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ public function getDisplay()
foreach ($this->_files as $file) {
$retval .= $this->_includeFile(
$file['filename'],
$file['timestamp'],
$file['conditional_ie']
);
}
Expand Down
2 changes: 1 addition & 1 deletion libraries/TableSearch.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1106,7 +1106,7 @@ public function getSelectionForm($goto, $dataLabel = null)
$url_params['db'] = $this->_db;
$url_params['table'] = $this->_table;

$html_output .= $this->getCommonFunctions()->generateHtmlTabs(
$html_output .= $this->getCommonFunctions()->getHtmlTabs(
$this->_getSubTabs(), $url_params, 'topmenu2'
);
$html_output .= $this->_getFormTag($goto);
Expand Down
20 changes: 9 additions & 11 deletions libraries/common.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -1774,7 +1774,7 @@ public function localisedDate($timestamp = -1, $format = '')
*
* @access public
*/
public function generateHtmlTab($tab, $url_params = array())
public function getHtmlTab($tab, $url_params = array())
{
// default values
$defaults = array(
Expand Down Expand Up @@ -1865,7 +1865,7 @@ public function generateHtmlTab($tab, $url_params = array())

$out .= '</li>';
return $out;
} // end of the 'generateHtmlTab()' function
} // end of the 'getHtmlTab()' function


/**
Expand All @@ -1877,14 +1877,14 @@ public function generateHtmlTab($tab, $url_params = array())
*
* @return string html-code for tab-navigation
*/
public function generateHtmlTabs($tabs, $url_params, $menu_id = 'topmenu')
public function getHtmlTabs($tabs, $url_params, $menu_id = 'topmenu')
{
$tab_navigation = '<div id="' . htmlentities($menu_id)
. 'container" class="menucontainer">'
.'<ul id="' . htmlentities($menu_id) . '">';

foreach ($tabs as $tab) {
$tab_navigation .= $this->generateHtmlTab($tab, $url_params);
$tab_navigation .= $this->getHtmlTab($tab, $url_params);
}

$tab_navigation .=
Expand Down Expand Up @@ -2287,8 +2287,7 @@ public function getUniqueCondition($handle, $fields_cnt, $fields_meta, $row,
&& ($meta->type != 'timestamp')
&& ($meta->type != 'real')
) {

$con_val = '= ' . $row[$i];
$con_val = '= ' . $row[$i];

} elseif ((($meta->type == 'blob') || ($meta->type == 'string'))
// hexify only if this is a true not empty BLOB or a BINARY
Expand Down Expand Up @@ -2318,17 +2317,16 @@ public function getUniqueCondition($handle, $fields_cnt, $fields_meta, $row,
}

} elseif ($meta->type == 'bit') {

$con_val = "= b'"
. $this->printableBitValue($row[$i], $meta->length) . "'";

} else {
$con_val = '= \'' . $this->sqlAddSlashes($row[$i], false, true) . '\'';
}
}
}

if ($con_val != null) {

$condition .= $con_val . ' AND';

if ($meta->primary_key > 0) {
Expand Down
1 change: 1 addition & 0 deletions libraries/error.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
header('Content-Type: text/html; charset=utf-8');
}

include_once 'libraries/Response.class.php';
PMA_Response::getInstance()->disable();

?>
Expand Down
3 changes: 1 addition & 2 deletions libraries/gis/pma_gis_geometrycollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function scaleRow($spatial)

// Trim to remove leading 'GEOMETRYCOLLECTION(' and trailing ')'
$goem_col = substr($spatial, 19, (strlen($spatial) - 20));

// Split the geometry collection object to get its constituents.
$sub_parts = $this->_explodeGeomCol($goem_col);

Expand Down Expand Up @@ -323,7 +323,6 @@ public function generateParams($value)
foreach ($sub_parts as $sub_part) {
$type_pos = stripos($sub_part, '(');
$type = substr($sub_part, 0, $type_pos);

$gis_obj = PMA_GIS_Factory::factory($type);
if (! $gis_obj) {
continue;
Expand Down
2 changes: 1 addition & 1 deletion libraries/gis_visualization.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ function PMA_GIS_modifyQuery($sql_query, $visualizationSettings)
}
}
}
// If select cluase is *
// If select clause is *
} else {
// If label column is chosen add it to the query
if (isset($visualizationSettings['labelColumn'])
Expand Down
Loading

0 comments on commit 1cc49d3

Please sign in to comment.