diff --git a/ChangeLog b/ChangeLog index 9f1635c3ac..c249cd17e7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -50,6 +50,12 @@ VerboseMultiSubmit, ReplaceHelpImg - bug #3522930 [browse] Missing validation in Ajax mode - bug Fix popup message on build SQL of import - bug #3523499 [core] Make X-WebKit-CSP work better +- replace Highcharts with jqplot for query profiling, zoom search +- bug #3531584 [interface] No form validation in change password dialog +- bug #3531585 [interface] Broken password validation in copy user form +- 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 3.5.1.0 (2012-05-03) - bug #3510784 [edit] Limit clause ignored when sort order is remembered diff --git a/Documentation.html b/Documentation.html index 307a24a41c..b30cbd54e3 100644 --- a/Documentation.html +++ b/Documentation.html @@ -2700,9 +2700,8 @@ setfacl -d -m "g:www-data:rwx" tmp

This seems to be a PWS bug. Filippo Simoncini found a workaround (at this time there is no better fix): remove or comment the DOCTYPE - declarations (2 lines) from the scripts libraries/header.inc.php, - libraries/header_printview.inc.php, index.php, - navigation.php and libraries/common.lib.php.

+ declarations (2 lines) from the scripts libraries/Header.class.php + and index.php.

1.7 How can I GZip or Bzip a dump or a @@ -3298,9 +3297,9 @@ RewriteRule .* - [F] $cfg['ThemeDefault'].

Under $cfg['ThemePath'], you - should not delete the directory "original" or its underlying + should not delete the directory "pmahomme" or its underlying structure, because this is the system theme used by phpMyAdmin. - "original" contains all images and styles, for backwards + "pmahomme" contains all images and styles, for backwards compatibility and for all themes that would not include images or css-files.

@@ -3313,7 +3312,7 @@ RewriteRule .* - [F]
'; // show "configuration saved" message and reload navigation frame if needed if (!empty($_GET['saved'])) { - $message = PMA_Message::rawSuccess(__('Configuration has been saved')); - $message->display(); + PMA_Message::rawSuccess(__('Configuration has been saved'))->display(); } /* debug code @@ -65,6 +64,8 @@ $msg->display(); $cfgRelation = PMA_getRelationsParam(); if (! $cfgRelation['userconfigwork']) { $msg = __('Your preferences will be saved for current session only. Storing them permanently requires %sphpMyAdmin configuration storage%s.'); - $msg = PMA_sanitize(sprintf($msg, '[a@./Documentation.html#linked-tables@_blank]', '[/a]')); + $msg = PMA_sanitize( + sprintf($msg, '[a@./Documentation.html#linked-tables@_blank]', '[/a]') + ); PMA_Message::notice($msg)->display(); } diff --git a/libraries/user_preferences.lib.php b/libraries/user_preferences.lib.php index 8ab0a160c1..6c9e51b451 100644 --- a/libraries/user_preferences.lib.php +++ b/libraries/user_preferences.lib.php @@ -159,7 +159,7 @@ function PMA_apply_userprefs(array $config_data) if (! isset($whitelist[$path]) || isset($blacklist[$path])) { continue; } - PMA_array_write($path, $cfg, $value); + PMA_arrayWrite($path, $cfg, $value); } return $cfg; } @@ -270,29 +270,42 @@ function PMA_userprefs_redirect(array $forms, array $old_settings, $file_name, } /** - * Shows form which allows to quickly load settings stored in browser's local storage + * Shows form which allows to quickly load + * settings stored in browser's local storage * + * @return string */ -function PMA_userprefs_autoload_header() +function PMA_userprefsAutoloadGetHeader() { - if (isset($_REQUEST['prefs_autoload']) && $_REQUEST['prefs_autoload'] == 'hide') { + $retval = ''; + + if (isset($_REQUEST['prefs_autoload']) + && $_REQUEST['prefs_autoload'] == 'hide' + ) { $_SESSION['userprefs_autoload'] = true; - exit; + } else { + $script_name = basename(basename($GLOBALS['PMA_PHP_SELF'])); + $return_url = htmlspecialchars( + $script_name . '?' . http_build_query($_GET, '', '&') + ); + + $retval .= ''; } - $script_name = basename(basename($GLOBALS['PMA_PHP_SELF'])); - $return_url = $script_name . '?' . http_build_query($_GET, '', '&'); - ?> - - diff --git a/main.php b/main.php index 9dc61bdf67..fdc2d86ffe 100644 --- a/main.php +++ b/main.php @@ -18,15 +18,15 @@ require_once 'libraries/display_git_revision.lib.php'; if ($GLOBALS['PMA_Config']->isGitRevision()) { if (isset($_REQUEST['git_revision']) && $GLOBALS['is_ajax_request'] == true) { PMA_printGitRevision(); + exit; } - PMA_AddJSVar('is_git_revision', true); + PMA_addJSVar('is_git_revision', true); } // Handles some variables that may have been sent by the calling script $GLOBALS['db'] = ''; $GLOBALS['table'] = ''; $show_query = '1'; -require_once 'libraries/header.inc.php'; // Any message to display? if (! empty($message)) { @@ -329,14 +329,14 @@ if (file_exists('config')) { if ($server > 0) { $cfgRelation = PMA_getRelationsParam(); if (! $cfgRelation['allworks'] && $cfg['PmaNoRelation_DisableWarning'] == false) { - $message = PMA_Message::notice(__('The phpMyAdmin configuration storage is not completely configured, some extended features have been deactivated. To find out why click %shere%s.')); - $message->addParam('', false); - $message->addParam('', false); + $msg = PMA_Message::notice(__('The phpMyAdmin configuration storage is not completely configured, some extended features have been deactivated. To find out why click %shere%s.')); + $msg->addParam('', false); + $msg->addParam('', false); /* Show error if user has configured something, notice elsewhere */ if (!empty($cfg['Servers'][$server]['pmadb'])) { - $message->isError(true); + $msg->isError(true); } - $message->display(); + $msg->display(); } // end if } @@ -452,9 +452,4 @@ function PMA_printListItem($name, $id = null, $url = null, $mysql_help_page = nu } echo ''; } - -/** - * Displays the footer - */ -require 'libraries/footer.inc.php'; ?> diff --git a/navigation.php b/navigation.php index a341fd89b9..17d649b6da 100644 --- a/navigation.php +++ b/navigation.php @@ -12,13 +12,13 @@ require_once 'libraries/common.inc.php'; /** - * finish and cleanup navigation.php script execution, only to be used in navigation.php + * finish and cleanup navigation.php script execution, + * only to be used in navigation.php * * @access private */ function PMA_exitNavigationFrame() { - echo ''; exit; } @@ -29,14 +29,21 @@ require_once 'libraries/RecentTable.class.php'; * Check if it is an ajax request to reload the recent tables list. */ if ($GLOBALS['is_ajax_request'] && $_REQUEST['recent_table']) { - PMA_ajaxResponse('', true, array('options' => PMA_RecentTable::getInstance()->getHtmlSelectOption())); + $response = PMA_Response::getInstance(); + $response->addJSON( + 'options', + PMA_RecentTable::getInstance()->getHtmlSelectOption() + ); + exit; } // keep the offset of the db list in session before closing it if (! isset($_SESSION['tmp_user_values']['navi_limit_offset'])) { $_SESSION['tmp_user_values']['navi_limit_offset'] = 0; } -if (! isset($_SESSION['tmp_user_values']['table_limit_offset']) || $_SESSION['tmp_user_values']['table_limit_offset_db'] != $db) { +if (! isset($_SESSION['tmp_user_values']['table_limit_offset']) + || $_SESSION['tmp_user_values']['table_limit_offset_db'] != $db +) { $_SESSION['tmp_user_values']['table_limit_offset'] = 0; $_SESSION['tmp_user_values']['table_limit_offset_db'] = $db; } @@ -55,13 +62,6 @@ if (empty($_SESSION['debug'])) { session_write_close(); } -/** - * the output compression library - */ -require_once 'libraries/ob.lib.php'; - -PMA_outBufferPre(); - /* * selects the database if there is only one on current server */ @@ -76,41 +76,14 @@ $db_start = $GLOBALS['db']; */ $cfgRelation = PMA_getRelationsParam(); -/** - * For re-usability, moved http-headers to a seperate file. - * It can now be included by libraries/header.inc.php, querywindow.php. - */ -require_once 'libraries/header_http.inc.php'; - -/* - * Displays the frame - */ -// xml declaration moves IE into quirks mode, making much trouble with CSS -/* echo ''; */ -?> - - - - - - - phpMyAdmin - - - - getId())); - ?> - - - - +'); - -' . __('No databases') . '

'; PMA_exitNavigationFrame(); -} elseif ($GLOBALS['cfg']['LeftFrameLight'] && count($GLOBALS['pma']->databases) > 1) { +} elseif ($GLOBALS['cfg']['LeftFrameLight'] + && count($GLOBALS['pma']->databases) > 1 +) { $list = $cfg['DisplayDatabasesList']; if ($list === 'auto') { if (empty($GLOBALS['db'])) { @@ -224,8 +185,9 @@ if (! $GLOBALS['server']) { // Don't display expansible/collapsible database info if: // 1. $GLOBALS['server'] == 0 (no server selected) // This is the case when there are multiple servers and -// '$GLOBALS['cfg']['ServerDefault'] = 0' is set. In that case, we want the welcome -// screen to appear with no database info displayed. +// '$GLOBALS['cfg']['ServerDefault'] = 0' is set. +// In that case, we want the welcome screen to appear with no database +// info displayed. // 2. there is only one database available (ie either only one database exists // or $GLOBALS['cfg']['Servers']['only_db'] is defined and is not an array) // In this case, the database should not be collapsible/expandable @@ -240,7 +202,12 @@ $element_counter = 0; if ($GLOBALS['cfg']['LeftFrameLight'] && strlen($GLOBALS['db'])) { - $table_list = PMA_getTableList($GLOBALS['db'], null, $tpos, $cfg['MaxTableList']); + $table_list = PMA_getTableList( + $GLOBALS['db'], + null, + $tpos, + $cfg['MaxTableList'] + ); $table_count = PMA_getTableCount($GLOBALS['db']); // show selected databasename as link to DefaultTabDatabase-page @@ -281,18 +248,28 @@ if ($GLOBALS['cfg']['LeftFrameLight'] && strlen($GLOBALS['db'])) { */ if (! empty($table_list)) { // upper table list paginator - if (count($table_list) <= $GLOBALS['cfg']['MaxTableList'] && $table_count > $GLOBALS['cfg']['MaxTableList']) { + if (count($table_list) <= $GLOBALS['cfg']['MaxTableList'] + && $table_count > $GLOBALS['cfg']['MaxTableList'] + ) { $_url_params = array( 'tpos' => 'true', 'pos' => $tpos, 'db' => $GLOBALS['db'] ); - PMA_listNavigator($table_count, $tpos, $_url_params, 'navigation.php', 'frame_navigation', $GLOBALS['cfg']['MaxTableList']); + PMA_listNavigator( + $table_count, $tpos, $_url_params, 'navigation.php', + 'frame_navigation', $GLOBALS['cfg']['MaxTableList'] + ); } PMA_displayTableList($table_list, true, '', $GLOBALS['db']); // lower table list paginator - if (count($table_list) <= $GLOBALS['cfg']['MaxTableList'] && $table_count > $GLOBALS['cfg']['MaxTableList']) { - PMA_listNavigator($table_count, $tpos, $_url_params, 'navigation.php', 'frame_navigation', $GLOBALS['cfg']['MaxTableList']); + if (count($table_list) <= $GLOBALS['cfg']['MaxTableList'] + && $table_count > $GLOBALS['cfg']['MaxTableList'] + ) { + PMA_listNavigator( + $table_count, $tpos, $_url_params, 'navigation.php', + 'frame_navigation', $GLOBALS['cfg']['MaxTableList'] + ); } } else { echo __('No tables found in database.'); @@ -301,9 +278,16 @@ if ($GLOBALS['cfg']['LeftFrameLight'] && strlen($GLOBALS['db'])) { if (!PMA_is_system_schema($db)) { $class = ''; $GLOBALS['cfg']['AjaxEnable'] ? $class="ajax" : ''; - echo ''; + echo ''; } } elseif ($GLOBALS['cfg']['LeftFrameLight']) { /* No need to tell user to select database if we're showing complete list */ @@ -313,25 +297,38 @@ if ($GLOBALS['cfg']['LeftFrameLight'] && strlen($GLOBALS['db'])) { } else { echo '
' . "\n"; $_url_params = array('pos' => $pos); - PMA_listNavigator(count($GLOBALS['pma']->databases), $pos, $_url_params, 'navigation.php', 'frame_navigation', $GLOBALS['cfg']['MaxDbList']); + PMA_listNavigator( + count($GLOBALS['pma']->databases), $pos, $_url_params, 'navigation.php', + 'frame_navigation', $GLOBALS['cfg']['MaxDbList'] + ); echo '
' . "\n"; $common_url_query = PMA_generate_common_url(); - PMA_displayDbList($GLOBALS['pma']->databases->getGroupedDetails($_SESSION['tmp_user_values']['navi_limit_offset'], $GLOBALS['cfg']['MaxDbList']), $_SESSION['tmp_user_values']['navi_limit_offset'], $GLOBALS['cfg']['MaxDbList']); + PMA_displayDbList( + $GLOBALS['pma']->databases->getGroupedDetails( + $_SESSION['tmp_user_values']['navi_limit_offset'], + $GLOBALS['cfg']['MaxDbList'] + ), + $_SESSION['tmp_user_values']['navi_limit_offset'], + $GLOBALS['cfg']['MaxDbList'] + ); } /** * displays collapsable db list * - * @global integer $element_counter - * @global string $img_minus - * @global string $img_plus - * @global string $href_left - * @global string $db_start - * @global string $common_url_query * @param array $ext_dblist extended db list * @param integer $offset * @param integer $count + * + * @return void + * + * @global integer $element_counter + * @global string $img_minus + * @global string $img_plus + * @global string $href_left + * @global string $db_start + * @global string $common_url_query */ function PMA_displayDbList($ext_dblist, $offset, $count) { @@ -339,8 +336,11 @@ function PMA_displayDbList($ext_dblist, $offset, $count) $db_start, $common_url_query; // get table list, for all databases - // doing this in one step takes advantage of a single query with information_schema! - $tables_full = PMA_DBI_get_tables_full($GLOBALS['pma']->databases->getLimitedItems($offset, $count)); + // doing this in one step takes advantage of + // a single query with information_schema! + $tables_full = PMA_DBI_get_tables_full( + $GLOBALS['pma']->databases->getLimitedItems($offset, $count) + ); $url_dbgroup = ''; echo '