The branch, master has been updated
via 299da6d047de5374ea8964c17f9c6bff059391e8 (commit)
via 21c5148d1701fa249379b523b49cdf9cf46c3ead (commit)
via 13adb5adf7e2b429819a85131edd998b34726ad7 (commit)
via 9bcb83af03d9f988a2e2c754e6b9b3cf2c468555 (commit)
from e67a0a2531fff325477c5babcfffbf205ca755b3 (commit)
- Log -----------------------------------------------------------------
commit 299da6d047de5374ea8964c17f9c6bff059391e8
Author: Madhura Jayaratne <madhura.cj(a)gmail.com>
Date: Fri Sep 23 11:36:14 2011 +0530
More style errors fixed
commit 21c5148d1701fa249379b523b49cdf9cf46c3ead
Author: Madhura Jayaratne <madhura.cj(a)gmail.com>
Date: Fri Sep 23 11:24:06 2011 +0530
Style errors with class declarations
commit 13adb5adf7e2b429819a85131edd998b34726ad7
Author: Madhura Jayaratne <madhura.cj(a)gmail.com>
Date: Fri Sep 23 11:11:41 2011 +0530
Use lower case for true, false and null
commit 9bcb83af03d9f988a2e2c754e6b9b3cf2c468555
Author: Madhura Jayaratne <madhura.cj(a)gmail.com>
Date: Fri Sep 23 10:56:30 2011 +0530
File is being conditionally included; use "include" instead
-----------------------------------------------------------------------
Summary of changes:
bs_play_media.php | 4 +-
db_create.php | 6 ++--
db_operations.php | 4 +-
import.php | 2 +-
libraries/List_Database.class.php | 2 +-
libraries/database_interface.lib.php | 4 +-
libraries/db_info.inc.php | 2 +-
libraries/db_table_exists.lib.php | 2 +-
libraries/dbi/mysql.dbi.lib.php | 8 ++--
libraries/display_create_database.lib.php | 2 +-
libraries/display_export.lib.php | 2 +-
libraries/display_import.lib.php | 2 +-
libraries/engines/innobase.lib.php | 5 ++-
libraries/export/excel.php | 2 +-
libraries/export/latex.php | 4 +-
libraries/export/ods.php | 2 +-
libraries/export/odt.php | 2 +-
libraries/export/pdf.php | 2 +-
libraries/export/sql.php | 4 +-
libraries/footer.inc.php | 2 +-
libraries/import/shp.php | 4 +-
libraries/opendocument.lib.php | 12 ++++----
libraries/pmd_common.php | 6 ++--
libraries/relation.lib.php | 4 +-
libraries/rte/rte_events.lib.php | 2 +-
libraries/rte/rte_routines.lib.php | 4 +-
libraries/rte/rte_triggers.lib.php | 2 +-
libraries/sqlparser.lib.php | 6 ++--
libraries/sqlvalidator.class.php | 4 +-
libraries/sqlvalidator.lib.php | 2 +-
libraries/svg_plot/pma_svg_data_element.php | 8 ++--
libraries/tbl_properties.inc.php | 4 +-
.../transformations/image_jpeg__inline.inc.php | 2 +-
libraries/transformations/image_jpeg__link.inc.php | 2 +-
.../transformations/image_png__inline.inc.php | 2 +-
.../transformations/text_plain__imagelink.inc.php | 2 +-
libraries/transformations/text_plain__link.inc.php | 2 +-
pmd_relation_upd.php | 31 +++++++++++---------
prefs_manage.php | 6 ++--
querywindow.php | 6 ++--
server_databases.php | 6 ++--
server_replication.php | 6 ++--
server_status.php | 2 +-
server_synchronize.php | 8 +++--
setup/config.php | 2 +-
sql.php | 10 +++---
tbl_addfield.php | 2 +-
tbl_alter.php | 2 +-
tbl_indexes.php | 10 +++---
tbl_move_copy.php | 6 ++--
tbl_operations.php | 2 +-
tbl_printview.php | 4 +-
tbl_replace.php | 4 +-
tbl_tracking.php | 2 +-
test/classes/PMA_Config_test.php | 2 +-
test/libraries/common/PMA_getDbLink_test.php | 4 +-
.../common/PMA_showMessage_test_disabled.php | 2 +-
test/libraries/core/PMA_array_test.php | 2 +-
.../core/PMA_headerLocation_test_disabled.php | 8 ++--
.../rte/PMA_RTN_getDataFromRequest_test.php | 2 +-
test/libraries/rte/PMA_RTN_getEditorForm_test.php | 2 +-
test/libraries/rte/PMA_RTN_getExecuteForm_test.php | 2 +-
.../rte/PMA_RTN_getQueryFromRequest_test.php | 2 +-
test/selenium/PmaSeleniumLoginTest.php | 4 +-
test/selenium/PmaSeleniumPrivilegesTest.php | 4 +-
test/selenium/PmaSeleniumTestCase.php | 2 +-
test/selenium/PmaSeleniumXssTest.php | 4 +-
transformation_overview.php | 2 +-
view_create.php | 2 +-
69 files changed, 145 insertions(+), 139 deletions(-)
diff --git a/bs_play_media.php b/bs_play_media.php
index fe6f574..d9ba62a 100644
--- a/bs_play_media.php
+++ b/bs_play_media.php
@@ -12,7 +12,7 @@
/*
* @var string contains media type of BLOB reference
*/
- $mediaType = isset($_REQUEST['media_type']) ? $_REQUEST['media_type']
: NULL;
+ $mediaType = isset($_REQUEST['media_type']) ? $_REQUEST['media_type']
: null;
/*
* @var string indicates whether media type is of custom type
@@ -22,7 +22,7 @@
/*
* @var string contains BLOB reference
*/
- $bsReference = isset($_REQUEST['bs_reference']) ?
$_REQUEST['bs_reference'] : NULL;
+ $bsReference = isset($_REQUEST['bs_reference']) ?
$_REQUEST['bs_reference'] : null;
// if media type and BS reference are specified
if (isset($mediaType) && isset($bsReference)) {
diff --git a/db_create.php b/db_create.php
index 27bf279..3548f8f 100644
--- a/db_create.php
+++ b/db_create.php
@@ -69,16 +69,16 @@ if (! $result) {
/**
* String containing the SQL Query formatted in pretty HTML
* @global array $GLOBALS['extra_data']
- * @name $extra_data
+ * @name $extra_data
*/
- $extra_data['sql_query'] = PMA_showMessage(NULL, $sql_query,
'success');
+ $extra_data['sql_query'] = PMA_showMessage(null, $sql_query,
'success');
//Construct the html for the new database, so that it can be appended to the list
of databases on server_databases.php
/**
* Build the array to be passed to {@link PMA_generate_common_url} to generate
the links
* @global array $GLOBALS['db_url_params']
- * @name $db_url_params
+ * @name $db_url_params
*/
$db_url_params['db'] = $new_db;
diff --git a/db_operations.php b/db_operations.php
index b364d81..0bfedb0 100644
--- a/db_operations.php
+++ b/db_operations.php
@@ -304,7 +304,7 @@ if (strlen($db) && (! empty($db_rename) || ! empty($db_copy)))
{
*/
if ( $GLOBALS['is_ajax_request'] == true) {
$extra_data['newname'] = $newname;
- $extra_data['sql_query'] = PMA_showMessage(NULL, $sql_query);
+ $extra_data['sql_query'] = PMA_showMessage(null, $sql_query);
PMA_ajaxResponse($message, $message->isSuccess(), $extra_data);
};
}
@@ -442,7 +442,7 @@ echo __('Remove database');
'reload' => '1',
'purge' => '1',
'message_to_show' => sprintf(__('Database %s has been
dropped.'), htmlspecialchars(PMA_backquote($db))),
- 'db' => NULL,
+ 'db' => null,
);
?>
<li><a href="sql.php<?php echo
PMA_generate_common_url($this_url_params); ?>" <?php echo
($GLOBALS['cfg']['AjaxEnable'] ? 'id="drop_db_anchor"' :
''); ?>>
diff --git a/import.php b/import.php
index d3c4b79..fab1d3f 100644
--- a/import.php
+++ b/import.php
@@ -395,7 +395,7 @@ if (!$error) {
}
}
-if (! $error && false !== $import_handle && NULL !== $import_handle) {
+if (! $error && false !== $import_handle && null !== $import_handle) {
fclose($import_handle);
}
diff --git a/libraries/List_Database.class.php b/libraries/List_Database.class.php
index 760d19d..dd5593a 100644
--- a/libraries/List_Database.class.php
+++ b/libraries/List_Database.class.php
@@ -453,7 +453,7 @@ require_once './libraries/List.class.php';
// TODO: db names may contain characters
// that are regexp instructions
$re = '(^|(\\\\\\\\)+|[^\])';
- $tmp_regex = preg_replace('/' . addcslashes($re,
'/') . '%/', '\\1.*', preg_replace('/' .
addcslashes($re,'/') . '_/', '\\1.{1}', $tmp_matchpattern));
+ $tmp_regex = preg_replace('/' . addcslashes($re,
'/') . '%/', '\\1.*', preg_replace('/' . addcslashes($re,
'/') . '_/', '\\1.{1}', $tmp_matchpattern));
// Fixed db name matching
// 2000-08-28 -- Benjamin Gandon
if (preg_match('/^' . addcslashes($tmp_regex,
'/') . '$/', $tmp_db)) {
diff --git a/libraries/database_interface.lib.php b/libraries/database_interface.lib.php
index f0520a7..921ba90 100644
--- a/libraries/database_interface.lib.php
+++ b/libraries/database_interface.lib.php
@@ -203,7 +203,7 @@ function PMA_DBI_convert_message($message)
if (! empty($server_language) && isset($encodings[$server_language])) {
if (function_exists('iconv')) {
if ((@stristr(PHP_OS, 'AIX')) && (@strcasecmp(ICONV_IMPL,
'unknown') == 0) && (@strcasecmp(ICONV_VERSION, 'unknown') == 0))
{
- require_once './libraries/iconv_wrapper.lib.php';
+ include_once './libraries/iconv_wrapper.lib.php';
$message = PMA_aix_iconv_wrapper($encodings[$server_language],
'utf-8' .
$GLOBALS['cfg']['IconvExtraParams'], $message);
} else {
@@ -730,7 +730,7 @@ function PMA_DBI_get_databases_full($database = null, $force_stats =
false,
$databases[$database_name]['SCHEMA_NAME'] = $database_name;
if ($force_stats) {
- require_once './libraries/mysql_charsets.lib.php';
+ include_once './libraries/mysql_charsets.lib.php';
$databases[$database_name]['DEFAULT_COLLATION_NAME']
= PMA_getDbCollation($database_name);
diff --git a/libraries/db_info.inc.php b/libraries/db_info.inc.php
index 80b8c51..3e5f342 100644
--- a/libraries/db_info.inc.php
+++ b/libraries/db_info.inc.php
@@ -257,6 +257,6 @@ unset($each_table, $tbl_group_sql, $db_info_result);
* If in an Ajax request, we do not need to show this
*/
if ($GLOBALS['is_ajax_request'] != true) {
- require './libraries/db_links.inc.php';
+ include './libraries/db_links.inc.php';
}
?>
diff --git a/libraries/db_table_exists.lib.php b/libraries/db_table_exists.lib.php
index 97b7ec8..cd74d78 100644
--- a/libraries/db_table_exists.lib.php
+++ b/libraries/db_table_exists.lib.php
@@ -73,7 +73,7 @@ if (empty($is_table) && !defined('PMA_SUBMIT_MULT')
&& ! defined('TABLE_MAY_BE_A
}
if (! $is_table) {
- require './db_sql.php';
+ include './db_sql.php';
exit;
}
}
diff --git a/libraries/dbi/mysql.dbi.lib.php b/libraries/dbi/mysql.dbi.lib.php
index d745f1b..57cb7ff 100644
--- a/libraries/dbi/mysql.dbi.lib.php
+++ b/libraries/dbi/mysql.dbi.lib.php
@@ -99,17 +99,17 @@ function PMA_DBI_connect($user, $password, $is_controluser = false,
$server = nu
}
if (!$server) {
- $link = PMA_DBI_real_connect($cfg['Server']['host'] .
$server_port . $server_socket, $user, $password, empty($client_flags) ? NULL :
$client_flags);
+ $link = PMA_DBI_real_connect($cfg['Server']['host'] .
$server_port . $server_socket, $user, $password, empty($client_flags) ? null :
$client_flags);
// Retry with empty password if we're allowed to
if (empty($link) && $cfg['Server']['nopassword']
&& !$is_controluser) {
- $link = PMA_DBI_real_connect($cfg['Server']['host'] .
$server_port . $server_socket, $user, '', empty($client_flags) ? NULL :
$client_flags);
+ $link = PMA_DBI_real_connect($cfg['Server']['host'] .
$server_port . $server_socket, $user, '', empty($client_flags) ? null :
$client_flags);
}
} else {
if (!isset($server['host'])) {
- $link = PMA_DBI_real_connect($server_socket, $user, $password, NULL);
+ $link = PMA_DBI_real_connect($server_socket, $user, $password, null);
} else {
- $link = PMA_DBI_real_connect($server['host'] . $server_port .
$server_socket, $user, $password, NULL);
+ $link = PMA_DBI_real_connect($server['host'] . $server_port .
$server_socket, $user, $password, null);
}
}
if (empty($link)) {
diff --git a/libraries/display_create_database.lib.php
b/libraries/display_create_database.lib.php
index 1ec7931..eac2c1d 100644
--- a/libraries/display_create_database.lib.php
+++ b/libraries/display_create_database.lib.php
@@ -23,7 +23,7 @@ if ($is_create_db_priv) {
<input type="hidden" name="reload" value="1"
/>
<input type="text" name="new_db" value="<?php
echo $db_to_create; ?>" maxlength="64" class="textfield"
id="text_create_db"/>
<?php
- require_once './libraries/mysql_charsets.lib.php';
+ include_once './libraries/mysql_charsets.lib.php';
echo PMA_generateCharsetDropdownBox(PMA_CSDROPDOWN_COLLATION, 'db_collation',
null, null, true, 5);
if (! empty($dbstats)) {
diff --git a/libraries/display_export.lib.php b/libraries/display_export.lib.php
index a37c571..b855191 100644
--- a/libraries/display_export.lib.php
+++ b/libraries/display_export.lib.php
@@ -35,7 +35,7 @@ $export_list = PMA_getPlugins('./libraries/export/',
array('export_type' => $exp
/* Fail if we didn't find any plugin */
if (empty($export_list)) {
PMA_Message::error( __('Could not load export plugins, please check your
installation!'))->display();
- require './libraries/footer.inc.php';
+ include './libraries/footer.inc.php';
}
?>
diff --git a/libraries/display_import.lib.php b/libraries/display_import.lib.php
index d709631..8e17e5a 100644
--- a/libraries/display_import.lib.php
+++ b/libraries/display_import.lib.php
@@ -21,7 +21,7 @@ $import_list = PMA_getPlugins('./libraries/import/',
$import_type);
/* Fail if we didn't find any plugin */
if (empty($import_list)) {
PMA_Message::error(__('Could not load import plugins, please check your
installation!'))->display();
- require './libraries/footer.inc.php';
+ include './libraries/footer.inc.php';
}
?>
diff --git a/libraries/engines/innobase.lib.php b/libraries/engines/innobase.lib.php
index f626975..818e9e1 100644
--- a/libraries/engines/innobase.lib.php
+++ b/libraries/engines/innobase.lib.php
@@ -14,6 +14,7 @@ require_once './libraries/engines/innodb.lib.php';
*
* @package phpMyAdmin-Engines
*/
-class PMA_StorageEngine_innobase extends PMA_StorageEngine_innodb {}
-
+class PMA_StorageEngine_innobase extends PMA_StorageEngine_innodb
+{
+}
?>
diff --git a/libraries/export/excel.php b/libraries/export/excel.php
index df329de..44bbc44 100644
--- a/libraries/export/excel.php
+++ b/libraries/export/excel.php
@@ -38,6 +38,6 @@ if (isset($plugin_list)) {
);
} else {
/* Everything rest is coded in csv plugin */
- require './libraries/export/csv.php';
+ include './libraries/export/csv.php';
}
?>
diff --git a/libraries/export/latex.php b/libraries/export/latex.php
index 1e84820..ad10478 100644
--- a/libraries/export/latex.php
+++ b/libraries/export/latex.php
@@ -209,7 +209,7 @@ if (isset($plugin_list)) {
$buffer .= ' \\hline \\endhead \\hline \\endfoot \\hline ' . $crlf;
if (isset($GLOBALS['latex_caption'])) {
$buffer .= ' \\caption{' .
PMA_expandUserString($GLOBALS['latex_data_caption'], 'PMA_texEscape',
array('table' => $table, 'database' => $db))
- . '} \\label{' .
PMA_expandUserString($GLOBALS['latex_data_label'], NULL, array('table'
=> $table, 'database' => $db)) . '} \\\\';
+ . '} \\label{' .
PMA_expandUserString($GLOBALS['latex_data_label'], null, array('table'
=> $table, 'database' => $db)) . '} \\\\';
}
if (!PMA_exportOutputHandler($buffer)) {
return false;
@@ -372,7 +372,7 @@ if (isset($plugin_list)) {
// Table caption for first page and label
if (isset($GLOBALS['latex_caption'])) {
$buffer .= ' \\caption{'.
PMA_expandUserString($GLOBALS['latex_structure_caption'], 'PMA_texEscape',
array('table' => $table, 'database' => $db))
- . '} \\label{' .
PMA_expandUserString($GLOBALS['latex_structure_label'], NULL,
array('table' => $table, 'database' => $db))
+ . '} \\label{' .
PMA_expandUserString($GLOBALS['latex_structure_label'], null,
array('table' => $table, 'database' => $db))
. '} \\\\' . $crlf;
}
$buffer .= $header . ' \\\\ \\hline \\hline' . $crlf .
'\\endfirsthead' . $crlf;
diff --git a/libraries/export/ods.php b/libraries/export/ods.php
index 0c62878..a13360f 100644
--- a/libraries/export/ods.php
+++ b/libraries/export/ods.php
@@ -31,7 +31,7 @@ if (isset($plugin_list)) {
} else {
$GLOBALS['ods_buffer'] = '';
- require_once './libraries/opendocument.lib.php';
+ include_once './libraries/opendocument.lib.php';
/**
* Outputs export footer
diff --git a/libraries/export/odt.php b/libraries/export/odt.php
index fc2b536..b2c88eb 100644
--- a/libraries/export/odt.php
+++ b/libraries/export/odt.php
@@ -63,7 +63,7 @@ if (isset($plugin_list)) {
} else {
$GLOBALS['odt_buffer'] = '';
- require_once './libraries/opendocument.lib.php';
+ include_once './libraries/opendocument.lib.php';
/**
* Outputs export footer
diff --git a/libraries/export/pdf.php b/libraries/export/pdf.php
index 61c8dce..903df74 100644
--- a/libraries/export/pdf.php
+++ b/libraries/export/pdf.php
@@ -30,7 +30,7 @@ if (isset($plugin_list)) {
);
} else {
- require_once './libraries/PDF.class.php';
+ include_once './libraries/PDF.class.php';
/**
* Adapted from a LGPL script by Philip Clarke
diff --git a/libraries/export/sql.php b/libraries/export/sql.php
index 988ec46..dff5a94 100644
--- a/libraries/export/sql.php
+++ b/libraries/export/sql.php
@@ -627,7 +627,7 @@ if (isset($plugin_list)) {
$delimiter = '$$';
if (PMA_MYSQL_INT_VERSION > 50100) {
- $event_names = PMA_DBI_fetch_result('SELECT EVENT_NAME FROM
information_schema.EVENTS WHERE EVENT_SCHEMA= \'' . PMA_sqlAddSlashes($db,true) .
'\';');
+ $event_names = PMA_DBI_fetch_result('SELECT EVENT_NAME FROM
information_schema.EVENTS WHERE EVENT_SCHEMA= \'' . PMA_sqlAddSlashes($db, true) .
'\';');
} else {
$event_names = array();
}
@@ -759,7 +759,7 @@ if (isset($plugin_list)) {
$schema_create .= $new_crlf;
// no need to generate a DROP VIEW here, it was done earlier
- if (! empty($sql_drop_table) && ! PMA_Table::isView($db,$table)) {
+ if (! empty($sql_drop_table) && ! PMA_Table::isView($db, $table)) {
$schema_create .= 'DROP TABLE IF EXISTS ' . PMA_backquote($table,
$sql_backquotes) . ';' . $crlf;
}
diff --git a/libraries/footer.inc.php b/libraries/footer.inc.php
index dbb1f1a..9d6259d 100644
--- a/libraries/footer.inc.php
+++ b/libraries/footer.inc.php
@@ -174,7 +174,7 @@ setURLHash("<?php echo PMA_generate_common_url($url_params,
'text', ''); ?>");
// Include possible custom footers
if (! $GLOBALS['is_ajax_request'] && file_exists(CUSTOM_FOOTER_FILE)) {
- require CUSTOM_FOOTER_FILE;
+ include CUSTOM_FOOTER_FILE;
}
/**
diff --git a/libraries/import/shp.php b/libraries/import/shp.php
index 977d117..948b87c 100644
--- a/libraries/import/shp.php
+++ b/libraries/import/shp.php
@@ -63,8 +63,8 @@ if (isset($plugin_list)) {
* reading directly from a file. Using readFromBuffer() in place of fread().
* This makes it possible to use compressions.
*/
- class PMA_ShapeFile extends ShapeFile {
-
+ class PMA_ShapeFile extends ShapeFile
+ {
function _isDbaseLoaded()
{
return extension_loaded('dbase');
diff --git a/libraries/opendocument.lib.php b/libraries/opendocument.lib.php
index c161f22..85ad3f3 100644
--- a/libraries/opendocument.lib.php
+++ b/libraries/opendocument.lib.php
@@ -45,8 +45,8 @@ function PMA_createOpenDocument($mime, $data)
. '<meta:initial-creator>phpMyAdmin ' . PMA_VERSION .
'</meta:initial-creator>'
. '<meta:creation-date>' .
strftime('%Y-%m-%dT%H:%M:%S') . '</meta:creation-date>'
. '</office:meta>'
- . '</office:document-meta>'
- , 'meta.xml');
+ . '</office:document-meta>',
+ 'meta.xml');
$zipfile -> addFile('<?xml version="1.0"
encoding="UTF-8"?' . '>'
. '<office:document-styles '. $GLOBALS['OpenDocumentNS'] .
'office:version="1.0">'
. '<office:font-face-decls>'
@@ -89,16 +89,16 @@ function PMA_createOpenDocument($mime, $data)
. '<office:master-styles>'
. '<style:master-page style:name="Standard"
style:page-layout-name="pm1"/>'
. '</office:master-styles>'
- . '</office:document-styles>'
- , 'styles.xml');
+ . '</office:document-styles>',
+ 'styles.xml');
$zipfile -> addFile('<?xml version="1.0"
encoding="UTF-8"?' . '>'
. '<manifest:manifest
xmlns:manifest="urn:oasis:names:tc:opendocument:xmlns:manifest:1.0">'
. '<manifest:file-entry manifest:media-type="' . $mime .
'" manifest:full-path="/"/>'
. '<manifest:file-entry manifest:media-type="text/xml"
manifest:full-path="content.xml"/>'
. '<manifest:file-entry manifest:media-type="text/xml"
manifest:full-path="meta.xml"/>'
. '<manifest:file-entry manifest:media-type="text/xml"
manifest:full-path="styles.xml"/>'
- . '</manifest:manifest>'
- , 'META-INF/manifest.xml');
+ . '</manifest:manifest>',
+ 'META-INF/manifest.xml');
return $zipfile -> file();
}
?>
diff --git a/libraries/pmd_common.php b/libraries/pmd_common.php
index 7d14191..4c42c57 100644
--- a/libraries/pmd_common.php
+++ b/libraries/pmd_common.php
@@ -75,7 +75,7 @@ function get_tab_info()
PMA_DBI_select_db($GLOBALS['db']);
$tab_column = array();
for ($i = 0, $cnt = count($GLOBALS['PMD']["TABLE_NAME"]); $i <
$cnt; $i++) {
- $fields_rs = PMA_DBI_query(PMA_DBI_get_columns_sql($GLOBALS['db'],
$GLOBALS['PMD']["TABLE_NAME_SMALL"][$i], null, true), NULL,
PMA_DBI_QUERY_STORE);
+ $fields_rs = PMA_DBI_query(PMA_DBI_get_columns_sql($GLOBALS['db'],
$GLOBALS['PMD']["TABLE_NAME_SMALL"][$i], null, true), null,
PMA_DBI_QUERY_STORE);
$j = 0;
while ($row = PMA_DBI_fetch_assoc($fields_rs)) {
$tab_column[$GLOBALS['PMD']['TABLE_NAME'][$i]]['COLUMN_ID'][$j]
= $j;
@@ -98,7 +98,7 @@ function get_script_contr()
PMA_DBI_select_db($GLOBALS['db']);
$con["C_NAME"] = array();
$i = 0;
- $alltab_rs = PMA_DBI_query('SHOW TABLES FROM ' .
PMA_backquote($GLOBALS['db']), NULL, PMA_DBI_QUERY_STORE);
+ $alltab_rs = PMA_DBI_query('SHOW TABLES FROM ' .
PMA_backquote($GLOBALS['db']), null, PMA_DBI_QUERY_STORE);
while ($val = @PMA_DBI_fetch_row($alltab_rs)) {
$row = PMA_getForeigners($GLOBALS['db'], $val[0], '',
'internal');
//echo "<br> internal ".$GLOBALS['db']." -
".$val[0]." - ";
@@ -172,7 +172,7 @@ function get_pk_or_unique_keys()
*/
function get_all_keys($unique_only = false)
{
- require_once './libraries/Index.class.php';
+ include_once './libraries/Index.class.php';
$keys = array();
diff --git a/libraries/relation.lib.php b/libraries/relation.lib.php
index d0ff706..b7ea862 100644
--- a/libraries/relation.lib.php
+++ b/libraries/relation.lib.php
@@ -440,10 +440,10 @@ function PMA_getForeigners($db, $table, $column = '',
$source = 'both')
if (($is_information_schema || $is_data_dictionary) && ($source ==
'internal' || $source == 'both')) {
if ($is_information_schema) {
$relations_key = 'information_schema_relations';
- require_once './libraries/information_schema_relations.lib.php';
+ include_once './libraries/information_schema_relations.lib.php';
} else {
$relations_key = 'data_dictionary_relations';
- require_once './libraries/data_dictionary_relations.lib.php';
+ include_once './libraries/data_dictionary_relations.lib.php';
}
if (isset($GLOBALS[$relations_key][$table])) {
foreach ($GLOBALS[$relations_key][$table] as $field => $relations) {
diff --git a/libraries/rte/rte_events.lib.php b/libraries/rte/rte_events.lib.php
index a35d436..c4b6a1f 100644
--- a/libraries/rte/rte_events.lib.php
+++ b/libraries/rte/rte_events.lib.php
@@ -205,7 +205,7 @@ function PMA_EVN_handleEditor()
} else {
echo "\n\n<h2>$title</h2>\n\n$editor";
unset($_POST);
- require './libraries/footer.inc.php';
+ include './libraries/footer.inc.php';
}
// exit;
} else {
diff --git a/libraries/rte/rte_routines.lib.php b/libraries/rte/rte_routines.lib.php
index 8cd0529..a6557d7 100644
--- a/libraries/rte/rte_routines.lib.php
+++ b/libraries/rte/rte_routines.lib.php
@@ -366,7 +366,7 @@ function PMA_RTN_handleEditor()
PMA_ajaxResponse($editor, true, $extra_data);
}
echo "\n\n<h2>$title</h2>\n\n$editor";
- require './libraries/footer.inc.php';
+ include './libraries/footer.inc.php';
// exit;
} else {
$message = __('Error in processing request') . ' : ';
@@ -1297,7 +1297,7 @@ function PMA_RTN_handleExecute()
} else {
echo "\n\n<h2>" . __("Execute routine") .
"</h2>\n\n";
echo $form;
- require './libraries/footer.inc.php';
+ include './libraries/footer.inc.php';
// exit;
}
} else if (($GLOBALS['is_ajax_request'] == true)) {
diff --git a/libraries/rte/rte_triggers.lib.php b/libraries/rte/rte_triggers.lib.php
index b4e5d40..29cc60f 100644
--- a/libraries/rte/rte_triggers.lib.php
+++ b/libraries/rte/rte_triggers.lib.php
@@ -180,7 +180,7 @@ function PMA_TRI_handleEditor()
} else {
echo "\n\n<h2>$title</h2>\n\n$editor";
unset($_POST);
- require './libraries/footer.inc.php';
+ include './libraries/footer.inc.php';
}
// exit;
} else {
diff --git a/libraries/sqlparser.lib.php b/libraries/sqlparser.lib.php
index 703d08a..6b1a315 100644
--- a/libraries/sqlparser.lib.php
+++ b/libraries/sqlparser.lib.php
@@ -37,14 +37,14 @@ if (! defined('PMA_MINIMUM_COMMON')) {
/**
* Include the string library as we use it heavily
*/
- require_once './libraries/string.lib.php';
+ include_once './libraries/string.lib.php';
/**
* Include data for the SQL Parser
*/
- require_once './libraries/sqlparser.data.php';
+ include_once './libraries/sqlparser.data.php';
if (!defined('TESTSUITE')) {
- require_once './libraries/mysql_charsets.lib.php';
+ include_once './libraries/mysql_charsets.lib.php';
}
if (! isset($mysql_charsets)) {
$mysql_charsets = array();
diff --git a/libraries/sqlvalidator.class.php b/libraries/sqlvalidator.class.php
index abbe6e9..654a9c8 100644
--- a/libraries/sqlvalidator.class.php
+++ b/libraries/sqlvalidator.class.php
@@ -45,8 +45,8 @@ if (!$GLOBALS['sqlvalidator_error']) {
/**
* @package phpMyAdmin
*/
- class PMA_SQLValidator {
-
+ class PMA_SQLValidator
+ {
var $url;
var $service_name;
var $wsdl;
diff --git a/libraries/sqlvalidator.lib.php b/libraries/sqlvalidator.lib.php
index 68934dd..5309890 100644
--- a/libraries/sqlvalidator.lib.php
+++ b/libraries/sqlvalidator.lib.php
@@ -39,7 +39,7 @@ if (! defined('PHPMYADMIN')) {
* For now we actually use a configuration flag
*/
if ($cfg['SQLValidator']['use'] == true) {
- require_once './libraries/sqlvalidator.class.php';
+ include_once './libraries/sqlvalidator.class.php';
} // if ($cfg['SQLValidator']['use'] == true)
diff --git a/libraries/svg_plot/pma_svg_data_element.php
b/libraries/svg_plot/pma_svg_data_element.php
index 97f7734..15a3ddc 100644
--- a/libraries/svg_plot/pma_svg_data_element.php
+++ b/libraries/svg_plot/pma_svg_data_element.php
@@ -4,8 +4,8 @@
*
* @package phpMyAdmin
*/
-abstract class PMA_SVG_Data_Element{
-
+abstract class PMA_SVG_Data_Element
+{
protected $label = '';
protected $dataRow = array();
@@ -26,7 +26,7 @@ abstract class PMA_SVG_Data_Element{
* @return the code related to a row in the GIS dataset
*/
public abstract function prepareRowAsSVG($options);
-
+
public function getLabel()
{
return $this->label;
@@ -36,7 +36,7 @@ abstract class PMA_SVG_Data_Element{
{
$this->label = $label;
}
-
+
public function getDataRow()
{
return $this->dataRow;
diff --git a/libraries/tbl_properties.inc.php b/libraries/tbl_properties.inc.php
index 8b42189..e5342d3 100644
--- a/libraries/tbl_properties.inc.php
+++ b/libraries/tbl_properties.inc.php
@@ -29,9 +29,9 @@ require_once './libraries/Partition.class.php';
// load additional configuration variables
if (PMA_DRIZZLE) {
- require_once './libraries/data_drizzle.inc.php';
+ include_once './libraries/data_drizzle.inc.php';
} else {
- require_once './libraries/data_mysql.inc.php';
+ include_once './libraries/data_mysql.inc.php';
}
if (is_int($cfg['DefaultPropDisplay'])) {
diff --git a/libraries/transformations/image_jpeg__inline.inc.php
b/libraries/transformations/image_jpeg__inline.inc.php
index 4ff1e72..97e4baf 100644
--- a/libraries/transformations/image_jpeg__inline.inc.php
+++ b/libraries/transformations/image_jpeg__inline.inc.php
@@ -16,7 +16,7 @@ function PMA_transformation_image_jpeg__inline_info()
*/
function PMA_transformation_image_jpeg__inline($buffer, $options = array(), $meta =
'')
{
- require_once './libraries/transformations/global.inc.php';
+ include_once './libraries/transformations/global.inc.php';
if (PMA_IS_GD2) {
$transform_options = array ('string' => '<a
href="transformation_wrapper.php' . $options['wrapper_link'] .
'" target="_blank"><img src="transformation_wrapper.php'
. $options['wrapper_link'] . '&resize=jpeg&newWidth=' .
(isset($options[0]) ? $options[0] : '100') . '&newHeight=' .
(isset($options[1]) ? $options[1] : 100) . '" alt="[__BUFFER__]"
border="0" /></a>');
diff --git a/libraries/transformations/image_jpeg__link.inc.php
b/libraries/transformations/image_jpeg__link.inc.php
index 8988dd7..82800c1 100644
--- a/libraries/transformations/image_jpeg__link.inc.php
+++ b/libraries/transformations/image_jpeg__link.inc.php
@@ -16,7 +16,7 @@ function PMA_transformation_image_jpeg__link_info()
*/
function PMA_transformation_image_jpeg__link($buffer, $options = array(), $meta =
'')
{
- require_once './libraries/transformations/global.inc.php';
+ include_once './libraries/transformations/global.inc.php';
$transform_options = array ('string' => '<a
href="transformation_wrapper.php' . $options['wrapper_link'] .
'" alt="[__BUFFER__]">[BLOB]</a>');
$buffer = PMA_transformation_global_html_replace($buffer, $transform_options);
diff --git a/libraries/transformations/image_png__inline.inc.php
b/libraries/transformations/image_png__inline.inc.php
index 5c9fc4b..481af25 100644
--- a/libraries/transformations/image_png__inline.inc.php
+++ b/libraries/transformations/image_png__inline.inc.php
@@ -16,7 +16,7 @@ function PMA_transformation_image_png__inline_info()
*/
function PMA_transformation_image_png__inline($buffer, $options = array(), $meta =
'')
{
- require_once './libraries/transformations/global.inc.php';
+ include_once './libraries/transformations/global.inc.php';
if (PMA_IS_GD2) {
$transform_options = array ('string' => '<a
href="transformation_wrapper.php' . $options['wrapper_link'] .
'" target="_blank"><img src="transformation_wrapper.php'
. $options['wrapper_link'] . '&resize=png&newWidth=' .
(isset($options[0]) ? $options[0] : '100') . '&newHeight=' .
(isset($options[1]) ? $options[1] : 100) . '" alt="[__BUFFER__]"
border="0" /></a>');
diff --git a/libraries/transformations/text_plain__imagelink.inc.php
b/libraries/transformations/text_plain__imagelink.inc.php
index 4148c1f..06fd97f 100644
--- a/libraries/transformations/text_plain__imagelink.inc.php
+++ b/libraries/transformations/text_plain__imagelink.inc.php
@@ -16,7 +16,7 @@ function PMA_transformation_text_plain__imagelink_info()
*/
function PMA_transformation_text_plain__imagelink($buffer, $options = array(), $meta =
'')
{
- require_once './libraries/transformations/global.inc.php';
+ include_once './libraries/transformations/global.inc.php';
$transform_options = array ('string' => '<a href="' .
(isset($options[0]) ? $options[0] : '') . $buffer . '"
target="_blank"><img src="' . (isset($options[0]) ? $options[0] :
'') . $buffer . '" border="0" width="' .
(isset($options[1]) ? $options[1] : 100) . '" height="' .
(isset($options[2]) ? $options[2] : 50) . '" />' . $buffer .
'</a>');
$buffer = PMA_transformation_global_html_replace($buffer, $transform_options);
diff --git a/libraries/transformations/text_plain__link.inc.php
b/libraries/transformations/text_plain__link.inc.php
index 4a807da..4daa565 100644
--- a/libraries/transformations/text_plain__link.inc.php
+++ b/libraries/transformations/text_plain__link.inc.php
@@ -16,7 +16,7 @@ function PMA_transformation_text_plain__link_info()
*/
function PMA_transformation_text_plain__link($buffer, $options = array(), $meta =
'')
{
- require_once './libraries/transformations/global.inc.php';
+ include_once './libraries/transformations/global.inc.php';
// $transform_options = array ('string' => '<a href="' .
(isset($options[0]) ? $options[0] : '') . '%1$s" title="' .
(isset($options[1]) ? $options[1] : '%1$s') . '">' .
(isset($options[1]) ? $options[1] : '%1$s') . '</a>');
diff --git a/pmd_relation_upd.php b/pmd_relation_upd.php
index 7fd78e4..d61d9d2 100644
--- a/pmd_relation_upd.php
+++ b/pmd_relation_upd.php
@@ -41,24 +41,27 @@ if (PMA_foreignkey_supported($type_T1) &&
PMA_foreignkey_supported($type_T2) &&
}
if ($try_to_delete_internal_relation) {
// internal relations
- PMA_query_as_controluser('DELETE FROM '
- . PMA_backquote($GLOBALS['cfgRelation']['db']) .
'.'
- . $cfg['Server']['relation'].' WHERE '
- . 'master_db = \'' . PMA_sqlAddSlashes($DB2) .
'\''
- . ' AND master_table = \'' . PMA_sqlAddSlashes($T2) .
'\''
- . ' AND master_field = \'' . PMA_sqlAddSlashes($F2) .
'\''
- . ' AND foreign_db = \'' . PMA_sqlAddSlashes($DB1) .
'\''
- . ' AND foreign_table = \'' . PMA_sqlAddSlashes($T1) .
'\''
- . ' AND foreign_field = \'' . PMA_sqlAddSlashes($F1) .
'\''
- , false, PMA_DBI_QUERY_STORE);
+ PMA_query_as_controluser(
+ 'DELETE FROM '
+ . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.'
+ . $cfg['Server']['relation'].' WHERE '
+ . 'master_db = \'' . PMA_sqlAddSlashes($DB2) . '\''
+ . ' AND master_table = \'' . PMA_sqlAddSlashes($T2) .
'\''
+ . ' AND master_field = \'' . PMA_sqlAddSlashes($F2) .
'\''
+ . ' AND foreign_db = \'' . PMA_sqlAddSlashes($DB1) .
'\''
+ . ' AND foreign_table = \'' . PMA_sqlAddSlashes($T1) .
'\''
+ . ' AND foreign_field = \'' . PMA_sqlAddSlashes($F1) .
'\'',
+ false,
+ PMA_DBI_QUERY_STORE
+ );
}
PMD_return_upd(1, __('Relation deleted'));
function PMD_return_upd($b, $ret)
{
- global $K;
- header("Content-Type: text/xml; charset=utf-8");
- header("Cache-Control: no-cache");
- die('<root act="relation_upd" return="'.$ret.'"
b="'.$b.'" K="'.$K.'"></root>');
+ global $K;
+ header("Content-Type: text/xml; charset=utf-8");
+ header("Cache-Control: no-cache");
+ die('<root act="relation_upd" return="'.$ret.'"
b="'.$b.'" K="'.$K.'"></root>');
}
?>
diff --git a/prefs_manage.php b/prefs_manage.php
index 7c5d3f8..267eb43 100644
--- a/prefs_manage.php
+++ b/prefs_manage.php
@@ -105,8 +105,8 @@ if (isset($_POST['submit_export']) &&
filter_input(INPUT_POST, 'export_type') ==
}
if (!$all_ok) {
// mimic original form and post json in a hidden field
- require './libraries/header.inc.php';
- require './libraries/user_preferences.inc.php';
+ include './libraries/header.inc.php';
+ include './libraries/user_preferences.inc.php';
$msg = PMA_Message::error(__('Configuration contains incorrect data for
some fields.'));
$msg->display();
echo '<div class="config-form">';
@@ -128,7 +128,7 @@ if (isset($_POST['submit_export']) &&
filter_input(INPUT_POST, 'export_type') ==
<input type="submit" name="submit_ignore"
value="<?php echo __('No') ?>" />
</form>
<?php
- require './libraries/footer.inc.php';
+ include './libraries/footer.inc.php';
return;
}
diff --git a/querywindow.php b/querywindow.php
index 5641d1c..7a9f83d 100644
--- a/querywindow.php
+++ b/querywindow.php
@@ -95,11 +95,11 @@ if ($no_js) {
// ... we redirect to appropriate query sql page
// works only full if $db and $table is also stored/grabbed from $_COOKIE
if (strlen($table)) {
- require './tbl_sql.php';
+ include './tbl_sql.php';
} elseif (strlen($db)) {
- require './db_sql.php';
+ include './db_sql.php';
} else {
- require './server_sql.php';
+ include './server_sql.php';
}
exit;
}
diff --git a/server_databases.php b/server_databases.php
index c709f83..8ae3422 100644
--- a/server_databases.php
+++ b/server_databases.php
@@ -12,7 +12,7 @@ require_once './libraries/common.inc.php';
require './libraries/server_common.inc.php';
if (!PMA_DRIZZLE) {
- require './libraries/replication.inc.php';
+ include './libraries/replication.inc.php';
} else {
$replication_types = array();
$replication_info = null;
@@ -74,7 +74,7 @@ if ((isset($_REQUEST['drop_selected_dbs']) ||
isset($_REQUEST['query_type']))
if (isset($_REQUEST['selected_dbs'])) {
$selected_db = $_REQUEST['selected_dbs'];
}
- require './libraries/mult_submits.inc.php';
+ include './libraries/mult_submits.inc.php';
unset($action, $submit_mult, $err_url, $selected_db, $GLOBALS['db']);
if (empty($message)) {
$message = PMA_Message::success(__('%s databases have been dropped
successfully.'));
@@ -109,7 +109,7 @@ echo '<h2>' . "\n"
*/
if ($cfg['ShowCreateDb']) {
echo '<ul><li id="li_create_database">' .
"\n";
- require './libraries/display_create_database.lib.php';
+ include './libraries/display_create_database.lib.php';
echo ' </li>' . "\n";
echo '</ul>' . "\n";
}
diff --git a/server_replication.php b/server_replication.php
index 59d72f7..68db315 100644
--- a/server_replication.php
+++ b/server_replication.php
@@ -25,13 +25,13 @@ require_once './libraries/server_synchronize.lib.php';
* Checks if the user is allowed to do what he tries to...
*/
if (! $is_superuser) {
- require './libraries/server_links.inc.php';
+ include './libraries/server_links.inc.php';
echo '<h2>' . "\n"
. PMA_getIcon('s_replication.png')
. __('Replication') . "\n"
. '</h2>' . "\n";
PMA_Message::error(__('No Privileges'))->display();
- require './libraries/footer.inc.php';
+ include './libraries/footer.inc.php';
}
/**
@@ -234,7 +234,7 @@ if (isset($GLOBALS['mr_configure'])) {
echo ' </form>';
echo '</fieldset>';
- require './libraries/footer.inc.php';
+ include './libraries/footer.inc.php';
exit;
}
diff --git a/server_status.php b/server_status.php
index bbac0c3..4a8a37f 100644
--- a/server_status.php
+++ b/server_status.php
@@ -1486,7 +1486,7 @@ function printVariablesTable()
}
if ('%' === substr($name, -1, 1)) {
echo htmlspecialchars(PMA_formatNumber($value, 0, 2)) . ' %';
- } elseif (strpos($name, 'Uptime')!==FALSE) {
+ } elseif (strpos($name, 'Uptime') !== false) {
echo htmlspecialchars(PMA_timespanFormat($value));
} elseif (is_numeric($value) && $value == (int) $value &&
$value > 1000) {
echo htmlspecialchars(PMA_formatNumber($value, 3, 1));
diff --git a/server_synchronize.php b/server_synchronize.php
index d4627cf..3b8ff59 100644
--- a/server_synchronize.php
+++ b/server_synchronize.php
@@ -1109,13 +1109,15 @@ if (isset($_REQUEST['synchronize_db'])) {
PMA_updateTargetTables($matching_tables, $update_array, $src_db, $trg_db,
$trg_link, $p, $matching_tables_keys, true);
- PMA_insertIntoTargetTable($matching_tables, $src_db, $trg_db, $src_link,
- $trg_link , $matching_tables_fields, $insert_array, $p,
+ PMA_insertIntoTargetTable(
+ $matching_tables, $src_db, $trg_db, $src_link,
+ $trg_link, $matching_tables_fields, $insert_array, $p,
$matching_tables_keys, $matching_tables_keys, $source_columns,
$add_column_array, $criteria, $target_tables_keys, $uncommon_tables,
$uncommon_tables_fields, $uncommon_cols, $alter_str_array, $source_indexes,
$target_indexes, $add_indexes_array,
- $alter_indexes_array, $delete_array, $update_array, true);
+ $alter_indexes_array, $delete_array, $update_array, true
+ );
}
/**
diff --git a/setup/config.php b/setup/config.php
index b90d24c..89bcdc9 100644
--- a/setup/config.php
+++ b/setup/config.php
@@ -54,7 +54,7 @@ if (PMA_ifSetOr($_POST['submit_clear'], '')) {
// Load config file from the server
//
$cfg = array();
- require_once $config_file_path;
+ include_once $config_file_path;
ConfigFile::getInstance()->setConfigData($cfg);
header('HTTP/1.1 303 See Other');
header('Location: index.php');
diff --git a/sql.php b/sql.php
index 53d9759..42a9ac1 100644
--- a/sql.php
+++ b/sql.php
@@ -104,7 +104,7 @@ if (isset($_REQUEST['get_relational_values']) &&
$_REQUEST['get_relational_value
}
$extra_data['dropdown'] = $dropdown;
- PMA_ajaxResponse(NULL, true, $extra_data);
+ PMA_ajaxResponse(null, true, $extra_data);
}
/**
@@ -133,7 +133,7 @@ if (isset($_REQUEST['get_enum_values']) &&
$_REQUEST['get_enum_values'] == true)
$dropdown = '<select>' . $dropdown . '</select>';
$extra_data['dropdown'] = $dropdown;
- PMA_ajaxResponse(NULL, true, $extra_data);
+ PMA_ajaxResponse(null, true, $extra_data);
}
/**
@@ -162,7 +162,7 @@ if (isset($_REQUEST['get_set_values']) &&
$_REQUEST['get_set_values'] == true) {
$select = '<select multiple="multiple" size="' .
$select_size . '">' . $select . '</select>';
$extra_data['select'] = $select;
- PMA_ajaxResponse(NULL, true, $extra_data);
+ PMA_ajaxResponse(null, true, $extra_data);
}
/**
@@ -191,7 +191,7 @@ if (isset($_REQUEST['set_col_prefs']) &&
$_REQUEST['set_col_prefs'] == true) {
}
}
- PMA_ajaxResponse(NULL, ($retval == true));
+ PMA_ajaxResponse(null, ($retval == true));
}
// Default to browse if no query set and we have table
@@ -766,7 +766,7 @@ else {
$row = PMA_DBI_fetch_row($result);
$extra_data = array();
$extra_data['value'] = $row[0];
- PMA_ajaxResponse(NULL, true, $extra_data);
+ PMA_ajaxResponse(null, true, $extra_data);
}
if (isset($_REQUEST['ajax_request']) &&
isset($_REQUEST['table_maintenance'])) {
diff --git a/tbl_addfield.php b/tbl_addfield.php
index f9324fe..c2a2e96 100644
--- a/tbl_addfield.php
+++ b/tbl_addfield.php
@@ -186,7 +186,7 @@ if (isset($_REQUEST['do_save_data'])) {
$message->addParam($table);
if( $GLOBALS['is_ajax_request'] == true) {
- $extra_data['sql_query'] = PMA_showMessage(NULL, $sql_query);
+ $extra_data['sql_query'] = PMA_showMessage(null, $sql_query);
PMA_ajaxResponse($message, $message->isSuccess(), $extra_data);
}
diff --git a/tbl_alter.php b/tbl_alter.php
index dcde601..a268866 100644
--- a/tbl_alter.php
+++ b/tbl_alter.php
@@ -131,7 +131,7 @@ if (isset($_REQUEST['do_save_data'])) {
}
if ( $_REQUEST['ajax_request'] == true) {
- $extra_data['sql_query'] = PMA_showMessage(NULL, $sql_query);
+ $extra_data['sql_query'] = PMA_showMessage(null, $sql_query);
PMA_ajaxResponse($message, $message->isSuccess(), $extra_data);
}
diff --git a/tbl_indexes.php b/tbl_indexes.php
index 1bffbe7..1d678db 100644
--- a/tbl_indexes.php
+++ b/tbl_indexes.php
@@ -97,20 +97,20 @@ if (isset($_REQUEST['do_save_data'])) {
PMA_DBI_query($sql_query);
$message = PMA_Message::success(__('Table %1$s has been altered
successfully'));
$message->addParam($table);
-
+
if ( $GLOBALS['is_ajax_request'] == true) {
$extra_data['index_table'] = PMA_Index::getView($table, $db);
- $extra_data['sql_query'] = PMA_showMessage(NULL, $sql_query);
+ $extra_data['sql_query'] = PMA_showMessage(null, $sql_query);
PMA_ajaxResponse($message, $message->isSuccess(), $extra_data);
}
-
+
$active_page = 'tbl_structure.php';
- require './tbl_structure.php';
+ include './tbl_structure.php';
exit;
} else {
if ( $GLOBALS['is_ajax_request'] == true) {
$extra_data['error'] = $error;
- PMA_ajaxResponse($error,false);
+ PMA_ajaxResponse($error, false);
}
$error->display();
}
diff --git a/tbl_move_copy.php b/tbl_move_copy.php
index 58d90f3..e25cf69 100644
--- a/tbl_move_copy.php
+++ b/tbl_move_copy.php
@@ -65,13 +65,13 @@ if (PMA_isValid($_REQUEST['new_name'])) {
$db = $_REQUEST['target_db'];
$table = $_REQUEST['new_name'];
}
-
+
if ( $_REQUEST['ajax_request'] == true) {
- $extra_data['sql_query'] = PMA_showMessage(NULL, $sql_query);
+ $extra_data['sql_query'] = PMA_showMessage(null, $sql_query);
$extra_data['db'] = $GLOBALS['db'];
PMA_ajaxResponse($message, $message->isSuccess(), $extra_data);
}
-
+
$reload = 1;
}
} else {
diff --git a/tbl_operations.php b/tbl_operations.php
index 95b602e..d859a52 100644
--- a/tbl_operations.php
+++ b/tbl_operations.php
@@ -230,7 +230,7 @@ if (isset($result) && empty($message_to_show)) {
// $result should exist, regardless of $_message
$_type = $result ? 'success' : 'error';
if ( $_REQUEST['ajax_request'] == true) {
- $extra_data['sql_query'] = PMA_showMessage(NULL, $sql_query);
+ $extra_data['sql_query'] = PMA_showMessage(null, $sql_query);
PMA_ajaxResponse($_message, $_message->isSuccess(), $extra_data);
}
}
diff --git a/tbl_printview.php b/tbl_printview.php
index 76d4e73..3643d58 100644
--- a/tbl_printview.php
+++ b/tbl_printview.php
@@ -17,7 +17,7 @@ require './libraries/tbl_common.php';
*/
$print_view = true;
if (! isset($selected_tbl)) {
- require_once './libraries/header.inc.php';
+ include_once './libraries/header.inc.php';
}
// Check parameters
@@ -62,7 +62,7 @@ $multi_tables = (count($the_tables) > 1);
if ($multi_tables) {
if (empty($GLOBALS['is_header_sent'])) {
- require_once './libraries/header.inc.php';
+ include_once './libraries/header.inc.php';
}
$tbl_list = '';
foreach ($the_tables as $key => $table) {
diff --git a/tbl_replace.php b/tbl_replace.php
index b6da1ba..b5c43dc 100644
--- a/tbl_replace.php
+++ b/tbl_replace.php
@@ -231,8 +231,8 @@ foreach ($loop_array as $rownumber => $where_clause) {
// for blobstreaming
if ($blob_streaming_active) {
- $remove_blob_repo = isset($_REQUEST['remove_blob_repo_' . $key]) ?
$_REQUEST['remove_blob_repo_' . $key] : NULL;
- $upload_blob_repo = isset($_REQUEST['upload_blob_repo_' . $key]) ?
$_REQUEST['upload_blob_repo_' . $key] : NULL;
+ $remove_blob_repo = isset($_REQUEST['remove_blob_repo_' . $key]) ?
$_REQUEST['remove_blob_repo_' . $key] : null;
+ $upload_blob_repo = isset($_REQUEST['upload_blob_repo_' . $key]) ?
$_REQUEST['upload_blob_repo_' . $key] : null;
// checks if an existing blob repository reference should be removed
if (isset($remove_blob_repo) && ! isset($upload_blob_repo)) {
diff --git a/tbl_tracking.php b/tbl_tracking.php
index 847578c..496982a 100644
--- a/tbl_tracking.php
+++ b/tbl_tracking.php
@@ -219,7 +219,7 @@ if (isset($_REQUEST['report_export']) &&
$_REQUEST['export_type'] == 'sqldump')
$table_temp = $table;
$db = $table = '';
- require_once './libraries/sql_query_form.lib.php';
+ include_once './libraries/sql_query_form.lib.php';
PMA_sqlQueryForm($new_query, 'sql');
diff --git a/test/classes/PMA_Config_test.php b/test/classes/PMA_Config_test.php
index 42fab56..edcc6aa 100644
--- a/test/classes/PMA_Config_test.php
+++ b/test/classes/PMA_Config_test.php
@@ -19,7 +19,7 @@ class PMA_ConfigTest extends PHPUnit_Framework_TestCase
/**
* Turn off backup globals
*/
- protected $backupGlobals = FALSE;
+ protected $backupGlobals = false;
/**
* @var PMA_Config
diff --git a/test/libraries/common/PMA_getDbLink_test.php
b/test/libraries/common/PMA_getDbLink_test.php
index 85a76e8..303ec38 100644
--- a/test/libraries/common/PMA_getDbLink_test.php
+++ b/test/libraries/common/PMA_getDbLink_test.php
@@ -21,8 +21,8 @@ class PMA_getDbLink_test extends PHPUnit_Framework_TestCase
function setUp()
{
global $cfg;
- require_once 'libraries/vendor_config.php';
- require 'libraries/config.default.php';
+ include_once 'libraries/vendor_config.php';
+ include 'libraries/config.default.php';
$_SESSION[' PMA_token '] = 'token';
$GLOBALS['lang'] = 'en';
$GLOBALS['server'] = 99;
diff --git a/test/libraries/common/PMA_showMessage_test_disabled.php
b/test/libraries/common/PMA_showMessage_test_disabled.php
index d89aa10..daf855f 100644
--- a/test/libraries/common/PMA_showMessage_test_disabled.php
+++ b/test/libraries/common/PMA_showMessage_test_disabled.php
@@ -23,7 +23,7 @@ class PMA_showMessage_test extends PHPUnit_Extensions_OutputTestCase
function setUp()
{
global $cfg;
- require 'libraries/config.default.php';
+ include 'libraries/config.default.php';
}
function testShowMessageNotAjax()
diff --git a/test/libraries/core/PMA_array_test.php
b/test/libraries/core/PMA_array_test.php
index 0eea363..8fc63fb 100644
--- a/test/libraries/core/PMA_array_test.php
+++ b/test/libraries/core/PMA_array_test.php
@@ -94,7 +94,7 @@ class PMA_array_test extends PHPUnit_Framework_TestCase
PMA_array_write('sarr/not_existing/1', $arr, 'some_val');
$this->assertEquals($arr['sarr']['not_existing'][1],
'some_val');
- PMA_array_write('sarr/0/2', $arr, NULL);
+ PMA_array_write('sarr/0/2', $arr, null);
$this->assertNull($arr['sarr'][0][2]);
}
diff --git a/test/libraries/core/PMA_headerLocation_test_disabled.php
b/test/libraries/core/PMA_headerLocation_test_disabled.php
index a303d24..089064b 100644
--- a/test/libraries/core/PMA_headerLocation_test_disabled.php
+++ b/test/libraries/core/PMA_headerLocation_test_disabled.php
@@ -104,9 +104,9 @@ class PMA_headerLocation_test extends
PHPUnit_Extensions_OutputTestCase
if (defined('PMA_IS_IIS')) {
$this->oldIISvalue = PMA_IS_IIS;
- runkit_constant_redefine('PMA_IS_IIS', NULL);
+ runkit_constant_redefine('PMA_IS_IIS', null);
} else {
- runkit_constant_add('PMA_IS_IIS', NULL);
+ runkit_constant_add('PMA_IS_IIS', null);
}
@@ -114,9 +114,9 @@ class PMA_headerLocation_test extends
PHPUnit_Extensions_OutputTestCase
if (defined('SID')) {
$this->oldSIDvalue = SID;
- runkit_constant_redefine('SID', NULL);
+ runkit_constant_redefine('SID', null);
} else {
- runkit_constant_add('SID', NULL);
+ runkit_constant_add('SID', null);
}
}
diff --git a/test/libraries/rte/PMA_RTN_getDataFromRequest_test.php
b/test/libraries/rte/PMA_RTN_getDataFromRequest_test.php
index db61325..112315d 100644
--- a/test/libraries/rte/PMA_RTN_getDataFromRequest_test.php
+++ b/test/libraries/rte/PMA_RTN_getDataFromRequest_test.php
@@ -21,7 +21,7 @@ class PMA_RTN_getDataFromRequest_test extends
PHPUnit_Framework_TestCase
global $cfg;
$cfg['ShowFunctionFields'] = false;
- require 'libraries/data_mysql.inc.php';
+ include 'libraries/data_mysql.inc.php';
}
/**
diff --git a/test/libraries/rte/PMA_RTN_getEditorForm_test.php
b/test/libraries/rte/PMA_RTN_getEditorForm_test.php
index 2fd0129..2230ca9 100644
--- a/test/libraries/rte/PMA_RTN_getEditorForm_test.php
+++ b/test/libraries/rte/PMA_RTN_getEditorForm_test.php
@@ -20,7 +20,7 @@ class PMA_RTN_getEditorForm_test extends PHPUnit_Framework_TestCase
global $cfg;
$cfg['ShowFunctionFields'] = false;
- require 'libraries/data_mysql.inc.php';
+ include 'libraries/data_mysql.inc.php';
if (! function_exists('PMA_generateCharsetDropdownBox')) {
function PMA_generateCharsetDropdownBox() {}
diff --git a/test/libraries/rte/PMA_RTN_getExecuteForm_test.php
b/test/libraries/rte/PMA_RTN_getExecuteForm_test.php
index f8db88c..03fc82a 100644
--- a/test/libraries/rte/PMA_RTN_getExecuteForm_test.php
+++ b/test/libraries/rte/PMA_RTN_getExecuteForm_test.php
@@ -54,7 +54,7 @@ class PMA_RTN_getExecuteForm_test extends PHPUnit_Framework_TestCase
$cfg['DefaultFunctions']['FUNC_SPATIAL'] =
'GeomFromText';
$GLOBALS['tear_down']['default'] = true;
}
- require 'libraries/data_mysql.inc.php';
+ include 'libraries/data_mysql.inc.php';
}
public function tearDown()
diff --git a/test/libraries/rte/PMA_RTN_getQueryFromRequest_test.php
b/test/libraries/rte/PMA_RTN_getQueryFromRequest_test.php
index db11ff4..95473e3 100644
--- a/test/libraries/rte/PMA_RTN_getQueryFromRequest_test.php
+++ b/test/libraries/rte/PMA_RTN_getQueryFromRequest_test.php
@@ -29,7 +29,7 @@ class PMA_RTN_getQueryFromRequest_test extends
PHPUnit_Framework_TestCase
$cfg['ShowFunctionFields'] = false;
- require 'libraries/data_mysql.inc.php';
+ include 'libraries/data_mysql.inc.php';
$errors = array();
PMA_RTN_setGlobals();
diff --git a/test/selenium/PmaSeleniumLoginTest.php
b/test/selenium/PmaSeleniumLoginTest.php
index 1a5d22d..bde93bf 100644
--- a/test/selenium/PmaSeleniumLoginTest.php
+++ b/test/selenium/PmaSeleniumLoginTest.php
@@ -10,9 +10,9 @@
require_once 'PmaSeleniumTestCase.php';
-class PmaSeleniumLoginTest extends PmaSeleniumTestCase
+class PmaSeleniumLoginTest extends PmaSeleniumTestCase
{
- protected $captureScreenshotOnFailure = TRUE;
+ protected $captureScreenshotOnFailure = true;
protected $screenshotPath = '/var/www/screenshots';
protected $screenshotUrl = 'http://localhost/screenshots';
diff --git a/test/selenium/PmaSeleniumPrivilegesTest.php
b/test/selenium/PmaSeleniumPrivilegesTest.php
index 7eddf7a..0e3f4cf 100644
--- a/test/selenium/PmaSeleniumPrivilegesTest.php
+++ b/test/selenium/PmaSeleniumPrivilegesTest.php
@@ -10,9 +10,9 @@
require_once 'PmaSeleniumTestCase.php';
-class PmaSeleniumPrivilegesTest extends PmaSeleniumTestCase
+class PmaSeleniumPrivilegesTest extends PmaSeleniumTestCase
{
- public function testChangePassword()
+ public function testChangePassword()
{
$this->doLogin();
$this->selectFrame("frame_content");
diff --git a/test/selenium/PmaSeleniumTestCase.php
b/test/selenium/PmaSeleniumTestCase.php
index 90da642..1b33ff0 100644
--- a/test/selenium/PmaSeleniumTestCase.php
+++ b/test/selenium/PmaSeleniumTestCase.php
@@ -21,7 +21,7 @@ class PmaSeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase
protected $selenium;
protected $cfg;
- protected $captureScreenshotOnFailure = TRUE;
+ protected $captureScreenshotOnFailure = true;
protected $screenshotPath = '/var/www/screenshots';
protected $screenshotUrl = 'http://localhost/screenshots';
diff --git a/test/selenium/PmaSeleniumXssTest.php b/test/selenium/PmaSeleniumXssTest.php
index 06f960e..0cba510 100644
--- a/test/selenium/PmaSeleniumXssTest.php
+++ b/test/selenium/PmaSeleniumXssTest.php
@@ -9,9 +9,9 @@
require_once 'PmaSeleniumTestCase.php';
-class PmaSeleniumXSSTest extends PmaSeleniumTestCase
+class PmaSeleniumXSSTest extends PmaSeleniumTestCase
{
- public function testXssQueryTab()
+ public function testXssQueryTab()
{
$this->doLogin();
$this->selectFrame("frame_content");
diff --git a/transformation_overview.php b/transformation_overview.php
index 81211d5..35d41c0 100644
--- a/transformation_overview.php
+++ b/transformation_overview.php
@@ -52,7 +52,7 @@ foreach ($types['mimetype'] as $key => $mimetype) {
$odd_row = true;
foreach ($types['transformation'] as $key => $transform) {
$func = strtolower(str_ireplace('.inc.php', '',
$types['transformation_file'][$key]));
- require './libraries/transformations/' .
$types['transformation_file'][$key];
+ include './libraries/transformations/' .
$types['transformation_file'][$key];
$funcname = 'PMA_transformation_' . $func . '_info';
$desc = '<i>' . sprintf(__('No description is available for this
transformation.<br />Please ask the author what %s does.'),
'PMA_transformation_' . $func . '()') . '</i>';
if (function_exists($funcname)) {
diff --git a/view_create.php b/view_create.php
index c7d63ce..3571c82 100644
--- a/view_create.php
+++ b/view_create.php
@@ -72,7 +72,7 @@ if (isset($_REQUEST['createview'])) {
if (PMA_DBI_try_query($sql_query)) {
$message = PMA_Message::success();
- require './' . $cfg['DefaultTabDatabase'];
+ include './' . $cfg['DefaultTabDatabase'];
exit();
} else {
$message = PMA_Message::rawError(PMA_DBI_getError());
hooks/post-receive
--
phpMyAdmin