diff options
author | Christian Foellmann <foellmann@foe-services.de> | 2015-01-17 12:49:39 +0300 |
---|---|---|
committer | Christian Foellmann <foellmann@foe-services.de> | 2015-01-17 12:49:39 +0300 |
commit | 315c33fef0fc20fbfa948446b728c0b9db34ab7c (patch) | |
tree | bdc18a0e2e87b62e37f8168fd0f1e199ad25df05 /libraries | |
parent | 72f864ff50d01b8bc18904db7a6ba4fa32c44783 (diff) |
UPDATE to 4.3.74.3.7
Diffstat (limited to 'libraries')
21 files changed, 149 insertions, 142 deletions
diff --git a/libraries/Config.class.php b/libraries/Config.class.php index de90899621..db40270b82 100644 --- a/libraries/Config.class.php +++ b/libraries/Config.class.php @@ -114,7 +114,7 @@ class PMA_Config */ function checkSystem() { - $this->set('PMA_VERSION', '4.3.6'); + $this->set('PMA_VERSION', '4.3.7'); /** * @deprecated */ diff --git a/libraries/DatabaseInterface.class.php b/libraries/DatabaseInterface.class.php index 507c63e349..a2b9fd0944 100644 --- a/libraries/DatabaseInterface.class.php +++ b/libraries/DatabaseInterface.class.php @@ -638,10 +638,12 @@ class PMA_DatabaseInterface } } - if ($sort_order == 'DESC') { - array_multisort($$sort_by, SORT_DESC, $each_tables); - } else { - array_multisort($$sort_by, SORT_ASC, $each_tables); + if (! empty($$sort_by)) { + if ($sort_order == 'DESC') { + array_multisort($$sort_by, SORT_DESC, $each_tables); + } else { + array_multisort($$sort_by, SORT_ASC, $each_tables); + } } // cleanup the temporary sort array diff --git a/libraries/DisplayResults.class.php b/libraries/DisplayResults.class.php index 0ffdf52be5..7f1d7d8326 100644 --- a/libraries/DisplayResults.class.php +++ b/libraries/DisplayResults.class.php @@ -580,6 +580,7 @@ class PMA_DisplayResults * @param string $title text for button * @param integer $pos position for next query * @param string $html_sql_query query ready for display + * @param boolean $back whether 'begin' or 'previous' * @param string $onsubmit optional onsubmit clause * @param string $input_for_real_end optional hidden field for special treatment * @param string $onclick optional onclick clause @@ -592,17 +593,25 @@ class PMA_DisplayResults * _getMoveForwardButtonsForTableNavigation() */ private function _getTableNavigationButton( - $caption, $title, $pos, $html_sql_query, $onsubmit = '', + $caption, $title, $pos, $html_sql_query, $back, $onsubmit = '', $input_for_real_end = '', $onclick = '' ) { $caption_output = ''; - if (PMA_Util::showIcons('TableNavigationLinksMode')) { - $caption_output .= $caption; - } - - if (PMA_Util::showText('TableNavigationLinksMode')) { - $caption_output .= ' ' . $title; + if ($back) { + if (PMA_Util::showIcons('TableNavigationLinksMode')) { + $caption_output .= $caption; + } + if (PMA_Util::showText('TableNavigationLinksMode')) { + $caption_output .= ' ' . $title; + } + } else { + if (PMA_Util::showText('TableNavigationLinksMode')) { + $caption_output .= $title; + } + if (PMA_Util::showIcons('TableNavigationLinksMode')) { + $caption_output .= ' ' . $caption; + } } $title_output = ' title="' . $title . '"'; @@ -833,11 +842,11 @@ class PMA_DisplayResults $html_sql_query, $pos_prev ) { return $this->_getTableNavigationButton( - '<<', _pgettext('First page', 'Begin'), 0, $html_sql_query + '<<', _pgettext('First page', 'Begin'), 0, $html_sql_query, true ) . $this->_getTableNavigationButton( '<', _pgettext('Previous page', 'Previous'), $pos_prev, - $html_sql_query + $html_sql_query, true ); } // end of the '_getMoveBackwardButtonsForTableNavigation()' function @@ -900,7 +909,8 @@ class PMA_DisplayResults '>', _pgettext('Next page', 'Next'), $pos_next, - $html_sql_query + $html_sql_query, + false ); // prepare some options for the End button @@ -932,7 +942,7 @@ class PMA_DisplayResults $this->__get('unlim_num_rows') / $_SESSION['tmpval']['max_rows'] )- 1) * $maxRows), - $html_sql_query, $onsubmit, $input_for_real_end, $onclick + $html_sql_query, false, $onsubmit, $input_for_real_end, $onclick ); return $buttons_html; diff --git a/libraries/Scripts.class.php b/libraries/Scripts.class.php index eeb765c679..6bd2c914c0 100644 --- a/libraries/Scripts.class.php +++ b/libraries/Scripts.class.php @@ -78,7 +78,7 @@ class PMA_Scripts } } if ($include) { - $scripts[] = "scripts[]=" . $value['filename']; + $scripts[] = "scripts%5B%5D=" . $value['filename']; } } $separator = PMA_URL_getArgSeparator(); diff --git a/libraries/Util.class.php b/libraries/Util.class.php index 80e10f9589..60a50c5dea 100644 --- a/libraries/Util.class.php +++ b/libraries/Util.class.php @@ -2456,18 +2456,17 @@ class PMA_Util // Move to the beginning or to the previous page if ($pos > 0) { + $caption1 = ''; $caption2 = ''; if (self::showIcons('TableNavigationLinksMode')) { - $caption1 = '<<'; - $caption2 = ' < '; - $title1 = ' title="' . _pgettext('First page', 'Begin') . '"'; - $title2 = ' title="' - . _pgettext('Previous page', 'Previous') . '"'; - } else { - $caption1 = _pgettext('First page', 'Begin') . ' <<'; - $caption2 = _pgettext('Previous page', 'Previous') . ' <'; - $title1 = ''; - $title2 = ''; - } // end if... else... + $caption1 .= '<< '; + $caption2 .= '< '; + } + if (self::showText('TableNavigationLinksMode')) { + $caption1 .= _pgettext('First page', 'Begin'); + $caption2 .= _pgettext('Previous page', 'Previous'); + } + $title1 = ' title="' . _pgettext('First page', 'Begin') . '"'; + $title2 = ' title="' . _pgettext('Previous page', 'Previous') . '"'; $_url_params[$name] = 0; $list_navigator_html .= '<a' . $class . $title1 . ' href="' . $script @@ -2475,7 +2474,7 @@ class PMA_Util . '</a>'; $_url_params[$name] = $pos - $max_count; - $list_navigator_html .= '<a' . $class . $title2 . ' href="' . $script + $list_navigator_html .= ' <a' . $class . $title2 . ' href="' . $script . PMA_URL_getCommon($_url_params) . '">' . $caption2 . '</a>'; } @@ -2493,17 +2492,20 @@ class PMA_Util $list_navigator_html .= '</form>'; if ($pos + $max_count < $count) { - if ( self::showIcons('TableNavigationLinksMode')) { - $caption3 = ' > '; - $caption4 = '>>'; - $title3 = ' title="' . _pgettext('Next page', 'Next') . '"'; - $title4 = ' title="' . _pgettext('Last page', 'End') . '"'; - } else { - $caption3 = '> ' . _pgettext('Next page', 'Next'); - $caption4 = '>> ' . _pgettext('Last page', 'End'); - $title3 = ''; - $title4 = ''; - } // end if... else... + $caption3 = ''; $caption4 = ''; + if (self::showText('TableNavigationLinksMode')) { + $caption3 .= _pgettext('Next page', 'Next'); + $caption4 .= _pgettext('Last page', 'End'); + } + if (self::showIcons('TableNavigationLinksMode')) { + $caption3 .= ' >'; + $caption4 .= ' >>'; + if (! self::showText('TableNavigationLinksMode')) { + + } + } + $title3 = ' title="' . _pgettext('Next page', 'Next') . '"'; + $title4 = ' title="' . _pgettext('Last page', 'End') . '"'; $_url_params[$name] = $pos + $max_count; $list_navigator_html .= '<a' . $class . $title3 . ' href="' . $script @@ -2515,7 +2517,7 @@ class PMA_Util $_url_params[$name] = $count - $max_count; } - $list_navigator_html .= '<a' . $class . $title4 . ' href="' . $script + $list_navigator_html .= ' <a' . $class . $title4 . ' href="' . $script . PMA_URL_getCommon($_url_params) . '" >' . $caption4 . '</a>'; } diff --git a/libraries/language_stats.inc.php b/libraries/language_stats.inc.php index 430e8bc024..60c0ef10a6 100644 --- a/libraries/language_stats.inc.php +++ b/libraries/language_stats.inc.php @@ -12,11 +12,11 @@ $GLOBALS["language_stats"] = array ( 'bn' => 85, 'br' => 19, 'bs' => 14, - 'ca' => 83, + 'ca' => 84, 'ckb' => 17, 'cs' => 94, 'cy' => 20, - 'da' => 99, + 'da' => 100, 'de' => 99, 'el' => 99, 'en_GB' => 90, @@ -30,11 +30,11 @@ $GLOBALS["language_stats"] = array ( 'he' => 19, 'hi' => 42, 'hr' => 33, - 'hu' => 99, + 'hu' => 100, 'hy' => 3, 'ia' => 63, 'id' => 74, - 'it' => 79, + 'it' => 80, 'ja' => 73, 'ka' => 15, 'kk' => 10, @@ -54,12 +54,12 @@ $GLOBALS["language_stats"] = array ( 'nl' => 99, 'pa' => 2, 'pl' => 88, - 'pt_BR' => 93, + 'pt_BR' => 95, 'pt' => 60, 'ro' => 60, 'ru' => 99, 'si' => 67, - 'sk' => 76, + 'sk' => 77, 'sl' => 99, 'sq' => 100, 'sr@latin' => 51, diff --git a/libraries/navigation/NavigationTree.class.php b/libraries/navigation/NavigationTree.class.php index 1b9ae22c61..2dd06e6114 100644 --- a/libraries/navigation/NavigationTree.class.php +++ b/libraries/navigation/NavigationTree.class.php @@ -693,12 +693,9 @@ class PMA_NavigationTree ); $groups[$key]->separator = $node->separator; $groups[$key]->separator_depth = $node->separator_depth - 1; - $groups[$key]->icon = ''; - if (PMA_Util::showIcons('TableNavigationLinksMode')) { - $groups[$key]->icon = PMA_Util::getImage( - 'b_group.png' - ); - } + $groups[$key]->icon = PMA_Util::getImage( + 'b_group.png' + ); $groups[$key]->pos2 = $node->pos2; $groups[$key]->pos3 = $node->pos3; if ($node instanceof Node_Table_Container @@ -1025,25 +1022,25 @@ class PMA_NavigationTree if ($node->type == Node::CONTAINER) { $retval .= "<i>"; } - if (PMA_Util::showIcons('TableNavigationLinksMode')) { - $retval .= "<div class='block'>"; - if (isset($node->links['icon'])) { - $args = array(); - foreach ($node->parents(true) as $parent) { - $args[] = urlencode($parent->real_name); - } - $link = vsprintf($node->links['icon'], $args); - if ($linkClass != '') { - $retval .= "<a class='$linkClass' href='$link'>"; - $retval .= "{$node->icon}</a>"; - } else { - $retval .= "<a href='$link'>{$node->icon}</a>"; - } + + $retval .= "<div class='block'>"; + if (isset($node->links['icon'])) { + $args = array(); + foreach ($node->parents(true) as $parent) { + $args[] = urlencode($parent->real_name); + } + $link = vsprintf($node->links['icon'], $args); + if ($linkClass != '') { + $retval .= "<a class='$linkClass' href='$link'>"; + $retval .= "{$node->icon}</a>"; } else { - $retval .= "<u>{$node->icon}</u>"; + $retval .= "<a href='$link'>{$node->icon}</a>"; } - $retval .= "</div>"; + } else { + $retval .= "<u>{$node->icon}</u>"; } + $retval .= "</div>"; + if (isset($node->links['text'])) { $args = array(); foreach ($node->parents(true) as $parent) { diff --git a/libraries/navigation/Nodes/Node.class.php b/libraries/navigation/Nodes/Node.class.php index dd714624e0..a9bb228edd 100644 --- a/libraries/navigation/Nodes/Node.class.php +++ b/libraries/navigation/Nodes/Node.class.php @@ -91,6 +91,11 @@ class Node public $links; /** + * @var string HTML title + */ + public $title; + + /** * @var string Extra CSS classes for the node */ public $classes = ''; diff --git a/libraries/navigation/Nodes/Node_Database.class.php b/libraries/navigation/Nodes/Node_Database.class.php index 9abb521eef..74dff6cd35 100644 --- a/libraries/navigation/Nodes/Node_Database.class.php +++ b/libraries/navigation/Nodes/Node_Database.class.php @@ -624,7 +624,7 @@ class Node_Database extends Node { $ret = ''; $cfgRelation = PMA_getRelationsParam(); - if ($cfgRelation['navwork']) { + if (isset($cfgRelation['navwork']) && $cfgRelation['navwork']) { if ( $this->_hiddenCount > 0) { $ret = '<span class="dbItemControls">' . '<a href="navigation.php' diff --git a/libraries/navigation/Nodes/Node_Table.class.php b/libraries/navigation/Nodes/Node_Table.class.php index 4bcc8d4829..9ac1a34487 100644 --- a/libraries/navigation/Nodes/Node_Table.class.php +++ b/libraries/navigation/Nodes/Node_Table.class.php @@ -48,6 +48,23 @@ class Node_Table extends Node_DatabaseChild $this->icon = PMA_Util::getImage('b_browse.png', __('Browse')); break; } + switch($GLOBALS['cfg']['DefaultTabTable']) { + case 'tbl_structure.php': + $this->title = __('Structure'); + break; + case 'tbl_select.php': + $this->title = __('Search'); + break; + case 'tbl_change.php': + $this->title = __('Insert'); + break; + case 'tbl_sql.php': + $this->title = __('SQL'); + break; + case 'sql.php': + $this->title = __('Browse'); + break; + } $this->links = array( 'text' => $GLOBALS['cfg']['DefaultTabTable'] . '?server=' . $GLOBALS['server'] @@ -57,7 +74,7 @@ class Node_Table extends Node_DatabaseChild . '?server=' . $GLOBALS['server'] . '&db=%2$s&table=%1$s&token=' . $_SESSION[' PMA_token '], - 'title' => __('Browse') + 'title' => $this->title ); $this->classes = 'table'; } diff --git a/libraries/plugins/schema/Export_Relation_Schema.class.php b/libraries/plugins/schema/Export_Relation_Schema.class.php index 729339563f..7d7a7adeba 100644 --- a/libraries/plugins/schema/Export_Relation_Schema.class.php +++ b/libraries/plugins/schema/Export_Relation_Schema.class.php @@ -248,6 +248,28 @@ class PMA_Export_Relation_Schema } /** + * Returns the file name + * + * @param String $extension file extension + */ + protected function getFileName($extension) + { + $filename = $GLOBALS['db'] . $extension; + // Get the name of this page to use as filename + if ($this->pageNumber != -1 && ! $this->offline) { + $_name_sql = 'SELECT page_descr FROM ' + . PMA_Util::backquote($GLOBALS['cfgRelation']['db']) . '.' + . PMA_Util::backquote($GLOBALS['cfgRelation']['pdf_pages']) + . ' WHERE page_nr = ' . $this->pageNumber; + $_name_rs = PMA_queryAsControlUser($_name_sql); + $_name_row = $GLOBALS['dbi']->fetchRow($_name_rs); + $filename = $_name_row[0] . $extension; + } + + return $filename; + } + + /** * Displays an error message * * @param integer $pageNumber ID of the chosen page @@ -258,7 +280,7 @@ class PMA_Export_Relation_Schema * * @return void */ - function dieSchema($pageNumber, $type = '', $error_message = '') + public static function dieSchema($pageNumber, $type = '', $error_message = '') { echo "<p><strong>" . __("SCHEMA ERROR: ") . $type . "</strong></p>" . "\n"; if (!empty($error_message)) { diff --git a/libraries/plugins/schema/dia/Dia_Relation_Schema.class.php b/libraries/plugins/schema/dia/Dia_Relation_Schema.class.php index 3f6abfa13d..c8619555ee 100644 --- a/libraries/plugins/schema/dia/Dia_Relation_Schema.class.php +++ b/libraries/plugins/schema/dia/Dia_Relation_Schema.class.php @@ -176,7 +176,7 @@ class PMA_DIA extends XMLWriter $output = $this->flush(); PMA_Response::getInstance()->disable(); PMA_downloadHeader( - $fileName . '.dia', + $fileName, 'application/x-dia-diagram', /*overload*/mb_strlen($output) ); @@ -302,11 +302,7 @@ class PMA_Dia_Relation_Schema extends PMA_Export_Relation_Schema function showOutput() { global $dia; - $filename = $GLOBALS['db']; - if ($this->pageNumber != -1) { - $filename .= '-' . $this->pageNumber; - } - $dia->showOutput($filename); + $dia->showOutput($this->getFileName('.dia')); } /** diff --git a/libraries/plugins/schema/dia/TableStatsDia.class.php b/libraries/plugins/schema/dia/TableStatsDia.class.php index 81f86c1612..a3aabb5622 100644 --- a/libraries/plugins/schema/dia/TableStatsDia.class.php +++ b/libraries/plugins/schema/dia/TableStatsDia.class.php @@ -62,7 +62,7 @@ class Table_Stats_Dia extends TableStats */ protected function showMissingTableError() { - $this->diagram->dieSchema( + PMA_Export_Relation_Schema::dieSchema( $this->pageNumber, "DIA", sprintf(__('The %s table doesn\'t exist!'), $this->tableName) @@ -76,7 +76,7 @@ class Table_Stats_Dia extends TableStats */ protected function showMissingCoordinatesError() { - $this->diagram->dieSchema( + PMA_Export_Relation_Schema::dieSchema( $this->pageNumber, "DIA", sprintf( diff --git a/libraries/plugins/schema/eps/Eps_Relation_Schema.class.php b/libraries/plugins/schema/eps/Eps_Relation_Schema.class.php index 205c0024b7..45c7966843 100644 --- a/libraries/plugins/schema/eps/Eps_Relation_Schema.class.php +++ b/libraries/plugins/schema/eps/Eps_Relation_Schema.class.php @@ -295,7 +295,7 @@ class PMA_EPS $output = $this->stringCommands; PMA_Response::getInstance()->disable(); PMA_downloadHeader( - $fileName . '.eps', + $fileName, 'image/x-eps', /*overload*/mb_strlen($output) ); @@ -432,11 +432,7 @@ class PMA_Eps_Relation_Schema extends PMA_Export_Relation_Schema function showOutput() { global $eps; - $filename = $GLOBALS['db']; - if ($this->pageNumber != -1) { - $filename .= '-' . $this->pageNumber; - } - $eps->showOutput($filename); + $eps->showOutput($this->getFileName('.eps')); } /** diff --git a/libraries/plugins/schema/eps/TableStatsEps.class.php b/libraries/plugins/schema/eps/TableStatsEps.class.php index 3e40627f9f..6643972272 100644 --- a/libraries/plugins/schema/eps/TableStatsEps.class.php +++ b/libraries/plugins/schema/eps/TableStatsEps.class.php @@ -75,7 +75,7 @@ class Table_Stats_Eps extends TableStats */ protected function showMissingTableError() { - $this->diagram->dieSchema( + PMA_Export_Relation_Schema::dieSchema( $this->pageNumber, "EPS", sprintf(__('The %s table doesn\'t exist!'), $this->tableName) @@ -89,7 +89,7 @@ class Table_Stats_Eps extends TableStats */ protected function showMissingCoordinatesError() { - $this->diagram->dieSchema( + PMA_Export_Relation_Schema::dieSchema( $this->pageNumber, "EPS", sprintf( diff --git a/libraries/plugins/schema/pdf/Pdf_Relation_Schema.class.php b/libraries/plugins/schema/pdf/Pdf_Relation_Schema.class.php index 82be0fa4fc..2b4350f975 100644 --- a/libraries/plugins/schema/pdf/Pdf_Relation_Schema.class.php +++ b/libraries/plugins/schema/pdf/Pdf_Relation_Schema.class.php @@ -653,7 +653,8 @@ class PMA_Pdf_Relation_Schema extends PMA_Export_Relation_Schema */ function showOutput() { - $this->_showOutput($this->pageNumber); + global $pdf; + $pdf->Download($this->getFileName('.pdf')); } /** @@ -825,47 +826,6 @@ class PMA_Pdf_Relation_Schema extends PMA_Export_Relation_Schema } /** - * Outputs the PDF document to a file - * or sends the output to browser - * - * @param integer $pageNumber page number - * - * @global object $pdf The current PDF document - * @access private - * - * @return void - * - * @see PMA_Schema_PDF - */ - private function _showOutput($pageNumber) - { - global $pdf; - - // Get the name of this pdfpage to use as filename - if ($this->offline) { - $filename = $GLOBALS['db']; - if ($this->pageNumber != -1) { - $filename .= '-' . $this->pageNumber; - } - } else { - $_name_sql = 'SELECT page_descr FROM ' - . PMA_Util::backquote($GLOBALS['cfgRelation']['db']) . '.' - . PMA_Util::backquote($GLOBALS['cfgRelation']['pdf_pages']) - . ' WHERE page_nr = ' . $pageNumber; - $_name_rs = PMA_queryAsControlUser($_name_sql); - if ($_name_rs) { - $_name_row = $GLOBALS['dbi']->fetchRow($_name_rs); - $filename = $_name_row[0] . '.pdf'; - } - if (empty($filename)) { - $filename = $pageNumber . '.pdf'; - } - } - - $pdf->Download($filename); - } - - /** * Generates data dictionary pages. * * @param array $alltables Tables to document. diff --git a/libraries/plugins/schema/pdf/TableStatsPdf.class.php b/libraries/plugins/schema/pdf/TableStatsPdf.class.php index a20829ccc8..c45637dbce 100644 --- a/libraries/plugins/schema/pdf/TableStatsPdf.class.php +++ b/libraries/plugins/schema/pdf/TableStatsPdf.class.php @@ -76,7 +76,7 @@ class Table_Stats_Pdf extends TableStats */ protected function showMissingTableError() { - $this->diagram->dieSchema( + PMA_Export_Relation_Schema::dieSchema( $this->pageNumber, "PDF", sprintf(__('The %s table doesn\'t exist!'), $this->tableName) @@ -90,7 +90,7 @@ class Table_Stats_Pdf extends TableStats */ protected function showMissingCoordinatesError() { - $this->diagram->dieSchema( + PMA_Export_Relation_Schema::dieSchema( $this->pageNumber, "PDF", sprintf( diff --git a/libraries/plugins/schema/svg/Svg_Relation_Schema.class.php b/libraries/plugins/schema/svg/Svg_Relation_Schema.class.php index f2ae1f1bc6..75eafebab3 100644 --- a/libraries/plugins/schema/svg/Svg_Relation_Schema.class.php +++ b/libraries/plugins/schema/svg/Svg_Relation_Schema.class.php @@ -188,7 +188,7 @@ class PMA_SVG extends XMLWriter $output = $this->flush(); PMA_Response::getInstance()->disable(); PMA_downloadHeader( - $fileName . '.svg', + $fileName, 'image/svg+xml', /*overload*/mb_strlen($output) ); @@ -405,11 +405,7 @@ class PMA_Svg_Relation_Schema extends PMA_Export_Relation_Schema function showOutput() { global $svg; - $filename = $GLOBALS['db']; - if ($this->pageNumber != -1) { - $filename .= '-' . $this->pageNumber; - } - $svg->showOutput($filename); + $svg->showOutput($this->getFileName('.svg')); } diff --git a/libraries/plugins/schema/svg/TableStatsSvg.class.php b/libraries/plugins/schema/svg/TableStatsSvg.class.php index 7b421c318a..0fce77cbb5 100644 --- a/libraries/plugins/schema/svg/TableStatsSvg.class.php +++ b/libraries/plugins/schema/svg/TableStatsSvg.class.php @@ -76,7 +76,7 @@ class Table_Stats_Svg extends TableStats */ protected function showMissingTableError() { - $this->diagram->dieSchema( + PMA_Export_Relation_Schema::dieSchema( $this->pageNumber, "SVG", sprintf(__('The %s table doesn\'t exist!'), $this->tableName) @@ -90,7 +90,7 @@ class Table_Stats_Svg extends TableStats */ protected function showMissingCoordinatesError() { - $this->diagram->dieSchema( + PMA_Export_Relation_Schema::dieSchema( $this->pageNumber, "SVG", sprintf( diff --git a/libraries/relation_cleanup.lib.php b/libraries/relation_cleanup.lib.php index 2b591d2fd3..d76774936b 100644 --- a/libraries/relation_cleanup.lib.php +++ b/libraries/relation_cleanup.lib.php @@ -203,7 +203,9 @@ function PMA_relationsCleanupDatabase($db) PMA_queryAsControlUser($remove_query); } - if ($cfgRelation['central_columnswork']) { + if (isset($cfgRelation['central_columnswork']) + && $cfgRelation['central_columnswork'] + ) { $remove_query = 'DELETE FROM ' . PMA_Util::backquote($cfgRelation['db']) . '.' . PMA_Util::backquote($cfgRelation['central_columns']) . ' WHERE db_name = \'' . PMA_Util::sqlAddSlashes($db) . '\''; diff --git a/libraries/structure.lib.php b/libraries/structure.lib.php index 100440935e..37203fdd23 100644 --- a/libraries/structure.lib.php +++ b/libraries/structure.lib.php @@ -1521,7 +1521,9 @@ function PMA_getHtmlForCheckAllTableColumn($pmaThemeImage, $text_dir, __('Fulltext'), 'b_ftext.png', 'ftext' ); } - if ($GLOBALS['cfgRelation']['central_columnswork']) { + if (isset($GLOBALS['cfgRelation']['central_columnswork']) + && $GLOBALS['cfgRelation']['central_columnswork'] + ) { $html_output .= PMA_Util::getButtonOrImage( 'submit_mult', 'mult_submit', 'submit_mult_central_columns_add', __('Add to central columns'), 'centralColumns_add.png', |