Merge branch 'QA_4_6' into issue_12876_v4

This commit is contained in:
Tim McLaughlin 2017-01-17 12:00:38 -05:00 committed by GitHub
commit 18d48bb20f
11 changed files with 112 additions and 83 deletions

View File

@ -31,6 +31,8 @@ phpMyAdmin - ChangeLog
- issue #12872 Use same query for display and execution when dropping index
- issue #12868 Fix check for user groups freatures being enabled
- issue #12876 Fix notices and warning related to dbs_to_test global
- issue #12831 Fix table formatting on Insert tab, which mostly affected row highlighting
- issue #12495 Reintroduced phpinfo page with limited capabilities
4.6.5.2 (2016-12-05)
- issue #12765 Fixed SQL export with newlines

View File

@ -1850,6 +1850,11 @@ Main panel
You can additionally hide more information by using
:config:option:`$cfg['Servers'][$i]['verbose']`.
.. config:option:: $cfg['ShowPhpInfo']
:type: boolean
:default: false
.. config:option:: $cfg['ShowChgPassword']
:type: boolean
@ -1860,11 +1865,26 @@ Main panel
:type: boolean
:default: true
Defines whether to display the
Defines whether to display the :guilabel:`PHP information` and
:guilabel:`Change password` links and form for creating database or not at
the starting main (right) frame. This setting does not check MySQL commands
entered directly.
Please note that to block the usage of ``phpinfo()`` in scripts, you have to
put this in your :file:`php.ini`:
.. code-block:: ini
disable_functions = phpinfo()
.. warning::
Enabling phpinfo page will leak quite a lot of information about server
setup. Is it not recommended to enable this on shared installations.
This might also make easier some remote attacks on your installations,
so enable this only when needed.
Also note that enabling the :guilabel:`Change password` link has no effect
with config authentication mode: because of the hard coded password value
in the configuration file, end users can't be allowed to change their

View File

@ -317,7 +317,7 @@ if ($server > 0 && $GLOBALS['cfg']['ShowServerInfo']) {
. ' </div>';
}
if ($GLOBALS['cfg']['ShowServerInfo']) {
if ($GLOBALS['cfg']['ShowServerInfo'] || $GLOBALS['cfg']['ShowPhpInfo']) {
echo '<div class="group">';
echo '<h2>' , __('Web server') , '</h2>';
echo '<ul>';
@ -357,6 +357,15 @@ if ($GLOBALS['cfg']['ShowServerInfo']) {
}
}
if ($cfg['ShowPhpInfo']) {
PMA_printListItem(
__('Show PHP information'),
'li_phpinfo',
'phpinfo.php' . $common_url_query,
null,
'_blank'
);
}
echo ' </ul>';
echo ' </div>';
}

View File

@ -294,9 +294,6 @@ $GLOBALS['url_params'] = array();
* @global array $goto_whitelist
*/
$goto_whitelist = array(
//'browse_foreigners.php',
//'changelog.php',
//'chk_rel.php',
'db_datadict.php',
'db_sql.php',
'db_events.php',
@ -310,9 +307,6 @@ $goto_whitelist = array(
'db_routines.php',
'export.php',
'import.php',
//'index.php',
//'navigation.php',
//'license.php',
'index.php',
'pdf_pages.php',
'pdf_schema.php',
@ -345,7 +339,6 @@ $goto_whitelist = array(
'tbl_row_action.php',
'tbl_select.php',
'tbl_zoom_select.php',
//'themes.php',
'transformation_overview.php',
'transformation_wrapper.php',
'user_password.php',

View File

@ -1057,6 +1057,13 @@ $cfg['NavigationTreeShowEvents'] = true;
*/
$cfg['ShowStats'] = true;
/**
* show PHP info link
*
* @global boolean $cfg['ShowPhpInfo']
*/
$cfg['ShowPhpInfo'] = false;
/**
* show MySQL server and web server information
*

View File

@ -865,6 +865,11 @@ $strConfigShowFunctionFields_desc = __(
$strConfigShowFunctionFields_name = __('Show function fields');
$strConfigShowHint_desc = __('Whether to show hint or not.');
$strConfigShowHint_name = __('Show hint');
$strConfigShowPhpInfo_desc = __(
'Shows link to [a@https://php.net/manual/function.phpinfo.php]phpinfo()[/a] ' .
'output.'
);
$strConfigShowPhpInfo_name = __('Show phpinfo() link');
$strConfigShowServerInfo_name = __('Show detailed MySQL server information');
$strConfigShowSQL_desc = __(
'Defines whether SQL queries generated by phpMyAdmin should be displayed.'

View File

@ -203,6 +203,7 @@ $forms['Main_panel']['Startup'] = array(
'ShowCreateDb',
'ShowStats',
'ShowServerInfo',
'ShowPhpInfo',
'ShowChgPassword');
$forms['Main_panel']['DbStructure'] = array(
'ShowDbStructureComment',

View File

@ -583,10 +583,6 @@ function PMA_getValueColumn($column, $backup_field, $column_name_appendix,
} elseif ($GLOBALS['cfg']['LongtextDoubleTextarea']
&& mb_strstr($column['pma_type'], 'longtext')
) {
$html_output = '&nbsp;</td>';
$html_output .= '</tr>';
$html_output .= '<tr class="' . ($odd_row ? 'odd' : 'even') . '">'
. '<td colspan="5" class="right">';
$html_output .= PMA_getTextarea(
$column, $backup_field, $column_name_appendix, $onChangeClause,
$tabindex, $tabindex_for_value, $idindex, $text_dir,
@ -2663,11 +2659,6 @@ function PMA_getHtmlForFunctionOption($odd_row, $column, $column_name_appendix)
$longDoubleTextArea = $GLOBALS['cfg']['LongtextDoubleTextarea'];
return '<tr class="noclick ' . ($odd_row ? 'odd' : 'even' ) . '">'
. '<td '
. ($longDoubleTextArea
&& mb_strstr($column['True_Type'], 'longtext')
? 'rowspan="2"'
: ''
)
. 'class="center">'
. $column['Field_title']
. '<input type="hidden" name="fields_name' . $column_name_appendix
@ -2942,9 +2933,6 @@ function PMA_getHtmlForInsertEditFormColumn($table_columns, $column_number,
$no_support_types, $gis_data_types, $extracted_columnspec, $readOnly
);
}
$html_output .= '</td>'
. '</tr>';
return $html_output;
}

22
phpinfo.php Normal file
View File

@ -0,0 +1,22 @@
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* phpinfo() wrapper to allow displaying only when configured to do so.
*
* @package PhpMyAdmin
*/
/**
* Gets core libraries and defines some variables
*/
require_once 'libraries/common.inc.php';
$response = PMA\libraries\Response::getInstance();
$response->disable();
$response->getHeader()->sendHttpHeaders();
/**
* Displays PHP information
*/
if ($GLOBALS['cfg']['ShowPhpInfo']) {
phpinfo(INFO_GENERAL | INFO_CONFIGURATION | INFO_MODULES);
}

101
po/pt.po
View File

@ -4,8 +4,8 @@ msgstr ""
"Project-Id-Version: phpMyAdmin 4.6.6-dev\n"
"Report-Msgid-Bugs-To: translators@phpmyadmin.net\n"
"POT-Creation-Date: 2016-12-13 10:40+0100\n"
"PO-Revision-Date: 2016-12-29 18:02+0000\n"
"Last-Translator: Rodrigo Felix <cuca.baratas@hotmail.com>\n"
"PO-Revision-Date: 2017-01-16 01:58+0000\n"
"Last-Translator: Manuela Silva <manuela.silva@sky.com>\n"
"Language-Team: Portuguese "
"<https://hosted.weblate.org/projects/phpmyadmin/4-6/pt/>\n"
"Language: pt\n"
@ -30,7 +30,7 @@ msgstr "A lista central de colunas para a base de dados atual está vazia."
#: db_central_columns.php:130
msgid "Click to sort."
msgstr "Clique para organizar."
msgstr "Clique para ordenar."
#: db_central_columns.php:149
#, php-format
@ -930,13 +930,12 @@ msgid "Do you really want to delete the selected items?"
msgstr "Deseja realmente eliminar os itens selecionados?"
#: js/messages.php:74
#, fuzzy
msgid ""
"Do you really want to DROP the selected partition(s)? This will also DELETE "
"the data related to the selected partition(s)!"
msgstr ""
"Quer realmente abandonar as partição(ões) selecionada(s)? Isso também "
"apagará os dados relacionados às partição(ões) selecionada(s)!"
"Deseja realmente ABANDONAR a(s) partição(ões) selecionada(s)? Isso também "
"irá ELIMINAR os dados relacionados com a(s) partição(ões) selecionada(s)!"
#: js/messages.php:78
msgid "Do you really want to TRUNCATE the selected partition(s)?"
@ -947,10 +946,8 @@ msgid "Do you really want to remove partitioning?"
msgstr "Deseja realmente eliminar o particionamento?"
#: js/messages.php:81
#, fuzzy
#| msgid "Do you really want to execute \"%s\"?"
msgid "Do you really want to RESET SLAVE?"
msgstr "Você realmente deseja executar \"%s\"?"
msgstr "Deseja realmente REINICIAR SERVO?"
#: js/messages.php:83
msgid ""
@ -972,7 +969,7 @@ msgstr "Informação Distorcida"
#: js/messages.php:91
msgid "Are you sure you wish to change the collation and convert the data?"
msgstr "Tem a certeza que quer alterar a ordenação e converter os dados ?"
msgstr "Tem a certeza que deseja alterar os agrupamentos e converter os dados?"
#: js/messages.php:93
msgid ""
@ -995,54 +992,50 @@ msgid ""
"Are you sure you wish to change all the column collations and convert the "
"data?"
msgstr ""
"Você tem certeza que quer mudar todos os agrupamento de colunas e converter "
"Tem a certeza que deseja alterar todos os agrupamentos de coluna e converter "
"os dados?"
#: js/messages.php:106
msgid "Save & close"
msgstr "Salvar & Fechar"
msgstr "Guardar e fechar"
#: js/messages.php:107 libraries/config/FormDisplay.tpl.php:424
#: libraries/insert_edit.lib.php:1619 prefs_manage.php:360 prefs_manage.php:371
msgid "Reset"
msgstr "Limpa"
msgstr "Reiniciar"
#: js/messages.php:108
msgid "Reset all"
msgstr "Redefinir Tudo"
msgstr "Redefinir tudo"
#: js/messages.php:111
msgid "Missing value in the form!"
msgstr "Nº de dados insuficiente!"
msgstr "Valor em falta no formulário!"
#: js/messages.php:112
msgid "Select at least one of the options!"
msgstr "Selecciona pelo menos uma das opções!"
msgstr "Selecionar pelo menos uma das opções!"
#: js/messages.php:113
msgid "Please enter a valid number!"
msgstr "Introduza um número válido!"
msgstr "Por favor, insira um número válido!"
#: js/messages.php:114
msgid "Please enter a valid length!"
msgstr "Introduza um comprimento válido!"
#: js/messages.php:115
#, fuzzy
#| msgid "Add Index"
msgid "Add index"
msgstr "Adicionar Índice"
msgstr "Adicionar índice"
#: js/messages.php:116
#, fuzzy
#| msgid "Edit Index"
msgid "Edit index"
msgstr "Editar Índice"
msgstr "Editar índice"
#: js/messages.php:117 templates/table/index_form.phtml:237
#, php-format
msgid "Add %s column(s) to index"
msgstr "Adiciona %s coluna(s) ao Índice"
msgstr "Adicionar %s coluna(s) ao Índice"
#: js/messages.php:118
msgid "Create single-column index"
@ -1058,7 +1051,7 @@ msgstr "Composto com:"
#: js/messages.php:121
msgid "Please select column(s) for the index."
msgstr "Seleciona a(s) coluna(s) para o índice."
msgstr "Por favor, selecione a(s) coluna(s) para o índice."
#: js/messages.php:124 templates/table/structure/add_column.phtml:1
msgid "You have to add at least one column."
@ -1069,7 +1062,7 @@ msgstr "Tem que adicionar pelo menos uma coluna."
#: templates/table/index_form.phtml:242
#: templates/table/relation/common_form.phtml:135
msgid "Preview SQL"
msgstr "Pré-visualização SQL"
msgstr "Pré-visualizar SQL"
#: js/messages.php:130
msgid "Simulate query"
@ -1090,7 +1083,7 @@ msgstr "Valores para Y"
#: js/messages.php:139
msgid "The host name is empty!"
msgstr "O nome da máquina está vazio!"
msgstr "O nome do hospedeiro está vazio!"
#: js/messages.php:140
msgid "The user name is empty!"
@ -1099,7 +1092,7 @@ msgstr "O nome do utilizador está vazio!"
#: js/messages.php:141 libraries/server_privileges.lib.php:2016
#: user_password.php:116
msgid "The password is empty!"
msgstr "Indique a palavras-passe!"
msgstr "A palavra-passe está em branco!"
#: js/messages.php:142 libraries/server_privileges.lib.php:2014
#: user_password.php:120
@ -1108,7 +1101,7 @@ msgstr "As palavras-passe são diferentes!"
#: js/messages.php:143
msgid "Removing Selected Users"
msgstr "Removendo os utilizadores seleccionados"
msgstr "Remover Utilizadores Selecionados"
#: js/messages.php:144 js/messages.php:211 libraries/tracking.lib.php:469
#: libraries/tracking.lib.php:839
@ -1116,26 +1109,20 @@ msgid "Close"
msgstr "Fechar"
#: js/messages.php:147
#, fuzzy
#| msgid "Page has been created."
msgid "Template was created."
msgstr "A página foi criada."
msgstr "O modelo foi criado."
#: js/messages.php:148
msgid "Template was loaded."
msgstr "O modelo foi carregado."
#: js/messages.php:149
#, fuzzy
#| msgid "The profile has been updated."
msgid "Template was updated."
msgstr "O prefil foi actualizado."
msgstr "O modelo foi atualizado."
#: js/messages.php:150
#, fuzzy
#| msgid "The row has been deleted."
msgid "Template was deleted."
msgstr "Registo eliminado."
msgstr "O modelo doi eliminado."
#. l10n: Other, small valued, queries
#: js/messages.php:153 libraries/ServerStatusData.php:130
@ -1187,7 +1174,7 @@ msgstr "Cache de comandos utilizada"
#: js/messages.php:175
msgid "System CPU usage"
msgstr "Uso da CPU do Sistema"
msgstr "Utilização da CPU do Sistema"
#: js/messages.php:176
msgid "System memory"
@ -1195,7 +1182,7 @@ msgstr "Memória do sistema"
#: js/messages.php:177
msgid "System swap"
msgstr "Swap do sistema"
msgstr "Troca do sistema"
#: js/messages.php:179
msgid "Average load"
@ -1211,7 +1198,7 @@ msgstr "Memória na cache"
#: js/messages.php:182
msgid "Buffered memory"
msgstr "Memória retida"
msgstr "Memória no buffer"
#: js/messages.php:183
msgid "Free memory"
@ -1325,7 +1312,7 @@ msgstr "Adicionar gráfico a grelha"
#: js/messages.php:213
msgid "Please add at least one variable to the series!"
msgstr "Adicione pelo menos uma variável à serie!"
msgstr "Por favor, adicione pelo menos uma variável às series!"
#: js/messages.php:214 libraries/DisplayResults.php:1492
#: libraries/config.values.php:69 libraries/display_export.lib.php:691
@ -1375,7 +1362,7 @@ msgstr "slow_query_log e general_log estão desativados."
#: js/messages.php:224
msgid "log_output is not set to TABLE."
msgstr "log_output não está configurado para TABELA."
msgstr "log_output não está configurado para a TABELA."
#: js/messages.php:225
msgid "log_output is set to TABLE."
@ -1421,7 +1408,7 @@ msgstr "Ativar %s"
#: js/messages.php:241
#, php-format
msgid "Disable %s"
msgstr "Desactivar %s"
msgstr "Desativar %s"
#. l10n: %d seconds
#: js/messages.php:243
@ -1439,7 +1426,7 @@ msgstr ""
#: js/messages.php:248
msgid "Change settings"
msgstr "Modificar configurações"
msgstr "Alterar configurações"
#: js/messages.php:249
msgid "Current settings"
@ -14141,7 +14128,7 @@ msgstr "Comentários da tabela"
#: libraries/sql-parser/src/Component.php:47
#: libraries/sql-parser/src/Component.php:67
msgid "Not implemented yet."
msgstr ""
msgstr "Ainda não foi implementado."
#: libraries/sql-parser/src/Components/AlterOperation.php:228
#: libraries/sql-parser/src/Statement.php:337
@ -14183,10 +14170,8 @@ msgstr ""
#: libraries/sql-parser/src/Statements/InsertStatement.php:227
#: libraries/sql-parser/src/Statements/ReplaceStatement.php:165
#: libraries/sql-parser/src/Statements/ReplaceStatement.php:193
#, fuzzy
#| msgid "Unexpected characters on line %s."
msgid "Unexpected keyword."
msgstr "Caracteres inesperados na linha %s."
msgstr "Palavra-chave inesperada."
#: libraries/sql-parser/src/Components/CaseExpression.php:202
msgid "Unexpected end of CASE expression"
@ -17296,10 +17281,8 @@ msgid "Slow launch time"
msgstr "Tempo de inícios lentos"
#: libraries/advisory_rules.txt:368
#, fuzzy
#| msgid "Slow_launch_time is above 2s"
msgid "Slow_launch_time is above 2s."
msgstr "Slow_launch_time está acima de 2s"
msgstr "Slow_launch_time está acima de 2s."
#: libraries/advisory_rules.txt:369
#, fuzzy
@ -17320,14 +17303,14 @@ msgstr "slow_launch_time está definido como %s"
#: libraries/advisory_rules.txt:374
msgid "Percentage of used connections"
msgstr "Percentagem de conexões utilizadas"
msgstr "Percentagem de ligações utilizadas"
#: libraries/advisory_rules.txt:377
msgid ""
"The maximum amount of used connections is getting close to the value of "
"{max_connections}."
msgstr ""
"O número máximo de conexões utilizadas está a aproximar-se do valor do "
"O número máximo de ligações utilizadas está a aproximar-se do valor de "
"{max_connections}."
#: libraries/advisory_rules.txt:378
@ -17351,7 +17334,7 @@ msgstr ""
#: libraries/advisory_rules.txt:381
msgid "Percentage of aborted connections"
msgstr "Percentagem de conexões interrompidas"
msgstr "Percentagem de ligações interrompidas"
#: libraries/advisory_rules.txt:384 libraries/advisory_rules.txt:391
msgid "Too many connections are aborted."
@ -17432,15 +17415,15 @@ msgstr ""
#: libraries/advisory_rules.txt:411
msgid "Is InnoDB disabled?"
msgstr "O InnoDB está desactivado?"
msgstr "O InnoDB está desativado?"
#: libraries/advisory_rules.txt:414
msgid "You do not have InnoDB enabled."
msgstr "Não possui o InnoDB activo."
msgstr "Não tem o InnoDB ativado."
#: libraries/advisory_rules.txt:415
msgid "InnoDB is usually the better choice for table engines."
msgstr "InnoDB é normalmente a melhor escolha para motor de tabelas."
msgstr "InnoDB é normalmente a melhor escolha para motores de tabela."
#: libraries/advisory_rules.txt:416
msgid "have_innodb is set to 'value'"
@ -17448,7 +17431,7 @@ msgstr "have_innodb está definido como 'valor'"
#: libraries/advisory_rules.txt:418
msgid "InnoDB log size"
msgstr "Tamanho dos registos do InnoDB"
msgstr "Tamanho do registo de InnoDB"
#: libraries/advisory_rules.txt:421
msgid ""

View File

@ -4,8 +4,8 @@ msgstr ""
"Project-Id-Version: phpMyAdmin 4.6.6-dev\n"
"Report-Msgid-Bugs-To: translators@phpmyadmin.net\n"
"POT-Creation-Date: 2016-12-13 10:40+0100\n"
"PO-Revision-Date: 2017-01-03 16:54+0000\n"
"Last-Translator: Daniel Palmeira Huanca <daniel46758@hotmail.com>\n"
"PO-Revision-Date: 2017-01-16 16:13+0000\n"
"Last-Translator: Ariel Alonso <arielmontessinobarbosa@gmail.com>\n"
"Language-Team: Portuguese (Brazil) "
"<https://hosted.weblate.org/projects/phpmyadmin/4-6/pt_BR/>\n"
"Language: pt_BR\n"
@ -6047,7 +6047,6 @@ msgid "Set import and export directories and compression options."
msgstr "Define diretórios de importação e exportação e opções de compressão."
#: libraries/config/messages.inc.php:267
#, fuzzy
msgid "LaTeX"
msgstr "LaTeX"