Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
e656eb9800
@ -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)) {
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
@ -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"' : ''); ?>>
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
|
||||
@ -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)) {
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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';
|
||||
}
|
||||
?>
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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)) {
|
||||
|
||||
@ -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)) {
|
||||
|
||||
@ -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';
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
@ -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';
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
@ -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
|
||||
{
|
||||
}
|
||||
?>
|
||||
|
||||
@ -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';
|
||||
}
|
||||
?>
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -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');
|
||||
|
||||
@ -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();
|
||||
}
|
||||
?>
|
||||
|
||||
@ -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();
|
||||
|
||||
|
||||
@ -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) {
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -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)) {
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -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();
|
||||
|
||||
@ -45,8 +45,8 @@ if (!$GLOBALS['sqlvalidator_error']) {
|
||||
/**
|
||||
* @package phpMyAdmin
|
||||
*/
|
||||
class PMA_SQLValidator {
|
||||
|
||||
class PMA_SQLValidator
|
||||
{
|
||||
var $url;
|
||||
var $service_name;
|
||||
var $wsdl;
|
||||
|
||||
@ -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)
|
||||
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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'])) {
|
||||
|
||||
@ -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>');
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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>');
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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>');
|
||||
|
||||
|
||||
@ -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>');
|
||||
}
|
||||
?>
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
@ -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";
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
@ -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));
|
||||
|
||||
@ -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
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -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');
|
||||
|
||||
10
sql.php
10
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'])) {
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
|
||||
@ -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();
|
||||
}
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@ -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) {
|
||||
|
||||
@ -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)) {
|
||||
|
||||
@ -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');
|
||||
|
||||
|
||||
@ -19,7 +19,7 @@ class PMA_ConfigTest extends PHPUnit_Framework_TestCase
|
||||
/**
|
||||
* Turn off backup globals
|
||||
*/
|
||||
protected $backupGlobals = FALSE;
|
||||
protected $backupGlobals = false;
|
||||
|
||||
/**
|
||||
* @var PMA_Config
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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()
|
||||
|
||||
@ -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]);
|
||||
}
|
||||
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -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';
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -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() {}
|
||||
|
||||
@ -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()
|
||||
|
||||
@ -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();
|
||||
|
||||
@ -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';
|
||||
|
||||
|
||||
@ -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");
|
||||
|
||||
@ -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';
|
||||
|
||||
|
||||
@ -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");
|
||||
|
||||
@ -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)) {
|
||||
|
||||
@ -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());
|
||||
|
||||
Loading…
Reference in New Issue
Block a user