Merge branch 'master' of ssh://phpmyadmin.git.sourceforge.net/gitroot/phpmyadmin/phpmyadmin
This commit is contained in:
commit
994606bb23
@ -1,6 +1,10 @@
|
||||
phpMyAdmin - ChangeLog
|
||||
======================
|
||||
|
||||
3.5.0.0 (not yet released)
|
||||
|
||||
3.4.1.0 (not yet released)
|
||||
|
||||
3.4.0.0 (not yet released)
|
||||
+ rfe #2890226 [view] Enable VIEW rename
|
||||
+ rfe #838637 [privileges] Export a user's privileges
|
||||
@ -154,6 +158,7 @@
|
||||
- bug #3134495 [synchronization] Data containing single quotes prevents sync,
|
||||
thanks to jviewer
|
||||
- Remove the custom color picker feature
|
||||
- bug #3285929 [privileges] Don't fail silently on missing priviledge to execute REVOKE ALL PRIVILEGES
|
||||
|
||||
3.3.11.0 (not yet released)
|
||||
|
||||
|
||||
@ -9,7 +9,7 @@ vim: expandtab ts=4 sw=4 sts=4 tw=78
|
||||
<link rel="icon" href="./favicon.ico" type="image/x-icon" />
|
||||
<link rel="shortcut icon" href="./favicon.ico" type="image/x-icon" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>phpMyAdmin 3.4.0-rc2-dev - Documentation</title>
|
||||
<title>phpMyAdmin 3.5.0-dev - Documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="docs.css" />
|
||||
</head>
|
||||
|
||||
@ -17,7 +17,7 @@ vim: expandtab ts=4 sw=4 sts=4 tw=78
|
||||
<div id="header">
|
||||
<h1>
|
||||
<a href="http://www.phpmyadmin.net/">php<span class="myadmin">MyAdmin</span></a>
|
||||
3.4.0-rc2-dev
|
||||
3.5.0-dev
|
||||
Documentation
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
2
README
2
README
@ -1,7 +1,7 @@
|
||||
phpMyAdmin - Readme
|
||||
===================
|
||||
|
||||
Version 3.4.0-rc2-dev
|
||||
Version 3.5.0-dev
|
||||
|
||||
A set of PHP-scripts to manage MySQL over the web.
|
||||
|
||||
|
||||
@ -27,7 +27,7 @@ $foreigners = ($cfgRelation['relwork'] ? PMA_getForeigners($db, $table) : FALSE
|
||||
|
||||
$override_total = TRUE;
|
||||
|
||||
if (!isset($pos)) {
|
||||
if (! isset($pos)) {
|
||||
$pos = 0;
|
||||
}
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
*/
|
||||
require_once './libraries/common.inc.php';
|
||||
|
||||
if (!isset($selected_tbl)) {
|
||||
if (! isset($selected_tbl)) {
|
||||
require_once './libraries/header.inc.php';
|
||||
}
|
||||
|
||||
@ -220,7 +220,7 @@ while ($row = PMA_DBI_fetch_assoc($rowset)) {
|
||||
if ($zerofill) {
|
||||
$attribute = 'UNSIGNED ZEROFILL';
|
||||
}
|
||||
if (!isset($row['Default'])) {
|
||||
if (! isset($row['Default'])) {
|
||||
if ($row['Null'] != 'NO') {
|
||||
$row['Default'] = '<i>NULL</i>';
|
||||
}
|
||||
|
||||
@ -37,7 +37,7 @@ if (strlen($db) && (! empty($db_rename) || ! empty($db_copy))) {
|
||||
$move = false;
|
||||
}
|
||||
|
||||
if (!isset($newname) || !strlen($newname)) {
|
||||
if (! isset($newname) || ! strlen($newname)) {
|
||||
$message = PMA_Message::error(__('The database name is empty!'));
|
||||
} else {
|
||||
$sql_query = ''; // in case target db exists
|
||||
@ -349,11 +349,6 @@ if ($db == 'information_schema') {
|
||||
}
|
||||
|
||||
if (!$is_information_schema) {
|
||||
?>
|
||||
<div class="operations_half_width">
|
||||
<?php require './libraries/display_create_table.lib.php'; ?>
|
||||
</div>
|
||||
<?php
|
||||
if ($cfgRelation['commwork']) {
|
||||
/**
|
||||
* database comment
|
||||
@ -377,6 +372,11 @@ if (!$is_information_schema) {
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<div class="operations_half_width">
|
||||
<?php require './libraries/display_create_table.lib.php'; ?>
|
||||
</div>
|
||||
<?php
|
||||
/**
|
||||
* rename database
|
||||
*/
|
||||
@ -561,7 +561,7 @@ echo __('Remove database');
|
||||
. '</form></div>' . "\n";
|
||||
|
||||
if ($num_tables > 0
|
||||
&& !$cfgRelation['allworks'] && $cfg['PmaNoRelation_DisableWarning'] == false) {
|
||||
&& ! $cfgRelation['allworks'] && $cfg['PmaNoRelation_DisableWarning'] == false) {
|
||||
$message = PMA_Message::notice(__('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 . '">', false);
|
||||
$message->addParam('</a>', false);
|
||||
|
||||
@ -52,7 +52,7 @@ if ($cfg['SkipLockedTables'] == true) {
|
||||
$result = PMA_DBI_query('SHOW TABLES FROM ' . PMA_backquote($db) . ';', null, PMA_DBI_QUERY_STORE);
|
||||
if ($result != false && PMA_DBI_num_rows($result) > 0) {
|
||||
while ($tmp = PMA_DBI_fetch_row($result)) {
|
||||
if (!isset($sot_cache[$tmp[0]])) {
|
||||
if (! isset($sot_cache[$tmp[0]])) {
|
||||
$sts_result = PMA_DBI_query('SHOW TABLE STATUS FROM ' . PMA_backquote($db) . ' LIKE \'' . addslashes($tmp[0]) . '\';');
|
||||
$sts_tmp = PMA_DBI_fetch_assoc($sts_result);
|
||||
$tables[] = $sts_tmp;
|
||||
|
||||
43
db_qbe.php
43
db_qbe.php
@ -18,26 +18,29 @@ $cfgRelation = PMA_getRelationsParam();
|
||||
|
||||
|
||||
/**
|
||||
* A query has been submitted -> execute it, else display the headers
|
||||
* A query has been submitted -> (maybe) execute it
|
||||
*/
|
||||
$message_to_display = false;
|
||||
if (isset($_REQUEST['submit_sql']) && ! empty($sql_query)) {
|
||||
$goto = 'db_sql.php';
|
||||
$message_to_show = htmlspecialchars(__('Your SQL query has been executed successfully'));
|
||||
require './sql.php';
|
||||
exit;
|
||||
} else {
|
||||
$sub_part = '_qbe';
|
||||
require './libraries/db_common.inc.php';
|
||||
$url_query .= '&goto=db_qbe.php';
|
||||
$url_params['goto'] = 'db_qbe.php';
|
||||
require './libraries/db_info.inc.php';
|
||||
if (! preg_match('@^SELECT@i', $sql_query)) {
|
||||
$message_to_display = true;
|
||||
} else {
|
||||
$goto = 'db_sql.php';
|
||||
require './sql.php';
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($_REQUEST['submit_sql'])
|
||||
&& ! preg_match('@^SELECT@i', $sql_query)) {
|
||||
PMA_Message::warning(__('You have to choose at least one column to display'))->display();
|
||||
}
|
||||
$sub_part = '_qbe';
|
||||
require './libraries/db_common.inc.php';
|
||||
$url_query .= '&goto=db_qbe.php';
|
||||
$url_params['goto'] = 'db_qbe.php';
|
||||
require './libraries/db_info.inc.php';
|
||||
|
||||
if ($message_to_display) {
|
||||
PMA_Message::error(__('You have to choose at least one column to display'))->display();
|
||||
}
|
||||
unset($message_to_display);
|
||||
|
||||
/**
|
||||
* Initialize some variables
|
||||
@ -336,7 +339,7 @@ for ($x = 0; $x < $col; $x++) {
|
||||
if (isset($criteria[$x])) {
|
||||
$tmp_criteria = $criteria[$x];
|
||||
}
|
||||
if ((empty($prev_criteria) || !isset($prev_criteria[$x]))
|
||||
if ((empty($prev_criteria) || ! isset($prev_criteria[$x]))
|
||||
|| $prev_criteria[$x] != htmlspecialchars($tmp_criteria)) {
|
||||
$curCriteria[$z] = $tmp_criteria;
|
||||
} else {
|
||||
@ -494,7 +497,7 @@ for ($y = 0; $y <= $row; $y++) {
|
||||
|
||||
echo "\n";
|
||||
$or = 'Or' . $y;
|
||||
if (!isset(${$or})) {
|
||||
if (! isset(${$or})) {
|
||||
${$or} = '';
|
||||
}
|
||||
if (!empty(${$or}) && isset(${$or}[$x])) {
|
||||
@ -664,7 +667,7 @@ foreach ($tbl_names as $key => $val) {
|
||||
<?php
|
||||
// 1. SELECT
|
||||
$last_select = 0;
|
||||
if (!isset($qry_select)) {
|
||||
if (! isset($qry_select)) {
|
||||
$qry_select = '';
|
||||
}
|
||||
for ($x = 0; $x < $col; $x++) {
|
||||
@ -889,7 +892,7 @@ if ($criteria_cnt > 1) {
|
||||
$qry_where = '(' . $qry_where . ')';
|
||||
}
|
||||
// OR rows ${'cur' . $or}[$x]
|
||||
if (!isset($curAndOrRow)) {
|
||||
if (! isset($curAndOrRow)) {
|
||||
$curAndOrRow = array();
|
||||
}
|
||||
for ($y = 0; $y <= $row; $y++) {
|
||||
@ -926,7 +929,7 @@ if (!empty($qry_where) && $qry_where != '()') {
|
||||
|
||||
// 4. ORDER BY
|
||||
$last_orderby = 0;
|
||||
if (!isset($qry_orderby)) {
|
||||
if (! isset($qry_orderby)) {
|
||||
$qry_orderby = '';
|
||||
}
|
||||
for ($x = 0; $x < $col; $x++) {
|
||||
|
||||
@ -21,7 +21,7 @@ $export_list = PMA_getPlugins('./libraries/export/', array('export_type' => $exp
|
||||
$type = $what;
|
||||
|
||||
// Check export type
|
||||
if (!isset($export_list[$type])) {
|
||||
if (! isset($export_list[$type])) {
|
||||
die('Bad type!');
|
||||
}
|
||||
|
||||
@ -451,7 +451,7 @@ if ($export_type == 'server') {
|
||||
// Walk over databases
|
||||
foreach ($GLOBALS['pma']->databases as $current_db) {
|
||||
if ((isset($tmp_select) && strpos(' ' . $tmp_select, '|' . $current_db . '|'))
|
||||
|| !isset($tmp_select)) {
|
||||
|| ! isset($tmp_select)) {
|
||||
if (!PMA_exportDBHeader($current_db)) {
|
||||
break 2;
|
||||
}
|
||||
|
||||
@ -332,7 +332,7 @@ if ($import_file != 'none' && !$error) {
|
||||
$error = TRUE;
|
||||
}
|
||||
} elseif (!$error) {
|
||||
if (!isset($import_text) || empty($import_text)) {
|
||||
if (! isset($import_text) || empty($import_text)) {
|
||||
$message = PMA_Message::error(__('No data was received to import. Either no file name was submitted, or the file size exceeded the maximum size permitted by your PHP configuration. See [a@./Documentation.html#faq1_16@Documentation]FAQ 1.16[/a].'));
|
||||
$error = TRUE;
|
||||
}
|
||||
|
||||
@ -705,19 +705,13 @@ function setCheckboxes( container_id, state ) {
|
||||
*
|
||||
* @param string the form name
|
||||
* @param string the element name
|
||||
* @param boolean whether to check or to uncheck the element
|
||||
* @param boolean whether to check or to uncheck options
|
||||
*
|
||||
* @return boolean always true
|
||||
*/
|
||||
function setSelectOptions(the_form, the_select, do_check)
|
||||
{
|
||||
|
||||
if( do_check ) {
|
||||
$("form[name='"+ the_form +"']").find("select[name='"+the_select+"']").find("option").attr('selected', 'selected');
|
||||
}
|
||||
else {
|
||||
$("form[name='"+ the_form +"']").find("select[name="+the_select+"]").find("option").removeAttr('selected');
|
||||
}
|
||||
$("form[name='"+ the_form +"'] select[name='"+the_select+"']").find("option").attr('selected', do_check);
|
||||
return true;
|
||||
} // end of the 'setSelectOptions()' function
|
||||
|
||||
@ -1124,25 +1118,32 @@ function changeMIMEType(db, table, reference, mime_type)
|
||||
* Jquery Coding for inline editing SQL_QUERY
|
||||
*/
|
||||
$(document).ready(function(){
|
||||
var oldText,db,table,token,sql_query;
|
||||
oldText=$(".inner_sql").html();
|
||||
$("#inline_edit").live('click',function(){
|
||||
db=$("input[name='db']").val();
|
||||
table=$("input[name='table']").val();
|
||||
token=$("input[name='token']").val();
|
||||
sql_query=$("input[name='sql_query']").val();
|
||||
$(".inner_sql").replaceWith("<textarea name=\"sql_query_edit\" id=\"sql_query_edit\">"+ sql_query +"</textarea><input type=\"button\" id=\"btnSave\" value=\"" + PMA_messages['strGo'] + "\"><input type=\"button\" id=\"btnDiscard\" value=\"" + PMA_messages['strCancel'] + "\">");
|
||||
$(".inline_edit_sql").click( function(){
|
||||
var db = $(this).prev().find("input[name='db']").val();
|
||||
var table = $(this).prev().find("input[name='table']").val();
|
||||
var token = $(this).prev().find("input[name='token']").val();
|
||||
var sql_query = $(this).prev().find("input[name='sql_query']").val();
|
||||
var $inner_sql = $(this).parent().prev().find('.inner_sql');
|
||||
var old_text = $inner_sql.html();
|
||||
|
||||
var new_content = "<textarea name=\"sql_query_edit\" id=\"sql_query_edit\">" + sql_query + "</textarea>\n";
|
||||
new_content += "<input type=\"button\" class=\"btnSave\" value=\"" + PMA_messages['strGo'] + "\">\n";
|
||||
new_content += "<input type=\"button\" class=\"btnDiscard\" value=\"" + PMA_messages['strCancel'] + "\">\n";
|
||||
$inner_sql.replaceWith(new_content);
|
||||
$(".btnSave").each(function(){
|
||||
$(this).click(function(){
|
||||
sql_query = $(this).prev().val();
|
||||
window.location.replace("import.php?db=" + db +"&table=" + table + "&sql_query=" + sql_query + "&show_query=1&token=" + token);
|
||||
});
|
||||
});
|
||||
$(".btnDiscard").each(function(){
|
||||
$(this).click(function(){
|
||||
$(this).closest(".sql").html("<span class=\"syntax\"><span class=\"inner_sql\">" + old_text + "</span></span>");
|
||||
});
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
$("#btnSave").live("click",function(){
|
||||
window.location.replace("import.php?db=" + db +"&table=" + table + "&sql_query=" + $("#sql_query_edit").val()+"&show_query=1&token=" + token + "");
|
||||
});
|
||||
|
||||
$("#btnDiscard").live("click",function(){
|
||||
$(".sql").html("<span class=\"syntax\"><span class=\"inner_sql\">" + oldText + "</span></span>");
|
||||
});
|
||||
|
||||
$('.sqlbutton').click(function(evt){
|
||||
insertQuery(evt.target.id);
|
||||
return false;
|
||||
|
||||
@ -274,6 +274,8 @@ $(document).ready(function() {
|
||||
$('#sqlqueryresults').show();
|
||||
// this happens if a USE command was typed
|
||||
if (typeof data.reload != 'undefined') {
|
||||
// Unbind the submit event before reloading. See bug #3295529
|
||||
$("#sqlqueryform.ajax").die('submit');
|
||||
$form.find('input[name=db]').val(data.db);
|
||||
// need to regenerate the whole upper part
|
||||
$form.find('input[name=ajax_request]').remove();
|
||||
|
||||
@ -165,7 +165,7 @@ function verificationsAfterFieldChange(urlField, multi_edit, theType){
|
||||
|
||||
// Unchecks the Ignore checkbox for the current row
|
||||
$("input[name='insert_ignore_" + multi_edit + "']").attr({'checked': false});
|
||||
$this_input = $("input[name='fields[multi_edit][" + multi_edit + "][" + urlField + "]']");
|
||||
var $this_input = $("input[name='fields[multi_edit][" + multi_edit + "][" + urlField + "]']");
|
||||
|
||||
// Does this field come from datepicker?
|
||||
if ($this_input.data('comes_from') == 'datepicker') {
|
||||
@ -214,11 +214,11 @@ function verificationsAfterFieldChange(urlField, multi_edit, theType){
|
||||
}
|
||||
}
|
||||
//validate for integer type
|
||||
if(theType.substring(0,3)=="int"){
|
||||
|
||||
if(isNaN(dt.value)){
|
||||
dt.className="invalid_value";
|
||||
return false;
|
||||
if(theType.substring(0,3) == "int"){
|
||||
$this_input.removeClass("invalid_value");
|
||||
if(isNaN($this_input.val())){
|
||||
$this_input.addClass("invalid_value");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -387,7 +387,7 @@ $(document).ready(function() {
|
||||
if ($this_element.is('.textfield')) {
|
||||
// do not remove the 'value' attribute for ENUM columns
|
||||
if ($this_element.closest('tr').find('span.column_type').html() != 'enum') {
|
||||
$this_element.attr('value', '');
|
||||
$this_element.attr('value', $this_element.closest('tr').find('span.default_value').html());
|
||||
}
|
||||
$this_element
|
||||
.unbind('change')
|
||||
|
||||
@ -96,7 +96,7 @@ class PMA_Config
|
||||
*/
|
||||
function checkSystem()
|
||||
{
|
||||
$this->set('PMA_VERSION', '3.4.0-rc2-dev');
|
||||
$this->set('PMA_VERSION', '3.5.0-dev');
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
@ -148,7 +148,7 @@ class PMA_Config
|
||||
{
|
||||
if (PMA_getenv('HTTP_USER_AGENT')) {
|
||||
$HTTP_USER_AGENT = PMA_getenv('HTTP_USER_AGENT');
|
||||
} elseif (!isset($HTTP_USER_AGENT)) {
|
||||
} elseif (! isset($HTTP_USER_AGENT)) {
|
||||
$HTTP_USER_AGENT = '';
|
||||
}
|
||||
|
||||
@ -441,7 +441,7 @@ class PMA_Config
|
||||
if ($server > 0 && !defined('PMA_MINIMUM_COMMON')) {
|
||||
$config_mtime = max($this->default_source_mtime, $this->source_mtime);
|
||||
// cache user preferences, use database only when needed
|
||||
if (!isset($_SESSION['cache'][$cache_key]['userprefs'])
|
||||
if (! isset($_SESSION['cache'][$cache_key]['userprefs'])
|
||||
|| $_SESSION['cache'][$cache_key]['config_mtime'] < $config_mtime) {
|
||||
// load required libraries
|
||||
require_once './libraries/user_preferences.lib.php';
|
||||
@ -451,7 +451,7 @@ class PMA_Config
|
||||
$_SESSION['cache'][$cache_key]['userprefs_type'] = $prefs['type'];
|
||||
$_SESSION['cache'][$cache_key]['config_mtime'] = $config_mtime;
|
||||
}
|
||||
} else if ($server == 0 || !isset($_SESSION['cache'][$cache_key]['userprefs'])) {
|
||||
} else if ($server == 0 || ! isset($_SESSION['cache'][$cache_key]['userprefs'])) {
|
||||
$this->set('user_preferences', false);
|
||||
return;
|
||||
}
|
||||
@ -476,7 +476,7 @@ class PMA_Config
|
||||
// save theme
|
||||
$tmanager = $_SESSION['PMA_Theme_Manager'];
|
||||
if ($tmanager->getThemeCookie() || isset($_REQUEST['set_theme'])) {
|
||||
if ((!isset($config_data['ThemeDefault']) && $tmanager->theme->getId() != 'original')
|
||||
if ((! isset($config_data['ThemeDefault']) && $tmanager->theme->getId() != 'original')
|
||||
|| isset($config_data['ThemeDefault']) && $config_data['ThemeDefault'] != $tmanager->theme->getId()) {
|
||||
// new theme was set in common.inc.php
|
||||
$this->setUserValue(null, 'ThemeDefault', $tmanager->theme->getId(), 'original');
|
||||
@ -491,14 +491,14 @@ class PMA_Config
|
||||
}
|
||||
|
||||
// save font size
|
||||
if ((!isset($config_data['fontsize']) && $org_fontsize != '82%')
|
||||
if ((! isset($config_data['fontsize']) && $org_fontsize != '82%')
|
||||
|| isset($config_data['fontsize']) && $org_fontsize != $config_data['fontsize']) {
|
||||
$this->setUserValue(null, 'fontsize', $org_fontsize, '82%');
|
||||
}
|
||||
|
||||
// save language
|
||||
if (isset($_COOKIE['pma_lang']) || isset($_POST['lang'])) {
|
||||
if ((!isset($config_data['lang']) && $GLOBALS['lang'] != 'en')
|
||||
if ((! isset($config_data['lang']) && $GLOBALS['lang'] != 'en')
|
||||
|| isset($config_data['lang']) && $GLOBALS['lang'] != $config_data['lang']) {
|
||||
$this->setUserValue(null, 'lang', $GLOBALS['lang'], 'en');
|
||||
}
|
||||
@ -511,7 +511,7 @@ class PMA_Config
|
||||
|
||||
// save connection collation
|
||||
if (isset($_COOKIE['pma_collation_connection']) || isset($_POST['collation_connection'])) {
|
||||
if ((!isset($config_data['collation_connection']) && $GLOBALS['collation_connection'] != 'utf8_general_ci')
|
||||
if ((! isset($config_data['collation_connection']) && $GLOBALS['collation_connection'] != 'utf8_general_ci')
|
||||
|| isset($config_data['collation_connection']) && $GLOBALS['collation_connection'] != $config_data['collation_connection']) {
|
||||
$this->setUserValue(null, 'collation_connection', $GLOBALS['collation_connection'], 'utf8_general_ci');
|
||||
}
|
||||
@ -678,7 +678,7 @@ class PMA_Config
|
||||
*/
|
||||
function set($setting, $value)
|
||||
{
|
||||
if (!isset($this->settings[$setting]) || $this->settings[$setting] != $value) {
|
||||
if (! isset($this->settings[$setting]) || $this->settings[$setting] != $value) {
|
||||
$this->settings[$setting] = $value;
|
||||
$this->set_mtime = time();
|
||||
}
|
||||
|
||||
@ -424,7 +424,7 @@ class PMA_Index
|
||||
$indexes = PMA_Index::getFromTable($table, $schema);
|
||||
|
||||
if (count($indexes) < 1) {
|
||||
return PMA_Message::warning(__('No index defined!'))->getDisplay();
|
||||
return PMA_Message::error(__('No index defined!'))->getDisplay();
|
||||
}
|
||||
|
||||
$r = '';
|
||||
@ -576,7 +576,7 @@ class PMA_Index
|
||||
// did not find any difference
|
||||
// so it makes no sense to have this two equal indexes
|
||||
|
||||
$message = PMA_Message::warning(__('The indexes %1$s and %2$s seem to be equal and one of them could possibly be removed.'));
|
||||
$message = PMA_Message::error(__('The indexes %1$s and %2$s seem to be equal and one of them could possibly be removed.'));
|
||||
$message->addParam($each_index->getName());
|
||||
$message->addParam($while_index->getName());
|
||||
$output .= $message->getDisplay();
|
||||
|
||||
@ -371,7 +371,7 @@ require_once './libraries/List.class.php';
|
||||
$return = '<ul id="databaseList" xml:lang="en" dir="ltr">' . "\n";
|
||||
foreach ($this->getGroupedDetails($offset, $count) as $group => $dbs) {
|
||||
if (count($dbs) > 1) {
|
||||
$return .= '<li><span>' . htmlspecialchars($group) . '</span><ul>' . "\n";
|
||||
$return .= '<li class="group"><span>' . htmlspecialchars($group) . '</span><ul>' . "\n";
|
||||
// whether display db_name cut by the group part
|
||||
$cut = true;
|
||||
} else {
|
||||
@ -498,7 +498,7 @@ require_once './libraries/List.class.php';
|
||||
if (isset($tmp_mydbs[$tmp_db]) && $tmp_mydbs[$tmp_db] == 1) {
|
||||
$dblist[] = $tmp_db;
|
||||
$tmp_mydbs[$tmp_db] = 0;
|
||||
} elseif (!isset($dblist[$tmp_db])) {
|
||||
} elseif (! isset($dblist[$tmp_db])) {
|
||||
foreach ($tmp_mydbs as $tmp_matchpattern => $tmp_value) {
|
||||
// fixed bad regexp
|
||||
// TODO: db names may contain characters
|
||||
|
||||
@ -19,9 +19,6 @@
|
||||
*
|
||||
* // get special notice 'Some locale notice'
|
||||
* $message = PMA_Message::notice('strSomeLocaleNotice');
|
||||
*
|
||||
* // display raw warning message 'This is a warning!'
|
||||
* PMA_Message::rawWarning('This is a warning!')->display();
|
||||
* </code>
|
||||
*
|
||||
* more advanced usage example:
|
||||
@ -63,7 +60,6 @@ class PMA_Message
|
||||
{
|
||||
const SUCCESS = 1; // 0001
|
||||
const NOTICE = 2; // 0010
|
||||
const WARNING = 4; // 0100
|
||||
const ERROR = 8; // 1000
|
||||
|
||||
const SANITIZE_NONE = 0; // 0000 0000
|
||||
@ -79,7 +75,6 @@ class PMA_Message
|
||||
static public $level = array (
|
||||
PMA_Message::SUCCESS => 'success',
|
||||
PMA_Message::NOTICE => 'notice',
|
||||
PMA_Message::WARNING => 'warning',
|
||||
PMA_Message::ERROR => 'error',
|
||||
);
|
||||
|
||||
@ -151,8 +146,8 @@ class PMA_Message
|
||||
* @uses PMA_Message::SANITIZE_PARAMS
|
||||
* @param string $string
|
||||
* @param integer $number
|
||||
* @param array $$params
|
||||
* @param boolean $sanitize
|
||||
* @param array $params
|
||||
* @param integer $sanitize
|
||||
*/
|
||||
public function __construct($string = '', $number = PMA_Message::NOTICE,
|
||||
$params = array(), $sanitize = PMA_Message::SANITIZE_NONE)
|
||||
@ -213,22 +208,6 @@ class PMA_Message
|
||||
return new PMA_Message($string, PMA_Message::ERROR);
|
||||
}
|
||||
|
||||
/**
|
||||
* get PMA_Message of type warning
|
||||
*
|
||||
* shorthand for getting a simple warning message
|
||||
*
|
||||
* @static
|
||||
* @uses PMA_Message as returned object
|
||||
* @uses PMA_Message::WARNING
|
||||
* @param string $string a localized string e.g. 'strSetupWarning'
|
||||
* @return PMA_Message
|
||||
*/
|
||||
static public function warning($string)
|
||||
{
|
||||
return new PMA_Message($string, PMA_Message::WARNING);
|
||||
}
|
||||
|
||||
/**
|
||||
* get PMA_Message of type notice
|
||||
*
|
||||
@ -337,22 +316,6 @@ class PMA_Message
|
||||
return PMA_Message::raw($message, PMA_Message::ERROR);
|
||||
}
|
||||
|
||||
/**
|
||||
* get PMA_Message of type warning with custom content
|
||||
*
|
||||
* shorthand for getting a customized warning message
|
||||
*
|
||||
* @static
|
||||
* @uses PMA_Message::raw()
|
||||
* @uses PMA_Message::WARNING
|
||||
* @param string $message
|
||||
* @return PMA_Message
|
||||
*/
|
||||
static public function rawWarning($message)
|
||||
{
|
||||
return PMA_Message::raw($message, PMA_Message::WARNING);
|
||||
}
|
||||
|
||||
/**
|
||||
* get PMA_Message of type notice with custom content
|
||||
*
|
||||
@ -423,25 +386,6 @@ class PMA_Message
|
||||
return $this->getNumber() === PMA_Message::NOTICE;
|
||||
}
|
||||
|
||||
/**
|
||||
* returns whether this message is a warning message or not
|
||||
* and optionally makes this message a warning message
|
||||
*
|
||||
* @uses PMA_Message::WARNING
|
||||
* @uses PMA_Message::setNumber()
|
||||
* @uses PMA_Message::getNumber()
|
||||
* @param boolean $set
|
||||
* @return boolean whether this is a warning message or not
|
||||
*/
|
||||
public function isWarning($set = false)
|
||||
{
|
||||
if ($set) {
|
||||
$this->setNumber(PMA_Message::WARNING);
|
||||
}
|
||||
|
||||
return $this->getNumber() === PMA_Message::WARNING;
|
||||
}
|
||||
|
||||
/**
|
||||
* returns whether this message is an error message or not
|
||||
* and optionally makes this message an error message
|
||||
@ -624,9 +568,9 @@ class PMA_Message
|
||||
* @static
|
||||
* @uses is_array()
|
||||
* @uses htmlspecialchars()
|
||||
* @uses PMA_Message::sanitize() recursiv
|
||||
* @param mixed the message(s)
|
||||
* @return mixed the sanitized message(s)
|
||||
* @uses PMA_Message::sanitize() recursive
|
||||
* @param mixed $message the message(s)
|
||||
* @return mixed the sanitized message(s)
|
||||
* @access public
|
||||
*/
|
||||
static public function sanitize($message)
|
||||
@ -686,7 +630,6 @@ class PMA_Message
|
||||
* @uses PMA_Message::$_string
|
||||
* @uses PMA_Message::$_message
|
||||
* @uses md5()
|
||||
* @param string $file
|
||||
* @return string PMA_Message::$_hash
|
||||
*/
|
||||
public function getHash()
|
||||
|
||||
@ -889,7 +889,7 @@ class PMA_Table
|
||||
} else {
|
||||
// we are copying
|
||||
// Create new entries as duplicates from old PMA DBs
|
||||
if ($what != 'dataonly' && !isset($maintain_relations)) {
|
||||
if ($what != 'dataonly' && ! isset($maintain_relations)) {
|
||||
if ($GLOBALS['cfgRelation']['commwork']) {
|
||||
// Get all comments and MIME-Types for current table
|
||||
$comments_copy_query = 'SELECT
|
||||
|
||||
@ -104,7 +104,7 @@ function PMA_chart_results($data, &$chartSettings)
|
||||
// default for muti series
|
||||
$chartSettings['multi'] = false;
|
||||
|
||||
if (!isset($data[0])) {
|
||||
if (! isset($data[0])) {
|
||||
// empty data
|
||||
return __('No data found for the chart.');
|
||||
}
|
||||
@ -192,7 +192,7 @@ function PMA_chart_results($data, &$chartSettings)
|
||||
// the value os for this serie
|
||||
$chartData[$yAxisKey][$seriesLabelsValue][$row[$xAxisKey]] = (int)$row[$yAxisKey];
|
||||
}
|
||||
else if (!isset($chartData[$yAxisKey][$seriesLabelsValue][$row[$xAxisKey]])) {
|
||||
else if (! isset($chartData[$yAxisKey][$seriesLabelsValue][$row[$xAxisKey]])) {
|
||||
// if the value for this serie is not set, set it to 0
|
||||
$chartData[$yAxisKey][$seriesLabelsValue][$row[$xAxisKey]] = 0;
|
||||
}
|
||||
|
||||
@ -69,21 +69,9 @@ abstract class PMA_pChart_chart extends PMA_chart
|
||||
|
||||
// as in CSS (top, right, bottom, left)
|
||||
$this->setAreaMargins(array(20, 20, 40, 60));
|
||||
|
||||
// when graph area gradient is used, this is the color of the graph
|
||||
// area border
|
||||
$this->settings['graphAreaColor'] = '#D5D9DD';
|
||||
|
||||
// the background color of the graph area
|
||||
$this->settings['graphAreaGradientColor'] = '#A3CBA7';
|
||||
|
||||
// the color of the grid lines in the graph area
|
||||
$this->settings['gridColor'] = '#E6E6E6';
|
||||
|
||||
// the color of the scale and the labels
|
||||
$this->settings['scaleColor'] = '#D5D9DD';
|
||||
|
||||
$this->settings['titleBgColor'] = '#000000';
|
||||
|
||||
// Get color settings from theme
|
||||
$this->settings = array_merge($this->settings,$GLOBALS['cfg']['chartColor']);
|
||||
}
|
||||
|
||||
protected function init()
|
||||
@ -149,8 +137,11 @@ abstract class PMA_pChart_chart extends PMA_chart
|
||||
$this->getBgColor(RED),
|
||||
$this->getBgColor(GREEN),
|
||||
$this->getBgColor(BLUE),
|
||||
50,TARGET_BACKGROUND);
|
||||
$this->chart->addBorder(2);
|
||||
// With a gradientIntensity of 0 the background does't draw, oddly
|
||||
($this->settings['gradientIntensity']==0)?1:$this->settings['gradientIntensity'],TARGET_BACKGROUND);
|
||||
|
||||
if(is_string($this->settings['border']))
|
||||
$this->chart->addBorder(1,$this->getBorderColor(RED),$this->getBorderColor(GREEN),$this->getBorderColor(BLUE));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -170,11 +161,10 @@ abstract class PMA_pChart_chart extends PMA_chart
|
||||
$this->getTitleColor(GREEN),
|
||||
$this->getTitleColor(BLUE),
|
||||
ALIGN_CENTER,
|
||||
True,
|
||||
false,
|
||||
$this->getTitleBgColor(RED),
|
||||
$this->getTitleBgColor(GREEN),
|
||||
$this->getTitleBgColor(BLUE),
|
||||
30
|
||||
$this->getTitleBgColor(BLUE)
|
||||
);
|
||||
}
|
||||
|
||||
@ -211,12 +201,21 @@ abstract class PMA_pChart_chart extends PMA_chart
|
||||
$this->getScaleColor(BLUE),
|
||||
TRUE,0,2,TRUE
|
||||
);
|
||||
$this->chart->drawGraphAreaGradient(
|
||||
$this->getGraphAreaGradientColor(RED),
|
||||
$this->getGraphAreaGradientColor(GREEN),
|
||||
$this->getGraphAreaGradientColor(BLUE),
|
||||
50
|
||||
);
|
||||
|
||||
if($this->settings['gradientIntensity']>0)
|
||||
$this->chart->drawGraphAreaGradient(
|
||||
$this->getGraphAreaGradientColor(RED),
|
||||
$this->getGraphAreaGradientColor(GREEN),
|
||||
$this->getGraphAreaGradientColor(BLUE),
|
||||
$this->settings['gradientIntensity']
|
||||
);
|
||||
else
|
||||
$this->chart->drawGraphArea(
|
||||
$this->getGraphAreaGradientColor(RED),
|
||||
$this->getGraphAreaGradientColor(GREEN),
|
||||
$this->getGraphAreaGradientColor(BLUE)
|
||||
);
|
||||
|
||||
$this->chart->drawGrid(
|
||||
4,
|
||||
TRUE,
|
||||
@ -393,6 +392,11 @@ abstract class PMA_pChart_chart extends PMA_chart
|
||||
{
|
||||
return $this->hexStrToDecComp($this->settings['titleBgColor'], $component);
|
||||
}
|
||||
|
||||
protected function getBorderColor($component)
|
||||
{
|
||||
return $this->hexStrToDecComp($this->settings['border'], $component);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@ -57,12 +57,20 @@ class PMA_pChart_multi_radar extends PMA_pChart_multi
|
||||
$this->getGraphAreaColor(BLUE),
|
||||
FALSE
|
||||
);
|
||||
$this->chart->drawGraphAreaGradient(
|
||||
$this->getGraphAreaGradientColor(RED),
|
||||
$this->getGraphAreaGradientColor(GREEN),
|
||||
$this->getGraphAreaGradientColor(BLUE),
|
||||
50
|
||||
);
|
||||
|
||||
if($this->settings['gradientIntensity']>0)
|
||||
$this->chart->drawGraphAreaGradient(
|
||||
$this->getGraphAreaGradientColor(RED),
|
||||
$this->getGraphAreaGradientColor(GREEN),
|
||||
$this->getGraphAreaGradientColor(BLUE),
|
||||
$this->settings['gradientIntensity']
|
||||
);
|
||||
else
|
||||
$this->chart->drawGraphArea(
|
||||
$this->getGraphAreaGradientColor(RED),
|
||||
$this->getGraphAreaGradientColor(GREEN),
|
||||
$this->getGraphAreaGradientColor(BLUE)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -47,12 +47,21 @@ class PMA_pChart_Pie extends PMA_pChart_multi
|
||||
$this->getGraphAreaColor(BLUE),
|
||||
FALSE
|
||||
);
|
||||
$this->chart->drawGraphAreaGradient(
|
||||
$this->getGraphAreaGradientColor(RED),
|
||||
$this->getGraphAreaGradientColor(GREEN),
|
||||
$this->getGraphAreaGradientColor(BLUE),
|
||||
50
|
||||
);
|
||||
|
||||
if($this->settings['gradientIntensity']>0)
|
||||
$this->chart->drawGraphAreaGradient(
|
||||
$this->getGraphAreaGradientColor(RED),
|
||||
$this->getGraphAreaGradientColor(GREEN),
|
||||
$this->getGraphAreaGradientColor(BLUE),
|
||||
$this->settings['gradientIntensity']
|
||||
);
|
||||
else
|
||||
$this->chart->drawGraphArea(
|
||||
$this->getGraphAreaGradientColor(RED),
|
||||
$this->getGraphAreaGradientColor(GREEN),
|
||||
$this->getGraphAreaGradientColor(BLUE)
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -48,12 +48,21 @@ class PMA_pChart_single_radar extends PMA_pChart_single
|
||||
$this->getGraphAreaColor(BLUE),
|
||||
FALSE
|
||||
);
|
||||
$this->chart->drawGraphAreaGradient(
|
||||
$this->getGraphAreaGradientColor(RED),
|
||||
$this->getGraphAreaGradientColor(GREEN),
|
||||
$this->getGraphAreaGradientColor(BLUE),
|
||||
50
|
||||
);
|
||||
|
||||
if($this->settings['gradientIntensity']>0)
|
||||
$this->chart->drawGraphAreaGradient(
|
||||
$this->getGraphAreaGradientColor(RED),
|
||||
$this->getGraphAreaGradientColor(GREEN),
|
||||
$this->getGraphAreaGradientColor(BLUE),
|
||||
$this->settings['gradientIntensity']
|
||||
);
|
||||
else
|
||||
$this->chart->drawGraphArea(
|
||||
$this->getGraphAreaGradientColor(RED),
|
||||
$this->getGraphAreaGradientColor(GREEN),
|
||||
$this->getGraphAreaGradientColor(BLUE)
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -608,7 +608,7 @@ $GLOBALS['server'] = 0;
|
||||
* @todo merge into PMA_Config
|
||||
*/
|
||||
// Do we have some server?
|
||||
if (!isset($cfg['Servers']) || count($cfg['Servers']) == 0) {
|
||||
if (! isset($cfg['Servers']) || count($cfg['Servers']) == 0) {
|
||||
// No server => create one with defaults
|
||||
$cfg['Servers'] = array(1 => $default_server);
|
||||
} else {
|
||||
@ -664,7 +664,7 @@ if (! isset($_SESSION['PMA_Theme_Manager'])) {
|
||||
}
|
||||
|
||||
// for the theme per server feature
|
||||
if (isset($_REQUEST['server']) && !isset($_REQUEST['set_theme'])) {
|
||||
if (isset($_REQUEST['server']) && ! isset($_REQUEST['set_theme'])) {
|
||||
$GLOBALS['server'] = $_REQUEST['server'];
|
||||
$tmp = $_SESSION['PMA_Theme_Manager']->getThemeCookie();
|
||||
if (empty($tmp)) {
|
||||
@ -838,7 +838,7 @@ if (! defined('PMA_MINIMUM_COMMON')) {
|
||||
// http://cvs.apache.org/viewcvs.cgi/httpd-2.0/modules/aaa/mod_access.c?rev=1.37&content-type=text/vnd.viewcvs-markup
|
||||
// Look at: "static int check_dir_access(request_rec *r)"
|
||||
if (isset($cfg['Server']['AllowDeny'])
|
||||
&& isset($cfg['Server']['AllowDeny']['order'])) {
|
||||
&& isset($cfg['Server']['AllowDeny']['order'])) {
|
||||
|
||||
/**
|
||||
* ip based access library
|
||||
|
||||
@ -301,7 +301,7 @@ function PMA_formatSql($parsed_sql, $unparsed_sql = '')
|
||||
return htmlspecialchars($parsed_sql['raw']);
|
||||
}
|
||||
// then check for an array
|
||||
if (!is_array($parsed_sql)) {
|
||||
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"
|
||||
@ -663,7 +663,7 @@ function PMA_mysqlDie($error_message = '', $the_query = '',
|
||||
if ($exit) {
|
||||
/**
|
||||
* If in an Ajax request
|
||||
* - avoid displaying a Back link
|
||||
* - avoid displaying a Back link
|
||||
* - use PMA_ajaxResponse() to transmit the message and exit
|
||||
*/
|
||||
if($GLOBALS['is_ajax_request'] == true) {
|
||||
@ -706,11 +706,11 @@ function PMA_mysqlDie($error_message = '', $the_query = '',
|
||||
* @uses uksort()
|
||||
* @uses strstr()
|
||||
* @uses explode()
|
||||
* @param string $db name of db
|
||||
* @param string $tables name of tables
|
||||
* @param integer $limit_offset list offset
|
||||
* @param integer $limit_count max tables to return
|
||||
* return array (recursive) grouped table list
|
||||
* @param string $db name of db
|
||||
* @param string $tables name of tables
|
||||
* @param integer $limit_offset list offset
|
||||
* @param int|bool $limit_count max tables to return
|
||||
* @return array (recursive) grouped table list
|
||||
*/
|
||||
function PMA_getTableList($db, $tables = null, $limit_offset = 0, $limit_count = false)
|
||||
{
|
||||
@ -781,12 +781,12 @@ function PMA_getTableList($db, $tables = null, $limit_offset = 0, $limit_count =
|
||||
$group_name = $parts[$i] . $sep;
|
||||
$group_name_full .= $group_name;
|
||||
|
||||
if (!isset($group[$group_name])) {
|
||||
if (! isset($group[$group_name])) {
|
||||
$group[$group_name] = array();
|
||||
$group[$group_name]['is' . $sep . 'group'] = true;
|
||||
$group[$group_name]['tab' . $sep . 'count'] = 1;
|
||||
$group[$group_name]['tab' . $sep . 'group'] = $group_name_full;
|
||||
} elseif (!isset($group[$group_name]['is' . $sep . 'group'])) {
|
||||
} elseif (! isset($group[$group_name]['is' . $sep . 'group'])) {
|
||||
$table = $group[$group_name];
|
||||
$group[$group_name] = array();
|
||||
$group[$group_name][$group_name] = $table;
|
||||
@ -801,7 +801,7 @@ function PMA_getTableList($db, $tables = null, $limit_offset = 0, $limit_count =
|
||||
$i++;
|
||||
}
|
||||
} else {
|
||||
if (!isset($table_groups[$table_name])) {
|
||||
if (! isset($table_groups[$table_name])) {
|
||||
$table_groups[$table_name] = array();
|
||||
}
|
||||
$group =& $table_groups;
|
||||
@ -963,7 +963,7 @@ function PMA_showMessage($message, $sql_query = null, $type = 'notice', $is_view
|
||||
* in a string. In some special cases on sql.php, buffering has to be disabled
|
||||
* and hence we check with $GLOBALS['buffer_message']
|
||||
*/
|
||||
if( $GLOBALS['is_ajax_request'] == true && !isset($GLOBALS['buffer_message']) ) {
|
||||
if( $GLOBALS['is_ajax_request'] == true && ! isset($GLOBALS['buffer_message']) ) {
|
||||
ob_start();
|
||||
}
|
||||
global $cfg;
|
||||
@ -1255,15 +1255,15 @@ function PMA_showMessage($message, $sql_query = null, $type = 'notice', $is_view
|
||||
|
||||
// in the tools div, only display the Inline link when not in ajax
|
||||
// mode because 1) it currently does not work and 2) we would
|
||||
// have two similar mechanisms on the page for the same goal
|
||||
// have two similar mechanisms on the page for the same goal
|
||||
if ($is_select || $GLOBALS['is_ajax_request'] === false) {
|
||||
// see in js/functions.js the jQuery code attached to id inline_edit
|
||||
// document.write conflicts with jQuery, hence used $().append()
|
||||
echo "<script type=\"text/javascript\">\n" .
|
||||
"//<![CDATA[\n" .
|
||||
"$('.tools form').after('[<a href=\"#\" title=\"" .
|
||||
"$('.tools form').last().after('[<a href=\"#\" title=\"" .
|
||||
PMA_escapeJsString(__('Inline edit of this query')) .
|
||||
"\" id=\"inline_edit\">" .
|
||||
"\" class=\"inline_edit_sql\">" .
|
||||
PMA_escapeJsString(__('Inline')) .
|
||||
"</a>]');\n" .
|
||||
"//]]>\n" .
|
||||
@ -1280,7 +1280,7 @@ function PMA_showMessage($message, $sql_query = null, $type = 'notice', $is_view
|
||||
// If we are in an Ajax request, we have most probably been called in
|
||||
// PMA_ajaxResponse(). Hence, collect the buffer contents and return it
|
||||
// to PMA_ajaxResponse(), which will encode it for JSON.
|
||||
if( $GLOBALS['is_ajax_request'] == true && !isset($GLOBALS['buffer_message']) ) {
|
||||
if( $GLOBALS['is_ajax_request'] == true && ! isset($GLOBALS['buffer_message']) ) {
|
||||
$buffer_contents = ob_get_contents();
|
||||
ob_end_clean();
|
||||
return $buffer_contents;
|
||||
@ -1674,7 +1674,7 @@ function PMA_generate_html_tab($tab, $url_params = array())
|
||||
}
|
||||
|
||||
if (!empty($tab['warning'])) {
|
||||
$tab['class'] .= ' warning';
|
||||
$tab['class'] .= ' error';
|
||||
$tab['attr'] .= ' title="' . htmlspecialchars($tab['warning']) . '"';
|
||||
}
|
||||
|
||||
@ -2001,7 +2001,7 @@ function PMA_checkParameters($params, $die = true, $request = true)
|
||||
{
|
||||
global $checked_special;
|
||||
|
||||
if (!isset($checked_special)) {
|
||||
if (! isset($checked_special)) {
|
||||
$checked_special = false;
|
||||
}
|
||||
|
||||
@ -2014,7 +2014,7 @@ function PMA_checkParameters($params, $die = true, $request = true)
|
||||
$checked_special = true;
|
||||
}
|
||||
|
||||
if (!isset($GLOBALS[$param])) {
|
||||
if (! isset($GLOBALS[$param])) {
|
||||
$error_message .= $reported_script_name
|
||||
. ': Missing parameter: ' . $param
|
||||
. PMA_showDocu('faqmissingparameters')
|
||||
@ -2112,7 +2112,7 @@ function PMA_getUniqueCondition($handle, $fields_cnt, $fields_meta, $row, $force
|
||||
. PMA_backquote($meta->orgname) . ' ';
|
||||
} // end if... else...
|
||||
|
||||
if (!isset($row[$i]) || is_null($row[$i])) {
|
||||
if (! isset($row[$i]) || is_null($row[$i])) {
|
||||
$condition .= 'IS NULL AND';
|
||||
} else {
|
||||
// timestamp is numeric on some MySQL 4.1
|
||||
@ -2434,8 +2434,8 @@ function PMA_userDir($dir)
|
||||
*/
|
||||
function PMA_getDbLink($database = null)
|
||||
{
|
||||
if (!strlen($database)) {
|
||||
if (!strlen($GLOBALS['db'])) {
|
||||
if (! strlen($database)) {
|
||||
if (! strlen($GLOBALS['db'])) {
|
||||
return '';
|
||||
}
|
||||
$database = $GLOBALS['db'];
|
||||
|
||||
@ -386,7 +386,7 @@ function PMA_array_merge_recursive()
|
||||
break;
|
||||
case 2 :
|
||||
$args = func_get_args();
|
||||
if (!is_array($args[0]) || !is_array($args[1])) {
|
||||
if (! is_array($args[0]) || ! is_array($args[1])) {
|
||||
return $args[1];
|
||||
}
|
||||
foreach ($args[1] as $key2 => $value2) {
|
||||
@ -603,7 +603,7 @@ function PMA_array_read($path, $array, $default = null)
|
||||
$keys = explode('/', $path);
|
||||
$value =& $array;
|
||||
foreach ($keys as $key) {
|
||||
if (!isset($value[$key])) {
|
||||
if (! isset($value[$key])) {
|
||||
return $default;
|
||||
}
|
||||
$value =& $value[$key];
|
||||
@ -624,7 +624,7 @@ function PMA_array_write($path, &$array, $value)
|
||||
$last_key = array_pop($keys);
|
||||
$a =& $array;
|
||||
foreach ($keys as $key) {
|
||||
if (!isset($a[$key])) {
|
||||
if (! isset($a[$key])) {
|
||||
$a[$key] = array();
|
||||
}
|
||||
$a =& $a[$key];
|
||||
@ -650,7 +650,7 @@ function PMA_array_remove($path, &$array)
|
||||
$found = true;
|
||||
// go as deep as required or possible
|
||||
foreach ($keys as $key) {
|
||||
if (!isset($path[$depth][$key])) {
|
||||
if (! isset($path[$depth][$key])) {
|
||||
$found = false;
|
||||
break;
|
||||
}
|
||||
@ -665,7 +665,7 @@ function PMA_array_remove($path, &$array)
|
||||
|
||||
// remove empty nested arrays
|
||||
for (; $depth >= 0; $depth--) {
|
||||
if (!isset($path[$depth+1]) || count($path[$depth+1]) == 0) {
|
||||
if (! isset($path[$depth+1]) || count($path[$depth+1]) == 0) {
|
||||
unset($path[$depth][$keys[$depth]]);
|
||||
} else {
|
||||
break;
|
||||
|
||||
@ -196,7 +196,7 @@ function PMA_usort_comparison_callback($a, $b)
|
||||
$sorter = 'strcasecmp';
|
||||
}
|
||||
/* No sorting when key is not present */
|
||||
if (!isset($a[$GLOBALS['callback_sort_by']]) || ! isset($b[$GLOBALS['callback_sort_by']])) {
|
||||
if (! isset($a[$GLOBALS['callback_sort_by']]) || ! isset($b[$GLOBALS['callback_sort_by']])) {
|
||||
return 0;
|
||||
}
|
||||
// produces f.e.:
|
||||
@ -254,7 +254,7 @@ function PMA_DBI_get_tables_full($database, $table = false, $tbl_is_group = fals
|
||||
$tables = array();
|
||||
|
||||
if (! $GLOBALS['cfg']['Server']['DisableIS']) {
|
||||
// get table information from information_schema
|
||||
// get table information from information_schema
|
||||
if ($table) {
|
||||
if (true === $tbl_is_group) {
|
||||
$sql_where_table = 'AND `TABLE_NAME` LIKE \''
|
||||
@ -269,20 +269,20 @@ function PMA_DBI_get_tables_full($database, $table = false, $tbl_is_group = fals
|
||||
$sql_where_table = '';
|
||||
}
|
||||
|
||||
// for PMA bc:
|
||||
// `SCHEMA_FIELD_NAME` AS `SHOW_TABLE_STATUS_FIELD_NAME`
|
||||
//
|
||||
// on non-Windows servers,
|
||||
// added BINARY in the WHERE clause to force a case sensitive
|
||||
// comparison (if we are looking for the db Aa we don't want
|
||||
// to find the db aa)
|
||||
// for PMA bc:
|
||||
// `SCHEMA_FIELD_NAME` AS `SHOW_TABLE_STATUS_FIELD_NAME`
|
||||
//
|
||||
// on non-Windows servers,
|
||||
// added BINARY in the WHERE clause to force a case sensitive
|
||||
// comparison (if we are looking for the db Aa we don't want
|
||||
// to find the db aa)
|
||||
$this_databases = array_map('PMA_sqlAddslashes', $databases);
|
||||
|
||||
$sql = '
|
||||
SELECT *,
|
||||
`TABLE_SCHEMA` AS `Db`,
|
||||
`TABLE_NAME` AS `Name`,
|
||||
`TABLE_TYPE` ÀS `TABLE_TYPE`,
|
||||
`TABLE_TYPE` AS `TABLE_TYPE`,
|
||||
`ENGINE` AS `Engine`,
|
||||
`ENGINE` AS `Type`,
|
||||
`VERSION` AS `Version`,
|
||||
@ -479,7 +479,7 @@ function PMA_DBI_get_tables_full($database, $table = false, $tbl_is_group = fals
|
||||
* returns array with databases containing extended infos about them
|
||||
*
|
||||
* @todo move into PMA_List_Database?
|
||||
* @param string $databases database
|
||||
* @param string $database database
|
||||
* @param boolean $force_stats retrieve stats also for MySQL < 5
|
||||
* @param resource $link mysql link
|
||||
* @param string $sort_by column to order by
|
||||
@ -508,9 +508,8 @@ function PMA_DBI_get_databases_full($database = null, $force_stats = false,
|
||||
* if $GLOBALS['cfg']['NaturalOrder'] is enabled, we cannot use LIMIT
|
||||
* cause MySQL does not support natural ordering, we have to do it afterward
|
||||
*/
|
||||
if ($GLOBALS['cfg']['NaturalOrder']) {
|
||||
$limit = '';
|
||||
} else {
|
||||
$limit = '';
|
||||
if (!$GLOBALS['cfg']['NaturalOrder']) {
|
||||
if ($limit_count) {
|
||||
$limit = ' LIMIT ' . $limit_count . ' OFFSET ' . $limit_offset;
|
||||
}
|
||||
@ -945,7 +944,6 @@ function PMA_DBI_get_variable($var, $type = PMA_DBI_GETVAR_SESSION, $link = null
|
||||
* @uses $GLOBALS['mysql_charset_map']
|
||||
* @uses $GLOBALS['charset']
|
||||
* @uses $GLOBALS['lang']
|
||||
* @uses $GLOBALS['server']
|
||||
* @uses $GLOBALS['cfg']['Lang']
|
||||
* @uses defined()
|
||||
* @uses explode()
|
||||
@ -989,7 +987,7 @@ function PMA_DBI_postConnect($link, $is_controluser = false)
|
||||
define('PMA_DRIZZLE', PMA_MYSQL_MAJOR_VERSION >= 2009);
|
||||
}
|
||||
|
||||
/* Skip charsets for Drizzle */
|
||||
// Skip charsets for Drizzle
|
||||
if (!PMA_DRIZZLE) {
|
||||
if (! empty($GLOBALS['collation_connection'])) {
|
||||
PMA_DBI_query("SET CHARACTER SET 'utf8';", $link, PMA_DBI_QUERY_STORE);
|
||||
|
||||
@ -152,7 +152,7 @@ if (true === $cfg['SkipLockedTables']) {
|
||||
null, PMA_DBI_QUERY_STORE);
|
||||
if ($db_info_result && PMA_DBI_num_rows($db_info_result) > 0) {
|
||||
while ($tmp = PMA_DBI_fetch_row($db_info_result)) {
|
||||
if (!isset($sot_cache[$tmp[0]])) {
|
||||
if (! isset($sot_cache[$tmp[0]])) {
|
||||
$sts_result = PMA_DBI_query(
|
||||
'SHOW TABLE STATUS FROM ' . PMA_backquote($db)
|
||||
. ' LIKE \'' . addslashes($tmp[0]) . '\';');
|
||||
@ -160,7 +160,7 @@ if (true === $cfg['SkipLockedTables']) {
|
||||
PMA_DBI_free_result($sts_result);
|
||||
unset($sts_result);
|
||||
|
||||
if (!isset($sts_tmp['Type']) && isset($sts_tmp['Engine'])) {
|
||||
if (! isset($sts_tmp['Type']) && isset($sts_tmp['Engine'])) {
|
||||
$sts_tmp['Type'] =& $sts_tmp['Engine'];
|
||||
}
|
||||
|
||||
|
||||
@ -65,7 +65,7 @@ echo '<input type="hidden" name="export_type" value="' . $export_type . '" />' .
|
||||
// If the export method was not set, the default is quick
|
||||
if(isset($_GET['export_method'])) {
|
||||
$cfg['Export']['method'] = $_GET['export_method'];
|
||||
} elseif(!isset($cfg['Export']['method'])) {
|
||||
} elseif(! isset($cfg['Export']['method'])) {
|
||||
$cfg['Export']['method'] = 'quick';
|
||||
}
|
||||
// The export method (quick, custom or custom-no-form)
|
||||
|
||||
@ -175,7 +175,7 @@ if ($_SESSION[$SESSION_KEY]["handler"]!="noplugin") {
|
||||
$uid = uniqid("");
|
||||
PMA_browseUploadFile($max_upload_size);
|
||||
} else if (!$GLOBALS['is_upload']) {
|
||||
PMA_Message::warning(__('File uploads are not allowed on this server.'))->display();
|
||||
PMA_Message::notice(__('File uploads are not allowed on this server.'))->display();
|
||||
} else if (!empty($cfg['UploadDir'])) {
|
||||
PMA_selectUploadFile($import_list, $cfg['UploadDir']);
|
||||
} // end if (web-server upload directory)
|
||||
|
||||
@ -1091,7 +1091,7 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) {
|
||||
}
|
||||
}
|
||||
|
||||
if (!is_array($map)) {
|
||||
if (! is_array($map)) {
|
||||
$map = array();
|
||||
}
|
||||
$row_no = 0;
|
||||
@ -1272,7 +1272,7 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) {
|
||||
$condition_field = false;
|
||||
}
|
||||
|
||||
if ($_SESSION['tmp_user_values']['disp_direction'] == 'vertical' && (!isset($GLOBALS['printview']) || ($GLOBALS['printview'] != '1'))) {
|
||||
if ($_SESSION['tmp_user_values']['disp_direction'] == 'vertical' && (! isset($GLOBALS['printview']) || ($GLOBALS['printview'] != '1'))) {
|
||||
// the row number corresponds to a data row, not HTML table row
|
||||
$class .= ' row_' . $row_no;
|
||||
if ($GLOBALS['cfg']['BrowsePointerEnable'] == true) {
|
||||
@ -1328,7 +1328,7 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) {
|
||||
// will show both fields NULL even if only one is NULL,
|
||||
// so use the $pointer
|
||||
|
||||
if (!isset($row[$i]) || is_null($row[$i])) {
|
||||
if (! isset($row[$i]) || is_null($row[$i])) {
|
||||
$vertical_display['data'][$row_no][$i] = PMA_buildNullDisplay($class, $condition_field);
|
||||
} elseif ($row[$i] != '') {
|
||||
|
||||
@ -1351,7 +1351,7 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) {
|
||||
$class = str_replace('inline_edit', '', $class);
|
||||
|
||||
if (stristr($field_flags, 'BINARY')) {
|
||||
if (!isset($row[$i]) || is_null($row[$i])) {
|
||||
if (! isset($row[$i]) || is_null($row[$i])) {
|
||||
$vertical_display['data'][$row_no][$i] = PMA_buildNullDisplay($class, $condition_field);
|
||||
} else {
|
||||
// for blobstreaming
|
||||
@ -1367,7 +1367,7 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) {
|
||||
}
|
||||
// not binary:
|
||||
} else {
|
||||
if (!isset($row[$i]) || is_null($row[$i])) {
|
||||
if (! isset($row[$i]) || is_null($row[$i])) {
|
||||
$vertical_display['data'][$row_no][$i] = PMA_buildNullDisplay($class, $condition_field);
|
||||
} elseif ($row[$i] != '') {
|
||||
// if a transform function for blob is set, none of these replacements will be made
|
||||
@ -1395,7 +1395,7 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) {
|
||||
|
||||
// n o t n u m e r i c a n d n o t B L O B
|
||||
} else {
|
||||
if (!isset($row[$i]) || is_null($row[$i])) {
|
||||
if (! isset($row[$i]) || is_null($row[$i])) {
|
||||
$vertical_display['data'][$row_no][$i] = PMA_buildNullDisplay($class, $condition_field);
|
||||
} elseif ($row[$i] != '') {
|
||||
// support blanks in the key
|
||||
@ -1477,7 +1477,7 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) {
|
||||
|
||||
// 4. Gather links of del_urls and edit_urls in an array for later
|
||||
// output
|
||||
if (!isset($vertical_display['edit'][$row_no])) {
|
||||
if (! isset($vertical_display['edit'][$row_no])) {
|
||||
$vertical_display['edit'][$row_no] = '';
|
||||
$vertical_display['copy'][$row_no] = '';
|
||||
$vertical_display['delete'][$row_no] = '';
|
||||
@ -1563,7 +1563,7 @@ function PMA_displayVerticalTable()
|
||||
// Displays "edit" link at top if required
|
||||
if ($GLOBALS['cfg']['ModifyDeleteAtLeft'] && is_array($vertical_display['edit']) && (count($vertical_display['edit']) > 0 || !empty($vertical_display['textbtn']))) {
|
||||
echo '<tr>' . "\n";
|
||||
if (!is_array($vertical_display['row_delete'])) {
|
||||
if (! is_array($vertical_display['row_delete'])) {
|
||||
echo $vertical_display['textbtn'];
|
||||
}
|
||||
$foo_counter = 0;
|
||||
@ -1581,7 +1581,7 @@ function PMA_displayVerticalTable()
|
||||
// Displays "copy" link at top if required
|
||||
if ($GLOBALS['cfg']['ModifyDeleteAtLeft'] && is_array($vertical_display['copy']) && (count($vertical_display['copy']) > 0 || !empty($vertical_display['textbtn']))) {
|
||||
echo '<tr>' . "\n";
|
||||
if (!is_array($vertical_display['row_delete'])) {
|
||||
if (! is_array($vertical_display['row_delete'])) {
|
||||
echo $vertical_display['textbtn'];
|
||||
}
|
||||
$foo_counter = 0;
|
||||
@ -1599,7 +1599,7 @@ function PMA_displayVerticalTable()
|
||||
// Displays "delete" link at top if required
|
||||
if ($GLOBALS['cfg']['ModifyDeleteAtLeft'] && is_array($vertical_display['delete']) && (count($vertical_display['delete']) > 0 || !empty($vertical_display['textbtn']))) {
|
||||
echo '<tr>' . "\n";
|
||||
if (!is_array($vertical_display['edit']) && !is_array($vertical_display['row_delete'])) {
|
||||
if (! is_array($vertical_display['edit']) && ! is_array($vertical_display['row_delete'])) {
|
||||
echo $vertical_display['textbtn'];
|
||||
}
|
||||
$foo_counter = 0;
|
||||
@ -1652,7 +1652,7 @@ function PMA_displayVerticalTable()
|
||||
// Displays "edit" link at bottom if required
|
||||
if ($GLOBALS['cfg']['ModifyDeleteAtRight'] && is_array($vertical_display['edit']) && (count($vertical_display['edit']) > 0 || !empty($vertical_display['textbtn']))) {
|
||||
echo '<tr>' . "\n";
|
||||
if (!is_array($vertical_display['row_delete'])) {
|
||||
if (! is_array($vertical_display['row_delete'])) {
|
||||
echo $vertical_display['textbtn'];
|
||||
}
|
||||
$foo_counter = 0;
|
||||
@ -1670,7 +1670,7 @@ function PMA_displayVerticalTable()
|
||||
// Displays "copy" link at bottom if required
|
||||
if ($GLOBALS['cfg']['ModifyDeleteAtRight'] && is_array($vertical_display['copy']) && (count($vertical_display['copy']) > 0 || !empty($vertical_display['textbtn']))) {
|
||||
echo '<tr>' . "\n";
|
||||
if (!is_array($vertical_display['row_delete'])) {
|
||||
if (! is_array($vertical_display['row_delete'])) {
|
||||
echo $vertical_display['textbtn'];
|
||||
}
|
||||
$foo_counter = 0;
|
||||
@ -1688,7 +1688,7 @@ function PMA_displayVerticalTable()
|
||||
// Displays "delete" link at bottom if required
|
||||
if ($GLOBALS['cfg']['ModifyDeleteAtRight'] && is_array($vertical_display['delete']) && (count($vertical_display['delete']) > 0 || !empty($vertical_display['textbtn']))) {
|
||||
echo '<tr>' . "\n";
|
||||
if (!is_array($vertical_display['edit']) && !is_array($vertical_display['row_delete'])) {
|
||||
if (! is_array($vertical_display['edit']) && ! is_array($vertical_display['row_delete'])) {
|
||||
echo $vertical_display['textbtn'];
|
||||
}
|
||||
$foo_counter = 0;
|
||||
@ -2070,7 +2070,7 @@ function PMA_displayTable(&$dt_result, &$the_disp_mode, $analyzed_sql)
|
||||
|
||||
PMA_showMessage($message, $sql_query, 'success');
|
||||
|
||||
} elseif (!isset($GLOBALS['printview']) || $GLOBALS['printview'] != '1') {
|
||||
} elseif (! isset($GLOBALS['printview']) || $GLOBALS['printview'] != '1') {
|
||||
PMA_showMessage(__('Your SQL query has been executed successfully'), $sql_query, 'success');
|
||||
}
|
||||
|
||||
@ -2090,7 +2090,7 @@ function PMA_displayTable(&$dt_result, &$the_disp_mode, $analyzed_sql)
|
||||
if ($is_display['nav_bar'] == '1') {
|
||||
PMA_displayTableNavigation($pos_next, $pos_prev, $sql_query, 'top_direction_dropdown');
|
||||
echo "\n";
|
||||
} elseif (!isset($GLOBALS['printview']) || $GLOBALS['printview'] != '1') {
|
||||
} elseif (! isset($GLOBALS['printview']) || $GLOBALS['printview'] != '1') {
|
||||
echo "\n" . '<br /><br />' . "\n";
|
||||
}
|
||||
|
||||
@ -2212,12 +2212,12 @@ function PMA_displayTable(&$dt_result, &$the_disp_mode, $analyzed_sql)
|
||||
if ($is_display['nav_bar'] == '1') {
|
||||
echo '<br />' . "\n";
|
||||
PMA_displayTableNavigation($pos_next, $pos_prev, $sql_query, 'bottom_direction_dropdown');
|
||||
} elseif (!isset($GLOBALS['printview']) || $GLOBALS['printview'] != '1') {
|
||||
} elseif (! isset($GLOBALS['printview']) || $GLOBALS['printview'] != '1') {
|
||||
echo "\n" . '<br /><br />' . "\n";
|
||||
}
|
||||
|
||||
// 6. ----- Displays "Query results operations"
|
||||
if (!isset($GLOBALS['printview']) || $GLOBALS['printview'] != '1') {
|
||||
if (! isset($GLOBALS['printview']) || $GLOBALS['printview'] != '1') {
|
||||
PMA_displayResultsOperations($the_disp_mode, $analyzed_sql);
|
||||
}
|
||||
} // end of the 'PMA_displayTable()' function
|
||||
@ -2298,8 +2298,8 @@ function PMA_displayResultsOperations($the_disp_mode, $analyzed_sql) {
|
||||
// If the parser found a PROCEDURE clause
|
||||
// (most probably PROCEDURE ANALYSE()) it makes no sense to
|
||||
// display the Export link).
|
||||
if (isset($analyzed_sql[0]) && $analyzed_sql[0]['querytype'] == 'SELECT' && !isset($printview) && ! isset($analyzed_sql[0]['queryflags']['procedure'])) {
|
||||
if (isset($analyzed_sql[0]['table_ref'][0]['table_true_name']) && !isset($analyzed_sql[0]['table_ref'][1]['table_true_name'])) {
|
||||
if (isset($analyzed_sql[0]) && $analyzed_sql[0]['querytype'] == 'SELECT' && ! isset($printview) && ! isset($analyzed_sql[0]['queryflags']['procedure'])) {
|
||||
if (isset($analyzed_sql[0]['table_ref'][0]['table_true_name']) && ! isset($analyzed_sql[0]['table_ref'][1]['table_true_name'])) {
|
||||
$_url_params['single_table'] = 'true';
|
||||
}
|
||||
if (!$header_shown) {
|
||||
|
||||
@ -166,7 +166,7 @@ if (window.parent.frame_content) {
|
||||
}
|
||||
|
||||
// Link to itself to replicate windows including frameset
|
||||
if (!isset($GLOBALS['checked_special'])) {
|
||||
if (! isset($GLOBALS['checked_special'])) {
|
||||
$GLOBALS['checked_special'] = false;
|
||||
}
|
||||
|
||||
|
||||
@ -30,7 +30,7 @@ if (isset($GLOBALS['is_ajax_request']) && !$GLOBALS['is_ajax_request']) {
|
||||
// if database storage for user preferences is transient, offer to load
|
||||
// exported settings from localStorage (detection will be done in JavaScript)
|
||||
$userprefs_offer_import = $GLOBALS['PMA_Config']->get('user_preferences') == 'session'
|
||||
&& !isset($_SESSION['userprefs_autoload']);
|
||||
&& ! isset($_SESSION['userprefs_autoload']);
|
||||
if ($userprefs_offer_import) {
|
||||
$GLOBALS['js_include'][] = 'config.js';
|
||||
}
|
||||
@ -143,7 +143,7 @@ if (isset($GLOBALS['is_ajax_request']) && !$GLOBALS['is_ajax_request']) {
|
||||
* @uses $show_comment from libraries/tbl_info.inc.php
|
||||
* @uses $GLOBALS['avoid_show_comment'] from tbl_relation.php
|
||||
*/
|
||||
if (!empty($show_comment) && !isset($GLOBALS['avoid_show_comment'])) {
|
||||
if (!empty($show_comment) && ! isset($GLOBALS['avoid_show_comment'])) {
|
||||
if (strstr($show_comment, '; InnoDB free')) {
|
||||
$show_comment = preg_replace('@; InnoDB free:.*?$@', '', $show_comment);
|
||||
}
|
||||
|
||||
@ -127,7 +127,7 @@ function PMA_importRunQuery($sql = '', $full = '', $controluser = false)
|
||||
}
|
||||
$msg = '# ';
|
||||
if ($result === FALSE) { // execution failed
|
||||
if (!isset($my_die)) {
|
||||
if (! isset($my_die)) {
|
||||
$my_die = array();
|
||||
}
|
||||
$my_die[] = array('sql' => $import_run_buffer['full'], 'error' => PMA_DBI_getError());
|
||||
@ -697,7 +697,7 @@ function PMA_detectSize($last_cumulative_size, $last_cumulative_type, $curr_type
|
||||
/**
|
||||
* This is the first row to be analyzed
|
||||
*/
|
||||
elseif (!isset($last_cumulative_type) || $last_cumulative_type == NONE) {
|
||||
elseif (! isset($last_cumulative_type) || $last_cumulative_type == NONE) {
|
||||
return $curr_size;
|
||||
}
|
||||
/**
|
||||
|
||||
@ -37,7 +37,7 @@ if (! PMA_cacheExists('mysql_charsets_count', true)) {
|
||||
: 'SELECT * FROM information_schema.COLLATIONS';
|
||||
$res = PMA_DBI_query($sql);
|
||||
while ($row = PMA_DBI_fetch_assoc($res)) {
|
||||
if (!is_array($mysql_collations[$row['CHARACTER_SET_NAME']])) {
|
||||
if (! is_array($mysql_collations[$row['CHARACTER_SET_NAME']])) {
|
||||
$mysql_collations[$row['CHARACTER_SET_NAME']] = array($row['COLLATION_NAME']);
|
||||
} else {
|
||||
$mysql_collations[$row['CHARACTER_SET_NAME']][] = $row['COLLATION_NAME'];
|
||||
@ -46,7 +46,7 @@ if (! PMA_cacheExists('mysql_charsets_count', true)) {
|
||||
if ($row['IS_DEFAULT'] == 'Yes') {
|
||||
$mysql_default_collations[$row['CHARACTER_SET_NAME']] = $row['COLLATION_NAME'];
|
||||
}
|
||||
//$mysql_collations_available[$row['Collation']] = !isset($row['Compiled']) || $row['Compiled'] == 'Yes';
|
||||
//$mysql_collations_available[$row['Collation']] = ! isset($row['Compiled']) || $row['Compiled'] == 'Yes';
|
||||
$mysql_collations_available[$row['COLLATION_NAME']] = true;
|
||||
$mysql_charsets_available[$row['CHARACTER_SET_NAME']] =
|
||||
!empty($mysql_charsets_available[$row['CHARACTER_SET_NAME']])
|
||||
|
||||
@ -71,7 +71,7 @@ function PMA_getString($name)
|
||||
function PMA_pluginCheckboxCheck($section, $opt)
|
||||
{
|
||||
// If the form is being repopulated using $_GET data, that is priority
|
||||
if (isset($_GET[$opt]) || !isset($_GET['repopulate']) && ((isset($GLOBALS['timeout_passed']) && $GLOBALS['timeout_passed'] && isset($_REQUEST[$opt])) ||
|
||||
if (isset($_GET[$opt]) || ! isset($_GET['repopulate']) && ((isset($GLOBALS['timeout_passed']) && $GLOBALS['timeout_passed'] && isset($_REQUEST[$opt])) ||
|
||||
(isset($GLOBALS['cfg'][$section][$opt]) && $GLOBALS['cfg'][$section][$opt]))) {
|
||||
return ' checked="checked"';
|
||||
}
|
||||
@ -160,7 +160,7 @@ function PMA_pluginIsActive($section, $opt, $val)
|
||||
*/
|
||||
function PMA_pluginGetChoice($section, $name, &$list, $cfgname = NULL)
|
||||
{
|
||||
if (!isset($cfgname)) {
|
||||
if (! isset($cfgname)) {
|
||||
$cfgname = $name;
|
||||
}
|
||||
$ret = '<select id="plugins" name="' . $name . '">';
|
||||
@ -168,7 +168,7 @@ function PMA_pluginGetChoice($section, $name, &$list, $cfgname = NULL)
|
||||
foreach ($list as $plugin_name => $val) {
|
||||
$ret .= '<option';
|
||||
// If the form is being repopulated using $_GET data, that is priority
|
||||
if(isset($_GET[$name]) && $plugin_name == $_GET[$name] || !isset($_GET[$name]) && $plugin_name == $default) {
|
||||
if(isset($_GET[$name]) && $plugin_name == $_GET[$name] || ! isset($_GET[$name]) && $plugin_name == $default) {
|
||||
$ret .= ' selected="selected"';
|
||||
}
|
||||
$ret .= ' value="' . $plugin_name . '">' . PMA_getString($val['text']) . '</option>' . "\n";
|
||||
|
||||
@ -680,7 +680,7 @@ class PMA_Dia_Relation_Schema extends PMA_Export_Relation_Schema
|
||||
$dia->startDiaDoc($this->paper,$this->_topMargin,$this->_bottomMargin,$this->_leftMargin,$this->_rightMargin,$this->orientation);
|
||||
$alltables = $this->getAllTables($db,$this->pageNumber);
|
||||
foreach ($alltables as $table) {
|
||||
if (!isset($this->tables[$table])) {
|
||||
if (! isset($this->tables[$table])) {
|
||||
$this->tables[$table] = new Table_Stats($table, $this->pageNumber, $this->showKeys);
|
||||
}
|
||||
}
|
||||
@ -725,10 +725,10 @@ class PMA_Dia_Relation_Schema extends PMA_Export_Relation_Schema
|
||||
*/
|
||||
private function _addRelation($masterTable, $masterField, $foreignTable, $foreignField, $showKeys)
|
||||
{
|
||||
if (!isset($this->tables[$masterTable])) {
|
||||
if (! isset($this->tables[$masterTable])) {
|
||||
$this->tables[$masterTable] = new Table_Stats($masterTable, $this->pageNumber, $showKeys);
|
||||
}
|
||||
if (!isset($this->tables[$foreignTable])) {
|
||||
if (! isset($this->tables[$foreignTable])) {
|
||||
$this->tables[$foreignTable] = new Table_Stats($foreignTable, $this->pageNumber, $showKeys);
|
||||
}
|
||||
$this->_relations[] = new Relation_Stats($this->tables[$masterTable], $masterField, $this->tables[$foreignTable], $foreignField);
|
||||
|
||||
@ -759,7 +759,7 @@ class PMA_Eps_Relation_Schema extends PMA_Export_Relation_Schema
|
||||
$alltables = $this->getAllTables($db,$this->pageNumber);
|
||||
|
||||
foreach ($alltables AS $table) {
|
||||
if (!isset($this->tables[$table])) {
|
||||
if (! isset($this->tables[$table])) {
|
||||
$this->tables[$table] = new Table_Stats($table,$eps->getFont(),$eps->getFontSize(), $this->pageNumber, $this->_tablewidth, $this->showKeys, $this->tableDimension);
|
||||
}
|
||||
|
||||
@ -809,10 +809,10 @@ class PMA_Eps_Relation_Schema extends PMA_Export_Relation_Schema
|
||||
*/
|
||||
private function _addRelation($masterTable,$font,$fontSize, $masterField, $foreignTable, $foreignField, $showInfo)
|
||||
{
|
||||
if (!isset($this->tables[$masterTable])) {
|
||||
if (! isset($this->tables[$masterTable])) {
|
||||
$this->tables[$masterTable] = new Table_Stats($masterTable, $font, $fontSize, $this->pageNumber, $this->_tablewidth, false, $showInfo);
|
||||
}
|
||||
if (!isset($this->tables[$foreignTable])) {
|
||||
if (! isset($this->tables[$foreignTable])) {
|
||||
$this->tables[$foreignTable] = new Table_Stats($foreignTable,$font,$fontSize,$this->pageNumber, $this->_tablewidth, false, $showInfo);
|
||||
}
|
||||
$this->_relations[] = new Relation_Stats($this->tables[$masterTable], $masterField, $this->tables[$foreignTable], $foreignField);
|
||||
|
||||
@ -882,7 +882,7 @@ class PMA_Pdf_Relation_Schema extends PMA_Export_Relation_Schema
|
||||
|
||||
/* snip */
|
||||
foreach ($alltables as $table) {
|
||||
if (!isset($this->tables[$table])) {
|
||||
if (! isset($this->tables[$table])) {
|
||||
$this->tables[$table] = new Table_Stats($table, $this->_ff, $this->pageNumber, $this->_tablewidth, $this->showKeys, $this->tableDimension);
|
||||
}
|
||||
if ($this->sameWide) {
|
||||
@ -962,11 +962,11 @@ class PMA_Pdf_Relation_Schema extends PMA_Export_Relation_Schema
|
||||
*/
|
||||
private function _addRelation($masterTable, $masterField, $foreignTable, $foreignField, $showInfo)
|
||||
{
|
||||
if (!isset($this->tables[$masterTable])) {
|
||||
if (! isset($this->tables[$masterTable])) {
|
||||
$this->tables[$masterTable] = new Table_Stats($masterTable, $this->_ff, $this->pageNumber, $this->_tablewidth, false, $showInfo);
|
||||
$this->_setMinMax($this->tables[$masterTable]);
|
||||
}
|
||||
if (!isset($this->tables[$foreignTable])) {
|
||||
if (! isset($this->tables[$foreignTable])) {
|
||||
$this->tables[$foreignTable] = new Table_Stats($foreignTable, $this->_ff, $this->pageNumber, $this->_tablewidth, false, $showInfo);
|
||||
$this->_setMinMax($this->tables[$foreignTable]);
|
||||
}
|
||||
@ -1305,7 +1305,7 @@ class PMA_Pdf_Relation_Schema extends PMA_Export_Relation_Schema
|
||||
if ($zerofill) {
|
||||
$attribute = 'UNSIGNED ZEROFILL';
|
||||
}
|
||||
if (!isset($row['Default'])) {
|
||||
if (! isset($row['Default'])) {
|
||||
if ($row['Null'] != '' && $row['Null'] != 'NO') {
|
||||
$row['Default'] = 'NULL';
|
||||
}
|
||||
|
||||
@ -742,7 +742,7 @@ class PMA_Svg_Relation_Schema extends PMA_Export_Relation_Schema
|
||||
$alltables = $this->getAllTables($db,$this->pageNumber);
|
||||
|
||||
foreach ($alltables AS $table) {
|
||||
if (!isset($this->tables[$table])) {
|
||||
if (! isset($this->tables[$table])) {
|
||||
$this->tables[$table] = new Table_Stats($table,$svg->getFont(),$svg->getFontSize(), $this->pageNumber, $this->_tablewidth, $this->showKeys, $this->tableDimension);
|
||||
}
|
||||
|
||||
@ -805,11 +805,11 @@ class PMA_Svg_Relation_Schema extends PMA_Export_Relation_Schema
|
||||
*/
|
||||
private function _addRelation($masterTable,$font,$fontSize, $masterField, $foreignTable, $foreignField, $showInfo)
|
||||
{
|
||||
if (!isset($this->tables[$masterTable])) {
|
||||
if (! isset($this->tables[$masterTable])) {
|
||||
$this->tables[$masterTable] = new Table_Stats($masterTable, $font, $fontSize, $this->pageNumber, $this->_tablewidth, false, $showInfo);
|
||||
$this->_setMinMax($this->tables[$masterTable]);
|
||||
}
|
||||
if (!isset($this->tables[$foreignTable])) {
|
||||
if (! isset($this->tables[$foreignTable])) {
|
||||
$this->tables[$foreignTable] = new Table_Stats($foreignTable,$font,$fontSize,$this->pageNumber, $this->_tablewidth, false, $showInfo);
|
||||
$this->_setMinMax($this->tables[$foreignTable]);
|
||||
}
|
||||
|
||||
@ -222,7 +222,7 @@ class PMA_User_Schema
|
||||
* Display WYSIWYG parts
|
||||
*/
|
||||
|
||||
if (!isset($_POST['with_field_names']) && !isset($_POST['showwysiwyg'])) {
|
||||
if (! isset($_POST['with_field_names']) && ! isset($_POST['showwysiwyg'])) {
|
||||
$with_field_names = TRUE;
|
||||
}
|
||||
$this->_displayScratchboardTables($array_sh_page);
|
||||
@ -783,10 +783,10 @@ class PMA_User_Schema
|
||||
$arrvalue = 'c_table_' . $i;
|
||||
global $$arrvalue;
|
||||
$arrvalue = $$arrvalue;
|
||||
if (!isset($arrvalue['x']) || $arrvalue['x'] == '') {
|
||||
if (! isset($arrvalue['x']) || $arrvalue['x'] == '') {
|
||||
$arrvalue['x'] = 0;
|
||||
}
|
||||
if (!isset($arrvalue['y']) || $arrvalue['y'] == '') {
|
||||
if (! isset($arrvalue['y']) || $arrvalue['y'] == '') {
|
||||
$arrvalue['y'] = 0;
|
||||
}
|
||||
if (isset($arrvalue['name']) && $arrvalue['name'] != '--') {
|
||||
|
||||
@ -505,7 +505,7 @@ class PMA_Visio_Relation_Schema extends PMA_Export_Relation_Schema
|
||||
$alltables = $this->getAllTables($db,$this->pageNumber);
|
||||
|
||||
foreach ($alltables as $table) {
|
||||
if (!isset($this->tables[$table])) {
|
||||
if (! isset($this->tables[$table])) {
|
||||
$this->tables[$table] = new Table_Stats($table, $this->pageNumber, $this->showKeys);
|
||||
}
|
||||
}
|
||||
@ -550,10 +550,10 @@ class PMA_Visio_Relation_Schema extends PMA_Export_Relation_Schema
|
||||
*/
|
||||
private function _addRelation($masterTable, $masterField, $foreignTable, $foreignField, $showKeys)
|
||||
{
|
||||
if (!isset($this->tables[$masterTable])) {
|
||||
if (! isset($this->tables[$masterTable])) {
|
||||
$this->tables[$masterTable] = new Table_Stats($masterTable, $this->pageNumber, $showKeys);
|
||||
}
|
||||
if (!isset($this->tables[$foreignTable])) {
|
||||
if (! isset($this->tables[$foreignTable])) {
|
||||
$this->tables[$foreignTable] = new Table_Stats($foreignTable, $this->pageNumber, $showKeys);
|
||||
}
|
||||
$this->_relations[] = new Relation_Stats($this->tables[$masterTable], $masterField, $this->tables[$foreignTable], $foreignField);
|
||||
|
||||
@ -339,6 +339,11 @@ function PMA_langList()
|
||||
/* We can always speak English */
|
||||
$result = array('en' => PMA_langDetails('en'));
|
||||
|
||||
/* Check for existing directory */
|
||||
if (!is_dir($GLOBALS['lang_path'])) {
|
||||
return $result;
|
||||
}
|
||||
|
||||
/* Open the directory */
|
||||
$handle = @opendir($GLOBALS['lang_path']);
|
||||
/* This can happen if the kit is English-only */
|
||||
|
||||
@ -27,7 +27,7 @@ if (!$GLOBALS['is_ajax_request']) {
|
||||
/**
|
||||
* Put something in $sub_part
|
||||
*/
|
||||
if (!isset($sub_part)) {
|
||||
if (! isset($sub_part)) {
|
||||
$sub_part = '';
|
||||
}
|
||||
|
||||
|
||||
@ -95,7 +95,7 @@ if (! isset($_COOKIE[$session_name])) {
|
||||
* Token which is used for authenticating access queries.
|
||||
* (we use "space PMA_token space" to prevent overwriting)
|
||||
*/
|
||||
if (!isset($_SESSION[' PMA_token '])) {
|
||||
if (! isset($_SESSION[' PMA_token '])) {
|
||||
$_SESSION[' PMA_token '] = md5(uniqid(rand(), true));
|
||||
}
|
||||
|
||||
|
||||
@ -46,7 +46,7 @@ if (! defined('PMA_MINIMUM_COMMON')) {
|
||||
if (!defined('TESTSUITE')) {
|
||||
require_once './libraries/mysql_charsets.lib.php';
|
||||
}
|
||||
if (!isset($mysql_charsets)) {
|
||||
if (! isset($mysql_charsets)) {
|
||||
$mysql_charsets = array();
|
||||
$mysql_charsets_count = 0;
|
||||
$mysql_collations_flat = array();
|
||||
@ -360,7 +360,7 @@ if (! defined('PMA_MINIMUM_COMMON')) {
|
||||
$pos = $pos_quote_separator;
|
||||
}
|
||||
if (class_exists('PMA_Message')) {
|
||||
PMA_Message::warning(__('Automatically appended backtick to the end of query!'))->display();
|
||||
PMA_Message::notice(__('Automatically appended backtick to the end of query!'))->display();
|
||||
}
|
||||
} else {
|
||||
$debugstr = __('Unclosed quote') . ' @ ' . $startquotepos. "\n"
|
||||
@ -828,7 +828,7 @@ if (! defined('PMA_MINIMUM_COMMON')) {
|
||||
*/
|
||||
function PMA_SQP_analyze($arr)
|
||||
{
|
||||
if ($arr == array() || !isset($arr['len'])) {
|
||||
if ($arr == array() || ! isset($arr['len'])) {
|
||||
return array();
|
||||
}
|
||||
$result = array();
|
||||
@ -1960,7 +1960,7 @@ if (! defined('PMA_MINIMUM_COMMON')) {
|
||||
|
||||
if ($seen_create_table && $in_create_table_fields) {
|
||||
$current_identifier = $identifier;
|
||||
// warning: we set this one even for non TIMESTAMP type
|
||||
// we set this one even for non TIMESTAMP type
|
||||
$create_table_fields[$current_identifier]['timestamp_not_null'] = FALSE;
|
||||
}
|
||||
|
||||
@ -2090,7 +2090,7 @@ if (! defined('PMA_MINIMUM_COMMON')) {
|
||||
{
|
||||
//DEBUG echo 'in Format<pre>'; print_r($arr); echo '</pre>';
|
||||
// then check for an array
|
||||
if (!is_array($arr)) {
|
||||
if (! is_array($arr)) {
|
||||
return htmlspecialchars($arr);
|
||||
}
|
||||
// first check for the SQL parser having hit an error
|
||||
|
||||
@ -102,7 +102,7 @@ if ($showtable) {
|
||||
}
|
||||
}
|
||||
// we need explicit DEFAULT value here (different from '0')
|
||||
$pack_keys = (!isset($pack_keys) || strlen($pack_keys) == 0) ? 'DEFAULT' : $pack_keys;
|
||||
$pack_keys = (! isset($pack_keys) || strlen($pack_keys) == 0) ? 'DEFAULT' : $pack_keys;
|
||||
unset($create_options, $each_create_option);
|
||||
} // end if
|
||||
?>
|
||||
|
||||
@ -378,7 +378,7 @@ for ($i = 0; $i < $num_fields; $i++) {
|
||||
* having NULL enabled does not implicit having Default with NULL
|
||||
*
|
||||
if (isset($row)
|
||||
&& !isset($row['Default']) && isset($row['Null']) && $row['Null'] == 'YES') {
|
||||
&& ! isset($row['Default']) && isset($row['Null']) && $row['Null'] == 'YES') {
|
||||
$row['Default'] = 'NULL';
|
||||
}
|
||||
*/
|
||||
|
||||
@ -15,7 +15,7 @@ require './libraries/server_links.inc.php';
|
||||
// build user preferences menu
|
||||
|
||||
$form_param = filter_input(INPUT_GET, 'form');
|
||||
if (!isset($forms[$form_param])) {
|
||||
if (! isset($forms[$form_param])) {
|
||||
$forms_keys = array_keys($forms);
|
||||
$form_param = array_shift($forms_keys);
|
||||
}
|
||||
@ -64,7 +64,7 @@ $msg->display();
|
||||
|
||||
// warn about using session storage for settings
|
||||
$cfgRelation = PMA_getRelationsParam();
|
||||
if (!$cfgRelation['userconfigwork']) {
|
||||
if (! $cfgRelation['userconfigwork']) {
|
||||
$msg = __('Your preferences will be saved for current session only. Storing them permanently requires %sphpMyAdmin configuration storage%s.');
|
||||
$msg = PMA_sanitize(sprintf($msg, '[a@./Documentation.html#linked-tables@_blank]', '[/a]'));
|
||||
PMA_Message::notice($msg)->display();
|
||||
|
||||
@ -49,9 +49,9 @@ function PMA_userprefs_pageinit()
|
||||
function PMA_load_userprefs()
|
||||
{
|
||||
$cfgRelation = PMA_getRelationsParam();
|
||||
if (!$cfgRelation['userconfigwork']) {
|
||||
if (! $cfgRelation['userconfigwork']) {
|
||||
// no pmadb table, use session storage
|
||||
if (!isset($_SESSION['userconfig'])) {
|
||||
if (! isset($_SESSION['userconfig'])) {
|
||||
$_SESSION['userconfig'] = array(
|
||||
'db' => array(),
|
||||
'ts' => time());
|
||||
@ -104,7 +104,7 @@ function PMA_save_userprefs(array $config_array)
|
||||
? $GLOBALS['server']
|
||||
: $GLOBALS['cfg']['ServerDefault'];
|
||||
$cache_key = 'server_' . $server;
|
||||
if (!$cfgRelation['userconfigwork']) {
|
||||
if (! $cfgRelation['userconfigwork']) {
|
||||
// no pmadb table, use session storage
|
||||
$_SESSION['userconfig'] = array(
|
||||
'db' => $config_array,
|
||||
@ -175,7 +175,7 @@ function PMA_apply_userprefs(array $config_data)
|
||||
$whitelist['Server/hide_db'] = true;
|
||||
$whitelist['Server/only_db'] = true;
|
||||
foreach ($config_data as $path => $value) {
|
||||
if (!isset($whitelist[$path]) || isset($blacklist[$path])) {
|
||||
if (! isset($whitelist[$path]) || isset($blacklist[$path])) {
|
||||
continue;
|
||||
}
|
||||
PMA_array_write($path, $cfg, $value);
|
||||
|
||||
6
main.php
6
main.php
@ -292,7 +292,7 @@ if (file_exists('./config')) {
|
||||
*/
|
||||
if ($server > 0) {
|
||||
$cfgRelation = PMA_getRelationsParam();
|
||||
if(!$cfgRelation['allworks'] && $cfg['PmaNoRelation_DisableWarning'] == false) {
|
||||
if(! $cfgRelation['allworks'] && $cfg['PmaNoRelation_DisableWarning'] == false) {
|
||||
$message = PMA_Message::notice(__('The phpMyAdmin configuration storage is not completely configured, some extended features have been deactivated. To find out why click %shere%s.'));
|
||||
$message->addParam('<a href="' . $cfg['PmaAbsoluteUri'] . 'chk_rel.php?' . $common_url_query . '">', false);
|
||||
$message->addParam('</a>', false);
|
||||
@ -305,7 +305,7 @@ if ($server > 0) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Show warning when javascript support is missing.
|
||||
* Show notice when javascript support is missing.
|
||||
*/
|
||||
echo '<noscript>';
|
||||
$message = PMA_Message::notice(__('Javascript support is missing or disabled in your browser, some phpMyAdmin functionality will be missing. For example navigation frame will not refresh automatically.'));
|
||||
@ -351,7 +351,7 @@ if (file_exists('./libraries/language_stats.inc.php')) {
|
||||
* speaking users.
|
||||
*/
|
||||
if (isset($GLOBALS['language_stats'][$lang]) && $GLOBALS['language_stats'][$lang] < $cfg['TranslationWarningThreshold']) {
|
||||
trigger_error('You are using an incomplete translation, please help to make it better by <a href="http://www.phpmyadmin.net/home_page/improve.php#translate">contributing</a>.', E_USER_NOTICE);
|
||||
trigger_error('You are using an incomplete translation, please help to make it better by <a href="http://www.phpmyadmin.net/home_page/improve.php#translate" target="_blank">contributing</a>.', E_USER_NOTICE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -246,8 +246,8 @@ $element_counter = 0;
|
||||
|
||||
|
||||
if ($GLOBALS['cfg']['LeftFrameLight'] && strlen($GLOBALS['db'])) {
|
||||
$table_list = PMA_getTableList($GLOBALS['db']);
|
||||
$table_count = count($table_list);
|
||||
$table_list = PMA_getTableList($GLOBALS['db'], null, $tpos, $cfg['MaxTableList']);
|
||||
$table_count = PMA_getTableCount($GLOBALS['db']);
|
||||
|
||||
// show selected databasename as link to DefaultTabDatabase-page
|
||||
// with table count in ()
|
||||
@ -284,7 +284,6 @@ if ($GLOBALS['cfg']['LeftFrameLight'] && strlen($GLOBALS['db'])) {
|
||||
* user can find a navigator to page thru all tables.
|
||||
*
|
||||
*/
|
||||
$table_list = array_slice($table_list, $tpos, $cfg['MaxTableList']);
|
||||
if (! empty($table_list)) {
|
||||
// upper table list paginator
|
||||
if (count($table_list) <= $GLOBALS['cfg']['MaxTableList'] && $table_count > $GLOBALS['cfg']['MaxTableList']) {
|
||||
|
||||
548
po/be@latin.po
548
po/be@latin.po
File diff suppressed because it is too large
Load Diff
548
po/en_GB.po
548
po/en_GB.po
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
548
po/pt_BR.po
548
po/pt_BR.po
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user