Merge branch 'master' of https://github.com/phpmyadmin/phpmyadmin into ut_plu_dbi
This commit is contained in:
commit
171a33aef6
@ -30,10 +30,13 @@ phpMyAdmin - ChangeLog
|
||||
- bug #4035 Query "inline" link disappears when turning off "Explain SQL" option
|
||||
+ rfe #1385 Hide tables, functions, procedures, events and views in navigation tree
|
||||
+ rfe #1321 Export view as if it was a table
|
||||
+ Dropped configuration directive: SQP
|
||||
+ Dropped configuration directive: MySQLManual*
|
||||
|
||||
4.0.6.0 (not yet released)
|
||||
- bug #4036 Call to undefined function mb_detect_encoding (clarify the doc)
|
||||
- bug Missing hints when changing a column's structure
|
||||
- bug #4048 Cannot select foreign value in Search
|
||||
|
||||
4.0.5.0 (2013-08-04)
|
||||
- bug #3977 Not detected configuration storage
|
||||
|
||||
@ -128,7 +128,7 @@ class PMAStandard_Sniffs_Files_LineLengthSniff implements PHP_CodeSniffer_Sniff
|
||||
return;
|
||||
}
|
||||
|
||||
if (preg_match("|__\('[^']{40,999}'\)|", $lineContent) !== 0) {
|
||||
if (preg_match("@__\('([^']|\\'){40,999}'\)@", $lineContent) !== 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@ -14,10 +14,7 @@ require_once 'libraries/transformations.lib.php';
|
||||
*/
|
||||
$request_params = array(
|
||||
'field',
|
||||
'fieldkey',
|
||||
'foreign_filter',
|
||||
'pos',
|
||||
'rownumber'
|
||||
'fieldkey'
|
||||
);
|
||||
|
||||
foreach ($request_params as $one_request_param) {
|
||||
@ -43,8 +40,10 @@ $foreigners = ($cfgRelation['relwork'] ? PMA_getForeigners($db, $table) : false
|
||||
|
||||
$override_total = true;
|
||||
|
||||
if (! isset($pos)) {
|
||||
if (! isset($_REQUEST['pos'])) {
|
||||
$pos = 0;
|
||||
} else {
|
||||
$pos = $_REQUEST['pos'];
|
||||
}
|
||||
|
||||
$foreign_limit = 'LIMIT ' . $pos . ', ' . $GLOBALS['cfg']['MaxRows'] . ' ';
|
||||
@ -54,15 +53,11 @@ if (isset($foreign_navig) && $foreign_navig == __('Show all')) {
|
||||
|
||||
$foreignData = PMA_getForeignData(
|
||||
$foreigners, $field, $override_total,
|
||||
isset($foreign_filter) ? $foreign_filter : '', $foreign_limit
|
||||
isset($_REQUEST['foreign_filter'])
|
||||
? $_REQUEST['foreign_filter']
|
||||
: '', $foreign_limit
|
||||
);
|
||||
|
||||
if (isset($rownumber)) {
|
||||
$rownumber_param = '&rownumber=' . urlencode($rownumber);
|
||||
} else {
|
||||
$rownumber_param = '';
|
||||
}
|
||||
|
||||
$gotopage = '';
|
||||
$showall = '';
|
||||
|
||||
@ -95,15 +90,22 @@ if (is_array($foreignData['disp_row'])) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (isset($rownumber)) {
|
||||
$element_name = " var element_name = field + '[multi_edit]["
|
||||
. htmlspecialchars($rownumber) . "][' + fieldmd5 + ']';\n"
|
||||
. " var null_name = field_null + '[multi_edit]["
|
||||
. htmlspecialchars($rownumber) . "][' + fieldmd5 + ']';\n";
|
||||
// When coming from Table/Zoom search
|
||||
if (isset($_REQUEST['fromsearch'])) {
|
||||
// In table or zoom search, input fields are named "criteriaValues"
|
||||
$element_name = " var field = 'criteriaValues';\n";
|
||||
} else {
|
||||
$element_name = "var element_name = field + '[]'";
|
||||
// In insert/edit, input fields are named "fields"
|
||||
$element_name = " var field = 'fields';\n";
|
||||
}
|
||||
|
||||
if (isset($_REQUEST['rownumber'])) {
|
||||
$element_name .= " var element_name = field + '[multi_edit]["
|
||||
. htmlspecialchars($_REQUEST['rownumber']) . "][' + fieldmd5 + ']';\n"
|
||||
. " var null_name = field_null + '[multi_edit]["
|
||||
. htmlspecialchars($_REQUEST['rownumber']) . "][' + fieldmd5 + ']';\n";
|
||||
} else {
|
||||
$element_name .= "var element_name = field + '[]'";
|
||||
}
|
||||
$error = PMA_jsFormat(
|
||||
__(
|
||||
@ -169,19 +171,22 @@ $header->getScripts()->addCode($code);
|
||||
// HTML output
|
||||
$output = '<form action="browse_foreigners.php" method="post">'
|
||||
. '<fieldset>'
|
||||
. PMA_generate_common_hidden_inputs($db, $table)
|
||||
. PMA_URL_getHiddenInputs($db, $table)
|
||||
. '<input type="hidden" name="field" value="' . htmlspecialchars($field) . '" />'
|
||||
. '<input type="hidden" name="fieldkey" value="'
|
||||
. (isset($fieldkey) ? htmlspecialchars($fieldkey) : '') . '" />';
|
||||
|
||||
if (isset($rownumber)) {
|
||||
if (isset($_REQUEST['rownumber'])) {
|
||||
$output .= '<input type="hidden" name="rownumber" value="'
|
||||
. htmlspecialchars($rownumber) . '" />';
|
||||
. htmlspecialchars($_REQUEST['rownumber']) . '" />';
|
||||
}
|
||||
$output .= '<span class="formelement">'
|
||||
. '<label for="input_foreign_filter">' . __('Search:') . '</label>'
|
||||
. '<input type="text" name="foreign_filter" id="input_foreign_filter" value="'
|
||||
. (isset($foreign_filter) ? htmlspecialchars($foreign_filter) : '') . '" />'
|
||||
. (isset($_REQUEST['foreign_filter'])
|
||||
? htmlspecialchars($_REQUEST['foreign_filter'])
|
||||
: '')
|
||||
. '" />'
|
||||
. '<input type="submit" name="submit_foreign_filter" value="'
|
||||
. __('Go') . '" />'
|
||||
. '</span>'
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
* Database creating page
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
@ -19,7 +20,7 @@ require 'libraries/build_html_for_db.lib.php';
|
||||
/**
|
||||
* Defines the url to return to in case of error in a sql statement
|
||||
*/
|
||||
$err_url = 'index.php?' . PMA_generate_common_url();
|
||||
$err_url = 'index.php?' . PMA_URL_getCommon();
|
||||
|
||||
/**
|
||||
* Builds and executes the db creation sql query
|
||||
@ -30,7 +31,7 @@ if (! empty($_POST['db_collation'])) {
|
||||
if (in_array($db_charset, $mysql_charsets)
|
||||
&& in_array($_POST['db_collation'], $mysql_collations[$db_charset])
|
||||
) {
|
||||
$sql_query .= ' DEFAULT'
|
||||
$sql_query .= ' DEFAULT'
|
||||
. PMA_generateCharsetQueryPart($_POST['db_collation']);
|
||||
}
|
||||
$db_collation_for_ajax = $_POST['db_collation'];
|
||||
@ -69,7 +70,7 @@ if (! $result) {
|
||||
// the list of databases on server_databases.php
|
||||
|
||||
/**
|
||||
* Build the array to be passed to {@link PMA_generate_common_url}
|
||||
* Build the array to be passed to {@link PMA_URL_getCommon}
|
||||
* to generate the links
|
||||
*
|
||||
* @global array $GLOBALS['db_url_params']
|
||||
@ -79,7 +80,7 @@ if (! $result) {
|
||||
|
||||
$is_superuser = $GLOBALS['dbi']->isSuperuser();
|
||||
$column_order = PMA_getColumnOrder();
|
||||
$url_query = PMA_generate_common_url($_POST['new_db']);
|
||||
$url_query = PMA_URL_getCommon($_POST['new_db']);
|
||||
|
||||
/**
|
||||
* String that will contain the output HTML
|
||||
@ -106,7 +107,7 @@ if (! $result) {
|
||||
);
|
||||
} else {
|
||||
$current = array(
|
||||
'SCHEMA_NAME' => $_POST['new_db']
|
||||
'SCHEMA_NAME' => $_POST['new_db']
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -37,9 +37,9 @@ PMA_Util::checkParameters(array('db'));
|
||||
* Defines the url to return to in case of error in a sql statement
|
||||
*/
|
||||
if (strlen($table)) {
|
||||
$err_url = 'tbl_sql.php?' . PMA_generate_common_url($db, $table);
|
||||
$err_url = 'tbl_sql.php?' . PMA_URL_getCommon($db, $table);
|
||||
} else {
|
||||
$err_url = 'db_sql.php?' . PMA_generate_common_url($db);
|
||||
$err_url = 'db_sql.php?' . PMA_URL_getCommon($db);
|
||||
}
|
||||
|
||||
if ($cfgRelation['commwork']) {
|
||||
@ -107,9 +107,11 @@ foreach ($tables as $table) {
|
||||
|
||||
$indexes_info[$row['Key_name']]['Comment'] = $row['Comment'];
|
||||
|
||||
$indexes_data[$row['Key_name']][$row['Seq_in_index']]['Column_name'] = $row['Column_name'];
|
||||
$indexes_data[$row['Key_name']][$row['Seq_in_index']]['Column_name']
|
||||
= $row['Column_name'];
|
||||
if (isset($row['Sub_part'])) {
|
||||
$indexes_data[$row['Key_name']][$row['Seq_in_index']]['Sub_part'] = $row['Sub_part'];
|
||||
$indexes_data[$row['Key_name']][$row['Seq_in_index']]['Sub_part']
|
||||
= $row['Sub_part'];
|
||||
}
|
||||
|
||||
} // end while
|
||||
|
||||
@ -36,16 +36,19 @@ if ($num_tables < 1) {
|
||||
|
||||
$multi_values = '<div>';
|
||||
$multi_values .= '<a href="#"';
|
||||
$multi_values .= ' onclick="setSelectOptions(\'dump\', \'table_select[]\', true); return false;">';
|
||||
$multi_values .= ' onclick="setSelectOptions(\'dump\', \'table_select[]\', true);'
|
||||
. ' return false;">';
|
||||
$multi_values .= __('Select All');
|
||||
$multi_values .= '</a>';
|
||||
$multi_values .= ' / ';
|
||||
$multi_values .= '<a href="#"';
|
||||
$multi_values .= ' onclick="setSelectOptions(\'dump\', \'table_select[]\', false); return false;">';
|
||||
$multi_values .= ' onclick="setSelectOptions(\'dump\', \'table_select[]\', false);'
|
||||
. ' return false;">';
|
||||
$multi_values .= __('Unselect All');
|
||||
$multi_values .= '</a><br />';
|
||||
|
||||
$multi_values .= '<select name="table_select[]" id="table_select" size="10" multiple="multiple">';
|
||||
$multi_values .= '<select name="table_select[]" id="table_select" size="10"'
|
||||
. ' multiple="multiple">';
|
||||
$multi_values .= "\n";
|
||||
|
||||
// when called by libraries/mult_submits.inc.php
|
||||
|
||||
@ -1,13 +1,11 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
* Database import page
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
require_once 'libraries/common.inc.php';
|
||||
|
||||
$response = PMA_Response::getInstance();
|
||||
@ -25,4 +23,3 @@ $import_type = 'database';
|
||||
require 'libraries/display_import.inc.php';
|
||||
|
||||
?>
|
||||
|
||||
|
||||
@ -126,11 +126,15 @@ if (strlen($db)
|
||||
$sql_query .= "\n" . $local_query;
|
||||
$GLOBALS['dbi']->query($local_query);
|
||||
|
||||
$message = PMA_Message::success(__('Database %1$s has been renamed to %2$s'));
|
||||
$message = PMA_Message::success(
|
||||
__('Database %1$s has been renamed to %2$s')
|
||||
);
|
||||
$message->addParam($db);
|
||||
$message->addParam($_REQUEST['newname']);
|
||||
} elseif (! $_error) {
|
||||
$message = PMA_Message::success(__('Database %1$s has been copied to %2$s'));
|
||||
$message = PMA_Message::success(
|
||||
__('Database %1$s has been copied to %2$s')
|
||||
);
|
||||
$message->addParam($db);
|
||||
$message->addParam($_REQUEST['newname']);
|
||||
}
|
||||
@ -186,12 +190,12 @@ if (isset($_REQUEST['comment'])) {
|
||||
PMA_setDbComment($db, $_REQUEST['comment']);
|
||||
}
|
||||
|
||||
include 'libraries/db_common.inc.php';
|
||||
require 'libraries/db_common.inc.php';
|
||||
$url_query .= '&goto=db_operations.php';
|
||||
|
||||
// Gets the database structure
|
||||
$sub_part = '_structure';
|
||||
include 'libraries/db_info.inc.php';
|
||||
require 'libraries/db_info.inc.php';
|
||||
echo "\n";
|
||||
|
||||
if (isset($message)) {
|
||||
@ -255,7 +259,8 @@ if (!$is_information_schema) {
|
||||
__('The phpMyAdmin configuration storage has been deactivated. To find out why click %shere%s.')
|
||||
);
|
||||
$message->addParam(
|
||||
'<a href="' . $cfg['PmaAbsoluteUri'] . 'chk_rel.php?' . $url_query . '">',
|
||||
'<a href="' . $cfg['PmaAbsoluteUri']
|
||||
. 'chk_rel.php?' . $url_query . '">',
|
||||
false
|
||||
);
|
||||
$message->addParam('</a>', false);
|
||||
|
||||
@ -20,7 +20,7 @@ PMA_Util::checkParameters(array('db'));
|
||||
/**
|
||||
* Defines the url to return to in case of error in a sql statement
|
||||
*/
|
||||
$err_url = 'db_sql.php?' . PMA_generate_common_url($db);
|
||||
$err_url = 'db_sql.php?' . PMA_URL_getCommon($db);
|
||||
|
||||
/**
|
||||
* Settings for relations stuff
|
||||
|
||||
@ -28,9 +28,9 @@ if (isset($_REQUEST['submit_sql']) && ! empty($sql_query)) {
|
||||
$message_to_display = true;
|
||||
} else {
|
||||
$goto = 'db_sql.php';
|
||||
|
||||
|
||||
// Parse and analyze the query
|
||||
require_once 'libraries/parse_analyze.inc.php';
|
||||
include_once 'libraries/parse_analyze.inc.php';
|
||||
|
||||
PMA_executeQueryAndSendQueryResponse(
|
||||
$analyzed_sql_results, false, $_REQUEST['db'], null, null, null, null,
|
||||
@ -58,7 +58,7 @@ $db_qbe = new PMA_DBQbe($GLOBALS['db']);
|
||||
* Displays the Query by example form
|
||||
*/
|
||||
if ($cfgRelation['designerwork']) {
|
||||
$url = 'pmd_general.php' . PMA_generate_common_url(
|
||||
$url = 'pmd_general.php' . PMA_URL_getCommon(
|
||||
array_merge(
|
||||
$url_params,
|
||||
array('query' => 1)
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
* Database SQL executor
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
* Database structure manipulation
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
@ -27,7 +28,7 @@ if ((!empty($_POST['submit_mult']) && isset($_POST['selected_tbl']))
|
||||
|| isset($_POST['mult_btn'])
|
||||
) {
|
||||
$action = 'db_structure.php';
|
||||
$err_url = 'db_structure.php?'. PMA_generate_common_url($db);
|
||||
$err_url = 'db_structure.php?'. PMA_URL_getCommon($db);
|
||||
|
||||
// see bug #2794840; in this case, code path is:
|
||||
// db_structure.php -> libraries/mult_submits.inc.php -> sql.php
|
||||
@ -40,12 +41,12 @@ if ((!empty($_POST['submit_mult']) && isset($_POST['selected_tbl']))
|
||||
$_POST['message'] = PMA_Message::success();
|
||||
}
|
||||
}
|
||||
include 'libraries/db_common.inc.php';
|
||||
require 'libraries/db_common.inc.php';
|
||||
$url_query .= '&goto=db_structure.php';
|
||||
|
||||
// Gets the database structure
|
||||
$sub_part = '_structure';
|
||||
include 'libraries/db_info.inc.php';
|
||||
require 'libraries/db_info.inc.php';
|
||||
|
||||
if (!PMA_DRIZZLE) {
|
||||
include_once 'libraries/replication.inc.php';
|
||||
@ -110,7 +111,7 @@ $response->addHTML(
|
||||
. 'name="tablesForm" id="tablesForm">'
|
||||
);
|
||||
|
||||
$response->addHTML(PMA_generate_common_hidden_inputs($db));
|
||||
$response->addHTML(PMA_URL_getHiddenInputs($db));
|
||||
|
||||
$response->addHTML(
|
||||
PMA_tableHeader($db_is_information_schema, $server_slave_status)
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
* Tracking configuration for database
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
|
||||
@ -132,10 +134,16 @@ if ($GLOBALS['dbi']->numRows($all_tables_result) > 0) {
|
||||
<td><?php echo $version_data['date_created'];?></td>
|
||||
<td><?php echo $version_data['date_updated'];?></td>
|
||||
<td><?php echo $version_status;?></td>
|
||||
<td><a class="drop_tracking_anchor ajax" href="<?php echo $delete_link;?>" ><?php echo $drop_image_or_text; ?></a></td>
|
||||
<td> <a href="<?php echo $tmp_link; ?>"><?php echo __('Versions');?></a>
|
||||
| <a href="<?php echo $tmp_link; ?>&report=true&version=<?php echo $version_data['version'];?>"><?php echo __('Tracking report');?></a>
|
||||
| <a href="<?php echo $tmp_link; ?>&snapshot=true&version=<?php echo $version_data['version'];?>"><?php echo __('Structure snapshot');?></a></td>
|
||||
<td>
|
||||
<a class="drop_tracking_anchor ajax" href="<?php echo $delete_link;?>" >
|
||||
<?php echo $drop_image_or_text; ?></a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="<?php echo $tmp_link; ?>"><?php echo __('Versions');?></a>
|
||||
|
|
||||
<a href="<?php echo $tmp_link; ?>&report=true&version=<?php echo $version_data['version'];?>"><?php echo __('Tracking report');?></a>
|
||||
|
|
||||
<a href="<?php echo $tmp_link; ?>&snapshot=true&version=<?php echo $version_data['version'];?>"><?php echo __('Structure snapshot');?></a></td>
|
||||
</tr>
|
||||
<?php
|
||||
if ($style == 'even') {
|
||||
|
||||
141
doc/config.rst
141
doc/config.rst
@ -1836,35 +1836,6 @@ Tabs display settings
|
||||
* ``tbl_change.php``
|
||||
* ``sql.php``
|
||||
|
||||
Documentation
|
||||
-------------
|
||||
|
||||
.. config:option:: $cfg['MySQLManualBase']
|
||||
|
||||
:type: string
|
||||
:default: ``'http://dev.mysql.com/doc/refman'``
|
||||
|
||||
If set to an :term:`URL` which points to
|
||||
the MySQL documentation (type depends on
|
||||
:config:option:`$cfg['MySQLManualType']`), appropriate help links are
|
||||
generated.
|
||||
|
||||
See `MySQL Documentation page <http://dev.mysql.com/doc/>`_ for more
|
||||
information about MySQL manuals and their types.
|
||||
|
||||
.. config:option:: $cfg['MySQLManualType']
|
||||
|
||||
:type: string
|
||||
:default: ``'viewable'``
|
||||
|
||||
Type of MySQL documentation:
|
||||
|
||||
* viewable - "viewable online", current one used on MySQL website
|
||||
* searchable - "Searchable, with user comments"
|
||||
* chapters - "HTML, one page per chapter"
|
||||
* big - "HTML, all on one page"
|
||||
* none - do not show documentation links
|
||||
|
||||
Languages
|
||||
---------
|
||||
|
||||
@ -2693,118 +2664,6 @@ Default queries
|
||||
Default queries that will be displayed in query boxes when user didn't
|
||||
specify any. You can use standard :ref:`faq6_27`.
|
||||
|
||||
SQL parser settings
|
||||
-------------------
|
||||
|
||||
.. config:option:: $cfg['SQP']['fmtType']
|
||||
|
||||
:type: string
|
||||
:default: ``'html'``
|
||||
|
||||
The main use of the :term:`SQL` Parser
|
||||
is to format and analyze :term:`SQL` queries. By
|
||||
default we use text to format the query, but you can disable this by
|
||||
setting this variable to ``'none'``.
|
||||
|
||||
Available options:
|
||||
|
||||
* ``'text'``
|
||||
* ``'none'``
|
||||
|
||||
.. _cfg_SQP:
|
||||
.. config:option:: $cfg['SQP']['fmtInd']
|
||||
|
||||
:type: float
|
||||
:default: ``'1'``
|
||||
|
||||
.. config:option:: $cfg['SQP']['fmtIndUnit']
|
||||
|
||||
:type: string
|
||||
:default: ``'em'``
|
||||
|
||||
For the pretty-printing of :term:`SQL` queries,
|
||||
under some cases the part of a query inside a bracket is indented. By
|
||||
changing :config:option:`$cfg['SQP']['fmtInd']` you can change the amount
|
||||
of this indent.
|
||||
|
||||
Related in purpose is :config:option:`$cfg['SQP']['fmtIndUnit']` which
|
||||
specifies the units of the indent amount that you specified. This is used
|
||||
via stylesheets.
|
||||
|
||||
You can use any HTML unit, for example:
|
||||
|
||||
* ``'em'``
|
||||
* ``'ex'``
|
||||
* ``'pt'``
|
||||
* ``'px'``
|
||||
|
||||
.. config:option:: $cfg['SQP']['fmtColor']
|
||||
|
||||
:type: array of string tuples
|
||||
:default:
|
||||
|
||||
This array is used to define the colours for each type of element of
|
||||
the pretty-printed :term:`SQL` queries.
|
||||
The tuple format is *class* => [*HTML colour code* | *empty string*]
|
||||
|
||||
|
||||
If you specify an empty string for the color of a class, it is ignored
|
||||
in creating the stylesheet. You should not alter the class names, only
|
||||
the colour strings.
|
||||
|
||||
**Class name key:**
|
||||
|
||||
comment
|
||||
Applies to all comment sub-classes
|
||||
comment\_mysql
|
||||
Comments as ``"#...\n"``
|
||||
comment\_ansi
|
||||
Comments as ``"-- ...\n"``
|
||||
comment\_c
|
||||
Comments as ``"/*...*/"``
|
||||
digit
|
||||
Applies to all digit sub-classes
|
||||
digit\_hex
|
||||
Hexadecimal numbers
|
||||
digit\_integer
|
||||
Integer numbers
|
||||
digit\_float
|
||||
Floating point numbers
|
||||
punct
|
||||
Applies to all punctuation sub-classes
|
||||
punct\_bracket\_open\_round
|
||||
Opening brackets ``"("``
|
||||
punct\_bracket\_close\_round
|
||||
Closing brackets ``")"``
|
||||
punct\_listsep
|
||||
List item Separator ``","``
|
||||
punct\_qualifier
|
||||
Table/Column Qualifier ``"."``
|
||||
punct\_queryend
|
||||
End of query marker ``";"``
|
||||
alpha
|
||||
Applies to all alphabetic classes
|
||||
alpha\_columnType
|
||||
Identifiers matching a column type
|
||||
alpha\_columnAttrib
|
||||
Identifiers matching a database/table/column attribute
|
||||
alpha\_functionName
|
||||
Identifiers matching a MySQL function name
|
||||
alpha\_reservedWord
|
||||
Identifiers matching any other reserved word
|
||||
alpha\_variable
|
||||
Identifiers matching a :term:`SQL` variable ``"@foo"``
|
||||
alpha\_identifier
|
||||
All other identifiers
|
||||
quote
|
||||
Applies to all quotation mark classes
|
||||
quote\_double
|
||||
Double quotes ``"``
|
||||
quote\_single
|
||||
Single quotes ``'``
|
||||
quote\_backtick
|
||||
Backtick quotes `````
|
||||
|
||||
SQL validator settings
|
||||
----------------------
|
||||
|
||||
|
||||
16
export.php
16
export.php
@ -219,9 +219,9 @@ if (!defined('TESTSUITE')) {
|
||||
|
||||
// Generate error url and check for needed variables
|
||||
if ($export_type == 'server') {
|
||||
$err_url = 'server_export.php?' . PMA_generate_common_url();
|
||||
$err_url = 'server_export.php?' . PMA_URL_getCommon();
|
||||
} elseif ($export_type == 'database' && strlen($db)) {
|
||||
$err_url = 'db_export.php?' . PMA_generate_common_url($db);
|
||||
$err_url = 'db_export.php?' . PMA_URL_getCommon($db);
|
||||
// Check if we have something to export
|
||||
if (isset($table_select)) {
|
||||
$tables = $table_select;
|
||||
@ -229,7 +229,7 @@ if (!defined('TESTSUITE')) {
|
||||
$tables = array();
|
||||
}
|
||||
} elseif ($export_type == 'table' && strlen($db) && strlen($table)) {
|
||||
$err_url = 'tbl_export.php?' . PMA_generate_common_url($db, $table);
|
||||
$err_url = 'tbl_export.php?' . PMA_URL_getCommon($db, $table);
|
||||
} else {
|
||||
PMA_fatalError(__('Bad parameters!'));
|
||||
}
|
||||
@ -325,7 +325,7 @@ function PMA_exportOutputHandler($line)
|
||||
) {
|
||||
$dump_buffer = bzcompress($dump_buffer);
|
||||
} elseif ($GLOBALS['compression'] == 'gzip'
|
||||
&& PMA_gzencodeNeeded()
|
||||
&& PMA_gzencodeNeeded()
|
||||
) {
|
||||
// as a gzipped file
|
||||
// without the optional parameter level because it bugs
|
||||
@ -576,11 +576,11 @@ if (!defined('TESTSUITE')) {
|
||||
*/
|
||||
$back_button = '<p>[ <a href="';
|
||||
if ($export_type == 'server') {
|
||||
$back_button .= 'server_export.php?' . PMA_generate_common_url();
|
||||
$back_button .= 'server_export.php?' . PMA_URL_getCommon();
|
||||
} elseif ($export_type == 'database') {
|
||||
$back_button .= 'db_export.php?' . PMA_generate_common_url($db);
|
||||
$back_button .= 'db_export.php?' . PMA_URL_getCommon($db);
|
||||
} else {
|
||||
$back_button .= 'tbl_export.php?' . PMA_generate_common_url($db, $table);
|
||||
$back_button .= 'tbl_export.php?' . PMA_URL_getCommon($db, $table);
|
||||
}
|
||||
|
||||
// Convert the multiple select elements from an array to a string
|
||||
@ -981,4 +981,4 @@ if (!defined('TESTSUITE')) {
|
||||
<?php
|
||||
} // end if
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
@ -122,7 +122,7 @@ if (isset($_REQUEST['input_name'])) {
|
||||
echo '<input type="hidden" name="input_name" value="'
|
||||
. htmlspecialchars($_REQUEST['input_name']) . '" />';
|
||||
}
|
||||
echo PMA_generate_common_hidden_inputs();
|
||||
echo PMA_URL_getHiddenInputs();
|
||||
|
||||
echo '<!-- Visualization section -->';
|
||||
echo '<div id="placeholder" style="width:450px;height:300px;'
|
||||
|
||||
23
import.php
23
import.php
@ -165,15 +165,15 @@ require_once 'libraries/import.lib.php';
|
||||
|
||||
// Create error and goto url
|
||||
if ($import_type == 'table') {
|
||||
$err_url = 'tbl_import.php?' . PMA_generate_common_url($db, $table);
|
||||
$err_url = 'tbl_import.php?' . PMA_URL_getCommon($db, $table);
|
||||
$_SESSION['Import_message']['go_back_url'] = $err_url;
|
||||
$goto = 'tbl_import.php';
|
||||
} elseif ($import_type == 'database') {
|
||||
$err_url = 'db_import.php?' . PMA_generate_common_url($db);
|
||||
$err_url = 'db_import.php?' . PMA_URL_getCommon($db);
|
||||
$_SESSION['Import_message']['go_back_url'] = $err_url;
|
||||
$goto = 'db_import.php';
|
||||
} elseif ($import_type == 'server') {
|
||||
$err_url = 'server_import.php?' . PMA_generate_common_url();
|
||||
$err_url = 'server_import.php?' . PMA_URL_getCommon();
|
||||
$_SESSION['Import_message']['go_back_url'] = $err_url;
|
||||
$goto = 'server_import.php';
|
||||
} else {
|
||||
@ -187,11 +187,11 @@ if ($import_type == 'table') {
|
||||
}
|
||||
}
|
||||
if (strlen($table) && strlen($db)) {
|
||||
$common = PMA_generate_common_url($db, $table);
|
||||
$common = PMA_URL_getCommon($db, $table);
|
||||
} elseif (strlen($db)) {
|
||||
$common = PMA_generate_common_url($db);
|
||||
$common = PMA_URL_getCommon($db);
|
||||
} else {
|
||||
$common = PMA_generate_common_url();
|
||||
$common = PMA_URL_getCommon();
|
||||
}
|
||||
$err_url = $goto . '?' . $common
|
||||
. (preg_match('@^tbl_[a-z]*\.php$@', $goto)
|
||||
@ -545,7 +545,9 @@ if (! empty($id_bookmark) && $action_bookmark == 2) {
|
||||
} else {
|
||||
if ($import_notice) {
|
||||
$message = PMA_Message::success(
|
||||
'<em>' . __('Import has been successfully finished, %d queries executed.') . '</em>'
|
||||
'<em>'
|
||||
. __('Import has been successfully finished, %d queries executed.')
|
||||
. '</em>'
|
||||
);
|
||||
$message->addParam($executed_queries);
|
||||
|
||||
@ -605,7 +607,7 @@ if (isset($my_die)) {
|
||||
|
||||
if ($go_sql) {
|
||||
// parse sql query
|
||||
require_once 'libraries/parse_analyze.inc.php';
|
||||
include_once 'libraries/parse_analyze.inc.php';
|
||||
|
||||
PMA_executeQueryAndSendQueryResponse(
|
||||
$analyzed_sql_results, false, $db, $table, null, null, null, false, null,
|
||||
@ -616,7 +618,10 @@ if ($go_sql) {
|
||||
$response = PMA_Response::getInstance();
|
||||
$response->isSuccess(true);
|
||||
$response->addJSON('message', PMA_Message::success($msg));
|
||||
$response->addJSON('sql_query', PMA_Util::getMessage($msg, $sql_query, 'success'));
|
||||
$response->addJSON(
|
||||
'sql_query',
|
||||
PMA_Util::getMessage($msg, $sql_query, 'success')
|
||||
);
|
||||
} else if ($result == false) {
|
||||
$response = PMA_Response::getInstance();
|
||||
$response->isSuccess(false);
|
||||
|
||||
11
index.php
11
index.php
@ -75,7 +75,7 @@ if (! empty($message)) {
|
||||
unset($message);
|
||||
}
|
||||
|
||||
$common_url_query = PMA_generate_common_url('', '');
|
||||
$common_url_query = PMA_URL_getCommon('', '');
|
||||
|
||||
// when $server > 0, a server has been chosen so we can display
|
||||
// all MySQL-related information
|
||||
@ -169,15 +169,12 @@ if ($server > 0 || count($cfg['Servers']) > 1
|
||||
} // end if
|
||||
echo ' <li id="li_select_mysql_collation" class="no_bullets" >';
|
||||
echo ' <form method="post" action="index.php">' . "\n"
|
||||
. PMA_generate_common_hidden_inputs(null, null, 4, 'collation_connection')
|
||||
. PMA_URL_getHiddenInputs(null, null, 4, 'collation_connection')
|
||||
. ' <label for="select_collation_connection">' . "\n"
|
||||
. ' '. PMA_Util::getImage('s_asci.png') . " "
|
||||
. __('Server connection collation') . "\n"
|
||||
// put the doc link in the form so that it appears on the same line
|
||||
. PMA_Util::showMySQLDocu(
|
||||
'MySQL_Database_Administration',
|
||||
'Charset-connection'
|
||||
)
|
||||
. PMA_Util::showMySQLDocu('Charset-connection')
|
||||
. ': ' . "\n"
|
||||
. ' </label>' . "\n"
|
||||
|
||||
@ -640,7 +637,7 @@ function PMA_printListItem($name, $id = null, $url = null,
|
||||
echo '</a>' . "\n";
|
||||
}
|
||||
if (null !== $mysql_help_page) {
|
||||
echo PMA_Util::showMySQLDocu('', $mysql_help_page);
|
||||
echo PMA_Util::showMySQLDocu($mysql_help_page);
|
||||
}
|
||||
echo '</li>';
|
||||
}
|
||||
|
||||
788
js/codemirror/lib/codemirror.js
vendored
788
js/codemirror/lib/codemirror.js
vendored
File diff suppressed because it is too large
Load Diff
112
js/codemirror/mode/sql/sql.js
vendored
112
js/codemirror/mode/sql/sql.js
vendored
@ -19,43 +19,64 @@ CodeMirror.defineMode("sql", function(config, parserConfig) {
|
||||
if (result !== false) return result;
|
||||
}
|
||||
|
||||
if ((ch == "0" && stream.match(/^[xX][0-9a-fA-F]+/))
|
||||
|| (ch == "x" || ch == "X") && stream.match(/^'[0-9a-fA-F]+'/)) {
|
||||
if (support.hexNumber == true &&
|
||||
((ch == "0" && stream.match(/^[xX][0-9a-fA-F]+/))
|
||||
|| (ch == "x" || ch == "X") && stream.match(/^'[0-9a-fA-F]+'/))) {
|
||||
// hex
|
||||
// ref: http://dev.mysql.com/doc/refman/5.5/en/hexadecimal-literals.html
|
||||
return "number";
|
||||
} else if (((ch == "b" || ch == "B") && stream.match(/^'[01]+'/))
|
||||
|| (ch == "0" && stream.match(/^b[01]+/))) {
|
||||
} else if (support.binaryNumber == true &&
|
||||
(((ch == "b" || ch == "B") && stream.match(/^'[01]+'/))
|
||||
|| (ch == "0" && stream.match(/^b[01]+/)))) {
|
||||
// bitstring
|
||||
// ref: http://dev.mysql.com/doc/refman/5.5/en/bit-field-literals.html
|
||||
return "number";
|
||||
} else if (ch.charCodeAt(0) > 47 && ch.charCodeAt(0) < 58) {
|
||||
// numbers
|
||||
stream.match(/^[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?/);
|
||||
// ref: http://dev.mysql.com/doc/refman/5.5/en/number-literals.html
|
||||
stream.match(/^[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?/);
|
||||
support.decimallessFloat == true && stream.eat('.');
|
||||
return "number";
|
||||
} else if (ch == "?" && (stream.eatSpace() || stream.eol() || stream.eat(";"))) {
|
||||
// placeholders
|
||||
return "variable-3";
|
||||
} else if (ch == '"' || ch == "'") {
|
||||
} else if (ch == "'" || (ch == '"' && support.doubleQuote)) {
|
||||
// strings
|
||||
// ref: http://dev.mysql.com/doc/refman/5.5/en/string-literals.html
|
||||
state.tokenize = tokenLiteral(ch);
|
||||
return state.tokenize(stream, state);
|
||||
} else if ((((support.nCharCast == true && (ch == "n" || ch == "N"))
|
||||
|| (support.charsetCast == true && ch == "_" && stream.match(/[a-z][a-z0-9]*/i)))
|
||||
&& (stream.peek() == "'" || stream.peek() == '"'))) {
|
||||
// charset casting: _utf8'str', N'str', n'str'
|
||||
// ref: http://dev.mysql.com/doc/refman/5.5/en/string-literals.html
|
||||
return "keyword";
|
||||
} else if (/^[\(\),\;\[\]]/.test(ch)) {
|
||||
// no highlightning
|
||||
return null;
|
||||
} else if (ch == "#" || (ch == "-" && stream.eat("-") && stream.eat(" "))) {
|
||||
} else if (support.commentSlashSlash && ch == "/" && stream.eat("/")) {
|
||||
// 1-line comment
|
||||
stream.skipToEnd();
|
||||
return "comment";
|
||||
} else if ((support.commentHash && ch == "#")
|
||||
|| (ch == "-" && stream.eat("-") && (!support.commentSpaceRequired || stream.eat(" ")))) {
|
||||
// 1-line comments
|
||||
// ref: https://kb.askmonty.org/en/comment-syntax/
|
||||
stream.skipToEnd();
|
||||
return "comment";
|
||||
} else if (ch == "/" && stream.eat("*")) {
|
||||
// multi-line comments
|
||||
// ref: https://kb.askmonty.org/en/comment-syntax/
|
||||
state.tokenize = tokenComment;
|
||||
return state.tokenize(stream, state);
|
||||
} else if (ch == ".") {
|
||||
// .1 for 0.1
|
||||
if (support.zerolessFloat == true && stream.match(/^(?:\d+(?:e\d*)?|\d*e\d+)/i)) {
|
||||
if (support.zerolessFloat == true && stream.match(/^(?:\d+(?:e[+-]?\d+)?)/i)) {
|
||||
return "number";
|
||||
}
|
||||
// .table_name (ODBC)
|
||||
if (stream.match(/^[a-zA-Z_]+/) && support.ODBCdotTable == true) {
|
||||
// // ref: http://dev.mysql.com/doc/refman/5.6/en/identifier-qualifiers.html
|
||||
if (support.ODBCdotTable == true && stream.match(/^[a-zA-Z_]+/)) {
|
||||
return "variable-2";
|
||||
}
|
||||
} else if (operatorChars.test(ch)) {
|
||||
@ -65,11 +86,13 @@ CodeMirror.defineMode("sql", function(config, parserConfig) {
|
||||
} else if (ch == '{' &&
|
||||
(stream.match(/^( )*(d|D|t|T|ts|TS)( )*'[^']*'( )*}/) || stream.match(/^( )*(d|D|t|T|ts|TS)( )*"[^"]*"( )*}/))) {
|
||||
// dates (weird ODBC syntax)
|
||||
// ref: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-literals.html
|
||||
return "number";
|
||||
} else {
|
||||
stream.eatWhile(/^[_\w\d]/);
|
||||
var word = stream.current().toLowerCase();
|
||||
// dates (standard SQL syntax)
|
||||
// ref: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-literals.html
|
||||
if (dateSQL.hasOwnProperty(word) && (stream.match(/^( )+'[^']*'/) || stream.match(/^( )+"[^"]*"/)))
|
||||
return "number";
|
||||
if (atoms.hasOwnProperty(word)) return "atom";
|
||||
@ -166,6 +189,8 @@ CodeMirror.defineMode("sql", function(config, parserConfig) {
|
||||
|
||||
// `identifier`
|
||||
function hookIdentifier(stream) {
|
||||
// MySQL/MariaDB identifiers
|
||||
// ref: http://dev.mysql.com/doc/refman/5.6/en/identifier-qualifiers.html
|
||||
var ch;
|
||||
while ((ch = stream.next()) != null) {
|
||||
if (ch == "`" && !stream.eat("`")) return "variable-2";
|
||||
@ -176,7 +201,9 @@ CodeMirror.defineMode("sql", function(config, parserConfig) {
|
||||
// variable token
|
||||
function hookVar(stream) {
|
||||
// variables
|
||||
// @@ and prefix
|
||||
// @@prefix.varName @varName
|
||||
// varName can be quoted with ` or ' or "
|
||||
// ref: http://dev.mysql.com/doc/refman/5.5/en/user-variables.html
|
||||
if (stream.eat("@")) {
|
||||
stream.match(/^session\./);
|
||||
stream.match(/^local\./);
|
||||
@ -200,18 +227,27 @@ CodeMirror.defineMode("sql", function(config, parserConfig) {
|
||||
|
||||
// short client keyword token
|
||||
function hookClient(stream) {
|
||||
// \N means NULL
|
||||
// ref: http://dev.mysql.com/doc/refman/5.5/en/null-values.html
|
||||
if (stream.eat("N")) {
|
||||
return "atom";
|
||||
}
|
||||
// \g, etc
|
||||
return stream.match(/^[a-zA-Z]\b/) ? "variable-2" : null;
|
||||
// ref: http://dev.mysql.com/doc/refman/5.5/en/mysql-commands.html
|
||||
return stream.match(/^[a-zA-Z.#!?]/) ? "variable-2" : null;
|
||||
}
|
||||
|
||||
// these keywords are used by all SQL dialects (however, a mode can still overwrite it)
|
||||
var sqlKeywords = "alter and as asc between by count create delete desc distinct drop from having in insert into is join like not on or order select set table union update values where ";
|
||||
|
||||
// turn a space-separated list into an array
|
||||
function set(str) {
|
||||
var obj = {}, words = str.split(" ");
|
||||
for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
|
||||
return obj;
|
||||
}
|
||||
|
||||
// A generic SQL Mode. It's not a standard, it just try to support what is generally supported
|
||||
CodeMirror.defineMIME("text/x-sql", {
|
||||
name: "sql",
|
||||
keywords: set(sqlKeywords + "begin"),
|
||||
@ -219,7 +255,7 @@ CodeMirror.defineMode("sql", function(config, parserConfig) {
|
||||
atoms: set("false true null unknown"),
|
||||
operatorChars: /^[*+\-%<>!=]/,
|
||||
dateSQL: set("date time timestamp"),
|
||||
support: set("ODBCdotTable")
|
||||
support: set("ODBCdotTable doubleQuote binaryNumber hexNumber")
|
||||
});
|
||||
|
||||
CodeMirror.defineMIME("text/x-mysql", {
|
||||
@ -230,7 +266,7 @@ CodeMirror.defineMode("sql", function(config, parserConfig) {
|
||||
atoms: set("false true null unknown"),
|
||||
operatorChars: /^[*+\-%<>!=&|^]/,
|
||||
dateSQL: set("date time timestamp"),
|
||||
support: set("ODBCdotTable zerolessFloat"),
|
||||
support: set("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),
|
||||
hooks: {
|
||||
"@": hookVar,
|
||||
"`": hookIdentifier,
|
||||
@ -246,7 +282,7 @@ CodeMirror.defineMode("sql", function(config, parserConfig) {
|
||||
atoms: set("false true null unknown"),
|
||||
operatorChars: /^[*+\-%<>!=&|^]/,
|
||||
dateSQL: set("date time timestamp"),
|
||||
support: set("ODBCdotTable zerolessFloat"),
|
||||
support: set("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),
|
||||
hooks: {
|
||||
"@": hookVar,
|
||||
"`": hookIdentifier,
|
||||
@ -254,6 +290,20 @@ CodeMirror.defineMode("sql", function(config, parserConfig) {
|
||||
}
|
||||
});
|
||||
|
||||
// the query language used by Apache Cassandra is called CQL, but this mime type
|
||||
// is called Cassandra to avoid confusion with Contextual Query Language
|
||||
CodeMirror.defineMIME("text/x-cassandra", {
|
||||
name: "sql",
|
||||
client: { },
|
||||
keywords: set("use select from using consistency where limit first reversed first and in insert into values using consistency ttl update set delete truncate begin batch apply create keyspace with columnfamily primary key index on drop alter type add any one quorum all local_quorum each_quorum"),
|
||||
builtin: set("ascii bigint blob boolean counter decimal double float int text timestamp uuid varchar varint"),
|
||||
atoms: set("false true"),
|
||||
operatorChars: /^[<>=]/,
|
||||
dateSQL: { },
|
||||
support: set("commentSlashSlash decimallessFloat"),
|
||||
hooks: { }
|
||||
});
|
||||
|
||||
// this is based on Peter Raganitsch's 'plsql' mode
|
||||
CodeMirror.defineMIME("text/x-plsql", {
|
||||
name: "sql",
|
||||
@ -262,6 +312,38 @@ CodeMirror.defineMode("sql", function(config, parserConfig) {
|
||||
functions: set("abs acos add_months ascii asin atan atan2 average bfilename ceil chartorowid chr concat convert cos cosh count decode deref dual dump dup_val_on_index empty error exp false floor found glb greatest hextoraw initcap instr instrb isopen last_day least lenght lenghtb ln lower lpad ltrim lub make_ref max min mod months_between new_time next_day nextval nls_charset_decl_len nls_charset_id nls_charset_name nls_initcap nls_lower nls_sort nls_upper nlssort no_data_found notfound null nvl others power rawtohex reftohex round rowcount rowidtochar rpad rtrim sign sin sinh soundex sqlcode sqlerrm sqrt stddev substr substrb sum sysdate tan tanh to_char to_date to_label to_multi_byte to_number to_single_byte translate true trunc uid upper user userenv variance vsize"),
|
||||
builtin: set("bfile blob character clob dec float int integer mlslabel natural naturaln nchar nclob number numeric nvarchar2 real rowtype signtype smallint string varchar varchar2"),
|
||||
operatorChars: /^[*+\-%<>!=~]/,
|
||||
dateSQL: set("date time timestamp")
|
||||
dateSQL: set("date time timestamp"),
|
||||
support: set("doubleQuote nCharCast zerolessFloat binaryNumber hexNumber")
|
||||
});
|
||||
}());
|
||||
|
||||
/*
|
||||
How Properties of Mime Types are used by SQL Mode
|
||||
=================================================
|
||||
|
||||
keywords:
|
||||
A list of keywords you want to be highlighted.
|
||||
functions:
|
||||
A list of function names you want to be highlighted.
|
||||
builtin:
|
||||
A list of builtin types you want to be highlighted (if you want types to be of class "builtin" instead of "keyword").
|
||||
operatorChars:
|
||||
All characters that must be handled as operators.
|
||||
client:
|
||||
Commands parsed and executed by the client (not the server).
|
||||
support:
|
||||
A list of supported syntaxes which are not common, but are supported by more than 1 DBMS.
|
||||
* ODBCdotTable: .tableName
|
||||
* zerolessFloat: .1
|
||||
* doubleQuote
|
||||
* nCharCast: N'string'
|
||||
* charsetCast: _utf8'string'
|
||||
* commentHash: use # char for comments
|
||||
* commentSlashSlash: use // for comments
|
||||
* commentSpaceRequired: require a space after -- for comments
|
||||
atoms:
|
||||
Keywords that must be highlighted as atoms,. Some DBMS's support more atoms than others:
|
||||
UNKNOWN, INFINITY, UNDERFLOW, NaN...
|
||||
dateSQL:
|
||||
Used for date/time SQL standard syntax, because not all DBMS's support same temporal types.
|
||||
*/
|
||||
|
||||
365
js/doclinks.js
Normal file
365
js/doclinks.js
Normal file
@ -0,0 +1,365 @@
|
||||
/**
|
||||
* Definition of links to MySQL documentation.
|
||||
*/
|
||||
|
||||
var mysql_doc_keyword = {
|
||||
/* Multi word */
|
||||
'CHARACTER SET': Array('charset'),
|
||||
'SHOW AUTHORS': Array('show-authors'),
|
||||
'SHOW BINARY LOGS': Array('show-binary-logs'),
|
||||
'SHOW BINLOG EVENTS': Array('show-binlog-events'),
|
||||
'SHOW CHARACTER SET': Array('show-character-set'),
|
||||
'SHOW COLLATION': Array('show-collation'),
|
||||
'SHOW COLUMNS': Array('show-columns'),
|
||||
'SHOW CONTRIBUTORS': Array('show-contributors'),
|
||||
'SHOW CREATE DATABASE': Array('show-create-database'),
|
||||
'SHOW CREATE EVENT': Array('show-create-event'),
|
||||
'SHOW CREATE FUNCTION': Array('show-create-function'),
|
||||
'SHOW CREATE PROCEDURE': Array('show-create-procedure'),
|
||||
'SHOW CREATE TABLE': Array('show-create-table'),
|
||||
'SHOW CREATE TRIGGER': Array('show-create-trigger'),
|
||||
'SHOW CREATE VIEW': Array('show-create-view'),
|
||||
'SHOW DATABASES': Array('show-databases'),
|
||||
'SHOW ENGINE': Array('show-engine'),
|
||||
'SHOW ENGINES': Array('show-engines'),
|
||||
'SHOW ERRORS': Array('show-errors'),
|
||||
'SHOW EVENTS': Array('show-events'),
|
||||
'SHOW FUNCTION CODE': Array('show-function-code'),
|
||||
'SHOW FUNCTION STATUS': Array('show-function-status'),
|
||||
'SHOW GRANTS': Array('show-grants'),
|
||||
'SHOW INDEX': Array('show-index'),
|
||||
'SHOW MASTER STATUS': Array('show-master-status'),
|
||||
'SHOW OPEN TABLES': Array('show-open-tables'),
|
||||
'SHOW PLUGINS': Array('show-plugins'),
|
||||
'SHOW PRIVILEGES': Array('show-privileges'),
|
||||
'SHOW PROCEDURE CODE': Array('show-procedure-code'),
|
||||
'SHOW PROCEDURE STATUS': Array('show-procedure-status'),
|
||||
'SHOW PROCESSLIST': Array('show-processlist'),
|
||||
'SHOW PROFILE': Array('show-profile'),
|
||||
'SHOW PROFILES': Array('show-profiles'),
|
||||
'SHOW RELAYLOG EVENTS': Array('show-relaylog-events'),
|
||||
'SHOW SLAVE HOSTS': Array('show-slave-hosts'),
|
||||
'SHOW SLAVE STATUS': Array('show-slave-status'),
|
||||
'SHOW STATUS': Array('show-status'),
|
||||
'SHOW TABLE STATUS': Array('show-table-status'),
|
||||
'SHOW TABLES': Array('show-tables'),
|
||||
'SHOW TRIGGERS': Array('show-triggers'),
|
||||
'SHOW VARIABLES': Array('show-variables'),
|
||||
'SHOW WARNINGS': Array('show-warnings'),
|
||||
'LOAD DATA INFILE': Array('load-data'),
|
||||
'LOAD XML': Array('load-xml'),
|
||||
'LOCK TABLES': Array('lock-tables'),
|
||||
'UNLOCK TABLES': Array('lock-tables'),
|
||||
'ALTER DATABASE': Array('alter-database'),
|
||||
'ALTER EVENT': Array('alter-event'),
|
||||
'ALTER LOGFILE GROUP': Array('alter-logfile-group'),
|
||||
'ALTER FUNCTION': Array('alter-function'),
|
||||
'ALTER PROCEDURE': Array('alter-procedure'),
|
||||
'ALTER SERVER': Array('alter-server'),
|
||||
'ALTER TABLE': Array('alter-table'),
|
||||
'ALTER TABLESPACE': Array('alter-tablespace'),
|
||||
'ALTER VIEW': Array('alter-view'),
|
||||
'CREATE DATABASE': Array('create-database'),
|
||||
'CREATE EVENT': Array('create-event'),
|
||||
'CREATE FUNCTION': Array('create-function'),
|
||||
'CREATE INDEX': Array('create-index'),
|
||||
'CREATE LOGFILE GROUP': Array('create-logfile-group'),
|
||||
'CREATE PROCEDURE': Array('create-procedure'),
|
||||
'CREATE SERVER': Array('create-server'),
|
||||
'CREATE TABLE': Array('create-table'),
|
||||
'CREATE TABLESPACE': Array('create-tablespace'),
|
||||
'CREATE TRIGGER': Array('create-trigger'),
|
||||
'CREATE VIEW': Array('create-view'),
|
||||
'DROP DATABASE': Array('drop-database'),
|
||||
'DROP EVENT': Array('drop-event'),
|
||||
'DROP FUNCTION': Array('drop-function'),
|
||||
'DROP INDEX': Array('drop-index'),
|
||||
'DROP LOGFILE GROUP': Array('drop-logfile-group'),
|
||||
'DROP PROCEDURE': Array('drop-procedure'),
|
||||
'DROP SERVER': Array('drop-server'),
|
||||
'DROP TABLE': Array('drop-table'),
|
||||
'DROP TABLESPACE': Array('drop-tablespace'),
|
||||
'DROP TRIGGER': Array('drop-trigger'),
|
||||
'DROP VIEW': Array('drop-view'),
|
||||
'RENAME TABLE': Array('rename-table'),
|
||||
'TRUNCATE TABLE': Array('truncate-table'),
|
||||
|
||||
/* Statements */
|
||||
'SELECT': Array('select'),
|
||||
'SET': Array('set'),
|
||||
'EXPLAIN': Array('explain'),
|
||||
'DESCRIBE': Array('describe'),
|
||||
'DELETE': Array('delete'),
|
||||
'SHOW': Array('show'),
|
||||
'UPDATE': Array('update'),
|
||||
'INSERT': Array('insert'),
|
||||
'REPLACE': Array('replace'),
|
||||
'CALL': Array('call'),
|
||||
'DO': Array('do'),
|
||||
'HANDLER': Array('handler'),
|
||||
'COLLATE': Array('charset-collations'),
|
||||
|
||||
/* Functions */
|
||||
'ABS': Array('mathematical-functions', 'function_abs'),
|
||||
'ACOS': Array('mathematical-functions', 'function_acos'),
|
||||
'ADDDATE': Array('date-and-time-functions', 'function_adddate'),
|
||||
'ADDTIME': Array('date-and-time-functions', 'function_addtime'),
|
||||
'AES_DECRYPT': Array('encryption-functions', 'function_aes_decrypt'),
|
||||
'AES_ENCRYPT': Array('encryption-functions', 'function_aes_encrypt'),
|
||||
'AND': Array('logical-operators', 'operator_and'),
|
||||
'ASCII': Array('string-functions', 'function_ascii'),
|
||||
'ASIN': Array('mathematical-functions', 'function_asin'),
|
||||
'ATAN2': Array('mathematical-functions', 'function_atan2'),
|
||||
'ATAN': Array('mathematical-functions', 'function_atan'),
|
||||
'AVG': Array('group-by-functions', 'function_avg'),
|
||||
'BENCHMARK': Array('information-functions', 'function_benchmark'),
|
||||
'BIN': Array('string-functions', 'function_bin'),
|
||||
'BINARY': Array('cast-functions', 'operator_binary'),
|
||||
'BIT_AND': Array('group-by-functions', 'function_bit_and'),
|
||||
'BIT_COUNT': Array('bit-functions', 'function_bit_count'),
|
||||
'BIT_LENGTH': Array('string-functions', 'function_bit_length'),
|
||||
'BIT_OR': Array('group-by-functions', 'function_bit_or'),
|
||||
'BIT_XOR': Array('group-by-functions', 'function_bit_xor'),
|
||||
'CASE': Array('control-flow-functions', 'operator_case'),
|
||||
'CAST': Array('cast-functions', 'function_cast'),
|
||||
'CEIL': Array('mathematical-functions', 'function_ceil'),
|
||||
'CEILING': Array('mathematical-functions', 'function_ceiling'),
|
||||
'CHAR_LENGTH': Array('string-functions', 'function_char_length'),
|
||||
'CHAR': Array('string-functions', 'function_char'),
|
||||
'CHARACTER_LENGTH': Array('string-functions', 'function_character_length'),
|
||||
'CHARSET': Array('information-functions', 'function_charset'),
|
||||
'COALESCE': Array('comparison-operators', 'function_coalesce'),
|
||||
'COERCIBILITY': Array('information-functions', 'function_coercibility'),
|
||||
'COLLATION': Array('information-functions', 'function_collation'),
|
||||
'COMPRESS': Array('encryption-functions', 'function_compress'),
|
||||
'CONCAT_WS': Array('string-functions', 'function_concat_ws'),
|
||||
'CONCAT': Array('string-functions', 'function_concat'),
|
||||
'CONNECTION_ID': Array('information-functions', 'function_connection_id'),
|
||||
'CONV': Array('mathematical-functions', 'function_conv'),
|
||||
'CONVERT_TZ': Array('date-and-time-functions', 'function_convert_tz'),
|
||||
'Convert': Array('cast-functions', 'function_convert'),
|
||||
'COS': Array('mathematical-functions', 'function_cos'),
|
||||
'COT': Array('mathematical-functions', 'function_cot'),
|
||||
'COUNT': Array('group-by-functions', 'function_count'),
|
||||
'CRC32': Array('mathematical-functions', 'function_crc32'),
|
||||
'CURDATE': Array('date-and-time-functions', 'function_curdate'),
|
||||
'CURRENT_DATE': Array('date-and-time-functions', 'function_current_date'),
|
||||
'CURRENT_TIME': Array('date-and-time-functions', 'function_current_time'),
|
||||
'CURRENT_TIMESTAMP': Array('date-and-time-functions', 'function_current_timestamp'),
|
||||
'CURRENT_USER': Array('information-functions', 'function_current_user'),
|
||||
'CURTIME': Array('date-and-time-functions', 'function_curtime'),
|
||||
'DATABASE': Array('information-functions', 'function_database'),
|
||||
'DATE_ADD': Array('date-and-time-functions', 'function_date_add'),
|
||||
'DATE_FORMAT': Array('date-and-time-functions', 'function_date_format'),
|
||||
'DATE_SUB': Array('date-and-time-functions', 'function_date_sub'),
|
||||
'DATE': Array('date-and-time-functions', 'function_date'),
|
||||
'DATEDIFF': Array('date-and-time-functions', 'function_datediff'),
|
||||
'DAY': Array('date-and-time-functions', 'function_day'),
|
||||
'DAYNAME': Array('date-and-time-functions', 'function_dayname'),
|
||||
'DAYOFMONTH': Array('date-and-time-functions', 'function_dayofmonth'),
|
||||
'DAYOFWEEK': Array('date-and-time-functions', 'function_dayofweek'),
|
||||
'DAYOFYEAR': Array('date-and-time-functions', 'function_dayofyear'),
|
||||
'DECLARE': Array('declare', 'declare'),
|
||||
'DECODE': Array('encryption-functions', 'function_decode'),
|
||||
'DEFAULT': Array('miscellaneous-functions', 'function_default'),
|
||||
'DEGREES': Array('mathematical-functions', 'function_degrees'),
|
||||
'DES_DECRYPT': Array('encryption-functions', 'function_des_decrypt'),
|
||||
'DES_ENCRYPT': Array('encryption-functions', 'function_des_encrypt'),
|
||||
'DIV': Array('arithmetic-functions', 'operator_div'),
|
||||
'ELT': Array('string-functions', 'function_elt'),
|
||||
'ENCODE': Array('encryption-functions', 'function_encode'),
|
||||
'ENCRYPT': Array('encryption-functions', 'function_encrypt'),
|
||||
'EXP': Array('mathematical-functions', 'function_exp'),
|
||||
'EXPORT_SET': Array('string-functions', 'function_export_set'),
|
||||
'EXTRACT': Array('date-and-time-functions', 'function_extract'),
|
||||
'ExtractValue': Array('xml-functions', 'function_extractvalue'),
|
||||
'FIELD': Array('string-functions', 'function_field'),
|
||||
'FIND_IN_SET': Array('string-functions', 'function_find_in_set'),
|
||||
'FLOOR': Array('mathematical-functions', 'function_floor'),
|
||||
'FORMAT': Array('string-functions', 'function_format'),
|
||||
'FOUND_ROWS': Array('information-functions', 'function_found_rows'),
|
||||
'FROM_DAYS': Array('date-and-time-functions', 'function_from_days'),
|
||||
'FROM_UNIXTIME': Array('date-and-time-functions', 'function_from_unixtime'),
|
||||
'GET_FORMAT': Array('date-and-time-functions', 'function_get_format'),
|
||||
'GET_LOCK': Array('miscellaneous-functions', 'function_get_lock'),
|
||||
'GREATEST': Array('comparison-operators', 'function_greatest'),
|
||||
'GROUP_CONCAT': Array('group-by-functions', 'function_group_concat'),
|
||||
'HEX': Array('string-functions', 'function_hex'),
|
||||
'HOUR': Array('date-and-time-functions', 'function_hour'),
|
||||
'IF': Array('control-flow-functions', 'function_if'),
|
||||
'IFNULL': Array('control-flow-functions', 'function_ifnull'),
|
||||
'IN': Array('comparison-operators', 'function_in'),
|
||||
'INET_ATON': Array('miscellaneous-functions', 'function_inet_aton'),
|
||||
'INET_NTOA': Array('miscellaneous-functions', 'function_inet_ntoa'),
|
||||
'INSTR': Array('string-functions', 'function_instr'),
|
||||
'INTERVAL': Array('comparison-operators', 'function_interval'),
|
||||
'IS_FREE_LOCK': Array('miscellaneous-functions', 'function_is_free_lock'),
|
||||
'IS_USED_LOCK': Array('miscellaneous-functions', 'function_is_used_lock'),
|
||||
'IS': Array('comparison-operators', 'operator_is'),
|
||||
'ISNULL': Array('comparison-operators', 'function_isnull'),
|
||||
'LAST_DAY': Array('date-and-time-functions', 'function_last_day'),
|
||||
'LAST_INSERT_ID': Array('information-functions', 'function_last_insert_id'),
|
||||
'LCASE': Array('string-functions', 'function_lcase'),
|
||||
'LEAST': Array('comparison-operators', 'function_least'),
|
||||
'LEFT': Array('string-functions', 'function_left'),
|
||||
'LENGTH': Array('string-functions', 'function_length'),
|
||||
'LIKE': Array('string-comparison-functions', 'operator_like'),
|
||||
'LN': Array('mathematical-functions', 'function_ln'),
|
||||
'LOAD_FILE': Array('string-functions', 'function_load_file'),
|
||||
'LOCALTIME': Array('date-and-time-functions', 'function_localtime'),
|
||||
'LOCALTIMESTAMP': Array('date-and-time-functions', 'function_localtimestamp'),
|
||||
'LOCATE': Array('string-functions', 'function_locate'),
|
||||
'LOG10': Array('mathematical-functions', 'function_log10'),
|
||||
'LOG2': Array('mathematical-functions', 'function_log2'),
|
||||
'LOG': Array('mathematical-functions', 'function_log'),
|
||||
'LOWER': Array('string-functions', 'function_lower'),
|
||||
'LPAD': Array('string-functions', 'function_lpad'),
|
||||
'LTRIM': Array('string-functions', 'function_ltrim'),
|
||||
'MAKE_SET': Array('string-functions', 'function_make_set'),
|
||||
'MAKEDATE': Array('date-and-time-functions', 'function_makedate'),
|
||||
'MAKETIME': Array('date-and-time-functions', 'function_maketime'),
|
||||
'MASTER_POS_WAIT': Array('miscellaneous-functions', 'function_master_pos_wait'),
|
||||
'MATCH': Array('fulltext-search', 'function_match'),
|
||||
'MAX': Array('group-by-functions', 'function_max'),
|
||||
'MD5': Array('encryption-functions', 'function_md5'),
|
||||
'MICROSECOND': Array('date-and-time-functions', 'function_microsecond'),
|
||||
'MID': Array('string-functions', 'function_mid'),
|
||||
'MIN': Array('group-by-functions', 'function_min'),
|
||||
'MINUTE': Array('date-and-time-functions', 'function_minute'),
|
||||
'MOD': Array('mathematical-functions', 'function_mod'),
|
||||
'MONTH': Array('date-and-time-functions', 'function_month'),
|
||||
'MONTHNAME': Array('date-and-time-functions', 'function_monthname'),
|
||||
'NAME_CONST': Array('miscellaneous-functions', 'function_name_const'),
|
||||
'NOT': Array('logical-operators', 'operator_not'),
|
||||
'NOW': Array('date-and-time-functions', 'function_now'),
|
||||
'NULLIF': Array('control-flow-functions', 'function_nullif'),
|
||||
'OCT': Array('mathematical-functions', 'function_oct'),
|
||||
'OCTET_LENGTH': Array('string-functions', 'function_octet_length'),
|
||||
'OLD_PASSWORD': Array('encryption-functions', 'function_old_password'),
|
||||
'OR': Array('logical-operators', 'operator_or'),
|
||||
'ORD': Array('string-functions', 'function_ord'),
|
||||
'PASSWORD': Array('encryption-functions', 'function_password'),
|
||||
'PERIOD_ADD': Array('date-and-time-functions', 'function_period_add'),
|
||||
'PERIOD_DIFF': Array('date-and-time-functions', 'function_period_diff'),
|
||||
'PI': Array('mathematical-functions', 'function_pi'),
|
||||
'POSITION': Array('string-functions', 'function_position'),
|
||||
'POW': Array('mathematical-functions', 'function_pow'),
|
||||
'POWER': Array('mathematical-functions', 'function_power'),
|
||||
'QUARTER': Array('date-and-time-functions', 'function_quarter'),
|
||||
'QUOTE': Array('string-functions', 'function_quote'),
|
||||
'RADIANS': Array('mathematical-functions', 'function_radians'),
|
||||
'RAND': Array('mathematical-functions', 'function_rand'),
|
||||
'REGEXP': Array('regexp', 'operator_regexp'),
|
||||
'RELEASE_LOCK': Array('miscellaneous-functions', 'function_release_lock'),
|
||||
'REPEAT': Array('string-functions', 'function_repeat'),
|
||||
'REVERSE': Array('string-functions', 'function_reverse'),
|
||||
'RIGHT': Array('string-functions', 'function_right'),
|
||||
'RLIKE': Array('regexp', 'operator_rlike'),
|
||||
'ROUND': Array('mathematical-functions', 'function_round'),
|
||||
'ROW_COUNT': Array('information-functions', 'function_row_count'),
|
||||
'RPAD': Array('string-functions', 'function_rpad'),
|
||||
'RTRIM': Array('string-functions', 'function_rtrim'),
|
||||
'SCHEMA': Array('information-functions', 'function_schema'),
|
||||
'SEC_TO_TIME': Array('date-and-time-functions', 'function_sec_to_time'),
|
||||
'SECOND': Array('date-and-time-functions', 'function_second'),
|
||||
'SESSION_USER': Array('information-functions', 'function_session_user'),
|
||||
'SHA': Array('encryption-functions', 'function_sha1'),
|
||||
'SHA1': Array('encryption-functions', 'function_sha1'),
|
||||
'SIGN': Array('mathematical-functions', 'function_sign'),
|
||||
'SIN': Array('mathematical-functions', 'function_sin'),
|
||||
'SLEEP': Array('miscellaneous-functions', 'function_sleep'),
|
||||
'SOUNDEX': Array('string-functions', 'function_soundex'),
|
||||
'SPACE': Array('string-functions', 'function_space'),
|
||||
'SQRT': Array('mathematical-functions', 'function_sqrt'),
|
||||
'STD': Array('group-by-functions', 'function_std'),
|
||||
'STDDEV_POP': Array('group-by-functions', 'function_stddev_pop'),
|
||||
'STDDEV_SAMP': Array('group-by-functions', 'function_stddev_samp'),
|
||||
'STDDEV': Array('group-by-functions', 'function_stddev'),
|
||||
'STR_TO_DATE': Array('date-and-time-functions', 'function_str_to_date'),
|
||||
'STRCMP': Array('string-comparison-functions', 'function_strcmp'),
|
||||
'SUBDATE': Array('date-and-time-functions', 'function_subdate'),
|
||||
'SUBSTR': Array('string-functions', 'function_substr'),
|
||||
'SUBSTRING_INDEX': Array('string-functions', 'function_substring_index'),
|
||||
'SUBSTRING': Array('string-functions', 'function_substring'),
|
||||
'SUBTIME': Array('date-and-time-functions', 'function_subtime'),
|
||||
'SUM': Array('group-by-functions', 'function_sum'),
|
||||
'SYSDATE': Array('date-and-time-functions', 'function_sysdate'),
|
||||
'SYSTEM_USER': Array('information-functions', 'function_system_user'),
|
||||
'TAN': Array('mathematical-functions', 'function_tan'),
|
||||
'TIME_FORMAT': Array('date-and-time-functions', 'function_time_format'),
|
||||
'TIME_TO_SEC': Array('date-and-time-functions', 'function_time_to_sec'),
|
||||
'TIME': Array('date-and-time-functions', 'function_time'),
|
||||
'TIMEDIFF': Array('date-and-time-functions', 'function_timediff'),
|
||||
'TIMESTAMP': Array('date-and-time-functions', 'function_timestamp'),
|
||||
'TIMESTAMPADD': Array('date-and-time-functions', 'function_timestampadd'),
|
||||
'TIMESTAMPDIFF': Array('date-and-time-functions', 'function_timestampdiff'),
|
||||
'TO_DAYS': Array('date-and-time-functions', 'function_to_days'),
|
||||
'TRIM': Array('string-functions', 'function_trim'),
|
||||
'TRUNCATE': Array('mathematical-functions', 'function_truncate'),
|
||||
'UCASE': Array('string-functions', 'function_ucase'),
|
||||
'UNCOMPRESS': Array('encryption-functions', 'function_uncompress'),
|
||||
'UNCOMPRESSED_LENGTH': Array('encryption-functions', 'function_uncompressed_length'),
|
||||
'UNHEX': Array('string-functions', 'function_unhex'),
|
||||
'UNIX_TIMESTAMP': Array('date-and-time-functions', 'function_unix_timestamp'),
|
||||
'UpdateXML': Array('xml-functions', 'function_updatexml'),
|
||||
'UPPER': Array('string-functions', 'function_upper'),
|
||||
'USER': Array('information-functions', 'function_user'),
|
||||
'UTC_DATE': Array('date-and-time-functions', 'function_utc_date'),
|
||||
'UTC_TIME': Array('date-and-time-functions', 'function_utc_time'),
|
||||
'UTC_TIMESTAMP': Array('date-and-time-functions', 'function_utc_timestamp'),
|
||||
'UUID_SHORT': Array('miscellaneous-functions', 'function_uuid_short'),
|
||||
'UUID': Array('miscellaneous-functions', 'function_uuid'),
|
||||
'VALUES': Array('miscellaneous-functions', 'function_values'),
|
||||
'VAR_POP': Array('group-by-functions', 'function_var_pop'),
|
||||
'VAR_SAMP': Array('group-by-functions', 'function_var_samp'),
|
||||
'VARIANCE': Array('group-by-functions', 'function_variance'),
|
||||
'VERSION': Array('information-functions', 'function_version'),
|
||||
'WEEK': Array('date-and-time-functions', 'function_week'),
|
||||
'WEEKDAY': Array('date-and-time-functions', 'function_weekday'),
|
||||
'WEEKOFYEAR': Array('date-and-time-functions', 'function_weekofyear'),
|
||||
'XOR': Array('logical-operators', 'operator_xor'),
|
||||
'YEAR': Array('date-and-time-functions', 'function_year'),
|
||||
'YEARWEEK': Array('date-and-time-functions', 'function_yearweek'),
|
||||
'SOUNDS_LIKE': Array('string-functions', 'operator_sounds-like'),
|
||||
'IS_NOT_NULL': Array('comparison-operators', 'operator_is-not-null'),
|
||||
'IS_NOT': Array('comparison-operators', 'operator_is-not'),
|
||||
'IS_NULL': Array('comparison-operators', 'operator_is-null'),
|
||||
'NOT_LIKE': Array('string-comparison-functions', 'operator_not-like'),
|
||||
'NOT_REGEXP': Array('regexp', 'operator_not-regexp'),
|
||||
'COUNT_DISTINCT': Array('group-by-functions', 'function_count-distinct'),
|
||||
'NOT_IN': Array('comparison-operators', 'function_not-in')
|
||||
};
|
||||
|
||||
var mysql_doc_builtin = {
|
||||
'TINYINT': Array('numeric-types'),
|
||||
'SMALLINT': Array('numeric-types'),
|
||||
'MEDIUMINT': Array('numeric-types'),
|
||||
'INT': Array('numeric-types'),
|
||||
'BIGINT': Array('numeric-types'),
|
||||
'DECIMAL': Array('numeric-types'),
|
||||
'FLOAT': Array('numeric-types'),
|
||||
'DOUBLE': Array('numeric-types'),
|
||||
'REAL': Array('numeric-types'),
|
||||
'BIT': Array('numeric-types'),
|
||||
'BOOLEAN': Array('numeric-types'),
|
||||
'SERIAL': Array('numeric-types'),
|
||||
'DATE': Array('date-and-time-types'),
|
||||
'DATETIME': Array('date-and-time-types'),
|
||||
'TIMESTAMP': Array('date-and-time-types'),
|
||||
'TIME': Array('date-and-time-types'),
|
||||
'YEAR': Array('date-and-time-types'),
|
||||
'CHAR': Array('string-types'),
|
||||
'VARCHAR': Array('string-types'),
|
||||
'TINYTEXT': Array('string-types'),
|
||||
'TEXT': Array('string-types'),
|
||||
'MEDIUMTEXT': Array('string-types'),
|
||||
'LONGTEXT': Array('string-types'),
|
||||
'BINARY': Array('string-types'),
|
||||
'VARBINARY': Array('string-types'),
|
||||
'TINYBLOB': Array('string-types'),
|
||||
'MEDIUMBLOB': Array('string-types'),
|
||||
'BLOB': Array('string-types'),
|
||||
'LONGBLOB': Array('string-types'),
|
||||
'ENUM': Array('string-types'),
|
||||
'SET': Array('string-types')
|
||||
};
|
||||
@ -1488,6 +1488,73 @@ function catchKeypressesFromSqlTextboxes(event) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds doc link to single highlighted SQL element
|
||||
*/
|
||||
function PMA_doc_add($elm, params)
|
||||
{
|
||||
var url = $.sprintf(
|
||||
mysql_doc_template,
|
||||
params[0]
|
||||
);
|
||||
if (params.length > 1) {
|
||||
url += '#' + params[1];
|
||||
}
|
||||
var content = $elm.text();
|
||||
$elm.text('');
|
||||
$elm.append('<a target="mysql_doc" class="cm-sql-doc" href="' + url + '">' + content + '</a>');
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates doc links for keywords inside highlighted SQL
|
||||
*/
|
||||
function PMA_doc_keyword(idx, elm)
|
||||
{
|
||||
var $elm = $(elm);
|
||||
/* Skip already processed ones */
|
||||
if ($elm.find('a').length > 0) {
|
||||
return;
|
||||
}
|
||||
var keyword = $elm.text().toUpperCase();
|
||||
var $next = $elm.next('.cm-keyword');
|
||||
if ($next) {
|
||||
var next_keyword = $next.text().toUpperCase();
|
||||
var full = keyword + ' ' + next_keyword;
|
||||
|
||||
var $next2 = $next.next('.cm-keyword');
|
||||
if ($next2) {
|
||||
var next2_keyword = $next2.text().toUpperCase();
|
||||
var full2 = full + ' ' + next2_keyword;
|
||||
if (full2 in mysql_doc_keyword) {
|
||||
PMA_doc_add($elm, mysql_doc_keyword[full2]);
|
||||
PMA_doc_add($next, mysql_doc_keyword[full2]);
|
||||
PMA_doc_add($next2, mysql_doc_keyword[full2]);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (full in mysql_doc_keyword) {
|
||||
PMA_doc_add($elm, mysql_doc_keyword[full]);
|
||||
PMA_doc_add($next, mysql_doc_keyword[full]);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (keyword in mysql_doc_keyword) {
|
||||
PMA_doc_add($elm, mysql_doc_keyword[keyword]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates doc links for builtins inside highlighted SQL
|
||||
*/
|
||||
function PMA_doc_builtin(idx, elm)
|
||||
{
|
||||
var $elm = $(elm);
|
||||
var builtin = $elm.text().toUpperCase();
|
||||
if (builtin in mysql_doc_builtin) {
|
||||
PMA_doc_add($elm, mysql_doc_builtin[builtin]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Higlights SQL using CodeMirror.
|
||||
*/
|
||||
@ -1501,8 +1568,12 @@ function PMA_highlightSQL(base)
|
||||
if ($pre.is(":visible")) {
|
||||
var $highlight = $('<div class="sql-highlight cm-s-default"></div>');
|
||||
$sql.append($highlight);
|
||||
CodeMirror.runMode($sql.text(), 'text/x-mysql', $highlight[0]);
|
||||
$pre.hide();
|
||||
if (typeof CodeMirror != 'undefined') {
|
||||
CodeMirror.runMode($sql.text(), 'text/x-mysql', $highlight[0]);
|
||||
$pre.hide();
|
||||
$highlight.find('.cm-keyword').each(PMA_doc_keyword);
|
||||
$highlight.find('.cm-builtin').each(PMA_doc_builtin);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@ -18,13 +18,18 @@ header('Expires: ' . gmdate('D, d M Y H:i:s', time() + 3600) . ' GMT');
|
||||
// Avoid loading the full common.inc.php because this would add many
|
||||
// non-js-compatible stuff like DOCTYPE
|
||||
define('PMA_MINIMUM_COMMON', true);
|
||||
define('PMA_PATH_TO_BASEDIR', '../');
|
||||
require_once './libraries/common.inc.php';
|
||||
// Close session early as we won't write anything there
|
||||
session_write_close();
|
||||
// But this one is needed for PMA_escapeJsString()
|
||||
require_once './libraries/js_escape.lib.php';
|
||||
require_once './libraries/Util.class.php';
|
||||
|
||||
$js_messages['strNoDropDatabases'] = $cfg['AllowUserDropDatabase'] ? '' : __('"DROP DATABASE" statements are disabled.');
|
||||
$js_messages['strNoDropDatabases'] = __('"DROP DATABASE" statements are disabled.');
|
||||
if ($cfg['AllowUserDropDatabase']) {
|
||||
$js_messages['strNoDropDatabases'] = '';
|
||||
}
|
||||
|
||||
/* For confirmations */
|
||||
$js_messages['strConfirm'] = __('Confirm');
|
||||
@ -296,7 +301,9 @@ $js_messages['strDisplayHelp'] = '<ul><li>'
|
||||
. __('The plot can be resized by dragging it along the bottom right corner.')
|
||||
. '</li></ul>';
|
||||
$js_messages['strInputNull'] = '<strong>' . __('Select two columns') . '</strong>';
|
||||
$js_messages['strSameInputs'] = '<strong>' . __('Select two different columns') . '</strong>';
|
||||
$js_messages['strSameInputs'] = '<strong>'
|
||||
. __('Select two different columns')
|
||||
. '</strong>';
|
||||
$js_messages['strQueryResults'] = __('Query results');
|
||||
$js_messages['strDataPointContent'] = __('Data point content');
|
||||
|
||||
@ -395,6 +402,8 @@ echo "var pmaThemeImage = '" . $GLOBALS['pmaThemeImage'] . "';\n";
|
||||
/* Version */
|
||||
echo "var pmaversion = '" . PMA_VERSION . "';\n";
|
||||
|
||||
echo "var mysql_doc_template = '" . PMA_Util::getMySQLDocuURL('%s') . "';\n";
|
||||
|
||||
echo "if ($.datepicker) {\n";
|
||||
/* l10n: Display text for calendar close link */
|
||||
PMA_printJsValue("$.datepicker.regional['']['closeText']", __('Done'));
|
||||
@ -513,7 +522,10 @@ PMA_printJsValue("$.datepicker.regional['']['weekHeader']", __('Wk'));
|
||||
PMA_printJsValue("$.datepicker.regional['']['showMonthAfterYear']", (__('calendar-month-year') == 'calendar-year-month'));
|
||||
/* l10n: Year suffix for calendar, "none" is empty. */
|
||||
$year_suffix = _pgettext('Year suffix', 'none');
|
||||
PMA_printJsValue("$.datepicker.regional['']['yearSuffix']", ($year_suffix == 'none' ? '' : $year_suffix));
|
||||
PMA_printJsValue(
|
||||
"$.datepicker.regional['']['yearSuffix']",
|
||||
($year_suffix == 'none' ? '' : $year_suffix)
|
||||
);
|
||||
?>
|
||||
$.extend($.datepicker._defaults, $.datepicker.regional['']);
|
||||
} /* if ($.datepicker) */
|
||||
|
||||
@ -242,7 +242,7 @@ class Advisor
|
||||
// linking to server_variables.php
|
||||
$rule['recommendation'] = preg_replace(
|
||||
'/\{([a-z_0-9]+)\}/Ui',
|
||||
'<a href="server_variables.php?' . PMA_generate_common_url()
|
||||
'<a href="server_variables.php?' . PMA_URL_getCommon()
|
||||
. '&filter=\1">\1</a>',
|
||||
$this->translate($rule['recommendation'])
|
||||
);
|
||||
|
||||
@ -419,13 +419,15 @@ class PMA_Config
|
||||
|
||||
$ref_file = $git_folder . '/' . $ref_head;
|
||||
if (@file_exists($ref_file)) {
|
||||
if (! $hash = @file_get_contents($ref_file)) {
|
||||
$hash = @file_get_contents($ref_file);
|
||||
if (! $hash) {
|
||||
return;
|
||||
}
|
||||
$hash = trim($hash);
|
||||
} else {
|
||||
// deal with packed refs
|
||||
if (! $packed_refs = @file_get_contents($git_folder . '/packed-refs')) {
|
||||
$packed_refs = @file_get_contents($git_folder . '/packed-refs');
|
||||
if (! $packed_refs) {
|
||||
return;
|
||||
}
|
||||
// split file to lines
|
||||
@ -470,8 +472,9 @@ class PMA_Config
|
||||
} else {
|
||||
$pack_names = array();
|
||||
// work with packed data
|
||||
if (file_exists($git_folder . '/objects/info/packs')
|
||||
&& $packs = @file_get_contents($git_folder . '/objects/info/packs')
|
||||
$packs_file = $git_folder . '/objects/info/packs';
|
||||
if (file_exists($packs_file)
|
||||
&& $packs = @file_get_contents($packs_file)
|
||||
) {
|
||||
// File exists. Read it, parse the file to get the names of the
|
||||
// packs. (to look for them in .git/object/pack directory later)
|
||||
@ -509,7 +512,10 @@ class PMA_Config
|
||||
$index_name = str_replace('.pack', '.idx', $pack_name);
|
||||
|
||||
// load index
|
||||
if (! $index_data = @file_get_contents($git_folder . '/objects/pack/' . $index_name)) {
|
||||
$index_data = @file_get_contents(
|
||||
$git_folder . '/objects/pack/' . $index_name
|
||||
);
|
||||
if (! $index_data) {
|
||||
continue;
|
||||
}
|
||||
// check format
|
||||
@ -792,11 +798,15 @@ class PMA_Config
|
||||
$cfg = array();
|
||||
|
||||
/**
|
||||
* Parses the configuration file, the eval is used here to avoid
|
||||
* problems with trailing whitespace, what is often a problem.
|
||||
* Parses the configuration file, we throw away any errors or
|
||||
* output.
|
||||
*/
|
||||
$old_error_reporting = error_reporting(0);
|
||||
$eval_result = eval('?' . '>' . trim(file_get_contents($this->getSource())));
|
||||
ob_start();
|
||||
$GLOBALS['pma_config_loading'] = true;
|
||||
$eval_result = include $this->getSource();
|
||||
$GLOBALS['pma_config_loading'] = false;
|
||||
ob_end_clean();
|
||||
error_reporting($old_error_reporting);
|
||||
|
||||
if ($eval_result === false) {
|
||||
@ -1143,13 +1153,12 @@ class PMA_Config
|
||||
$this->checkWebServerOs();
|
||||
if ($this->get('PMA_IS_WINDOWS') == 0) {
|
||||
$this->source_mtime = 0;
|
||||
/* Gettext is possibly still not loaded */
|
||||
if (function_exists('__')) {
|
||||
$msg = __('Wrong permissions on configuration file, should not be world writable!');
|
||||
} else {
|
||||
$msg = 'Wrong permissions on configuration file, should not be world writable!';
|
||||
}
|
||||
PMA_fatalError($msg);
|
||||
PMA_fatalError(
|
||||
__(
|
||||
'Wrong permissions on configuration file, '
|
||||
. 'should not be world writable!'
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1314,12 +1323,12 @@ class PMA_Config
|
||||
$path = dirname($url['path'] . 'a');
|
||||
}
|
||||
|
||||
// To work correctly within transformations overview:
|
||||
if (defined('PMA_PATH_TO_BASEDIR') && PMA_PATH_TO_BASEDIR == '../../') {
|
||||
// To work correctly within javascript
|
||||
if (defined('PMA_PATH_TO_BASEDIR') && PMA_PATH_TO_BASEDIR == '../') {
|
||||
if ($this->get('PMA_IS_WINDOWS') == 1) {
|
||||
$path = str_replace("\\", "/", dirname(dirname($path)));
|
||||
$path = str_replace("\\", "/", dirname($path));
|
||||
} else {
|
||||
$path = dirname(dirname($path));
|
||||
$path = dirname($path);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1738,7 +1747,7 @@ class PMA_Config
|
||||
{
|
||||
return '<form name="form_fontsize_selection" id="form_fontsize_selection"'
|
||||
. ' method="get" action="index.php" class="disableAjax">' . "\n"
|
||||
. PMA_generate_common_hidden_inputs() . "\n"
|
||||
. PMA_URL_getHiddenInputs() . "\n"
|
||||
. PMA_Config::getFontsizeSelection() . "\n"
|
||||
. '</form>';
|
||||
}
|
||||
@ -1826,4 +1835,34 @@ class PMA_Config
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Error handler to catch fatal errors when loading configuration
|
||||
* file
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function PMA_Config_fatalErrorHandler()
|
||||
{
|
||||
if ($GLOBALS['pma_config_loading']) {
|
||||
$error = error_get_last();
|
||||
if ($error !== null) {
|
||||
PMA_fatalError(
|
||||
sprintf(
|
||||
'Failed to load phpMyAdmin configuration (%s:%s): %s',
|
||||
PMA_Error::relPath($error['file']),
|
||||
$error['line'],
|
||||
$error['message']
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!defined('TESTSUITE')) {
|
||||
$GLOBALS['pma_config_loading'] = false;
|
||||
register_shutdown_function('PMA_Config_fatalErrorHandler');
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@ -1304,7 +1304,7 @@ class PMA_DbQbe
|
||||
$url_params['db'] = $this->_db;
|
||||
$url_params['criteriaColumnCount'] = $this->_new_column_count;
|
||||
$url_params['rows'] = $this->_new_row_count;
|
||||
$html_output .= PMA_generate_common_hidden_inputs($url_params);
|
||||
$html_output .= PMA_URL_getHiddenInputs($url_params);
|
||||
$html_output .= '</fieldset>';
|
||||
// get footers
|
||||
$html_output .= $this->_getTableFooters();
|
||||
@ -1312,7 +1312,7 @@ class PMA_DbQbe
|
||||
$html_output .= $this->_getTablesList();
|
||||
$html_output .= '</form>';
|
||||
$html_output .= '<form action="db_qbe.php" method="post">';
|
||||
$html_output .= PMA_generate_common_hidden_inputs(array('db' => $this->_db));
|
||||
$html_output .= PMA_URL_getHiddenInputs(array('db' => $this->_db));
|
||||
// get SQL query
|
||||
$html_output .= '<div class="floatleft">';
|
||||
$html_output .= '<fieldset>';
|
||||
|
||||
@ -2027,7 +2027,7 @@ class PMA_DatabaseInterface
|
||||
*/
|
||||
$error .= ' - ' . $error_message .
|
||||
' (<a href="server_engines.php' .
|
||||
PMA_generate_common_url(
|
||||
PMA_URL_getCommon(
|
||||
array('engine' => 'InnoDB', 'page' => 'Status')
|
||||
) . '">' . __('Details…') . '</a>)';
|
||||
}
|
||||
|
||||
@ -337,15 +337,15 @@ class PMA_DbSearch
|
||||
// Displays browse/delete link if result count > 0
|
||||
if ($res_cnt > 0) {
|
||||
$this_url_params['sql_query'] = $newsearchsqls['select_columns'];
|
||||
$browse_result_path = 'sql.php' . PMA_generate_common_url($this_url_params);
|
||||
$browse_result_path = 'sql.php' . PMA_URL_getCommon($this_url_params);
|
||||
$html_output .= '<td><a name="browse_search" href="'
|
||||
. $browse_result_path . '" onclick="loadResult(\''
|
||||
. $browse_result_path . '\',\'' . $each_table . '\',\''
|
||||
. PMA_generate_common_url($GLOBALS['db'], $each_table) . '\''
|
||||
. PMA_URL_getCommon($GLOBALS['db'], $each_table) . '\''
|
||||
. ');return false;" >'
|
||||
. __('Browse') . '</a></td>';
|
||||
$this_url_params['sql_query'] = $newsearchsqls['delete'];
|
||||
$delete_result_path = 'sql.php' . PMA_generate_common_url($this_url_params);
|
||||
$delete_result_path = 'sql.php' . PMA_URL_getCommon($this_url_params);
|
||||
$html_output .= '<td><a name="delete_search" href="'
|
||||
. $delete_result_path . '" onclick="deleteResult(\''
|
||||
. $delete_result_path . '\' , \''
|
||||
@ -376,7 +376,7 @@ class PMA_DbSearch
|
||||
$html_output .= '<form id="db_search_form"'
|
||||
. ' class="ajax"'
|
||||
. ' method="post" action="db_search.php" name="db_search">';
|
||||
$html_output .= PMA_generate_common_hidden_inputs($GLOBALS['db']);
|
||||
$html_output .= PMA_URL_getHiddenInputs($GLOBALS['db']);
|
||||
$html_output .= '<fieldset>';
|
||||
// set legend caption
|
||||
$html_output .= '<legend>' . __('Search in database') . '</legend>';
|
||||
@ -405,7 +405,7 @@ class PMA_DbSearch
|
||||
),
|
||||
'3' => __('the exact phrase'),
|
||||
'4' => __('as regular expression') . ' '
|
||||
. PMA_Util::showMySQLDocu('Regexp', 'Regexp')
|
||||
. PMA_Util::showMySQLDocu('Regexp')
|
||||
);
|
||||
// 4th parameter set to true to add line breaks
|
||||
// 5th parameter set to false to avoid htmlspecialchars() escaping
|
||||
|
||||
@ -546,7 +546,7 @@ class PMA_DisplayResults
|
||||
|
||||
return '<td>'
|
||||
. '<form action="sql.php" method="post" ' . $onsubmit . '>'
|
||||
. PMA_generate_common_hidden_inputs(
|
||||
. PMA_URL_getHiddenInputs(
|
||||
$this->__get('db'), $this->__get('table')
|
||||
)
|
||||
. '<input type="hidden" name="sql_query" value="'
|
||||
@ -641,7 +641,7 @@ class PMA_DisplayResults
|
||||
//<form> to keep the form alignment of button < and <<
|
||||
// and also to know what to execute when the selector changes
|
||||
$table_navigation_html .= '<form action="sql.php'
|
||||
. PMA_generate_common_url($_url_params)
|
||||
. PMA_URL_getCommon($_url_params)
|
||||
. '" method="post">';
|
||||
|
||||
$table_navigation_html .= PMA_Util::pageselector(
|
||||
@ -733,7 +733,7 @@ class PMA_DisplayResults
|
||||
. ')'
|
||||
.'">';
|
||||
|
||||
$table_navigation_html .= PMA_generate_common_hidden_inputs(
|
||||
$table_navigation_html .= PMA_URL_getHiddenInputs(
|
||||
$this->__get('db'), $this->__get('table')
|
||||
);
|
||||
|
||||
@ -793,7 +793,7 @@ class PMA_DisplayResults
|
||||
return "\n"
|
||||
. '<td>'
|
||||
. '<form action="sql.php" method="post">'
|
||||
. PMA_generate_common_hidden_inputs(
|
||||
. PMA_URL_getHiddenInputs(
|
||||
$this->__get('db'), $this->__get('table')
|
||||
)
|
||||
. '<input type="hidden" name="sql_query" value="'
|
||||
@ -998,7 +998,7 @@ class PMA_DisplayResults
|
||||
$table_headers_html .= '<input id="save_cells_at_once" type="hidden" value="'
|
||||
. $GLOBALS['cfg']['SaveCellsAtOnce'] . '" />'
|
||||
. '<div class="common_hidden_inputs">'
|
||||
. PMA_generate_common_hidden_inputs(
|
||||
. PMA_URL_getHiddenInputs(
|
||||
$this->__get('db'), $this->__get('table')
|
||||
)
|
||||
. '</div>';
|
||||
@ -1219,7 +1219,7 @@ class PMA_DisplayResults
|
||||
$drop_down_html = '';
|
||||
|
||||
$drop_down_html .= '<form action="sql.php" method="post">' . "\n"
|
||||
. PMA_generate_common_hidden_inputs(
|
||||
. PMA_URL_getHiddenInputs(
|
||||
$this->__get('db'), $this->__get('table')
|
||||
)
|
||||
. __('Sort by key')
|
||||
@ -1560,7 +1560,7 @@ class PMA_DisplayResults
|
||||
'display_options_form' => 1
|
||||
);
|
||||
|
||||
$options_html .= PMA_generate_common_hidden_inputs($url_params)
|
||||
$options_html .= PMA_URL_getHiddenInputs($url_params)
|
||||
. '<br />'
|
||||
. PMA_Util::getDivForSliderEffect(
|
||||
'displayoptions', __('Options')
|
||||
@ -1685,7 +1685,7 @@ class PMA_DisplayResults
|
||||
|
||||
$tmp_image = '<img class="fulltext" src="' . $tmp_image_file . '" alt="'
|
||||
. $tmp_txt . '" title="' . $tmp_txt . '" />';
|
||||
$tmp_url = 'sql.php' . PMA_generate_common_url($url_params_full_text);
|
||||
$tmp_url = 'sql.php' . PMA_URL_getCommon($url_params_full_text);
|
||||
|
||||
return PMA_Util::linkOrButton(
|
||||
$tmp_url, $tmp_image, array(), false
|
||||
@ -1718,7 +1718,7 @@ class PMA_DisplayResults
|
||||
$form_html .= ' class="ajax" ';
|
||||
|
||||
$form_html .= '>'
|
||||
. PMA_generate_common_hidden_inputs(
|
||||
. PMA_URL_getHiddenInputs(
|
||||
$this->__get('db'), $this->__get('table'), 1
|
||||
)
|
||||
. '<input type="hidden" name="goto" value="sql.php" />';
|
||||
@ -1872,7 +1872,7 @@ class PMA_DisplayResults
|
||||
'sql_query' => $sorted_sql_query,
|
||||
'session_max_rows' => $session_max_rows
|
||||
);
|
||||
$order_url = 'sql.php' . PMA_generate_common_url($_url_params);
|
||||
$order_url = 'sql.php' . PMA_URL_getCommon($_url_params);
|
||||
|
||||
// Displays the sorting URL
|
||||
// enable sort order swapping for image
|
||||
@ -2749,7 +2749,7 @@ class PMA_DisplayResults
|
||||
$plugin_manager
|
||||
);
|
||||
|
||||
$transform_options = PMA_transformation_getOptions(
|
||||
$transform_options = PMA_Transformation_getOptions(
|
||||
isset($mime_map[$meta->name]
|
||||
['transformation_options']
|
||||
)
|
||||
@ -2779,7 +2779,7 @@ class PMA_DisplayResults
|
||||
}
|
||||
|
||||
$transform_options['wrapper_link']
|
||||
= PMA_generate_common_url($_url_params);
|
||||
= PMA_URL_getCommon($_url_params);
|
||||
|
||||
$vertical_display = $this->__get('vertical_display');
|
||||
|
||||
@ -2789,17 +2789,14 @@ class PMA_DisplayResults
|
||||
&& (trim($row[$i]) != '')
|
||||
) {
|
||||
|
||||
$parsed_sql = PMA_SQP_parse($row[$i]);
|
||||
$row[$i] = PMA_Util::formatSql(
|
||||
$parsed_sql, $row[$i]
|
||||
);
|
||||
$row[$i] = PMA_Util::formatSql($row[$i]);
|
||||
include_once $this->syntax_highlighting_column_info[strtolower($this->__get('db'))][strtolower($this->__get('table'))][strtolower($meta->name)][0];
|
||||
$transformation_plugin = new $this->syntax_highlighting_column_info
|
||||
[strtolower($this->__get('db'))]
|
||||
[strtolower($this->__get('table'))]
|
||||
[strtolower($meta->name)][1](null);
|
||||
|
||||
$transform_options = PMA_transformation_getOptions(
|
||||
$transform_options = PMA_Transformation_getOptions(
|
||||
isset($mime_map[$meta->name]['transformation_options'])
|
||||
? $mime_map[$meta->name]['transformation_options']
|
||||
: ''
|
||||
@ -3116,7 +3113,7 @@ class PMA_DisplayResults
|
||||
}
|
||||
|
||||
return $link_relations['default_page']
|
||||
. PMA_generate_common_url($linking_url_params);
|
||||
. PMA_URL_getCommon($linking_url_params);
|
||||
|
||||
}
|
||||
|
||||
@ -3293,12 +3290,12 @@ class PMA_DisplayResults
|
||||
);
|
||||
|
||||
$edit_url = 'tbl_change.php'
|
||||
. PMA_generate_common_url(
|
||||
. PMA_URL_getCommon(
|
||||
$_url_params + array('default_action' => 'update')
|
||||
);
|
||||
|
||||
$copy_url = 'tbl_change.php'
|
||||
. PMA_generate_common_url(
|
||||
. PMA_URL_getCommon(
|
||||
$_url_params + array('default_action' => 'insert')
|
||||
);
|
||||
|
||||
@ -3352,7 +3349,7 @@ class PMA_DisplayResults
|
||||
'goto' => (empty($goto) ? 'tbl_sql.php' : $goto),
|
||||
);
|
||||
|
||||
$lnk_goto = 'sql.php' . PMA_generate_common_url($_url_params, 'text');
|
||||
$lnk_goto = 'sql.php' . PMA_URL_getCommon($_url_params, 'text');
|
||||
|
||||
$del_query = 'DELETE FROM '
|
||||
. PMA_Util::backquote($this->__get('db')) . '.'
|
||||
@ -3367,7 +3364,7 @@ class PMA_DisplayResults
|
||||
'message_to_show' => __('The row has been deleted'),
|
||||
'goto' => $lnk_goto,
|
||||
);
|
||||
$del_url = 'sql.php' . PMA_generate_common_url($_url_params);
|
||||
$del_url = 'sql.php' . PMA_URL_getCommon($_url_params);
|
||||
|
||||
$js_conf = 'DELETE FROM ' . PMA_jsFormat($this->__get('db')) . '.'
|
||||
. PMA_jsFormat($this->__get('table'))
|
||||
@ -3388,7 +3385,7 @@ class PMA_DisplayResults
|
||||
);
|
||||
|
||||
$lnk_goto = 'sql.php'
|
||||
. PMA_generate_common_url(
|
||||
. PMA_URL_getCommon(
|
||||
$_url_params, 'text'
|
||||
);
|
||||
|
||||
@ -3398,7 +3395,7 @@ class PMA_DisplayResults
|
||||
'goto' => $lnk_goto,
|
||||
);
|
||||
|
||||
$del_url = 'sql.php' . PMA_generate_common_url($_url_params);
|
||||
$del_url = 'sql.php' . PMA_URL_getCommon($_url_params);
|
||||
$del_query = 'KILL ' . $row[0];
|
||||
$js_conf = 'KILL ' . $row[0];
|
||||
$del_str = PMA_Util::getIcon(
|
||||
@ -4877,7 +4874,7 @@ class PMA_DisplayResults
|
||||
$message->addMessage('(');
|
||||
|
||||
if (!$message_view_warning) {
|
||||
$message_total = PMA_Message::notice($precount . __('%d total'));
|
||||
$message_total = PMA_Message::notice($pre_count . __('%d total'));
|
||||
$message_total->addParam($total);
|
||||
|
||||
if (!empty($after_count)) {
|
||||
@ -5163,7 +5160,7 @@ class PMA_DisplayResults
|
||||
'printview' => '1',
|
||||
'sql_query' => $this->__get('sql_query'),
|
||||
);
|
||||
$url_query = PMA_generate_common_url($_url_params);
|
||||
$url_query = PMA_URL_getCommon($_url_params);
|
||||
|
||||
if (!$header_shown) {
|
||||
$results_operations_html .= $header;
|
||||
@ -5205,7 +5202,7 @@ class PMA_DisplayResults
|
||||
|
||||
$results_operations_html
|
||||
.= PMA_Util::linkOrButton(
|
||||
'sql.php' . PMA_generate_common_url($_url_params),
|
||||
'sql.php' . PMA_URL_getCommon($_url_params),
|
||||
PMA_Util::getIcon(
|
||||
'b_print.png',
|
||||
__('Print view (with full texts)'), true
|
||||
@ -5264,7 +5261,7 @@ class PMA_DisplayResults
|
||||
}
|
||||
|
||||
$results_operations_html .= PMA_Util::linkOrButton(
|
||||
'tbl_export.php' . PMA_generate_common_url($_url_params),
|
||||
'tbl_export.php' . PMA_URL_getCommon($_url_params),
|
||||
PMA_Util::getIcon(
|
||||
'b_tblexport.png', __('Export'), true
|
||||
),
|
||||
@ -5277,7 +5274,7 @@ class PMA_DisplayResults
|
||||
|
||||
// prepare chart
|
||||
$results_operations_html .= PMA_Util::linkOrButton(
|
||||
'tbl_chart.php' . PMA_generate_common_url($_url_params),
|
||||
'tbl_chart.php' . PMA_URL_getCommon($_url_params),
|
||||
PMA_Util::getIcon(
|
||||
'b_chart.png', __('Display chart'), true
|
||||
),
|
||||
@ -5302,7 +5299,7 @@ class PMA_DisplayResults
|
||||
$results_operations_html
|
||||
.= PMA_Util::linkOrButton(
|
||||
'tbl_gis_visualization.php'
|
||||
. PMA_generate_common_url($_url_params),
|
||||
. PMA_URL_getCommon($_url_params),
|
||||
PMA_Util::getIcon(
|
||||
'b_globe.gif', __('Visualize GIS data'), true
|
||||
),
|
||||
@ -5417,7 +5414,7 @@ class PMA_DisplayResults
|
||||
/* Create link to download */
|
||||
if (count($url_params) > 0) {
|
||||
$result = '<a href="tbl_get_field.php'
|
||||
. PMA_generate_common_url($url_params)
|
||||
. PMA_URL_getCommon($url_params)
|
||||
. '" class="disableAjax">'
|
||||
. $result . '</a>';
|
||||
}
|
||||
@ -5575,7 +5572,7 @@ class PMA_DisplayResults
|
||||
);
|
||||
|
||||
$result .= '<a class="ajax" href="sql.php'
|
||||
. PMA_generate_common_url($_url_params)
|
||||
. PMA_URL_getCommon($_url_params)
|
||||
. '"' . $title . '>';
|
||||
|
||||
if ($transformation_plugin != $default_function) {
|
||||
@ -5630,7 +5627,7 @@ class PMA_DisplayResults
|
||||
);
|
||||
|
||||
$result .= '<input type="hidden" class="data_browse_link" value="'
|
||||
. PMA_generate_common_url($_url_params_for_show_data_row). '" />';
|
||||
. PMA_URL_getCommon($_url_params_for_show_data_row). '" />';
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -260,7 +260,8 @@ class PMA_Error extends PMA_Message
|
||||
|
||||
foreach ($this->getBacktrace() as $step) {
|
||||
if (isset($step['file']) && isset($step['line'])) {
|
||||
$retval .= PMA_Error::relPath($step['file']) . '#' . $step['line'] . ': ';
|
||||
$retval .= PMA_Error::relPath($step['file'])
|
||||
. '#' . $step['line'] . ': ';
|
||||
}
|
||||
if (isset($step['class'])) {
|
||||
$retval .= $step['class'] . $step['type'];
|
||||
@ -290,8 +291,8 @@ class PMA_Error extends PMA_Message
|
||||
* if $function is one of include/require
|
||||
* the $arg is converted to a relative path
|
||||
*
|
||||
* @param string $arg
|
||||
* @param string $function
|
||||
* @param string $arg argument to process
|
||||
* @param string $function function name
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
@ -381,31 +382,31 @@ class PMA_Error extends PMA_Message
|
||||
$dest = realpath($dest);
|
||||
|
||||
if (substr(PHP_OS, 0, 3) == 'WIN') {
|
||||
$path_separator = '\\';
|
||||
$separator = '\\';
|
||||
} else {
|
||||
$path_separator = '/';
|
||||
$separator = '/';
|
||||
}
|
||||
|
||||
$Ahere = explode(
|
||||
$path_separator,
|
||||
realpath(__DIR__ . $path_separator . '..')
|
||||
$separator,
|
||||
realpath(__DIR__ . $separator . '..')
|
||||
);
|
||||
$Adest = explode($path_separator, $dest);
|
||||
$Adest = explode($separator, $dest);
|
||||
|
||||
$result = '.';
|
||||
// && count ($Adest)>0 && count($Ahere)>0 )
|
||||
while (implode($path_separator, $Adest) != implode($path_separator, $Ahere)) {
|
||||
while (implode($separator, $Adest) != implode($separator, $Ahere)) {
|
||||
if (count($Ahere) > count($Adest)) {
|
||||
array_pop($Ahere);
|
||||
$result .= $path_separator . '..';
|
||||
$result .= $separator . '..';
|
||||
} else {
|
||||
array_pop($Adest);
|
||||
}
|
||||
}
|
||||
$path = $result . str_replace(implode($path_separator, $Adest), '', $dest);
|
||||
$path = $result . str_replace(implode($separator, $Adest), '', $dest);
|
||||
return str_replace(
|
||||
$path_separator . $path_separator,
|
||||
$path_separator,
|
||||
$separator . $separator,
|
||||
$separator,
|
||||
$path
|
||||
);
|
||||
}
|
||||
|
||||
@ -74,9 +74,9 @@ class PMA_Footer
|
||||
include './revision-info.php';
|
||||
$message .= sprintf(
|
||||
__('Currently running Git revision %1$s from the %2$s branch.'),
|
||||
'<a target="_top" href="' . $repobase . $fullrevision . '">'
|
||||
'<a target="_blank" href="' . $repobase . $fullrevision . '">'
|
||||
. $revision .'</a>',
|
||||
'<a target="_top" href="' . $repobranchbase . $branch . '">'
|
||||
'<a target="_blank" href="' . $repobranchbase . $branch . '">'
|
||||
. $branch . '</a>'
|
||||
);
|
||||
} else {
|
||||
@ -128,7 +128,7 @@ class PMA_Footer
|
||||
/**
|
||||
* Returns the url of the current page
|
||||
*
|
||||
* @param mixed $encoding See PMA_generate_common_url()
|
||||
* @param mixed $encoding See PMA_URL_getCommon()
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
@ -137,7 +137,7 @@ class PMA_Footer
|
||||
$db = ! empty($GLOBALS['db']) ? $GLOBALS['db'] : '';
|
||||
$table = ! empty($GLOBALS['table']) ? $GLOBALS['table'] : '';
|
||||
$target = ! empty($_REQUEST['target']) ? $_REQUEST['target'] : '';
|
||||
return basename(PMA_getenv('SCRIPT_NAME')) . PMA_generate_common_url(
|
||||
return basename(PMA_getenv('SCRIPT_NAME')) . PMA_URL_getCommon(
|
||||
array(
|
||||
'db' => $db,
|
||||
'table' => $table,
|
||||
|
||||
@ -174,7 +174,7 @@ class PMA_Header
|
||||
if (isset($GLOBALS['db'])) {
|
||||
$params['db'] = $GLOBALS['db'];
|
||||
}
|
||||
$this->_scripts->addFile('messages.php' . PMA_generate_common_url($params));
|
||||
$this->_scripts->addFile('messages.php' . PMA_URL_getCommon($params));
|
||||
// Append the theme id to this url to invalidate
|
||||
// the cache on a theme change. Though this might be
|
||||
// unavailable for fatal errors.
|
||||
@ -186,6 +186,7 @@ class PMA_Header
|
||||
$this->_scripts->addFile(
|
||||
'get_image.js.php?theme=' . $theme_id
|
||||
);
|
||||
$this->_scripts->addFile('doclinks.js');
|
||||
$this->_scripts->addFile('functions.js');
|
||||
$this->_scripts->addFile('navigation.js');
|
||||
$this->_scripts->addFile('indexes.js');
|
||||
@ -204,7 +205,7 @@ class PMA_Header
|
||||
$db = ! empty($GLOBALS['db']) ? $GLOBALS['db'] : '';
|
||||
$table = ! empty($GLOBALS['table']) ? $GLOBALS['table'] : '';
|
||||
return array(
|
||||
'common_query' => PMA_generate_common_url('', '', '&'),
|
||||
'common_query' => PMA_URL_getCommon('', '', '&'),
|
||||
'opendb_url' => $GLOBALS['cfg']['DefaultTabDatabase'],
|
||||
'safari_browser' => PMA_USR_BROWSER_AGENT == 'SAFARI' ? 1 : 0,
|
||||
'querywindow_height' => $GLOBALS['cfg']['QueryWindowHeight'],
|
||||
@ -393,9 +394,8 @@ class PMA_Header
|
||||
$retval .= $this->_getWarnings();
|
||||
if ($this->_menuEnabled && $GLOBALS['server'] > 0) {
|
||||
$retval .= $this->_menu->getDisplay();
|
||||
$pagetop_link = '<a id="goto_pagetop" href="#" title="%s">%s</a>';
|
||||
$retval .= sprintf(
|
||||
$pagetop_link,
|
||||
'<a id="goto_pagetop" href="#" title="%s">%s</a>',
|
||||
__('Click on the bar to scroll to top of page'),
|
||||
PMA_Util::getImage('s_top.png')
|
||||
);
|
||||
@ -525,7 +525,8 @@ class PMA_Header
|
||||
$retval = "<!DOCTYPE HTML>";
|
||||
$retval .= "<html lang='$lang' dir='$dir' class='";
|
||||
$retval .= strtolower(PMA_USR_BROWSER_AGENT) . " ";
|
||||
$retval .= strtolower(PMA_USR_BROWSER_AGENT) . intval(PMA_USR_BROWSER_VER) . "'>";
|
||||
$retval .= strtolower(PMA_USR_BROWSER_AGENT)
|
||||
. intval(PMA_USR_BROWSER_VER) . "'>";
|
||||
|
||||
return $retval;
|
||||
}
|
||||
@ -559,7 +560,7 @@ class PMA_Header
|
||||
. 'type="image/x-icon" />';
|
||||
// stylesheets
|
||||
$basedir = defined('PMA_PATH_TO_BASEDIR') ? PMA_PATH_TO_BASEDIR : '';
|
||||
$common_url = PMA_generate_common_url(array('server' => $GLOBALS['server']));
|
||||
$common_url = PMA_URL_getCommon(array('server' => $GLOBALS['server']));
|
||||
$theme_id = $GLOBALS['PMA_Config']->getThemeUniqueValue();
|
||||
$theme_path = $GLOBALS['pmaThemePath'];
|
||||
|
||||
@ -665,11 +666,14 @@ class PMA_Header
|
||||
private function _addRecentTable($db, $table)
|
||||
{
|
||||
$retval = '';
|
||||
if ($this->_menuEnabled && strlen($table) && $GLOBALS['cfg']['NumRecentTables'] > 0) {
|
||||
if ($this->_menuEnabled
|
||||
&& strlen($table)
|
||||
&& $GLOBALS['cfg']['NumRecentTables'] > 0
|
||||
) {
|
||||
$tmp_result = PMA_RecentTable::getInstance()->add($db, $table);
|
||||
if ($tmp_result === true) {
|
||||
$params = array('ajax_request' => true, 'recent_table' => true);
|
||||
$url = 'index.php' . PMA_generate_common_url($params);
|
||||
$url = 'index.php' . PMA_URL_getCommon($params);
|
||||
$retval = '<a class="hide" id="update_recent_tables"';
|
||||
$retval .= ' href="' . $url . '"></a>';
|
||||
} else {
|
||||
|
||||
@ -10,6 +10,7 @@ if (! defined('PHPMYADMIN')) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Index manipulation class
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
* @since phpMyAdmin 3.0.0
|
||||
@ -534,9 +535,7 @@ class PMA_Index
|
||||
if (! $print_mode) {
|
||||
$r = '<fieldset class="index_info">';
|
||||
$r .= '<legend id="index_header">' . __('Indexes');
|
||||
$r .= PMA_Util::showMySQLDocu(
|
||||
'optimization', 'optimizing-database-structure'
|
||||
);
|
||||
$r .= PMA_Util::showMySQLDocu('optimizing-database-structure');
|
||||
|
||||
$r .= '</legend>';
|
||||
$r .= $no_indexes;
|
||||
@ -587,7 +586,7 @@ class PMA_Index
|
||||
$r .= '" ' . $row_span . '>'
|
||||
. ' <a class="';
|
||||
$r .= 'ajax';
|
||||
$r .= '" href="tbl_indexes.php' . PMA_generate_common_url($this_params)
|
||||
$r .= '" href="tbl_indexes.php' . PMA_URL_getCommon($this_params)
|
||||
. '">' . PMA_Util::getIcon('b_edit.png', __('Edit')) . '</a>'
|
||||
. '</td>' . "\n";
|
||||
$this_params = $GLOBALS['url_params'];
|
||||
@ -620,7 +619,7 @@ class PMA_Index
|
||||
. ' value="' . $js_msg . '" />';
|
||||
$r .= ' <a class="drop_primary_key_index_anchor';
|
||||
$r .= ' ajax';
|
||||
$r .= '" href="sql.php' . PMA_generate_common_url($this_params)
|
||||
$r .= '" href="sql.php' . PMA_URL_getCommon($this_params)
|
||||
. '" >'
|
||||
. PMA_Util::getIcon('b_drop.png', __('Drop')) . '</a>'
|
||||
. '</td>' . "\n";
|
||||
@ -749,6 +748,8 @@ class PMA_Index
|
||||
}
|
||||
|
||||
/**
|
||||
* Index column wrapper
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
class PMA_Index_Column
|
||||
|
||||
@ -10,6 +10,8 @@ if (! defined('PHPMYADMIN')) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Generic list class
|
||||
*
|
||||
* @todo add caching
|
||||
* @abstract
|
||||
* @package PhpMyAdmin
|
||||
@ -22,8 +24,9 @@ abstract class PMA_List extends ArrayObject
|
||||
*/
|
||||
protected $item_empty = '';
|
||||
|
||||
public function __construct($array = array(), $flags = 0, $iterator_class = "ArrayIterator")
|
||||
{
|
||||
public function __construct(
|
||||
$array = array(), $flags = 0, $iterator_class = "ArrayIterator"
|
||||
) {
|
||||
parent::__construct($array, $flags, $iterator_class);
|
||||
}
|
||||
|
||||
@ -78,8 +81,9 @@ abstract class PMA_List extends ArrayObject
|
||||
*
|
||||
* @return string HTML option tags
|
||||
*/
|
||||
public function getHtmlOptions($selected = '', $include_information_schema = true)
|
||||
{
|
||||
public function getHtmlOptions(
|
||||
$selected = '', $include_information_schema = true
|
||||
) {
|
||||
if (true === $selected) {
|
||||
$selected = $this->getDefault();
|
||||
}
|
||||
|
||||
@ -123,7 +123,9 @@ class PMA_List_Database extends PMA_List
|
||||
$command = $this->command;
|
||||
}
|
||||
|
||||
$database_list = $GLOBALS['dbi']->fetchResult($command, null, null, $this->db_link);
|
||||
$database_list = $GLOBALS['dbi']->fetchResult(
|
||||
$command, null, null, $this->db_link
|
||||
);
|
||||
$GLOBALS['dbi']->getError();
|
||||
|
||||
if ($GLOBALS['errno'] !== 0) {
|
||||
@ -137,9 +139,9 @@ class PMA_List_Database extends PMA_List
|
||||
$GLOBALS['dbi']->getError();
|
||||
|
||||
if ($GLOBALS['errno'] !== 0) {
|
||||
// failed! we will display a warning that phpMyAdmin could not safely
|
||||
// retrieve database list, the admin has to setup a control user or
|
||||
// allow SHOW DATABASES
|
||||
// failed! we will display a warning that phpMyAdmin could not
|
||||
// safely retrieve database list, the admin has to setup a control
|
||||
// user or allow SHOW DATABASES
|
||||
$GLOBALS['error_showdatabases'] = true;
|
||||
$this->show_databases_disabled = true;
|
||||
}
|
||||
@ -244,7 +246,9 @@ class PMA_List_Database extends PMA_List
|
||||
SELECT DISTINCT `Db` FROM `mysql`.`db`
|
||||
WHERE `Select_priv` = 'Y'
|
||||
AND `User`
|
||||
IN ('" . PMA_Util::sqlAddSlashes($GLOBALS['cfg']['Server']['user']) . "', '')";
|
||||
IN ('"
|
||||
. PMA_Util::sqlAddSlashes($GLOBALS['cfg']['Server']['user'])
|
||||
. "', '')";
|
||||
$tmp_mydbs = $GLOBALS['dbi']->fetchResult(
|
||||
$local_query, null, null, $GLOBALS['controllink']
|
||||
);
|
||||
@ -260,7 +264,9 @@ class PMA_List_Database extends PMA_List
|
||||
// populating $dblist[], as previous code did. But it is
|
||||
// now populated with actual database names instead of
|
||||
// with regular expressions.
|
||||
$tmp_alldbs = $GLOBALS['dbi']->query('SHOW DATABASES;', $GLOBALS['controllink']);
|
||||
$tmp_alldbs = $GLOBALS['dbi']->query(
|
||||
'SHOW DATABASES;', $GLOBALS['controllink']
|
||||
);
|
||||
// all databases cases - part 2
|
||||
if (isset($tmp_mydbs['%'])) {
|
||||
while ($tmp_row = $GLOBALS['dbi']->fetchRow($tmp_alldbs)) {
|
||||
@ -287,9 +293,8 @@ class PMA_List_Database extends PMA_List
|
||||
$tmp_matchpattern
|
||||
)
|
||||
);
|
||||
// Fixed db name matching
|
||||
// 2000-08-28 -- Benjamin Gandon
|
||||
if (preg_match('/^' . addcslashes($tmp_regex, '/') . '$/', $tmp_db)) {
|
||||
$tmp_regex = '/^' . addcslashes($tmp_regex, '/') . '$/';
|
||||
if (preg_match($tmp_regex, $tmp_db)) {
|
||||
$dblist[] = $tmp_db;
|
||||
break;
|
||||
}
|
||||
@ -305,8 +310,10 @@ class PMA_List_Database extends PMA_List
|
||||
$local_query = 'SELECT DISTINCT `Db` FROM `mysql`.`tables_priv`';
|
||||
$local_query .= ' WHERE `Table_priv` LIKE \'%Select%\'';
|
||||
$local_query .= ' AND `User` = \'';
|
||||
$local_query .= PMA_Util::sqlAddSlashes($GLOBALS['cfg']['Server']['user']) . '\'';
|
||||
$rs = $GLOBALS['dbi']->tryQuery($local_query, $GLOBALS['controllink']);
|
||||
$local_query .= PMA_Util::sqlAddSlashes(
|
||||
$GLOBALS['cfg']['Server']['user']
|
||||
) . '\'';
|
||||
$rs = $GLOBALS['dbi']->tryQuery($local_query, $GLOBALS['controllink']);
|
||||
if ($rs && @$GLOBALS['dbi']->numRows($rs)) {
|
||||
while ($row = $GLOBALS['dbi']->fetchAssoc($rs)) {
|
||||
if (!in_array($row['Db'], $dblist)) {
|
||||
|
||||
@ -135,7 +135,8 @@ class PMA_Menu
|
||||
$cfgRelation = PMA_getRelationsParam();
|
||||
if ($cfgRelation['menuswork']) {
|
||||
$groupTable = PMA_Util::backquote($GLOBALS['cfg']['Server']['pmadb'])
|
||||
. "." . PMA_Util::backquote($GLOBALS['cfg']['Server']['usergroups']);
|
||||
. "."
|
||||
. PMA_Util::backquote($GLOBALS['cfg']['Server']['usergroups']);
|
||||
$userTable = PMA_Util::backquote($GLOBALS['cfg']['Server']['pmadb'])
|
||||
. "." . PMA_Util::backquote($GLOBALS['cfg']['Server']['users']);
|
||||
|
||||
@ -194,7 +195,7 @@ class PMA_Menu
|
||||
$retval .= sprintf(
|
||||
$item,
|
||||
$GLOBALS['cfg']['DefaultTabServer'],
|
||||
PMA_generate_common_url(),
|
||||
PMA_URL_getCommon(),
|
||||
htmlspecialchars($server_info),
|
||||
__('Server')
|
||||
);
|
||||
@ -211,7 +212,7 @@ class PMA_Menu
|
||||
$retval .= sprintf(
|
||||
$item,
|
||||
$GLOBALS['cfg']['DefaultTabDatabase'],
|
||||
PMA_generate_common_url($this->_db),
|
||||
PMA_URL_getCommon($this->_db),
|
||||
htmlspecialchars($this->_db),
|
||||
__('Database')
|
||||
);
|
||||
@ -234,7 +235,7 @@ class PMA_Menu
|
||||
$retval .= sprintf(
|
||||
$item,
|
||||
$GLOBALS['cfg']['DefaultTabTable'],
|
||||
PMA_generate_common_url($this->_db, $this->_table),
|
||||
PMA_URL_getCommon($this->_db, $this->_table),
|
||||
str_replace(' ', ' ', htmlspecialchars($this->_table)),
|
||||
$tbl_is_view ? __('View') : __('Table')
|
||||
);
|
||||
|
||||
@ -36,6 +36,7 @@ class PMA_PDF extends TCPDF
|
||||
* @param string $encoding charset encoding; default is UTF-8.
|
||||
* @param boolean $diskcache if true reduce the RAM memory usage by caching
|
||||
* temporary data on filesystem (slower).
|
||||
* @param boolean $pdfa If TRUE set the document to PDF/A mode.
|
||||
*
|
||||
* @return void
|
||||
* @access public
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
* Recent table list handling
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
@ -44,6 +45,11 @@ class PMA_RecentTable
|
||||
*/
|
||||
private static $_instance;
|
||||
|
||||
/**
|
||||
* Creates a new instance of PMA_RecentTable
|
||||
*
|
||||
* @return New PMA_RecentTable
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
if (strlen($GLOBALS['cfg']['Server']['pmadb'])
|
||||
@ -118,7 +124,9 @@ class PMA_RecentTable
|
||||
$message = PMA_Message::error(__('Could not save recent table'));
|
||||
$message->addMessage('<br /><br />');
|
||||
$message->addMessage(
|
||||
PMA_Message::rawError($GLOBALS['dbi']->getError($GLOBALS['controllink']))
|
||||
PMA_Message::rawError(
|
||||
$GLOBALS['dbi']->getError($GLOBALS['controllink'])
|
||||
)
|
||||
);
|
||||
return $message;
|
||||
}
|
||||
|
||||
@ -55,7 +55,9 @@ class PMA_Scripts
|
||||
foreach ($files as $value) {
|
||||
if (strpos($value['filename'], "?") === false) {
|
||||
$include = true;
|
||||
if ($value['conditional_ie'] !== false && PMA_USR_BROWSER_AGENT === 'IE') {
|
||||
if ($value['conditional_ie'] !== false
|
||||
&& PMA_USR_BROWSER_AGENT === 'IE'
|
||||
) {
|
||||
if ($value['conditional_ie'] === true) {
|
||||
$include = true;
|
||||
} else if ($value['conditional_ie'] == PMA_USR_BROWSER_VER) {
|
||||
@ -68,11 +70,13 @@ class PMA_Scripts
|
||||
$params[] = "scripts[]=" . $value['filename'];
|
||||
}
|
||||
} else {
|
||||
$dynamic_scripts .= "<script type='text/javascript' src='js/" . $value['filename'] . "'></script>";
|
||||
$dynamic_scripts .= "<script type='text/javascript' src='js/"
|
||||
. $value['filename'] . "'></script>";
|
||||
}
|
||||
}
|
||||
$static_scripts = sprintf(
|
||||
"<script type='text/javascript' src='js/get_scripts.js.php?%s'></script>",
|
||||
'<script type="text/javascript" '
|
||||
. 'src="js/get_scripts.js.php?%s"></script>',
|
||||
implode("&", $params)
|
||||
);
|
||||
return $static_scripts . $dynamic_scripts;
|
||||
|
||||
@ -6,9 +6,9 @@
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
if (!defined('TESTSUITE')) {
|
||||
//the TESTSUITE has already included common.inc.php
|
||||
require_once 'libraries/common.inc.php';
|
||||
|
||||
if (! defined('PHPMYADMIN')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -71,7 +71,9 @@ class PMA_ServerStatusData
|
||||
/**
|
||||
* for some calculations we require also some server settings
|
||||
*/
|
||||
$server_variables = $GLOBALS['dbi']->fetchResult('SHOW GLOBAL VARIABLES', 0, 1);
|
||||
$server_variables = $GLOBALS['dbi']->fetchResult(
|
||||
'SHOW GLOBAL VARIABLES', 0, 1
|
||||
);
|
||||
|
||||
/**
|
||||
* cleanup of some deprecated values
|
||||
@ -207,17 +209,28 @@ class PMA_ServerStatusData
|
||||
// variable or section name => (name => url)
|
||||
$links = array();
|
||||
|
||||
$links['table'][__('Flush (close) all tables')]
|
||||
= $this->selfUrl . '?flush=TABLES&' . PMA_generate_common_url();
|
||||
$links['table'][__('Flush (close) all tables')] = $this->selfUrl
|
||||
. PMA_URL_getCommon(
|
||||
array(
|
||||
'flush' => 'TABLES'
|
||||
)
|
||||
);
|
||||
$links['table'][__('Show open tables')]
|
||||
= 'sql.php?sql_query=' . urlencode('SHOW OPEN TABLES') .
|
||||
'&goto=' . $this->selfUrl . '&' . PMA_generate_common_url();
|
||||
= 'sql.php' . PMA_URL_getCommon(
|
||||
array(
|
||||
'sql_query' => 'SHOW OPEN TABLES',
|
||||
'goto' => $this->selfUrl,
|
||||
)
|
||||
);
|
||||
|
||||
if ($GLOBALS['server_master_status']) {
|
||||
$links['repl'][__('Show slave hosts')]
|
||||
= 'sql.php?sql_query=' . urlencode('SHOW SLAVE HOSTS')
|
||||
. '&goto=' . $this->selfUrl . '&'
|
||||
. PMA_generate_common_url();
|
||||
= 'sql.php' . PMA_URL_getCommon(
|
||||
array(
|
||||
'sql_query' => 'SHOW SLAVE HOSTS',
|
||||
'goto' => $this->selfUrl,
|
||||
)
|
||||
);
|
||||
$links['repl'][__('Show master status')] = '#replication_master';
|
||||
}
|
||||
if ($GLOBALS['server_slave_status']) {
|
||||
@ -227,8 +240,12 @@ class PMA_ServerStatusData
|
||||
$links['repl']['doc'] = 'replication';
|
||||
|
||||
$links['qcache'][__('Flush query cache')]
|
||||
= $this->selfUrl . '?flush=' . urlencode('QUERY CACHE') . '&' .
|
||||
PMA_generate_common_url();
|
||||
= $this->selfUrl
|
||||
. PMA_URL_getCommon(
|
||||
array(
|
||||
'flush' => 'QUERY CACHE'
|
||||
)
|
||||
);
|
||||
$links['qcache']['doc'] = 'query_cache';
|
||||
|
||||
$links['threads']['doc'] = 'mysql_threads';
|
||||
@ -240,10 +257,15 @@ class PMA_ServerStatusData
|
||||
$links['Slow_queries']['doc'] = 'slow_query_log';
|
||||
|
||||
$links['innodb'][__('Variables')]
|
||||
= 'server_engines.php?engine=InnoDB&' . PMA_generate_common_url();
|
||||
= 'server_engines.php?engine=InnoDB&' . PMA_URL_getCommon();
|
||||
$links['innodb'][__('InnoDB Status')]
|
||||
= 'server_engines.php?engine=InnoDB&page=Status&' .
|
||||
PMA_generate_common_url();
|
||||
= 'server_engines.php'
|
||||
. PMA_URL_getCommon(
|
||||
array(
|
||||
'engine' => 'InnoDB',
|
||||
'page' => 'Status'
|
||||
)
|
||||
);
|
||||
$links['innodb']['doc'] = 'innodb';
|
||||
|
||||
|
||||
@ -336,7 +358,7 @@ class PMA_ServerStatusData
|
||||
*/
|
||||
public function getMenuHtml()
|
||||
{
|
||||
$url_params = PMA_generate_common_url();
|
||||
$url_params = PMA_URL_getCommon();
|
||||
$items = array(
|
||||
array(
|
||||
'name' => __('Server'),
|
||||
|
||||
@ -593,7 +593,9 @@ class PMA_Table
|
||||
// Make an exception for views in I_S and D_D schema in
|
||||
// Drizzle, as these map to in-memory data and should execute
|
||||
// fast enough
|
||||
if (! $is_view || (PMA_DRIZZLE && $GLOBALS['dbi']->isSystemSchema($db))) {
|
||||
if (! $is_view
|
||||
|| (PMA_DRIZZLE && $GLOBALS['dbi']->isSystemSchema($db))
|
||||
) {
|
||||
$row_count = $GLOBALS['dbi']->fetchValue(
|
||||
'SELECT COUNT(*) FROM ' . PMA_Util::backquote($db) . '.'
|
||||
. PMA_Util::backquote($table)
|
||||
|
||||
@ -235,7 +235,7 @@ class PMA_TableSearch
|
||||
. ' size="40" class="textfield" id="field_' . $column_index . '" />';
|
||||
|
||||
if ($in_fbs) {
|
||||
$edit_url = 'gis_data_editor.php?' . PMA_generate_common_url();
|
||||
$edit_url = 'gis_data_editor.php?' . PMA_URL_getCommon();
|
||||
$edit_str = PMA_Util::getIcon('b_edit.png', __('Edit/Insert'));
|
||||
$html_output .= '<span class="open_search_gis_editor">';
|
||||
$html_output .= PMA_Util::linkOrButton(
|
||||
@ -288,9 +288,9 @@ class PMA_TableSearch
|
||||
$html_output .= <<<EOT
|
||||
<a target="_blank" onclick="window.open(this.href, 'foreigners', 'width=640,height=240,scrollbars=yes'); return false" href="browse_foreigners.php?
|
||||
EOT;
|
||||
$html_output .= '' . PMA_generate_common_url($this->_db, $this->_table)
|
||||
$html_output .= '' . PMA_URL_getCommon($this->_db, $this->_table)
|
||||
. '&field=' . urlencode($column_name) . '&fieldkey='
|
||||
. $column_index . '"';
|
||||
. $column_index . '&fromsearch=1"';
|
||||
if ($in_zoom_search_edit) {
|
||||
$html_output .= ' class="browse_foreign"';
|
||||
}
|
||||
@ -789,9 +789,7 @@ EOT;
|
||||
$html_output .= '<fieldset id="fieldset_search_conditions">'
|
||||
. '<legend>' . '<em>' . __('Or') . '</em> '
|
||||
. __('Add search conditions (body of the "where" clause):') . '</legend>';
|
||||
$html_output .= PMA_Util::showMySQLDocu(
|
||||
'SQL-Syntax', 'Functions'
|
||||
);
|
||||
$html_output .= PMA_Util::showMySQLDocu('Functions');
|
||||
$html_output .= '<input type="text" name="customWhereClause"'
|
||||
. ' class="textfield" size="64" />';
|
||||
$html_output .= '</fieldset>';
|
||||
@ -1104,7 +1102,7 @@ EOT;
|
||||
. 'name="insertForm" id="' . $formId . '" '
|
||||
. 'class="ajax"' . '>';
|
||||
|
||||
$html_output .= PMA_generate_common_hidden_inputs($this->_db, $this->_table);
|
||||
$html_output .= PMA_URL_getHiddenInputs($this->_db, $this->_table);
|
||||
$html_output .= '<input type="hidden" name="goto" value="' . $goto . '" />';
|
||||
$html_output .= '<input type="hidden" name="back" value="' . $scriptName
|
||||
. '" />';
|
||||
@ -1204,7 +1202,7 @@ EOT;
|
||||
$html_output .= '<form method="post" action="tbl_zoom_select.php"'
|
||||
. ' name="displayResultForm" id="zoom_display_form"'
|
||||
. ' class="ajax"' . '>';
|
||||
$html_output .= PMA_generate_common_hidden_inputs($this->_db, $this->_table);
|
||||
$html_output .= PMA_URL_getHiddenInputs($this->_db, $this->_table);
|
||||
$html_output .= '<input type="hidden" name="goto" value="' . $goto . '" />';
|
||||
$html_output .= '<input type="hidden" name="back" value="tbl_zoom_select.php" />';
|
||||
|
||||
@ -1328,7 +1326,7 @@ EOT;
|
||||
|
||||
$htmlOutput = '<form method="post" action="tbl_find_replace.php"'
|
||||
. ' name="previewForm" id="previewForm" class="ajax">';
|
||||
$htmlOutput .= PMA_generate_common_hidden_inputs($this->_db, $this->_table);
|
||||
$htmlOutput .= PMA_URL_getHiddenInputs($this->_db, $this->_table);
|
||||
$htmlOutput .= '<input type="hidden" name="replace" value="true" />';
|
||||
$htmlOutput .= '<input type="hidden" name="columnIndex" value="'
|
||||
. $columnIndex . '" />';
|
||||
|
||||
@ -333,61 +333,6 @@ class PMA_Theme
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Builds a CSS rule used for html formatted SQL queries
|
||||
*
|
||||
* @param string $classname The class name
|
||||
* @param string $property The property name
|
||||
* @param string $value The property value
|
||||
*
|
||||
* @return string The CSS rule
|
||||
*
|
||||
* @access public
|
||||
*
|
||||
* @see PMA_SQP_buildCssData()
|
||||
*/
|
||||
public function buildSQPCssRule($classname, $property, $value)
|
||||
{
|
||||
$str = '.' . $classname . ' {';
|
||||
if ($value != '') {
|
||||
$str .= $property . ': ' . $value . ';';
|
||||
}
|
||||
$str .= '}' . "\n";
|
||||
|
||||
return $str;
|
||||
} // end of the "PMA_SQP_buildCssRule()" function
|
||||
|
||||
|
||||
/**
|
||||
* Builds CSS rules used for html formatted SQL queries
|
||||
*
|
||||
* @return string The CSS rules set
|
||||
*
|
||||
* @access public
|
||||
*
|
||||
* @global array The current PMA configuration
|
||||
*
|
||||
* @see PMA_SQP_buildCssRule()
|
||||
*/
|
||||
public function buildSQPCssData()
|
||||
{
|
||||
global $cfg;
|
||||
|
||||
$css_string = '';
|
||||
foreach ($cfg['SQP']['fmtColor'] as $key => $col) {
|
||||
$css_string .= $this->buildSQPCssRule('syntax_' . $key, 'color', $col);
|
||||
}
|
||||
|
||||
for ($i = 0; $i < 8; $i++) {
|
||||
$css_string .= $this->buildSQPCssRule(
|
||||
'syntax_indent' . $i, 'margin-left',
|
||||
($i * $cfg['SQP']['fmtInd']) . $cfg['SQP']['fmtIndUnit']
|
||||
);
|
||||
}
|
||||
|
||||
return $css_string;
|
||||
} // end of the "PMA_SQP_buildCssData()" function
|
||||
|
||||
/**
|
||||
* load css (send to stdout, normally the browser)
|
||||
*
|
||||
@ -398,8 +343,6 @@ class PMA_Theme
|
||||
{
|
||||
$success = true;
|
||||
|
||||
echo $this->buildSQPCssData();
|
||||
|
||||
if ($GLOBALS['text_dir'] === 'ltr') {
|
||||
$right = 'right';
|
||||
$left = 'left';
|
||||
@ -438,7 +381,7 @@ class PMA_Theme
|
||||
public function getPrintPreview()
|
||||
{
|
||||
$url_params = array('set_theme' => $this->getId());
|
||||
$url = 'index.php'. PMA_generate_common_url($url_params);
|
||||
$url = 'index.php'. PMA_URL_getCommon($url_params);
|
||||
|
||||
$retval = '<div class="theme_preview">';
|
||||
$retval .= '<h2>';
|
||||
@ -538,64 +481,5 @@ class PMA_Theme
|
||||
}
|
||||
return implode("\n", $result);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns CSS styles for CodeMirror editor based on query formatter colors.
|
||||
*
|
||||
* @return string CSS code.
|
||||
*/
|
||||
function getCssCodeMirror()
|
||||
{
|
||||
if (! $GLOBALS['cfg']['CodemirrorEnable']) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$result[] = 'span.cm-keyword, span.cm-statement-verb {';
|
||||
$result[] = ' color: '
|
||||
. $GLOBALS['cfg']['SQP']['fmtColor']['alpha_reservedWord'] . ';';
|
||||
$result[] = '}';
|
||||
$result[] = 'span.cm-variable {';
|
||||
$result[] = ' color: '
|
||||
. $GLOBALS['cfg']['SQP']['fmtColor']['alpha_identifier'] . ';';
|
||||
$result[] = '}';
|
||||
$result[] = 'span.cm-comment {';
|
||||
$result[] = ' color: '
|
||||
. $GLOBALS['cfg']['SQP']['fmtColor']['comment'] . ';';
|
||||
$result[] = '}';
|
||||
$result[] = 'span.cm-mysql-string {';
|
||||
$result[] = ' color: '
|
||||
. $GLOBALS['cfg']['SQP']['fmtColor']['quote'] . ';';
|
||||
$result[] = '}';
|
||||
$result[] = 'span.cm-operator {';
|
||||
$result[] = ' color: '
|
||||
. $GLOBALS['cfg']['SQP']['fmtColor']['punct'] . ';';
|
||||
$result[] = '}';
|
||||
$result[] = 'span.cm-mysql-word {';
|
||||
$result[] = ' color: '
|
||||
. $GLOBALS['cfg']['SQP']['fmtColor']['alpha_identifier'] . ';';
|
||||
$result[] = '}';
|
||||
$result[] = 'span.cm-builtin {';
|
||||
$result[] = ' color: '
|
||||
. $GLOBALS['cfg']['SQP']['fmtColor']['alpha_functionName'] . ';';
|
||||
$result[] = '}';
|
||||
$result[] = 'span.cm-variable-2 {';
|
||||
$result[] = ' color: '
|
||||
. $GLOBALS['cfg']['SQP']['fmtColor']['alpha_columnType'] . ';';
|
||||
$result[] = '}';
|
||||
$result[] = 'span.cm-variable-3 {';
|
||||
$result[] = ' color: '
|
||||
. $GLOBALS['cfg']['SQP']['fmtColor']['alpha_columnAttrib'] . ';';
|
||||
$result[] = '}';
|
||||
$result[] = 'span.cm-separator {';
|
||||
$result[] = ' color: '
|
||||
. $GLOBALS['cfg']['SQP']['fmtColor']['punct'] . ';';
|
||||
$result[] = '}';
|
||||
$result[] = 'span.cm-number {';
|
||||
$result[] = ' color: '
|
||||
. $GLOBALS['cfg']['SQP']['fmtColor']['digit_integer'] . ';';
|
||||
$result[] = '}';
|
||||
|
||||
return implode("\n", $result);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
* phpMyAdmin theme manager
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
@ -9,6 +10,7 @@ if (! defined('PHPMYADMIN')) {
|
||||
}
|
||||
|
||||
/**
|
||||
* phpMyAdmin theme manager
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
@ -98,7 +100,7 @@ class PMA_Theme_Manager
|
||||
/**
|
||||
* sets if there are different themes per server
|
||||
*
|
||||
* @param boolean $per_server
|
||||
* @param boolean $per_server Whether to enable per server flag
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
@ -209,6 +211,7 @@ class PMA_Theme_Manager
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns name for storing theme
|
||||
*
|
||||
* @return string cookie name
|
||||
* @access public
|
||||
@ -258,7 +261,9 @@ class PMA_Theme_Manager
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $folder
|
||||
* Checks whether folder is valid for storing themes
|
||||
*
|
||||
* @param string $folder Folder name to test
|
||||
*
|
||||
* @return boolean
|
||||
* @access private
|
||||
@ -313,7 +318,8 @@ class PMA_Theme_Manager
|
||||
closedir($handleThemes);
|
||||
} else {
|
||||
trigger_error(
|
||||
'phpMyAdmin-ERROR: cannot open themes folder: ' . $this->getThemesPath(),
|
||||
'phpMyAdmin-ERROR: cannot open themes folder: '
|
||||
. $this->getThemesPath(),
|
||||
E_USER_WARNING
|
||||
);
|
||||
return false;
|
||||
@ -355,20 +361,23 @@ class PMA_Theme_Manager
|
||||
if ($form) {
|
||||
$select_box .= '<form name="setTheme" method="get"';
|
||||
$select_box .= ' action="index.php" class="disableAjax">';
|
||||
$select_box .= PMA_generate_common_hidden_inputs();
|
||||
$select_box .= PMA_URL_getHiddenInputs();
|
||||
}
|
||||
|
||||
$theme_preview_path= './themes.php';
|
||||
$theme_preview_href = '<a href="' . $theme_preview_path . '" target="themes" class="themeselect">';
|
||||
$theme_preview_href = '<a href="'
|
||||
. $theme_preview_path . '" target="themes" class="themeselect">';
|
||||
$select_box .= $theme_preview_href . __('Theme:') . '</a>' . "\n";
|
||||
|
||||
$select_box .= '<select name="set_theme" lang="en" dir="ltr" class="autosubmit">';
|
||||
$select_box .= '<select name="set_theme" lang="en" dir="ltr"'
|
||||
. ' class="autosubmit">';
|
||||
foreach ($this->themes as $each_theme_id => $each_theme) {
|
||||
$select_box .= '<option value="' . $each_theme_id . '"';
|
||||
if ($this->active_theme === $each_theme_id) {
|
||||
$select_box .= ' selected="selected"';
|
||||
}
|
||||
$select_box .= '>' . htmlspecialchars($each_theme->getName()) . '</option>';
|
||||
$select_box .= '>' . htmlspecialchars($each_theme->getName())
|
||||
. '</option>';
|
||||
}
|
||||
$select_box .= '</select>';
|
||||
|
||||
|
||||
@ -332,9 +332,8 @@ class PMA_Tracker
|
||||
'" . PMA_Util::sqlAddSlashes($snapshot) . "',
|
||||
'" . PMA_Util::sqlAddSlashes($create_sql) . "',
|
||||
'" . PMA_Util::sqlAddSlashes("\n") . "',
|
||||
'" . PMA_Util::sqlAddSlashes(
|
||||
self::_transformTrackingSet($tracking_set)
|
||||
) . "' )";
|
||||
'" . PMA_Util::sqlAddSlashes(self::_transformTrackingSet($tracking_set))
|
||||
. "' )";
|
||||
|
||||
$result = PMA_queryAsControlUser($sql_query);
|
||||
|
||||
@ -423,9 +422,8 @@ class PMA_Tracker
|
||||
'" . PMA_Util::sqlAddSlashes('') . "',
|
||||
'" . PMA_Util::sqlAddSlashes($create_sql) . "',
|
||||
'" . PMA_Util::sqlAddSlashes("\n") . "',
|
||||
'" . PMA_Util::sqlAddSlashes(
|
||||
self::_transformTrackingSet($tracking_set)
|
||||
) . "' )";
|
||||
'" . PMA_Util::sqlAddSlashes(self::_transformTrackingSet($tracking_set))
|
||||
. "' )";
|
||||
|
||||
$result = PMA_queryAsControlUser($sql_query);
|
||||
|
||||
@ -560,9 +558,13 @@ class PMA_Tracker
|
||||
" AND `table_name` = '" . PMA_Util::sqlAddSlashes($tablename) . "' ";
|
||||
|
||||
if ($statement != "") {
|
||||
$sql_query .= PMA_DRIZZLE
|
||||
? ' AND tracking & ' . self::_transformTrackingSet($statement) . ' <> 0'
|
||||
: " AND FIND_IN_SET('" . $statement . "',tracking) > 0" ;
|
||||
if (PMA_DRIZZLE) {
|
||||
$sql_query .= ' AND tracking & '
|
||||
. self::_transformTrackingSet($statement) . ' <> 0';
|
||||
} else {
|
||||
$sql_query .= " AND FIND_IN_SET('"
|
||||
. $statement . "',tracking) > 0" ;
|
||||
}
|
||||
}
|
||||
$row = $GLOBALS['dbi']->fetchArray(PMA_queryAsControlUser($sql_query));
|
||||
return isset($row[0])
|
||||
@ -1033,7 +1035,7 @@ class PMA_Tracker
|
||||
*
|
||||
* Converts int<>string for Drizzle, does nothing for MySQL
|
||||
*
|
||||
* @param int|string $tracking_set
|
||||
* @param int|string $tracking_set Set to convert
|
||||
*
|
||||
* @return int|string
|
||||
*/
|
||||
|
||||
@ -161,12 +161,13 @@ class PMA_Types
|
||||
|
||||
foreach ($this->getTypeOperators($type, $null) as $fc) {
|
||||
if (isset($selectedOperator) && $selectedOperator == $fc) {
|
||||
$html .= '<option value="' . htmlspecialchars($fc) . '" selected="selected">'
|
||||
. htmlspecialchars($fc) . '</option>';
|
||||
$selected = ' selected="selected"';
|
||||
} else {
|
||||
$html .= '<option value="' . htmlspecialchars($fc) . '">'
|
||||
. htmlspecialchars($fc) . '</option>';
|
||||
$selected = '';
|
||||
}
|
||||
$html .= '<option value="' . htmlspecialchars($fc) . '"'
|
||||
. $selected . '>'
|
||||
. htmlspecialchars($fc) . '</option>';
|
||||
}
|
||||
|
||||
return $html;
|
||||
|
||||
@ -180,8 +180,9 @@ class PMA_Util
|
||||
// If it's the first time this function is called
|
||||
if (! isset($sprites)) {
|
||||
// Try to load the list of sprites
|
||||
if (is_readable($_SESSION['PMA_Theme']->getPath() . '/sprites.lib.php')) {
|
||||
include_once $_SESSION['PMA_Theme']->getPath() . '/sprites.lib.php';
|
||||
$sprite_file = $_SESSION['PMA_Theme']->getPath() . '/sprites.lib.php';
|
||||
if (is_readable($sprite_file)) {
|
||||
include_once $sprite_file;
|
||||
$sprites = PMA_sprites();
|
||||
} else {
|
||||
// No sprites are available for this theme
|
||||
@ -385,61 +386,31 @@ class PMA_Util
|
||||
/**
|
||||
* format sql strings
|
||||
*
|
||||
* @param mixed $parsed_sql pre-parsed SQL structure
|
||||
* @param string $unparsed_sql raw SQL string
|
||||
* @param string $sql_query raw SQL string
|
||||
* @param boolean $truncate truncate the query if it is too long
|
||||
*
|
||||
* @return string the formatted sql
|
||||
*
|
||||
* @global array the configuration array
|
||||
* @global boolean whether the current statement is a multiple one or not
|
||||
*
|
||||
* @access public
|
||||
* @todo move into PMA_Sql
|
||||
*/
|
||||
public static function formatSql($parsed_sql, $unparsed_sql = '')
|
||||
public static function formatSql($sql_query, $truncate = false)
|
||||
{
|
||||
global $cfg;
|
||||
|
||||
// Check that we actually have a valid set of parsed data
|
||||
// well, not quite
|
||||
// first check for the SQL parser having hit an error
|
||||
if (PMA_SQP_isError()) {
|
||||
return htmlspecialchars($parsed_sql['raw']);
|
||||
if ($truncate
|
||||
&& strlen($sql_query) > $cfg['MaxCharactersInDisplayedSQL']
|
||||
) {
|
||||
$sql_query = $GLOBALS['PMA_String']->substr(
|
||||
$sql_query,
|
||||
0,
|
||||
$cfg['MaxCharactersInDisplayedSQL']
|
||||
) . '[...]';
|
||||
}
|
||||
// then check for an array
|
||||
if (! is_array($parsed_sql)) {
|
||||
// We don't so just return the input directly
|
||||
// This is intended to be used for when the SQL Parser is turned off
|
||||
$formatted_sql = "<pre>\n";
|
||||
if (($cfg['SQP']['fmtType'] == 'none') && ($unparsed_sql != '')) {
|
||||
$formatted_sql .= $unparsed_sql;
|
||||
} else {
|
||||
$formatted_sql .= $parsed_sql;
|
||||
}
|
||||
$formatted_sql .= "\n</pre>";
|
||||
return $formatted_sql;
|
||||
}
|
||||
|
||||
$formatted_sql = '';
|
||||
|
||||
switch ($cfg['SQP']['fmtType']) {
|
||||
case 'none':
|
||||
if ($unparsed_sql != '') {
|
||||
$formatted_sql = '<span class="inner_sql"><pre>' . "\n"
|
||||
. PMA_SQP_formatNone(array('raw' => $unparsed_sql)) . "\n"
|
||||
. '</pre></span>';
|
||||
} else {
|
||||
$formatted_sql = PMA_SQP_formatNone($parsed_sql);
|
||||
}
|
||||
break;
|
||||
case 'text':
|
||||
$formatted_sql = PMA_SQP_format($parsed_sql, 'text');
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
} // end switch
|
||||
|
||||
return $formatted_sql;
|
||||
return '<span class="inner_sql"><pre>' . "\n"
|
||||
. htmlspecialchars($sql_query) . "\n"
|
||||
. '</pre></span>';
|
||||
} // end of the "formatSql()" function
|
||||
|
||||
/**
|
||||
@ -459,10 +430,51 @@ class PMA_Util
|
||||
. '</a>';
|
||||
} // end of the 'showDocLink()' function
|
||||
|
||||
/**
|
||||
* Get a URL link to the official MySQL documentation
|
||||
*
|
||||
* @param string $link contains name of page/anchor that is being linked
|
||||
* @param string $anchor anchor to page part
|
||||
*
|
||||
* @return string the URL link
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
public static function getMySQLDocuURL($link, $anchor = '')
|
||||
{
|
||||
global $cfg;
|
||||
|
||||
// Fixup for newly used names:
|
||||
$link = str_replace('_', '-', strtolower($link));
|
||||
|
||||
if (empty($link)) {
|
||||
$link = 'index';
|
||||
}
|
||||
$mysql = '5.5';
|
||||
$lang = 'en';
|
||||
if (defined('PMA_MYSQL_INT_VERSION')) {
|
||||
if (PMA_MYSQL_INT_VERSION >= 50600) {
|
||||
$mysql = '5.6';
|
||||
} else if (PMA_MYSQL_INT_VERSION >= 50500) {
|
||||
$mysql = '5.5';
|
||||
} else if (PMA_MYSQL_INT_VERSION >= 50100) {
|
||||
$mysql = '5.1';
|
||||
} else {
|
||||
$mysql = '5.0';
|
||||
}
|
||||
}
|
||||
$url = 'http://dev.mysql.com/doc/refman/'
|
||||
. $mysql . '/' . $lang . '/' . $link . '.html';
|
||||
if (! empty($anchor)) {
|
||||
$url .= '#' . $anchor;
|
||||
}
|
||||
|
||||
return PMA_linkURL($url);
|
||||
}
|
||||
|
||||
/**
|
||||
* Displays a link to the official MySQL documentation
|
||||
*
|
||||
* @param string $chapter chapter of "HTML, one page per chapter" documentation
|
||||
* @param string $link contains name of page/anchor that is being linked
|
||||
* @param bool $big_icon whether to use big icon (like in left frame)
|
||||
* @param string $anchor anchor to page part
|
||||
@ -473,77 +485,17 @@ class PMA_Util
|
||||
* @access public
|
||||
*/
|
||||
public static function showMySQLDocu(
|
||||
$chapter, $link, $big_icon = false, $anchor = '', $just_open = false
|
||||
$link, $big_icon = false, $anchor = '', $just_open = false
|
||||
) {
|
||||
global $cfg;
|
||||
|
||||
if (($cfg['MySQLManualType'] == 'none') || empty($cfg['MySQLManualBase'])) {
|
||||
return '';
|
||||
}
|
||||
|
||||
// Fixup for newly used names:
|
||||
$chapter = str_replace('_', '-', strtolower($chapter));
|
||||
$link = str_replace('_', '-', strtolower($link));
|
||||
|
||||
switch ($cfg['MySQLManualType']) {
|
||||
case 'chapters':
|
||||
if (empty($chapter)) {
|
||||
$chapter = 'index';
|
||||
}
|
||||
if (empty($anchor)) {
|
||||
$anchor = $link;
|
||||
}
|
||||
$url = $cfg['MySQLManualBase'] . '/' . $chapter . '.html#' . $anchor;
|
||||
break;
|
||||
case 'big':
|
||||
if (empty($anchor)) {
|
||||
$anchor = $link;
|
||||
}
|
||||
$url = $cfg['MySQLManualBase'] . '#' . $anchor;
|
||||
break;
|
||||
case 'searchable':
|
||||
if (empty($link)) {
|
||||
$link = 'index';
|
||||
}
|
||||
$url = $cfg['MySQLManualBase'] . '/' . $link . '.html';
|
||||
if (! empty($anchor)) {
|
||||
$url .= '#' . $anchor;
|
||||
}
|
||||
break;
|
||||
case 'viewable':
|
||||
default:
|
||||
if (empty($link)) {
|
||||
$link = 'index';
|
||||
}
|
||||
$mysql = '5.5';
|
||||
$lang = 'en';
|
||||
if (defined('PMA_MYSQL_INT_VERSION')) {
|
||||
if (PMA_MYSQL_INT_VERSION >= 50600) {
|
||||
$mysql = '5.6';
|
||||
} else if (PMA_MYSQL_INT_VERSION >= 50500) {
|
||||
$mysql = '5.5';
|
||||
} else if (PMA_MYSQL_INT_VERSION >= 50100) {
|
||||
$mysql = '5.1';
|
||||
} else {
|
||||
$mysql = '5.0';
|
||||
}
|
||||
}
|
||||
$url = $cfg['MySQLManualBase']
|
||||
. '/' . $mysql . '/' . $lang . '/' . $link . '.html';
|
||||
if (! empty($anchor)) {
|
||||
$url .= '#' . $anchor;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
$open_link = '<a href="' . PMA_linkURL($url) . '" target="mysql_doc">';
|
||||
$url = self::getMySQLDocuURL($link, $anchor);
|
||||
$open_link = '<a href="' . $url . '" target="mysql_doc">';
|
||||
if ($just_open) {
|
||||
return $open_link;
|
||||
} elseif ($big_icon) {
|
||||
return $open_link
|
||||
. self::getImage('b_sqlhelp.png', __('Documentation')) . '</a>';
|
||||
} else {
|
||||
return self::showDocLink(PMA_linkURL($url), 'mysql_doc');
|
||||
return self::showDocLink($url, 'mysql_doc');
|
||||
}
|
||||
} // end of the 'showMySQLDocu()' function
|
||||
|
||||
@ -670,19 +622,7 @@ class PMA_Util
|
||||
} elseif (empty($the_query) || (trim($the_query) == '')) {
|
||||
$formatted_sql = '';
|
||||
} else {
|
||||
if (strlen($the_query) > $GLOBALS['cfg']['MaxCharactersInDisplayedSQL']) {
|
||||
$formatted_sql = htmlspecialchars(
|
||||
substr(
|
||||
$the_query, 0,
|
||||
$GLOBALS['cfg']['MaxCharactersInDisplayedSQL']
|
||||
)
|
||||
)
|
||||
. '[...]';
|
||||
} else {
|
||||
$formatted_sql = self::formatSql(
|
||||
PMA_SQP_parse($the_query), $the_query
|
||||
);
|
||||
}
|
||||
$formatted_sql = self::formatSql($the_query, true);
|
||||
}
|
||||
// ---
|
||||
$error_msg .= "\n" . '<!-- PMA-SQL-ERROR -->' . "\n";
|
||||
@ -702,7 +642,7 @@ class PMA_Util
|
||||
$error_msg .= '<p><strong>' . __('SQL query:') . '</strong>' . "\n";
|
||||
if (strstr(strtolower($formatted_sql), 'select')) {
|
||||
// please show me help to the error on select
|
||||
$error_msg .= self::showMySQLDocu('SQL-Syntax', 'SELECT');
|
||||
$error_msg .= self::showMySQLDocu('SELECT');
|
||||
}
|
||||
if ($is_modify_link) {
|
||||
$_url_params = array(
|
||||
@ -713,14 +653,14 @@ class PMA_Util
|
||||
$_url_params['db'] = $db;
|
||||
$_url_params['table'] = $table;
|
||||
$doedit_goto = '<a href="tbl_sql.php'
|
||||
. PMA_generate_common_url($_url_params) . '">';
|
||||
. PMA_URL_getCommon($_url_params) . '">';
|
||||
} elseif (strlen($db)) {
|
||||
$_url_params['db'] = $db;
|
||||
$doedit_goto = '<a href="db_sql.php'
|
||||
. PMA_generate_common_url($_url_params) . '">';
|
||||
. PMA_URL_getCommon($_url_params) . '">';
|
||||
} else {
|
||||
$doedit_goto = '<a href="server_sql.php'
|
||||
. PMA_generate_common_url($_url_params) . '">';
|
||||
. PMA_URL_getCommon($_url_params) . '">';
|
||||
}
|
||||
|
||||
$error_msg .= $doedit_goto
|
||||
@ -744,7 +684,7 @@ class PMA_Util
|
||||
// (now error-messages-server)
|
||||
$error_msg .= '<p>' . "\n"
|
||||
. ' <strong>' . __('MySQL said: ') . '</strong>'
|
||||
. self::showMySQLDocu('Error-messages-server', 'Error-messages-server')
|
||||
. self::showMySQLDocu('Error-messages-server')
|
||||
. "\n"
|
||||
. '</p>' . "\n";
|
||||
|
||||
@ -1064,9 +1004,7 @@ class PMA_Util
|
||||
if (null === $sql_query) {
|
||||
if (! empty($GLOBALS['display_query'])) {
|
||||
$sql_query = $GLOBALS['display_query'];
|
||||
} elseif ($cfg['SQP']['fmtType'] == 'none'
|
||||
&& ! empty($GLOBALS['unparsed_sql'])
|
||||
) {
|
||||
} elseif (! empty($GLOBALS['unparsed_sql'])) {
|
||||
$sql_query = $GLOBALS['unparsed_sql'];
|
||||
} elseif (! empty($GLOBALS['sql_query'])) {
|
||||
$sql_query = $GLOBALS['sql_query'];
|
||||
@ -1199,8 +1137,8 @@ class PMA_Util
|
||||
__('Failed to connect to SQL validator!')
|
||||
)->getDisplay();
|
||||
}
|
||||
} elseif (isset($parsed_sql)) {
|
||||
$query_base = self::formatSql($parsed_sql, $query_base);
|
||||
} elseif (isset($query_base)) {
|
||||
$query_base = self::formatSql($query_base);
|
||||
}
|
||||
|
||||
// Prepares links that may be displayed to edit/explain the query
|
||||
@ -1249,7 +1187,7 @@ class PMA_Util
|
||||
}
|
||||
if (isset($explain_params['sql_query'])) {
|
||||
$explain_link = 'import.php'
|
||||
. PMA_generate_common_url($explain_params);
|
||||
. PMA_URL_getCommon($explain_params);
|
||||
$explain_link = ' ['
|
||||
. self::linkOrButton($explain_link, $_message) . ']';
|
||||
}
|
||||
@ -1268,7 +1206,7 @@ class PMA_Util
|
||||
$onclick = '';
|
||||
}
|
||||
|
||||
$edit_link .= PMA_generate_common_url($url_params) . '#querybox';
|
||||
$edit_link .= PMA_URL_getCommon($url_params) . '#querybox';
|
||||
$edit_link = ' ['
|
||||
. self::linkOrButton(
|
||||
$edit_link, __('Edit'),
|
||||
@ -1291,13 +1229,13 @@ class PMA_Util
|
||||
$_message = __('Create PHP Code');
|
||||
}
|
||||
|
||||
$php_link = 'import.php' . PMA_generate_common_url($php_params);
|
||||
$php_link = 'import.php' . PMA_URL_getCommon($php_params);
|
||||
$php_link = ' [' . self::linkOrButton($php_link, $_message) . ']';
|
||||
|
||||
if (isset($GLOBALS['show_as_php'])) {
|
||||
|
||||
$runquery_link = 'import.php'
|
||||
. PMA_generate_common_url($url_params);
|
||||
. PMA_URL_getCommon($url_params);
|
||||
|
||||
$php_link .= ' ['
|
||||
. self::linkOrButton($runquery_link, __('Submit Query'))
|
||||
@ -1312,7 +1250,7 @@ class PMA_Util
|
||||
&& ! isset($GLOBALS['show_as_php']) // 'Submit query' does the same
|
||||
&& preg_match('@^(SELECT|SHOW)[[:space:]]+@i', $sql_query)
|
||||
) {
|
||||
$refresh_link = 'import.php' . PMA_generate_common_url($url_params);
|
||||
$refresh_link = 'import.php' . PMA_URL_getCommon($url_params);
|
||||
$refresh_link = ' ['
|
||||
. self::linkOrButton($refresh_link, __('Refresh')) . ']';
|
||||
} else {
|
||||
@ -1331,7 +1269,7 @@ class PMA_Util
|
||||
}
|
||||
|
||||
$validate_link = 'import.php'
|
||||
. PMA_generate_common_url($validate_params);
|
||||
. PMA_URL_getCommon($validate_params);
|
||||
$validate_link = ' ['
|
||||
. self::linkOrButton($validate_link, $validate_message) . ']';
|
||||
} else {
|
||||
@ -1361,7 +1299,7 @@ class PMA_Util
|
||||
|
||||
$retval .= '<div class="tools">';
|
||||
$retval .= '<form action="sql.php" method="post">';
|
||||
$retval .= PMA_generate_common_hidden_inputs(
|
||||
$retval .= PMA_URL_getHiddenInputs(
|
||||
$GLOBALS['db'], $GLOBALS['table']
|
||||
);
|
||||
$retval .= '<input type="hidden" name="sql_query" value="'
|
||||
@ -1776,11 +1714,11 @@ class PMA_Util
|
||||
// build the link
|
||||
if (! empty($tab['link'])) {
|
||||
$tab['link'] = htmlentities($tab['link']);
|
||||
$tab['link'] = $tab['link'] . PMA_generate_common_url($url_params);
|
||||
$tab['link'] = $tab['link'] . PMA_URL_getCommon($url_params);
|
||||
if (! empty($tab['args'])) {
|
||||
foreach ($tab['args'] as $param => $value) {
|
||||
$tab['link'] .= PMA_get_arg_separator('html') . urlencode($param)
|
||||
. '=' . urlencode($value);
|
||||
$tab['link'] .= PMA_URL_getArgSeparator('html')
|
||||
. urlencode($param) . '=' . urlencode($value);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1927,7 +1865,8 @@ class PMA_Util
|
||||
// Suhosin: Check that each query parameter is not above maximum
|
||||
$in_suhosin_limits = true;
|
||||
if ($url_length <= $GLOBALS['cfg']['LinkLengthLimit']) {
|
||||
if ($suhosin_get_MaxValueLength = ini_get('suhosin.get.max_value_length')) {
|
||||
$suhosin_get_MaxValueLength = ini_get('suhosin.get.max_value_length');
|
||||
if ($suhosin_get_MaxValueLength) {
|
||||
$query_parts = self::splitURLQuery($url);
|
||||
foreach ($query_parts as $query_pair) {
|
||||
list($eachvar, $eachval) = explode('=', $query_pair);
|
||||
@ -2009,7 +1948,7 @@ class PMA_Util
|
||||
public static function splitURLQuery($url)
|
||||
{
|
||||
// decode encoded url separators
|
||||
$separator = PMA_get_arg_separator();
|
||||
$separator = PMA_URL_getArgSeparator();
|
||||
// on most places separator is still hard coded ...
|
||||
if ($separator !== '&') {
|
||||
// ... so always replace & with $separator
|
||||
@ -2247,10 +2186,11 @@ class PMA_Util
|
||||
) {
|
||||
$con_val = '= ' . $row[$i];
|
||||
} elseif ((($meta->type == 'blob') || ($meta->type == 'string'))
|
||||
// hexify only if this is a true not empty BLOB or a BINARY
|
||||
&& stristr($field_flags, 'BINARY')
|
||||
&& ! empty($row[$i])
|
||||
) {
|
||||
// hexify only if this is a true not empty BLOB or a BINARY
|
||||
|
||||
// do not waste memory building a too big condition
|
||||
if (strlen($row[$i]) < 1000) {
|
||||
// use a CAST if possible, to avoid problems
|
||||
@ -2560,19 +2500,19 @@ class PMA_Util
|
||||
|
||||
$_url_params[$name] = 0;
|
||||
$list_navigator_html .= '<a' . $class . $title1 . ' href="' . $script
|
||||
. PMA_generate_common_url($_url_params) . '">' . $caption1
|
||||
. PMA_URL_getCommon($_url_params) . '">' . $caption1
|
||||
. '</a>';
|
||||
|
||||
$_url_params[$name] = $pos - $max_count;
|
||||
$list_navigator_html .= '<a' . $class . $title2 . ' href="' . $script
|
||||
. PMA_generate_common_url($_url_params) . '">' . $caption2
|
||||
. PMA_URL_getCommon($_url_params) . '">' . $caption2
|
||||
. '</a>';
|
||||
}
|
||||
|
||||
$list_navigator_html .= '<form action="' . basename($script).
|
||||
'" method="post">';
|
||||
|
||||
$list_navigator_html .= PMA_generate_common_hidden_inputs($_url_params);
|
||||
$list_navigator_html .= PMA_URL_getHiddenInputs($_url_params);
|
||||
$list_navigator_html .= self::pageselector(
|
||||
$name,
|
||||
$max_count,
|
||||
@ -2596,7 +2536,7 @@ class PMA_Util
|
||||
|
||||
$_url_params[$name] = $pos + $max_count;
|
||||
$list_navigator_html .= '<a' . $class . $title3 . ' href="' . $script
|
||||
. PMA_generate_common_url($_url_params) . '" >' . $caption3
|
||||
. PMA_URL_getCommon($_url_params) . '" >' . $caption3
|
||||
. '</a>';
|
||||
|
||||
$_url_params[$name] = floor($count / $max_count) * $max_count;
|
||||
@ -2605,7 +2545,7 @@ class PMA_Util
|
||||
}
|
||||
|
||||
$list_navigator_html .= '<a' . $class . $title4 . ' href="' . $script
|
||||
. PMA_generate_common_url($_url_params) . '" >' . $caption4
|
||||
. PMA_URL_getCommon($_url_params) . '" >' . $caption4
|
||||
. '</a>';
|
||||
}
|
||||
$list_navigator_html .= '</div>' . "\n";
|
||||
@ -2656,7 +2596,7 @@ class PMA_Util
|
||||
}
|
||||
|
||||
return '<a href="' . $GLOBALS['cfg']['DefaultTabDatabase'] . '?'
|
||||
. PMA_generate_common_url($database) . '" title="'
|
||||
. PMA_URL_getCommon($database) . '" title="'
|
||||
. sprintf(
|
||||
__('Jump to database "%s".'),
|
||||
htmlspecialchars($database)
|
||||
@ -4116,12 +4056,12 @@ class PMA_Util
|
||||
$minimum_first_occurence_index = null;
|
||||
$regex = null;
|
||||
|
||||
for ($i = 0; $i < count($regex_array); $i++) {
|
||||
if (preg_match($regex_array[$i], $query, $matches, PREG_OFFSET_CAPTURE)) {
|
||||
foreach ($regex_array as $test_regex) {
|
||||
if (preg_match($test_regex, $query, $matches, PREG_OFFSET_CAPTURE)) {
|
||||
if (is_null($minimum_first_occurence_index)
|
||||
|| ($matches[0][1] < $minimum_first_occurence_index)
|
||||
) {
|
||||
$regex = $regex_array[$i];
|
||||
$regex = $test_regex;
|
||||
$minimum_first_occurence_index = $matches[0][1];
|
||||
}
|
||||
}
|
||||
|
||||
@ -124,7 +124,8 @@ function PMA_Bookmark_get($db, $id, $id_field = 'id', $action_bookmark_all = fal
|
||||
. ' WHERE dbase = \'' . PMA_Util::sqlAddSlashes($db) . '\'';
|
||||
|
||||
if (! $action_bookmark_all) {
|
||||
$query .= ' AND (user = \'' . PMA_Util::sqlAddSlashes($cfgBookmark['user']) . '\'';
|
||||
$query .= ' AND (user = \''
|
||||
. PMA_Util::sqlAddSlashes($cfgBookmark['user']) . '\'';
|
||||
if (! $exact_user_match) {
|
||||
$query .= ' OR user = \'\'';
|
||||
}
|
||||
@ -139,9 +140,9 @@ function PMA_Bookmark_get($db, $id, $id_field = 'id', $action_bookmark_all = fal
|
||||
/**
|
||||
* Adds a bookmark
|
||||
*
|
||||
* @param array $bkm_fields the properties of the bookmark to add; here,
|
||||
* $bkm_fields['bkm_sql_query'] is urlencoded
|
||||
* @param boolean $all_users whether to make the bookmark available for all users
|
||||
* @param array $bkm_fields the properties of the bookmark to add; here,
|
||||
* $bkm_fields['bkm_sql_query'] is urlencoded
|
||||
* @param boolean $all_users whether to make the bookmark available for all users
|
||||
*
|
||||
* @return boolean whether the INSERT succeeds or not
|
||||
*
|
||||
@ -162,9 +163,14 @@ function PMA_Bookmark_save($bkm_fields, $all_users = false)
|
||||
$query = 'INSERT INTO ' . PMA_Util::backquote($cfgBookmark['db'])
|
||||
. '.' . PMA_Util::backquote($cfgBookmark['table'])
|
||||
. ' (id, dbase, user, query, label)'
|
||||
. ' VALUES (NULL, \'' . PMA_Util::sqlAddSlashes($bkm_fields['bkm_database']) . '\', '
|
||||
. '\'' . ($all_users ? '' : PMA_Util::sqlAddSlashes($bkm_fields['bkm_user'])) . '\', '
|
||||
. '\'' . PMA_Util::sqlAddSlashes(urldecode($bkm_fields['bkm_sql_query'])) . '\', '
|
||||
. ' VALUES (NULL, \''
|
||||
. PMA_Util::sqlAddSlashes($bkm_fields['bkm_database']) . '\', '
|
||||
. '\''
|
||||
. ($all_users ? '' : PMA_Util::sqlAddSlashes($bkm_fields['bkm_user']))
|
||||
. '\', '
|
||||
. '\''
|
||||
. PMA_Util::sqlAddSlashes(urldecode($bkm_fields['bkm_sql_query']))
|
||||
. '\', '
|
||||
. '\'' . PMA_Util::sqlAddSlashes($bkm_fields['bkm_label']) . '\')';
|
||||
return $GLOBALS['dbi']->query($query, $controllink);
|
||||
} // end of the 'PMA_Bookmark_save()' function
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
|
||||
/**
|
||||
* HTML geneartor for database listing
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
|
||||
@ -35,12 +35,21 @@ $GLOBALS['is_superuser'] = $GLOBALS['dbi']->isSuperuser();
|
||||
function PMA_analyseShowGrant()
|
||||
{
|
||||
if (PMA_Util::cacheExists('is_create_db_priv', true)) {
|
||||
$GLOBALS['is_create_db_priv'] = PMA_Util::cacheGet('is_create_db_priv', true);
|
||||
$GLOBALS['is_process_priv'] = PMA_Util::cacheGet('is_process_priv', true);
|
||||
$GLOBALS['is_reload_priv'] = PMA_Util::cacheGet('is_reload_priv', true);
|
||||
$GLOBALS['db_to_create'] = PMA_Util::cacheGet('db_to_create', true);
|
||||
$GLOBALS['dbs_where_create_table_allowed']
|
||||
= PMA_Util::cacheGet('dbs_where_create_table_allowed', true);
|
||||
$GLOBALS['is_create_db_priv'] = PMA_Util::cacheGet(
|
||||
'is_create_db_priv', true
|
||||
);
|
||||
$GLOBALS['is_process_priv'] = PMA_Util::cacheGet(
|
||||
'is_process_priv', true
|
||||
);
|
||||
$GLOBALS['is_reload_priv'] = PMA_Util::cacheGet(
|
||||
'is_reload_priv', true
|
||||
);
|
||||
$GLOBALS['db_to_create'] = PMA_Util::cacheGet(
|
||||
'db_to_create', true
|
||||
);
|
||||
$GLOBALS['dbs_where_create_table_allowed'] = PMA_Util::cacheGet(
|
||||
'dbs_where_create_table_allowed', true
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@ -331,7 +331,7 @@ if ($GLOBALS['PMA_Config']->get('ForceSSL')
|
||||
// grab SSL URL
|
||||
$url = $GLOBALS['PMA_Config']->getSSLUri();
|
||||
// Actually redirect
|
||||
PMA_sendHeaderLocation($url . PMA_generate_common_url($_GET, 'text'));
|
||||
PMA_sendHeaderLocation($url . PMA_URL_getCommon($_GET, 'text'));
|
||||
// delete the current session, otherwise we get problems (see bug #2397877)
|
||||
$GLOBALS['PMA_Config']->removeCookie($GLOBALS['session_name']);
|
||||
exit;
|
||||
|
||||
@ -2244,32 +2244,6 @@ $cfg['Import']['xls_empty_rows'] = true;
|
||||
*/
|
||||
$cfg['Import']['xlsx_col_names'] = false;
|
||||
|
||||
/**
|
||||
* Link to the official MySQL documentation.
|
||||
* Be sure to include no trailing slash on the path.
|
||||
* See http://dev.mysql.com/doc/ for more information
|
||||
* about MySQL manuals and their types.
|
||||
*
|
||||
* @global string $cfg['MySQLManualBase']
|
||||
*/
|
||||
$cfg['MySQLManualBase'] = 'http://dev.mysql.com/doc/refman';
|
||||
|
||||
/**
|
||||
* Type of MySQL documentation:
|
||||
* viewable - "viewable online", current one used on MySQL website
|
||||
* searchable - "Searchable, with user comments"
|
||||
* chapters - "HTML, one page per chapter"
|
||||
* chapters_old - "HTML, one page per chapter",
|
||||
* format used prior to MySQL 5.0 release
|
||||
* big - "HTML, all on one page"
|
||||
* old - old style used in phpMyAdmin 2.3.0 and sooner
|
||||
* none - do not show documentation links
|
||||
*
|
||||
* @global string $cfg['MySQLManualType']
|
||||
*/
|
||||
$cfg['MySQLManualType'] = 'viewable';
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
* PDF options
|
||||
*/
|
||||
@ -2830,34 +2804,6 @@ $cfg['LinkLengthLimit'] = 1000;
|
||||
*/
|
||||
$cfg['DisableMultiTableMaintenance'] = false;
|
||||
|
||||
/*******************************************************************************
|
||||
* SQL Parser Settings
|
||||
*
|
||||
* @global array $cfg['SQP']
|
||||
*/
|
||||
$cfg['SQP'] = array();
|
||||
|
||||
/**
|
||||
* Pretty-printing style to use on queries (html, text, none)
|
||||
*
|
||||
* @global string $cfg['SQP']['fmtType']
|
||||
*/
|
||||
$cfg['SQP']['fmtType'] = 'none';
|
||||
|
||||
/**
|
||||
* Amount to indent each level (floats are valid)
|
||||
*
|
||||
* @global integer $cfg['SQP']['fmtInd']
|
||||
*/
|
||||
$cfg['SQP']['fmtInd'] = '1';
|
||||
|
||||
/**
|
||||
* Units for indenting each level (CSS Types - {em, px, pt})
|
||||
*
|
||||
* @global string $cfg['SQP']['fmtIndUnit']
|
||||
*/
|
||||
$cfg['SQP']['fmtIndUnit'] = 'em';
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
* If you wish to use the SQL Validator service, you should be aware of the
|
||||
|
||||
@ -91,7 +91,7 @@ class FormDisplay
|
||||
'error_invalid_value' => __('Incorrect value'),
|
||||
'error_value_lte' => __('Value must be equal or lower than %s'));
|
||||
// initialize validators
|
||||
PMA_Validator::config_get_validators();
|
||||
PMA_Validator::getValidators();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -164,7 +164,7 @@ class FormDisplay
|
||||
}
|
||||
|
||||
// run validation
|
||||
$errors = PMA_Validator::config_validate($paths, $values, false);
|
||||
$errors = PMA_Validator::validate($paths, $values, false);
|
||||
|
||||
// change error keys from canonical paths to work paths
|
||||
if (is_array($errors) && count($errors) > 0) {
|
||||
@ -198,7 +198,7 @@ class FormDisplay
|
||||
$js = array();
|
||||
$js_default = array();
|
||||
$tabbed_form = $tabbed_form && (count($this->_forms) > 1);
|
||||
$validators = PMA_Validator::config_get_validators();
|
||||
$validators = PMA_Validator::getValidators();
|
||||
|
||||
PMA_displayFormTop();
|
||||
|
||||
|
||||
@ -35,7 +35,7 @@ function PMA_displayFormTop($action = null, $method = 'post', $hidden_fields = n
|
||||
echo '<input type="hidden" name="check_page_refresh" '
|
||||
. ' id="check_page_refresh" value="" />' . "\n";
|
||||
}
|
||||
echo PMA_generate_common_hidden_inputs('', '', 0, 'server') . "\n";
|
||||
echo PMA_URL_getHiddenInputs('', '', 0, 'server') . "\n";
|
||||
echo PMA_getHiddenFields((array)$hidden_fields);
|
||||
}
|
||||
|
||||
|
||||
@ -1,7 +1,13 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
* Validaition class for various validation functions
|
||||
* Form validation for configuration editor
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
|
||||
/**
|
||||
* Validation class for various validation functions
|
||||
*
|
||||
* Validation function takes two argument: id for which it is called
|
||||
* and array of fields' values (usually values for entire formset, as defined
|
||||
@ -14,7 +20,6 @@
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
|
||||
class PMA_Validator
|
||||
{
|
||||
/**
|
||||
@ -22,7 +27,7 @@ class PMA_Validator
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function config_get_validators()
|
||||
public static function getValidators()
|
||||
{
|
||||
static $validators = null;
|
||||
|
||||
@ -75,11 +80,11 @@ class PMA_Validator
|
||||
*
|
||||
* @return bool|array
|
||||
*/
|
||||
public static function config_validate($validator_id, &$values, $isPostSource)
|
||||
{
|
||||
public static function validate($validator_id, &$values, $isPostSource)
|
||||
{
|
||||
// find validators
|
||||
$validator_id = (array) $validator_id;
|
||||
$validators = static::config_get_validators();
|
||||
$validators = static::getValidators();
|
||||
$vids = array();
|
||||
$cf = ConfigFile::getInstance();
|
||||
foreach ($validator_id as &$vid) {
|
||||
@ -123,7 +128,9 @@ class PMA_Validator
|
||||
if (! isset($result[$key])) {
|
||||
$result[$key] = array();
|
||||
}
|
||||
$result[$key] = array_merge($result[$key], (array)$error_list);
|
||||
$result[$key] = array_merge(
|
||||
$result[$key], (array)$error_list
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -143,7 +150,7 @@ class PMA_Validator
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public static function null_error_handler()
|
||||
public static function nullErrorHandler()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@ -170,7 +177,7 @@ class PMA_Validator
|
||||
ini_set('html_errors', false);
|
||||
ini_set('track_errors', true);
|
||||
ini_set('display_errors', true);
|
||||
set_error_handler("PMA_Validator", "null_error_handler");
|
||||
set_error_handler("PMA_Validator", "nullErrorHandler");
|
||||
ob_start();
|
||||
} else {
|
||||
ob_end_clean();
|
||||
@ -435,7 +442,7 @@ class PMA_Validator
|
||||
$matches = array();
|
||||
// we catch anything that may (or may not) be an IP
|
||||
if (!preg_match("/^(.+):(?:[ ]?)\\w+$/", $line, $matches)) {
|
||||
$result[$path][] = __('Incorrect value:') . ' '
|
||||
$result[$path][] = __('Incorrect value:') . ' '
|
||||
. htmlspecialchars($line);
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
* Based on PMA_sanitize from sanitize.lib.php.
|
||||
*
|
||||
* @param string $lang_key key in $GLOBALS WITHOUT 'strSetup' prefix
|
||||
* @param mixed $args,... arguments for sprintf
|
||||
* @param mixed $args arguments for sprintf
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
|
||||
@ -220,12 +220,9 @@ function PMA_fatalError(
|
||||
} else {
|
||||
$error_message = strtr($error_message, array('<br />' => '[br]'));
|
||||
|
||||
/* Define fake gettext for fatal errors */
|
||||
/* Load gettext for fatal errors */
|
||||
if (!function_exists('__')) {
|
||||
function __($text)
|
||||
{
|
||||
return $text;
|
||||
}
|
||||
include_once './libraries/php-gettext/gettext.inc';
|
||||
}
|
||||
|
||||
// these variables are used in the included file libraries/error.inc.php
|
||||
@ -563,7 +560,7 @@ function PMA_sendHeaderLocation($uri, $use_refresh = false)
|
||||
if (strpos($uri, '?') === false) {
|
||||
header('Location: ' . $uri . '?' . SID);
|
||||
} else {
|
||||
$separator = PMA_get_arg_separator();
|
||||
$separator = PMA_URL_getArgSeparator();
|
||||
header('Location: ' . $uri . $separator . SID);
|
||||
}
|
||||
} else {
|
||||
@ -759,12 +756,12 @@ function PMA_linkURL($url)
|
||||
if (!preg_match('#^https?://#', $url) || defined('PMA_SETUP')) {
|
||||
return $url;
|
||||
} else {
|
||||
if (!function_exists('PMA_generate_common_url')) {
|
||||
if (!function_exists('PMA_URL_getCommon')) {
|
||||
include_once './libraries/url_generating.lib.php';
|
||||
}
|
||||
$params = array();
|
||||
$params['url'] = $url;
|
||||
return './url.php' . PMA_generate_common_url($params);
|
||||
return './url.php' . PMA_URL_getCommon($params);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
* Definition of internal relations for data dictionary tables.
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
|
||||
@ -26,8 +26,8 @@ if ($db_is_information_schema) {
|
||||
/**
|
||||
* Defines the urls to return to in case of error in a sql statement
|
||||
*/
|
||||
$err_url_0 = 'index.php?' . PMA_generate_common_url();
|
||||
$err_url = $cfg['DefaultTabDatabase'] . '?' . PMA_generate_common_url($db);
|
||||
$err_url_0 = 'index.php?' . PMA_URL_getCommon();
|
||||
$err_url = $cfg['DefaultTabDatabase'] . '?' . PMA_URL_getCommon($db);
|
||||
|
||||
|
||||
/**
|
||||
@ -47,7 +47,7 @@ if (! isset($is_db) || ! $is_db) {
|
||||
}
|
||||
// Not a valid db name -> back to the welcome page
|
||||
$uri = $cfg['PmaAbsoluteUri'] . 'index.php?'
|
||||
. PMA_generate_common_url('', '', '&')
|
||||
. PMA_URL_getCommon('', '', '&')
|
||||
. (isset($message) ? '&message=' . urlencode($message) : '') . '&reload=1';
|
||||
if (! strlen($db) || ! $is_db) {
|
||||
$response = PMA_Response::getInstance();
|
||||
@ -95,6 +95,6 @@ if (isset($_REQUEST['submitcollation'])
|
||||
/**
|
||||
* Set parameters for links
|
||||
*/
|
||||
$url_query = PMA_generate_common_url($db);
|
||||
$url_query = PMA_URL_getCommon($db);
|
||||
|
||||
?>
|
||||
|
||||
@ -82,7 +82,7 @@ if (true === $cfg['SkipLockedTables']) {
|
||||
|
||||
if (isset($sot_cache)) {
|
||||
$db_info_result = $GLOBALS['dbi']->query(
|
||||
'SHOW TABLES FROM ' . PMA_Util::backquote($db) . $tbl_group_sql . ';',
|
||||
'SHOW TABLES FROM ' . PMA_Util::backquote($db) . $tbl_group_sql,
|
||||
null, PMA_DatabaseInterface::QUERY_STORE
|
||||
);
|
||||
if ($db_info_result && $GLOBALS['dbi']->numRows($db_info_result) > 0) {
|
||||
@ -90,7 +90,8 @@ if (true === $cfg['SkipLockedTables']) {
|
||||
if (! isset($sot_cache[$tmp[0]])) {
|
||||
$sts_result = $GLOBALS['dbi']->query(
|
||||
'SHOW TABLE STATUS FROM ' . PMA_Util::backquote($db)
|
||||
. ' LIKE \'' . PMA_Util::sqlAddSlashes($tmp[0], true) . '\';'
|
||||
. ' LIKE \'' . PMA_Util::sqlAddSlashes($tmp[0], true)
|
||||
. '\';'
|
||||
);
|
||||
$sts_tmp = $GLOBALS['dbi']->fetchAssoc($sts_result);
|
||||
$GLOBALS['dbi']->freeResult($sts_result);
|
||||
|
||||
@ -40,7 +40,7 @@ if (empty($is_db)) {
|
||||
}
|
||||
PMA_sendHeaderLocation(
|
||||
$cfg['PmaAbsoluteUri'] . 'index.php'
|
||||
. PMA_generate_common_url($url_params, '&')
|
||||
. PMA_URL_getCommon($url_params, '&')
|
||||
);
|
||||
}
|
||||
exit;
|
||||
|
||||
@ -555,14 +555,30 @@ class PMA_DBI_Drizzle implements PMA_DBI_Extension
|
||||
$c->flags = $this->fieldFlags($result, $k);
|
||||
$c->_flags = $column->flags();
|
||||
|
||||
$c->multiple_key = (int) (bool) ($c->_flags & DRIZZLE_COLUMN_FLAGS_MULTIPLE_KEY);
|
||||
$c->primary_key = (int) (bool) ($c->_flags & DRIZZLE_COLUMN_FLAGS_PRI_KEY);
|
||||
$c->unique_key = (int) (bool) ($c->_flags & DRIZZLE_COLUMN_FLAGS_UNIQUE_KEY);
|
||||
$c->not_null = (int) (bool) ($c->_flags & DRIZZLE_COLUMN_FLAGS_NOT_NULL);
|
||||
$c->unsigned = (int) (bool) ($c->_flags & DRIZZLE_COLUMN_FLAGS_UNSIGNED);
|
||||
$c->zerofill = (int) (bool) ($c->_flags & DRIZZLE_COLUMN_FLAGS_ZEROFILL);
|
||||
$c->numeric = (int) (bool) ($c->_flags & DRIZZLE_COLUMN_FLAGS_NUM);
|
||||
$c->blob = (int) (bool) ($c->_flags & DRIZZLE_COLUMN_FLAGS_BLOB);
|
||||
$c->multiple_key = (int) (bool) (
|
||||
$c->_flags & DRIZZLE_COLUMN_FLAGS_MULTIPLE_KEY
|
||||
);
|
||||
$c->primary_key = (int) (bool) (
|
||||
$c->_flags & DRIZZLE_COLUMN_FLAGS_PRI_KEY
|
||||
);
|
||||
$c->unique_key = (int) (bool) (
|
||||
$c->_flags & DRIZZLE_COLUMN_FLAGS_UNIQUE_KEY
|
||||
);
|
||||
$c->not_null = (int) (bool) (
|
||||
$c->_flags & DRIZZLE_COLUMN_FLAGS_NOT_NULL
|
||||
);
|
||||
$c->unsigned = (int) (bool) (
|
||||
$c->_flags & DRIZZLE_COLUMN_FLAGS_UNSIGNED
|
||||
);
|
||||
$c->zerofill = (int) (bool) (
|
||||
$c->_flags & DRIZZLE_COLUMN_FLAGS_ZEROFILL
|
||||
);
|
||||
$c->numeric = (int) (bool) (
|
||||
$c->_flags & DRIZZLE_COLUMN_FLAGS_NUM
|
||||
);
|
||||
$c->blob = (int) (bool) (
|
||||
$c->_flags & DRIZZLE_COLUMN_FLAGS_BLOB
|
||||
);
|
||||
|
||||
$std_columns[] = $c;
|
||||
}
|
||||
@ -693,4 +709,4 @@ class PMA_DBI_Drizzle implements PMA_DBI_Extension
|
||||
return false;
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
@ -34,7 +34,7 @@ function PMA_getHtmlForChangePassword($username, $hostname)
|
||||
. 'name="chgPassword" '
|
||||
. 'class="ajax" >';
|
||||
|
||||
$html .= PMA_generate_common_hidden_inputs();
|
||||
$html .= PMA_URL_getHiddenInputs();
|
||||
|
||||
if (strpos($GLOBALS['PMA_PHP_SELF'], 'server_privileges') !== false) {
|
||||
$html .= '<input type="hidden" name="username" '
|
||||
|
||||
@ -16,26 +16,26 @@ require_once './libraries/check_user_privileges.lib.php';
|
||||
|
||||
if ($is_create_db_priv) {
|
||||
// The user is allowed to create a db
|
||||
$html .= '<form method="post" action="db_create.php"'
|
||||
$html .= '<form method="post" action="db_create.php"'
|
||||
. ' id="create_database_form" class="ajax"><strong>';
|
||||
$html .= '<label for="text_create_db">'
|
||||
. PMA_Util::getImage('b_newdb.png')
|
||||
. " " . __('Create database')
|
||||
. '</label> '
|
||||
. PMA_Util::showMySQLDocu('SQL-Syntax', 'CREATE_DATABASE');
|
||||
. PMA_Util::showMySQLDocu('CREATE_DATABASE');
|
||||
$html .= '</strong><br />';
|
||||
$html .= PMA_generate_common_hidden_inputs('', '', 5);
|
||||
$html .= PMA_URL_getHiddenInputs('', '', 5);
|
||||
$html .= '<input type="hidden" name="reload" value="1" />';
|
||||
$html .= '<input type="text" name="new_db" value="' . $db_to_create
|
||||
$html .= '<input type="text" name="new_db" value="' . $db_to_create
|
||||
. '" maxlength="64" class="textfield" id="text_create_db"/>';
|
||||
|
||||
include_once './libraries/mysql_charsets.inc.php';
|
||||
$html .= PMA_generateCharsetDropdownBox(
|
||||
PMA_CSDROPDOWN_COLLATION,
|
||||
'db_collation',
|
||||
null,
|
||||
null,
|
||||
true,
|
||||
PMA_CSDROPDOWN_COLLATION,
|
||||
'db_collation',
|
||||
null,
|
||||
null,
|
||||
true,
|
||||
5
|
||||
);
|
||||
|
||||
@ -47,14 +47,14 @@ if ($is_create_db_priv) {
|
||||
$html .= '</form>';
|
||||
} else {
|
||||
$html .= '<!-- db creation no privileges message -->';
|
||||
$html .= '<strong>' . __('Create database:') . ' '
|
||||
. PMA_Util::showMySQLDocu('SQL-Syntax', 'CREATE_DATABASE')
|
||||
$html .= '<strong>' . __('Create database:') . ' '
|
||||
. PMA_Util::showMySQLDocu('CREATE_DATABASE')
|
||||
. '</strong><br />';
|
||||
|
||||
|
||||
$html .= '<span class="noPrivileges">'
|
||||
. PMA_Util::getImage(
|
||||
's_error2.png',
|
||||
'',
|
||||
's_error2.png',
|
||||
'',
|
||||
array('hspace' => 2, 'border' => 0, 'align' => 'middle')
|
||||
)
|
||||
. '' . __('No Privileges') .'</span>';
|
||||
|
||||
@ -46,7 +46,7 @@ if (PMA_Util::showIcons('ActionLinksMode')) {
|
||||
echo __('Create table');
|
||||
?>
|
||||
</legend>
|
||||
<?php echo PMA_generate_common_hidden_inputs($db); ?>
|
||||
<?php echo PMA_URL_getHiddenInputs($db); ?>
|
||||
<div class="formelement">
|
||||
<?php echo __('Name'); ?>:
|
||||
<input type="text" name="table" maxlength="64" size="30" />
|
||||
|
||||
@ -107,11 +107,11 @@ function PMA_getHtmlForHiddenInput(
|
||||
global $cfg;
|
||||
$html = "";
|
||||
if ($export_type == 'server') {
|
||||
$html .= PMA_generate_common_hidden_inputs('', '', 1);
|
||||
$html .= PMA_URL_getHiddenInputs('', '', 1);
|
||||
} elseif ($export_type == 'database') {
|
||||
$html .= PMA_generate_common_hidden_inputs($db, '', 1);
|
||||
$html .= PMA_URL_getHiddenInputs($db, '', 1);
|
||||
} else {
|
||||
$html .= PMA_generate_common_hidden_inputs($db, $table, 1);
|
||||
$html .= PMA_URL_getHiddenInputs($db, $table, 1);
|
||||
}
|
||||
|
||||
// just to keep this value for possible next display of this form after saving
|
||||
|
||||
@ -26,11 +26,11 @@ function PMA_getHtmlForHiddenInputs($import_type, $db, $table)
|
||||
{
|
||||
$html = '';
|
||||
if ($import_type == 'server') {
|
||||
$html .= PMA_generate_common_hidden_inputs('', '', 1);
|
||||
$html .= PMA_URL_getHiddenInputs('', '', 1);
|
||||
} elseif ($import_type == 'database') {
|
||||
$html .= PMA_generate_common_hidden_inputs($db, '', 1);
|
||||
$html .= PMA_URL_getHiddenInputs($db, '', 1);
|
||||
} else {
|
||||
$html .= PMA_generate_common_hidden_inputs($db, $table, 1);
|
||||
$html .= PMA_URL_getHiddenInputs($db, $table, 1);
|
||||
}
|
||||
$html .= ' <input type="hidden" name="import_type" value="'
|
||||
. $import_type . '" />'."\n";
|
||||
@ -441,7 +441,7 @@ function PMA_getHtmlForImportWithPlugin($upload_id)
|
||||
{
|
||||
//some variable for javasript
|
||||
$ajax_url = "import_status.php?id=" . $upload_id . "&"
|
||||
. PMA_generate_common_url(array('import_status'=>1), '&');
|
||||
. PMA_URL_getCommon(array('import_status'=>1), '&');
|
||||
$promot_str = PMA_jsFormat(
|
||||
__(
|
||||
'The file being uploaded is probably larger than '
|
||||
@ -459,7 +459,7 @@ function PMA_getHtmlForImportWithPlugin($upload_id)
|
||||
__('The file is being processed, please be patient.'),
|
||||
false
|
||||
);
|
||||
$import_url = PMA_generate_common_url(array('import_status'=>1), '&');
|
||||
$import_url = PMA_URL_getCommon(array('import_status'=>1), '&');
|
||||
|
||||
//start output
|
||||
$html = 'var finished = false; ';
|
||||
|
||||
@ -40,7 +40,7 @@ if (isset($_REQUEST['create_index'])) {
|
||||
$form_params['old_index'] = $_REQUEST['index'];
|
||||
}
|
||||
|
||||
$html .= PMA_generate_common_hidden_inputs($form_params);
|
||||
$html .= PMA_URL_getHiddenInputs($form_params);
|
||||
|
||||
$html .= '<fieldset id="index_edit_fields">';
|
||||
|
||||
@ -97,7 +97,7 @@ $html .= '<div>'
|
||||
. '<strong>'
|
||||
. '<label for="select_index_type">'
|
||||
. __('Index type:')
|
||||
. PMA_Util::showMySQLDocu('SQL-Syntax', 'ALTER_TABLE')
|
||||
. PMA_Util::showMySQLDocu('ALTER_TABLE')
|
||||
. '</label>'
|
||||
. '</strong>'
|
||||
. '</div>'
|
||||
|
||||
@ -48,7 +48,7 @@ function PMA_getLanguageSelectorHtml($use_fieldset = false, $show_doc = true)
|
||||
'db' => $GLOBALS['db'],
|
||||
'table' => $GLOBALS['table'],
|
||||
);
|
||||
$retval .= PMA_generate_common_hidden_inputs($_form_params);
|
||||
$retval .= PMA_URL_getHiddenInputs($_form_params);
|
||||
|
||||
// For non-English, display "Language" with emphasis because it's
|
||||
// not a proper word in the current language; we show it to help
|
||||
|
||||
@ -31,7 +31,7 @@ $html_form = '<form method="post" action="tbl_structure.php" name="fieldsForm" '
|
||||
. 'id="fieldsForm" class="ajax' . $HideStructureActions . '">';
|
||||
|
||||
$response->addHTML($html_form);
|
||||
$response->addHTML(PMA_generate_common_hidden_inputs($db, $table));
|
||||
$response->addHTML(PMA_URL_getHiddenInputs($db, $table));
|
||||
|
||||
$tabletype = '<input type="hidden" name="table_type" value=';
|
||||
if ($db_is_information_schema) {
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
* The Innobase storage engine
|
||||
*
|
||||
* @package PhpMyAdmin-Engines
|
||||
*/
|
||||
@ -14,6 +15,7 @@ if (! defined('PHPMYADMIN')) {
|
||||
require_once './libraries/engines/innodb.lib.php';
|
||||
|
||||
/**
|
||||
* The Innobase storage engine
|
||||
*
|
||||
* @package PhpMyAdmin-Engines
|
||||
*/
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
* Iconv wrapper for AIX
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
|
||||
@ -1189,8 +1189,8 @@ function PMA_buildSQL($db_name, &$tables, &$analyses = null,
|
||||
}
|
||||
|
||||
$params = array('db' => (string)$db_name);
|
||||
$db_url = 'db_structure.php' . PMA_generate_common_url($params);
|
||||
$db_ops_url = 'db_operations.php' . PMA_generate_common_url($params);
|
||||
$db_url = 'db_structure.php' . PMA_URL_getCommon($params);
|
||||
$db_ops_url = 'db_operations.php' . PMA_URL_getCommon($params);
|
||||
|
||||
$message = '<br /><br />';
|
||||
$message .= '<strong>' . __('The following structures have either been created or altered. Here you can:') . '</strong><br />';
|
||||
@ -1216,9 +1216,9 @@ function PMA_buildSQL($db_name, &$tables, &$analyses = null,
|
||||
'db' => (string) $db_name,
|
||||
'table' => (string) $tables[$i][TBL_NAME]
|
||||
);
|
||||
$tbl_url = 'sql.php' . PMA_generate_common_url($params);
|
||||
$tbl_struct_url = 'tbl_structure.php' . PMA_generate_common_url($params);
|
||||
$tbl_ops_url = 'tbl_operations.php' . PMA_generate_common_url($params);
|
||||
$tbl_url = 'sql.php' . PMA_URL_getCommon($params);
|
||||
$tbl_struct_url = 'tbl_structure.php' . PMA_URL_getCommon($params);
|
||||
$tbl_ops_url = 'tbl_operations.php' . PMA_URL_getCommon($params);
|
||||
|
||||
unset($params);
|
||||
|
||||
|
||||
@ -25,7 +25,7 @@ function PMA_getHtmlForDisplayIndexes()
|
||||
$html_output .= PMA_Index::getView($GLOBALS['table'], $GLOBALS['db']);
|
||||
$html_output .= '<fieldset class="tblFooters" style="text-align: left;">'
|
||||
. '<form action="tbl_indexes.php" method="post">';
|
||||
$html_output .= PMA_generate_common_hidden_inputs(
|
||||
$html_output .= PMA_URL_getHiddenInputs(
|
||||
$GLOBALS['db'], $GLOBALS['table']
|
||||
);
|
||||
$html_output .= sprintf(
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
* Internal relations for information schema.
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
|
||||
@ -207,12 +207,12 @@ function PMA_showFunctionFieldsInEditMode($url_params, $showFuncFields)
|
||||
$this_url_params = array_merge($url_params, $params);
|
||||
if (! $showFuncFields) {
|
||||
return ' : <a href="tbl_change.php'
|
||||
. PMA_generate_common_url($this_url_params) . '">'
|
||||
. PMA_URL_getCommon($this_url_params) . '">'
|
||||
. __('Function')
|
||||
. '</a>' . "\n";
|
||||
}
|
||||
return '<th><a href="tbl_change.php'
|
||||
. PMA_generate_common_url($this_url_params)
|
||||
. PMA_URL_getCommon($this_url_params)
|
||||
. '" title="' . __('Hide') . '">'
|
||||
. __('Function')
|
||||
. '</a></th>' . "\n";
|
||||
@ -239,11 +239,11 @@ function PMA_showColumnTypesInDataEditView($url_params, $showColumnType)
|
||||
$this_other_url_params = array_merge($url_params, $params);
|
||||
if (! $showColumnType) {
|
||||
return ' : <a href="tbl_change.php'
|
||||
. PMA_generate_common_url($this_other_url_params) . '">'
|
||||
. PMA_URL_getCommon($this_other_url_params) . '">'
|
||||
. __('Type') . '</a>' . "\n";
|
||||
}
|
||||
return '<th><a href="tbl_change.php'
|
||||
. PMA_generate_common_url($this_other_url_params)
|
||||
. PMA_URL_getCommon($this_other_url_params)
|
||||
. '" title="' . __('Hide') . '">' . __('Type') . '</a></th>' . "\n";
|
||||
|
||||
}
|
||||
@ -733,9 +733,14 @@ function PMA_getForeignLink($column, $backup_field, $column_name_appendix,
|
||||
$html_output .= '<a class="foreign_values_anchor" target="_blank" '
|
||||
. 'onclick="window.open(this.href,\'foreigners\', \'width=640,height=240,'
|
||||
. 'scrollbars=yes,resizable=yes\'); return false;" '
|
||||
. 'href="browse_foreigners.php?'
|
||||
. PMA_generate_common_url($db, $table) . '&field='
|
||||
. PMA_escapeJsString(urlencode($column['Field']) . $rownumber_param) . '">'
|
||||
. 'href="browse_foreigners.php'
|
||||
. PMA_URL_getCommon(
|
||||
array(
|
||||
'db' => $db,
|
||||
'table' => $table,
|
||||
'field' => $column['Field'] . $rownumber_param
|
||||
)
|
||||
) . '">'
|
||||
. str_replace("'", "\'", $titles['Browse']) . '</a>';
|
||||
return $html_output;
|
||||
}
|
||||
@ -1371,7 +1376,7 @@ function PMA_getContinueInsertionForm($table, $db, $where_clause_array, $err_url
|
||||
{
|
||||
$html_output = '<form id="continueForm" method="post"'
|
||||
. ' action="tbl_replace.php" name="continueForm">'
|
||||
. PMA_generate_common_hidden_inputs($db, $table)
|
||||
. PMA_URL_getHiddenInputs($db, $table)
|
||||
. '<input type="hidden" name="goto"'
|
||||
. ' value="' . htmlspecialchars($GLOBALS['goto']) . '" />'
|
||||
. '<input type="hidden" name="err_url"'
|
||||
@ -1854,7 +1859,7 @@ function PMA_getErrorUrl($url_params)
|
||||
if (isset($_REQUEST['err_url'])) {
|
||||
return $_REQUEST['err_url'];
|
||||
} else {
|
||||
return 'tbl_change.php' . PMA_generate_common_url($url_params);
|
||||
return 'tbl_change.php' . PMA_URL_getCommon($url_params);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2042,7 +2047,7 @@ function PMA_getLinkForRelationalDisplayField($map, $relation_field,
|
||||
. $where_comparison
|
||||
);
|
||||
$output = '<a href="sql.php'
|
||||
. PMA_generate_common_url($_url_params) . '"' . $title . '>';
|
||||
. PMA_URL_getCommon($_url_params) . '"' . $title . '>';
|
||||
|
||||
if ('D' == $_SESSION['tmp_user_values']['relational_display']) {
|
||||
// user chose "relational display field" in the
|
||||
@ -2088,13 +2093,13 @@ function PMA_transformEditedValues($db, $table,
|
||||
if (file_exists($include_file)) {
|
||||
include_once $include_file;
|
||||
|
||||
$transform_options = PMA_transformation_getOptions(
|
||||
$transform_options = PMA_Transformation_getOptions(
|
||||
isset($transformation['transformation_options'])
|
||||
? $transformation['transformation_options']
|
||||
: ''
|
||||
);
|
||||
$transform_options['wrapper_link']
|
||||
= PMA_generate_common_url($_url_params);
|
||||
= PMA_URL_getCommon($_url_params);
|
||||
$class_name = str_replace('.class.php', '', $file);
|
||||
$plugin_manager = null;
|
||||
$transformation_plugin = new $class_name(
|
||||
|
||||
@ -286,7 +286,7 @@ if (!empty($submit_mult) && !empty($what)) {
|
||||
}
|
||||
if ($what == 'replace_prefix_tbl' || $what == 'copy_tbl_change_prefix') {
|
||||
echo '<form action="' . $action . '" method="post">';
|
||||
echo PMA_generate_common_hidden_inputs($_url_params);
|
||||
echo PMA_URL_getHiddenInputs($_url_params);
|
||||
echo '<fieldset class = "input">';
|
||||
echo '<legend>';
|
||||
if ($what == 'replace_prefix_tbl') {
|
||||
@ -317,7 +317,7 @@ if (!empty($submit_mult) && !empty($what)) {
|
||||
echo '</form>';
|
||||
} elseif ($what == 'add_prefix_tbl') {
|
||||
echo '<form action="' . $action . '" method="post">';
|
||||
echo PMA_generate_common_hidden_inputs($_url_params);
|
||||
echo PMA_URL_getHiddenInputs($_url_params);
|
||||
echo '<fieldset class = "input">';
|
||||
echo '<legend>' . __('Add table prefix:') . '</legend>';
|
||||
echo '<table>';
|
||||
@ -347,7 +347,7 @@ if (!empty($submit_mult) && !empty($what)) {
|
||||
echo '</fieldset>';
|
||||
echo '<fieldset class="tblFooters">';
|
||||
echo '<form action="' . $action . '" method="post">';
|
||||
echo PMA_generate_common_hidden_inputs($_url_params);
|
||||
echo PMA_URL_getHiddenInputs($_url_params);
|
||||
// Display option to disable foreign key checks while dropping tables
|
||||
if ($what == 'drop_tbl') {
|
||||
echo '<div id="foreignkeychk">';
|
||||
@ -371,7 +371,7 @@ if (!empty($submit_mult) && !empty($what)) {
|
||||
echo '</form>';
|
||||
|
||||
echo '<form action="' . $action . '" method="post">';
|
||||
echo PMA_generate_common_hidden_inputs($_url_params);
|
||||
echo PMA_URL_getHiddenInputs($_url_params);
|
||||
echo '<input type="hidden" name="mult_btn" value="' . __('No') . '" />';
|
||||
echo '<input type="submit" value="' . __('No') . '" id="buttonNo" />';
|
||||
echo '</form>';
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
* MySQL charsets listings
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
@ -86,21 +87,49 @@ if (! PMA_Util::cacheExists('mysql_charsets', true)) {
|
||||
}
|
||||
unset($key, $value);
|
||||
|
||||
PMA_Util::cacheSet('mysql_charsets', $GLOBALS['mysql_charsets'], true);
|
||||
PMA_Util::cacheSet('mysql_charsets_descriptions', $GLOBALS['mysql_charsets_descriptions'], true);
|
||||
PMA_Util::cacheSet('mysql_charsets_available', $GLOBALS['mysql_charsets_available'], true);
|
||||
PMA_Util::cacheSet('mysql_collations', $GLOBALS['mysql_collations'], true);
|
||||
PMA_Util::cacheSet('mysql_default_collations', $GLOBALS['mysql_default_collations'], true);
|
||||
PMA_Util::cacheSet('mysql_collations_flat', $GLOBALS['mysql_collations_flat'], true);
|
||||
PMA_Util::cacheSet('mysql_collations_available', $GLOBALS['mysql_collations_available'], true);
|
||||
PMA_Util::cacheSet(
|
||||
'mysql_charsets', $GLOBALS['mysql_charsets'], true
|
||||
);
|
||||
PMA_Util::cacheSet(
|
||||
'mysql_charsets_descriptions', $GLOBALS['mysql_charsets_descriptions'], true
|
||||
);
|
||||
PMA_Util::cacheSet(
|
||||
'mysql_charsets_available', $GLOBALS['mysql_charsets_available'], true
|
||||
);
|
||||
PMA_Util::cacheSet(
|
||||
'mysql_collations', $GLOBALS['mysql_collations'], true
|
||||
);
|
||||
PMA_Util::cacheSet(
|
||||
'mysql_default_collations', $GLOBALS['mysql_default_collations'], true
|
||||
);
|
||||
PMA_Util::cacheSet(
|
||||
'mysql_collations_flat', $GLOBALS['mysql_collations_flat'], true
|
||||
);
|
||||
PMA_Util::cacheSet(
|
||||
'mysql_collations_available', $GLOBALS['mysql_collations_available'], true
|
||||
);
|
||||
} else {
|
||||
$GLOBALS['mysql_charsets'] = PMA_Util::cacheGet('mysql_charsets', true);
|
||||
$GLOBALS['mysql_charsets_descriptions'] = PMA_Util::cacheGet('mysql_charsets_descriptions', true);
|
||||
$GLOBALS['mysql_charsets_available'] = PMA_Util::cacheGet('mysql_charsets_available', true);
|
||||
$GLOBALS['mysql_collations'] = PMA_Util::cacheGet('mysql_collations', true);
|
||||
$GLOBALS['mysql_default_collations'] = PMA_Util::cacheGet('mysql_default_collations', true);
|
||||
$GLOBALS['mysql_collations_flat'] = PMA_Util::cacheGet('mysql_collations_flat', true);
|
||||
$GLOBALS['mysql_collations_available'] = PMA_Util::cacheGet('mysql_collations_available', true);
|
||||
$GLOBALS['mysql_charsets'] = PMA_Util::cacheGet(
|
||||
'mysql_charsets', true
|
||||
);
|
||||
$GLOBALS['mysql_charsets_descriptions'] = PMA_Util::cacheGet(
|
||||
'mysql_charsets_descriptions', true
|
||||
);
|
||||
$GLOBALS['mysql_charsets_available'] = PMA_Util::cacheGet(
|
||||
'mysql_charsets_available', true
|
||||
);
|
||||
$GLOBALS['mysql_collations'] = PMA_Util::cacheGet(
|
||||
'mysql_collations', true
|
||||
);
|
||||
$GLOBALS['mysql_default_collations'] = PMA_Util::cacheGet(
|
||||
'mysql_default_collations', true
|
||||
);
|
||||
$GLOBALS['mysql_collations_flat'] = PMA_Util::cacheGet(
|
||||
'mysql_collations_flat', true
|
||||
);
|
||||
$GLOBALS['mysql_collations_available'] = PMA_Util::cacheGet(
|
||||
'mysql_collations_available', true
|
||||
);
|
||||
}
|
||||
|
||||
define('PMA_CSDROPDOWN_COLLATION', 0);
|
||||
|
||||
@ -3,7 +3,6 @@
|
||||
/**
|
||||
* Shared code for mysql charsets
|
||||
*
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
if (! defined('PHPMYADMIN')) {
|
||||
|
||||
@ -144,7 +144,7 @@ class PMA_Navigation
|
||||
{
|
||||
$html = '<form method="post" action="navigation.php" class="ajax">';
|
||||
$html .= '<fieldset>';
|
||||
$html .= PMA_generate_common_hidden_inputs($dbName, $tableName);
|
||||
$html .= PMA_URL_getHiddenInputs($dbName, $tableName);
|
||||
|
||||
$navTable = PMA_Util::backquote($GLOBALS['cfgRelation']['db'])
|
||||
. "." . PMA_Util::backquote($GLOBALS['cfgRelation']['navigationhiding']);
|
||||
@ -189,7 +189,7 @@ class PMA_Navigation
|
||||
$html .= '<tr class="' . ($odd ? 'odd' : 'even') . '">';
|
||||
$html .= '<td>' . htmlspecialchars($hiddenItem) . '</td>';
|
||||
$html .= '<td style="width:80px"><a href="navigation.php?'
|
||||
. PMA_generate_common_url()
|
||||
. PMA_URL_getCommon()
|
||||
. '&unhideNavItem=true'
|
||||
. '&itemType=' . $t
|
||||
. '&itemName=' . urldecode($hiddenItem)
|
||||
|
||||
@ -25,9 +25,9 @@ class PMA_NavigationHeader
|
||||
public function getDisplay()
|
||||
{
|
||||
if (empty($GLOBALS['url_query'])) {
|
||||
$GLOBALS['url_query'] = PMA_generate_common_url();
|
||||
$GLOBALS['url_query'] = PMA_URL_getCommon();
|
||||
}
|
||||
$link_url = PMA_generate_common_url(
|
||||
$link_url = PMA_URL_getCommon(
|
||||
array(
|
||||
'ajax_request' => true
|
||||
)
|
||||
@ -172,13 +172,13 @@ class PMA_NavigationHeader
|
||||
private function _links()
|
||||
{
|
||||
// always iconic
|
||||
$showIcon = true;
|
||||
$showText = false;
|
||||
$showIcon = true;
|
||||
$showText = false;
|
||||
|
||||
$retval = '<!-- LINKS START -->';
|
||||
$retval .= '<div id="leftframelinks">';
|
||||
$retval .= $this->_getLink(
|
||||
'index.php?' . PMA_generate_common_url(),
|
||||
'index.php?' . PMA_URL_getCommon(),
|
||||
$showText,
|
||||
__('Home'),
|
||||
$showIcon,
|
||||
@ -201,7 +201,7 @@ class PMA_NavigationHeader
|
||||
);
|
||||
}
|
||||
$link = 'querywindow.php?';
|
||||
$link .= PMA_generate_common_url($GLOBALS['db'], $GLOBALS['table']);
|
||||
$link .= PMA_URL_getCommon($GLOBALS['db'], $GLOBALS['table']);
|
||||
$link .= '&no_js=true';
|
||||
$retval .= $this->_getLink(
|
||||
$link,
|
||||
@ -224,7 +224,7 @@ class PMA_NavigationHeader
|
||||
'documentation'
|
||||
);
|
||||
if ($showIcon) {
|
||||
$retval .= PMA_Util::showMySQLDocu('', '', true);
|
||||
$retval .= PMA_Util::showMySQLDocu('', true);
|
||||
}
|
||||
if ($showText) {
|
||||
// PMA_showMySQLDocu always spits out an icon,
|
||||
@ -232,7 +232,7 @@ class PMA_NavigationHeader
|
||||
$link = preg_replace(
|
||||
'/<img[^>]+>/i',
|
||||
__('Documentation'),
|
||||
PMA_Util::showMySQLDocu('', '', true)
|
||||
PMA_Util::showMySQLDocu('', true)
|
||||
);
|
||||
$retval .= $link;
|
||||
$retval .= '<br />';
|
||||
@ -285,7 +285,7 @@ class PMA_NavigationHeader
|
||||
$retval .= '<div id="recentTableList">';
|
||||
$retval .= '<form method="post" ';
|
||||
$retval .= 'action="' . $GLOBALS['cfg']['DefaultTabTable'] . '">';
|
||||
$retval .= PMA_generate_common_hidden_inputs(
|
||||
$retval .= PMA_URL_getHiddenInputs(
|
||||
array(
|
||||
'db' => '',
|
||||
'table' => '',
|
||||
|
||||
@ -504,7 +504,7 @@ class Node_Database extends Node
|
||||
if ($count > 0) {
|
||||
$ret = '<span class="dbItemControls">'
|
||||
. '<a href="navigation.php?'
|
||||
. PMA_generate_common_url()
|
||||
. PMA_URL_getCommon()
|
||||
. '&showUnhideDialog=true'
|
||||
. '&dbName=' . urldecode($db) . '"'
|
||||
. ' class="showUnhide ajax">'
|
||||
|
||||
@ -30,7 +30,7 @@ abstract class Node_DatabaseChild extends Node
|
||||
$item = $this->real_name;
|
||||
$ret = '<span class="navItemControls">'
|
||||
. '<a href="navigation.php?'
|
||||
. PMA_generate_common_url()
|
||||
. PMA_URL_getCommon()
|
||||
. '&hideNavItem=true'
|
||||
. '&itemType=' . urldecode($this->getItemType())
|
||||
. '&itemName=' . urldecode($item)
|
||||
|
||||
@ -22,7 +22,7 @@ function PMA_getHtmlForDatabaseComment($db)
|
||||
{
|
||||
$html_output = '<div class="operations_half_width">'
|
||||
. '<form method="post" action="db_operations.php">'
|
||||
. PMA_generate_common_hidden_inputs($db)
|
||||
. PMA_URL_getHiddenInputs($db)
|
||||
. '<fieldset>'
|
||||
. '<legend>';
|
||||
if (PMA_Util::showIcons('ActionLinksMode')) {
|
||||
@ -65,7 +65,7 @@ function PMA_getHtmlForRenameDatabase($db)
|
||||
}
|
||||
$html_output .= '<input type="hidden" name="what" value="data" />'
|
||||
. '<input type="hidden" name="db_rename" value="true" />'
|
||||
. PMA_generate_common_hidden_inputs($db)
|
||||
. PMA_URL_getHiddenInputs($db)
|
||||
. '<fieldset>'
|
||||
. '<legend>';
|
||||
|
||||
@ -165,7 +165,7 @@ function PMA_getHtmlForCopyDatabase($db)
|
||||
. 'value="' . $_REQUEST['db_collation'] .'" />' . "\n";
|
||||
}
|
||||
$html_output .= '<input type="hidden" name="db_copy" value="true" />' . "\n"
|
||||
. PMA_generate_common_hidden_inputs($db);
|
||||
. PMA_URL_getHiddenInputs($db);
|
||||
$html_output .= '<fieldset>'
|
||||
. '<legend>';
|
||||
|
||||
@ -230,7 +230,7 @@ function PMA_getHtmlForChangeDatabaseCharset($db, $table)
|
||||
$html_output .= 'class="ajax" ';
|
||||
$html_output .= 'method="post" action="db_operations.php">';
|
||||
|
||||
$html_output .= PMA_generate_common_hidden_inputs($db, $table);
|
||||
$html_output .= PMA_URL_getHiddenInputs($db, $table);
|
||||
|
||||
$html_output .= '<fieldset>' . "\n"
|
||||
. ' <legend>';
|
||||
@ -261,7 +261,7 @@ function PMA_getHtmlForChangeDatabaseCharset($db, $table)
|
||||
/**
|
||||
* Get HTML snippet for export relational schema view
|
||||
*
|
||||
* @param string $url_query
|
||||
* @param string $url_query Query string for link
|
||||
*
|
||||
* @return string $html_output
|
||||
*/
|
||||
@ -312,7 +312,9 @@ function PMA_runProcedureAndFunctionDefinitions($db)
|
||||
if ($function_names) {
|
||||
foreach ($function_names as $function_name) {
|
||||
$GLOBALS['dbi']->selectDb($db);
|
||||
$tmp_query = $GLOBALS['dbi']->getDefinition($db, 'FUNCTION', $function_name);
|
||||
$tmp_query = $GLOBALS['dbi']->getDefinition(
|
||||
$db, 'FUNCTION', $function_name
|
||||
);
|
||||
// collect for later display
|
||||
$GLOBALS['sql_query'] .= "\n" . $tmp_query;
|
||||
$GLOBALS['dbi']->selectDb($_REQUEST['newname']);
|
||||
@ -334,7 +336,9 @@ function PMA_getSqlQueryAndCreateDbBeforeCopy()
|
||||
'SHOW VARIABLES LIKE "lower_case_table_names"', 0, 1
|
||||
);
|
||||
if ($lower_case_table_names === '1') {
|
||||
$_REQUEST['newname'] = $GLOBALS['PMA_String']->strtolower($_REQUEST['newname']);
|
||||
$_REQUEST['newname'] = $GLOBALS['PMA_String']->strtolower(
|
||||
$_REQUEST['newname']
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -620,7 +624,7 @@ function PMA_getHtmlForOrderTheTable($columns)
|
||||
$html_output = '<div class="operations_half_width">';
|
||||
$html_output .= '<form method="post" id="alterTableOrderby" '
|
||||
. 'action="tbl_operations.php">';
|
||||
$html_output .= PMA_generate_common_hidden_inputs(
|
||||
$html_output .= PMA_URL_getHiddenInputs(
|
||||
$GLOBALS['db'], $GLOBALS['table']
|
||||
);
|
||||
$html_output .= '<fieldset id="fieldset_table_order">'
|
||||
@ -662,7 +666,7 @@ function PMA_getHtmlForMoveTable()
|
||||
$html_output .= '<form method="post" action="tbl_operations.php"'
|
||||
. ' id="moveTableForm" class="ajax"'
|
||||
. ' onsubmit="return emptyFormElements(this, \'new_name\')">'
|
||||
. PMA_generate_common_hidden_inputs($GLOBALS['db'], $GLOBALS['table']);
|
||||
. PMA_URL_getHiddenInputs($GLOBALS['db'], $GLOBALS['table']);
|
||||
|
||||
$html_output .= '<input type="hidden" name="reload" value="1" />'
|
||||
. '<input type="hidden" name="what" value="data" />'
|
||||
@ -731,7 +735,7 @@ function PMA_getTableOptionDiv($comment, $tbl_collation, $tbl_storage_engine,
|
||||
$html_output = '<div class="operations_half_width clearfloat">';
|
||||
$html_output .= '<form method="post" action="tbl_operations.php"';
|
||||
$html_output .= ' id="tableOptionsForm" class="ajax">';
|
||||
$html_output .= PMA_generate_common_hidden_inputs(
|
||||
$html_output .= PMA_URL_getHiddenInputs(
|
||||
$GLOBALS['db'], $GLOBALS['table']
|
||||
);
|
||||
$html_output .= '<input type="hidden" name="reload" value="1" />';
|
||||
@ -801,9 +805,7 @@ function PMA_getTableOptionFieldset($comment, $tbl_collation,
|
||||
|
||||
//Storage engine
|
||||
$html_output .= '<tr><td>' . __('Storage Engine')
|
||||
. PMA_Util::showMySQLDocu(
|
||||
'Storage_engines', 'Storage_engines'
|
||||
)
|
||||
. PMA_Util::showMySQLDocu('Storage_engines')
|
||||
. '</td>'
|
||||
. '<td>'
|
||||
. PMA_StorageEngine::getHtmlSelect(
|
||||
@ -997,7 +999,7 @@ function PMA_getHtmlForCopytable()
|
||||
. 'id="copyTable" '
|
||||
. ' class="ajax" '
|
||||
. 'onsubmit="return emptyFormElements(this, \'new_name\')">'
|
||||
. PMA_generate_common_hidden_inputs($GLOBALS['db'], $GLOBALS['table'])
|
||||
. PMA_URL_getHiddenInputs($GLOBALS['db'], $GLOBALS['table'])
|
||||
. '<input type="hidden" name="reload" value="1" />';
|
||||
|
||||
$html_output .= '<fieldset>';
|
||||
@ -1014,8 +1016,8 @@ function PMA_getHtmlForCopytable()
|
||||
. '</select>';
|
||||
}
|
||||
$html_output .= ' <strong>.</strong> ';
|
||||
$html_output .= '<input class="halfWidth" type="text" size="20" name="new_name" '
|
||||
. 'onfocus="this.select()" '
|
||||
$html_output .= '<input class="halfWidth" type="text" '
|
||||
. 'size="20" name="new_name" onfocus="this.select()" '
|
||||
. 'value="'. htmlspecialchars($GLOBALS['table']) . '"/><br />';
|
||||
|
||||
$choices = array(
|
||||
@ -1208,24 +1210,22 @@ function PMA_getListofMaintainActionLink($is_myisam_or_aria,
|
||||
/**
|
||||
* Get maintain action HTML link
|
||||
*
|
||||
* @param string $action
|
||||
* @param string $action action name
|
||||
* @param array $params url parameters array
|
||||
* @param array $url_params
|
||||
* @param array $url_params additional url parameters
|
||||
* @param string $link contains name of page/anchor that is being linked
|
||||
* @param string $chapter chapter of "HTML, one page per chapter" documentation
|
||||
*
|
||||
* @return string $html_output
|
||||
*/
|
||||
function PMA_getMaintainActionlink($action, $params, $url_params, $link,
|
||||
$chapter = 'MySQL_Database_Administration'
|
||||
) {
|
||||
function PMA_getMaintainActionlink($action, $params, $url_params, $link)
|
||||
{
|
||||
return '<li>'
|
||||
. '<a class="maintain_action ajax" '
|
||||
. 'href="sql.php'
|
||||
. PMA_generate_common_url(array_merge($url_params, $params)) .'">'
|
||||
. PMA_URL_getCommon(array_merge($url_params, $params)) .'">'
|
||||
. $action
|
||||
. '</a>'
|
||||
. PMA_Util::showMySQLDocu($chapter, $link)
|
||||
. PMA_Util::showMySQLDocu($link)
|
||||
. '</li>';
|
||||
}
|
||||
|
||||
@ -1281,12 +1281,10 @@ function PMA_getHtmlForDeleteDataOrTable(
|
||||
function PMA_getDeleteDataOrTablelink($url_params, $syntax, $link, $id)
|
||||
{
|
||||
return '<li><a '
|
||||
. 'href="sql.php' . PMA_generate_common_url($url_params) . '"'
|
||||
. 'href="sql.php' . PMA_URL_getCommon($url_params) . '"'
|
||||
. ' id="' . $id . '" class="ajax">'
|
||||
. $link . '</a>'
|
||||
. PMA_Util::showMySQLDocu(
|
||||
'SQL-Syntax', $syntax
|
||||
)
|
||||
. PMA_Util::showMySQLDocu($syntax)
|
||||
. '</li>';
|
||||
}
|
||||
|
||||
@ -1310,7 +1308,7 @@ function PMA_getHtmlForPartitionMaintenance($partition_names, $url_params)
|
||||
|
||||
$html_output = '<div class="operations_half_width">'
|
||||
. '<form method="post" action="tbl_operations.php">'
|
||||
. PMA_generate_common_hidden_inputs($GLOBALS['db'], $GLOBALS['table'])
|
||||
. PMA_URL_getHiddenInputs($GLOBALS['db'], $GLOBALS['table'])
|
||||
. '<fieldset>'
|
||||
. '<legend>' . __('Partition maintenance') . '</legend>';
|
||||
|
||||
@ -1326,10 +1324,7 @@ function PMA_getHtmlForPartitionMaintenance($partition_names, $url_params)
|
||||
$html_output .= PMA_Util::getRadioFields(
|
||||
'partition_operation', $choices, '', false
|
||||
);
|
||||
$html_output .= PMA_Util::showMySQLDocu(
|
||||
'partitioning_maintenance',
|
||||
'partitioning_maintenance'
|
||||
);
|
||||
$html_output .= PMA_Util::showMySQLDocu('partitioning_maintenance');
|
||||
$this_url_params = array_merge(
|
||||
$url_params,
|
||||
array(
|
||||
@ -1339,7 +1334,7 @@ function PMA_getHtmlForPartitionMaintenance($partition_names, $url_params)
|
||||
)
|
||||
);
|
||||
$html_output .= '<br /><a href="sql.php'
|
||||
. PMA_generate_common_url($this_url_params) . '">'
|
||||
. PMA_URL_getCommon($this_url_params) . '">'
|
||||
. __('Remove partitioning') . '</a>';
|
||||
|
||||
$html_output .= '</fieldset>'
|
||||
@ -1408,7 +1403,7 @@ function PMA_getHtmlForReferentialIntegrityCheck($foreign, $url_params)
|
||||
|
||||
$html_output .= '<li>'
|
||||
. '<a href="sql.php'
|
||||
. PMA_generate_common_url($this_url_params)
|
||||
. PMA_URL_getCommon($this_url_params)
|
||||
. '">'
|
||||
. $master . ' -> ' . $arr['foreign_db'] . '.'
|
||||
. $arr['foreign_table'] . '.' . $arr['foreign_field']
|
||||
@ -1419,6 +1414,11 @@ function PMA_getHtmlForReferentialIntegrityCheck($foreign, $url_params)
|
||||
return $html_output;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reorder table based on request params
|
||||
*
|
||||
* @return array SQL query and result
|
||||
*/
|
||||
function PMA_getQueryAndResultForReorderingTable()
|
||||
{
|
||||
$sql_query = 'ALTER TABLE '
|
||||
@ -1439,19 +1439,19 @@ function PMA_getQueryAndResultForReorderingTable()
|
||||
/**
|
||||
* Get table alters array
|
||||
*
|
||||
* @param boolean $is_myisam_or_aria whether MYISAM | ARIA or not
|
||||
* @param boolean $is_isam whether ISAM or not
|
||||
* @param string $pack_keys pack keys
|
||||
* @param string $checksum value of checksum
|
||||
* @param boolean $is_aria whether ARIA or not
|
||||
* @param string $page_checksum value of page checksum
|
||||
* @param string $delay_key_write delay key write
|
||||
* @param boolean $is_innodb whether INNODB or not
|
||||
* @param boolean $is_pbxt whether PBXT or not
|
||||
* @param string $row_format row format
|
||||
* @param string $tbl_storage_engine table storage engine
|
||||
* @param string $transactional value of transactional
|
||||
* @param string $tbl_collation collation of the table
|
||||
* @param boolean $is_myisam_or_aria whether MYISAM | ARIA or not
|
||||
* @param boolean $is_isam whether ISAM or not
|
||||
* @param string $pack_keys pack keys
|
||||
* @param string $checksum value of checksum
|
||||
* @param boolean $is_aria whether ARIA or not
|
||||
* @param string $page_checksum value of page checksum
|
||||
* @param string $delay_key_write delay key write
|
||||
* @param boolean $is_innodb whether INNODB or not
|
||||
* @param boolean $is_pbxt whether PBXT or not
|
||||
* @param string $row_format row format
|
||||
* @param string $new_tbl_storage_engine table storage engine
|
||||
* @param string $transactional value of transactional
|
||||
* @param string $tbl_collation collation of the table
|
||||
*
|
||||
* @return array $table_alters
|
||||
*/
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -134,7 +134,8 @@ function PMA_pluginGetDefault($section, $opt)
|
||||
return htmlspecialchars($_GET[$opt]);
|
||||
} elseif (isset($GLOBALS['timeout_passed'])
|
||||
&& $GLOBALS['timeout_passed']
|
||||
&& isset($_REQUEST[$opt])) {
|
||||
&& isset($_REQUEST[$opt])
|
||||
) {
|
||||
return htmlspecialchars($_REQUEST[$opt]);
|
||||
} elseif (isset($GLOBALS['cfg'][$section][$opt])) {
|
||||
$matches = array();
|
||||
@ -422,7 +423,6 @@ function PMA_pluginGetOneOption(
|
||||
if ($doc != null) {
|
||||
if (count($doc) == 3) {
|
||||
$ret .= PMA_Util::showMySQLDocu(
|
||||
$doc[0],
|
||||
$doc[1],
|
||||
false,
|
||||
$doc[2]
|
||||
@ -431,7 +431,6 @@ function PMA_pluginGetOneOption(
|
||||
$ret .= PMA_Util::showDocu('faq', $doc[0]);
|
||||
} else {
|
||||
$ret .= PMA_Util::showMySQLDocu(
|
||||
$doc[0],
|
||||
$doc[1]
|
||||
);
|
||||
}
|
||||
|
||||
@ -138,7 +138,7 @@ class AuthenticationConfig extends AuthenticationPlugin
|
||||
<td>' . "\n";
|
||||
echo '<a href="'
|
||||
. $GLOBALS['cfg']['DefaultTabServer']
|
||||
. PMA_generate_common_url(array()) . '" class="button disableAjax">'
|
||||
. PMA_URL_getCommon(array()) . '" class="button disableAjax">'
|
||||
. __('Retry to connect')
|
||||
. '</a>' . "\n";
|
||||
echo '</td>
|
||||
|
||||
@ -292,7 +292,7 @@ class AuthenticationCookie extends AuthenticationPlugin
|
||||
}
|
||||
// do not generate a "server" hidden field as we want the "server"
|
||||
// drop-down to have priority
|
||||
echo PMA_generate_common_hidden_inputs($_form_params, '', 0, 'server');
|
||||
echo PMA_URL_getHiddenInputs($_form_params, '', 0, 'server');
|
||||
echo '</fieldset>
|
||||
</form>';
|
||||
|
||||
@ -640,7 +640,7 @@ class AuthenticationCookie extends AuthenticationPlugin
|
||||
PMA_Response::getInstance()->disable();
|
||||
|
||||
PMA_sendHeaderLocation(
|
||||
$redirect_url . PMA_generate_common_url($url_params, '&'),
|
||||
$redirect_url . PMA_URL_getCommon($url_params, '&'),
|
||||
true
|
||||
);
|
||||
if (! defined('TESTSUITE')) {
|
||||
|
||||
@ -12,7 +12,7 @@ if (! defined('PHPMYADMIN')) {
|
||||
|
||||
/* Get the transformations interface */
|
||||
require_once 'libraries/plugins/TransformationsPlugin.class.php';
|
||||
/* For PMA_transformation_global_html_replace */
|
||||
/* For PMA_Transformation_globalHtmlReplace */
|
||||
require_once 'libraries/transformations.lib.php';
|
||||
|
||||
/**
|
||||
@ -49,7 +49,7 @@ abstract class ImageLinkTransformationsPlugin extends TransformationsPlugin
|
||||
'string' => '<a href="transformation_wrapper.php'
|
||||
. $options['wrapper_link'] . '" alt="[__BUFFER__]">[BLOB]</a>'
|
||||
);
|
||||
return PMA_transformation_global_html_replace(
|
||||
return PMA_Transformation_globalHtmlReplace(
|
||||
$buffer,
|
||||
$transform_options
|
||||
);
|
||||
|
||||
@ -12,7 +12,7 @@ if (! defined('PHPMYADMIN')) {
|
||||
|
||||
/* Get the transformations interface */
|
||||
require_once 'libraries/plugins/TransformationsPlugin.class.php';
|
||||
/* For PMA_transformation_global_html_replace */
|
||||
/* For PMA_Transformation_globalHtmlReplace */
|
||||
require_once 'libraries/transformations.lib.php';
|
||||
|
||||
/**
|
||||
@ -63,7 +63,7 @@ abstract class InlineTransformationsPlugin extends TransformationsPlugin
|
||||
. '" alt="[__BUFFER__]" width="320" height="240" />'
|
||||
);
|
||||
}
|
||||
return PMA_transformation_global_html_replace(
|
||||
return PMA_Transformation_globalHtmlReplace(
|
||||
$buffer,
|
||||
$transform_options
|
||||
);
|
||||
|
||||
@ -12,7 +12,7 @@ if (! defined('PHPMYADMIN')) {
|
||||
|
||||
/* Get the transformations interface */
|
||||
require_once 'libraries/plugins/TransformationsPlugin.class.php';
|
||||
/* For PMA_transformation_global_html_replace */
|
||||
/* For PMA_Transformation_globalHtmlReplace */
|
||||
require_once 'libraries/transformations.lib.php';
|
||||
|
||||
/**
|
||||
@ -56,7 +56,7 @@ abstract class TextImageLinkTransformationsPlugin extends TransformationsPlugin
|
||||
. $buffer . '</a>'
|
||||
);
|
||||
|
||||
$buffer = PMA_transformation_global_html_replace(
|
||||
$buffer = PMA_Transformation_globalHtmlReplace(
|
||||
$buffer,
|
||||
$transform_options
|
||||
);
|
||||
|
||||
@ -12,7 +12,7 @@ if (! defined('PHPMYADMIN')) {
|
||||
|
||||
/* Get the transformations interface */
|
||||
require_once 'libraries/plugins/TransformationsPlugin.class.php';
|
||||
/* For PMA_transformation_global_html_replace */
|
||||
/* For PMA_Transformation_globalHtmlReplace */
|
||||
require_once 'libraries/transformations.lib.php';
|
||||
|
||||
/**
|
||||
@ -60,7 +60,7 @@ abstract class TextLinkTransformationsPlugin extends TransformationsPlugin
|
||||
. '</a>'
|
||||
);
|
||||
|
||||
return PMA_transformation_global_html_replace(
|
||||
return PMA_Transformation_globalHtmlReplace(
|
||||
$buffer,
|
||||
$transform_options
|
||||
);
|
||||
|
||||
@ -60,7 +60,7 @@ function PMA_getHtmlForMasterReplication()
|
||||
$_url_params['repl_clear_scr'] = true;
|
||||
|
||||
$html .= ' <li><a href="server_replication.php';
|
||||
$html .= PMA_generate_common_url($_url_params)
|
||||
$html .= PMA_URL_getCommon($_url_params)
|
||||
. '" id="master_addslaveuser_href">';
|
||||
$html .= __('Add slave replication user') . '</a></li>';
|
||||
}
|
||||
@ -117,7 +117,7 @@ function PMA_getHtmlForMasterConfiguration()
|
||||
$html .= '</fieldset>';
|
||||
$html .= '<fieldset class="tblFooters">';
|
||||
$html .= ' <form method="post" action="server_replication.php" >';
|
||||
$html .= PMA_generate_common_hidden_inputs('', '');
|
||||
$html .= PMA_URL_getHiddenInputs('', '');
|
||||
$html .= ' <input type="submit" value="' . __('Go') . '" id="goButton" />';
|
||||
$html .= ' </form>';
|
||||
$html .= '</fieldset>';
|
||||
@ -152,7 +152,7 @@ function PMA_getHtmlForSlaveConfiguration($server_slave_status, $server_slave_re
|
||||
|
||||
$_url_params['sr_slave_control_parm'] = 'IO_THREAD';
|
||||
$slave_control_io_link = 'server_replication.php'
|
||||
. PMA_generate_common_url($_url_params);
|
||||
. PMA_URL_getCommon($_url_params);
|
||||
|
||||
if ($server_slave_replication[0]['Slave_SQL_Running'] == 'No') {
|
||||
$_url_params['sr_slave_action'] = 'start';
|
||||
@ -162,7 +162,7 @@ function PMA_getHtmlForSlaveConfiguration($server_slave_status, $server_slave_re
|
||||
|
||||
$_url_params['sr_slave_control_parm'] = 'SQL_THREAD';
|
||||
$slave_control_sql_link = 'server_replication.php'
|
||||
. PMA_generate_common_url($_url_params);
|
||||
. PMA_URL_getCommon($_url_params);
|
||||
|
||||
if ($server_slave_replication[0]['Slave_IO_Running'] == 'No'
|
||||
|| $server_slave_replication[0]['Slave_SQL_Running'] == 'No'
|
||||
@ -174,16 +174,16 @@ function PMA_getHtmlForSlaveConfiguration($server_slave_status, $server_slave_re
|
||||
|
||||
$_url_params['sr_slave_control_parm'] = null;
|
||||
$slave_control_full_link = 'server_replication.php'
|
||||
. PMA_generate_common_url($_url_params);
|
||||
. PMA_URL_getCommon($_url_params);
|
||||
|
||||
$_url_params['sr_slave_action'] = 'reset';
|
||||
$slave_control_reset_link = 'server_replication.php'
|
||||
. PMA_generate_common_url($_url_params);
|
||||
. PMA_URL_getCommon($_url_params);
|
||||
|
||||
$_url_params = $GLOBALS['url_params'];
|
||||
$_url_params['sr_slave_skip_error'] = true;
|
||||
$slave_skip_error_link = 'server_replication.php'
|
||||
. PMA_generate_common_url($_url_params);
|
||||
. PMA_URL_getCommon($_url_params);
|
||||
|
||||
if ($server_slave_replication[0]['Slave_SQL_Running'] == 'No') {
|
||||
$html .= PMA_Message::error(
|
||||
@ -201,7 +201,7 @@ function PMA_getHtmlForSlaveConfiguration($server_slave_status, $server_slave_re
|
||||
$_url_params['repl_clear_scr'] = true;
|
||||
|
||||
$reconfiguremaster_link = 'server_replication.php'
|
||||
. PMA_generate_common_url($_url_params);
|
||||
. PMA_URL_getCommon($_url_params);
|
||||
|
||||
$html .= __('Server is configured as slave in a replication process. Would you like to:');
|
||||
$html .= '<br />';
|
||||
@ -257,7 +257,7 @@ function PMA_getHtmlForSlaveConfiguration($server_slave_status, $server_slave_re
|
||||
'This server is not configured as slave in a replication process. '
|
||||
. 'Would you like to <a href="%s">configure</a> it?'
|
||||
),
|
||||
'server_replication.php' . PMA_generate_common_url($_url_params)
|
||||
'server_replication.php' . PMA_URL_getCommon($_url_params)
|
||||
);
|
||||
}
|
||||
$html .= '</fieldset>';
|
||||
@ -285,7 +285,7 @@ function PMA_getHtmlForSlaveErrorManagement($slave_skip_error_link)
|
||||
$html .= __('Skip current error') . '</a></li>';
|
||||
$html .= ' <li>' . __('Skip next');
|
||||
$html .= ' <form method="post" action="server_replication.php">';
|
||||
$html .= PMA_generate_common_hidden_inputs('', '');
|
||||
$html .= PMA_URL_getHiddenInputs('', '');
|
||||
$html .= ' <input type="text" name="sr_skip_errors_count" value="1" ';
|
||||
$html .= 'style="width: 30px" />' . __('errors.');
|
||||
$html .= ' <input type="submit" name="sr_slave_skip_error" ';
|
||||
@ -314,7 +314,7 @@ function PMA_getHtmlForNotServerReplication()
|
||||
'This server is not configured as master in a replication process. '
|
||||
. 'Would you like to <a href="%s">configure</a> it?'
|
||||
),
|
||||
'server_replication.php' . PMA_generate_common_url($_url_params)
|
||||
'server_replication.php' . PMA_URL_getCommon($_url_params)
|
||||
);
|
||||
$html .= '</fieldset>';
|
||||
return $html;
|
||||
@ -369,7 +369,7 @@ function PMA_getHtmlForReplicationChangeMaster($submitname)
|
||||
= PMA_replicationGetUsernameHostnameLength();
|
||||
|
||||
$html .= '<form method="post" action="server_replication.php">';
|
||||
$html .= PMA_generate_common_hidden_inputs('', '');
|
||||
$html .= PMA_URL_getHiddenInputs('', '');
|
||||
$html .= ' <fieldset id="fieldset_add_user_login">';
|
||||
$html .= ' <legend>' . __('Slave configuration');
|
||||
$html .= ' - ' . __('Change or reconfigure master server') . '</legend>';
|
||||
@ -662,7 +662,7 @@ function PMA_getHtmlForReplicationMasterAddSlaveuser()
|
||||
$html .= '<form autocomplete="off" method="post" ';
|
||||
$html .= 'action="server_privileges.php"';
|
||||
$html .= ' onsubmit="return checkAddUser(this);">';
|
||||
$html .= PMA_generate_common_hidden_inputs('', '');
|
||||
$html .= PMA_URL_getHiddenInputs('', '');
|
||||
$html .= '<fieldset id="fieldset_add_user_login">'
|
||||
. '<legend>' . __('Add slave replication user') . '</legend>'
|
||||
. PMA_getHtmlForAddUserLoginForm($username_length)
|
||||
@ -894,7 +894,7 @@ function PMA_handleControlRequest()
|
||||
if ($refresh) {
|
||||
Header(
|
||||
"Location: server_replication.php"
|
||||
. PMA_generate_common_url($GLOBALS['url_params'])
|
||||
. PMA_URL_getCommon($GLOBALS['url_params'])
|
||||
);
|
||||
}
|
||||
unset($refresh);
|
||||
|
||||
@ -412,7 +412,7 @@ function PMA_EVN_getEditorForm($mode, $operation, $item)
|
||||
$retval .= "<form class='rte_form' action='db_events.php' method='post'>\n";
|
||||
$retval .= "<input name='{$mode}_item' type='hidden' value='1' />\n";
|
||||
$retval .= $original_data;
|
||||
$retval .= PMA_generate_common_hidden_inputs($db, $table) . "\n";
|
||||
$retval .= PMA_URL_getHiddenInputs($db, $table) . "\n";
|
||||
$retval .= "<fieldset>\n";
|
||||
$retval .= "<legend>" . __('Details') . "</legend>\n";
|
||||
$retval .= "<table class='rte_table' style='width: 100%'>\n";
|
||||
|
||||
@ -38,7 +38,7 @@ function PMA_RTE_getFooterLinks($docu, $priv, $name)
|
||||
$retval .= " " . PMA_Util::getIcon($icon);
|
||||
$retval .= PMA_RTE_getWord('no_create') . "\n";
|
||||
}
|
||||
$retval .= " " . PMA_Util::showMySQLDocu('SQL-Syntax', $docu) . "\n";
|
||||
$retval .= " " . PMA_Util::showMySQLDocu($docu) . "\n";
|
||||
$retval .= " </div>\n";
|
||||
$retval .= "</fieldset>\n";
|
||||
$retval .= "<!-- ADD " . $name . " FORM END -->\n\n";
|
||||
|
||||
@ -38,7 +38,7 @@ function PMA_RTE_getList($type, $items)
|
||||
$retval .= "<fieldset>\n";
|
||||
$retval .= " <legend>\n";
|
||||
$retval .= " " . PMA_RTE_getWord('title') . "\n";
|
||||
$retval .= " " . PMA_Util::showMySQLDocu('SQL-Syntax', PMA_RTE_getWord('docu')) . "\n";
|
||||
$retval .= " " . PMA_Util::showMySQLDocu(PMA_RTE_getWord('docu')) . "\n";
|
||||
$retval .= " </legend>\n";
|
||||
$retval .= " <div class='$class1' id='nothing2display'>\n";
|
||||
$retval .= " " . PMA_RTE_getWord('nothing') . "\n";
|
||||
|
||||
@ -38,7 +38,7 @@ if ($GLOBALS['is_ajax_request'] != true) {
|
||||
if (strlen($db)) {
|
||||
$GLOBALS['dbi']->selectDb($db);
|
||||
if (! isset($url_query)) {
|
||||
$url_query = PMA_generate_common_url($db, $table);
|
||||
$url_query = PMA_URL_getCommon($db, $table);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -926,7 +926,7 @@ function PMA_RTN_getEditorForm($mode, $operation, $routine)
|
||||
$retval .= "<form class='rte_form' action='db_routines.php' method='post'>\n";
|
||||
$retval .= "<input name='{$mode}_item' type='hidden' value='1' />\n";
|
||||
$retval .= $original_routine;
|
||||
$retval .= PMA_generate_common_hidden_inputs($db) . "\n";
|
||||
$retval .= PMA_URL_getHiddenInputs($db) . "\n";
|
||||
$retval .= "<fieldset>\n";
|
||||
$retval .= "<legend>" . __('Details') . "</legend>\n";
|
||||
$retval .= "<table class='rte_table' style='width: 100%'>\n";
|
||||
@ -1563,7 +1563,7 @@ function PMA_RTN_getExecuteForm($routine)
|
||||
$retval .= " value='{$routine['item_name']}' />\n";
|
||||
$retval .= "<input type='hidden' name='item_type'\n";
|
||||
$retval .= " value='{$routine['item_type']}' />\n";
|
||||
$retval .= PMA_generate_common_hidden_inputs($db) . "\n";
|
||||
$retval .= PMA_URL_getHiddenInputs($db) . "\n";
|
||||
$retval .= "<fieldset>\n";
|
||||
if ($GLOBALS['is_ajax_request'] != true) {
|
||||
$retval .= "<legend>{$routine['item_name']}</legend>\n";
|
||||
|
||||
@ -342,7 +342,7 @@ function PMA_TRI_getEditorForm($mode, $item)
|
||||
$retval .= "<form class='rte_form' action='db_triggers.php' method='post'>\n";
|
||||
$retval .= "<input name='{$mode}_item' type='hidden' value='1' />\n";
|
||||
$retval .= $original_data;
|
||||
$retval .= PMA_generate_common_hidden_inputs($db, $table) . "\n";
|
||||
$retval .= PMA_URL_getHiddenInputs($db, $table) . "\n";
|
||||
$retval .= "<fieldset>\n";
|
||||
$retval .= "<legend>" . __('Details') . "</legend>\n";
|
||||
$retval .= "<table class='rte_table' style='width: 100%'>\n";
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user