diff --git a/ChangeLog b/ChangeLog
index 7f30c2356d..0c547ae2d8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -50,6 +50,10 @@ VerboseMultiSubmit, ReplaceHelpImg
- bug #3527531 [interface] GC-maxlifetime warning incorrectly displayed
- bug #3526916 [interface] Search fails with JS error when tooltips disabled
- bug #3544366 [interface] Event comments not saved
+- bug #3549084 [edit] Can't enter date directly when editing inline
+- bug #3548491 [interface] Inline query editor doesn't work from search results
+- bug #3547825 [edit] BLOB download no longer works
+- bug #3541966 [config] Error in generated configuration arrray
3.5.2.0 (2012-07-07)
- bug #3521416 [interface] JS error when editing index
diff --git a/js/makegrid.js b/js/makegrid.js
index 3edcb7f699..1d2f46139d 100644
--- a/js/makegrid.js
+++ b/js/makegrid.js
@@ -990,6 +990,12 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi
$input_field.val('');
}
$editArea.append('
' + g.cellEditHint + '
');
+
+ // remove {cursor: 'pointer'} added inside timepicker.js
+ $input_field.css('cursor', '');
+ // make the cell editable, so one can can bypass the timepicker
+ // and enter date/time value manually
+ g.isEditCellTextEditable = true;
} else {
g.isEditCellTextEditable = true;
// only append edit area hint if there is a null checkbox
@@ -1613,7 +1619,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi
e.stopPropagation();
}
// prevent default action when clicking on "link" in a table
- if ($(e.target).is('a')) {
+ if ($(e.target).is('.grid_edit a')) {
e.preventDefault();
}
});
diff --git a/libraries/DisplayResults.class.php b/libraries/DisplayResults.class.php
index b28786e615..0045bfb7a9 100644
--- a/libraries/DisplayResults.class.php
+++ b/libraries/DisplayResults.class.php
@@ -71,82 +71,82 @@ class PMA_DisplayResults
// Declare global fields
/** PMA_CommonFunctions object */
private $_common_functions;
-
+
/** array with properties of the class */
private $_property_array = array(
-
+
/** string Database name */
'_db' => null,
-
+
/** string Table name */
'_table' => null,
-
+
/** string the URL to go back in case of errors */
'_goto' => null,
-
+
/** string the SQL query */
'_sql_query' => null,
-
+
/**
* integer the total number of rows returned by the SQL query without any
* appended "LIMIT" clause programmatically
*/
'_unlim_num_rows' => null,
-
+
/** array meta information about fields */
'_fields_meta' => null,
-
+
/** boolean */
'_is_count' => null,
-
+
/** integer */
'_is_export' => null,
-
+
/** boolean */
'_is_func' => null,
-
+
/** integer */
'_is_analyse' => null,
-
+
/** integer the total number of rows returned by the SQL query */
'_num_rows' => null,
-
+
/** integer the total number of fields returned by the SQL query */
'_fields_cnt' => null,
-
+
/** double time taken for execute the SQL query */
'_querytime' => null,
-
+
/** string path for theme images directory */
'_pma_theme_image' => null,
-
+
/** string */
'_text_dir' => null,
-
+
/** boolean */
'_is_maint' => null,
-
+
/** boolean */
'_is_explain' => null,
-
+
/** boolean */
'_is_show' => null,
-
+
/** array table definitions */
'_showtable' => null,
-
+
/** string */
'_printview' => null,
-
+
/** string URL query */
'_url_query' => null,
-
+
/** array column names to highlight */
'_highlight_columns' => null,
-
+
/** array informations used with vertical display mode */
'_vertical_display' => null,
-
+
/** array mime types information of fields */
'_mime_map' => null
);
@@ -176,7 +176,7 @@ class PMA_DisplayResults
* @return void
*/
public function __set($property, $value)
- {
+ {
if(array_key_exists($property, $this->_property_array)) {
$this->_property_array[$property] = $value;
}
@@ -266,7 +266,7 @@ class PMA_DisplayResults
$this->__set('_showtable', $showtable);
$this->__set('_printview', $printview);
$this->__set('_url_query', $url_query);
-
+
} // end of the 'setProperties()' function
@@ -338,7 +338,7 @@ class PMA_DisplayResults
$do_display['bkm_form'] = (string) '0';
$do_display['text_btn'] = (string) '0';
$do_display['pview_lnk'] = (string) '0';
-
+
} elseif ($this->__get('_is_count') || $this->__get('_is_analyse')
|| $this->__get('_is_maint') || $this->__get('_is_explain')
) {
@@ -351,7 +351,7 @@ class PMA_DisplayResults
$do_display['nav_bar'] = (string) '0';
$do_display['ins_row'] = (string) '0';
$do_display['bkm_form'] = (string) '1';
-
+
if ($this->__get('_is_maint')) {
$do_display['text_btn'] = (string) '1';
} else {
@@ -488,7 +488,7 @@ class PMA_DisplayResults
if (!isset($analyzed_sql[0]['select_expr'])) {
$analyzed_sql[0]['select_expr'] = 0;
}
-
+
return ! ($this->__get('_is_count') || $this->__get('_is_export')
|| $this->__get('_is_func') || $this->__get('_is_analyse'))
&& (count($analyzed_sql[0]['select_expr']) == 0)
@@ -2453,7 +2453,7 @@ class PMA_DisplayResults
$vertical_display['data'] = array();
$vertical_display['row_delete'] = array();
$this->__set('_vertical_display', $vertical_display);
-
+
// name of the class added to all grid editable elements
$grid_edit_class = $is_limited_display ? '' : 'grid_edit';
@@ -3650,6 +3650,12 @@ class PMA_DisplayResults
) {
$is_analyse = $this->__get('_is_analyse');
+ $field_flags = PMA_DBI_field_flags($dt_result, $col_index);
+ if (stristr($field_flags, self::BINARY_FIELD)
+ && $GLOBALS['cfg']['ProtectBinary'] === 'all'
+ ) {
+ $class = str_replace('grid_edit', '', $class);
+ }
if (! isset($column) || is_null($column)) {
@@ -3669,10 +3675,7 @@ class PMA_DisplayResults
$is_field_truncated = true;
}
- // displays special characters from binaries
- $field_flags = PMA_DBI_field_flags($dt_result, $col_index);
$formatted = false;
-
if (isset($meta->_type) && $meta->_type === MYSQLI_TYPE_BIT) {
$column = $this->getCommonFunctions()->printableBitValue(
@@ -4256,7 +4259,7 @@ class PMA_DisplayResults
public function getTable(
&$dt_result, &$the_disp_mode, $analyzed_sql, $is_limited_display = false
) {
-
+
$table_html = '';
// Following variable are needed for use in isset/empty or
// use with array indexes/safe use in foreach
@@ -5488,7 +5491,7 @@ class PMA_DisplayResults
. 'backquote($db) . '.' . $common_functions->backquote($table);
$show_create_table = PMA_DBI_fetch_value($show_create_table_query, 0, 1);
@@ -605,7 +603,7 @@ function PMA_getForeigners($db, $table, $column = '', $source = 'both')
*/
function PMA_getDisplayField($db, $table)
{
-
+
$common_functions = PMA_CommonFunctions::getInstance();
$cfgRelation = PMA_getRelationsParam();
@@ -686,7 +684,7 @@ function PMA_getComments($db, $table = '')
*/
function PMA_getDbComment($db)
{
-
+
$common_functions = PMA_CommonFunctions::getInstance();
$cfgRelation = PMA_getRelationsParam();
$comment = '';
@@ -720,7 +718,7 @@ function PMA_getDbComment($db)
*/
function PMA_getDbComments()
{
-
+
$common_functions = PMA_CommonFunctions::getInstance();
$cfgRelation = PMA_getRelationsParam();
$comments = array();
@@ -756,7 +754,7 @@ function PMA_getDbComments()
*/
function PMA_setDbComment($db, $comment = '')
{
-
+
$common_functions = PMA_CommonFunctions::getInstance();
$cfgRelation = PMA_getRelationsParam();
@@ -806,9 +804,9 @@ function PMA_setDbComment($db, $comment = '')
*/
function PMA_setHistory($db, $table, $username, $sqlquery)
{
-
+
$common_functions = PMA_CommonFunctions::getInstance();
-
+
if (strlen($sqlquery) > $GLOBALS['cfg']['MaxCharactersInDisplayedSQL']) {
return;
}
@@ -868,7 +866,7 @@ function PMA_setHistory($db, $table, $username, $sqlquery)
*/
function PMA_getHistory($username)
{
-
+
$common_functions = PMA_CommonFunctions::getInstance();
$cfgRelation = PMA_getRelationsParam();
@@ -901,7 +899,7 @@ function PMA_getHistory($username)
*/
function PMA_purgeHistory($username)
{
-
+
$common_functions = PMA_CommonFunctions::getInstance();
$cfgRelation = PMA_getRelationsParam();
if (! $GLOBALS['cfg']['QueryHistoryDB'] || ! $cfgRelation['historywork']) {
@@ -1089,9 +1087,9 @@ function PMA_foreignDropdown($disp_row, $foreign_field, $foreign_display, $data,
function PMA_getForeignData($foreigners, $field, $override_total, $foreign_filter, $foreign_limit)
{
-
+
$common_functions = PMA_CommonFunctions::getInstance();
-
+
// we always show the foreign field in the drop-down; if a display
// field is defined, we show it besides the foreign field
$foreign_link = false;
@@ -1189,7 +1187,7 @@ function PMA_getRelatives($all_tables, $master)
} else {
$from = 'foreign';
$to = 'master';
- }
+ }
$in_know = '(\'' . implode('\', \'', $known_tables) . '\')';
$in_left = '(\'' . implode('\', \'', $remaining_tables) . '\')';
$rel_query = 'SELECT *'
@@ -1240,7 +1238,7 @@ function PMA_getRelatives($all_tables, $master)
*/
function PMA_REL_renameField($db, $table, $field, $new_name)
{
-
+
$common_functions = PMA_CommonFunctions::getInstance();
$cfgRelation = PMA_getRelationsParam();
@@ -1296,9 +1294,9 @@ function PMA_REL_renameSingleTable($table,
$source_table, $target_table,
$db_field, $table_field
) {
-
+
$common_functions = PMA_CommonFunctions::getInstance();
-
+
$query = 'UPDATE '
. $common_functions->backquote($GLOBALS['cfgRelation']['db']) . '.'
. $common_functions->backquote($GLOBALS['cfgRelation'][$table])
@@ -1401,9 +1399,9 @@ function PMA_REL_renameTable($source_db, $target_db, $source_table, $target_tabl
*/
function PMA_REL_createPage($newpage, $cfgRelation, $db)
{
-
+
$common_functions = PMA_CommonFunctions::getInstance();
-
+
if (! isset($newpage) || $newpage == '') {
$newpage = __('no description');
}
@@ -1415,7 +1413,7 @@ function PMA_REL_createPage($newpage, $cfgRelation, $db)
. $common_functions->sqlAddSlashes($db) . '\', \''
. $common_functions->sqlAddSlashes($newpage) . '\')';
PMA_queryAsControlUser($ins_query, false);
-
+
return PMA_DBI_insert_id(
isset($GLOBALS['controllink']) ? $GLOBALS['controllink'] : ''
);
diff --git a/setup/lib/ConfigGenerator.class.php b/setup/lib/ConfigGenerator.class.php
index 4db2f7385c..8dc359bb7c 100644
--- a/setup/lib/ConfigGenerator.class.php
+++ b/setup/lib/ConfigGenerator.class.php
@@ -142,9 +142,9 @@ class ConfigGenerator
$ret .= implode(', ', $retv);
} else {
// more than 4 values - value per line
- $imax = count($retv)-1;
- for ($i = 0; $i <= $imax; $i++) {
- $ret .= ($i < $imax ? ($i > 0 ? ',' : '') : '') . $crlf . ' ' . $retv[$i];
+ $imax = count($retv);
+ for ($i = 0; $i < $imax; $i++) {
+ $ret .= ($i > 0 ? ',' : '') . $crlf . ' ' . $retv[$i];
}
}
$ret .= ')';