start();
-register_shutdown_function(function() {
- echo PMA_OutputBuffering::getInstance()->getContents();
-});
+register_shutdown_function(
+ function() {
+ echo PMA_OutputBuffering::getInstance()->getContents();
+ }
+);
echo "var PMA_gotoWhitelist = new Array();\n";
$i = -1;
diff --git a/libraries/Console.class.php b/libraries/Console.class.php
index db9d66341f..122854a3e8 100644
--- a/libraries/Console.class.php
+++ b/libraries/Console.class.php
@@ -307,8 +307,10 @@ class PMA_Console
. '
'
. '
'
+ . __(
+ 'Execute queries on Enter and insert new line with Shift + Enter. '
+ . 'To make this permanent, view settings.'
+ ) . '
'
. '
'
. '';
diff --git a/libraries/DisplayResults.class.php b/libraries/DisplayResults.class.php
index 23ba6164d6..59000a6abc 100644
--- a/libraries/DisplayResults.class.php
+++ b/libraries/DisplayResults.class.php
@@ -4211,7 +4211,7 @@ class PMA_DisplayResults
$map = array();
// find tables
- $target=array();
+ $target = array();
if (isset($analyzed_sql[0]['table_ref'])
&& is_array($analyzed_sql[0]['table_ref'])
) {
@@ -5346,7 +5346,7 @@ class PMA_DisplayResults
} else {
if ($relational_display == self::RELATIONAL_DISPLAY_COLUMN
- && ! empty($map[$meta->name][2])
+ && ! empty($map[$meta->name][2])
) {
// user chose "relational display field" in the
// display options, so show display field in the cell
diff --git a/libraries/Header.class.php b/libraries/Header.class.php
index 7847a16481..4064a235c1 100644
--- a/libraries/Header.class.php
+++ b/libraries/Header.class.php
@@ -404,8 +404,10 @@ class PMA_Header
$this->_scripts->addFile('codemirror/addon/hint/show-hint.js');
$this->_scripts->addFile('codemirror/addon/hint/sql-hint.js');
}
- $this->_scripts->addCode('ConsoleEnterExecutes='
- . ($GLOBALS['cfg']['ConsoleEnterExecutes'] ? 'true' : 'false'));
+ $this->_scripts->addCode(
+ 'ConsoleEnterExecutes='
+ . ($GLOBALS['cfg']['ConsoleEnterExecutes'] ? 'true' : 'false')
+ );
$this->_scripts->addFiles($this->_console->getScripts());
if ($this->_userprefsOfferImport) {
$this->_scripts->addFile('config.js');
diff --git a/libraries/central_columns.lib.php b/libraries/central_columns.lib.php
index 6fc849ff27..c936795378 100644
--- a/libraries/central_columns.lib.php
+++ b/libraries/central_columns.lib.php
@@ -975,7 +975,7 @@ function PMA_getHTMLforCentralColumnsEditTableRow($row, $odd_row, $row_num)
$meta['DefaultType'] = 'NONE';
} else {
if ($row['col_default'] == 'CURRENT_TIMESTAMP'
- || $row['col_default'] == 'NULL'
+ || $row['col_default'] == 'NULL'
) {
$meta['DefaultType'] = $row['col_default'];
} else {
@@ -1006,7 +1006,7 @@ function PMA_getHTMLforCentralColumnsEditTableRow($row, $odd_row, $row_num)
''
. PMA_getHtmlForColumnNull($row_num, 6, 0, array('Null'=>$row['col_isNull']))
. ' | ';
-
+
$tableHtml .=
''
. PMA_getHtmlForColumnExtra(
diff --git a/libraries/display_import.lib.php b/libraries/display_import.lib.php
index 76dbb69fac..b15341ab44 100644
--- a/libraries/display_import.lib.php
+++ b/libraries/display_import.lib.php
@@ -235,7 +235,7 @@ function PMA_getHtmlForImportOptionsFile($max_upload_size, $import_list)
$html .= ' ' . "\n";
diff --git a/libraries/navigation/NavigationTree.class.php b/libraries/navigation/NavigationTree.class.php
index 929e48b298..83408d9457 100644
--- a/libraries/navigation/NavigationTree.class.php
+++ b/libraries/navigation/NavigationTree.class.php
@@ -1009,7 +1009,7 @@ class PMA_NavigationTree
$retval .= "";
$retval .= $this->_getPaginationParamsHtml($node);
if ($GLOBALS['cfg']['ShowDatabasesNavigationAsTree']
- || $parentName != 'root'
+ || $parentName != 'root'
) {
$retval .= $node->getIcon($match);
}
diff --git a/libraries/normalization.lib.php b/libraries/normalization.lib.php
index f06a80d52d..f0611c2d1a 100644
--- a/libraries/normalization.lib.php
+++ b/libraries/normalization.lib.php
@@ -336,7 +336,7 @@ function PMA_getHtmlFor2NFstep1($db, $table)
. 'whose values combined together are sufficient'
. ' to determine the value of the column.'
);
- $cnt=0;
+ $cnt = 0;
foreach ($columns as $column) {
if (!in_array($column, $pk)) {
$cnt++;
@@ -383,7 +383,7 @@ function PMA_getHtmlForNewTables2NF($partialDependencies,$table)
), htmlspecialchars($table)
) . '';
$tableName = $table;
- $i=1;
+ $i = 1;
foreach ($partialDependencies as $key=>$dependents) {
$html .= ' '
@@ -483,7 +483,7 @@ function PMA_createNewTablesFor2NF($partialDependencies, $tablesName, $table, $d
function PMA_getHtmlForNewTables3NF($dependencies, $tables, $db)
{
$html = "";
- $i=1;
+ $i = 1;
$newTables = array();
foreach ($tables as $table=>$arrDependson) {
if (count(array_unique($arrDependson)) == 1) {
@@ -699,7 +699,7 @@ function PMA_getHtmlFor3NFstep1($db, $tables)
. 'Note: A column may have no transitive dependency, '
. 'in that case you don\'t have to select any.'
);
- $cnt=0;
+ $cnt = 0;
foreach ($tables as $key=>$table) {
$primary = PMA_Index::getPrimary($table, $db);
$primarycols = $primary->getColumns();
diff --git a/libraries/plugins/export/PMA_ExportPdf.class.php b/libraries/plugins/export/PMA_ExportPdf.class.php
index fb606940a3..dc69531286 100644
--- a/libraries/plugins/export/PMA_ExportPdf.class.php
+++ b/libraries/plugins/export/PMA_ExportPdf.class.php
@@ -282,12 +282,14 @@ class PMA_ExportPdf extends PMA_PDF
*/
public function getTriggers($db, $table)
{
- $i=0;
+ $i = 0;
$triggers = $GLOBALS['dbi']->getTriggers($db, $table);
foreach ($triggers as $trigger) {
$i++; break;
}
- if ($i==0) return; //prevents printing blank trigger list for any table
+ if ($i == 0) {
+ return; //prevents printing blank trigger list for any table
+ }
unset($this->tablewidths);
unset($this->colTitles);
diff --git a/libraries/plugins/export/TableProperty.class.php b/libraries/plugins/export/TableProperty.class.php
index 16d4c5b578..81b7ea478e 100644
--- a/libraries/plugins/export/TableProperty.class.php
+++ b/libraries/plugins/export/TableProperty.class.php
@@ -199,7 +199,7 @@ class TableProperty
*/
function isPK()
{
- return $this->key=="PRI";
+ return $this->key == "PRI";
}
/**
diff --git a/libraries/rte/rte_list.lib.php b/libraries/rte/rte_list.lib.php
index 7b7ab3d4e5..eb685b8597 100644
--- a/libraries/rte/rte_list.lib.php
+++ b/libraries/rte/rte_list.lib.php
@@ -184,7 +184,7 @@ function PMA_RTN_getRowForList($routine, $rowclass = '')
if ($routine !== false) {
if (PMA_Util::currentUserHasPrivilege('EXECUTE', $db)) {
$execute_action = 'execute_routine';
- for ($i=0; $i<$routine_details['item_num_params']; $i++) {
+ for ($i = 0; $i < $routine_details['item_num_params']; $i++) {
if ($routine_details['item_type'] == 'PROCEDURE'
&& $routine_details['item_param_dir'][$i] == 'OUT'
) {
diff --git a/libraries/rte/rte_routines.lib.php b/libraries/rte/rte_routines.lib.php
index 6b26f5dd30..10a4f79e90 100644
--- a/libraries/rte/rte_routines.lib.php
+++ b/libraries/rte/rte_routines.lib.php
@@ -123,7 +123,7 @@ function PMA_RTN_parseOneParameter($value)
$depth = 0;
$param_length = '';
$param_opts = array();
- for ($i=$pos; $i<$parsed_param['len']; $i++) {
+ for ($i = $pos; $i < $parsed_param['len']; $i++) {
if (($parsed_param[$i]['type'] == 'alpha_columnType'
|| $parsed_param[$i]['type'] == 'alpha_functionName') && $depth == 0
) {
@@ -183,7 +183,7 @@ function PMA_RTN_parseAllParameters($parsed_query, $routine_type)
$params = array();
$fetching = false;
$depth = 0;
- for ($i=0; $i<$parsed_query['len']; $i++) {
+ for ($i = 0; $i < $parsed_query['len']; $i++) {
if ($parsed_query[$i]['type'] == 'alpha_reservedWord'
&& $parsed_query[$i]['data'] == $routine_type
) {
@@ -249,7 +249,7 @@ function PMA_RTN_parseRoutineDefiner($parsed_query)
{
$retval = '';
$fetching = false;
- for ($i=0; $i<$parsed_query['len']; $i++) {
+ for ($i = 0; $i < $parsed_query['len']; $i++) {
if ($parsed_query[$i]['type'] == 'alpha_reservedWord'
&& $parsed_query[$i]['data'] == 'DEFINER'
) {
@@ -684,7 +684,7 @@ function PMA_RTN_getDataFromName($name, $type, $all = true)
// information about the return variable.
$dtd = '';
$fetching = false;
- for ($i=0; $i<$parsed_query['len']; $i++) {
+ for ($i = 0; $i < $parsed_query['len']; $i++) {
if ($parsed_query[$i]['type'] == 'alpha_reservedWord'
&& /*overload*/mb_strtoupper($parsed_query[$i]['data']) == 'RETURNS'
) {
@@ -877,7 +877,7 @@ function PMA_RTN_getEditorForm($mode, $operation, $routine)
foreach ($need_escape as $key => $index) {
$routine[$index] = htmlentities($routine[$index], ENT_QUOTES, 'UTF-8');
}
- for ($i=0; $i<$routine['item_num_params']; $i++) {
+ for ($i = 0; $i < $routine['item_num_params']; $i++) {
$routine['item_param_name'][$i] = htmlentities(
$routine['item_param_name'][$i],
ENT_QUOTES
@@ -992,7 +992,7 @@ function PMA_RTN_getEditorForm($mode, $operation, $routine)
$retval .= " | " . __('Options') . " | \n";
$retval .= " | \n";
$retval .= " ";
- for ($i=0; $i<$routine['item_num_params']; $i++) { // each parameter
+ for ($i = 0; $i < $routine['item_num_params']; $i++) { // each parameter
$retval .= PMA_RTN_getParameterRow($routine, $i, $isprocedure_class);
}
$retval .= " ";
@@ -1350,7 +1350,7 @@ function PMA_RTN_handleExecute()
$end_query = array();
$args = array();
$all_functions = $GLOBALS['PMA_Types']->getAllFunctions();
- for ($i=0; $i<$routine['item_num_params']; $i++) {
+ for ($i = 0; $i < $routine['item_num_params']; $i++) {
if (isset($_REQUEST['params'][$routine['item_param_name'][$i]])) {
$value = $_REQUEST['params'][$routine['item_param_name'][$i]];
if (is_array($value)) { // is SET type
@@ -1593,7 +1593,7 @@ function PMA_RTN_getExecuteForm($routine)
// Escape special characters
$routine['item_name'] = htmlentities($routine['item_name'], ENT_QUOTES);
- for ($i=0; $i<$routine['item_num_params']; $i++) {
+ for ($i = 0; $i < $routine['item_num_params']; $i++) {
$routine['item_param_name'][$i] = htmlentities(
$routine['item_param_name'][$i],
ENT_QUOTES
@@ -1631,7 +1631,7 @@ function PMA_RTN_getExecuteForm($routine)
$retval .= "\n";
// Get a list of data types that are not yet supported.
$no_support_types = PMA_Util::unsupportedDatatypes();
- for ($i=0; $i<$routine['item_num_params']; $i++) { // Each parameter
+ for ($i = 0; $i < $routine['item_num_params']; $i++) { // Each parameter
if ($routine['item_type'] == 'PROCEDURE'
&& $routine['item_param_dir'][$i] == 'OUT'
) {
@@ -1687,7 +1687,7 @@ function PMA_RTN_getExecuteForm($routine)
} else {
$input_type = 'checkbox';
}
- for ($j=0; $j<$tokens['len']; $j++) {
+ for ($j = 0; $j < $tokens['len']; $j++) {
if ($tokens[$j]['type'] != 'punct_listsep') {
$tokens[$j]['data'] = htmlentities(
PMA_Util::unquote($tokens[$j]['data']),
diff --git a/libraries/server_status_monitor.lib.php b/libraries/server_status_monitor.lib.php
index 1f3466b17e..fb9ddfee8e 100644
--- a/libraries/server_status_monitor.lib.php
+++ b/libraries/server_status_monitor.lib.php
@@ -40,7 +40,7 @@ function PMA_getHtmlForMonitor($ServerStatusData)
$retval .= '