Merge branch 'master' of github.com:phpmyadmin/phpmyadmin
This commit is contained in:
commit
b7fabb63be
@ -54,6 +54,7 @@ phpMyAdmin - ChangeLog
|
||||
+ rfe #1634 Don't group tables in tree if the result has only one group
|
||||
- bug #4946 When hide table structure actions is false, action should be in a row
|
||||
+ rfe #726 Batch changing the collation of each column in a table
|
||||
+ rfe #1594 Use plain English descriptors instead of script names for icon link destinations
|
||||
|
||||
4.4.10.0 (not yet released)
|
||||
- bug #4950 Issues in database selection for replication
|
||||
|
||||
@ -1598,16 +1598,16 @@ Navigation panel setup
|
||||
.. config:option:: $cfg['NavigationTreeDefaultTabTable']
|
||||
|
||||
:type: string
|
||||
:default: ``'tbl_structure.php'``
|
||||
:default: ``'structure'``
|
||||
|
||||
Defines the tab displayed by default when clicking the small icon next
|
||||
to each table name in the navigation panel. Possible values:
|
||||
|
||||
* ``tbl_structure.php``
|
||||
* ``tbl_sql.php``
|
||||
* ``tbl_select.php``
|
||||
* ``tbl_change.php``
|
||||
* ``sql.php``
|
||||
* ``structure``
|
||||
* ``sql``
|
||||
* ``search``
|
||||
* ``insert``
|
||||
* ``browse``
|
||||
|
||||
.. config:option:: $cfg['NavigationTreeDefaultTabTable2']
|
||||
|
||||
@ -1618,11 +1618,11 @@ Navigation panel setup
|
||||
to each table name in the navigation panel. Possible values:
|
||||
|
||||
* ``(empty)``
|
||||
* ``tbl_structure.php``
|
||||
* ``tbl_sql.php``
|
||||
* ``tbl_select.php``
|
||||
* ``tbl_change.php``
|
||||
* ``sql.php``
|
||||
* ``structure``
|
||||
* ``sql``
|
||||
* ``search``
|
||||
* ``insert``
|
||||
* ``browse``
|
||||
|
||||
.. config:option:: $cfg['NavigationTreeEnableExpansion']
|
||||
|
||||
@ -1957,40 +1957,41 @@ Tabs display settings
|
||||
.. config:option:: $cfg['DefaultTabServer']
|
||||
|
||||
:type: string
|
||||
:default: ``'index.php'``
|
||||
:default: ``'welcome'``
|
||||
|
||||
Defines the tab displayed by default on server view. Possible values:
|
||||
|
||||
* ``main.php`` (recommended for multi-user setups)
|
||||
* ``server_databases.php``,
|
||||
* ``server_status.php``
|
||||
* ``server_variables.php``
|
||||
* ``server_privileges.php``
|
||||
* ``welcome`` (recommended for multi-user setups)
|
||||
* ``databases``,
|
||||
* ``status``
|
||||
* ``variables``
|
||||
* ``privileges``
|
||||
|
||||
.. config:option:: $cfg['DefaultTabDatabase']
|
||||
|
||||
:type: string
|
||||
:default: ``'db_structure.php'``
|
||||
:default: ``'structure'``
|
||||
|
||||
Defines the tab displayed by default on database view. Possible
|
||||
values:
|
||||
|
||||
* ``db_structure.php``
|
||||
* ``db_sql.php``
|
||||
* ``db_search.php``.
|
||||
* ``structure``
|
||||
* ``sql``
|
||||
* ``search``
|
||||
* ``operations``
|
||||
|
||||
.. config:option:: $cfg['DefaultTabTable']
|
||||
|
||||
:type: string
|
||||
:default: ``'sql.php'``
|
||||
:default: ``'browse'``
|
||||
|
||||
Defines the tab displayed by default on table view. Possible values:
|
||||
|
||||
* ``tbl_structure.php``
|
||||
* ``tbl_sql.php``
|
||||
* ``tbl_select.php``
|
||||
* ``tbl_change.php``
|
||||
* ``sql.php``
|
||||
* ``structure``
|
||||
* ``sql``
|
||||
* ``search``
|
||||
* ``insert``
|
||||
* ``browse``
|
||||
|
||||
PDF Options
|
||||
-----------
|
||||
|
||||
@ -61,9 +61,13 @@ if (isset($_REQUEST['ajax_request']) && ! empty($_REQUEST['access_time'])) {
|
||||
if (! empty($_REQUEST['db'])) {
|
||||
$page = null;
|
||||
if (! empty($_REQUEST['table'])) {
|
||||
$page = $GLOBALS['cfg']['DefaultTabTable'];
|
||||
$page = PMA_Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabTable'], 'table'
|
||||
);
|
||||
} else {
|
||||
$page = $GLOBALS['cfg']['DefaultTabDatabase'];
|
||||
$page = PMA_Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabDatabase'], 'database'
|
||||
);
|
||||
}
|
||||
include $page;
|
||||
exit;
|
||||
|
||||
@ -243,14 +243,21 @@ AJAX.registerOnload('db_structure.js', function () {
|
||||
/**
|
||||
* @var question String containing the question to be asked for confirmation
|
||||
*/
|
||||
var question = PMA_messages.strTruncateTableStrongWarning + ' ' +
|
||||
PMA_sprintf(PMA_messages.strDoYouReally, 'TRUNCATE ' + escapeHtml(curr_table_name));
|
||||
var question = PMA_messages.strTruncateTableStrongWarning + ' '
|
||||
+ PMA_sprintf(PMA_messages.strDoYouReally, 'TRUNCATE ' + escapeHtml(curr_table_name))
|
||||
+ getForeignKeyCheckbox();
|
||||
|
||||
$this_anchor.PMA_confirm(question, $this_anchor.attr('href'), function (url) {
|
||||
|
||||
PMA_ajaxShowMessage(PMA_messages.strProcessingRequest);
|
||||
|
||||
$.get(url, {'is_js_confirmed' : 1, 'ajax_request' : true}, function (data) {
|
||||
var params = {
|
||||
'is_js_confirmed' : 1,
|
||||
'ajax_request' : true,
|
||||
'fk_checks': $(this).find('#fk_checks').is(':checked') ? 1 : 0
|
||||
};
|
||||
|
||||
$.get(url, params, function (data) {
|
||||
if (typeof data !== 'undefined' && data.success === true) {
|
||||
PMA_ajaxShowMessage(data.message);
|
||||
// Adjust table statistics
|
||||
@ -305,12 +312,19 @@ AJAX.registerOnload('db_structure.js', function () {
|
||||
question =
|
||||
PMA_sprintf(PMA_messages.strDoYouReally, 'DROP VIEW ' + escapeHtml(curr_table_name));
|
||||
}
|
||||
question += getForeignKeyCheckbox();
|
||||
|
||||
$this_anchor.PMA_confirm(question, $this_anchor.attr('href'), function (url) {
|
||||
|
||||
var $msg = PMA_ajaxShowMessage(PMA_messages.strProcessingRequest);
|
||||
|
||||
$.get(url, {'is_js_confirmed' : 1, 'ajax_request' : true}, function (data) {
|
||||
var params = {
|
||||
'is_js_confirmed' : 1,
|
||||
'ajax_request' : true,
|
||||
'fk_checks': $(this).find('#fk_checks').is(':checked') ? 1 : 0
|
||||
};
|
||||
|
||||
$.get(url, params, function (data) {
|
||||
if (typeof data !== 'undefined' && data.success === true) {
|
||||
PMA_ajaxShowMessage(data.message);
|
||||
toggleRowColors($curr_row.next());
|
||||
|
||||
@ -1675,6 +1675,23 @@ function pdfPaperSize(format, axis)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get checkbox for foreign key checks
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function getForeignKeyCheckbox() {
|
||||
default_fk_check_value = PMA_commonParams.get('default_fk_check_value');
|
||||
var html = "";
|
||||
html += "<div>";
|
||||
html += "<input type=\"hidden\" name=\"fk_checks\" value=\"0\" />";
|
||||
html += "<input type=\"checkbox\" name=\"fk_checks\""
|
||||
+ " id=\"fk_checks\"" + (default_fk_check_value ? " checked=\"checked\"" : "") + " />";
|
||||
html += "<label for=\"fk_checks\">" + PMA_messages.strForeignKeyCheck + "</label>";
|
||||
html += "</div>";
|
||||
return html;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unbind all event handlers before tearing down a page
|
||||
*/
|
||||
@ -1723,15 +1740,9 @@ AJAX.registerOnload('functions.js', function () {
|
||||
var sql_query = $form.find("input[name='sql_query']").val().trim();
|
||||
var $inner_sql = $(this).parent().prev().find('code.sql');
|
||||
var old_text = $inner_sql.html();
|
||||
var default_fk_check_value = $form.find("input[name='default_fk_check_value']").val() == 'true';
|
||||
|
||||
var new_content = "<textarea name=\"sql_query_edit\" id=\"sql_query_edit\">" + sql_query + "</textarea>\n";
|
||||
new_content += "<div>";
|
||||
new_content += "<input type=\"hidden\" name=\"fk_checks\" value=\"0\" />";
|
||||
new_content += "<input type=\"checkbox\" name=\"fk_checks\""
|
||||
+ " id=\"fk_checks\"" + (default_fk_check_value ? " checked=\"checked\"" : "") + " />";
|
||||
new_content += "<label for=\"fk_checks\">" + PMA_messages.strForeignKeyCheck + "</label>";
|
||||
new_content += "</div>";
|
||||
new_content += getForeignKeyCheckbox();
|
||||
new_content += "<input type=\"submit\" id=\"sql_query_edit_save\" class=\"button btnSave\" value=\"" + PMA_messages.strGo + "\"/>\n";
|
||||
new_content += "<input type=\"button\" id=\"sql_query_edit_discard\" class=\"button btnDiscard\" value=\"" + PMA_messages.strCancel + "\"/>\n";
|
||||
var $editor_area = $('div#inline_editor');
|
||||
|
||||
@ -3115,8 +3115,8 @@ class PMA_DatabaseInterface
|
||||
/**
|
||||
* Get a table with database name and table name
|
||||
*
|
||||
* @param $db_name
|
||||
* @param $table_name
|
||||
* @param string $db_name DB name
|
||||
* @param string $table_name Table name
|
||||
*
|
||||
* @return PMA_Table
|
||||
*/
|
||||
|
||||
@ -230,7 +230,9 @@ class PMA_Header
|
||||
|
||||
$params = array(
|
||||
'common_query' => PMA_URL_getCommon(array(), 'text'),
|
||||
'opendb_url' => $GLOBALS['cfg']['DefaultTabDatabase'],
|
||||
'opendb_url' => PMA_Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabDatabase'], 'database'
|
||||
),
|
||||
'safari_browser' => PMA_USR_BROWSER_AGENT == 'SAFARI' ? 1 : 0,
|
||||
'collation_connection' => $GLOBALS['collation_connection'],
|
||||
'lang' => $GLOBALS['lang'],
|
||||
@ -254,7 +256,8 @@ class PMA_Header
|
||||
'pftext' => $pftext,
|
||||
'confirm' => $GLOBALS['cfg']['Confirm'],
|
||||
'LoginCookieValidity' => $GLOBALS['cfg']['LoginCookieValidity'],
|
||||
'logged_in' => isset($GLOBALS['userlink']) ? true : false
|
||||
'logged_in' => isset($GLOBALS['userlink']) ? true : false,
|
||||
'default_fk_check_value' => PMA_Util::getDefaultFKCheckValue() ? 1 : 0
|
||||
);
|
||||
if (isset($GLOBALS['cfg']['Server'])
|
||||
&& isset($GLOBALS['cfg']['Server']['auth_type'])
|
||||
|
||||
@ -191,7 +191,9 @@ class PMA_Menu
|
||||
}
|
||||
$retval .= sprintf(
|
||||
$item,
|
||||
$GLOBALS['cfg']['DefaultTabServer'],
|
||||
PMA_Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabServer'], 'server'
|
||||
),
|
||||
PMA_URL_getCommon(),
|
||||
htmlspecialchars($server_info),
|
||||
__('Server')
|
||||
@ -208,7 +210,9 @@ class PMA_Menu
|
||||
}
|
||||
$retval .= sprintf(
|
||||
$item,
|
||||
$GLOBALS['cfg']['DefaultTabDatabase'],
|
||||
PMA_Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabDatabase'], 'database'
|
||||
),
|
||||
PMA_URL_getCommon(array('db' => $this->_db)),
|
||||
htmlspecialchars($this->_db),
|
||||
__('Database')
|
||||
@ -231,7 +235,9 @@ class PMA_Menu
|
||||
}
|
||||
$retval .= sprintf(
|
||||
$item,
|
||||
$GLOBALS['cfg']['DefaultTabTable'],
|
||||
PMA_Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabTable'], 'table'
|
||||
),
|
||||
PMA_URL_getCommon(
|
||||
array(
|
||||
'db' => $this->_db, 'table' => $this->_table
|
||||
|
||||
@ -74,9 +74,9 @@ class PMA_Table
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param string $table_name table name
|
||||
* @param string $db_name database name
|
||||
* @param PMA_DatabaseInterface $dbi database interface for the table
|
||||
* @param string $table_name table name
|
||||
* @param string $db_name database name
|
||||
* @param PMA_DatabaseInterface $dbi database interface for the table
|
||||
*/
|
||||
function __construct($table_name, $db_name, PMA_DatabaseInterface $dbi = null)
|
||||
{
|
||||
@ -1625,7 +1625,7 @@ class PMA_Table
|
||||
$server_id = $GLOBALS['server'];
|
||||
|
||||
// set session variable if it's still undefined
|
||||
if (! isset($_SESSION['tmpval']['table_uiprefs'][$server_id][$this->_db_name][$this->_name])) {
|
||||
if (!isset($_SESSION['tmpval']['table_uiprefs'][$server_id][$this->_db_name][$this->_name])) {
|
||||
// check whether we can get from pmadb
|
||||
$_SESSION['tmpval']['table_uiprefs'][$server_id][$this->_db_name]
|
||||
[$this->_name] = $cfgRelation['uiprefswork']
|
||||
@ -1819,11 +1819,14 @@ class PMA_Table
|
||||
public function getNameAndTypeOfTheColumns()
|
||||
{
|
||||
$columns = array();
|
||||
foreach ($this->_dbi->getColumnsFull($this->_db_name, $this->_name) as $row) {
|
||||
foreach ($this->_dbi->getColumnsFull(
|
||||
$this->_db_name, $this->_name
|
||||
) as $row) {
|
||||
if (preg_match('@^(set|enum)\((.+)\)$@i', $row['Type'], $tmp)) {
|
||||
$tmp[2] = /*overload*/mb_substr(
|
||||
preg_replace('@([^,])\'\'@', '\\1\\\'', ',' . $tmp[2]), 1
|
||||
);
|
||||
$tmp[2] = /*overload*/
|
||||
mb_substr(
|
||||
preg_replace('@([^,])\'\'@', '\\1\\\'', ',' . $tmp[2]), 1
|
||||
);
|
||||
$columns[$row['Field']] = $tmp[1] . '('
|
||||
. str_replace(',', ', ', $tmp[2]) . ')';
|
||||
} else {
|
||||
@ -1836,7 +1839,8 @@ class PMA_Table
|
||||
/**
|
||||
* Get index with index name
|
||||
*
|
||||
* @param $index
|
||||
* @param string $index Index name
|
||||
*
|
||||
* @return PMA_Index
|
||||
*/
|
||||
public function getIndex($index)
|
||||
@ -1890,7 +1894,9 @@ class PMA_Table
|
||||
case 'INDEX':
|
||||
case 'SPATIAL':
|
||||
if ($index->getName() == 'PRIMARY') {
|
||||
$error = PMA_Message::error(__('Can\'t rename index to PRIMARY!'));
|
||||
$error = PMA_Message::error(
|
||||
__('Can\'t rename index to PRIMARY!')
|
||||
);
|
||||
}
|
||||
$sql_query .= sprintf(
|
||||
' ADD %s ',
|
||||
|
||||
@ -1291,11 +1291,6 @@ class PMA_Util
|
||||
'profiling', __('Profiling'), isset($_SESSION['profiling']), true
|
||||
);
|
||||
}
|
||||
|
||||
// Pass default foreign_key_checks
|
||||
$default_fk_check_value = $GLOBALS['dbi']->getVariable('FOREIGN_KEY_CHECKS') == 'ON';
|
||||
$retval .= '<input type="hidden" disabled name="default_fk_check_value"'
|
||||
. 'value="' . ($default_fk_check_value ? 'true' : 'false') . '"/>';
|
||||
$retval .= '</form>';
|
||||
|
||||
/**
|
||||
@ -2657,7 +2652,10 @@ class PMA_Util
|
||||
$database = self::unescapeMysqlWildcards($database);
|
||||
}
|
||||
|
||||
return '<a href="' . $GLOBALS['cfg']['DefaultTabDatabase']
|
||||
return '<a href="'
|
||||
. PMA_Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabDatabase'], 'database'
|
||||
)
|
||||
. PMA_URL_getCommon(array('db' => $database)) . '" title="'
|
||||
. htmlspecialchars(
|
||||
sprintf(
|
||||
@ -3206,6 +3204,15 @@ class PMA_Util
|
||||
}
|
||||
}
|
||||
|
||||
public static function getDefaultFKCheckValue() {
|
||||
if ($GLOBALS['cfg']['DefaultForeignKeyChecks'] === 'enable') {
|
||||
return true;
|
||||
} else if ($GLOBALS['cfg']['DefaultForeignKeyChecks'] === 'disable') {
|
||||
return false;
|
||||
}
|
||||
return ($GLOBALS['dbi']->getVariable('FOREIGN_KEY_CHECKS') == 'ON');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get HTML for Foreign key check checkbox
|
||||
*
|
||||
@ -3213,13 +3220,7 @@ class PMA_Util
|
||||
*/
|
||||
public static function getFKCheckbox()
|
||||
{
|
||||
if ($GLOBALS['cfg']['DefaultForeignKeyChecks'] === 'enable') {
|
||||
$checked = true;
|
||||
} else if ($GLOBALS['cfg']['DefaultForeignKeyChecks'] === 'disable') {
|
||||
$checked = false;
|
||||
} else {
|
||||
$checked = $GLOBALS['dbi']->getVariable('FOREIGN_KEY_CHECKS') == 'ON';
|
||||
}
|
||||
$checked = self::getDefaultFKCheckValue();
|
||||
$html = '<input type="hidden" name="fk_checks" value="0" />';
|
||||
$html .= '<input type="checkbox" name="fk_checks"'
|
||||
. ' id="fk_checks" value="1"'
|
||||
@ -3333,18 +3334,26 @@ class PMA_Util
|
||||
* $cfg['NavigationTreeDefaultTabTable2'],
|
||||
* $cfg['DefaultTabTable'] or $cfg['DefaultTabDatabase']
|
||||
*
|
||||
* @return array
|
||||
* @return string Title for the $cfg value
|
||||
*/
|
||||
public static function getTitleForTarget($target)
|
||||
{
|
||||
$mapping = array(
|
||||
'structure' => __('Structure'),
|
||||
'sql' => __('SQL'),
|
||||
'search' =>__('Search'),
|
||||
'insert' =>__('Insert'),
|
||||
'browse' => __('Browse'),
|
||||
'operations' => __('Operations'),
|
||||
|
||||
// For backward compatiblity
|
||||
|
||||
// Values for $cfg['DefaultTabTable']
|
||||
'tbl_structure.php' => __('Structure'),
|
||||
'tbl_sql.php' => __('SQL'),
|
||||
'tbl_select.php' =>__('Search'),
|
||||
'tbl_change.php' =>__('Insert'),
|
||||
'sql.php' => __('Browse'),
|
||||
|
||||
// Values for $cfg['DefaultTabDatabase']
|
||||
'db_structure.php' => __('Structure'),
|
||||
'db_sql.php' => __('SQL'),
|
||||
@ -3354,6 +3363,91 @@ class PMA_Util
|
||||
return isset($mapping[$target]) ? $mapping[$target] : false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the script name corresponding to a plain English config word
|
||||
* in order to append in links on navigation and main panel
|
||||
*
|
||||
* @param string $target a valid value for $cfg['NavigationTreeDefaultTabTable'],
|
||||
* $cfg['NavigationTreeDefaultTabTable2'],
|
||||
* $cfg['DefaultTabTable'], $cfg['DefaultTabDatabase'] or
|
||||
* $cfg['DefaultTabServer']
|
||||
* @param string $location one out of 'server', 'table', 'database'
|
||||
*
|
||||
* @return string script name corresponding to the config word
|
||||
*/
|
||||
public static function getScriptNameForOption($target, $location)
|
||||
{
|
||||
$retval = '';
|
||||
|
||||
if ($location == 'server') {
|
||||
// Values for $cfg['DefaultTabServer']
|
||||
switch ($target) {
|
||||
case 'welcome':
|
||||
$retval = 'index.php';
|
||||
break;
|
||||
case 'databases':
|
||||
$retval = 'server_databases.php';
|
||||
break;
|
||||
case 'status':
|
||||
$retval = 'server_status.php';
|
||||
break;
|
||||
case 'variables':
|
||||
$retval = 'server_variables.php';
|
||||
break;
|
||||
case 'privileges':
|
||||
$retval = 'server_privileges.php';
|
||||
break;
|
||||
default:
|
||||
$retval = $target;
|
||||
}
|
||||
} elseif ($location == 'database') {
|
||||
// Values for $cfg['DefaultTabDatabase']
|
||||
switch ($target) {
|
||||
case 'structure':
|
||||
$retval = 'db_structure.php';
|
||||
break;
|
||||
case 'sql':
|
||||
$retval = 'db_sql.php';
|
||||
break;
|
||||
case 'search':
|
||||
$retval = 'db_search.php';
|
||||
break;
|
||||
case 'operations':
|
||||
$retval = 'db_operations.php';
|
||||
break;
|
||||
default:
|
||||
$retval = $target;
|
||||
}
|
||||
} elseif ($location == 'table') {
|
||||
// Values for $cfg['DefaultTabTable'],
|
||||
// $cfg['NavigationTreeDefaultTabTable'] and
|
||||
// $cfg['NavigationTreeDefaultTabTable2']
|
||||
switch ($target) {
|
||||
case 'structure':
|
||||
$retval = 'tbl_structure.php';
|
||||
break;
|
||||
case 'sql':
|
||||
$retval = 'tbl_sql.php';
|
||||
break;
|
||||
case 'search':
|
||||
$retval = 'tbl_select.php';
|
||||
break;
|
||||
case 'insert':
|
||||
$retval = 'tbl_change.php';
|
||||
break;
|
||||
case 'browse':
|
||||
$retval = 'sql.php';
|
||||
break;
|
||||
default:
|
||||
$retval = $target;
|
||||
}
|
||||
} else {
|
||||
$retval = $target;
|
||||
}
|
||||
|
||||
return $retval;
|
||||
}
|
||||
|
||||
/**
|
||||
* Formats user string, expanding @VARIABLES@, accepting strftime format
|
||||
* string.
|
||||
|
||||
@ -958,25 +958,25 @@ $cfg['NavigationTreeDisplayDbFilterMinimum'] = 30;
|
||||
* target of the navigation panel quick access icon
|
||||
*
|
||||
* Possible values:
|
||||
* 'tbl_structure.php' = fields list
|
||||
* 'tbl_sql.php' = SQL form
|
||||
* 'tbl_select.php' = search page
|
||||
* 'tbl_change.php' = insert row page
|
||||
* 'sql.php' = browse page
|
||||
* 'structure.php' = fields list
|
||||
* 'sql' = SQL form
|
||||
* 'search' = search page
|
||||
* 'insert' = insert row page
|
||||
* 'browse' = browse page
|
||||
*
|
||||
* @global string $cfg['NavigationTreeDefaultTabTable']
|
||||
*/
|
||||
$cfg['NavigationTreeDefaultTabTable'] = 'tbl_structure.php';
|
||||
$cfg['NavigationTreeDefaultTabTable'] = 'structure';
|
||||
|
||||
/**
|
||||
* target of the navigation panel quick second access icon
|
||||
*
|
||||
* Possible values:
|
||||
* 'tbl_structure.php' = fields list
|
||||
* 'tbl_sql.php' = SQL form
|
||||
* 'tbl_select.php' = search page
|
||||
* 'tbl_change.php' = insert row page
|
||||
* 'sql.php' = browse page
|
||||
* 'structure' = fields list
|
||||
* 'sql' = SQL form
|
||||
* 'search' = search page
|
||||
* 'insert' = insert row page
|
||||
* 'browse' = browse page
|
||||
* '' = no link
|
||||
*
|
||||
* @global string $cfg['NavigationTreeDefaultTabTable2']
|
||||
@ -1285,39 +1285,39 @@ $cfg['PropertiesNumColumns'] = 1;
|
||||
|
||||
/**
|
||||
* Possible values:
|
||||
* 'index.php' = the welcome page
|
||||
* 'welcome' = the welcome page
|
||||
* (recommended for multiuser setups)
|
||||
* 'server_databases.php' = list of databases
|
||||
* 'server_status.php' = runtime information
|
||||
* 'server_variables.php' = MySQL server variables
|
||||
* 'server_privileges.php' = user management
|
||||
* 'databases' = list of databases
|
||||
* 'status' = runtime information
|
||||
* 'variables' = MySQL server variables
|
||||
* 'privileges' = user management
|
||||
*
|
||||
* @global string $cfg['DefaultTabServer']
|
||||
*/
|
||||
$cfg['DefaultTabServer'] = 'index.php';
|
||||
$cfg['DefaultTabServer'] = 'welcome';
|
||||
|
||||
/**
|
||||
* Possible values:
|
||||
* 'db_structure.php' = tables list
|
||||
* 'db_sql.php' = SQL form
|
||||
* 'db_search.php' = search query
|
||||
* 'db_operations.php' = operations on database
|
||||
* 'structure' = tables list
|
||||
* 'sql' = SQL form
|
||||
* 'search' = search query
|
||||
* 'operations' = operations on database
|
||||
*
|
||||
* @global string $cfg['DefaultTabDatabase']
|
||||
*/
|
||||
$cfg['DefaultTabDatabase'] = 'db_structure.php';
|
||||
$cfg['DefaultTabDatabase'] = 'structure';
|
||||
|
||||
/**
|
||||
* Possible values:
|
||||
* 'tbl_structure.php' = fields list
|
||||
* 'tbl_sql.php' = SQL form
|
||||
* 'tbl_select.php' = search page
|
||||
* 'tbl_change.php' = insert row page
|
||||
* 'sql.php' = browse page
|
||||
* 'structure' = fields list
|
||||
* 'sql' = SQL form
|
||||
* 'search' = search page
|
||||
* 'insert' = insert row page
|
||||
* 'browse' = browse page
|
||||
*
|
||||
* @global string $cfg['DefaultTabTable']
|
||||
*/
|
||||
$cfg['DefaultTabTable'] = 'sql.php';
|
||||
$cfg['DefaultTabTable'] = 'browse';
|
||||
|
||||
/**
|
||||
* Whether to display image or text or both image and text in table row
|
||||
|
||||
@ -36,19 +36,19 @@ $cfg_db['OBGzip'] = array('auto', true, false);
|
||||
$cfg_db['MemoryLimit'] = 'short_string';
|
||||
$cfg_db['NavigationLogoLinkWindow'] = array('main', 'new');
|
||||
$cfg_db['NavigationTreeDefaultTabTable'] = array(
|
||||
'tbl_structure.php', // fields list
|
||||
'tbl_sql.php', // SQL form
|
||||
'tbl_select.php', // search page
|
||||
'tbl_change.php', // insert row page
|
||||
'sql.php' // browse page
|
||||
'structure' => __('Structure'), // fields list
|
||||
'sql' => __('SQL'), // SQL form
|
||||
'search' => __('Search'), // search page
|
||||
'insert' => __('Insert'), // insert row page
|
||||
'browse' => __('Browse') // browse page
|
||||
);
|
||||
$cfg_db['NavigationTreeDefaultTabTable2'] = array(
|
||||
'', //don't display
|
||||
'tbl_structure.php', // fields list
|
||||
'tbl_sql.php', // SQL form
|
||||
'tbl_select.php', // search page
|
||||
'tbl_change.php', // insert row page
|
||||
'sql.php' // browse page
|
||||
'structure' => __('Structure'), // fields list
|
||||
'sql' => __('SQL'), // SQL form
|
||||
'search' => __('Search'), // search page
|
||||
'insert' => __('Insert'), // insert row page
|
||||
'browse' => __('Browse') // browse page
|
||||
);
|
||||
$cfg_db['NavigationTreeDbSeparator'] = 'short_string';
|
||||
$cfg_db['NavigationTreeTableSeparator'] = 'short_string';
|
||||
@ -99,24 +99,24 @@ $cfg_db['RelationalDisplay'] = array(
|
||||
'D' => __('display column')
|
||||
);
|
||||
$cfg_db['DefaultTabServer'] = array(
|
||||
'index.php', // the welcome page (recommended for multiuser setups)
|
||||
'server_databases.php', // list of databases
|
||||
'server_status.php', // runtime information
|
||||
'server_variables.php', // MySQL server variables
|
||||
'server_privileges.php' // user management
|
||||
'welcome' => __('Welcome'), // the welcome page (recommended for multiuser setups)
|
||||
'databases' => __('Databases'), // list of databases
|
||||
'status' => __('Status'), // runtime information
|
||||
'variables' => __('Variables'), // MySQL server variables
|
||||
'privileges' => __('Privileges') // user management
|
||||
);
|
||||
$cfg_db['DefaultTabDatabase'] = array(
|
||||
'db_structure.php', // tables list
|
||||
'db_sql.php', // SQL form
|
||||
'db_search.php', // search query
|
||||
'db_operations.php' // operations on database
|
||||
'structure' => __('Structure'), // tables list
|
||||
'sql' => __('SQL'), // SQL form
|
||||
'search' => __('Search'), // search query
|
||||
'operations' => __('Operations') // operations on database
|
||||
);
|
||||
$cfg_db['DefaultTabTable'] = array(
|
||||
'tbl_structure.php', // fields list
|
||||
'tbl_sql.php', // SQL form
|
||||
'tbl_select.php', // search page
|
||||
'tbl_change.php', // insert row page
|
||||
'sql.php' // browse page
|
||||
'structure' => __('Structure'), // fields list
|
||||
'sql' => __('SQL'), // SQL form
|
||||
'search' => __('Search'), // search page
|
||||
'insert' => __('Insert'), // insert row page
|
||||
'browse' => __('Browse') // browse page
|
||||
);
|
||||
$cfg_db['InitialSlidersState'] = array(
|
||||
'open' => __('Open'),
|
||||
|
||||
@ -27,7 +27,10 @@ if ($db_is_system_schema) {
|
||||
* Defines the urls to return to in case of error in a sql statement
|
||||
*/
|
||||
$err_url_0 = 'index.php' . PMA_URL_getCommon();
|
||||
$err_url = $cfg['DefaultTabDatabase']
|
||||
|
||||
$err_url = PMA_Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabDatabase'], 'database'
|
||||
)
|
||||
. PMA_URL_getCommon(array('db' => $db));
|
||||
|
||||
/** @var PMA_String $pmaString */
|
||||
|
||||
@ -125,6 +125,10 @@ $GLOBALS['dummy_queries'] = array(
|
||||
'query' => 'SHOW VARIABLES LIKE \'language\';',
|
||||
'result' => array(),
|
||||
),
|
||||
array(
|
||||
'query' => 'SHOW SESSION VARIABLES LIKE \'FOREIGN_KEY_CHECKS\';',
|
||||
'result' => array('foreign_key_checks', 'ON'),
|
||||
),
|
||||
array(
|
||||
'query' => 'SHOW TABLES FROM `pma_test`;',
|
||||
'result' => array(
|
||||
|
||||
@ -40,8 +40,12 @@ class Node_Database extends Node
|
||||
's_db.png',
|
||||
__('Database operations')
|
||||
);
|
||||
|
||||
$script_name = PMA_Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabDatabase'], 'database'
|
||||
);
|
||||
$this->links = array(
|
||||
'text' => $GLOBALS['cfg']['DefaultTabDatabase']
|
||||
'text' => $script_name
|
||||
. '?server=' . $GLOBALS['server']
|
||||
. '&db=%1$s&token=' . $_SESSION[' PMA_token '],
|
||||
'icon' => 'db_operations.php?server=' . $GLOBALS['server']
|
||||
|
||||
@ -32,36 +32,39 @@ class Node_Table extends Node_DatabaseChild
|
||||
{
|
||||
parent::__construct($name, $type, $is_group);
|
||||
$this->icon = array();
|
||||
$this->_addIcon($GLOBALS['cfg']['NavigationTreeDefaultTabTable']);
|
||||
$this->_addIcon($GLOBALS['cfg']['NavigationTreeDefaultTabTable2']);
|
||||
switch($GLOBALS['cfg']['DefaultTabTable']) {
|
||||
case 'tbl_structure.php':
|
||||
$this->title = __('Structure');
|
||||
break;
|
||||
case 'tbl_select.php':
|
||||
$this->title = __('Search');
|
||||
break;
|
||||
case 'tbl_change.php':
|
||||
$this->title = __('Insert');
|
||||
break;
|
||||
case 'tbl_sql.php':
|
||||
$this->title = __('SQL');
|
||||
break;
|
||||
case 'sql.php':
|
||||
$this->title = __('Browse');
|
||||
break;
|
||||
}
|
||||
$this->_addIcon(
|
||||
PMA_Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['NavigationTreeDefaultTabTable'], 'table'
|
||||
)
|
||||
);
|
||||
$this->_addIcon(
|
||||
PMA_Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['NavigationTreeDefaultTabTable2'], 'table'
|
||||
)
|
||||
);
|
||||
$title = PMA_Util::getTitleForTarget(
|
||||
$GLOBALS['cfg']['DefaultTabTable']
|
||||
);
|
||||
$this->title = $title;
|
||||
|
||||
$script_name = PMA_Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabTable'], 'table'
|
||||
);
|
||||
$this->links = array(
|
||||
'text' => $GLOBALS['cfg']['DefaultTabTable']
|
||||
'text' => $script_name
|
||||
. '?server=' . $GLOBALS['server']
|
||||
. '&db=%2$s&table=%1$s'
|
||||
. '&pos=0&token=' . $_SESSION[' PMA_token '],
|
||||
'icon' => array(
|
||||
$GLOBALS['cfg']['NavigationTreeDefaultTabTable']
|
||||
PMA_Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['NavigationTreeDefaultTabTable'], 'table'
|
||||
)
|
||||
. '?server=' . $GLOBALS['server']
|
||||
. '&db=%2$s&table=%1$s&token='
|
||||
. $_SESSION[' PMA_token '],
|
||||
$GLOBALS['cfg']['NavigationTreeDefaultTabTable2']
|
||||
PMA_Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['NavigationTreeDefaultTabTable2'], 'table'
|
||||
)
|
||||
. '?server=' . $GLOBALS['server']
|
||||
. '&db=%2$s&table=%1$s&token='
|
||||
. $_SESSION[' PMA_token ']
|
||||
|
||||
@ -159,7 +159,9 @@ class AuthenticationConfig extends AuthenticationPlugin
|
||||
<tr>
|
||||
<td>' . "\n";
|
||||
echo '<a href="'
|
||||
. $GLOBALS['cfg']['DefaultTabServer']
|
||||
. PMA_Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabServer'], 'server'
|
||||
)
|
||||
. PMA_URL_getCommon(array()) . '" class="button disableAjax">'
|
||||
. __('Retry to connect')
|
||||
. '</a>' . "\n";
|
||||
|
||||
@ -31,7 +31,10 @@ function PMA_selectServer($not_only_options, $omit_fieldset)
|
||||
|
||||
if ($not_only_options) {
|
||||
$retval .= '<form method="post" action="'
|
||||
. $GLOBALS['cfg']['DefaultTabServer'] . '" class="disableAjax">';
|
||||
. PMA_Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabServer'], 'server'
|
||||
)
|
||||
. '" class="disableAjax">';
|
||||
$retval .= PMA_getHiddenFields(array('token' => $_SESSION[' PMA_token ']));
|
||||
|
||||
if (! $omit_fieldset) {
|
||||
@ -84,7 +87,9 @@ function PMA_selectServer($not_only_options, $omit_fieldset)
|
||||
} else {
|
||||
|
||||
$retval .= '<a class="disableAjax item" href="'
|
||||
. $GLOBALS['cfg']['DefaultTabServer']
|
||||
. PMA_Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabServer'], 'server'
|
||||
)
|
||||
. PMA_URL_getCommon(array('server' => $key))
|
||||
. '" >' . htmlspecialchars($label) . '</a>';
|
||||
}
|
||||
|
||||
@ -2060,7 +2060,9 @@ function PMA_getHtmlForSpecificDbPrivileges($db)
|
||||
. ' '
|
||||
. sprintf(
|
||||
__('Users having access to "%s"'),
|
||||
'<a href="' . $GLOBALS['cfg']['DefaultTabDatabase']
|
||||
'<a href="' . PMA_Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabDatabase'], 'database'
|
||||
)
|
||||
. PMA_URL_getCommon(array('db' => $db)) . '">'
|
||||
. htmlspecialchars($db)
|
||||
. '</a>'
|
||||
@ -2124,7 +2126,9 @@ function PMA_getHtmlForSpecificTablePrivileges($db, $table)
|
||||
. PMA_Util::getIcon('b_usrcheck.png')
|
||||
. sprintf(
|
||||
__('Users having access to "%s"'),
|
||||
'<a href="' . $GLOBALS['cfg']['DefaultTabTable']
|
||||
'<a href="' . PMA_Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabTable'], 'table'
|
||||
)
|
||||
. PMA_URL_getCommon(
|
||||
array(
|
||||
'db' => $db,
|
||||
@ -2757,7 +2761,9 @@ function PMA_getChangeLoginInformationHtmlForm($username, $hostname)
|
||||
function PMA_getLinkToDbAndTable($url_dbname, $dbname, $tablename)
|
||||
{
|
||||
$html_output = '[ ' . __('Database')
|
||||
. ' <a href="' . $GLOBALS['cfg']['DefaultTabDatabase']
|
||||
. ' <a href="' . PMA_Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabDatabase'], 'database'
|
||||
)
|
||||
. PMA_URL_getCommon(
|
||||
array(
|
||||
'db' => $url_dbname,
|
||||
@ -2773,7 +2779,9 @@ function PMA_getLinkToDbAndTable($url_dbname, $dbname, $tablename)
|
||||
|
||||
if (/*overload*/mb_strlen($tablename)) {
|
||||
$html_output .= ' [ ' . __('Table') . ' <a href="'
|
||||
. $GLOBALS['cfg']['DefaultTabTable']
|
||||
. PMA_Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabTable'], 'table'
|
||||
)
|
||||
. PMA_URL_getCommon(
|
||||
array(
|
||||
'db' => $url_dbname,
|
||||
|
||||
@ -65,7 +65,9 @@ $GLOBALS['special_schema_links'] = array(
|
||||
'column_name' => 'Db'
|
||||
),
|
||||
),
|
||||
'default_page' => $GLOBALS['cfg']['DefaultTabTable']
|
||||
'default_page' => PMA_Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabTable'], 'table'
|
||||
)
|
||||
),
|
||||
'column_name' => array(
|
||||
'link_param' => 'field',
|
||||
@ -116,7 +118,9 @@ $GLOBALS['special_schema_links'] = array(
|
||||
'column_name' => 'database_name'
|
||||
),
|
||||
),
|
||||
'default_page' => $GLOBALS['cfg']['DefaultTabTable']
|
||||
'default_page' => PMA_Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabTable'], 'table'
|
||||
)
|
||||
),
|
||||
'index_name' => array(
|
||||
'link_param' => 'index',
|
||||
@ -142,7 +146,9 @@ $GLOBALS['special_schema_links'] = array(
|
||||
'column_name' => 'database_name'
|
||||
),
|
||||
),
|
||||
'default_page' => $GLOBALS['cfg']['DefaultTabTable']
|
||||
'default_page' => PMA_Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabTable'], 'table'
|
||||
)
|
||||
),
|
||||
),
|
||||
'proc' => array(
|
||||
@ -232,7 +238,9 @@ $GLOBALS['special_schema_links'] = array(
|
||||
'column_name' => 'Db'
|
||||
),
|
||||
),
|
||||
'default_page' => $GLOBALS['cfg']['DefaultTabTable']
|
||||
'default_page' => PMA_Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabTable'], 'table'
|
||||
)
|
||||
),
|
||||
),
|
||||
'user' => array(
|
||||
@ -258,7 +266,9 @@ $GLOBALS['special_schema_links'] = array(
|
||||
'column_name' => 'table_schema'
|
||||
)
|
||||
),
|
||||
'default_page' => $GLOBALS['cfg']['DefaultTabTable']
|
||||
'default_page' => PMA_Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabTable'], 'table'
|
||||
)
|
||||
),
|
||||
'column_name' => array(
|
||||
'link_param' => 'field',
|
||||
@ -284,7 +294,9 @@ $GLOBALS['special_schema_links'] = array(
|
||||
'column_name' => 'constraint_schema'
|
||||
)
|
||||
),
|
||||
'default_page' => $GLOBALS['cfg']['DefaultTabTable']
|
||||
'default_page' => PMA_Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabTable'], 'table'
|
||||
)
|
||||
),
|
||||
'column_name' => array(
|
||||
'link_param' => 'field',
|
||||
@ -308,7 +320,9 @@ $GLOBALS['special_schema_links'] = array(
|
||||
'column_name' => 'referenced_table_schema'
|
||||
)
|
||||
),
|
||||
'default_page' => $GLOBALS['cfg']['DefaultTabTable']
|
||||
'default_page' => PMA_Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabTable'], 'table'
|
||||
)
|
||||
),
|
||||
'referenced_column_name' => array(
|
||||
'link_param' => 'field',
|
||||
@ -334,7 +348,9 @@ $GLOBALS['special_schema_links'] = array(
|
||||
'column_name' => 'table_schema'
|
||||
)
|
||||
),
|
||||
'default_page' => $GLOBALS['cfg']['DefaultTabTable']
|
||||
'default_page' => PMA_Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabTable'], 'table'
|
||||
)
|
||||
)
|
||||
),
|
||||
'processlist' => array(
|
||||
@ -358,7 +374,9 @@ $GLOBALS['special_schema_links'] = array(
|
||||
'column_name' => 'constraint_schema'
|
||||
)
|
||||
),
|
||||
'default_page' => $GLOBALS['cfg']['DefaultTabTable']
|
||||
'default_page' => PMA_Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabTable'], 'table'
|
||||
)
|
||||
),
|
||||
'referenced_table_name' => array(
|
||||
'link_param' => 'table',
|
||||
@ -368,7 +386,9 @@ $GLOBALS['special_schema_links'] = array(
|
||||
'column_name' => 'constraint_schema'
|
||||
)
|
||||
),
|
||||
'default_page' => $GLOBALS['cfg']['DefaultTabTable']
|
||||
'default_page' => PMA_Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabTable'], 'table'
|
||||
)
|
||||
)
|
||||
),
|
||||
'routines' => array(
|
||||
@ -390,7 +410,9 @@ $GLOBALS['special_schema_links'] = array(
|
||||
'schemata' => array(
|
||||
'schema_name' => array(
|
||||
'link_param' => 'db',
|
||||
'default_page' => $GLOBALS['cfg']['DefaultTabDatabase']
|
||||
'default_page' => PMA_Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabTable'], 'table'
|
||||
)
|
||||
)
|
||||
),
|
||||
'statistics' => array(
|
||||
@ -402,7 +424,9 @@ $GLOBALS['special_schema_links'] = array(
|
||||
'column_name' => 'table_schema'
|
||||
)
|
||||
),
|
||||
'default_page' => $GLOBALS['cfg']['DefaultTabTable']
|
||||
'default_page' => PMA_Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabTable'], 'table'
|
||||
)
|
||||
),
|
||||
'column_name' => array(
|
||||
'link_param' => 'field',
|
||||
@ -428,7 +452,9 @@ $GLOBALS['special_schema_links'] = array(
|
||||
'column_name' => 'table_schema'
|
||||
)
|
||||
),
|
||||
'default_page' => $GLOBALS['cfg']['DefaultTabTable']
|
||||
'default_page' => PMA_Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabTable'], 'table'
|
||||
)
|
||||
),
|
||||
),
|
||||
'table_constraints' => array(
|
||||
@ -440,7 +466,9 @@ $GLOBALS['special_schema_links'] = array(
|
||||
'column_name' => 'table_schema'
|
||||
)
|
||||
),
|
||||
'default_page' => $GLOBALS['cfg']['DefaultTabTable']
|
||||
'default_page' => PMA_Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabTable'], 'table'
|
||||
)
|
||||
),
|
||||
),
|
||||
'views' => array(
|
||||
@ -452,7 +480,9 @@ $GLOBALS['special_schema_links'] = array(
|
||||
'column_name' => 'table_schema'
|
||||
)
|
||||
),
|
||||
'default_page' => $GLOBALS['cfg']['DefaultTabTable']
|
||||
'default_page' => PMA_Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabTable'], 'table'
|
||||
)
|
||||
),
|
||||
),
|
||||
)
|
||||
|
||||
@ -149,7 +149,9 @@ function PMA_initQueryForm($query)
|
||||
// prepare for db related
|
||||
$db = $GLOBALS['db'];
|
||||
// if you want navigation:
|
||||
$tmp_db_link = '<a href="' . $GLOBALS['cfg']['DefaultTabDatabase']
|
||||
$tmp_db_link = '<a href="' . PMA_Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabDatabase'], 'database'
|
||||
)
|
||||
. PMA_URL_getCommon(array('db' => $db)) . '"';
|
||||
$tmp_db_link .= '>'
|
||||
. htmlspecialchars($db) . '</a>';
|
||||
@ -168,7 +170,9 @@ function PMA_initQueryForm($query)
|
||||
$db, $GLOBALS['table'], null, true
|
||||
);
|
||||
|
||||
$tmp_db_link = '<a href="' . $GLOBALS['cfg']['DefaultTabDatabase']
|
||||
$tmp_db_link = '<a href="' . PMA_Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabDatabase'], 'database'
|
||||
)
|
||||
. PMA_URL_getCommon(array('db' => $db)) . '"';
|
||||
$tmp_db_link .= '>'
|
||||
. htmlspecialchars($db) . '</a>';
|
||||
|
||||
@ -35,9 +35,15 @@ $url_params['table'] = $table;
|
||||
/**
|
||||
* Defines the urls to return to in case of error in a sql statement
|
||||
*/
|
||||
$err_url_0 = $cfg['DefaultTabDatabase']
|
||||
$err_url_0 = PMA_Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabDatabase'], 'database'
|
||||
)
|
||||
. PMA_URL_getCommon(array('db' => $db));
|
||||
$err_url = $cfg['DefaultTabTable'] . PMA_URL_getCommon($url_params);
|
||||
|
||||
$err_url = PMA_Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabTable'], 'table'
|
||||
)
|
||||
. PMA_URL_getCommon($url_params);
|
||||
|
||||
|
||||
/**
|
||||
|
||||
116
po/nb.po
116
po/nb.po
@ -4,10 +4,10 @@ msgstr ""
|
||||
"Project-Id-Version: phpMyAdmin 4.5.0-dev\n"
|
||||
"Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\n"
|
||||
"POT-Creation-Date: 2015-06-11 09:31-0400\n"
|
||||
"PO-Revision-Date: 2015-06-09 13:19+0200\n"
|
||||
"Last-Translator: Børge Holm-Wennberg <borge947@gmail.com>\n"
|
||||
"Language-Team: Norwegian Bokmål <https://hosted.weblate.org/projects/"
|
||||
"phpmyadmin/master/nb/>\n"
|
||||
"PO-Revision-Date: 2015-06-12 17:12+0200\n"
|
||||
"Last-Translator: Kurt Eilertsen <kurt@kheds.com>\n"
|
||||
"Language-Team: Norwegian Bokmål "
|
||||
"<https://hosted.weblate.org/projects/phpmyadmin/master/nb/>\n"
|
||||
"Language: nb\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
@ -2986,10 +2986,9 @@ msgid "Expand"
|
||||
msgstr ""
|
||||
|
||||
#: libraries/Console.class.php:87 libraries/Console.class.php:213
|
||||
#, fuzzy
|
||||
#| msgid "in query"
|
||||
msgid "Requery"
|
||||
msgstr "i spørring"
|
||||
msgstr "Spør igjen"
|
||||
|
||||
#: libraries/Console.class.php:89 libraries/DbSearch.class.php:365
|
||||
#: libraries/DisplayResults.class.php:3521
|
||||
@ -3021,12 +3020,12 @@ msgid "Database"
|
||||
msgstr "Database"
|
||||
|
||||
#: libraries/Console.class.php:100
|
||||
#, fuzzy, php-format
|
||||
#, php-format
|
||||
#| msgid "Delete relation"
|
||||
msgid "Total %d bookmark"
|
||||
msgid_plural "Total %d bookmarks"
|
||||
msgstr[0] "Slett relasjon"
|
||||
msgstr[1] "Slett relasjon"
|
||||
msgstr[0] "Totalt %d bokmerke"
|
||||
msgstr[1] "Totalt %d bokmerker"
|
||||
|
||||
#: libraries/Console.class.php:108
|
||||
msgid "private"
|
||||
@ -3038,28 +3037,25 @@ msgstr "delt"
|
||||
|
||||
#. l10n: First parameter will be replaced with the translation for Total and the number of bookmarks, second one with the translation for private and the third one, with the translation for shared
|
||||
#: libraries/Console.class.php:116
|
||||
#, fuzzy, php-format
|
||||
#, php-format
|
||||
#| msgid "The bookmark has been deleted."
|
||||
msgid "%1$s, %2$s and %3$s bookmarks included"
|
||||
msgstr "Bokmerket er slettet."
|
||||
msgstr "%1$s, %2$s og %3$s bokmerker er inkludert"
|
||||
|
||||
#: libraries/Console.class.php:122
|
||||
#, fuzzy
|
||||
#| msgid "Delete relation"
|
||||
msgid "No bookmarks"
|
||||
msgstr "Slett relasjon"
|
||||
msgstr "Ingen bokmerker"
|
||||
|
||||
#: libraries/Console.class.php:183
|
||||
#, fuzzy
|
||||
#| msgid "Skip current error"
|
||||
msgid "During current session"
|
||||
msgstr "Hopp over nåværende feil"
|
||||
msgstr "Gjennom gjeldende sesjon"
|
||||
|
||||
#: libraries/Console.class.php:215
|
||||
#, fuzzy
|
||||
#| msgid "Explain SQL"
|
||||
msgid "Explain"
|
||||
msgstr "Forklar SQL"
|
||||
msgstr "Forklar"
|
||||
|
||||
#: libraries/Console.class.php:216 libraries/Util.class.php:1291
|
||||
#: libraries/sql.lib.php:278
|
||||
@ -3067,28 +3063,24 @@ msgid "Profiling"
|
||||
msgstr "Profilering"
|
||||
|
||||
#: libraries/Console.class.php:218
|
||||
#, fuzzy
|
||||
#| msgid "Bookmark table"
|
||||
msgid "Bookmark"
|
||||
msgstr "Bokmerketabell"
|
||||
msgstr "Bokmerke"
|
||||
|
||||
#: libraries/Console.class.php:219
|
||||
#, fuzzy
|
||||
#| msgid "Query cache"
|
||||
msgid "Query failed"
|
||||
msgstr "Spørringsmellomlager"
|
||||
msgstr "Spørring feilet"
|
||||
|
||||
#: libraries/Console.class.php:223
|
||||
#, fuzzy
|
||||
#| msgid "Query execution time"
|
||||
msgid "Queried time"
|
||||
msgstr "Spørringens utførelsestid"
|
||||
msgstr "Spørringens tidsforbruk"
|
||||
|
||||
#: libraries/Console.class.php:230
|
||||
#, fuzzy
|
||||
#| msgid "SQL Query box"
|
||||
msgid "SQL Query Console"
|
||||
msgstr "SQL spørringsboks"
|
||||
msgstr "SQL spørrings konsoll"
|
||||
|
||||
#: libraries/Console.class.php:231
|
||||
msgid "Console"
|
||||
@ -3100,10 +3092,9 @@ msgid "Clear"
|
||||
msgstr "Fjern"
|
||||
|
||||
#: libraries/Console.class.php:237
|
||||
#, fuzzy
|
||||
#| msgid "SQL history"
|
||||
msgid "History"
|
||||
msgstr "SQL-historie"
|
||||
msgstr "Historikk"
|
||||
|
||||
#: libraries/Console.class.php:240 libraries/Console.class.php:313
|
||||
#: libraries/DisplayResults.class.php:1726 libraries/import.lib.php:1262
|
||||
@ -3135,15 +3126,13 @@ msgid "Options"
|
||||
msgstr "Innstillinger"
|
||||
|
||||
#: libraries/Console.class.php:244 libraries/Console.class.php:275
|
||||
#, fuzzy
|
||||
#| msgid "Bookmark table"
|
||||
msgid "Bookmarks"
|
||||
msgstr "Bokmerketabell"
|
||||
msgstr "Bokmerker"
|
||||
|
||||
#: libraries/Console.class.php:254
|
||||
#, fuzzy
|
||||
msgid "Press Ctrl+Enter to execute query"
|
||||
msgstr "SQL spørringer"
|
||||
msgstr "Tast Ctrl+Enter for å utføre spørring"
|
||||
|
||||
#: libraries/Console.class.php:256
|
||||
#, fuzzy
|
||||
@ -3158,48 +3147,42 @@ msgid "Refresh"
|
||||
msgstr "Oppdater"
|
||||
|
||||
#: libraries/Console.class.php:282
|
||||
#, fuzzy
|
||||
#| msgid "And"
|
||||
msgid "Add"
|
||||
msgstr "og"
|
||||
msgstr "Legg til"
|
||||
|
||||
#: libraries/Console.class.php:291
|
||||
#, fuzzy
|
||||
#| msgid "Delete relation"
|
||||
msgid "Add bookmark"
|
||||
msgstr "Slett relasjon"
|
||||
msgstr "Legg til bokmerke"
|
||||
|
||||
#: libraries/Console.class.php:295
|
||||
#, fuzzy
|
||||
#| msgid "Label"
|
||||
msgid "Label"
|
||||
msgstr "Navn"
|
||||
msgstr "Etikett"
|
||||
|
||||
#: libraries/Console.class.php:297
|
||||
msgid "Target database"
|
||||
msgstr "Måldatabase"
|
||||
|
||||
#: libraries/Console.class.php:300
|
||||
#, fuzzy
|
||||
#| msgid "Delete relation"
|
||||
msgid "Share this bookmark"
|
||||
msgstr "Slett relasjon"
|
||||
msgstr "Del dette bokmerke"
|
||||
|
||||
#: libraries/Console.class.php:317
|
||||
#, fuzzy
|
||||
#| msgid "Restore default value"
|
||||
msgid "Set default"
|
||||
msgstr "Gjennopprett standard verdi"
|
||||
msgstr "Angi standard"
|
||||
|
||||
#: libraries/Console.class.php:321
|
||||
msgid "Always expand query messages"
|
||||
msgstr ""
|
||||
|
||||
#: libraries/Console.class.php:323
|
||||
#, fuzzy
|
||||
#| msgid "SQL query history table"
|
||||
msgid "Show query history at start"
|
||||
msgstr "SQL spørringshistorietabell"
|
||||
msgstr "Vis spørringshistorikk ved oppstart"
|
||||
|
||||
#: libraries/Console.class.php:325
|
||||
msgid "Show current browsing query"
|
||||
@ -3510,7 +3493,6 @@ msgid "Show BLOB contents"
|
||||
msgstr "Vis BLOB innhold"
|
||||
|
||||
#: libraries/DisplayResults.class.php:1781
|
||||
#, fuzzy
|
||||
#| msgid "Browser transformation"
|
||||
msgid "Hide browser transformation"
|
||||
msgstr "Skjul nettlesertransformasjon"
|
||||
@ -3616,16 +3598,14 @@ msgid "Too many error messages, some are not displayed."
|
||||
msgstr "For mange feilmeldinger, noen vises ikke."
|
||||
|
||||
#: libraries/Error_Handler.class.php:333
|
||||
#, fuzzy
|
||||
#| msgid "Import"
|
||||
msgid "Report"
|
||||
msgstr "Importer"
|
||||
msgstr "Rapporter"
|
||||
|
||||
#: libraries/Error_Handler.class.php:338 libraries/error_report.lib.php:373
|
||||
#, fuzzy
|
||||
#| msgid "Automatically create versions"
|
||||
msgid "Automatically send report next time"
|
||||
msgstr "Automatisk opprette versjoner"
|
||||
msgstr "Automatisk send rapport neste gang"
|
||||
|
||||
#: libraries/File.class.php:225
|
||||
msgid "File was not an uploaded file."
|
||||
@ -3901,10 +3881,9 @@ msgstr "Designer"
|
||||
|
||||
#: libraries/Menu.class.php:500 libraries/Util.class.php:4312
|
||||
#: libraries/structure.lib.php:362
|
||||
#, fuzzy
|
||||
#| msgid "CHAR textarea columns"
|
||||
msgid "Central columns"
|
||||
msgstr "CHAR textarea kolonner"
|
||||
msgstr "Senter kolonner"
|
||||
|
||||
#: libraries/Menu.class.php:537 libraries/Util.class.php:4284
|
||||
#: libraries/config/messages.inc.php:243 libraries/config/messages.inc.php:316
|
||||
@ -4048,7 +4027,6 @@ msgid "SQL query"
|
||||
msgstr "SQL-spørring"
|
||||
|
||||
#: libraries/ServerStatusData.class.php:118
|
||||
#, fuzzy
|
||||
msgid "Handler"
|
||||
msgstr "Behandler"
|
||||
|
||||
@ -4146,20 +4124,20 @@ msgid "Advisor"
|
||||
msgstr "Rådgiver"
|
||||
|
||||
#: libraries/ServerStatusData.class.php:494
|
||||
#, fuzzy, php-format
|
||||
#, php-format
|
||||
#| msgid "Second"
|
||||
msgid "%d second"
|
||||
msgid_plural "%d seconds"
|
||||
msgstr[0] "Sekund"
|
||||
msgstr[1] "Sekund"
|
||||
msgstr[0] "%d sekund"
|
||||
msgstr[1] "%d sekunder"
|
||||
|
||||
#: libraries/ServerStatusData.class.php:499
|
||||
#, fuzzy, php-format
|
||||
#, php-format
|
||||
#| msgid "Minute"
|
||||
msgid "%d minute"
|
||||
msgid_plural "%d minutes"
|
||||
msgstr[0] "Minutt"
|
||||
msgstr[1] "Minutt"
|
||||
msgstr[0] "%d minutt"
|
||||
msgstr[1] "%d minutter"
|
||||
|
||||
#: libraries/StorageEngine.class.php:272
|
||||
msgid ""
|
||||
@ -4256,19 +4234,16 @@ msgid "No index parts defined!"
|
||||
msgstr "Ingen indeksdeler definert!"
|
||||
|
||||
#: libraries/TableSearch.class.php:184
|
||||
#, fuzzy
|
||||
#| msgid "Table Search"
|
||||
msgid "Table search"
|
||||
msgstr "Tabellsøk"
|
||||
|
||||
#: libraries/TableSearch.class.php:191
|
||||
#, fuzzy
|
||||
#| msgid "Zoom Search"
|
||||
msgid "Zoom search"
|
||||
msgstr "Utvidet søk"
|
||||
|
||||
#: libraries/TableSearch.class.php:196 templates/table/selection_form.phtml:59
|
||||
#, fuzzy
|
||||
#| msgid "Find and Replace"
|
||||
msgid "Find and replace"
|
||||
msgstr "Finn og erstatt"
|
||||
@ -4731,10 +4706,9 @@ msgid "The directory you set for upload work cannot be reached."
|
||||
msgstr "Katalogen du anga for opplasting kan ikke nåes."
|
||||
|
||||
#: libraries/Util.class.php:3546
|
||||
#, fuzzy
|
||||
#| msgid "There are no files to upload"
|
||||
msgid "There are no files to upload!"
|
||||
msgstr "Det er ingen filer å laste opp"
|
||||
msgstr "Det er ingen filer å laste opp!"
|
||||
|
||||
#: libraries/Util.class.php:3571 libraries/Util.class.php:3572
|
||||
#: libraries/structure.lib.php:329
|
||||
@ -4842,10 +4816,9 @@ msgid "Could not add %1$s as they already exist in central list!"
|
||||
msgstr ""
|
||||
|
||||
#: libraries/central_columns.lib.php:298
|
||||
#, fuzzy
|
||||
#| msgid "Could not save configuration"
|
||||
msgid "Could not add columns!"
|
||||
msgstr "Kunne ikke lagre konfigurasjonen"
|
||||
msgstr "Kunne ikke legge til kolonner!"
|
||||
|
||||
#: libraries/central_columns.lib.php:373
|
||||
#, php-format
|
||||
@ -4854,10 +4827,9 @@ msgid ""
|
||||
msgstr ""
|
||||
|
||||
#: libraries/central_columns.lib.php:385
|
||||
#, fuzzy
|
||||
#| msgid "Could not save recent table"
|
||||
msgid "Could not remove columns!"
|
||||
msgstr "Kunne ikke lagre tabell"
|
||||
msgstr "Kunne ikke fjerne kolonner!"
|
||||
|
||||
#: libraries/central_columns.lib.php:530
|
||||
msgid "YES"
|
||||
@ -4890,10 +4862,9 @@ msgid "Length/Values"
|
||||
msgstr "Lengde/Sett*"
|
||||
|
||||
#: libraries/central_columns.lib.php:706
|
||||
#, fuzzy
|
||||
#| msgid "Attributes"
|
||||
msgid "Attribute"
|
||||
msgstr "Attributter"
|
||||
msgstr "Attributt"
|
||||
|
||||
#: libraries/central_columns.lib.php:710
|
||||
#: libraries/central_columns.lib.php:1208
|
||||
@ -4901,20 +4872,18 @@ msgid "A_I"
|
||||
msgstr ""
|
||||
|
||||
#: libraries/central_columns.lib.php:750
|
||||
#, fuzzy
|
||||
#| msgid "Select Tables"
|
||||
msgid "Select a table"
|
||||
msgstr "Velg tabeller"
|
||||
msgstr "Velg en tabell"
|
||||
|
||||
#: libraries/central_columns.lib.php:804 libraries/structure.lib.php:1746
|
||||
msgid "Add column"
|
||||
msgstr "Legg til kolonne(r)"
|
||||
|
||||
#: libraries/central_columns.lib.php:816
|
||||
#, fuzzy
|
||||
#| msgid "Select two columns"
|
||||
msgid "Select a column."
|
||||
msgstr "Velg to kolonner"
|
||||
msgstr "Velg en kolonne."
|
||||
|
||||
#: libraries/central_columns.lib.php:1148
|
||||
#, fuzzy
|
||||
@ -15911,10 +15880,9 @@ msgid "Replace with:"
|
||||
msgstr "Erstatt med:"
|
||||
|
||||
#: templates/table/search_and_replace.phtml:22
|
||||
#, fuzzy
|
||||
#| msgid "as regular expression"
|
||||
msgid "Use regular expression"
|
||||
msgstr "som \"regular expression\""
|
||||
msgstr "Bruk \"regulert uttrykk\""
|
||||
|
||||
#: templates/table/selection_form.phtml:12
|
||||
msgid "Do a \"query by example\" (wildcard: \"%\") for two different columns"
|
||||
|
||||
33
po/tr.po
33
po/tr.po
@ -4,16 +4,16 @@ msgstr ""
|
||||
"Project-Id-Version: phpMyAdmin 4.5.0-dev\n"
|
||||
"Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\n"
|
||||
"POT-Creation-Date: 2015-06-11 09:31-0400\n"
|
||||
"PO-Revision-Date: 2015-05-31 16:18+0200\n"
|
||||
"PO-Revision-Date: 2015-06-12 18:12+0200\n"
|
||||
"Last-Translator: Burak Yavuz <hitowerdigit@hotmail.com>\n"
|
||||
"Language-Team: Turkish <https://hosted.weblate.org/projects/phpmyadmin/"
|
||||
"master/tr/>\n"
|
||||
"Language-Team: Turkish "
|
||||
"<https://hosted.weblate.org/projects/phpmyadmin/master/tr/>\n"
|
||||
"Language: tr\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=n > 1;\n"
|
||||
"X-Generator: Weblate 2.3-dev\n"
|
||||
"X-Generator: Weblate 2.4-dev\n"
|
||||
|
||||
#: changelog.php:37 license.php:28
|
||||
#, php-format
|
||||
@ -1034,14 +1034,13 @@ msgid ""
|
||||
msgstr ""
|
||||
|
||||
#: js/messages.php:85
|
||||
#, fuzzy
|
||||
#| msgid "Are you sure you wish to change the collation and convert the data?"
|
||||
msgid ""
|
||||
"Are you sure you wish to change all the column collations and convert the "
|
||||
"data?"
|
||||
msgstr ""
|
||||
"Karşılaştırmayı değiştirmek ve verileri dönüştürmek istediğinizden emin "
|
||||
"misiniz?"
|
||||
"Tüm sütun karşılaştırmalarını değiştirmek ve verileri dönüştürmek "
|
||||
"istediğinizden emin misiniz?"
|
||||
|
||||
#: js/messages.php:88
|
||||
msgid "Save & Close"
|
||||
@ -5019,22 +5018,19 @@ msgid "Never send error reports"
|
||||
msgstr "Hata raporlarını asla gönderme"
|
||||
|
||||
#: libraries/config.values.php:132
|
||||
#, fuzzy
|
||||
#| msgid "Set default"
|
||||
msgid "Server default"
|
||||
msgstr "Varsayılana ayarla"
|
||||
msgstr "Sunucu varsayılanı"
|
||||
|
||||
#: libraries/config.values.php:133
|
||||
#, fuzzy
|
||||
#| msgid "Enabled"
|
||||
msgid "Enable"
|
||||
msgstr "Etkinleştirildi"
|
||||
msgstr "Etkinleştir"
|
||||
|
||||
#: libraries/config.values.php:134
|
||||
#, fuzzy
|
||||
#| msgid "Disabled"
|
||||
msgid "Disable"
|
||||
msgstr "Etkisizleştirildi"
|
||||
msgstr "Etkisizleştir"
|
||||
|
||||
#: libraries/config.values.php:163
|
||||
#: libraries/plugins/export/ExportHtmlword.class.php:69
|
||||
@ -5902,10 +5898,9 @@ msgstr ""
|
||||
"kontrol eder."
|
||||
|
||||
#: libraries/config/messages.inc.php:218
|
||||
#, fuzzy
|
||||
#| msgid "Foreign key check:"
|
||||
msgid "Foreign key checks"
|
||||
msgstr "Dış anahtar kontrolü:"
|
||||
msgstr "Dış anahtar kontrolleri"
|
||||
|
||||
#: libraries/config/messages.inc.php:219
|
||||
msgid "Browse mode"
|
||||
@ -6546,7 +6541,6 @@ msgstr ""
|
||||
"Veritabanı süzgeci kutusunu görüntülemek için en az veritabanı sayısıdır"
|
||||
|
||||
#: libraries/config/messages.inc.php:467
|
||||
#, fuzzy
|
||||
#| msgid ""
|
||||
#| "Group items in the navigation tree (determined by the separator defined "
|
||||
#| "below)."
|
||||
@ -6554,8 +6548,8 @@ msgid ""
|
||||
"Group items in the navigation tree (determined by the separator defined in "
|
||||
"the Databases and Tables tabs above)."
|
||||
msgstr ""
|
||||
"Gezinti ağacındaki öğeleri gruplar (aşağıda tanımlanan ayıraç tarafından "
|
||||
"belirlenir)."
|
||||
"Gezinti ağacındaki öğeleri gruplar (Veritabanları ve Tablolar sekmeleri "
|
||||
"üzerini tanımlanan ayıraç tarafından belirlenir)."
|
||||
|
||||
#: libraries/config/messages.inc.php:469
|
||||
msgid "Group items in the tree"
|
||||
@ -9588,10 +9582,9 @@ msgid "Storage Engine"
|
||||
msgstr "Depolama Motoru"
|
||||
|
||||
#: libraries/operations.lib.php:995
|
||||
#, fuzzy
|
||||
#| msgid "Make all columns atomic"
|
||||
msgid "Change all column collations"
|
||||
msgstr "Tüm sütunları çok küçük yap"
|
||||
msgstr "Tüm sütun karşılaştırmalarını değiştir"
|
||||
|
||||
#: libraries/operations.lib.php:1164
|
||||
msgid "Copy table to (database<b>.</b>table)"
|
||||
|
||||
8
sql.php
8
sql.php
@ -54,9 +54,13 @@ if (! empty($goto)) {
|
||||
}
|
||||
} else {
|
||||
if (empty($table)) {
|
||||
$goto = $cfg['DefaultTabDatabase'];
|
||||
$goto = PMA_Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabDatabase'], 'database'
|
||||
);
|
||||
} else {
|
||||
$goto = $cfg['DefaultTabTable'];
|
||||
$goto = PMA_Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabTable'], 'table'
|
||||
);
|
||||
}
|
||||
$is_gotofile = true;
|
||||
} // end if
|
||||
|
||||
@ -81,17 +81,23 @@ $scripts->addFile('jqplot/plugins/jqplot.highlighter.js');
|
||||
* Runs common work
|
||||
*/
|
||||
if (/*overload*/mb_strlen($GLOBALS['table'])) {
|
||||
$url_params['goto'] = $cfg['DefaultTabTable'];
|
||||
$url_params['goto'] = PMA_Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabTable'], 'table'
|
||||
);
|
||||
$url_params['back'] = 'tbl_sql.php';
|
||||
include 'libraries/tbl_common.inc.php';
|
||||
include 'libraries/tbl_info.inc.php';
|
||||
} elseif (/*overload*/mb_strlen($GLOBALS['db'])) {
|
||||
$url_params['goto'] = $cfg['DefaultTabDatabase'];
|
||||
$url_params['goto'] = PMA_Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabDatabase'], 'database'
|
||||
);
|
||||
$url_params['back'] = 'sql.php';
|
||||
include 'libraries/db_common.inc.php';
|
||||
include 'libraries/db_info.inc.php';
|
||||
} else {
|
||||
$url_params['goto'] = $cfg['DefaultTabServer'];
|
||||
$url_params['goto'] = PMA_Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabServer'], 'server'
|
||||
);
|
||||
$url_params['back'] = 'sql.php';
|
||||
include 'libraries/server_common.inc.php';
|
||||
}
|
||||
@ -134,14 +140,17 @@ $url_params['reload'] = 1;
|
||||
/**
|
||||
* Displays the page
|
||||
*/
|
||||
$response->addHTML(Template::get('tbl_chart')->render(
|
||||
array(
|
||||
'url_query' => $url_query,
|
||||
'url_params' => $url_params,
|
||||
'keys' => $keys,
|
||||
'fields_meta' => $fields_meta,
|
||||
'numeric_types' => $numeric_types,
|
||||
'numeric_column_count' => $numeric_column_count,
|
||||
'sql_query' => $sql_query
|
||||
)
|
||||
));
|
||||
$response->addHTML(
|
||||
Template::get('tbl_chart')
|
||||
->render(
|
||||
array(
|
||||
'url_query' => $url_query,
|
||||
'url_params' => $url_params,
|
||||
'keys' => $keys,
|
||||
'fields_meta' => $fields_meta,
|
||||
'numeric_types' => $numeric_types,
|
||||
'numeric_column_count' => $numeric_column_count,
|
||||
'sql_query' => $sql_query
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
@ -54,7 +54,9 @@ if (isset($_POST['replace'])) {
|
||||
}
|
||||
|
||||
if (! isset($goto)) {
|
||||
$goto = $GLOBALS['cfg']['DefaultTabTable'];
|
||||
$goto = PMA_Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabTable'], 'table'
|
||||
);
|
||||
}
|
||||
// Defines the url to return to in case of error in the next sql statement
|
||||
$params = array('db' => $db, 'table' => $table);
|
||||
|
||||
@ -10,7 +10,9 @@ require_once 'libraries/common.inc.php';
|
||||
|
||||
// Runs common work
|
||||
require_once 'libraries/db_common.inc.php';
|
||||
$url_params['goto'] = $cfg['DefaultTabDatabase'];
|
||||
$url_params['goto'] = PMA_Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabDatabase'], 'database'
|
||||
);
|
||||
$url_params['back'] = 'sql.php';
|
||||
|
||||
// Import visualization functions
|
||||
|
||||
@ -47,9 +47,11 @@ if (isset($_REQUEST['do_save_data'])) {
|
||||
PMA_Response::getInstance()->addJSON(
|
||||
'sql_data',
|
||||
PMA\Template::get('preview_sql')
|
||||
->render(array(
|
||||
'query_data' => $sql_query
|
||||
))
|
||||
->render(
|
||||
array(
|
||||
'query_data' => $sql_query
|
||||
)
|
||||
)
|
||||
);
|
||||
} elseif (!$error) {
|
||||
|
||||
@ -121,7 +123,8 @@ if (isset($_REQUEST['create_index'])) {
|
||||
}
|
||||
|
||||
$response = PMA_Response::getInstance();
|
||||
$response->addHTML(PMA\Template::get('index_form')
|
||||
$response->addHTML(
|
||||
PMA\Template::get('index_form')
|
||||
->render(
|
||||
array(
|
||||
'fields' => $fields,
|
||||
|
||||
@ -53,7 +53,9 @@ if (! isset($_POST['columnsToDisplay']) && ! isset($_POST['displayAllColumns']))
|
||||
include_once 'libraries/tbl_info.inc.php';
|
||||
|
||||
if (! isset($goto)) {
|
||||
$goto = $GLOBALS['cfg']['DefaultTabTable'];
|
||||
$goto = PMA_Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabTable'], 'table'
|
||||
);
|
||||
}
|
||||
// Defines the url to return to in case of error in the next sql statement
|
||||
$err_url = $goto . PMA_URL_getCommon(array('db' => $db, 'table' => $table));
|
||||
|
||||
@ -97,7 +97,9 @@ $url_query .= '&goto=tbl_select.php&back=tbl_select.php';
|
||||
require_once './libraries/tbl_info.inc.php';
|
||||
|
||||
if (! isset($goto)) {
|
||||
$goto = $GLOBALS['cfg']['DefaultTabTable'];
|
||||
$goto = PMA_Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabTable'], 'table'
|
||||
);
|
||||
}
|
||||
// Defines the url to return to in case of error in the next sql statement
|
||||
$err_url = $goto . PMA_URL_getCommon(array('db' => $db, 'table' => $table));
|
||||
|
||||
@ -60,7 +60,7 @@ class PMA_Footer_Test extends PHPUnit_Framework_TestCase
|
||||
$GLOBALS['PMA_Config']->enableBc();
|
||||
$GLOBALS['collation_connection'] = 'utf8_general_ci';
|
||||
$GLOBALS['cfg']['Server']['verbose'] = 'verbose host';
|
||||
$GLOBALS['cfg']['DefaultTabDatabase'] = 'db_structure.php';
|
||||
$GLOBALS['cfg']['DefaultTabDatabase'] = 'structure';
|
||||
$GLOBALS['server'] = '1';
|
||||
$_GET['reload_left_frame'] = '1';
|
||||
$GLOBALS['focus_querywindow'] = 'main_pane_left';
|
||||
|
||||
@ -47,9 +47,9 @@ class PMA_Menu_Test extends PHPUnit_Framework_TestCase
|
||||
$_SESSION['PMA_Theme'] = new PMA_Theme();
|
||||
$GLOBALS['pmaThemePath'] = $_SESSION['PMA_Theme']->getPath();
|
||||
$GLOBALS['pmaThemeImage'] = 'theme/';
|
||||
$GLOBALS['cfg']['DefaultTabServer'] = 'main.php';
|
||||
$GLOBALS['cfg']['DefaultTabDatabase'] = 'db_structure.php';
|
||||
$GLOBALS['cfg']['DefaultTabTable'] = 'sql.php';
|
||||
$GLOBALS['cfg']['DefaultTabServer'] = 'welcome';
|
||||
$GLOBALS['cfg']['DefaultTabDatabase'] = 'structure';
|
||||
$GLOBALS['cfg']['DefaultTabTable'] = 'browse';
|
||||
$GLOBALS['cfg']['OBGzip'] = false;
|
||||
$GLOBALS['cfg']['NaturalOrder'] = true;
|
||||
$GLOBALS['cfg']['TabsMode'] = 'both';
|
||||
|
||||
@ -69,7 +69,7 @@ class PMA_DBI_Drizzle_Test extends PHPUnit_Framework_TestCase
|
||||
$GLOBALS['cfg']['Server']['ssl'] = false;
|
||||
$GLOBALS['cfg']['MaxCharactersInDisplayedSQL'] = 1000;
|
||||
$GLOBALS['cfg']['ActionLinksMode'] = "both";
|
||||
$GLOBALS['cfg']['DefaultTabDatabase'] = 'db_structure.php';
|
||||
$GLOBALS['cfg']['DefaultTabDatabase'] = 'structure';
|
||||
$GLOBALS['pmaThemeImage'] = 'image';
|
||||
|
||||
//$_SESSION
|
||||
|
||||
@ -38,7 +38,7 @@ class Node_DatabaseChildTest extends PHPUnit_Framework_TestCase
|
||||
$_SESSION['PMA_Theme'] = new PMA_Theme();
|
||||
$GLOBALS['pmaThemePath'] = $_SESSION['PMA_Theme']->getPath();
|
||||
$GLOBALS['pmaThemeImage'] = 'theme/';
|
||||
$GLOBALS['cfg']['DefaultTabDatabase'] = 'db_structure.php';
|
||||
$GLOBALS['cfg']['DefaultTabDatabase'] = 'structure';
|
||||
$GLOBALS['server'] = 1;
|
||||
$GLOBALS['cfg']['ServerDefault'] = 1;
|
||||
$_SESSION['relation'][1]['navwork'] = true;
|
||||
|
||||
@ -26,7 +26,7 @@ class Node_Database_Test extends PHPUnit_Framework_TestCase
|
||||
public function setup()
|
||||
{
|
||||
$GLOBALS['server'] = 0;
|
||||
$GLOBALS['cfg']['DefaultTabDatabase'] = 'db_structure.php';
|
||||
$GLOBALS['cfg']['DefaultTabDatabase'] = 'structure';
|
||||
$GLOBALS['cfg']['MaxNavigationItems'] = 250;
|
||||
$_SESSION['PMA_Theme'] = PMA_Theme::load('./themes/pmahomme');
|
||||
}
|
||||
|
||||
@ -27,7 +27,8 @@ class Node_Table_Test extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
$GLOBALS['server'] = 0;
|
||||
$GLOBALS['cfg']['NavigationTreeDefaultTabTable'] = 'b_browse';
|
||||
$GLOBALS['cfg']['DefaultTabTable'] = 'sql.php';
|
||||
$GLOBALS['cfg']['NavigationTreeDefaultTabTable2'] = '';
|
||||
$GLOBALS['cfg']['DefaultTabTable'] = 'browse';
|
||||
$GLOBALS['cfg']['MaxNavigationItems'] = 250;
|
||||
$GLOBALS['cfg']['NavigationTreeEnableGrouping'] = true;
|
||||
$GLOBALS['cfg']['NavigationTreeDbSeparator'] = '_';
|
||||
@ -80,11 +81,11 @@ class Node_Table_Test extends PHPUnit_Framework_TestCase
|
||||
public function providerForTestIcon()
|
||||
{
|
||||
return array(
|
||||
array('tbl_structure.php', 'b_props'),
|
||||
array('tbl_select.php', 'b_search'),
|
||||
array('tbl_change.php', 'b_insrow'),
|
||||
array('tbl_sql.php', 'b_sql'),
|
||||
array('sql.php', 'b_browse'),
|
||||
array('structure', 'b_props'),
|
||||
array('search', 'b_search'),
|
||||
array('insert', 'b_insrow'),
|
||||
array('sql', 'b_sql'),
|
||||
array('browse', 'b_browse'),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -35,6 +35,7 @@ class PMA_AuthenticationConfig_Test extends PHPUnit_Framework_TestCase
|
||||
$GLOBALS['PMA_Config'] = new PMA_Config();
|
||||
$GLOBALS['PMA_Config']->enableBc();
|
||||
$GLOBALS['server'] = 0;
|
||||
$GLOBALS['cfg']['DefaultTabServer'] = 'welcome';
|
||||
$GLOBALS['token_provided'] = true;
|
||||
$GLOBALS['token_mismatch'] = false;
|
||||
$this->object = new AuthenticationConfig();
|
||||
|
||||
@ -48,7 +48,7 @@ class PMA_BuildHtmlForDb_Test extends PHPUnit_Framework_TestCase
|
||||
$GLOBALS['pmaThemePath'] = $_SESSION['PMA_Theme']->getPath();
|
||||
$GLOBALS['pmaThemeImage'] = 'theme/';
|
||||
|
||||
$GLOBALS['cfg']['DefaultTabDatabase'] = 'db_structure.php';
|
||||
$GLOBALS['cfg']['DefaultTabDatabase'] = 'structure';
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -69,7 +69,7 @@ class PMA_SelectServer_Test extends PHPUnit_Framework_TestCase
|
||||
$not_only_options = false;
|
||||
$omit_fieldset = false;
|
||||
|
||||
$GLOBALS['cfg']['DefaultTabServer'] = "DefaultTabServer";
|
||||
$GLOBALS['cfg']['DefaultTabServer'] = "welcome";
|
||||
|
||||
$GLOBALS['cfg']['Servers'] = array(
|
||||
'0' => array(
|
||||
@ -119,7 +119,9 @@ class PMA_SelectServer_Test extends PHPUnit_Framework_TestCase
|
||||
|
||||
//$GLOBALS['cfg']['DefaultTabServer']
|
||||
$this->assertContains(
|
||||
$GLOBALS['cfg']['DefaultTabServer'],
|
||||
PMA_Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabServer'], 'server'
|
||||
),
|
||||
$html
|
||||
);
|
||||
|
||||
|
||||
@ -59,7 +59,7 @@ class PMA_ServerDatabases_Test extends PHPUnit_Framework_TestCase
|
||||
$GLOBALS['cfg']['LimitChars'] = 100;
|
||||
$GLOBALS['cfg']['DBG']['sql'] = false;
|
||||
$GLOBALS['cfg']['ActionLinksMode'] = "both";
|
||||
$GLOBALS['cfg']['DefaultTabDatabase'] = 'db_structure.php';
|
||||
$GLOBALS['cfg']['DefaultTabDatabase'] = 'structure';
|
||||
|
||||
$GLOBALS['table'] = "table";
|
||||
$GLOBALS['replication_info']['master']['status'] = false;
|
||||
|
||||
@ -64,10 +64,10 @@ class PMA_ServerPrivileges_Test extends PHPUnit_Framework_TestCase
|
||||
$GLOBALS['cfg']['LimitChars'] = 100;
|
||||
$GLOBALS['cfg']['AllowThirdPartyFraming'] = false;
|
||||
$GLOBALS['cfg']['ActionLinksMode'] = "both";
|
||||
$GLOBALS['cfg']['DefaultTabDatabase'] = 'db_structure.php';
|
||||
$GLOBALS['cfg']['DefaultTabDatabase'] = 'structure';
|
||||
$GLOBALS['cfg']['PmaAbsoluteUri'] = "PmaAbsoluteUri";
|
||||
$GLOBALS['cfg']['DefaultTabTable'] = "db_structure.php";
|
||||
$GLOBALS['cfg']['NavigationTreeDefaultTabTable'] = "db_structure.php";
|
||||
$GLOBALS['cfg']['DefaultTabTable'] = "structure";
|
||||
$GLOBALS['cfg']['NavigationTreeDefaultTabTable'] = "structure";
|
||||
$GLOBALS['cfg']['Confirm'] = "Confirm";
|
||||
$GLOBALS['cfg']['ShowHint'] = true;
|
||||
|
||||
@ -1672,7 +1672,9 @@ class PMA_ServerPrivileges_Test extends PHPUnit_Framework_TestCase
|
||||
$html
|
||||
);
|
||||
$this->assertContains(
|
||||
$GLOBALS['cfg']['DefaultTabDatabase'],
|
||||
PMA_Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabDatabase'], 'database'
|
||||
),
|
||||
$html
|
||||
);
|
||||
$item = PMA_URL_getCommon(
|
||||
@ -1696,7 +1698,9 @@ class PMA_ServerPrivileges_Test extends PHPUnit_Framework_TestCase
|
||||
$html
|
||||
);
|
||||
$this->assertContains(
|
||||
$GLOBALS['cfg']['DefaultTabTable'],
|
||||
PMA_Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabTable'], 'table'
|
||||
),
|
||||
$html
|
||||
);
|
||||
$item = PMA_URL_getCommon(
|
||||
|
||||
@ -57,7 +57,7 @@ class PMA_SqlQueryForm_Test extends PHPUnit_Framework_TestCase
|
||||
$GLOBALS['cfg']['TextareaAutoSelect'] = true;
|
||||
$GLOBALS['cfg']['TextareaRows'] = 100;
|
||||
$GLOBALS['cfg']['TextareaCols'] = 11;
|
||||
$GLOBALS['cfg']['DefaultTabDatabase'] = "default_database";
|
||||
$GLOBALS['cfg']['DefaultTabDatabase'] = "structure";
|
||||
$GLOBALS['cfg']['RetainQueryBox'] = true;
|
||||
$GLOBALS['cfg']['ActionLinksMode'] = 'both';
|
||||
|
||||
|
||||
@ -122,7 +122,9 @@ class PMA_TblIndexTest extends PHPUnit_Framework_TestCase
|
||||
* );
|
||||
* $add_fields = 3;
|
||||
*
|
||||
* $html = PMA_getHtmlForIndexForm($fields, $index, $form_params, $add_fields);
|
||||
* $html = PMA_getHtmlForIndexForm(
|
||||
* $fields, $index, $form_params, $add_fields
|
||||
* );
|
||||
*
|
||||
* //PMA_URL_getHiddenInputs
|
||||
* $this->assertContains(
|
||||
|
||||
@ -62,7 +62,11 @@ class PMA_GetDbLink_Test extends PHPUnit_Framework_TestCase
|
||||
$GLOBALS['db'] = 'test_db';
|
||||
$database = $GLOBALS['db'];
|
||||
$this->assertEquals(
|
||||
'<a href="' . $cfg['DefaultTabDatabase'] . '?db=' . $database
|
||||
'<a href="'
|
||||
. PMA_Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabDatabase'], 'database'
|
||||
)
|
||||
. '?db=' . $database
|
||||
. '&server=99&lang=en&token=token" '
|
||||
. 'title="Jump to database "'
|
||||
. htmlspecialchars($database) . '".">'
|
||||
@ -81,7 +85,10 @@ class PMA_GetDbLink_Test extends PHPUnit_Framework_TestCase
|
||||
global $cfg;
|
||||
$database = 'test_database';
|
||||
$this->assertEquals(
|
||||
'<a href="' . $cfg['DefaultTabDatabase'] . '?db=' . $database
|
||||
'<a href="' . PMA_Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabDatabase'], 'database'
|
||||
)
|
||||
. '?db=' . $database
|
||||
. '&server=99&lang=en&token=token" title="Jump to database "'
|
||||
. htmlspecialchars($database) . '".">'
|
||||
. htmlspecialchars($database) . '</a>',
|
||||
@ -99,7 +106,11 @@ class PMA_GetDbLink_Test extends PHPUnit_Framework_TestCase
|
||||
global $cfg;
|
||||
$database = 'test&data\'base';
|
||||
$this->assertEquals(
|
||||
'<a href="' . $cfg['DefaultTabDatabase'] . '?db='
|
||||
'<a href="'
|
||||
. PMA_Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabDatabase'], 'database'
|
||||
)
|
||||
. '?db='
|
||||
. htmlspecialchars(urlencode($database))
|
||||
. '&server=99&lang=en&token=token" title="Jump to database "'
|
||||
. htmlspecialchars($database) . '".">'
|
||||
|
||||
@ -52,7 +52,9 @@ $item = '<a href="%1$s?%2$s" class="item">'
|
||||
echo '<div id="serverinfo">' . "\n";
|
||||
printf(
|
||||
$item,
|
||||
$GLOBALS['cfg']['DefaultTabServer'],
|
||||
PMA_Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabserver'], 'server'
|
||||
),
|
||||
PMA_URL_getCommon(),
|
||||
'Server',
|
||||
__('Server'),
|
||||
@ -62,7 +64,9 @@ printf(
|
||||
echo $separator;
|
||||
printf(
|
||||
$item,
|
||||
$GLOBALS['cfg']['DefaultTabDatabase'],
|
||||
PMA_Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabDatabase'], 'database'
|
||||
),
|
||||
'',
|
||||
'Database',
|
||||
__('Database'),
|
||||
@ -72,7 +76,9 @@ printf(
|
||||
echo $separator;
|
||||
printf(
|
||||
$item,
|
||||
$GLOBALS['cfg']['DefaultTabTable'],
|
||||
PMA_Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabTable'], 'table'
|
||||
),
|
||||
'',
|
||||
'Table',
|
||||
(isset($GLOBALS['tbl_is_view']) && $GLOBALS['tbl_is_view']
|
||||
|
||||
Loading…
Reference in New Issue
Block a user