diff --git a/ChangeLog b/ChangeLog index f70eae5870..85e45ab7e8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -57,6 +57,7 @@ phpMyAdmin - ChangeLog - [core] Remove library PHPExcel, due to license issues - [export] Remove native Excel export modules (xls and xlsx formats) - [import] Remove native Excel import modules (xls and xlsx formats) +- bug #3392920 [edit] BLOB emptied after editing another column 3.4.4.0 (not yet released) - bug #3323060 [parser] SQL parser breaks AJAX requests if query has unclosed quotes diff --git a/Documentation.html b/Documentation.html index 758a2bc90f..d7c76e16a4 100644 --- a/Documentation.html +++ b/Documentation.html @@ -4409,6 +4409,14 @@ chmod o+rwx tmp +

+ 6.30 How do I create a relation in designer?

+ +

To select relation, click :

+ +

+

The display column is shown in pink. To set/unset a column as the display column, click the "Choose column to display" icon, then click on the appropriate column name.

+

phpMyAdmin project

diff --git a/db_datadict.php b/db_datadict.php index acfb531414..89b2bc5590 100644 --- a/db_datadict.php +++ b/db_datadict.php @@ -11,7 +11,8 @@ require_once './libraries/common.inc.php'; if (! isset($selected_tbl)) { - require_once './libraries/header.inc.php'; + require './libraries/db_common.inc.php'; + require './libraries/db_info.inc.php'; } @@ -55,16 +56,15 @@ if ($cfgRelation['commwork']) { * Selects the database and gets tables names */ PMA_DBI_select_db($db); -$rowset = PMA_DBI_query('SHOW TABLES FROM ' . PMA_backquote($db) . ';', null, PMA_DBI_QUERY_STORE); +$tables = PMA_DBI_get_tables($db); $count = 0; -while ($row = PMA_DBI_fetch_row($rowset)) { - $table = $row[0]; +foreach($tables as $table) { $comments = PMA_getComments($db, $table); echo '
' . "\n"; - echo '

' . $table . '

' . "\n"; + echo '

' . htmlspecialchars($table) . '

' . "\n"; /** * Gets table informations @@ -204,7 +204,7 @@ while ($row = PMA_DBI_fetch_row($rowset)) { } else { $row['Default'] = htmlspecialchars($row['Default']); } - $field_name = htmlspecialchars($row['Field']); + $field_name = $row['Field']; if (PMA_MYSQL_INT_VERSION < 50025 && ! empty($analyzed_sql[0]['create_table_fields'][$field_name]['type']) @@ -226,9 +226,9 @@ while ($row = PMA_DBI_fetch_row($rowset)) { ' . $field_name . ''; + echo '' . htmlspecialchars($field_name) . ''; } else { - echo $field_name; + echo htmlspecialchars($field_name); } ?> diff --git a/db_search.php b/db_search.php index c0f2c082af..6242a53d9b 100644 --- a/db_search.php +++ b/db_search.php @@ -128,8 +128,7 @@ if (isset($_REQUEST['submit_search'])) { $sqlstr_delete = 'DELETE'; // Fields to select - $tblfields = PMA_DBI_fetch_result('SHOW FIELDS FROM ' . PMA_backquote($table) . ' FROM ' . PMA_backquote($GLOBALS['db']), - null, 'Field'); + $tblfields = PMA_DBI_get_columns($GLOBALS['db'], $table); // Table to use $sqlstr_from = ' FROM ' . PMA_backquote($GLOBALS['db']) . '.' . PMA_backquote($table); @@ -148,8 +147,8 @@ if (isset($_REQUEST['submit_search'])) { $thefieldlikevalue = array(); foreach ($tblfields as $tblfield) { - if (! isset($field) || strlen($field) == 0 || $tblfield == $field) { - $thefieldlikevalue[] = 'CONVERT(' . PMA_backquote($tblfield) . ' USING utf8)' + if (! isset($field) || strlen($field) == 0 || $tblfield['Field'] == $field) { + $thefieldlikevalue[] = 'CONVERT(' . PMA_backquote($tblfield['Field']) . ' USING utf8)' . ' ' . $like_or_regex . ' ' . "'" . $automatic_wildcard . $search_word diff --git a/js/codemirror/mode/mysql/mysql.js b/js/codemirror/mode/mysql/mysql.js index 657942d2cd..755e3ec85d 100644 --- a/js/codemirror/mode/mysql/mysql.js +++ b/js/codemirror/mode/mysql/mysql.js @@ -1,11 +1,14 @@ CodeMirror.defineMode("mysql", function(config, parserConfig) { var indentUnit = config.indentUnit, keywords = parserConfig.keywords, + verbs = parserConfig.verbs, functions = parserConfig.functions, types = parserConfig.types, - attributes = parserConfig.attributes, - multiLineStrings = parserConfig.multiLineStrings; + attributes = parserConfig.attributes, + multiLineStrings = parserConfig.multiLineStrings, + multiPartKeywords= parserConfig.multiPartKeywords; var isOperatorChar = /[+\-*&%=<>!?:\/|]/; + function chain(stream, state, f) { state.tokenize = f; return f(stream, state); @@ -64,14 +67,35 @@ CodeMirror.defineMode("mysql", function(config, parserConfig) { else { // get the whole word stream.eatWhile(/[\w\$_]/); + var word = stream.current().toLowerCase(); + var oldPos = stream.pos; + // is it one of the listed verbs? + if (verbs && verbs.propertyIsEnumerable(word)) return ret("keyword", "statement-verb"); // is it one of the listed keywords? - if (keywords && keywords.propertyIsEnumerable(stream.current().toLowerCase())) return ret("keyword", "keyword"); + if (keywords && keywords.propertyIsEnumerable(word)) return ret("keyword", "keyword"); // is it one of the listed functions? - if (functions && functions.propertyIsEnumerable(stream.current().toLowerCase())) return ret("keyword", "builtin"); + if (functions && functions.propertyIsEnumerable(word)) { + // All functions begin with '(' + stream.eatSpace(); + if(stream.peek() == '(') + return ret("keyword", "builtin"); + // Not func => restore old pos + stream.pos = oldPos; + } // is it one of the listed types? - if (types && types.propertyIsEnumerable(stream.current().toLowerCase())) return ret("keyword", "variable-2"); + if (types && types.propertyIsEnumerable(word)) return ret("keyword", "variable-2"); // is it one of the listed attributes? - if (attributes && attributes.propertyIsEnumerable(stream.current().toLowerCase())) return ret("keyword", "variable-3"); + if (attributes && attributes.propertyIsEnumerable(word)) return ret("keyword", "variable-3"); + // is it a multipart keyword? (currently only checks 2 word parts) + + stream.eatSpace(); + stream.eatWhile(/[\w\$_]/); + var doubleWord = stream.current().toLowerCase(); + if (multiPartKeywords && multiPartKeywords.propertyIsEnumerable(doubleWord)) return ret("keyword", "keyword"); + + // restore old pos + stream.pos = oldPos; + // default: just a "word" return ret("word", "mysql-word"); } @@ -122,11 +146,14 @@ CodeMirror.defineMode("mysql", function(config, parserConfig) { (function() { function keywords(str) { - var obj = {}, words = str.split(" "); + var obj = {}, words = str; + if(typeof str == 'string') words = str.split(" "); for (var i = 0; i < words.length; ++i) obj[words[i]] = true; return obj; } - var cKeywords = "accessible add all alter analyze and as asc asensitive before between bigint binary blob both by call cascade case change char character check collate column condition constraint continue convert create cross current_date current_time current_timestamp current_user cursor database databases day_hour day_microsecond day_minute day_second dec decimal declare default delayed delete desc describe deterministic distinct distinctrow div double drop dual each else elseif enclosed escaped exists exit explain false fetch float float4 float8 for force foreign from fulltext grant group having high_priority hour_microsecond hour_minute hour_second if ignore in index infile inner inout insensitive insert int int1 int2 int3 int4 int8 integer interval into is iterate join key keys kill leading leave left like limit linear lines load localtime localtimestamp lock long longblob longtext loop low_priority master_ssl_verify_server_cert match maxvalue mediumblob mediumint mediumtext middleint minute_microsecond minute_second mod modifies natural not no_write_to_binlog null numeric on optimize option optionally or order out outer outfile precision primary procedure purge range read reads read_write real references regexp release rename repeat replace require resignal restrict return revoke right rlike schema schemas second_microsecond select sensitive separator set show signal smallint spatial specific sql sqlexception sqlstate sqlwarning sql_big_result sql_calc_found_rows sql_small_result ssl starting straight_join table terminated then tinyblob tinyint tinytext to trailing trigger true undo union unique unlock unsigned update usage use using utc_date utc_time utc_timestamp values varbinary varchar varcharacter varying when where while with write xor year_month zerofill"; + var cKeywords = "accessible add all and as asc asensitive before between bigint binary blob both cascade case char character collate column condition constraint continue convert cross current_date current_time current_timestamp current_user cursor database databases day_hour day_microsecond day_minute day_second dec decimal declare default delayed desc deterministic distinct distinctrow div double dual each else elseif enclosed escaped exists exit explain false fetch float float4 float8 for force foreign fulltext from having high_priority hour_microsecond hour_minute hour_second if ignore in index infile inner inout insensitive int int1 int2 int3 int4 int8 integer interval is iterate join key keys leading leave left like limit linear lines localtime localtimestamp long longblob longtext loop low_priority master_ssl_verify_server_cert match maxvalue mediumblob mediumint mediumtext middleint minute_microsecond minute_second mod modifies natural not no_write_to_binlog null numeric on option optionally or out outer outfile precision primary procedure range read reads read_write real references regexp repeat require restrict return right rlike schema schemas second_microsecond sensitive separator smallint spatial specific sql sqlexception sqlstate sqlwarning sql_big_result sql_calc_found_rows sql_small_result ssl starting straight_join table terminated then tinyblob tinyint tinytext to trailing trigger true undo union unique unsigned usage using utc_date utc_time utc_timestamp values varbinary varchar varcharacter varying when where while with write xor year_month zerofill"; + + var cVerbs = "alter analyze begin binlog call change check checksum commit create deallocate describe do drop execute flush grant handler install kill load lock optimize cache partition prepare purge release rename repair replace reset resignal revoke rollback savepoint select set signal show start truncate uninstall unlock update use xa"; var cFunctions = "abs acos adddate addtime aes_decrypt aes_encrypt area asbinary ascii asin astext atan atan2 avg bdmpolyfromtext bdmpolyfromwkb bdpolyfromtext bdpolyfromwkb benchmark bin bit_and bit_count bit_length bit_or bit_xor boundary buffer cast ceil ceiling centroid char character_length charset char_length coalesce coercibility collation compress concat concat_ws connection_id contains conv convert convert_tz convexhull cos cot count crc32 crosses curdate current_date current_time current_timestamp current_user curtime database date datediff date_add date_diff date_format date_sub day dayname dayofmonth dayofweek dayofyear decode default degrees des_decrypt des_encrypt difference dimension disjoint distance elt encode encrypt endpoint envelope equals exp export_set exteriorring extract extractvalue field find_in_set floor format found_rows from_days from_unixtime geomcollfromtext geomcollfromwkb geometrycollection geometrycollectionfromtext geometrycollectionfromwkb geometryfromtext geometryfromwkb geometryn geometrytype geomfromtext geomfromwkb get_format get_lock glength greatest group_concat group_unique_users hex hour if ifnull inet_aton inet_ntoa insert instr interiorringn intersection intersects interval isclosed isempty isnull isring issimple is_free_lock is_used_lock last_day last_insert_id lcase least left length linefromtext linefromwkb linestring linestringfromtext linestringfromwkb ln load_file localtime localtimestamp locate log log10 log2 lower lpad ltrim makedate maketime make_set master_pos_wait max mbrcontains mbrdisjoint mbrequal mbrintersects mbroverlaps mbrtouches mbrwithin md5 microsecond mid min minute mlinefromtext mlinefromwkb mod month monthname mpointfromtext mpointfromwkb mpolyfromtext mpolyfromwkb multilinestring multilinestringfromtext multilinestringfromwkb multipoint multipointfromtext multipointfromwkb multipolygon multipolygonfromtext multipolygonfromwkb name_const now nullif numgeometries numinteriorrings numpoints oct octet_length old_password ord overlaps password period_add period_diff pi point pointfromtext pointfromwkb pointn pointonsurface polyfromtext polyfromwkb polygon polygonfromtext polygonfromwkb position pow power quarter quote radians rand related release_lock repeat replace reverse right round row_count rpad rtrim schema second sec_to_time session_user sha sha1 sign sin sleep soundex space sqrt srid startpoint std stddev stddev_pop stddev_samp strcmp str_to_date subdate substr substring substring_index subtime sum symdifference sysdate system_user tan time timediff timestamp timestampadd timestampdiff time_format time_to_sec touches to_days trim truncate ucase uncompress uncompressed_length unhex unique_users unix_timestamp updatexml upper user utc_date utc_time utc_timestamp uuid variance var_pop var_samp version week weekday weekofyear within x y year yearweek"; @@ -134,11 +161,15 @@ CodeMirror.defineMode("mysql", function(config, parserConfig) { var cAttributes = "archive ascii auto_increment bdb berkeleydb binary blackhole csv default example federated heap innobase innodb isam maria memory merge mrg_isam mrg_myisam myisam national ndb ndbcluster precision undefined unicode unsigned varying zerofill"; + var cmultiPartKeywords = ['insert into', 'group by', 'order by', 'delete from']; + CodeMirror.defineMIME("text/x-mysql", { name: "mysql", keywords: keywords(cKeywords), + multiPartKeywords: keywords(cmultiPartKeywords), + verbs: keywords(cVerbs), functions: keywords(cFunctions), types: keywords(cTypes), attributes: keywords(cAttributes) }); -}()); +}()); \ No newline at end of file diff --git a/js/functions.js b/js/functions.js index 54a08d5371..022cb808c1 100644 --- a/js/functions.js +++ b/js/functions.js @@ -1617,7 +1617,13 @@ function PMA_createProfilingChart(data, options) },options)); } -// Formats a profiling duration nicely. Used in PMA_createProfilingChart() and server_status.js +/** + * Formats a profiling duration nicely (in us and ms time). Used in PMA_createProfilingChart() and server_status.js + * + * @param integer Number to be formatted, should be in the range of microsecond to second + * @param integer Acuracy, how many numbers right to the comma should be + * @return string The formatted number + */ function PMA_prettyProfilingNum(num, acc) { if (!acc) { @@ -1635,6 +1641,150 @@ function PMA_prettyProfilingNum(num, acc) return num + 's'; } + +/** + * Formats a SQL Query nicely with newlines and indentation. Depends on Codemirror and MySQL Mode! + * + * @param string Query to be formatted + * @return string The formatted query + */ +function PMA_SQLPrettyPrint(string) +{ + var mode = CodeMirror.getMode({},"text/x-mysql"); + var stream = new CodeMirror.StringStream(string); + var state = mode.startState(); + var token, tokens = []; + var output = ''; + var tabs = function(cnt) { + var ret = ''; + for (var i=0; i<4*cnt; i++) + ret += " "; + return ret; + }; + + // "root-level" statements + var statements = { + 'select': ['select', 'from','on','where','having','limit','order by','group by'], + 'update': ['update', 'set','where'], + 'insert into': ['insert into', 'values'] + }; + // don't put spaces before these tokens + var spaceExceptionsBefore = { ';':true, ',': true, '.': true, '(': true }; + // don't put spaces after these tokens + var spaceExceptionsAfter = { '.': true }; + + // Populate tokens array + var str=''; + while (! stream.eol()) { + stream.start = stream.pos; + token = mode.token(stream, state); + if(token != null) { + tokens.push([token, stream.current().toLowerCase()]); + } + } + + var currentStatement = tokens[0][1]; + + if(! statements[currentStatement]) { + return string; + } + // Holds all currently opened code blocks (statement, function or generic) + var blockStack = []; + // Holds the type of block from last iteration (the current is in blockStack[0]) + var previousBlock; + // If a new code block is found, newBlock contains its type for one iteration and vice versa for endBlock + var newBlock, endBlock; + // How much to indent in the current line + var indentLevel = 0; + // Holds the "root-level" statements + var statementPart, lastStatementPart = statements[currentStatement][0]; + + blockStack.unshift('statement'); + + // Iterate through every token and format accordingly + for (var i = 0; i < tokens.length; i++) { + previousBlock = blockStack[0]; + + // New block => push to stack + if (tokens[i][1] == '(') { + if (i < tokens.length - 1 && tokens[i+1][0] == 'statement-verb') { + blockStack.unshift(newBlock = 'statement'); + } else if (i > 0 && tokens[i-1][0] == 'builtin') { + blockStack.unshift(newBlock = 'function'); + } else { + blockStack.unshift(newBlock = 'generic'); + } + } else { + newBlock = null; + } + + // Block end => pop from stack + if (tokens[i][1] == ')') { + endBlock = blockStack[0]; + blockStack.shift(); + } else { + endBlock = null; + } + + // A subquery is starting + if (i > 0 && newBlock == 'statement') { + indentLevel++; + output += "\n" + tabs(indentLevel) + tokens[i][1] + ' ' + tokens[i+1][1].toUpperCase() + "\n" + tabs(indentLevel + 1); + currentStatement = tokens[i+1][1]; + i++; + continue; + } + + // A subquery is ending + if (endBlock == 'statement' && indentLevel > 0) { + output += "\n" + tabs(indentLevel); + indentLevel--; + } + + // One less indentation for statement parts (from, where, order by, etc.) and a newline + statementPart = statements[currentStatement].indexOf(tokens[i][1]); + if (statementPart != -1) { + if (i > 0) output += "\n"; + output += tabs(indentLevel) + tokens[i][1].toUpperCase(); + output += "\n" + tabs(indentLevel + 1); + lastStatementPart = tokens[i][1]; + } + // Normal indentatin and spaces for everything else + else { + if (! spaceExceptionsBefore[tokens[i][1]] + && ! (i > 0 && spaceExceptionsAfter[tokens[i-1][1]]) + && output.charAt(output.length -1) != ' ' ) { + output += " "; + } + if (tokens[i][0] == 'keyword') { + output += tokens[i][1].toUpperCase(); + } else { + output += tokens[i][1]; + } + } + + // split columns in select and 'update set' clauses, but only inside statements blocks + if (( lastStatementPart == 'select' || lastStatementPart == 'where' || lastStatementPart == 'set') + && tokens[i][1]==',' && blockStack[0] == 'statement') { + + output += "\n" + tabs(indentLevel + 1); + } + + // split conditions in where clauses, but only inside statements blocks + if (lastStatementPart == 'where' + && (tokens[i][1]=='and' || tokens[i][1]=='or' || tokens[i][1]=='xor')) { + + if (blockStack[0] == 'statement') { + output += "\n" + tabs(indentLevel + 1); + } + // Todo: Also split and or blocks in newlines & identation++ + //if(blockStack[0] == 'generic') + // output += ... + } + } + return output; +} + /** * jQuery function that uses jQueryUI's dialogs to confirm with user. Does not * return a jQuery object yet and hence cannot be chained @@ -3157,8 +3307,6 @@ function PMA_getCellValue(td) { return ''; } else if (! $(td).is('.to_be_saved') && $(td).data('original_data')) { return $(td).data('original_data'); - } else if ($(td).is(':not(.transformed, .relation, .enum, .set, .null)')) { - return unescape($(td).find('span').html()).replace(/
/g, "\n"); } else { return $(td).text(); } diff --git a/js/makegrid.js b/js/makegrid.js index aabe9b59cd..70e9b9adb1 100644 --- a/js/makegrid.js +++ b/js/makegrid.js @@ -564,7 +564,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi !g.colRsz && !g.colReorder) { if (!g.isCellEditActive) { - $cell = $(cell); + var $cell = $(cell); // remove all edit area and hide it $(g.cEdit).find('.edit_area').empty().hide(); // reposition the cEdit element @@ -573,24 +573,19 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi left: $cell.position().left }) .show() - .find('input') + .find('.edit_box') .css({ width: $cell.outerWidth(), height: $cell.outerHeight() }); - // fill the cell edit with text from , if it is not null - var value = $cell.is(':not(.null)') ? PMA_getCellValue(cell) : ''; - $(g.cEdit).find('input') - .val(value); + // fill the cell edit with text from + var value = PMA_getCellValue(cell); + $(g.cEdit).find('.edit_box').val(value); g.currentEditCell = cell; - $(g.cEdit).find('input[type=text]').focus(); + $(g.cEdit).find('.edit_box').focus(); $(g.cEdit).find('*').removeAttr('disabled'); } - } else { - if (g.isCellEditActive) { - g.hideEditCell(); - } } }, @@ -605,7 +600,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi */ hideEditCell: function(force, data, field) { if (g.isCellEditActive && !force) { - // cell is being edited, post the edited data + // cell is being edited, save or post the edited data g.saveOrPostEditedCell(); return; } @@ -620,21 +615,19 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi if (g.currentEditCell) { // save value of currently edited cell // replace current edited field with the new value var $this_field = $(g.currentEditCell); - var new_html = $this_field.data('value'); var is_null = $this_field.data('value') == null; if (is_null) { $this_field.find('span').html('NULL'); $this_field.addClass('null'); } else { $this_field.removeClass('null'); + var new_html = $this_field.data('value'); if ($this_field.is('.truncated')) { if (new_html.length > g.maxTruncatedLen) { new_html = new_html.substring(0, g.maxTruncatedLen) + '...'; } } - // replace '\n' with
- new_html = new_html.replace(/\n/g, '
'); - $this_field.find('span').html(new_html); + $this_field.find('span').text(new_html); } } if (data.transformations != undefined) { @@ -657,7 +650,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi // hide the cell editing area $(g.cEdit).hide(); - $(g.cEdit).find('input[type=text]').blur(); + $(g.cEdit).find('.edit_box').blur(); g.isCellEditActive = false; g.currentEditCell = null; // destroy datepicker in edit area, if exist @@ -671,8 +664,17 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi if (!g.isCellEditActive) { // make sure the edit area has not been shown g.isCellEditActive = true; g.isEditCellTextEditable = false; + /** + * @var $td current edited cell + */ var $td = $(g.currentEditCell); + /** + * @var $editArea the editing area + */ var $editArea = $(g.cEdit).find('.edit_area'); + /** + * @var where_clause WHERE clause for the edited cell + */ var where_clause = $td.parent('tr').find('.where_clause').val(); /** * @var field_name String containing the name of this field. @@ -720,24 +722,24 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi if ($td.is('.enum, .set')) { $editArea.find('select').live('change', function(e) { $checkbox.attr('checked', false); - }) + }); } else if ($td.is('.relation')) { $editArea.find('select').live('change', function(e) { $checkbox.attr('checked', false); - }) + }); $editArea.find('.browse_foreign').live('click', function(e) { $checkbox.attr('checked', false); - }) + }); } else { - $(g.cEdit).find('input[type=text]').live('keypress change', function(e) { + $(g.cEdit).find('.edit_box').live('keypress change', function(e) { $checkbox.attr('checked', false); - }) + }); $editArea.find('textarea').live('keydown', function(e) { $checkbox.attr('checked', false); - }) + }); } - // if 'checkbox_null__' is clicked empty the corresponding select/editor. + // if null checkbox is clicked empty the corresponding select/editor. $checkbox.click(function(e) { if ($td.is('.enum')) { $editArea.find('select').attr('value', ''); @@ -745,7 +747,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi $editArea.find('select').find('option').each(function() { var $option = $(this); $option.attr('selected', false); - }) + }); } else if ($td.is('.relation')) { // if the dropdown is there to select the foreign value if ($editArea.find('select').length > 0) { @@ -754,12 +756,11 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi } else { $editArea.find('textarea').val(''); } - $(g.cEdit).find('input[type=text]').val(''); - }) + $(g.cEdit).find('.edit_box').val(''); + }); } - if($td.is('.relation')) { - /** @lends jQuery */ + if ($td.is('.relation')) { //handle relations $editArea.addClass('edit_area_loading'); @@ -770,15 +771,15 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi * @var post_params Object containing parameters for the POST request */ var post_params = { - 'ajax_request' : true, - 'get_relational_values' : true, - 'server' : g.server, - 'db' : g.db, - 'table' : g.table, - 'column' : field_name, - 'token' : g.token, - 'curr_value' : relation_curr_value, - 'relation_key_or_display_column' : relation_key_or_display_column + 'ajax_request' : true, + 'get_relational_values' : true, + 'server' : g.server, + 'db' : g.db, + 'table' : g.table, + 'column' : field_name, + 'token' : g.token, + 'curr_value' : relation_curr_value, + 'relation_key_or_display_column' : relation_key_or_display_column } g.lastXHR = $.post('sql.php', post_params, function(data) { @@ -788,18 +789,18 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi var value = $(data.dropdown).val(); $td.data('original_data', value); // update the text input field, in case where the "Relational display column" is checked - $(g.cEdit).find('input[type=text]').val(value); + $(g.cEdit).find('.edit_box').val(value); $editArea.append(data.dropdown); $editArea.append('
' + g.cellEditHint + '
'); }) // end $.post() $editArea.find('select').live('change', function(e) { - $(g.cEdit).find('input[type=text]').val($(this).val()); + $(g.cEdit).find('.edit_box').val($(this).val()); }) + $editArea.show(); } else if($td.is('.enum')) { - /** @lends jQuery */ //handle enum fields $editArea.addClass('edit_area_loading'); @@ -824,11 +825,11 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi }) // end $.post() $editArea.find('select').live('change', function(e) { - $(g.cEdit).find('input[type=text]').val($(this).val()); + $(g.cEdit).find('.edit_box').val($(this).val()); }) + $editArea.show(); } else if($td.is('.set')) { - /** @lends jQuery */ //handle set fields $editArea.addClass('edit_area_loading'); @@ -854,23 +855,25 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi }) // end $.post() $editArea.find('select').live('change', function(e) { - $(g.cEdit).find('input[type=text]').val($(this).val()); + $(g.cEdit).find('.edit_box').val($(this).val()); }) + $editArea.show(); } else if($td.is('.truncated, .transformed')) { if ($td.is('.to_be_saved')) { // cell has been edited var value = $td.data('value'); - $(g.cEdit).find('input[type=text]').val(value); - $editArea.append(''); - $editArea.find('textarea').live('keyup', function(e) { - $(g.cEdit).find('input[type=text]').val($(this).val()); - }); - $(g.cEdit).find('input[type=text]').live('keyup', function(e) { + $(g.cEdit).find('.edit_box').val(value); + $editArea.append(''); + $editArea.find('textarea') + .val(value) + .live('keyup', function(e) { + $(g.cEdit).find('.edit_box').val($(this).val()); + }); + $(g.cEdit).find('.edit_box').live('keyup', function(e) { $editArea.find('textarea').val($(this).val()); }); $editArea.append('
' + g.cellEditHint + '
'); } else { - /** @lends jQuery */ //handle truncated/transformed values values $editArea.addClass('edit_area_loading'); @@ -900,12 +903,14 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi } $td.data('original_data', data.value); - $(g.cEdit).find('input[type=text]').val(data.value); - $editArea.append(''); - $editArea.find('textarea').live('keyup', function(e) { - $(g.cEdit).find('input[type=text]').val($(this).val()); - }); - $(g.cEdit).find('input[type=text]').live('keyup', function(e) { + $(g.cEdit).find('.edit_box').val(data.value); + $editArea.append(''); + $editArea.find('textarea') + .val(data.value) + .live('keyup', function(e) { + $(g.cEdit).find('.edit_box').val($(this).val()); + }); + $(g.cEdit).find('.edit_box').live('keyup', function(e) { $editArea.find('textarea').val($(this).val()); }); $editArea.append('
' + g.cellEditHint + '
'); @@ -916,8 +921,9 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi }) // end $.post() } g.isEditCellTextEditable = true; + $editArea.show(); } else if ($td.is('.datefield, .datetimefield, .timestampfield')) { - var $input_field = $(g.cEdit).find('input[type=text]'); + var $input_field = $(g.cEdit).find('.edit_box'); // remember current datetime value in $input_field, if it is not null var is_null = $td.is('.null'); @@ -943,19 +949,10 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi } else { $input_field.val(''); } + $editArea.show(); } else { - $editArea.append(''); - $editArea.find('textarea').live('keyup', function(e) { - $(g.cEdit).find('input[type=text]').val($(this).val()); - }); - $(g.cEdit).find('input[type=text]').live('keyup', function(e) { - $editArea.find('textarea').val($(this).val()); - }); - $editArea.append('
' + g.cellEditHint + '
'); g.isEditCellTextEditable = true; } - - $editArea.show(); } }, @@ -1138,7 +1135,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi if (!g.saveCellsAtOnce) { $(g.cEdit).find('*').attr('disabled', 'disabled'); var $editArea = $(g.cEdit).find('.edit_area'); - $editArea.addClass('edit_area_posting'); + $(g.cEdit).find('.edit_box').addClass('edit_box_posting'); } else { $('.save_edited').addClass('saving_edited_data') .find('input').attr('disabled', 'disabled'); // disable the save button @@ -1153,52 +1150,52 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi g.isSaving = false; if (!g.saveCellsAtOnce) { $(g.cEdit).find('*').removeAttr('disabled'); - $editArea.removeClass('edit_area_posting'); + $(g.cEdit).find('.edit_box').removeClass('edit_box_posting'); } else { $('.save_edited').removeClass('saving_edited_data') .find('input').removeAttr('disabled'); // enable the save button back } if(data.success == true) { PMA_ajaxShowMessage(data.message); - $('.to_be_saved').each(function() { - var new_clause = $(this).parent('tr').data('new_clause'); - if (new_clause != '') { - var $where_clause = $(this).parent('tr').find('.where_clause'); - var old_clause = $where_clause.attr('value'); - var decoded_old_clause = PMA_urldecode(old_clause); - var decoded_new_clause = PMA_urldecode(new_clause); + // update where_clause related data in each edited row + $('.to_be_saved').parents('tr').each(function() { + var new_clause = $(this).data('new_clause'); + var $where_clause = $(this).find('.where_clause'); + var old_clause = $where_clause.attr('value'); + var decoded_old_clause = PMA_urldecode(old_clause); + var decoded_new_clause = PMA_urldecode(new_clause); - $where_clause.attr('value', new_clause); - // update Edit, Copy, and Delete links also - $(this).parent('tr').find('a').each(function() { - $(this).attr('href', $(this).attr('href').replace(old_clause, new_clause)); - // update delete confirmation in Delete link - if ($(this).attr('href').indexOf('DELETE') > -1) { - $(this).removeAttr('onclick') - .unbind('click') - .bind('click', function() { - return confirmLink(this, 'DELETE FROM `' + g.db + '`.`' + g.table + '` WHERE ' + - decoded_new_clause + (is_unique ? '' : ' LIMIT 1')); - }); - } - }); - // update the multi edit checkboxes - $(this).parent('tr').find('input[type=checkbox]').each(function() { - var $checkbox = $(this); - var checkbox_name = $checkbox.attr('name'); - var checkbox_value = $checkbox.attr('value'); + $where_clause.attr('value', new_clause); + // update Edit, Copy, and Delete links also + $(this).find('a').each(function() { + $(this).attr('href', $(this).attr('href').replace(old_clause, new_clause)); + // update delete confirmation in Delete link + if ($(this).attr('href').indexOf('DELETE') > -1) { + $(this).removeAttr('onclick') + .unbind('click') + .bind('click', function() { + return confirmLink(this, 'DELETE FROM `' + g.db + '`.`' + g.table + '` WHERE ' + + decoded_new_clause + (is_unique ? '' : ' LIMIT 1')); + }); + } + }); + // update the multi edit checkboxes + $(this).find('input[type=checkbox]').each(function() { + var $checkbox = $(this); + var checkbox_name = $checkbox.attr('name'); + var checkbox_value = $checkbox.attr('value'); - $checkbox.attr('name', checkbox_name.replace(old_clause, new_clause)); - $checkbox.attr('value', checkbox_value.replace(decoded_old_clause, decoded_new_clause)); - }); - } + $checkbox.attr('name', checkbox_name.replace(old_clause, new_clause)); + $checkbox.attr('value', checkbox_value.replace(decoded_old_clause, decoded_new_clause)); + }); }); - // remove possible previous feedback message + // update the display of executed SQL query command $('#result_query').remove(); if (typeof data.sql_query != 'undefined') { // display feedback $('#sqlqueryresults').prepend(data.sql_query); } + // hide and/or update the successfully saved cells g.hideEditCell(true, data); // remove the "Save edited cells" button @@ -1247,6 +1244,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi var value; if ($(g.cEdit).find('.edit_area').is('.edit_area_loading')) { + // the edit area is still loading (retrieving cell data), no need to post need_to_post = false; } else if (is_null) { if (!g.wasEditedCellNull) { @@ -1255,7 +1253,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi } } else { if ($this_field.is('.bit')) { - this_field_params[field_name] = '0b' + $(g.cEdit).find('textarea').val(); + this_field_params[field_name] = '0b' + $(g.cEdit).find('.edit_box').val(); } else if ($this_field.is('.set')) { $test_element = $(g.cEdit).find('select'); this_field_params[field_name] = $test_element.map(function(){ @@ -1273,10 +1271,8 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi if ($test_element.length != 0) { this_field_params[field_name] = $test_element.text(); } - } else if ($this_field.is('.datefield, .datetimefield, .timestampfield')) { - this_field_params[field_name] = $(g.cEdit).find('input[type=text]').val(); } else { - this_field_params[field_name] = $(g.cEdit).find('textarea').val(); + this_field_params[field_name] = $(g.cEdit).find('.edit_box').val(); } if (g.wasEditedCellNull || this_field_params[field_name] != PMA_getCellValue(g.currentEditCell)) { need_to_post = true; @@ -1533,7 +1529,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi // adjust g.cEdit g.cEdit.className = 'cEdit'; - $(g.cEdit).html('
'); + $(g.cEdit).html('
'); $(g.cEdit).hide(); // assign cell editing hint @@ -1560,10 +1556,10 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi e.preventDefault(); } }); - $(g.cEdit).find('input[type=text]').focus(function(e) { + $(g.cEdit).find('.edit_box').focus(function(e) { g.showEditArea(); }); - $(g.cEdit).find('input[type=text], select').live('keydown', function(e) { + $(g.cEdit).find('.edit_box, select').live('keydown', function(e) { if (e.which == 13) { // post on pressing "Enter" e.preventDefault(); @@ -1614,9 +1610,6 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi * Initialize grid ******************/ - // add relative position to table so that resize handlers are correctly positioned - $(t).css('position', 'relative'); - // wrap all data cells, except actions cell, with span $(t).find('th, td:not(:has(span))') .wrapInner(''); @@ -1658,6 +1651,9 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi // add table class $(t).addClass('pma_table'); + // add relative position to global div so that resize handlers are correctly positioned + $(g.gDiv).css('position', 'relative'); + // link the global div $(t).before(g.gDiv); $(g.gDiv).append(t); diff --git a/js/messages.php b/js/messages.php index 10beb0ad66..7bb7bd3fa1 100644 --- a/js/messages.php +++ b/js/messages.php @@ -170,7 +170,7 @@ $js_messages['strJumpToTable'] = __('Jump to Log table'); $js_messages['strNoDataFound'] = __('Log analysed, but no data found in this time span.'); /* l10n: A collection of available filters */ -$js_messages['strFilters'] = __('Filters'); +$js_messages['strFiltersForLogTable'] = __('Log table filter options'); /* l10n: Filter as in "Start Filtering" */ $js_messages['strFilter'] = __('Filter'); $js_messages['strFilterByWordRegexp'] = __('Filter queries by word/regexp:'); diff --git a/js/pmd/move.js b/js/pmd/move.js index eb2b246476..6c3f56e832 100644 --- a/js/pmd/move.js +++ b/js/pmd/move.js @@ -113,7 +113,7 @@ function MouseDown(e) dx = offsetx - parseInt(cur_click.style.left); dy = offsety - parseInt(cur_click.style.top); //alert(" dx = " + dx + " dy = " +dy); - document.getElementById("canvas").style.visibility = 'hidden'; + document.getElementById("canvas").style.display = 'none'; /* var left = parseInt(cur_click.style.left); var top = parseInt(cur_click.style.top); @@ -159,8 +159,8 @@ function MouseMove(e) } if (ON_relation || ON_display_field) { - document.getElementById('hint').style.left = (Glob_X + 20) + 'px'; - document.getElementById('hint').style.top = (Glob_Y + 20) + 'px'; + document.getElementById('pmd_hint').style.left = (Glob_X + 20) + 'px'; + document.getElementById('pmd_hint').style.top = (Glob_Y + 20) + 'px'; } if (layer_menu_cur_click) { @@ -173,7 +173,7 @@ function MouseMove(e) function MouseUp(e) { if (cur_click != null) { - document.getElementById("canvas").style.visibility = 'visible'; + document.getElementById("canvas").style.display = 'inline-block'; Re_load(); cur_click.style.zIndex = 1; cur_click = null; @@ -225,7 +225,7 @@ function Main() Canvas_pos(); Small_tab_refresh(); Re_load(); - id_hint = document.getElementById('hint'); + id_hint = document.getElementById('pmd_hint'); if (isIE) { General_scroll(); } @@ -535,12 +535,12 @@ function Start_relation() if (!ON_relation) { document.getElementById('foreign_relation').style.display = ''; ON_relation = 1; - document.getElementById('hint').innerHTML = PMA_messages['strSelectReferencedKey']; - document.getElementById('hint').style.visibility = "visible"; + document.getElementById('pmd_hint').innerHTML = PMA_messages['strSelectReferencedKey']; + document.getElementById('pmd_hint').style.display = 'block'; document.getElementById('rel_button').className = 'M_butt_Selected_down'; } else { - document.getElementById('hint').innerHTML = ""; - document.getElementById('hint').style.visibility = "hidden"; + document.getElementById('pmd_hint').innerHTML = ""; + document.getElementById('pmd_hint').style.display = 'none'; document.getElementById('rel_button').className = 'M_butt'; click_field = 0; ON_relation = 0; @@ -551,7 +551,7 @@ function Click_field(T, f, PK) // table field { if (ON_relation) { if (!click_field) { - //.style.display=='none' .style.visibility = "hidden" + //.style.display=='none' .style.display = 'none' if (!PK) { alert(PMA_messages['strPleaseSelectPrimaryOrUniqueKey']); return;// 0; @@ -561,7 +561,7 @@ function Click_field(T, f, PK) // table field } click_field = 1; link_relation = "T1=" + T + "&F1=" + f; - document.getElementById('hint').innerHTML = PMA_messages['strSelectForeignKey']; + document.getElementById('pmd_hint').innerHTML = PMA_messages['strSelectForeignKey']; } else { Start_relation(); // hidden hint... if (j_tabs[db + '.' + T] != '1' || !PK) { @@ -571,7 +571,7 @@ function Click_field(T, f, PK) // table field document.getElementById('layer_new_relation').style.left = left + 'px'; var top = Glob_Y - document.getElementById('layer_new_relation').offsetHeight + 40; document.getElementById('layer_new_relation').style.top = top + 'px'; - document.getElementById('layer_new_relation').style.visibility = "visible"; + document.getElementById('layer_new_relation').style.display = 'block'; link_relation += '&T2=' + T + '&F2=' + f; } } @@ -596,8 +596,8 @@ function Click_field(T, f, PK) // table field display_field[T] = f; } ON_display_field = 0; - document.getElementById('hint').innerHTML = ""; - document.getElementById('hint').style.visibility = "hidden"; + document.getElementById('pmd_hint').innerHTML = ""; + document.getElementById('pmd_hint').style.display = 'none'; document.getElementById('display_field_button').className = 'M_butt'; makeRequest('pmd_display_field.php', 'T=' + T + '&F=' + f + '&server=' + server + '&db=' + db + '&token=' + token); } @@ -605,7 +605,7 @@ function Click_field(T, f, PK) // table field function New_relation() { - document.getElementById('layer_new_relation').style.visibility = 'hidden'; + document.getElementById('layer_new_relation').style.display = 'none'; link_relation += '&server=' + server + '&db=' + db + '&token=' + token + '&die_save_pos=0'; link_relation += '&on_delete=' + document.getElementById('on_delete').value + '&on_update=' + document.getElementById('on_update').value; link_relation += Get_url_pos(); @@ -776,14 +776,14 @@ function Canvas_click(id) document.getElementById('layer_upd_relation').style.left = left + 'px'; var top = Glob_Y - document.getElementById('layer_upd_relation').offsetHeight - 10; document.getElementById('layer_upd_relation').style.top = top + 'px'; - document.getElementById('layer_upd_relation').style.visibility = 'visible'; + document.getElementById('layer_upd_relation').style.display = 'block'; link_relation = 'T1=' + Key0 + '&F1=' + Key1 + '&T2=' + Key2 + '&F2=' + Key3 + '&K=' + Key; } } function Upd_relation() { - document.getElementById('layer_upd_relation').style.visibility = 'hidden'; + document.getElementById('layer_upd_relation').style.display = 'none'; link_relation += '&server=' + server + '&db=' + db + '&token=' + token + '&die_save_pos=0'; link_relation += Get_url_pos(); makeRequest('pmd_relation_upd.php', link_relation); @@ -792,9 +792,9 @@ function Upd_relation() function VisibleTab(id, t_n) { if (id.checked) { - document.getElementById(t_n).style.visibility = 'visible'; + document.getElementById(t_n).style.display = 'block'; } else { - document.getElementById(t_n).style.visibility = 'hidden'; + document.getElementById(t_n).style.display = 'none'; } Re_load(); } @@ -813,10 +813,10 @@ function Hide_tab_all(id_this) // max/min all tables if (E.elements[i].type == "checkbox" && E.elements[i].id.substring(0, 10) == 'check_vis_') { if (id_this.alt == 'v') { E.elements[i].checked = true; - document.getElementById(E.elements[i].value).style.visibility = 'visible'; + document.getElementById(E.elements[i].value).style.display = 'block'; } else { E.elements[i].checked = false; - document.getElementById(E.elements[i].value).style.visibility = 'hidden'; + document.getElementById(E.elements[i].value).style.display = 'none'; } } } @@ -859,20 +859,15 @@ function No_have_constr(id_this) if (!in_array_k(E.elements[i].value, a)) if (id_this.alt == 'v') { E.elements[i].checked = true; - document.getElementById(E.elements[i].value).style.visibility = 'visible'; + document.getElementById(E.elements[i].value).style.display = 'block'; } else { E.elements[i].checked = false; - document.getElementById(E.elements[i].value).style.visibility = 'hidden'; + document.getElementById(E.elements[i].value).style.display = 'none'; } } } } -function Help() -{ - var WinHelp = window.open("pmd_help.php", "wind1", "top=200,left=400,width=300,height=200,resizable=yes,scrollbars=yes,menubar=no"); -} - function PDF_save() { // var WinPDF = @@ -884,7 +879,7 @@ function General_scroll() { /* if (!document.getElementById('show_relation_olways').checked) { - document.getElementById("canvas").style.visibility = 'hidden'; + document.getElementById("canvas").style.display = 'none'; clearTimeout(timeoutID); timeoutID = setTimeout(General_scroll_end, 500); } @@ -913,15 +908,18 @@ function General_scroll_end() document.getElementById('layer_menu').style.left = document.body.scrollLeft; document.getElementById('layer_menu').style.top = document.body.scrollTop + document.getElementById('top_menu').offsetHeight; } - document.getElementById("canvas").style.visibility = 'visible'; + document.getElementById("canvas").style.display = 'block'; } */ function Show_left_menu(id_this) // max/min all tables { if (id_this.alt == "v") { - document.getElementById("layer_menu").style.top = document.getElementById('top_menu').offsetHeight + 'px'; - document.getElementById("layer_menu").style.visibility = 'visible'; + var pos = $("#top_menu").offset(); + var height = $("#top_menu").height(); + document.getElementById("layer_menu").style.top = (pos.top + height) + 'px'; + document.getElementById("layer_menu").style.left = pos.left + 'px'; + document.getElementById("layer_menu").style.display = 'block'; id_this.alt = ">"; id_this.src = "pmd/images/uparrow2_m.png"; if (isIE) { @@ -929,7 +927,7 @@ function Show_left_menu(id_this) // max/min all tables } } else { document.getElementById("layer_menu").style.top = -1000 + 'px'; //fast scroll - document.getElementById("layer_menu").style.visibility = 'hidden'; + document.getElementById("layer_menu").style.display = 'none'; id_this.alt = "v"; id_this.src = "pmd/images/downarrow2_m.png"; } @@ -955,16 +953,16 @@ function Start_display_field() } if (!ON_display_field) { ON_display_field = 1; - document.getElementById('hint').innerHTML = PMA_messages['strChangeDisplay']; - document.getElementById('hint').style.visibility = "visible"; + document.getElementById('pmd_hint').innerHTML = PMA_messages['strChangeDisplay']; + document.getElementById('pmd_hint').style.display = 'block'; document.getElementById('display_field_button').className = 'M_butt_Selected_down';//'#FFEE99';gray #AAAAAA if (isIE) { // correct for IE document.getElementById('display_field_button').className = 'M_butt_Selected_down_IE'; } } else { - document.getElementById('hint').innerHTML = ""; - document.getElementById('hint').style.visibility = "hidden"; + document.getElementById('pmd_hint').innerHTML = ""; + document.getElementById('pmd_hint').style.display = 'none'; document.getElementById('display_field_button').className = 'M_butt'; ON_display_field = 0; } @@ -1021,7 +1019,7 @@ function Click_option(id_this,column_name,table_name) document.getElementById(id_this).style.left = left + 'px'; // var top = Glob_Y - document.getElementById(id_this).offsetHeight - 10; document.getElementById(id_this).style.top = (screen.height / 4) + 'px'; - document.getElementById(id_this).style.visibility = "visible"; + document.getElementById(id_this).style.display = 'block'; document.getElementById('option_col_name').innerHTML = '' + PMA_messages['strAddOption'] +'"' +column_name+ '"'; col_name = column_name; tab_name = table_name; @@ -1029,7 +1027,7 @@ function Click_option(id_this,column_name,table_name) function Close_option() { - document.getElementById('pmd_optionse').style.visibility = "hidden"; + document.getElementById('pmd_optionse').style.display = 'none'; } function Select_all(id_this,owner) @@ -1136,8 +1134,8 @@ function add_object() var init = history_array.length; if (rel.value != '--') { if (document.getElementById('Query').value == "") { - document.getElementById('hint').innerHTML = "value/subQuery is empty" ; - document.getElementById('hint').style.visibility = "visible"; + document.getElementById('pmd_hint').innerHTML = "value/subQuery is empty" ; + document.getElementById('pmd_hint').style.display = 'block'; return; } var p = document.getElementById('Query'); @@ -1168,8 +1166,8 @@ function add_object() } if (document.getElementById('h_rel_opt').value != '--') { if (document.getElementById('having').value == "") { - document.getElementById('hint').innerHTML = "value/subQuery is empty" ; - document.getElementById('hint').style.visibility = "visible"; + document.getElementById('pmd_hint').innerHTML = "value/subQuery is empty" ; + document.getElementById('pmd_hint').style.display = 'block'; return; } var p = document.getElementById('having'); @@ -1186,8 +1184,8 @@ function add_object() document.getElementById('orderby').checked = false; //make orderby } - document.getElementById('hint').innerHTML = sum + "object created" ; - document.getElementById('hint').style.visibility = "visible"; + document.getElementById('pmd_hint').innerHTML = sum + "object created" ; + document.getElementById('pmd_hint').style.display = 'block'; //output sum new objects created var existingDiv = document.getElementById('ab'); existingDiv.innerHTML = display(init,history_array.length); diff --git a/js/server_status.js b/js/server_status.js index 08d7679530..594e8d9ed2 100644 --- a/js/server_status.js +++ b/js/server_status.js @@ -43,6 +43,19 @@ $(function() { }, type: "numeric" }); + + jQuery.tablesorter.addParser({ + id: "withinSpanNumber", + is: function(s) { + return /(.*)?<\/span>/); + return (res && res.length >= 3) ? res[2] : 0; + }, + type: "numeric" + }); + // faster zebra widget: no row visibility check, faster css class switching, no cssChildRow check jQuery.tablesorter.addWidget({ id: "fast-zebra", @@ -394,7 +407,7 @@ $(function() { if (word.length == 0) { textFilter = null; } - else textFilter = new RegExp("(^|_)" + word, 'i'); + else textFilter = new RegExp("(^| )" + word, 'i'); text = word; @@ -507,7 +520,7 @@ $(function() { sortList: [[0, 0]], widgets: ['fast-zebra'], headers: { - 1: { sorter: 'fancyNumber' } + 1: { sorter: 'withinSpanNumber' } } }; break; diff --git a/js/server_status_monitor.js b/js/server_status_monitor.js index fa0f28eb77..e89f0488bd 100644 --- a/js/server_status_monitor.js +++ b/js/server_status_monitor.js @@ -9,6 +9,10 @@ $(function() { codemirror_editor = CodeMirror.fromTextArea(elm[0], { lineNumbers: true, matchBrackets: true, indentUnit: 4, mode: "text/x-mysql" }); } } + // Timepicker is loaded on demand so we need to initialize datetime fields from the 'load log' dialog + $('div#logAnalyseDialog .datetimefield').each(function() { + PMA_addDatepicker($(this)); + }); /**** Monitor charting implementation ****/ /* Saves the previous ajax response for differential values */ @@ -1022,8 +1026,6 @@ $(function() { removeVariables: $('input#removeVariables').prop('checked'), limitTypes: $('input#limitTypes').prop('checked') }); - - $('#logAnalyseDialog').find('dateStart,dateEnd').datepicker('destroy'); } $('#logAnalyseDialog').dialog({ @@ -1388,7 +1390,7 @@ $(function() { if (logData.numRows > 12) { $('div#logTable').prepend( '
' + - ' ' + PMA_messages['strFilters'] + '' + + ' ' + PMA_messages['strFiltersForLogTable'] + '' + '
' + ' ' + ' ' + @@ -1688,33 +1690,18 @@ $(function() { return cols; } - + /* Opens the query analyzer dialog */ function openQueryAnalyzer() { var rowData = $(this).parent().data('query'); var query = rowData.argument || rowData.sql_text; - /* A very basic SQL Formatter. Totally fails in the cases of - - Any string appearance containing a MySQL Keyword, surrounded by whitespaces, e.g. WHERE bar = "This where the formatter fails" - - Subqueries too probably - */ - - // Matches the columns to be selected - // .* selector doesn't include whitespace and we have no PCRE_DOTALL modifier, (.|\s)+ crashes Chrome (reported and confirmed), - // [^]+ results in JS error in IE8, thus we use [^\0]+ for matching each column since the zero-byte char (hopefully) doesn't appear in column names ;) - var sLists = query.match(/SELECT\s+[^\0]+\s+FROM\s+/gi); - if (sLists) { - for (var i = 0; i < sLists.length; i++) { - query = query.replace(sLists[i], sLists[i].replace(/\s*((`|'|"|).*?\1,)\s*/gi, '$1\n\t')); - } - query = query - .replace(/(\s+|^)(SELECT|FROM|WHERE|GROUP BY|HAVING|ORDER BY|LIMIT)(\s+|$)/gi, '\n$2\n\t') - .replace(/\s+UNION\s+/gi, '\n\nUNION\n\n') - .replace(/\s+(AND)\s+/gi, ' $1\n\t') - .trim(); - } - + query = PMA_SQLPrettyPrint(query); codemirror_editor.setValue(query); + // Codemirror is bugged, it doesn't refresh properly sometimes. Following lines seem to fix that + setTimeout(function() { + codemirror_editor.refresh() + },50); var profilingChart = null; var dlgBtns = {}; diff --git a/js/server_variables.js b/js/server_variables.js index 0ca530440f..cb4f8c3a02 100644 --- a/js/server_variables.js +++ b/js/server_variables.js @@ -173,9 +173,20 @@ function editVariable(link) // hide original content $cell.html(''); // put edit field and save/cancel link - $cell.prepend(''); + $cell.prepend('
'); $cell.find('table td:first').append(mySaveLink); + $cell.find('table td:first').append(' '); $cell.find('table td:first').append(myCancelLink); + + // Keyboard shortcuts to the rescue + $('input#variableEditArea').focus(); + $('input#variableEditArea').keydown(function(event) { + // Enter key + if(event.keyCode == 13) mySaveLink.trigger('click'); + // Escape key + if(event.keyCode == 27) myCancelLink.trigger('click'); + }); }); return false; diff --git a/libraries/Advisor.class.php b/libraries/Advisor.class.php index 61592863c0..b681155ac6 100644 --- a/libraries/Advisor.class.php +++ b/libraries/Advisor.class.php @@ -174,6 +174,22 @@ class Advisor $this->runResult[$type][] = $rule; } + private function ruleExprEvaluate_var1($matches) + { + // '/fired\s*\(\s*(\'|")(.*)\1\s*\)/Uie' + return '1'; //isset($this->runResult[\'fired\'] + } + + private function ruleExprEvaluate_var2($matches) + { + // '/\b(\w+)\b/e' + return isset($this->variables[$matches[1]]) + ? (is_numeric($this->variables[$matches[1]]) + ? $this->variables[$matches[1]] + : '"'.$this->variables[$matches[1]].'"') + : $matches[1]; + } + // Runs a code expression, replacing variable names with their respective values // ignoreUntil: if > 0, it doesn't replace any variables until that string position, but still evaluates the whole expr function ruleExprEvaluate($expr, $ignoreUntil = 0) @@ -182,13 +198,14 @@ class Advisor $exprIgnore = substr($expr,0,$ignoreUntil); $expr = substr($expr,$ignoreUntil); } - $expr = preg_replace('/fired\s*\(\s*(\'|")(.*)\1\s*\)/Uie','1',$expr); //isset($this->runResult[\'fired\'] - $expr = preg_replace('/\b(\w+)\b/e','isset($this->variables[\'\1\']) ? (!is_numeric($this->variables[\'\1\']) ? \'"\'.$this->variables[\'\1\'].\'"\' : $this->variables[\'\1\']) : \'\1\'', $expr); + $expr = preg_replace_callback('/fired\s*\(\s*(\'|")(.*)\1\s*\)/Ui', array($this, 'ruleExprEvaluate_var1'), $expr); + $expr = preg_replace_callback('/\b(\w+)\b/', array($this, 'ruleExprEvaluate_var2'), $expr); if ($ignoreUntil > 0) { $expr = $exprIgnore . $expr; } $value = 0; $err = 0; + ob_start(); eval('$value = '.$expr.';'); $err = ob_get_contents(); diff --git a/libraries/Table.class.php b/libraries/Table.class.php index d018cd762f..46ebb91171 100644 --- a/libraries/Table.class.php +++ b/libraries/Table.class.php @@ -63,8 +63,8 @@ class PMA_Table /** * Constructor * - * @param string $table_name table name - * @param string $db_name database name + * @param string $table_name table name + * @param string $db_name database name */ function __construct($table_name, $db_name) { @@ -83,11 +83,21 @@ class PMA_Table return $this->getName(); } + /** + * return the last error + * + * @return the last error + */ function getLastError() { return end($this->errors); } + /** + * return the last message + * + * @return the last message + */ function getLastMessage() { return end($this->messages); @@ -96,7 +106,9 @@ class PMA_Table /** * sets table name * - * @param string $table_name new table name + * @param string $table_name new table name + * + * @return nothing */ function setName($table_name) { @@ -107,6 +119,7 @@ class PMA_Table * returns table name * * @param boolean $backquoted whether to quote name with backticks `` + * * @return string table name */ function getName($backquoted = false) @@ -120,7 +133,9 @@ class PMA_Table /** * sets database name for this table * - * @param string $db_name + * @param string $db_name database name + * + * @return nothing */ function setDbName($db_name) { @@ -131,6 +146,7 @@ class PMA_Table * returns database name for this table * * @param boolean $backquoted whether to quote name with backticks `` + * * @return string database name for this table */ function getDbName($backquoted = false) @@ -145,6 +161,7 @@ class PMA_Table * returns full name for table, including database name * * @param boolean $backquoted whether to quote name with backticks `` + * * @return string */ function getFullName($backquoted = false) @@ -152,6 +169,14 @@ class PMA_Table return $this->getDbName($backquoted) . '.' . $this->getName($backquoted); } + /** + * returns whether the table is actually a view + * + * @param string $db database + * @param string $table table + * + * @return whether the given is a view + */ static public function isView($db = null, $table = null) { if (strlen($db) && strlen($table)) { @@ -166,6 +191,8 @@ class PMA_Table * * @param string $param name * @param mixed $value value + * + * @return nothing */ function set($param, $value) { @@ -176,6 +203,7 @@ class PMA_Table * returns value for given setting/param * * @param string $param name for value to return + * * @return mixed value for $param */ function get($param) @@ -204,8 +232,10 @@ class PMA_Table $this->settings = $table_info; if ($this->get('TABLE_ROWS') === null) { - $this->set('TABLE_ROWS', PMA_Table::countRecords($this->getDbName(), - $this->getName(), true)); + $this->set( + 'TABLE_ROWS', + PMA_Table::countRecords($this->getDbName(), $this->getName(), true) + ); } $create_options = explode(' ', $this->get('TABLE_ROWS')); @@ -224,10 +254,12 @@ class PMA_Table /** * Checks if this "table" is a view * + * @param string $db the database name + * @param string $table the table name + * * @deprecated * @todo see what we could do with the possible existence of $table_is_view - * @param string $db the database name - * @param string $table the table name + * * @return boolean whether this is a view */ static protected function _isView($db, $table) @@ -237,7 +269,8 @@ class PMA_Table return true; } - // Since phpMyAdmin 3.2 the field TABLE_TYPE is properly filled by PMA_DBI_get_tables_full() + // Since phpMyAdmin 3.2 the field TABLE_TYPE is properly filled by + // PMA_DBI_get_tables_full() $type = PMA_Table::sGetStatusInfo($db, $table, 'TABLE_TYPE'); return $type == 'VIEW'; } @@ -245,10 +278,12 @@ class PMA_Table /** * Checks if this is a merge table * - * If the ENGINE of the table is MERGE or MRG_MYISAM (alias), this is a merge table. + * If the ENGINE of the table is MERGE or MRG_MYISAM (alias), + * this is a merge table. + * + * @param string $db the database name + * @param string $table the table name * - * @param string $db the database name - * @param string $table the table name * @return boolean true if it is a merge table */ static public function isMerge($db = null, $table = null) @@ -270,15 +305,17 @@ class PMA_Table /** * Returns full table status info, or specific if $info provided - * * this info is collected from information_schema * - * @todo PMA_DBI_get_tables_full needs to be merged somehow into this class or at least better documented - * @param string $db - * @param string $table - * @param string $info - * @param boolean $force_read + * @param string $db database name + * @param string $table table name + * @param string $info + * @param boolean $force_read read new rather than serving from cache * @param boolean $disable_error if true, disables error message + * + * @todo PMA_DBI_get_tables_full needs to be merged somehow into this class + * or at least better documented + * * @return mixed */ static public function sGetStatusInfo($db, $table, $info = null, $force_read = false, $disable_error = false) @@ -311,21 +348,24 @@ class PMA_Table /** * generates column specification for ALTER or CREATE TABLE syntax * + * @param string $name name + * @param string $type type ('INT', 'VARCHAR', 'BIT', ...) + * @param string $length length ('2', '5,2', '', ...) + * @param string $attribute attribute + * @param string $collation collation + * @param bool|string $null with 'NULL' or 'NOT NULL' + * @param string $default_type whether default is CURRENT_TIMESTAMP, + * NULL, NONE, USER_DEFINED + * @param string $default_value default value for USER_DEFINED default type + * @param string $extra 'AUTO_INCREMENT' + * @param string $comment field comment + * @param array &$field_primary list of fields for PRIMARY KEY + * @param string $index + * * @todo move into class PMA_Column - * @todo on the interface, some js to clear the default value when the default current_timestamp is checked - * @param string $name name - * @param string $type type ('INT', 'VARCHAR', 'BIT', ...) - * @param string $length length ('2', '5,2', '', ...) - * @param string $attribute - * @param string $collation - * @param bool|string $null with 'NULL' or 'NOT NULL' - * @param string $default_type whether default is CURRENT_TIMESTAMP, - * NULL, NONE, USER_DEFINED - * @param string $default_value default value for USER_DEFINED default type - * @param string $extra 'AUTO_INCREMENT' - * @param string $comment field comment - * @param array &$field_primary list of fields for PRIMARY KEY - * @param string $index + * @todo on the interface, some js to clear the default value when the default + * current_timestamp is checked + * * @return string field specification */ static function generateFieldSpec($name, $type, $length = '', $attribute = '', @@ -339,8 +379,9 @@ class PMA_Table $query = PMA_backquote($name) . ' ' . $type; if ($length != '' - && !preg_match('@^(DATE|DATETIME|TIME|TINYBLOB|TINYTEXT|BLOB|TEXT|MEDIUMBLOB|MEDIUMTEXT|LONGBLOB|LONGTEXT' - . '|SERIAL|BOOLEAN)$@i', $type)) { + && ! preg_match('@^(DATE|DATETIME|TIME|TINYBLOB|TINYTEXT|BLOB|TEXT|' + . 'MEDIUMBLOB|MEDIUMTEXT|LONGBLOB|LONGTEXT|SERIAL|BOOLEAN)$@i', $type) + ) { $query .= '(' . $length . ')'; } @@ -348,8 +389,9 @@ class PMA_Table $query .= ' ' . $attribute; } - if (!empty($collation) && $collation != 'NULL' - && preg_match('@^(TINYTEXT|TEXT|MEDIUMTEXT|LONGTEXT|VARCHAR|CHAR|ENUM|SET)$@i', $type)) { + if (! empty($collation) && $collation != 'NULL' + && preg_match('@^(TINYTEXT|TEXT|MEDIUMTEXT|LONGTEXT|VARCHAR|CHAR|ENUM|SET)$@i', $type) + ) { $query .= PMA_generateCharsetQueryPart($collation); } @@ -362,24 +404,26 @@ class PMA_Table } switch ($default_type) { - case 'USER_DEFINED' : - if ($is_timestamp && $default_value === '0') { - // a TIMESTAMP does not accept DEFAULT '0' - // but DEFAULT 0 works - $query .= ' DEFAULT 0'; - } elseif ($type == 'BIT') { - $query .= ' DEFAULT b\'' . preg_replace('/[^01]/', '0', $default_value) . '\''; - } else { - $query .= ' DEFAULT \'' . PMA_sqlAddSlashes($default_value) . '\''; - } - break; - case 'NULL' : - case 'CURRENT_TIMESTAMP' : - $query .= ' DEFAULT ' . $default_type; - break; - case 'NONE' : - default : - break; + case 'USER_DEFINED' : + if ($is_timestamp && $default_value === '0') { + // a TIMESTAMP does not accept DEFAULT '0' + // but DEFAULT 0 works + $query .= ' DEFAULT 0'; + } elseif ($type == 'BIT') { + $query .= ' DEFAULT b\'' + . preg_replace('/[^01]/', '0', $default_value) + . '\''; + } else { + $query .= ' DEFAULT \'' . PMA_sqlAddSlashes($default_value) . '\''; + } + break; + case 'NULL' : + case 'CURRENT_TIMESTAMP' : + $query .= ' DEFAULT ' . $default_type; + break; + case 'NONE' : + default : + break; } if (!empty($extra)) { @@ -389,16 +433,18 @@ class PMA_Table if ($extra == 'AUTO_INCREMENT') { $primary_cnt = count($field_primary); if (1 == $primary_cnt) { - for ($j = 0; $j < $primary_cnt && $field_primary[$j] != $index; $j++) { - //void + for ($j = 0; $j < $primary_cnt; $j++) { + if ($field_primary[$j] == $index) { + break; + } } if (isset($field_primary[$j]) && $field_primary[$j] == $index) { $query .= ' PRIMARY KEY'; unset($field_primary[$j]); } - // but the PK could contain other columns so do not append - // a PRIMARY KEY clause, just add a member to $field_primary } else { + // but the PK could contain other columns so do not append + // a PRIMARY KEY clause, just add a member to $field_primary $found_in_pk = false; for ($j = 0; $j < $primary_cnt; $j++) { if ($field_primary[$j] == $index) { @@ -424,13 +470,13 @@ class PMA_Table * Revision 13 July 2001: Patch for limiting dump size from * vinay@sanisoft.com & girish@sanisoft.com * - * @param string $db the current database name - * @param string $table the current table name - * @param bool $force_exact whether to force an exact count - * @param bool $is_view + * @param string $db the current database name + * @param string $table the current table name + * @param bool $force_exact whether to force an exact count + * @param bool $is_view whether the table is a view * - * @return mixed the number of records if "retain" param is true, - * otherwise true + * @return mixed the number of records if "retain" param is true, + * otherwise true */ static public function countRecords($db, $table, $force_exact = false, $is_view = null) { @@ -462,7 +508,8 @@ class PMA_Table if (! $is_view) { $row_count = PMA_DBI_fetch_value( 'SELECT COUNT(*) FROM ' . PMA_backquote($db) . '.' - . PMA_backquote($table)); + . PMA_backquote($table) + ); } else { // For complex views, even trying to get a partial record // count could bring down a server, so we offer an @@ -478,9 +525,11 @@ class PMA_Table // based on a table that no longer exists) $result = PMA_DBI_try_query( 'SELECT 1 FROM ' . PMA_backquote($db) . '.' - . PMA_backquote($table) . ' LIMIT ' - . $GLOBALS['cfg']['MaxExactCountViews'], - null, PMA_DBI_QUERY_STORE); + . PMA_backquote($table) . ' LIMIT ' + . $GLOBALS['cfg']['MaxExactCountViews'], + null, + PMA_DBI_QUERY_STORE + ); if (!PMA_DBI_getError()) { $row_count = PMA_DBI_num_rows($result); PMA_DBI_free_result($result); @@ -497,22 +546,24 @@ class PMA_Table /** * Generates column specification for ALTER syntax * + * @param string $oldcol old column name + * @param string $newcol new column name + * @param string $type type ('INT', 'VARCHAR', 'BIT', ...) + * @param string $length length ('2', '5,2', '', ...) + * @param string $attribute attribute + * @param string $collation collation + * @param bool|string $null with 'NULL' or 'NOT NULL' + * @param string $default_type whether default is CURRENT_TIMESTAMP, + * NULL, NONE, USER_DEFINED + * @param string $default_value default value for USER_DEFINED default type + * @param string $extra 'AUTO_INCREMENT' + * @param string $comment field comment + * @param array &$field_primary list of fields for PRIMARY KEY + * @param string $index + * @param mixed $default_orig + * * @see PMA_Table::generateFieldSpec() - * @param string $oldcol old column name - * @param string $newcol new column name - * @param string $type type ('INT', 'VARCHAR', 'BIT', ...) - * @param string $length length ('2', '5,2', '', ...) - * @param string $attribute - * @param string $collation - * @param bool|string $null with 'NULL' or 'NOT NULL' - * @param string $default_type whether default is CURRENT_TIMESTAMP, - * NULL, NONE, USER_DEFINED - * @param string $default_value default value for USER_DEFINED default type - * @param string $extra 'AUTO_INCREMENT' - * @param string $comment field comment - * @param array &$field_primary list of fields for PRIMARY KEY - * @param string $index - * @param mixed $default_orig + * * @return string field specification */ static public function generateAlter($oldcol, $newcol, $type, $length, @@ -520,26 +571,32 @@ class PMA_Table $extra, $comment = '', &$field_primary, $index, $default_orig) { return PMA_backquote($oldcol) . ' ' - . PMA_Table::generateFieldSpec($newcol, $type, $length, $attribute, + . PMA_Table::generateFieldSpec( + $newcol, $type, $length, $attribute, $collation, $null, $default_type, $default_value, $extra, - $comment, $field_primary, $index, $default_orig); + $comment, $field_primary, $index, $default_orig + ); } // end function /** * Inserts existing entries in a PMA_* table by reading a value from an old entry * + * @param string $work The array index, which Relation feature to check + * ('relwork', 'commwork', ...) + * @param string $pma_table The array index, which PMA-table to update + * ('bookmark', 'relation', ...) + * @param array $get_fields Which fields will be SELECT'ed from the old entry + * @param array $where_fields Which fields will be used for the WHERE query + * (array('FIELDNAME' => 'FIELDVALUE')) + * @param array $new_fields Which fields will be used as new VALUES. These are + * the important keys which differ from the old entry + * (array('FIELDNAME' => 'NEW FIELDVALUE')) + * * @global relation variable - * @param string $work The array index, which Relation feature to check ('relwork', 'commwork', ...) - * @param string $pma_table The array index, which PMA-table to update ('bookmark', 'relation', ...) - * @param array $get_fields Which fields will be SELECT'ed from the old entry - * @param array $where_fields Which fields will be used for the WHERE query (array('FIELDNAME' => 'FIELDVALUE')) - * @param array $new_fields Which fields will be used as new VALUES. These are the important - * keys which differ from the old entry. - * (array('FIELDNAME' => 'NEW FIELDVALUE')) + * * @return int|true */ - static public function duplicateInfo($work, $pma_table, $get_fields, $where_fields, - $new_fields) + static public function duplicateInfo($work, $pma_table, $get_fields, $where_fields, $new_fields) { $last_id = -1; @@ -572,8 +629,9 @@ class PMA_Table // must use PMA_DBI_QUERY_STORE here, since we execute another // query inside the loop - $table_copy_rs = PMA_query_as_controluser($table_copy_query, true, - PMA_DBI_QUERY_STORE); + $table_copy_rs = PMA_query_as_controluser( + $table_copy_query, true, PMA_DBI_QUERY_STORE + ); while ($table_copy_row = @PMA_DBI_fetch_assoc($table_copy_rs)) { $value_parts = array(); @@ -583,9 +641,9 @@ class PMA_Table } } - $new_table_query = ' - INSERT IGNORE INTO ' . PMA_backquote($GLOBALS['cfgRelation']['db']) - . '.' . PMA_backquote($GLOBALS['cfgRelation'][$pma_table]) . ' + $new_table_query = 'INSERT IGNORE INTO ' + . PMA_backquote($GLOBALS['cfgRelation']['db']) + . '.' . PMA_backquote($GLOBALS['cfgRelation'][$pma_table]) . ' (' . implode(', ', $select_parts) . ', ' . implode(', ', $new_parts) . ') VALUES @@ -608,14 +666,15 @@ class PMA_Table /** * Copies or renames table * - * @param $source_db - * @param $source_table - * @param $target_db - * @param $target_table - * @param $what - * @param $move - * @param $mode - * @return bool + * @param string $source_db source database + * @param string $source_table source table + * @param string $target_db target database + * @param string $target_table target table + * @param string $what what to be moved or copied (data, dataonly) + * @param bool $move whether to move + * @param string $mode mode + * + * @return bool true if success, false otherwise */ static public function moveCopy($source_db, $source_table, $target_db, $target_table, $what, $move, $mode) { @@ -624,7 +683,10 @@ class PMA_Table /* Try moving table directly */ if ($move && $what == 'data') { $tbl = new PMA_Table($source_table, $source_db); - $result = $tbl->rename($target_table, $target_db, PMA_Table::isView($source_db, $source_table)); + $result = $tbl->rename( + $target_table, $target_db, + PMA_Table::isView($source_db, $source_table) + ); if ($result) { $GLOBALS['message'] = $tbl->getLastMessage(); return true; @@ -638,12 +700,14 @@ class PMA_Table // Ensure the target is valid if (! $GLOBALS['pma']->databases->exists($source_db, $target_db)) { if (! $GLOBALS['pma']->databases->exists($source_db)) { - $GLOBALS['message'] = PMA_Message::rawError('source database `' - . htmlspecialchars($source_db) . '` not found'); + $GLOBALS['message'] = PMA_Message::rawError( + 'source database `' . htmlspecialchars($source_db) . '` not found' + ); } if (! $GLOBALS['pma']->databases->exists($target_db)) { - $GLOBALS['message'] = PMA_Message::rawError('target database `' - . htmlspecialchars($target_db) . '` not found'); + $GLOBALS['message'] = PMA_Message::rawError( + 'target database `' . htmlspecialchars($target_db) . '` not found' + ); } return false; } @@ -661,21 +725,25 @@ class PMA_Table // do not create the table if dataonly if ($what != 'dataonly') { - require_once './libraries/export/sql.php'; + include_once './libraries/export/sql.php'; $no_constraints_comments = true; $GLOBALS['sql_constraints_query'] = ''; - $sql_structure = PMA_getTableDef($source_db, $source_table, "\n", $err_url, false, false); + $sql_structure = PMA_getTableDef( + $source_db, $source_table, "\n", $err_url, false, false + ); unset($no_constraints_comments); $parsed_sql = PMA_SQP_parse($sql_structure); $analyzed_sql = PMA_SQP_analyze($parsed_sql); $i = 0; if (empty($analyzed_sql[0]['create_table_fields'])) { - // this is not a CREATE TABLE, so find the first VIEW + // this is not a CREATE TABLE, so find the first VIEW $target_for_view = PMA_backquote($target_db); while (true) { - if ($parsed_sql[$i]['type'] == 'alpha_reservedWord' && $parsed_sql[$i]['data'] == 'VIEW') { + if ($parsed_sql[$i]['type'] == 'alpha_reservedWord' + && $parsed_sql[$i]['data'] == 'VIEW' + ) { break; } $i++; @@ -709,8 +777,10 @@ class PMA_Table $last = $parsed_sql['len'] - 1; $backquoted_source_db = PMA_backquote($source_db); for (++$i; $i <= $last; $i++) { - if ($parsed_sql[$i]['type'] == $table_delimiter && $parsed_sql[$i]['data'] == $backquoted_source_db) { - $parsed_sql[$i]['data'] = $target_for_view; + if ($parsed_sql[$i]['type'] == $table_delimiter + && $parsed_sql[$i]['data'] == $backquoted_source_db + ) { + $parsed_sql[$i]['data'] = $target_for_view; } } unset($last,$backquoted_source_db); @@ -723,8 +793,9 @@ class PMA_Table // If table exists, and 'add drop table' is selected: Drop it! $drop_query = ''; if (isset($GLOBALS['drop_if_exists']) - && $GLOBALS['drop_if_exists'] == 'true') { - if (PMA_Table::_isView($target_db,$target_table)) { + && $GLOBALS['drop_if_exists'] == 'true' + ) { + if (PMA_Table::_isView($target_db, $target_table)) { $drop_query = 'DROP VIEW'; } else { $drop_query = 'DROP TABLE'; @@ -745,7 +816,8 @@ class PMA_Table $GLOBALS['sql_query'] .= "\n" . $sql_structure . ';'; if (($move || isset($GLOBALS['add_constraints'])) - && !empty($GLOBALS['sql_constraints_query'])) { + && !empty($GLOBALS['sql_constraints_query']) + ) { $parsed_sql = PMA_SQP_parse($GLOBALS['sql_constraints_query']); $i = 0; @@ -768,7 +840,8 @@ class PMA_Table for ($j = $i; $j < $cnt; $j++) { if ($parsed_sql[$j]['type'] == 'alpha_reservedWord' - && strtoupper($parsed_sql[$j]['data']) == 'CONSTRAINT') { + && strtoupper($parsed_sql[$j]['data']) == 'CONSTRAINT' + ) { if ($parsed_sql[$j+1]['type'] == $table_delimiter) { $parsed_sql[$j+1]['data'] = ''; } @@ -776,8 +849,9 @@ class PMA_Table } // Generate query back - $GLOBALS['sql_constraints_query'] = PMA_SQP_formatHtml($parsed_sql, - 'query_only'); + $GLOBALS['sql_constraints_query'] = PMA_SQP_formatHtml( + $parsed_sql, 'query_only' + ); if ($mode == 'one_table') { PMA_DBI_query($GLOBALS['sql_constraints_query']); } @@ -791,9 +865,10 @@ class PMA_Table } // Copy the data unless this is a VIEW - if (($what == 'data' || $what == 'dataonly') && ! PMA_Table::_isView($target_db,$target_table)) { - $sql_insert_data = - 'INSERT INTO ' . $target . ' SELECT * FROM ' . $source; + if (($what == 'data' || $what == 'dataonly') + && ! PMA_Table::_isView($target_db, $target_table) + ) { + $sql_insert_data = 'INSERT INTO ' . $target . ' SELECT * FROM ' . $source; PMA_DBI_query($sql_insert_data); $GLOBALS['sql_query'] .= "\n\n" . $sql_insert_data . ';'; } @@ -807,7 +882,7 @@ class PMA_Table // moving table from replicated one to not replicated one PMA_DBI_select_db($source_db); - if (PMA_Table::_isView($source_db,$source_table)) { + if (PMA_Table::_isView($source_db, $source_table)) { $sql_drop_query = 'DROP VIEW'; } else { $sql_drop_query = 'DROP TABLE'; @@ -902,7 +977,7 @@ class PMA_Table } $GLOBALS['sql_query'] .= "\n\n" . $sql_drop_query . ';'; - // end if ($move) + // end if ($move) } else { // we are copying // Create new entries as duplicates from old PMA DBs @@ -993,9 +1068,11 @@ class PMA_Table * checks if given name is a valid table name, * currently if not empty, trailing spaces, '.', '/' and '\' * - * @todo add check for valid chars in filename on current system/os - * @see http://dev.mysql.com/doc/refman/5.0/en/legal-names.html - * @param string $table_name name to check + * @param string $table_name name to check + * + * @todo add check for valid chars in filename on current system/os + * @see http://dev.mysql.com/doc/refman/5.0/en/legal-names.html + * * @return boolean whether the string is valid or not */ function isValidName($table_name) @@ -1021,10 +1098,11 @@ class PMA_Table /** * renames table * - * @param string $new_name new table name - * @param string $new_db new database name - * @param bool $is_view is this for a VIEW rename? - * @return bool success + * @param string $new_name new table name + * @param string $new_db new database name + * @param bool $is_view is this for a VIEW rename? + * + * @return bool success */ function rename($new_name, $new_db = null, $is_view = false) { @@ -1060,7 +1138,11 @@ class PMA_Table } // I don't think a specific error message for views is necessary if (! PMA_DBI_query($GLOBALS['sql_query'])) { - $this->errors[] = sprintf(__('Error renaming table %1$s to %2$s'), $this->getFullName(), $new_table->getFullName()); + $this->errors[] = sprintf( + __('Error renaming table %1$s to %2$s'), + $this->getFullName(), + $new_table->getFullName() + ); return false; } @@ -1143,8 +1225,11 @@ class PMA_Table unset($table_query); } - $this->messages[] = sprintf(__('Table %s has been renamed to %s'), - htmlspecialchars($old_name), htmlspecialchars($new_name)); + $this->messages[] = sprintf( + __('Table %s has been renamed to %s'), + htmlspecialchars($old_name), + htmlspecialchars($new_name) + ); return true; } @@ -1160,8 +1245,8 @@ class PMA_Table * - PRIMARY(fk_id1, fk_id2) // NONE * - UNIQUE(x,y) // NONE * + * @param bool $backquoted whether to quote name with backticks `` * - * @param bool $backquoted whether to quote name with backticks `` * @return array */ public function getUniqueColumns($backquoted = true) @@ -1174,7 +1259,8 @@ class PMA_Table if (count($index) > 1) { continue; } - $return[] = $this->getFullName($backquoted) . '.' . ($backquoted ? PMA_backquote($index[0]) : $index[0]); + $return[] = $this->getFullName($backquoted) . '.' + . ($backquoted ? PMA_backquote($index[0]) : $index[0]); } return $return; @@ -1188,7 +1274,8 @@ class PMA_Table * * e.g. index(col1, col2) would only return col1 * - * @param bool $backquoted whether to quote name with backticks `` + * @param bool $backquoted whether to quote name with backticks `` + * * @return array */ public function getIndexedColumns($backquoted = true) @@ -1198,7 +1285,8 @@ class PMA_Table $return = array(); foreach ($indexed as $column) { - $return[] = $this->getFullName($backquoted) . '.' . ($backquoted ? PMA_backquote($column) : $column); + $return[] = $this->getFullName($backquoted) . '.' + . ($backquoted ? PMA_backquote($column) : $column); } return $return; @@ -1209,7 +1297,8 @@ class PMA_Table * * returns an array with all columns * - * @param bool $backquoted whether to quote name with backticks `` + * @param bool $backquoted whether to quote name with backticks `` + * * @return array */ public function getColumns($backquoted = true) @@ -1219,7 +1308,8 @@ class PMA_Table $return = array(); foreach ($indexed as $column) { - $return[] = $this->getFullName($backquoted) . '.' . ($backquoted ? PMA_backquote($column) : $column); + $return[] = $this->getFullName($backquoted) . '.' + . ($backquoted ? PMA_backquote($column) : $column); } return $return; @@ -1228,7 +1318,6 @@ class PMA_Table /** * Return UI preferences for this table from phpMyAdmin database. * - * * @return array */ protected function getUiPrefsFromDb() @@ -1237,11 +1326,10 @@ class PMA_Table PMA_backquote($GLOBALS['cfg']['Server']['table_uiprefs']); // Read from phpMyAdmin database - $sql_query = - " SELECT `prefs` FROM " . $pma_table . - " WHERE `username` = '" . $GLOBALS['cfg']['Server']['user'] . "'" . - " AND `db_name` = '" . PMA_sqlAddSlashes($this->db_name) . "'" . - " AND `table_name` = '" . PMA_sqlAddSlashes($this->name) . "'"; + $sql_query = " SELECT `prefs` FROM " . $pma_table + . " WHERE `username` = '" . $GLOBALS['cfg']['Server']['user'] . "'" + . " AND `db_name` = '" . PMA_sqlAddSlashes($this->db_name) . "'" + . " AND `table_name` = '" . PMA_sqlAddSlashes($this->name) . "'"; $row = PMA_DBI_fetch_array(PMA_query_as_controluser($sql_query)); if (isset($row[0])) { @@ -1258,22 +1346,23 @@ class PMA_Table */ protected function saveUiPrefsToDb() { - $pma_table = PMA_backquote($GLOBALS['cfg']['Server']['pmadb']) .".". - PMA_backquote($GLOBALS['cfg']['Server']['table_uiprefs']); + $pma_table = PMA_backquote($GLOBALS['cfg']['Server']['pmadb']) . "." + . PMA_backquote($GLOBALS['cfg']['Server']['table_uiprefs']); $username = $GLOBALS['cfg']['Server']['user']; - $sql_query = - " REPLACE INTO " . $pma_table . - " VALUES ('" . $username . "', '" . PMA_sqlAddSlashes($this->db_name) . "', '" . - PMA_sqlAddSlashes($this->name) . "', '" . - PMA_sqlAddSlashes(json_encode($this->uiprefs)) . "', NULL)"; + $sql_query = " REPLACE INTO " . $pma_table + . " VALUES ('" . $username . "', '" . PMA_sqlAddSlashes($this->db_name) + . "', '" . PMA_sqlAddSlashes($this->name) . "', '" + . PMA_sqlAddSlashes(json_encode($this->uiprefs)) . "', NULL)"; $success = PMA_DBI_try_query($sql_query, $GLOBALS['controllink']); if (!$success) { $message = PMA_Message::error(__('Could not save table UI preferences')); $message->addMessage('

'); - $message->addMessage(PMA_Message::rawError(PMA_DBI_getError($GLOBALS['controllink']))); + $message->addMessage( + PMA_Message::rawError(PMA_DBI_getError($GLOBALS['controllink'])) + ); return $message; } @@ -1290,13 +1379,15 @@ class PMA_Table $success = PMA_DBI_try_query($sql_query, $GLOBALS['controllink']); if (!$success) { - $message = PMA_Message::error(sprintf( - __('Failed to cleanup table UI preferences (see $cfg[\'Servers\'][$i][\'MaxTableUiprefs\'] %s)'), - PMA_showDocu('cfg_Servers_MaxTableUiprefs') - )); + $message = PMA_Message::error( + sprintf( + __('Failed to cleanup table UI preferences (see $cfg[\'Servers\'][$i][\'MaxTableUiprefs\'] %s)'), + PMA_showDocu('cfg_Servers_MaxTableUiprefs') + ) + ); $message->addMessage('

'); $message->addMessage(PMA_Message::rawError(PMA_DBI_getError($GLOBALS['controllink']))); - print_r($message); + print_r($message); return $message; } } @@ -1309,6 +1400,7 @@ class PMA_Table * If pmadb and table_uiprefs is set, it will load the UI preferences from * phpMyAdmin database. * + * @return nothing */ protected function loadUiPrefs() { @@ -1316,10 +1408,11 @@ class PMA_Table // set session variable if it's still undefined if (! isset($_SESSION['tmp_user_values']['table_uiprefs'][$server_id][$this->db_name][$this->name])) { $_SESSION['tmp_user_values']['table_uiprefs'][$server_id][$this->db_name][$this->name] = - // check whether we can get from pmadb - (strlen($GLOBALS['cfg']['Server']['pmadb']) - && strlen($GLOBALS['cfg']['Server']['table_uiprefs'])) ? - $this->getUiPrefsFromDb() : array(); + // check whether we can get from pmadb + (strlen($GLOBALS['cfg']['Server']['pmadb']) + && strlen($GLOBALS['cfg']['Server']['table_uiprefs'])) + ? $this->getUiPrefsFromDb() + : array(); } $this->uiprefs =& $_SESSION['tmp_user_values']['table_uiprefs'][$server_id][$this->db_name][$this->name]; } @@ -1332,8 +1425,8 @@ class PMA_Table * - PROP_COLUMN_ORDER * - PROP_COLUMN_VISIB * + * @param string $property property * - * @param string $property * @return mixed */ public function getUiProp($property) @@ -1350,8 +1443,7 @@ class PMA_Table $avail_columns = $this->getColumns(); foreach ($avail_columns as $each_col) { // check if $each_col ends with $colname - if (substr_compare($each_col, $colname, - strlen($each_col) - strlen($colname)) === 0) { + if (substr_compare($each_col, $colname, strlen($each_col) - strlen($colname)) === 0) { return $this->uiprefs[$property]; } } @@ -1361,12 +1453,12 @@ class PMA_Table } else { return false; } - } else if ($property == self::PROP_COLUMN_ORDER || - $property == self::PROP_COLUMN_VISIB) { + } elseif ($property == self::PROP_COLUMN_ORDER + || $property == self::PROP_COLUMN_VISIB + ) { if (! PMA_Table::isView($this->db_name, $this->name) && isset($this->uiprefs[$property])) { // check if the table has not been modified - if (self::sGetStatusInfo($this->db_name, $this->name, 'Create_time') == - $this->uiprefs['CREATE_TIME']) { + if (self::sGetStatusInfo($this->db_name, $this->name, 'Create_time') == $this->uiprefs['CREATE_TIME']) { return $this->uiprefs[$property]; } else { // remove the property, since the table has been modified @@ -1390,9 +1482,10 @@ class PMA_Table * - PROP_COLUMN_ORDER * - PROP_COLUMN_VISIB * - * @param string $property - * @param mixed $value + * @param string $property Property + * @param mixed $value Value for the property * @param string $table_create_time Needed for PROP_COLUMN_ORDER and PROP_COLUMN_VISIB + * * @return boolean|PMA_Message */ public function setUiProp($property, $value, $table_create_time = null) @@ -1401,12 +1494,13 @@ class PMA_Table $this->loadUiPrefs(); } // we want to save the create time if the property is PROP_COLUMN_ORDER - if (! PMA_Table::isView($this->db_name, $this->name) && ($property == self::PROP_COLUMN_ORDER || - $property == self::PROP_COLUMN_VISIB)) { - + if (! PMA_Table::isView($this->db_name, $this->name) + && ($property == self::PROP_COLUMN_ORDER || $property == self::PROP_COLUMN_VISIB) + ) { $curr_create_time = self::sGetStatusInfo($this->db_name, $this->name, 'CREATE_TIME'); - if (isset($table_create_time) && - $table_create_time == $curr_create_time) { + if (isset($table_create_time) + && $table_create_time == $curr_create_time + ) { $this->uiprefs['CREATE_TIME'] = $curr_create_time; } else { // there is no $table_create_time, or @@ -1419,7 +1513,8 @@ class PMA_Table $this->uiprefs[$property] = $value; // check if pmadb is set if (strlen($GLOBALS['cfg']['Server']['pmadb']) - && strlen($GLOBALS['cfg']['Server']['table_uiprefs'])) { + && strlen($GLOBALS['cfg']['Server']['table_uiprefs']) + ) { return $this->saveUiprefsToDb(); } return true; @@ -1428,7 +1523,8 @@ class PMA_Table /** * Remove a property from UI preferences. * - * @param string $property + * @param string $property the property + * * @return true|PMA_Message */ public function removeUiProp($property) @@ -1440,7 +1536,8 @@ class PMA_Table unset($this->uiprefs[$property]); // check if pmadb is set if (strlen($GLOBALS['cfg']['Server']['pmadb']) - && strlen($GLOBALS['cfg']['Server']['table_uiprefs'])) { + && strlen($GLOBALS['cfg']['Server']['table_uiprefs']) + ) { return $this->saveUiprefsToDb(); } } diff --git a/libraries/Tracker.class.php b/libraries/Tracker.class.php index de216ab9c5..e71b7d601e 100644 --- a/libraries/Tracker.class.php +++ b/libraries/Tracker.class.php @@ -71,6 +71,7 @@ class PMA_Tracker * * @static * + * @return nothing */ static public function init() { @@ -86,15 +87,15 @@ class PMA_Tracker self::$default_tracking_set = $GLOBALS['cfg']['Server']['tracking_default_statements']; self::$version_auto_create = $GLOBALS['cfg']['Server']['tracking_version_auto_create']; - } /** - * Actually enables tracking. This needs to be done after all + * Actually enables tracking. This needs to be done after all * underlaying code is initialized. * * @static * + * @return nothing */ static public function enable() { @@ -133,9 +134,9 @@ class PMA_Tracker /** * Parses the name of a table from a SQL statement substring. * - * @static + * @param string $string part of SQL statement * - * @param string $string part of SQL statement + * @static * * @return string the name of table */ @@ -144,8 +145,7 @@ class PMA_Tracker if (strstr($string, '.')) { $temp = explode('.', $string); $tablename = $temp[1]; - } - else { + } else { $tablename = $string; } @@ -163,10 +163,10 @@ class PMA_Tracker /** * Gets the tracking status of a table, is it active or deactive ? * - * @static + * @param string $dbname name of database + * @param string $tablename name of table * - * @param string $dbname name of database - * @param string $tablename name of table + * @static * * @return boolean true or false */ @@ -184,8 +184,7 @@ class PMA_Tracker return false; } - $sql_query = - " SELECT tracking_active FROM " . self::$pma_table . + $sql_query = " SELECT tracking_active FROM " . self::$pma_table . " WHERE db_name = '" . PMA_sqlAddSlashes($dbname) . "' " . " AND table_name = '" . PMA_sqlAddSlashes($tablename) . "' " . " ORDER BY version DESC"; @@ -215,14 +214,14 @@ class PMA_Tracker * Creates tracking version of a table / view * (in other words: create a job to track future changes on the table). * - * @static - * * @param string $dbname name of database * @param string $tablename name of table * @param string $version version * @param string $tracking_set set of tracking statements * @param bool $is_view if table is a view * + * @static + * * @return int result of version insertion */ static public function createVersion($dbname, $tablename, $version, $tracking_set = '', $is_view = false) @@ -233,7 +232,7 @@ class PMA_Tracker $tracking_set = self::$default_tracking_set; } - require_once './libraries/export/sql.php'; + include_once './libraries/export/sql.php'; $sql_backquotes = true; @@ -256,7 +255,7 @@ class PMA_Tracker $indexes = array(); - while($row = PMA_DBI_fetch_assoc($sql_result)) { + while ($row = PMA_DBI_fetch_assoc($sql_result)) { $indexes[] = $row; } @@ -284,8 +283,7 @@ class PMA_Tracker // Save version - $sql_query = - "/*NOTRACK*/\n" . + $sql_query = "/*NOTRACK*/\n" . "INSERT INTO" . self::$pma_table . " (" . "db_name, " . "table_name, " . @@ -320,19 +318,18 @@ class PMA_Tracker /** - * Removes all tracking data for a table + * Removes all tracking data for a table + * + * @param string $dbname name of database + * @param string $tablename name of table * * @static * - * @param string $dbname name of database - * @param string $tablename name of table - * * @return int result of version insertion */ static public function deleteTracking($dbname, $tablename) { - $sql_query = - "/*NOTRACK*/\n" . + $sql_query = "/*NOTRACK*/\n" . "DELETE FROM " . self::$pma_table . " WHERE `db_name` = '" . PMA_sqlAddSlashes($dbname) . "' AND `table_name` = '" . PMA_sqlAddSlashes($tablename) . "'"; $result = PMA_query_as_controluser($sql_query); @@ -343,13 +340,13 @@ class PMA_Tracker * Creates tracking version of a database * (in other words: create a job to track future changes on the database). * - * @static - * * @param string $dbname name of database * @param string $version version * @param string $query query * @param string $tracking_set set of tracking statements * + * @static + * * @return int result of version insertion */ static public function createDatabaseVersion($dbname, $version, $query, $tracking_set = 'CREATE DATABASE,ALTER DATABASE,DROP DATABASE') @@ -360,7 +357,7 @@ class PMA_Tracker $tracking_set = self::$default_tracking_set; } - require_once './libraries/export/sql.php'; + include_once './libraries/export/sql.php'; $create_sql = ""; @@ -372,8 +369,7 @@ class PMA_Tracker $create_sql .= self::getLogComment() . $query; // Save version - $sql_query = - "/*NOTRACK*/\n" . + $sql_query = "/*NOTRACK*/\n" . "INSERT INTO" . self::$pma_table . " (" . "db_name, " . "table_name, " . @@ -406,19 +402,18 @@ class PMA_Tracker /** * Changes tracking of a table. * - * @static + * @param string $dbname name of database + * @param string $tablename name of table + * @param string $version version + * @param integer $new_state the new state of tracking * - * @param string $dbname name of database - * @param string $tablename name of table - * @param string $version version - * @param integer $new_state the new state of tracking + * @static * * @return int result of SQL query */ - static private function changeTracking($dbname, $tablename, $version, $new_state) + static private function _changeTracking($dbname, $tablename, $version, $new_state) { - $sql_query = - " UPDATE " . self::$pma_table . + $sql_query = " UPDATE " . self::$pma_table . " SET `tracking_active` = '" . $new_state . "' " . " WHERE `db_name` = '" . PMA_sqlAddSlashes($dbname) . "' " . " AND `table_name` = '" . PMA_sqlAddSlashes($tablename) . "' " . @@ -432,38 +427,38 @@ class PMA_Tracker /** * Changes tracking data of a table. * - * @static + * @param string $dbname name of database + * @param string $tablename name of table + * @param string $version version + * @param string $type type of data(DDL || DML) + * @param string|array $new_data the new tracking data * - * @param string $dbname name of database - * @param string $tablename name of table - * @param string $version version - * @param string $type type of data(DDL || DML) - * @param string|array $new_data the new tracking data + * @static * * @return bool result of change */ static public function changeTrackingData($dbname, $tablename, $version, $type, $new_data) { - if ($type == 'DDL') + if ($type == 'DDL') { $save_to = 'schema_sql'; - elseif ($type == 'DML') + } elseif ($type == 'DML') { $save_to = 'data_sql'; - else + } else { return false; - + } $date = date('Y-m-d H:i:s'); $new_data_processed = ''; if (is_array($new_data)) { foreach ($new_data as $data) { - $new_data_processed .= '# log ' . $date . ' ' . $data['username'] . PMA_sqlAddSlashes($data['statement']) . "\n"; + $new_data_processed .= '# log ' . $date . ' ' . $data['username'] + . PMA_sqlAddSlashes($data['statement']) . "\n"; } } else { $new_data_processed = $new_data; } - $sql_query = - " UPDATE " . self::$pma_table . + $sql_query = " UPDATE " . self::$pma_table . " SET `" . $save_to . "` = '" . $new_data_processed . "' " . " WHERE `db_name` = '" . PMA_sqlAddSlashes($dbname) . "' " . " AND `table_name` = '" . PMA_sqlAddSlashes($tablename) . "' " . @@ -477,34 +472,34 @@ class PMA_Tracker /** * Activates tracking of a table. * - * @static + * @param string $dbname name of database + * @param string $tablename name of table + * @param string $version version * - * @param string $dbname name of database - * @param string $tablename name of table - * @param string $version version + * @static * * @return int result of SQL query */ static public function activateTracking($dbname, $tablename, $version) { - return self::changeTracking($dbname, $tablename, $version, 1); + return self::_changeTracking($dbname, $tablename, $version, 1); } /** * Deactivates tracking of a table. * - * @static + * @param string $dbname name of database + * @param string $tablename name of table + * @param string $version version * - * @param string $dbname name of database - * @param string $tablename name of table - * @param string $version version + * @static * * @return int result of SQL query */ static public function deactivateTracking($dbname, $tablename, $version) { - return self::changeTracking($dbname, $tablename, $version, 0); + return self::_changeTracking($dbname, $tablename, $version, 0); } @@ -512,18 +507,17 @@ class PMA_Tracker * Gets the newest version of a tracking job * (in other words: gets the HEAD version). * - * @static + * @param string $dbname name of database + * @param string $tablename name of table + * @param string $statement tracked statement * - * @param string $dbname name of database - * @param string $tablename name of table - * @param string $statement tracked statement + * @static * * @return int (-1 if no version exists | > 0 if a version exists) */ static public function getVersion($dbname, $tablename, $statement = null) { - $sql_query = - " SELECT MAX(version) FROM " . self::$pma_table . + $sql_query = " SELECT MAX(version) FROM " . self::$pma_table . " WHERE `db_name` = '" . PMA_sqlAddSlashes($dbname) . "' " . " AND `table_name` = '" . PMA_sqlAddSlashes($tablename) . "' "; @@ -540,11 +534,11 @@ class PMA_Tracker /** * Gets the record of a tracking job. * - * @static + * @param string $dbname name of database + * @param string $tablename name of table + * @param string $version version number * - * @param string $dbname name of database - * @param string $tablename name of table - * @param string $version version number + * @static * * @return mixed record DDM log, DDL log, structure snapshot, tracked statements. */ @@ -644,12 +638,12 @@ class PMA_Tracker * - type of statement, is it part of DDL or DML ? * - tablename * + * @param string $query query + * * @static * @todo: using PMA SQL Parser when possible * @todo: support multi-table/view drops * - * @param string $query - * * @return mixed Array containing identifier, type and tablename. * */ @@ -684,9 +678,10 @@ class PMA_Tracker $result['type'] = 'DDL'; // Parse CREATE VIEW statement - if (in_array('CREATE', $tokens) == true && - in_array('VIEW', $tokens) == true && - in_array('AS', $tokens) == true) { + if (in_array('CREATE', $tokens) == true + && in_array('VIEW', $tokens) == true + && in_array('AS', $tokens) == true + ) { $result['identifier'] = 'CREATE VIEW'; $index = array_search('VIEW', $tokens); @@ -695,10 +690,11 @@ class PMA_Tracker } // Parse ALTER VIEW statement - if (in_array('ALTER', $tokens) == true && - in_array('VIEW', $tokens) == true && - in_array('AS', $tokens) == true && - ! isset($result['identifier'])) { + if (in_array('ALTER', $tokens) == true + && in_array('VIEW', $tokens) == true + && in_array('AS', $tokens) == true + && ! isset($result['identifier']) + ) { $result['identifier'] = 'ALTER VIEW'; $index = array_search('VIEW', $tokens); @@ -778,11 +774,10 @@ class PMA_Tracker } // Parse CREATE INDEX statement - if (! isset($result['identifier']) && - ( substr($query, 0, 12) == 'CREATE INDEX' || - substr($query, 0, 19) == 'CREATE UNIQUE INDEX' || - substr($query, 0, 20) == 'CREATE SPATIAL INDEX' - ) + if (! isset($result['identifier']) + && (substr($query, 0, 12) == 'CREATE INDEX' + || substr($query, 0, 19) == 'CREATE UNIQUE INDEX' + || substr($query, 0, 20) == 'CREATE SPATIAL INDEX') ) { $result['identifier'] = 'CREATE INDEX'; $prefix = explode('ON ', $query); @@ -822,7 +817,7 @@ class PMA_Tracker } // Parse INSERT INTO statement - if (! isset($result['identifier']) && substr($query, 0, 11 ) == 'INSERT INTO') { + if (! isset($result['identifier']) && substr($query, 0, 11) == 'INSERT INTO') { $result['identifier'] = 'INSERT'; $prefix = explode('INSERT INTO', $query); $suffix = explode('(', $prefix[1]); @@ -830,7 +825,7 @@ class PMA_Tracker } // Parse DELETE statement - if (! isset($result['identifier']) && substr($query, 0, 6 ) == 'DELETE') { + if (! isset($result['identifier']) && substr($query, 0, 6) == 'DELETE') { $result['identifier'] = 'DELETE'; $prefix = explode('FROM ', $query); $suffix = explode(' ', $prefix[1]); @@ -838,7 +833,7 @@ class PMA_Tracker } // Parse TRUNCATE statement - if (! isset($result['identifier']) && substr($query, 0, 8 ) == 'TRUNCATE') { + if (! isset($result['identifier']) && substr($query, 0, 8) == 'TRUNCATE') { $result['identifier'] = 'TRUNCATE'; $prefix = explode('TRUNCATE', $query); $result['tablename'] = self::getTableName($prefix[1]); @@ -851,8 +846,11 @@ class PMA_Tracker /** * Analyzes a given SQL statement and saves tracking data. * - * @static * @param string $query a SQL query + * + * @static + * + * @return nothing */ static public function handleQuery($query) { @@ -881,8 +879,9 @@ class PMA_Tracker // If version not exists and auto-creation is enabled if (self::$version_auto_create == true - && self::isTracked($dbname, $result['tablename']) == false - && $version == -1) { + && self::isTracked($dbname, $result['tablename']) == false + && $version == -1 + ) { // Create the version switch ($result['identifier']) { @@ -916,11 +915,10 @@ class PMA_Tracker $query = self::getLogComment() . $query ; // Mark it as untouchable - $sql_query = - " /*NOTRACK*/\n" . + $sql_query = " /*NOTRACK*/\n" . " UPDATE " . self::$pma_table . - " SET " . PMA_backquote($save_to) ." = CONCAT( " . PMA_backquote($save_to) . ",'\n" . PMA_sqlAddSlashes($query) . "') ," . - " `date_updated` = '" . $date . "' "; + " SET " . PMA_backquote($save_to) ." = CONCAT( " . PMA_backquote($save_to) . ",'\n" + . PMA_sqlAddSlashes($query) . "') ," . " `date_updated` = '" . $date . "' "; // If table was renamed we have to change the tablename attribute in pma_tracking too if ($result['identifier'] == 'RENAME TABLE') { diff --git a/libraries/advisory_rules.txt b/libraries/advisory_rules.txt index f13f838890..c3445e09fe 100644 --- a/libraries/advisory_rules.txt +++ b/libraries/advisory_rules.txt @@ -74,9 +74,9 @@ rule 'Slow query logging' # # versions -rule 'Release Series' +rule 'Release Series' [!PMA_DRIZZLE] version - !PMA_DRIZZLE && substr(value,0,1) <= 5 && substr(value,2,1) < 1 + substr(value,0,1) <= 5 && substr(value,2,1) < 1 The MySQL server version less then 5.1. You should upgrade, as MySQL 5.1 has improved performance, and MySQL 5.5 even more so. Current version: %s | value @@ -111,7 +111,7 @@ rule 'Distribution' rule 'MySQL Architecture' system_memory - value > 3072*1024 && !preg_match('/64/',version_compile_machine) + value > 3072*1024 && !preg_match('/64/',version_compile_machine) && !preg_match('/64/',version_compile_os) MySQL is not compiled as a 64-bit package. Your memory capacity is above 3 GiB (assuming the Server is on localhost), so MySQL might not be able to access all of your memory. You might want to consider installing the 64-bit version of MySQL. Available memory on this host: %s | implode(' ',PMA_formatByteDown(value*1024, 2, 2)) @@ -131,7 +131,7 @@ rule 'Query cache usage' [!fired('Query cache disabled')] Questions / Uptime value > 100 Suboptimal caching method. - You are using the MySQL Query cache with a fairly high traffic database. It might be worth considering to use memcached instead of the MySQL Query cache, especially if you have multiple slaves. + You are using the MySQL Query cache with a fairly high traffic database. It might be worth considering to use memcached instead of the MySQL Query cache, especially if you have multiple slaves. The query cache is enabled and the server receives %d queries per second. This rule fires if there is more than 100 queries per second. | round(value,1) rule 'Query cache efficiency (%)' [Com_select + Qcache_hits > 0 && !fired('Query cache disabled')] @@ -214,6 +214,7 @@ rule 'Rate of reading first index entry' This usually indicates frequent full index scans. Full index scans are faster than table scans but require lots of CPU cycles in big tables, if those tables that have or had high volumes of UPDATEs and DELETEs, running 'OPTIMIZE TABLE' might reduce the amount of and/or speed up full index scans. Other than that full index scans can only be reduced by rewriting queries. Index scans average: %s, this value should be less than 1 per hour | PMA_bytime(value,2) +# This rule may be applicable to MyISAM-only workloads, but completely wrong for InnoDB - http://www.mysqlperformanceblog.com/2010/06/15/what-does-handler_read_rnd-mean/ rule 'Rate of reading fixed position' Handler_read_rnd / Uptime value * 60 * 60 > 1 @@ -247,19 +248,19 @@ rule 'Temp disk rate' Created_tmp_disk_tables / Uptime value * 60 * 60 > 1 Many temporary tables are being written to disk instead of being kept in memory. - Increasing {max_heap_table_size} and {tmp_table_size} might help. However some temporary tables are always being written to disk, independent of the value of these variables. To eliminate these you will have to rewrite your queries to avoid those conditions (Within a temprorary table: Presence of a BLOB or TEXT column or presence of a column bigger than 512 bytes) as mentioned in in the MySQL Documentation + Increasing {max_heap_table_size} and {tmp_table_size} might help. However some temporary tables are always being written to disk, independent of the value of these variables. To eliminate these you will have to rewrite your queries to avoid those conditions (Within a temprorary table: Presence of a BLOB or TEXT column or presence of a column bigger than 512 bytes) as mentioned in in the MySQL Documentation Rate of temporay tables being written to disk: %s, this value should be less than 1 per hour | PMA_bytime(value,2) # I couldn't find any source on the internet that suggests a direct relation between high counts of temporary tables and any of these variables. # Several independent Blog entries suggest (http://ronaldbradford.com/blog/more-on-understanding-sort_buffer_size-2010-05-10/ and http://www.xaprb.com/blog/2010/05/09/how-to-tune-mysqls-sort_buffer_size/) # that sort_buffer_size should be left as it is. And increasing read_buffer_size is only suggested when there are a lot of -# table scans (http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html#sysvar_read_buffer_size and other sources) though +# table scans (http://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html#sysvar_read_buffer_size and other sources) though # setting it too high is bad too (http://www.mysqlperformanceblog.com/2007/09/17/mysql-what-read_buffer_size-value-is-optimal/). #rule 'Temp table rate' # Created_tmp_tables / Uptime # value * 60 * 60 > 1 # Many intermediate temporary tables are being created. -# This may be caused by queries under certain conditions as mentioned in the MySQL Documentation. Consider increasing {sort_buffer_size} (sorting), {read_rnd_buffer_size} (random read buffer, ie, post-sort), {read_buffer_size} (sequential scan). +# This may be caused by queries under certain conditions as mentioned in the MySQL Documentation. Consider increasing {sort_buffer_size} (sorting), {read_rnd_buffer_size} (random read buffer, ie, post-sort), {read_buffer_size} (sequential scan). # # MyISAM index cache @@ -428,9 +429,9 @@ rule 'InnoDB buffer pool size' [system_memory > 0] # other rule 'MyISAM concurrent inserts' concurrent_insert - value == 0 + value === 0 || value === 'NEVER' Enable concurrent_insert by setting it to 1 - Setting {concurrent_insert} to 1 reduces contention between readers and writers for a given table. See also MySQL Documentation + Setting {concurrent_insert} to 1 reduces contention between readers and writers for a given table. See also MySQL Documentation concurrent_insert is set to 0 # INSERT DELAYED USAGE diff --git a/libraries/core.lib.php b/libraries/core.lib.php index dcc5208bc6..a277f29629 100644 --- a/libraries/core.lib.php +++ b/libraries/core.lib.php @@ -708,13 +708,27 @@ function PMA_includeJS($url) } /** - * Adds JS code snippets to be displayed by header.inc.php. Adds a newline to each snippet. + * Adds JS code snippets to be displayed by header.inc.php. Adds a + * newline to each snippet. * * @param string $str Js code to be added (e.g. "token=1234;") * */ -function PMA_AddJSCode($str) { +function PMA_AddJSCode($str) +{ $GLOBALS['js_script'][] = $str; } +/** + * Adds JS code snippet for variable assignment to be displayed by header.inc.php. + * + * @param string $key Name of value to set + * @param mixed $value Value to set, can be either string or array of strings + * + */ +function PMA_AddJSVar($key, $value) +{ + PMA_AddJsCode(PMA_getJsValue($key, $value)); +} + ?> diff --git a/libraries/js_escape.lib.php b/libraries/js_escape.lib.php index 656794f819..87d88552a6 100644 --- a/libraries/js_escape.lib.php +++ b/libraries/js_escape.lib.php @@ -56,25 +56,64 @@ function PMA_escapeJsString($string) "\r" => '\r'))); } +/** + * Formats a value for javascript code. + * + * @param string $value String to be formatted. + * + * @retrun string formatted value. + */ +function PMA_formatJsVal($value) +{ + if (is_bool($value)) { + if ($value) { + return 'true'; + } else { + return 'false'; + } + } elseif (is_int($value)) { + return (int)$value; + } else { + return '"' . PMA_escapeJsString($value) . '"'; + } +} + +/** + * Formats an javascript assignment with proper escaping of a value + * and support for assigning array of strings. + * + * @param string $key Name of value to set + * @param mixed $value Value to set, can be either string or array of strings + * + * @return string Javascript code. + */ +function PMA_getJsValue($key, $value) +{ + $result = $key . ' = '; + if (is_array($value)) { + $result .= '['; + foreach ($value as $id => $val) { + $result .= PMA_formatJsVal($value) . ","; + } + $result .= "];\n"; + } else { + $result .= PMA_formatJsVal($value) . ";\n"; + } + return $result; +} + /** * Prints an javascript assignment with proper escaping of a value * and support for assigning array of strings. * * @param string $key Name of value to set * @param mixed $value Value to set, can be either string or array of strings + * + * @return nothing */ function PMA_printJsValue($key, $value) { - echo $key . ' = '; - if (is_array($value)) { - echo '['; - foreach ($value as $id => $val) { - echo "'" . PMA_escapeJsString($val) . "',"; - } - echo "];\n"; - } else { - echo "'" . PMA_escapeJsString($value) . "';\n"; - } + echo PMA_getJsValue($key, $value); } ?> diff --git a/pmd_common.php b/libraries/pmd_common.php similarity index 100% rename from pmd_common.php rename to libraries/pmd_common.php diff --git a/libraries/replication.inc.php b/libraries/replication.inc.php index 58ed7c5acc..857f4dc8da 100644 --- a/libraries/replication.inc.php +++ b/libraries/replication.inc.php @@ -298,21 +298,14 @@ function PMA_replication_synchronize_db($db, $src_link, $trg_link, $data = true) { $src_db = $trg_db = $db; - $src_connection = PMA_DBI_select_db($src_db, $src_link); - $trg_connection = PMA_DBI_select_db($trg_db, $trg_link); - $src_tables = PMA_DBI_get_tables($src_db, $src_link); - $source_tables_num = sizeof($src_tables); $trg_tables = PMA_DBI_get_tables($trg_db, $trg_link); - $target_tables_num = sizeof($trg_tables); /** * initializing arrays to save table names */ - $unmatched_num_src = 0; $source_tables_uncommon = array(); - $unmatched_num_trg = 0; $target_tables_uncommon = array(); $matching_tables = array(); $matching_tables_num = 0; @@ -367,6 +360,7 @@ function PMA_replication_synchronize_db($db, $src_link, $trg_link, $data = true) $source_indexes = array(); $target_indexes = array(); $add_indexes_array = array(); + $alter_indexes_array = array(); $remove_indexes_array = array(); $criteria = array('Field', 'Type', 'Null', 'Collation', 'Key', 'Default', 'Comment'); @@ -378,17 +372,11 @@ function PMA_replication_synchronize_db($db, $src_link, $trg_link, $data = true) $add_indexes_array, $alter_indexes_array,$remove_indexes_array, $counter); } - $matching_table_data_diff = array(); - $matching_table_structure_diff = array(); - $uncommon_table_structure_diff = array(); - $uncommon_table_data_diff = array(); - $uncommon_tables = $source_tables_uncommon; - /** * Generating Create Table query for all the non-matching tables present in Source but not in Target and populating tables. */ for ($q = 0; $q < sizeof($source_tables_uncommon); $q++) { - if (isset($uncommon_tables[$q])) { + if (isset($source_tables_uncommon[$q])) { PMA_createTargetTables($src_db, $trg_db, $src_link, $trg_link, $source_tables_uncommon, $q, $uncommon_tables_fields, false); } if (isset($row_count[$q]) && $data) { diff --git a/libraries/schema/Pdf_Relation_Schema.class.php b/libraries/schema/Pdf_Relation_Schema.class.php index e74c14d126..ed96efd053 100644 --- a/libraries/schema/Pdf_Relation_Schema.class.php +++ b/libraries/schema/Pdf_Relation_Schema.class.php @@ -923,8 +923,8 @@ class PMA_Pdf_Relation_Schema extends PMA_Export_Relation_Schema $pdf->SetX(10); $pdf->Cell(0, 6, $i . ' ' . $table, 0, 1, 'L', 0, $pdf->PMA_links['doc'][$table]['-']); // $pdf->Ln(1); - $result = PMA_DBI_query('SHOW FIELDS FROM ' . PMA_backquote($table) . ';'); - while ($row = PMA_DBI_fetch_assoc($result)) { + $fields = PMA_DBI_get_columns($GLOBALS['db'], $table); + foreach($fields as $row) { $pdf->SetX(20); $field_name = $row['Field']; $pdf->PMA_links['doc'][$table][$field_name] = $pdf->AddLink(); diff --git a/libraries/schema/User_Schema.class.php b/libraries/schema/User_Schema.class.php index 95d60e127b..41a2b9e6fe 100644 --- a/libraries/schema/User_Schema.class.php +++ b/libraries/schema/User_Schema.class.php @@ -38,7 +38,7 @@ class PMA_User_Schema public function processUserChoice() { - global $action_choose,$db,$cfgRelation,$cfg; + global $action_choose, $db, $cfgRelation; if (isset($this->action)) { switch ($this->action) { @@ -207,7 +207,7 @@ class PMA_User_Schema */ public function showTableDashBoard() { - global $db,$cfgRelation,$table,$cfg,$with_field_names; + global $db, $cfgRelation, $table, $with_field_names; /* * We will need an array of all tables in this db */ @@ -479,7 +479,7 @@ class PMA_User_Schema */ private function _displayScratchboardTables($array_sh_page) { - global $with_field_names,$cfg,$db; + global $with_field_names, $db; ?> @@ -505,22 +505,14 @@ class PMA_User_Schema $reset_draginit .= ' document.edcoord.elements["c_table_' . $i . '[x]"].value = "2"' . "\n"; $reset_draginit .= ' document.edcoord.elements["c_table_' . $i . '[y]"].value = "' . (15 * $i) . '"' . "\n"; - $local_query = 'SHOW FIELDS FROM ' - . PMA_backquote($temp_sh_page['table_name']) - . ' FROM ' . PMA_backquote($db); - $fields_rs = PMA_DBI_query($local_query); - unset($local_query); - $fields_cnt = PMA_DBI_num_rows($fields_rs); - echo '
' . $temp_sh_page['table_name'] . ''; if (isset($with_field_names)) { - while ($row = PMA_DBI_fetch_assoc($fields_rs)) { - echo '
' . htmlspecialchars($row['Field']) . "\n"; + $fields = PMA_DBI_get_columns($db, $temp_sh_page['table_name']); + foreach ($fields as $row) { + echo '
' . htmlspecialchars($row['Field']) . "\n"; } } echo '
' . "\n"; - PMA_DBI_free_result($fields_rs); - unset($fields_rs); $i++; } ?> diff --git a/libraries/sql_query_form.lib.php b/libraries/sql_query_form.lib.php index 542cfc3306..beab95d80b 100644 --- a/libraries/sql_query_form.lib.php +++ b/libraries/sql_query_form.lib.php @@ -213,9 +213,7 @@ function PMA_sqlQueryFormInsert($query = '', $is_querywindow = false, $delimiter // Get the list and number of fields // we do a try_query here, because we could be in the query window, // trying to synchonize and the table has not yet been created - $fields_list = PMA_DBI_fetch_result( - 'SHOW FULL COLUMNS FROM ' . PMA_backquote($db) - . '.' . PMA_backquote($GLOBALS['table'])); + $fields_list = PMA_DBI_get_columns($db, $GLOBALS['table'], true); $tmp_db_link = ''; + .'b_browse.png" alt="' . __('Browse foreign values') . '" title="' + . __('Browse foreign values') . '" />'; - if ($propertiesIconic === 'both') { - $str .= __('Browse foreign values'); - return $str; - } - } else { - return __('Browse foreign values'); - } + if ($propertiesIconic === 'both') { + $str .= __('Browse foreign values'); + } + + return $str; + } else { + return __('Browse foreign values'); + } } - /** - * PMA_tbl_getFields() gets all the fields of a table along with their types,collations and whether null or not. +/** + * Gets all the fields of a table along with their types, collations + * and whether null or not. * - * @uses PMA_DBI_query() - * @uses PMA_backquote() - * @uses PMA_DBI_num_rows() - * @uses PMA_DBI_fetch_assoc() - * @uses PMA_DBI_free_result() - * @uses preg_replace() - * @uses str_replace() - * @uses strncasecmp() - * @uses empty() - * - * @param $db Selected database - * @param $table Selected table - * - * @return array($fields_list,$fields_type,$fields_collation,$fields_null) Array containing the field list, field types, collations and null constatint + * @param string $table Selected table + * @param string $db Selected database * + * @return array Array containing the field list, field types, collations + * and null constraint */ - -function PMA_tbl_getFields($table,$db) { - +function PMA_tbl_getFields($table,$db) +{ // Gets the list and number of fields - - $result = PMA_DBI_query('SHOW FULL FIELDS FROM ' . PMA_backquote($table) . ' FROM ' . PMA_backquote($db) . ';', null, PMA_DBI_QUERY_STORE); - $fields_cnt = PMA_DBI_num_rows($result); + $fields = PMA_DBI_get_columns($db, $table, true); $fields_list = $fields_null = $fields_type = $fields_collation = array(); $geom_column_present = false; $geom_types = PMA_getGISDatatypes(); - while ($row = PMA_DBI_fetch_assoc($result)) { + + foreach ($fields as $row) { $fields_list[] = $row['Field']; $type = $row['Type']; + // check whether table contains geometric columns if (in_array($type, $geom_types)) { $geom_column_present = true; } + // reformat mysql query output if (strncasecmp($type, 'set', 3) == 0 - || strncasecmp($type, 'enum', 4) == 0) { + || strncasecmp($type, 'enum', 4) == 0 + ) { $type = str_replace(',', ', ', $type); } else { - // strip the "BINARY" attribute, except if we find "BINARY(" because // this would be a BINARY or VARBINARY field type if (!preg_match('@BINARY[\(]@i', $type)) { @@ -92,53 +84,49 @@ function PMA_tbl_getFields($table,$db) { } $fields_null[] = $row['Null']; $fields_type[] = $type; - $fields_collation[] = !empty($row['Collation']) && $row['Collation'] != 'NULL' - ? $row['Collation'] - : ''; + $fields_collation[] = ! empty($row['Collation']) && $row['Collation'] != 'NULL' + ? $row['Collation'] + : ''; } // end while - PMA_DBI_free_result($result); - unset($result, $type); - - return array($fields_list,$fields_type,$fields_collation,$fields_null, $geom_column_present); + return array($fields_list, $fields_type, $fields_collation, $fields_null, $geom_column_present); } -/* PMA_tbl_setTableHeader() sets the table header for displaying a table in query-by-example format +/** + * Sets the table header for displaying a table in query-by-example format. * - * @return HTML content, the tags and content for table header + * @param bool $geom_column_present whether a geometry column is present * + * @return HTML content, the tags and content for table header */ - -function PMA_tbl_setTableHeader($geom_column_present = false){ - +function PMA_tbl_setTableHeader($geom_column_present = false) +{ // Display the Function column only if there is alteast one geomety colum $func = ''; if ($geom_column_present) { $func = ''; } -return ' + return '' . $func . ' - + '; - - } -/* PMA_tbl_getSubTabs() returns an array with necessary configrations to create sub-tabs(Table Search and Zoom Search) in the table_select page - * - * @return array $subtabs Array containing configuration (icon,text,link,id,args) of sub-tabs for Table Search and Zoom search +/** + * Returns an array with necessary configrations to create + * sub-tabs(Table Search and Zoom Search) in the table_select page. * + * @return array Array containing configuration (icon, text, link, id, args) + * of sub-tabs for Table Search and Zoom search */ - -function PMA_tbl_getSubTabs(){ - +function PMA_tbl_getSubTabs() +{ $subtabs = array(); - $subtabs['search']['icon'] = 'b_search.png'; $subtabs['search']['text'] = __('Table Search'); $subtabs['search']['link'] = 'tbl_select.php'; @@ -151,74 +139,65 @@ function PMA_tbl_getSubTabs(){ $subtabs['zoom']['id'] = 'zoom_search_id'; return $subtabs; - } - -/* PMA_tbl_getForeignFields_Values() creates the HTML content for: 1) Browsing foreign data for a field. 2) Creating elements for search criteria input on fields. +/** + * Creates the HTML content for: + * 1) Browsing foreign data for a field. + * 2) Creating elements for search criteria input on fields. * - * @uses PMA_foreignDropdown - * @uses PMA_generate_common_url - * @uses isset() - * @uses is_array() - * @uses in_array() - * @uses urlencode() - * @uses str_replace() - * @uses stbstr() - * - * @param $foreigners Array of foreign keys - * @param $foreignData Foreign keys data - * @param $field Column name - * @param $tbl_fields_type Column type - * @param $i Column index - * @param $db Selected database - * @param $table Selected table - * @param $titles Selected title - * @param $foreignMaxLimit Max limit of displaying foreign elements - * @param $fields Array of search criteria inputs - * @param $in_fbs In function based search - * - * @return string $str HTML content for viewing foreing data and elements for search criteria input. + * @param array $foreigners Array of foreign keys + * @param array $foreignData Foreign keys data + * @param string $field Column name + * @param string $tbl_fields_type Column type + * @param int $i Column index + * @param string $db Selected database + * @param string $table Selected table + * @param array $titles Selected title + * @param int $foreignMaxLimit Max limit of displaying foreign elements + * @param array $fields Array of search criteria inputs + * @param bool $in_fbs Whether we are in 'function based search' * + * @return string HTML content for viewing foreing data and elements + * for search criteria input. */ - -function PMA_getForeignFields_Values($foreigners, $foreignData, $field, $tbl_fields_type, $i, $db, $table, $titles, $foreignMaxLimit, $fields, $in_fbs = false){ - +function PMA_getForeignFields_Values($foreigners, $foreignData, $field, $tbl_fields_type, $i, $db, $table, $titles, $foreignMaxLimit, $fields, $in_fbs = false) +{ $str = ''; - if ($foreigners && isset($foreigners[$field]) && is_array($foreignData['disp_row'])) { // f o r e i g n k e y s - $str .= ' ' . "\n"; // go back to first row // here, the 4th parameter is empty because there is no current // value of data for the dropdown (the search page initial values // are displayed empty) - $str .= PMA_foreignDropdown($foreignData['disp_row'], - $foreignData['foreign_field'], - $foreignData['foreign_display'], - '', $foreignMaxLimit); - $str .= ' ' . "\n"; - } - elseif ($foreignData['foreign_link'] == true) { + $str .= PMA_foreignDropdown( + $foreignData['disp_row'], $foreignData['foreign_field'], + $foreignData['foreign_display'], '', $foreignMaxLimit + ); + $str .= '' . "\n"; + + } elseif ($foreignData['foreign_link'] == true) { if(isset($fields[$i]) && is_string($fields[$i])){ - $str .= '' ; + $str .= '' ; } else{ - $str .= '' ; + $str .= '' ; } ?> - '; + '; // ' . str_replace("'", "\'", $titles['Browse']) . ''; // ]] $str .= ''; + } elseif (in_array($tbl_fields_type[$i], PMA_getGISDatatypes())) { // g e o m e t r y $str .= '' . "\n"; - for ($j = 0; $j < $cnt_enum_value; $j++) { - if(isset($fields[$i]) && is_array($fields[$i]) && in_array($enum_value[$j],$fields[$i])){ - $str .= ' '; - } - else{ - $str .= ' '; - } - } // end for - $str .= ' ' . "\n"; - } - else { + .' multiple="multiple" size="' . min(3, $cnt_enum_value) . '">' . "\n"; + + for ($j = 0; $j < $cnt_enum_value; $j++) { + if (isset($fields[$i]) + && is_array($fields[$i]) + && in_array($enum_value[$j], $fields[$i]) + ) { + $str .= ''; + } else { + $str .= ''; + } + } // end for + $str .= '' . "\n"; + + } else { // o t h e r c a s e s $the_class = 'textfield'; $type = $tbl_fields_type[$i]; + if ($type == 'date') { $the_class .= ' datefield'; } elseif ($type == 'datetime' || substr($type, 0, 9) == 'timestamp') { $the_class .= ' datetimefield'; } - if(isset($fields[$i]) && is_string($fields[$i])){ - $str .= ' ' . "\n"; - } - else{ - $str .= ' ' . "\n"; - } - }; - return $str; + if (isset($fields[$i]) && is_string($fields[$i])) { + $str .= '' . "\n"; + } else { + $str .= '' . "\n"; + } + } + return $str; } - -/* PMA_tbl_search_getWhereClause() Return the where clause for query generation based on the inputs provided. +/** + * Return the where clause for query generation based on the inputs provided. * - * @uses PMA_backquote - * @uses PMA_sqlAddslashes - * @uses preg_match - * @uses isset() - * @uses in_array() - * @uses str_replace() - * @uses strpos() - * @uses explode() - * @uses trim() - * - * @param $fields Search criteria input - * @param $names Name of the field(column) on which search criteria is submitted - * @param $types Type of the field - * @param $collations Field collation - * @param $func_type Search fucntion/operator - * @param $unaryFlag Whether operator unary or not - * - * @return string $str HTML content for viewing foreing data and elements for search criteria input. + * @param mixed $fields Search criteria input + * @param string $names Name of the column on which search is submitted + * @param string $types Type of the field + * @param string $collations Field collation + * @param string $func_type Search fucntion/operator + * @param bool $unaryFlag Whether operator unary or not + * @param bool $geom_func Whether geometry functions should be applied * + * @return string HTML content for viewing foreing data and elements + * for search criteria input. */ - -function PMA_tbl_search_getWhereClause($fields, $names, $types, $collations, $func_type, $unaryFlag, $geom_func = null){ - +function PMA_tbl_search_getWhereClause($fields, $names, $types, $collations, $func_type, $unaryFlag, $geom_func = null) +{ /** * @todo move this to a more apropriate place */ @@ -308,7 +283,6 @@ function PMA_tbl_search_getWhereClause($fields, $names, $types, $collations, $fu ); $w = ''; - // If geometry function is set apply it to the field name if ($geom_func != null && trim($geom_func) != '') { // Get details about the geometry fucntions @@ -317,8 +291,8 @@ function PMA_tbl_search_getWhereClause($fields, $names, $types, $collations, $fu // If the function takes a single parameter if ($geom_funcs[$geom_func]['params'] == 1) { $backquoted_name = $geom_func . '(' . PMA_backquote($names) . ')'; - // If the function takes two parameters } else { + // If the function takes two parameters // create gis data from the string $gis_data = PMA_createGISData($fields); @@ -329,7 +303,7 @@ function PMA_tbl_search_getWhereClause($fields, $names, $types, $collations, $fu // New output type is the output type of the function being applied $types = $geom_funcs[$geom_func]['type']; - // If the intended where clause is something like 'IsEmpty(`spatial_col_name`)' + // If the where clause is something like 'IsEmpty(`spatial_col_name`)' if (isset($geom_unary_functions[$geom_func]) && trim($fields) == '') { $w = $backquoted_name; return $w; @@ -338,11 +312,11 @@ function PMA_tbl_search_getWhereClause($fields, $names, $types, $collations, $fu $backquoted_name = PMA_backquote($names); } - if($unaryFlag){ + if ($unaryFlag) { $fields = ''; - $w = $backquoted_name . ' ' . $func_type; + $w = $backquoted_name . ' ' . $func_type; - } elseif (in_array($types, PMA_getGISDatatypes())) { + } elseif (in_array($types, PMA_getGISDatatypes()) && ! empty($fields)) { // create gis data from the string $gis_data = PMA_createGISData($fields); $w = $backquoted_name . ' ' . $func_type . ' ' . $gis_data; @@ -363,23 +337,25 @@ function PMA_tbl_search_getWhereClause($fields, $names, $types, $collations, $fu $parens_open = '('; $parens_close = ')'; - } else { - $parens_open = ''; - $parens_close = ''; - } - $enum_where = '\'' . PMA_sqlAddslashes($fields[0]) . '\''; - for ($e = 1; $e < $enum_selected_count; $e++) { - $enum_where .= ', \'' . PMA_sqlAddslashes($fields[$e]) . '\''; - } + } else { + $parens_open = ''; + $parens_close = ''; + } + $enum_where = '\'' . PMA_sqlAddslashes($fields[0]) . '\''; + for ($e = 1; $e < $enum_selected_count; $e++) { + $enum_where .= ', \'' . PMA_sqlAddslashes($fields[$e]) . '\''; + } - $w = $backquoted_name . ' ' . $func_type . ' ' . $parens_open . $enum_where . $parens_close; + $w = $backquoted_name . ' ' . $func_type . ' ' . $parens_open . $enum_where . $parens_close; } } elseif ($fields != '') { // For these types we quote the value. Even if it's another type (like INT), // for a LIKE we always quote the value. MySQL converts strings to numbers // and numbers to strings as necessary during the comparison - if (preg_match('@char|binary|blob|text|set|date|time|year@i', $types) || strpos(' ' . $func_type, 'LIKE')) { + if (preg_match('@char|binary|blob|text|set|date|time|year@i', $types) + || strpos(' ' . $func_type, 'LIKE') + ) { $quot = '\''; } else { $quot = ''; @@ -395,23 +371,28 @@ function PMA_tbl_search_getWhereClause($fields, $names, $types, $collations, $fu $fields = '^' . $fields . '$'; } - if ($func_type == 'IN (...)' || $func_type == 'NOT IN (...)' || $func_type == 'BETWEEN' || $func_type == 'NOT BETWEEN') { + if ($func_type == 'IN (...)' + || $func_type == 'NOT IN (...)' + || $func_type == 'BETWEEN' + || $func_type == 'NOT BETWEEN' + ) { $func_type = str_replace(' (...)', '', $func_type); - // quote values one by one - $values = explode(',', $fields); - foreach ($values as &$value) - $value = $quot . PMA_sqlAddslashes(trim($value)) . $quot; + // quote values one by one + $values = explode(',', $fields); + foreach ($values as &$value) { + $value = $quot . PMA_sqlAddslashes(trim($value)) . $quot; + } - if ($func_type == 'BETWEEN' || $func_type == 'NOT BETWEEN') - $w = $backquoted_name . ' ' . $func_type . ' ' . (isset($values[0]) ? $values[0] : '') . ' AND ' . (isset($values[1]) ? $values[1] : ''); - else + if ($func_type == 'BETWEEN' || $func_type == 'NOT BETWEEN') { + $w = $backquoted_name . ' ' . $func_type . ' ' . (isset($values[0]) ? $values[0] : '') + . ' AND ' . (isset($values[1]) ? $values[1] : ''); + } else { $w = $backquoted_name . ' ' . $func_type . ' (' . implode(',', $values) . ')'; - } - else { + } + } else { $w = $backquoted_name . ' ' . $func_type . ' ' . $quot . PMA_sqlAddslashes($fields) . $quot;; } - } // end if return $w; @@ -420,14 +401,14 @@ function PMA_tbl_search_getWhereClause($fields, $names, $types, $collations, $fu /** * Formats a SVG plot for the query results. * - * @param array $data Data for the status chart - * @param array &$settings Settings used to generate the chart + * @param array $data Data for the status chart + * @param array &$settings Settings used to generate the chart * * @return string HTML and JS code for the SVG plot */ function PMA_SVG_scatter_plot($data, &$settings) { - require_once './libraries/svg_plot/pma_scatter_plot.php'; + include_once './libraries/svg_plot/pma_scatter_plot.php'; if (empty($data)) { // empty data @@ -444,15 +425,5 @@ function PMA_SVG_scatter_plot($data, &$settings) } return $scatter_plot->asSVG(); } - } - - - - - - - - - ?> diff --git a/libraries/transformations.lib.php b/libraries/transformations.lib.php index a5460ab165..51da6ce993 100644 --- a/libraries/transformations.lib.php +++ b/libraries/transformations.lib.php @@ -19,23 +19,26 @@ * // } * * - * @param string $option_string comma separated options - * @return array options + * @param string $option_string comma separated options + * + * @return array options */ function PMA_transformation_getOptions($option_string) { $result = array(); if (! strlen($option_string) - || ! $transform_options = preg_split('/,/', $option_string)) { + || ! $transform_options = preg_split('/,/', $option_string) + ) { return $result; } while (($option = array_shift($transform_options)) !== null) { $trimmed = trim($option); if (strlen($trimmed) > 1 - && $trimmed[0] == "'" - && $trimmed[strlen($trimmed) - 1] == "'") { + && $trimmed[0] == "'" + && $trimmed[strlen($trimmed) - 1] == "'" + ) { // '...' $option = substr($trimmed, 1, -1); } elseif (isset($trimmed[0]) && $trimmed[0] == "'") { @@ -117,11 +120,13 @@ function PMA_getAvailableMIMEtypes() /** * Gets the mimetypes for all columns of a table * + * @param string $db the name of the db to check for + * @param string $table the name of the table to check for + * @param string $strict whether to include only results having a mimetype set + * * @access public - * @param string $db the name of the db to check for - * @param string $table the name of the table to check for - * @param string $strict whether to include only results having a mimetype set - * @return array [field_name][field_key] = field_value + * + * @return array [field_name][field_key] = field_value */ function PMA_getMIME($db, $table, $strict = false) { @@ -136,7 +141,7 @@ function PMA_getMIME($db, $table, $strict = false) `mimetype`, `transformation`, `transformation_options` - FROM ' . PMA_backquote($cfgRelation['db']) . '.' . PMA_backquote($cfgRelation['column_info']) . ' + FROM ' . PMA_backquote($cfgRelation['db']) . '.' . PMA_backquote($cfgRelation['column_info']) . ' WHERE `db_name` = \'' . PMA_sqlAddSlashes($db) . '\' AND `table_name` = \'' . PMA_sqlAddSlashes($table) . '\' AND ( `mimetype` != \'\'' . (!$strict ? ' @@ -148,14 +153,17 @@ function PMA_getMIME($db, $table, $strict = false) /** * Set a single mimetype to a certain value. * + * @param string $db the name of the db + * @param string $table the name of the table + * @param string $key the name of the column + * @param string $mimetype the mimetype of the column + * @param string $transformation the transformation of the column + * @param string $transformation_options the transformation options of the column + * @param string $forcedelete force delete, will erase any existing + * comments for this column + * * @access public - * @param string $db the name of the db - * @param string $table the name of the table - * @param string $key the name of the column - * @param string $mimetype the mimetype of the column - * @param string $transformation the transformation of the column - * @param string $transformation_options the transformation options of the column - * @param string $forcedelete force delete, will erase any existing comments for this column + * * @return boolean true, if comment-query was made. */ function PMA_setMIME($db, $table, $key, $mimetype, $transformation, @@ -181,8 +189,9 @@ function PMA_setMIME($db, $table, $key, $mimetype, $transformation, PMA_DBI_free_result($test_rs); if (! $forcedelete - && (strlen($mimetype) || strlen($transformation) - || strlen($transformation_options) || strlen($row['comment']))) { + && (strlen($mimetype) || strlen($transformation) + || strlen($transformation_options) || strlen($row['comment'])) + ) { $upd_query = ' UPDATE ' . PMA_backquote($cfgRelation['db']) . '.' . PMA_backquote($cfgRelation['column_info']) . ' SET `mimetype` = \'' . PMA_sqlAddSlashes($mimetype) . '\', diff --git a/libraries/url_generating.lib.php b/libraries/url_generating.lib.php index e3cc02a215..388412520a 100644 --- a/libraries/url_generating.lib.php +++ b/libraries/url_generating.lib.php @@ -9,13 +9,14 @@ /** * Generates text with hidden inputs. * - * @see PMA_generate_common_url() - * @param string optional database name - * (can also be an array of parameters) - * @param string optional table name - * @param int indenting level - * @param string do not generate a hidden field for this parameter - * (can be an array of strings) + * @param string $db optional database name + * (can also be an array of parameters) + * @param string $table optional table name + * @param int $indent indenting level + * @param string $skip do not generate a hidden field for this parameter + * (can be an array of strings) + * + * @see PMA_generate_common_url() * * @return string string with input fields * @@ -27,7 +28,6 @@ * @global boolean whether recoding is allowed or not * * @access public - * */ function PMA_generate_common_hidden_inputs($db = '', $table = '', $indent = 0, $skip = array()) { @@ -48,15 +48,16 @@ function PMA_generate_common_hidden_inputs($db = '', $table = '', $indent = 0, $ } if (! empty($GLOBALS['server']) - && $GLOBALS['server'] != $GLOBALS['cfg']['ServerDefault']) { + && $GLOBALS['server'] != $GLOBALS['cfg']['ServerDefault'] + ) { $params['server'] = $GLOBALS['server']; } - if (empty($_COOKIE['pma_lang']) - && ! empty($GLOBALS['lang'])) { + if (empty($_COOKIE['pma_lang']) && ! empty($GLOBALS['lang'])) { $params['lang'] = $GLOBALS['lang']; } if (empty($_COOKIE['pma_collation_connection']) - && ! empty($GLOBALS['collation_connection'])) { + && ! empty($GLOBALS['collation_connection']) + ) { $params['collation_connection'] = $GLOBALS['collation_connection']; } @@ -102,8 +103,9 @@ function PMA_generate_common_hidden_inputs($db = '', $table = '', $indent = 0, $ * * * - * @param array $values - * @param string $pre + * @param array $values hidden values + * @param string $pre prefix + * * @return string form fields of type hidden */ function PMA_getHiddenFields($values, $pre = '') @@ -160,19 +162,20 @@ function PMA_getHiddenFields($values, $pre = '') * // script.php?server=1&lang=en * * - * @param mixed assoc. array with url params or optional string with database name - * if first param is an array there is also an ? prefixed to the url + * @param mixed assoc. array with url params or optional string with database name + * if first param is an array there is also an ? prefixed to the url * - * @param string - if first param is array: 'html' to use htmlspecialchars() - * on the resulting URL (for a normal URL displayed in HTML) - * or something else to avoid using htmlspecialchars() (for - * a URL sent via a header); if not set,'html' is assumed - * - if first param is not array: optional table name + * @param string - if first param is array: 'html' to use htmlspecialchars() + * on the resulting URL (for a normal URL displayed in HTML) + * or something else to avoid using htmlspecialchars() (for + * a URL sent via a header); if not set,'html' is assumed + * - if first param is not array: optional table name + * + * @param string - if first param is array: optional character to + * use instead of '?' + * - if first param is not array: optional character to use + * instead of '&' for dividing URL parameters * - * @param string - if first param is array: optional character to - * use instead of '?' - * - if first param is not array: optional character to use - * instead of '&' for dividing URL parameters * @return string string with URL parameters * @access public */ @@ -219,17 +222,18 @@ function PMA_generate_common_url() if (isset($GLOBALS['server']) && $GLOBALS['server'] != $GLOBALS['cfg']['ServerDefault'] - // avoid overwriting when creating navi panel links to servers - && ! isset($params['server'])) { + // avoid overwriting when creating navi panel links to servers + && ! isset($params['server']) + ) { $params['server'] = $GLOBALS['server']; } - if (empty($_COOKIE['pma_lang']) - && ! empty($GLOBALS['lang'])) { + if (empty($_COOKIE['pma_lang']) && ! empty($GLOBALS['lang'])) { $params['lang'] = $GLOBALS['lang']; } if (empty($_COOKIE['pma_collation_connection']) - && ! empty($GLOBALS['collation_connection'])) { + && ! empty($GLOBALS['collation_connection']) + ) { $params['collation_connection'] = $GLOBALS['collation_connection']; } @@ -256,7 +260,9 @@ function PMA_generate_common_url() * extracted from arg_separator.input as set in php.ini * we do not use arg_separator.output to avoid problems with & and & * - * @param string whether to encode separator or not, currently 'none' or 'html' + * @param string $encode whether to encode separator or not, + * currently 'none' or 'html' + * * @return string character used for separating url parts usally ; or & * @access public */ @@ -278,13 +284,13 @@ function PMA_get_arg_separator($encode = 'none') } switch ($encode) { - case 'html': - return htmlentities($separator); - break; - case 'text' : - case 'none' : - default : - return $separator; + case 'html': + return htmlentities($separator); + break; + case 'text' : + case 'none' : + default : + return $separator; } } diff --git a/libraries/user_preferences.inc.php b/libraries/user_preferences.inc.php index 1b042171cf..8295100e30 100644 --- a/libraries/user_preferences.inc.php +++ b/libraries/user_preferences.inc.php @@ -27,9 +27,12 @@ $tabs_icons = array( 'Import' => 'ic_b_import', 'Export' => 'ic_b_export'); echo '
    '; -echo PMA_generate_html_tab(array( - 'link' => 'prefs_manage.php', - 'text' => __('Manage your settings'))) . "\n"; +echo PMA_generate_html_tab( + array( + 'link' => 'prefs_manage.php', + 'text' => __('Manage your settings') + ) +) . "\n"; echo '
  •    
  • ' . "\n"; $script_name = basename($GLOBALS['PMA_PHP_SELF']); foreach (array_keys($forms) as $formset) { diff --git a/libraries/user_preferences.lib.php b/libraries/user_preferences.lib.php index 2246a4df8f..84ca5c4fd8 100644 --- a/libraries/user_preferences.lib.php +++ b/libraries/user_preferences.lib.php @@ -16,9 +16,12 @@ function PMA_userprefs_pageinit() $cf = ConfigFile::getInstance(); $cf->resetConfigData(); // start with a clean instance $cf->setAllowedKeys($forms_all_keys); - $cf->setCfgUpdateReadMapping(array( - 'Server/hide_db' => 'Servers/1/hide_db', - 'Server/only_db' => 'Servers/1/only_db')); + $cf->setCfgUpdateReadMapping( + array( + 'Server/hide_db' => 'Servers/1/hide_db', + 'Server/only_db' => 'Servers/1/only_db' + ) + ); $cf->updateWithGlobalConfig($GLOBALS['cfg']); } @@ -64,7 +67,8 @@ function PMA_load_userprefs() /** * Saves user preferences * - * @param array $config_data + * @param array $config_array configuration array + * * @return true|PMA_Message */ function PMA_save_userprefs(array $config_array) @@ -80,7 +84,7 @@ function PMA_save_userprefs(array $config_array) 'db' => $config_array, 'ts' => time()); if (isset($_SESSION['cache'][$cache_key]['userprefs'])) { - unset($_SESSION['cache'][$cache_key]['userprefs']); + unset($_SESSION['cache'][$cache_key]['userprefs']); } return true; } @@ -122,6 +126,7 @@ function PMA_save_userprefs(array $config_array) * (blacklist) and keys from user preferences form (whitelist) * * @param array $config_data path => value pairs + * * @return array */ function PMA_apply_userprefs(array $config_data) @@ -155,6 +160,7 @@ function PMA_apply_userprefs(array $config_data) * Reads user preferences field names * * @param array|null $forms + * * @return array */ function PMA_read_userprefs_fieldnames(array $forms = null) @@ -185,8 +191,10 @@ function PMA_read_userprefs_fieldnames(array $forms = null) * * No validation is done! * - * @param string $cfg_name - * @param mixed $value + * @param string $path configuration + * @param mixed $value value + * @param mixed $default_value default value + * * @return void */ function PMA_persist_option($path, $value, $default_value) @@ -222,12 +230,16 @@ function PMA_userprefs_redirect(array $forms, array $old_settings, $file_name, $ ? $old_settings['config_data'] : array(); $new_settings = ConfigFile::getInstance()->getConfigArray(); - $diff_keys = array_keys(array_diff_assoc($old_settings, $new_settings) - + array_diff_assoc($new_settings, $old_settings)); + $diff_keys = array_keys( + array_diff_assoc($old_settings, $new_settings) + + array_diff_assoc($new_settings, $old_settings) + ); $check_keys = array('NaturalOrder', 'MainPageIconic', 'DefaultTabDatabase', 'Server/hide_db', 'Server/only_db'); - $check_keys = array_merge($check_keys, $forms['Left_frame']['Left_frame'], - $forms['Left_frame']['Left_databases']); + $check_keys = array_merge( + $check_keys, $forms['Left_frame']['Left_frame'], + $forms['Left_frame']['Left_databases'] + ); $diff = array_intersect($check_keys, $diff_keys); $reload_left_frame = !empty($diff); } @@ -242,8 +254,10 @@ function PMA_userprefs_redirect(array $forms, array $old_settings, $file_name, $ if ($hash) { $hash = '#' . urlencode($hash); } - PMA_sendHeaderLocation($GLOBALS['cfg']['PmaAbsoluteUri'] . $file_name - . PMA_generate_common_url($url_params, '&') . $hash); + PMA_sendHeaderLocation( + $GLOBALS['cfg']['PmaAbsoluteUri'] . $file_name + . PMA_generate_common_url($url_params, '&') . $hash + ); } /** diff --git a/libraries/zip.lib.php b/libraries/zip.lib.php index 9208e93726..f8b58782f4 100644 --- a/libraries/zip.lib.php +++ b/libraries/zip.lib.php @@ -62,8 +62,11 @@ class zipfile * "echo $zipfile;" command * * @access public + * + * @return nothing */ - function setDoWrite() { + function setDoWrite() + { $this -> doWrite = true; } // end of the 'setDoWrite()' method @@ -71,13 +74,14 @@ class zipfile * Converts an Unix timestamp to a four byte DOS date and time format (date * in high two bytes, time in low two bytes allowing magnitude comparison). * - * @param integer the current Unix timestamp + * @param integer $unixtime the current Unix timestamp * - * @return integer the current date in a four byte DOS format + * @return integer the current date in a four byte DOS format * * @access private */ - function unix2DosTime($unixtime = 0) { + function unix2DosTime($unixtime = 0) + { $timearray = ($unixtime == 0) ? getdate() : getdate($unixtime); if ($timearray['year'] < 1980) { @@ -97,17 +101,19 @@ class zipfile /** * Adds "file" to archive * - * @param string file contents - * @param string name of the file in the archive (may contains the path) - * @param integer the current timestamp + * @param string $data file contents + * @param string $name name of the file in the archive (may contains the path) + * @param integer $time the current timestamp * * @access public + * + * @return nothing */ function addFile($data, $name, $time = 0) { $name = str_replace('\\', '/', $name); - $dtime = substr( "00000000" . dechex($this->unix2DosTime($time)), -8); + $dtime = substr("00000000" . dechex($this->unix2DosTime($time)), -8); $hexdtime = '\x' . $dtime[6] . $dtime[7] . '\x' . $dtime[4] . $dtime[5] . '\x' . $dtime[2] . $dtime[3] diff --git a/libraries/zip_extension.lib.php b/libraries/zip_extension.lib.php index 7bfa84875f..9aa2758df9 100644 --- a/libraries/zip_extension.lib.php +++ b/libraries/zip_extension.lib.php @@ -7,13 +7,14 @@ */ /** - * Gets zip file contents - * - * @param string $specific_entry regular expression to match a file - * @return array ($error_message, $file_data); $error_message - * is empty if no error - */ - + * Gets zip file contents + * + * @param string $file zip file + * @param string $specific_entry regular expression to match a file + * + * @return array ($error_message, $file_data); $error_message + * is empty if no error + */ function PMA_getZipContents($file, $specific_entry = null) { $error_message = ''; @@ -77,6 +78,8 @@ function PMA_getZipContents($file, $specific_entry = null) * * @param string $file_regexp regular expression for the file name to match * @param string $file zip archive + * + * @return string the file name of the first file that matches the given regexp */ function PMA_findFileFromZipArchive ($file_regexp, $file) { @@ -100,7 +103,9 @@ function PMA_findFileFromZipArchive ($file_regexp, $file) /** * Returns the number of files in the zip archive. * - * @param string $file + * @param string $file zip archive + * + * @return int the number of files in the zip archive */ function PMA_getNoOfFilesInZip($file) { @@ -121,11 +126,14 @@ function PMA_getNoOfFilesInZip($file) /** * Extracts a set of files from the given zip archive to a given destinations. * - * @param string $zip_path - * @param string $destination - * @param array $entries + * @param string $zip_path path to the zip archive + * @param string $destination destination to extract files + * @param array $entries files in archive that should be extracted + * + * @return bool true on sucess, false otherwise */ -function PMA_zipExtract($zip_path, $destination, $entries) { +function PMA_zipExtract($zip_path, $destination, $entries) +{ $zip = new ZipArchive; if ($zip->open($zip_path) === true) { $zip->extractTo($destination, $entries); @@ -138,30 +146,31 @@ function PMA_zipExtract($zip_path, $destination, $entries) { /** * Gets zip error message * - * @param integer error code - * @return string error message + * @param integer $code error code + * + * @return string error message */ function PMA_getZipError($code) { // I don't think this needs translation switch ($code) { - case ZIPARCHIVE::ER_MULTIDISK: - $message = 'Multi-disk zip archives not supported'; - break; - case ZIPARCHIVE::ER_READ: - $message = 'Read error'; - break; - case ZIPARCHIVE::ER_CRC: - $message = 'CRC error'; - break; - case ZIPARCHIVE::ER_NOZIP: - $message = 'Not a zip archive'; - break; - case ZIPARCHIVE::ER_INCONS: - $message = 'Zip archive inconsistent'; - break; - default: - $message = $code; + case ZIPARCHIVE::ER_MULTIDISK: + $message = 'Multi-disk zip archives not supported'; + break; + case ZIPARCHIVE::ER_READ: + $message = 'Read error'; + break; + case ZIPARCHIVE::ER_CRC: + $message = 'CRC error'; + break; + case ZIPARCHIVE::ER_NOZIP: + $message = 'Not a zip archive'; + break; + case ZIPARCHIVE::ER_INCONS: + $message = 'Zip archive inconsistent'; + break; + default: + $message = $code; } return $message; } diff --git a/pmd_display_field.php b/pmd_display_field.php index 0e51cd70c3..9f8291200e 100644 --- a/pmd_display_field.php +++ b/pmd_display_field.php @@ -7,7 +7,7 @@ /** * */ -include_once 'pmd_common.php'; +include_once './libraries/pmd_common.php'; $table = $T; diff --git a/pmd_general.php b/pmd_general.php index be504ac8b5..cf8d842d69 100644 --- a/pmd_general.php +++ b/pmd_general.php @@ -7,7 +7,9 @@ /** * */ -require_once "./pmd_common.php"; +require_once './libraries/pmd_common.php'; +require './libraries/db_common.inc.php'; +require './libraries/db_info.inc.php'; $tab_column = get_tab_info(); $script_tabs = get_script_tabs(); @@ -15,19 +17,7 @@ $script_contr = get_script_contr(); $tab_pos = get_tab_pos(); $tables_pk_or_unique_keys = get_pk_or_unique_keys(); $tables_all_keys = get_all_keys(); -$hidden = "hidden"; -?> - - - - - - - - Designer - $GLOBALS['lang']); if (isset($GLOBALS['db'])) { $params['db'] = $GLOBALS['db']; @@ -88,7 +78,7 @@ echo $script_tabs . $script_contr . $script_display_field; /> -
    - -
    - -
@@ -185,6 +174,8 @@ for ($i = 0; $i < $name_cnt; $i++) { + + ]" type="hidden" id="t_v__" /> -
' + + '
' . __('Function') . '
' . __('Column') . ' ' . __('Type') . ' ' . __('Collation') . ' ' . __('Operator') . ' ' . __('Value') . '
');">
px; top: px; @@ -246,7 +237,10 @@ for ($i = 0; $i < count($GLOBALS['PMD']["TABLE_NAME"]); $i++) { > + > -
-
Load...
+
+ -
@@ -386,7 +380,7 @@ for ($i = 0; $i < count($GLOBALS['PMD']["TABLE_NAME"]); $i++) { value="" onclick="New_relation()" /> + onclick="document.getElementById('layer_new_relation').style.display = 'none';" /> @@ -402,7 +396,7 @@ for ($i = 0; $i < count($GLOBALS['PMD']["TABLE_NAME"]); $i++) {
- @@ -423,7 +417,7 @@ for ($i = 0; $i < count($GLOBALS['PMD']["TABLE_NAME"]); $i++) { onclick="Upd_relation()" value="" /> + onclick="document.getElementById('layer_upd_relation').style.display = 'none'; Re_load();" />
@@ -437,7 +431,7 @@ for ($i = 0; $i < count($GLOBALS['PMD']["TABLE_NAME"]); $i++) { - @@ -559,7 +553,7 @@ for ($i = 0; $i < count($GLOBALS['PMD']["TABLE_NAME"]); $i++) {
- @@ -591,7 +585,7 @@ for ($i = 0; $i < count($GLOBALS['PMD']["TABLE_NAME"]); $i++) { value="" onclick="edit('Rename')" /> + onclick="document.getElementById('query_rename_to').style.display = 'none';" /> @@ -607,7 +601,7 @@ for ($i = 0; $i < count($GLOBALS['PMD']["TABLE_NAME"]); $i++) {
- @@ -667,7 +661,7 @@ for ($i = 0; $i < count($GLOBALS['PMD']["TABLE_NAME"]); $i++) { value="" onclick="edit('Having')" /> + onclick="document.getElementById('query_having').style.display = 'none';" /> @@ -683,7 +677,7 @@ for ($i = 0; $i < count($GLOBALS['PMD']["TABLE_NAME"]); $i++) {
- @@ -721,7 +715,7 @@ for ($i = 0; $i < count($GLOBALS['PMD']["TABLE_NAME"]); $i++) { value="" onclick="edit('Aggregate')" /> + onclick="document.getElementById('query_Aggregate').style.display = 'none';" /> @@ -737,7 +731,7 @@ for ($i = 0; $i < count($GLOBALS['PMD']["TABLE_NAME"]); $i++) {
- @@ -784,7 +778,7 @@ for ($i = 0; $i < count($GLOBALS['PMD']["TABLE_NAME"]); $i++) { value="" onclick="edit('Where')" /> + onclick="document.getElementById('query_where').style.display = 'none';" /> diff --git a/pmd_help.php b/pmd_help.php deleted file mode 100644 index f653b14bbb..0000000000 --- a/pmd_help.php +++ /dev/null @@ -1,27 +0,0 @@ - - - - - -Designer - - - -' . __('To select relation, click :') . '
'; - echo '

'; - echo '

' . __('The display column is shown in pink. To set/unset a column as the display column, click the "Choose column to display" icon, then click on the appropriate column name.') . '

'; -?> - - diff --git a/pmd_pdf.php b/pmd_pdf.php index adf5fac13d..2afe131a66 100644 --- a/pmd_pdf.php +++ b/pmd_pdf.php @@ -5,7 +5,7 @@ * @package phpMyAdmin-Designer */ -include_once 'pmd_common.php'; +include_once './libraries/pmd_common.php'; /** * If called directly from the designer, first save the positions diff --git a/pmd_relation_new.php b/pmd_relation_new.php index a104cc119c..fbd624631b 100644 --- a/pmd_relation_new.php +++ b/pmd_relation_new.php @@ -8,7 +8,7 @@ /** * */ -include_once 'pmd_common.php'; +include_once './libraries/pmd_common.php'; $die_save_pos = 0; include_once 'pmd_save_pos.php'; extract($_POST, EXTR_SKIP); diff --git a/pmd_relation_upd.php b/pmd_relation_upd.php index 58c9135cce..7151cf7563 100644 --- a/pmd_relation_upd.php +++ b/pmd_relation_upd.php @@ -8,7 +8,7 @@ /** * */ -include_once 'pmd_common.php'; +include_once './libraries/pmd_common.php'; extract($_POST, EXTR_SKIP); extract($_GET, EXTR_SKIP); $die_save_pos = 0; diff --git a/pmd_save_pos.php b/pmd_save_pos.php index c487ddb1ce..1a071aff8c 100644 --- a/pmd_save_pos.php +++ b/pmd_save_pos.php @@ -8,7 +8,7 @@ /** * */ -include_once 'pmd_common.php'; +include_once './libraries/pmd_common.php'; $cfgRelation = PMA_getRelationsParam(); diff --git a/po/bg.po b/po/bg.po index 0d170e6ed6..da6966a965 100644 --- a/po/bg.po +++ b/po/bg.po @@ -4,7 +4,7 @@ msgstr "" "Project-Id-Version: phpMyAdmin 3.5.0-dev\n" "Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\n" "POT-Creation-Date: 2011-08-17 16:58+0200\n" -"PO-Revision-Date: 2011-07-19 14:58+0200\n" +"PO-Revision-Date: 2011-08-18 14:54+0200\n" "Last-Translator: \n" "Language-Team: bulgarian \n" "Language: bg\n" @@ -6206,7 +6206,7 @@ msgstr "" #: libraries/export/sql.php:174 #, php-format msgid "Add %s statement" -msgstr "Ново заявление %s" +msgstr "Добавяне на заявление %s" #: libraries/export/sql.php:152 msgid "Add statements:" diff --git a/po/br.po b/po/br.po index 7701946651..8e3b8cdb09 100644 --- a/po/br.po +++ b/po/br.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: phpMyAdmin 3.5.0-dev\n" "Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\n" "POT-Creation-Date: 2011-08-17 16:58+0200\n" -"PO-Revision-Date: 2011-08-10 22:33+0200\n" +"PO-Revision-Date: 2011-08-18 20:10+0200\n" "Last-Translator: Fulup \n" "Language-Team: LANGUAGE \n" "Language: br\n" @@ -856,14 +856,14 @@ msgid "Dump has been saved to file %s." msgstr "Enrollet eo bet ar restr ezporzhiañ e%s." #: gis_data_editor.php:84 -#, fuzzy, php-format +#, php-format #| msgid "Values for the column \"%s\"" msgid "Value for the column \"%s\"" -msgstr "Talvoudoù evit ar bann \"%s\"" +msgstr "Talvoud evit ar bann \"%s\"" #: gis_data_editor.php:113 tbl_gis_visualization.php:172 msgid "Use OpenStreetMaps as Base Layer" -msgstr "" +msgstr "Ober gant OpenStreetMaps evit ar gwiskad diazez" #: gis_data_editor.php:134 msgid "SRID" @@ -872,29 +872,28 @@ msgstr "" #: gis_data_editor.php:151 js/messages.php:289 #: libraries/display_tbl.lib.php:663 msgid "Geometry" -msgstr "" +msgstr "Mentoniezh" #: gis_data_editor.php:172 gis_data_editor.php:194 gis_data_editor.php:240 #: gis_data_editor.php:290 js/messages.php:286 msgid "Point" -msgstr "" +msgstr "Poent" #: gis_data_editor.php:173 gis_data_editor.php:195 gis_data_editor.php:241 #: gis_data_editor.php:291 js/messages.php:284 msgid "X" -msgstr "" +msgstr "X" #: gis_data_editor.php:175 gis_data_editor.php:197 gis_data_editor.php:243 #: gis_data_editor.php:293 js/messages.php:285 msgid "Y" -msgstr "" +msgstr "Y" #: gis_data_editor.php:202 gis_data_editor.php:246 gis_data_editor.php:296 #: js/messages.php:292 -#, fuzzy #| msgid "Add constraints" msgid "Add a point" -msgstr "Ouzhpennañ ar strishadurioù" +msgstr "Ouzhpennañ ur poent" #: gis_data_editor.php:218 js/messages.php:287 #, fuzzy @@ -922,17 +921,16 @@ msgstr "" #: gis_data_editor.php:262 js/messages.php:288 msgid "Polygon" -msgstr "" +msgstr "Lieskorneg" #: gis_data_editor.php:300 js/messages.php:294 msgid "Add a polygon" -msgstr "" +msgstr "Ouzhpennañ ul lieskorneg" #: gis_data_editor.php:304 -#, fuzzy #| msgid "Add user" msgid "Add geometry" -msgstr "Ouzhpennañ un implijer" +msgstr "Ouzhpennañ mentoniezh" #: gis_data_editor.php:312 msgid "" @@ -1172,7 +1170,7 @@ msgstr "Udb all" #. l10n: Thousands separator #: js/messages.php:75 libraries/common.lib.php:1359 msgid "," -msgstr "" +msgstr " " #. l10n: Decimal separator #: js/messages.php:77 libraries/common.lib.php:1361 @@ -1232,18 +1230,17 @@ msgid "" msgstr "" #: js/messages.php:96 -#, fuzzy #| msgid "Tracking is not active." msgid "Query cache efficiency" -msgstr "N'eo ket oberiant an heuliañ." +msgstr "Efeduster ar grubuilh rekedoù" #: js/messages.php:97 po/advisory_rules.php:70 msgid "Query cache usage" -msgstr "" +msgstr "Implij ar grubuilh rekedoù" #: js/messages.php:98 msgid "Query cache used" -msgstr "" +msgstr "Krubuilh rekedoù implijet" #: js/messages.php:100 msgid "System CPU Usage" @@ -1403,45 +1400,49 @@ msgstr "" #: js/messages.php:143 #, php-format msgid "long_query_time is set to %d second(s)." -msgstr "" +msgstr "Reizhet eo bet long_query_time da %d eilenn." #: js/messages.php:144 msgid "" "Following settings will be applied globally and reset to default on server " "restart:" msgstr "" +"Lakaet e vo e pleustr dre-vras ar reizhadurioù da-heul hag adlakaet e vint " +"d'an talvoud dre ziouer pa adloc'ho ar servijer :" #. l10n: %s is FILE or TABLE #: js/messages.php:146 #, php-format msgid "Set log_output to %s" -msgstr "" +msgstr "Reizhañ log_output da %s" #. l10n: Enable in this context means setting a status variable to ON #: js/messages.php:148 -#, fuzzy, php-format +#, php-format #| msgid "Enable Ajax" msgid "Enable %s" -msgstr "Gweredekaat Ajax" +msgstr "Gweredekaat %s" #. l10n: Disable in this context means setting a status variable to OFF #: js/messages.php:150 -#, fuzzy, php-format +#, php-format #| msgid "Disabled" msgid "Disable %s" -msgstr "Diweredekaet" +msgstr "Diweredekaat %s" #. l10n: %d seconds #: js/messages.php:152 #, php-format msgid "Set long_query_time to %ds" -msgstr "" +msgstr "Reizhañ long_query_time da %ds" #: js/messages.php:153 msgid "" "You can't change these variables. Please log in as root or contact your " "database administrator." msgstr "" +"N'hallit ket cheñch an arventennoù-mañ. Kevreit dindan root pe kit e " +"darempred gant merour ar servijer." #: js/messages.php:154 #, fuzzy diff --git a/po/de.po b/po/de.po index 3286d5c0a6..1727775465 100644 --- a/po/de.po +++ b/po/de.po @@ -4,8 +4,8 @@ msgstr "" "Project-Id-Version: phpMyAdmin 3.5.0-dev\n" "Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\n" "POT-Creation-Date: 2011-08-17 16:58+0200\n" -"PO-Revision-Date: 2011-08-17 13:24+0200\n" -"Last-Translator: \n" +"PO-Revision-Date: 2011-08-18 18:36+0200\n" +"Last-Translator: Sven Strickroth \n" "Language-Team: german \n" "Language: de\n" "MIME-Version: 1.0\n" @@ -854,65 +854,69 @@ msgid "Dump has been saved to file %s." msgstr "Dump wurde in Datei %s gespeichert." #: gis_data_editor.php:84 -#, fuzzy, php-format +#, php-format #| msgid "Values for the column \"%s\"" msgid "Value for the column \"%s\"" -msgstr "Werte für die Spalte \"%s\"" +msgstr "Wert für die Spalte \"%s\"" #: gis_data_editor.php:113 tbl_gis_visualization.php:172 msgid "Use OpenStreetMaps as Base Layer" msgstr "Verwende OpenStreetMaps als Basis-Layer" #: gis_data_editor.php:134 +#, fuzzy msgid "SRID" -msgstr "" +msgstr "SRID" #: gis_data_editor.php:151 js/messages.php:289 #: libraries/display_tbl.lib.php:663 msgid "Geometry" -msgstr "Gestaltung" +msgstr "Geometrie" #: gis_data_editor.php:172 gis_data_editor.php:194 gis_data_editor.php:240 #: gis_data_editor.php:290 js/messages.php:286 msgid "Point" -msgstr "" +msgstr "Punkt" #: gis_data_editor.php:173 gis_data_editor.php:195 gis_data_editor.php:241 #: gis_data_editor.php:291 js/messages.php:284 msgid "X" -msgstr "" +msgstr "X" #: gis_data_editor.php:175 gis_data_editor.php:197 gis_data_editor.php:243 #: gis_data_editor.php:293 js/messages.php:285 msgid "Y" -msgstr "" +msgstr "Y" #: gis_data_editor.php:202 gis_data_editor.php:246 gis_data_editor.php:296 #: js/messages.php:292 -#, fuzzy #| msgid "Add routine" msgid "Add a point" -msgstr "Prozedur hinzufügen" +msgstr "Punkt hinzufügen" #: gis_data_editor.php:218 js/messages.php:287 #, fuzzy #| msgid "Lines terminated by" msgid "Linestring" -msgstr "Zeilen getrennt mit" +msgstr "Linestring" +# ist hiermit der Umkreis gemeint? http://de.wikipedia.org/wiki/Umkreis #: gis_data_editor.php:221 gis_data_editor.php:275 +#, fuzzy msgid "Outer Ring:" -msgstr "" +msgstr "Außenring:" +# Ist hiermit der Inkreis gemeint? http://de.wikipedia.org/wiki/Inkreis #: gis_data_editor.php:223 gis_data_editor.php:277 js/messages.php:290 +#, fuzzy msgid "Inner Ring" -msgstr "" +msgstr "Innenring:" #: gis_data_editor.php:248 #, fuzzy #| msgid "Add a new User" msgid "Add a linestring" -msgstr "Neuen Benutzer hinzufügen" +msgstr "Linestring hinzufügen" #: gis_data_editor.php:248 gis_data_editor.php:298 js/messages.php:293 #, fuzzy @@ -922,19 +926,18 @@ msgstr "Neuen Benutzer hinzufügen" #: gis_data_editor.php:262 js/messages.php:288 msgid "Polygon" -msgstr "" +msgstr "Polygon" #: gis_data_editor.php:300 js/messages.php:294 -#, fuzzy #| msgid "Add column" msgid "Add a polygon" -msgstr "Spalte hinzufügen" +msgstr "Polygon hinzufügen" #: gis_data_editor.php:304 #, fuzzy #| msgid "Geometry" msgid "Add geometry" -msgstr "Gestaltung" +msgstr "Geometrie hinzufügen" #: gis_data_editor.php:312 msgid "" @@ -1785,15 +1788,15 @@ msgstr "Jeder Punkt stellt eine Datenreihe dar" #: js/messages.php:266 msgid "Hovering over a point will show its label." -msgstr "" +msgstr "Das Überfliegen eines Punktes zeigt seine Bezeichnung." #: js/messages.php:268 msgid "Drag and select an area in the plot to zoom into it." -msgstr "" +msgstr "Mit gedrückter Maustaste eine Fläche aufziehen um hineinzuzoomen." #: js/messages.php:270 msgid "Click reset zoom link to come back to original state." -msgstr "" +msgstr "Auf \"Zoom zurücksetzen\" klicken um zum Original zurückzukehren." #: js/messages.php:272 msgid "Click a data point to view and possibly edit the data row." @@ -1809,13 +1812,12 @@ msgstr "" #: js/messages.php:276 msgid "Strings are converted into integer for plotting" -msgstr "" +msgstr "Zeichenketten werden für die Zeichnung in Integerwerte umgewandelt." #: js/messages.php:278 -#, fuzzy #| msgid "Add/Delete columns" msgid "Select two columns" -msgstr "Spalten hinzufügen/entfernen" +msgstr "Zwei Spalten auswählen" #: js/messages.php:279 msgid "Select two different columns" @@ -1832,7 +1834,7 @@ msgstr "Kopieren" #: js/messages.php:291 msgid "Outer Ring" -msgstr "" +msgstr "Aussenring" #: js/messages.php:297 msgid "Add columns" @@ -1906,12 +1908,13 @@ msgstr "" msgid "" "You can also edit most columns
by clicking directly on their content." msgstr "" +"Sie können die meisten Spalten bearbeiten
indem Sie auf den Inhalt " +"klicken." #: js/messages.php:319 -#, fuzzy #| msgid "Go to view" msgid "Go to link" -msgstr "Gehe zum View" +msgstr "Gehe zur Verknüpfung" #: js/messages.php:322 msgid "Generate password" @@ -4957,16 +4960,14 @@ msgid "Show function fields" msgstr "Funktionsfelder anzeigen" #: libraries/config/messages.inc.php:462 -#, fuzzy #| msgid "Where to show the table row links" msgid "Whether to show hint or not" -msgstr "Wo die Datensatz-Links angezeigt werden sollen" +msgstr "Hinweise anzeigen" #: libraries/config/messages.inc.php:463 -#, fuzzy #| msgid "Show indexes" msgid "Show hint" -msgstr "Indexes anzeigen" +msgstr "Hinweis anzeigen" #: libraries/config/messages.inc.php:464 msgid "" @@ -6788,10 +6789,9 @@ msgid "MySQL Spatial Extension does not support ESRI type \"%s\"." msgstr "" #: libraries/import/shp.php:350 -#, fuzzy #| msgid "This page does not contain any tables!" msgid "The imported file does not contain any data" -msgstr "Diese Seite enthält keine Tabellen!" +msgstr "Die importierte Datei enthält keine Daten" #: libraries/import/sql.php:33 msgid "SQL compatibility mode:" @@ -7322,7 +7322,7 @@ msgstr "Abfrage ausführen" #| msgid "Start" msgctxt "Start of recurring event" msgid "Start" -msgstr "Anfang" +msgstr "Start" #: libraries/rte/rte_events.lib.php:457 #, fuzzy @@ -8133,16 +8133,14 @@ msgid "Operator" msgstr "Operator" #: libraries/tbl_select.lib.php:143 -#, fuzzy #| msgid "Search" msgid "Table Search" -msgstr "Suche" +msgstr "Tabellensuche" #: libraries/tbl_select.lib.php:229 tbl_change.php:994 -#, fuzzy #| msgid "Insert" msgid "Edit/Insert" -msgstr "Einfügen" +msgstr "Bearbeiten/Einfügen" #: libraries/transformations/application_octetstream__download.inc.php:10 msgid "" @@ -9589,13 +9587,11 @@ msgid "Related links:" msgstr "Verwandte Links:" #: server_status.php:800 -#, fuzzy #| msgid "Query analyzer" msgid "Run analyzer" -msgstr "Query Analyzer" +msgstr "Analyse durchführen" #: server_status.php:801 -#, fuzzy #| msgid "Introduction" msgid "Instructions" msgstr "Einführung" @@ -10497,10 +10493,9 @@ msgid "" msgstr "" #: server_status.php:1508 -#, fuzzy #| msgid "Pause monitor" msgid "Using the monitor:" -msgstr "Überwachung pausieren" +msgstr "Verwendung der Überwachung:" #: server_status.php:1510 #, fuzzy @@ -10519,16 +10514,15 @@ msgid "" "change the refresh rate under 'Settings', or remove any chart using the cog " "icon on each respective chart." msgstr "" -"Verwendung der Überwachung:
OK, Sie sind bereit zum Starten! " -"Sobald Sie 'Überwachung starten' angeklickt haben, wird Ihr Browser in " -"regelmäßigen Intervallen alle angezeigten Diagramme aktualisieren. Unter " -"'Einstellungen' können Sie Diagramme hinzufügen und das " -"Aktualisierungsintervall ändern oder beliebige Diagramme entfernen, wenn Sie " -"das Zahnrad-Icon des entsprechenden Schaubilds verwenden.

Wenn Sie eine " -"plötzliche Spitze in der Aktivität feststellen, wählen Sie den " -"entsprechenden Zeitraum in einem beliebigen Diagramm, indem Sie die linke " -"Maustaste gedrückt halten und über das Schaubild ziehen. Dies wird " -"Statistiken aus den Protokollen laden um Sie bei der Auffindung der " +"OK, Sie sind bereit zum Starten! Sobald Sie 'Überwachung starten' angeklickt " +"haben, wird Ihr Browser in regelmäßigen Intervallen alle angezeigten " +"Diagramme aktualisieren. Unter 'Einstellungen' können Sie Diagramme " +"hinzufügen und das Aktualisierungsintervall ändern oder beliebige Diagramme " +"entfernen, wenn Sie das Zahnrad-Icon des entsprechenden Schaubilds " +"verwenden.

Wenn Sie eine plötzliche Spitze in der Aktivität feststellen, " +"wählen Sie den entsprechenden Zeitraum in einem beliebigen Diagramm, indem " +"Sie die linke Maustaste gedrückt halten und über das Schaubild ziehen. Dies " +"wird Statistiken aus den Protokollen laden um Sie bei der Auffindung der " "Aktivitätsspitze zu unterstützen.

" #: server_status.php:1512 @@ -10562,10 +10556,9 @@ msgstr "" #: server_status.php:1519 msgid "Please note:" -msgstr "" +msgstr "Bitte beachten Sie:" #: server_status.php:1521 -#, fuzzy #| msgid "" #| "Please note: Enabling the general_log may increase the server load " #| "by 5-15%. Also be aware that generating statistics from the logs is a " @@ -10578,10 +10571,11 @@ msgid "" "it is advisable to select only a small time span and to disable the " "general_log and empty its table once monitoring is not required any more." msgstr "" -"Bitte beachten Sie: Das Aktivieren des general_log kann die " -"Serverlast um 5-15% steigern. Seien Sie sich bewusst, dass das Erzeugen von " -"Statistiken aus den Logs ein sehr aufwändiger Prozess ist. Deshalb ist es " -"ratsam, nur einen kleinen Zeitraum auszuwählen." +"Das Aktivieren des general_log kann die Serverlast um 5-15% steigern. Seien " +"Sie sich bewusst, dass das Erzeugen von Statistiken aus den Logs ein sehr " +"aufwändiger Prozess ist. Deshalb ist es ratsam, nur einen kleinen Zeitraum " +"auszuwählen und die gerneral_log nach der Überwachung wieder zu " +"deaktivieren." #: server_status.php:1533 #, fuzzy diff --git a/po/en_GB.po b/po/en_GB.po index c85eaa077b..0d385b7d6b 100644 --- a/po/en_GB.po +++ b/po/en_GB.po @@ -4,8 +4,8 @@ msgstr "" "Project-Id-Version: phpMyAdmin 3.5.0-dev\n" "Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\n" "POT-Creation-Date: 2011-08-17 16:58+0200\n" -"PO-Revision-Date: 2011-08-04 21:47+0200\n" -"Last-Translator: Marc Delisle \n" +"PO-Revision-Date: 2011-08-18 22:40+0200\n" +"Last-Translator: Robert Readman \n" "Language-Team: english-gb \n" "Language: en_GB\n" "MIME-Version: 1.0\n" @@ -416,10 +416,10 @@ msgid "You have to choose at least one column to display" msgstr "You have to choose at least one column to display" #: db_qbe.php:186 -#, fuzzy, php-format +#, php-format #| msgid "visual builder" msgid "Switch to %svisual builder%s" -msgstr "visual builder" +msgstr "Switch to %svisual builder%s" #: db_qbe.php:222 libraries/db_structure.lib.php:90 #: libraries/display_tbl.lib.php:955 @@ -851,10 +851,10 @@ msgid "Dump has been saved to file %s." msgstr "Dump has been saved to file %s." #: gis_data_editor.php:84 -#, fuzzy, php-format +#, php-format #| msgid "Values for the column \"%s\"" msgid "Value for the column \"%s\"" -msgstr "Values for the column \"%s\"" +msgstr "Value for the column \"%s\"" #: gis_data_editor.php:113 tbl_gis_visualization.php:172 msgid "Use OpenStreetMaps as Base Layer" @@ -862,7 +862,7 @@ msgstr "Use OpenStreetMaps as Base Layer" #: gis_data_editor.php:134 msgid "SRID" -msgstr "" +msgstr "SRID" #: gis_data_editor.php:151 js/messages.php:289 #: libraries/display_tbl.lib.php:663 @@ -872,72 +872,68 @@ msgstr "Geometry" #: gis_data_editor.php:172 gis_data_editor.php:194 gis_data_editor.php:240 #: gis_data_editor.php:290 js/messages.php:286 msgid "Point" -msgstr "" +msgstr "Point" #: gis_data_editor.php:173 gis_data_editor.php:195 gis_data_editor.php:241 #: gis_data_editor.php:291 js/messages.php:284 msgid "X" -msgstr "" +msgstr "X" #: gis_data_editor.php:175 gis_data_editor.php:197 gis_data_editor.php:243 #: gis_data_editor.php:293 js/messages.php:285 msgid "Y" -msgstr "" +msgstr "Y" #: gis_data_editor.php:202 gis_data_editor.php:246 gis_data_editor.php:296 #: js/messages.php:292 -#, fuzzy #| msgid "Add routine" msgid "Add a point" -msgstr "Add routine" +msgstr "Add a point" #: gis_data_editor.php:218 js/messages.php:287 -#, fuzzy #| msgid "Lines terminated by" msgid "Linestring" -msgstr "Lines terminated by" +msgstr "Linestring" #: gis_data_editor.php:221 gis_data_editor.php:275 msgid "Outer Ring:" -msgstr "" +msgstr "Outer Ring:" #: gis_data_editor.php:223 gis_data_editor.php:277 js/messages.php:290 msgid "Inner Ring" -msgstr "" +msgstr "Inner Ring" #: gis_data_editor.php:248 -#, fuzzy #| msgid "Add a new User" msgid "Add a linestring" -msgstr "Add a new User" +msgstr "Add a linestring" #: gis_data_editor.php:248 gis_data_editor.php:298 js/messages.php:293 -#, fuzzy #| msgid "Add a new User" msgid "Add an inner ring" -msgstr "Add a new User" +msgstr "Add an inner ring" #: gis_data_editor.php:262 js/messages.php:288 msgid "Polygon" -msgstr "" +msgstr "Polygon" #: gis_data_editor.php:300 js/messages.php:294 -#, fuzzy #| msgid "Add column" msgid "Add a polygon" -msgstr "Add column" +msgstr "Add a polygon" #: gis_data_editor.php:304 -#, fuzzy #| msgid "Geometry" msgid "Add geometry" -msgstr "Geometry" +msgstr "Add geometry" #: gis_data_editor.php:312 msgid "" "Chose \"GeomFromText\" from the \"Function\" column and paste the below " "string into the \"Value\" field" msgstr "" +"Chose \"GeomFromText\" from the \"Function\" column and paste the below string " +"into the \"Value\" field" #: import.php:57 #, php-format @@ -1211,10 +1207,9 @@ msgid "Query statistics" msgstr "Query statistics" #: js/messages.php:93 -#, fuzzy #| msgid "Failed to read configuration file" msgid "Local monitor configuration incompatible" -msgstr "Failed to read configuration file" +msgstr "Local monitor configuration incompatible" #: js/messages.php:94 msgid "" diff --git a/po/es.po b/po/es.po index 394a791071..6bc927ea29 100644 --- a/po/es.po +++ b/po/es.po @@ -4,7 +4,7 @@ msgstr "" "Project-Id-Version: phpMyAdmin 3.5.0-dev\n" "Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\n" "POT-Creation-Date: 2011-08-17 16:58+0200\n" -"PO-Revision-Date: 2011-08-16 21:46+0200\n" +"PO-Revision-Date: 2011-08-19 21:45+0200\n" "Last-Translator: Matías Bellone \n" "Language-Team: spanish \n" "Language: es\n" @@ -856,10 +856,10 @@ msgid "Dump has been saved to file %s." msgstr "El volcado ha sido guardado al archivo %s." #: gis_data_editor.php:84 -#, fuzzy, php-format +#, php-format #| msgid "Values for the column \"%s\"" msgid "Value for the column \"%s\"" -msgstr "Valores para la columna \"%s\"" +msgstr "Valor para la columna \"%s\"" #: gis_data_editor.php:113 tbl_gis_visualization.php:172 msgid "Use OpenStreetMaps as Base Layer" @@ -867,7 +867,7 @@ msgstr "Utilizar OpenStreetMaps como capa base" #: gis_data_editor.php:134 msgid "SRID" -msgstr "" +msgstr "SRID" #: gis_data_editor.php:151 js/messages.php:289 #: libraries/display_tbl.lib.php:663 @@ -877,72 +877,68 @@ msgstr "Geometría" #: gis_data_editor.php:172 gis_data_editor.php:194 gis_data_editor.php:240 #: gis_data_editor.php:290 js/messages.php:286 msgid "Point" -msgstr "" +msgstr "Punto" #: gis_data_editor.php:173 gis_data_editor.php:195 gis_data_editor.php:241 #: gis_data_editor.php:291 js/messages.php:284 msgid "X" -msgstr "" +msgstr "X" #: gis_data_editor.php:175 gis_data_editor.php:197 gis_data_editor.php:243 #: gis_data_editor.php:293 js/messages.php:285 msgid "Y" -msgstr "" +msgstr "Y" #: gis_data_editor.php:202 gis_data_editor.php:246 gis_data_editor.php:296 #: js/messages.php:292 -#, fuzzy #| msgid "Add routine" msgid "Add a point" -msgstr "Agregar rutina" +msgstr "Agregar un punto" #: gis_data_editor.php:218 js/messages.php:287 -#, fuzzy #| msgid "Lines terminated by" msgid "Linestring" -msgstr "Líneas terminadas en" +msgstr "Cadena de líneas" #: gis_data_editor.php:221 gis_data_editor.php:275 msgid "Outer Ring:" -msgstr "" +msgstr "Círculo exterior:" #: gis_data_editor.php:223 gis_data_editor.php:277 js/messages.php:290 msgid "Inner Ring" -msgstr "" +msgstr "Círculo interior" #: gis_data_editor.php:248 -#, fuzzy #| msgid "Add a new User" msgid "Add a linestring" -msgstr "Agregar un nuevo usuario" +msgstr "Agregar una cadena de líneas" #: gis_data_editor.php:248 gis_data_editor.php:298 js/messages.php:293 -#, fuzzy #| msgid "Add a new User" msgid "Add an inner ring" -msgstr "Agregar un nuevo usuario" +msgstr "Agregar un círculo interior" #: gis_data_editor.php:262 js/messages.php:288 msgid "Polygon" -msgstr "" +msgstr "Polígono" #: gis_data_editor.php:300 js/messages.php:294 -#, fuzzy #| msgid "Add column" msgid "Add a polygon" -msgstr "Añadir columna" +msgstr "Agregar un polígono" #: gis_data_editor.php:304 -#, fuzzy #| msgid "Geometry" msgid "Add geometry" -msgstr "Geometría" +msgstr "Agregar geometría" #: gis_data_editor.php:312 msgid "" "Chose \"GeomFromText\" from the \"Function\" column and paste the below " "string into the \"Value\" field" msgstr "" +"Selecciones «GeomFromText» de la columna \"Función\" y pague la cadena ubicada " +"debajo en el campo \"Valor\"" #: import.php:57 #, php-format @@ -1223,10 +1219,9 @@ msgid "Query statistics" msgstr "Estadísticas de Consulta" #: js/messages.php:93 -#, fuzzy #| msgid "Local monitor configuration icompatible" msgid "Local monitor configuration incompatible" -msgstr "Configuración de monitorización local incompatible" +msgstr "Configuración local de monitorización incompatible" #: js/messages.php:94 msgid "" @@ -1825,7 +1820,7 @@ msgstr "Copiar" #: js/messages.php:291 msgid "Outer Ring" -msgstr "" +msgstr "Círculo exterior" #: js/messages.php:297 msgid "Add columns" @@ -2191,6 +2186,8 @@ msgstr "Segundo" #, php-format msgid "Failed formatting string for rule '%s'. PHP threw following error: %s" msgstr "" +"No se pudo dar formato a una cadena para la regla '%s'. PHP devolvió el " +"siguiente error: %s" #: libraries/Config.class.php:1159 msgid "Font size" @@ -6807,29 +6804,30 @@ msgstr "Importar monedas (por ejemplo: $5.00 como 5.00)" #: libraries/import/shp.php:14 msgid "ESRI Shape File" -msgstr "" +msgstr "Archivo de forma ESRI" #: libraries/import/shp.php:254 #, php-format msgid "There was an error importing the ESRI shape file: \"%s\"." -msgstr "" +msgstr "Hubo un error importando el archivo de forma ESRI: \"%s\"." #: libraries/import/shp.php:310 msgid "" "You tried to import an invalid file or the imported file contains invalid " "data" msgstr "" +"Intentó importar un archivo no válido o el archivo importado contiene datos " +"inválidos" #: libraries/import/shp.php:312 #, php-format msgid "MySQL Spatial Extension does not support ESRI type \"%s\"." -msgstr "" +msgstr "La extensión espacial MySQL no soporta el tipo ESRI \"%s\"." #: libraries/import/shp.php:350 -#, fuzzy #| msgid "This page does not contain any tables!" msgid "The imported file does not contain any data" -msgstr "Esta página no contiene ninguna tabla" +msgstr "El archivo importado no contiene datos" #: libraries/import/sql.php:33 msgid "SQL compatibility mode:" @@ -8163,10 +8161,9 @@ msgid "Table Search" msgstr "Búsqueda de tablas" #: libraries/tbl_select.lib.php:229 tbl_change.php:994 -#, fuzzy #| msgid "Insert" msgid "Edit/Insert" -msgstr "Insertar" +msgstr "Editar/Insertar" #: libraries/transformations/application_octetstream__download.inc.php:10 msgid "" @@ -12274,12 +12271,13 @@ msgid "Query cache low memory prunes" msgstr "Reducciones al caché de consultas por falta de memoria" #: po/advisory_rules.php:91 -#, fuzzy #| msgid "The amount of free memory for query cache." msgid "" "Cached queries are removed due to low query cache memory from the query " "cache." -msgstr "La cantidad de memoria libre para el cache de consultas." +msgstr "" +"Las consultas en caché son eliminadas debido a la poca cantidad de memoria " +"de caché para el caché de consultas." #: po/advisory_rules.php:92 msgid "" @@ -12287,46 +12285,56 @@ msgid "" "overhead of maintaining the cache is likely to increase with its size, so do " "this in small increments and monitor the results." msgstr "" +"Podría llegar a querer aumentar «query_cache_size». Recuerde sin embargo que " +"la sobrecarga de mantener el caché es probable que aumente con su tamaño, " +"por lo que se recomienda hacerlo en pequeñas cantidades y monitorizar los " +"resultados." #: po/advisory_rules.php:93 msgid "" "The ratio of removed queries to inserted queries is %s%%. The lower this " "value is, the better (This rules firing limit: 0.1%)" msgstr "" +"La tasa de consultas eliminadas respecto de las agregadas es %s%%. Mejor es " +"mientras menor sea este valor (el límite de disparo de la regla es: 0.1%)" #: po/advisory_rules.php:95 -#, fuzzy #| msgid "Query cache" msgid "Query cache max size" -msgstr "Cache de consultas" +msgstr "Tamaño máximo del caché de consultas" #: po/advisory_rules.php:96 msgid "" "The query cache size is above 128 MiB. Big query caches may cause " "significant overhead that is required to maintain the cache." msgstr "" +"El tamaño del caché de consultas es mayor a 128 MiB. Grandes cachés pueden " +"causar grandes sobrecargas para manterlo." #: po/advisory_rules.php:97 msgid "" "Depending on your environment, it might be performance increasing to reduce " "this value." msgstr "" +"Dependiendo de su entorno, podría aumentar la performance reducir este " +"valor." #: po/advisory_rules.php:98 #, php-format msgid "Current query cache size: %s" -msgstr "" +msgstr "Tamaño del caché de consultas: %s" #: po/advisory_rules.php:100 -#, fuzzy #| msgid "Query results" msgid "Query cache min result size" -msgstr "Resultados de la Consulta" +msgstr "Tamaño mínimo de resultado en caché de consultas" #: po/advisory_rules.php:101 msgid "" "The max size of the result set in the query cache is the default of 1 MiB." msgstr "" +"El tamaño máximo del conjunto de resultados en el caché de consultas es el " +"valor predeterminado de 1 MiB." #: po/advisory_rules.php:102 msgid "" @@ -12339,28 +12347,37 @@ msgid "" "(often invalidated due to table updates) increasing {query_cache_limit} " "might reduce efficiency." msgstr "" +"Cambiar «query_cache_limit» (normalmente aumentarlo) puede aumentar la " +"eficiencia. Esta variable determina el tamaño máximo que puede tener el " +"resultado de una consulta para ser agregada al caché de consultas. Si hay " +"muchos resultados de consultas mayores a 1 MiB que son útiles al caché " +"(muchas lecturas, pocas escrituras) entonces aumentar «query_cache_limit» " +"aumentará la eficiencia. Sin embargo, en el caso que muchos resultados de " +"consultas mayores a 1 MiB que no sean útiles al caché (invalidados " +"frecuentemente por actualizaciones a la tabla) aumentar «query_cache_limit» " +"podría reducir la eficiencia." #: po/advisory_rules.php:103 msgid "query_cache_limit is set to 1 MiB" -msgstr "" +msgstr "«query_cache_limit» está definido a 1 MiB" #: po/advisory_rules.php:105 -#, fuzzy #| msgid "Allows creating temporary tables." msgid "Percentage of sorts that cause temporary tables" -msgstr "Permite la creación de tablas temporales." +msgstr "Porcentaje de ordenaciones que causan tablas temporales" #: po/advisory_rules.php:106 po/advisory_rules.php:111 -#, fuzzy #| msgid "Allows creating temporary tables." msgid "Too many sorts are causing temporary tables." -msgstr "Permite la creación de tablas temporales." +msgstr "Demasiadas ordenaciones causan tablas temporales." #: po/advisory_rules.php:107 po/advisory_rules.php:112 msgid "" "Consider increasing sort_buffer_size and/or read_rnd_buffer_size, depending " "on your system memory limits" msgstr "" +"Considere aumentar «sort_buffer_size» y/o «read_rnd_buffer_size» dependiendo " +"de los límites de memoria del sistema" #: po/advisory_rules.php:108 #, php-format @@ -12368,28 +12385,30 @@ msgid "" "%s%% of all sorts cause temporary tables, this value should be lower than " "10%%." msgstr "" +"%s%% de todas las ordenaciones causan tablas temporales, este valor debería " +"de ser menor a 10%%." #: po/advisory_rules.php:110 -#, fuzzy #| msgid "Allows creating temporary tables." msgid "Rate of sorts that cause temporary tables" -msgstr "Permite la creación de tablas temporales." +msgstr "Tasa de ordenaciones que causan tablas temporales" #: po/advisory_rules.php:113 #, php-format msgid "" "Temporary tables average: %s, this value should be less than 1 per hour." msgstr "" +"Promedio de tablas temporales: %s, este valor debería de ser menor a 1 por " +"hora." #: po/advisory_rules.php:115 -#, fuzzy #| msgid "Start row" msgid "Sort rows" -msgstr "Fila de inicio" +msgstr "Filas ordenadas" #: po/advisory_rules.php:116 msgid "There are lots of rows being sorted." -msgstr "" +msgstr "Hay demasiadas filas siendo ordenadas." #: po/advisory_rules.php:117 msgid "" @@ -12398,42 +12417,49 @@ msgid "" "indexed fields in the ORDER BY clause, as this will result in much faster " "sorting" msgstr "" +"Si bien no hay nada de malo en ordenar una gran cantidad de filas, podría " +"llegar a desea asegurarse que las consultas que requieren gran cantidad de " +"ordenación utilicen campos indexados en la cláusula «ORDER BY», lo que " +"resultará en una ordenación más rápida" #: po/advisory_rules.php:118 #, php-format msgid "Sorted rows average: %s" -msgstr "" +msgstr "Promedio de filas ordenadas: %s" #: po/advisory_rules.php:120 -#, fuzzy #| msgid "There are no routines to display." msgid "Rate of joins without indexes" -msgstr "No hay rutinas para mostrar." +msgstr "Tasa de uniones («JOIN») sin índices" #: po/advisory_rules.php:121 -#, fuzzy #| msgid "There are no routines to display." msgid "There are too many joins without indexes." -msgstr "No hay rutinas para mostrar." +msgstr "Hay demasiadas uniones («JOIN») sin índices." #: po/advisory_rules.php:122 msgid "" "This means that joins are doing full table scans. Adding indexes for the " "fields being used in the join conditions will greatly speed up table joins" msgstr "" +"Esto significa que las uniones («JOIN») están realizando escrutinios " +"completos sobre tablas. Agregar índices a los campos siendo utilizandos en " +"las condiciones de la unión las acelerarán en gran medida" #: po/advisory_rules.php:123 #, php-format msgid "Table joins average: %s, this value should be less than 1 per hour" msgstr "" +"Promedio de uniones («JOIN») de tablas: %s, este promedio debería ser menor " +"a 1 por hora" #: po/advisory_rules.php:125 msgid "Rate of reading first index entry" -msgstr "" +msgstr "Tasa de lectura del primer índice" #: po/advisory_rules.php:126 msgid "The rate of reading the first index entry is high." -msgstr "" +msgstr "La tasa de lectura del primer índice es alta." #: po/advisory_rules.php:127 msgid "" @@ -12444,19 +12470,28 @@ msgid "" "scans. Other than that full index scans can only be reduced by rewriting " "queries." msgstr "" +"Esto normalmente indica escruitinios completos de índices. Éstos son más " +"rápidos que escrutinios de tablas pero requieren gran cantidad de clicos de " +"CPU en tablas grandes. Si dichas tablas tienen o han tenido una gran " +"cantidad de actualizaciones («UPDATE» o «DELETE»), ejecutar «OPTIMIZE TABLE» " +"podría reducir dicha cantidad y/o acelerar los escrutinios completos de " +"índices. De otra forma, la cantidad de escrutinios completos de índices sólo " +"puede ser reducida re-escribiendo las consultas." #: po/advisory_rules.php:128 #, php-format msgid "Index scans average: %s, this value should be less than 1 per hour" msgstr "" +"Promedio de escrutinios de índices: %s, este valor debería de ser menor a 1 " +"por hora" #: po/advisory_rules.php:130 msgid "Rate of reading fixed position" -msgstr "" +msgstr "Tasa de lectura de una posición fija" #: po/advisory_rules.php:131 msgid "The rate of reading data from a fixed position is high." -msgstr "" +msgstr "La tasa de lecutura de datos de una posición fija es alta." #: po/advisory_rules.php:132 msgid "" @@ -12464,6 +12499,9 @@ msgid "" "scan, including join queries that do not use indexes. Add indexes where " "applicable." msgstr "" +"Esto indica que muchas consultas necesitan ordenar resultados y/o realizar " +"un escrutinio completo de tablas, incluyendo consultas con uniones («JOIN») " +"que no utilizan índices. Agregue índices donde sea aplicable." #: po/advisory_rules.php:133 #, php-format @@ -12471,38 +12509,42 @@ msgid "" "Rate of reading fixed position average: %s, this value should be less than 1 " "per hour" msgstr "" +"Tasa de lectura de una posición fija: %s, este valor debería de ser menor a " +"1 por hora" #: po/advisory_rules.php:135 -#, fuzzy #| msgid "Where to show the table row links" msgid "Rate of reading next table row" -msgstr "Donde mostrar los enlaces de filas de tabla" +msgstr "Tasa de lectura de la siguiente fila de una tabla" #: po/advisory_rules.php:136 -#, fuzzy #| msgid "Where to show the table row links" msgid "The rate of reading the next table row is high." -msgstr "Donde mostrar los enlaces de filas de tabla" +msgstr "La tasa de lecutra de la siguiente fila de una tabla es alta." #: po/advisory_rules.php:137 msgid "" "This indicates that many queries are doing full table scans. Add indexes " "where applicable." msgstr "" +"Esto indica que muchas consultas están realizando escrutinios completos de " +"tablas. Agregue índices donde sea aplicable." #: po/advisory_rules.php:138 #, php-format msgid "" "Rate of reading next table row: %s, this value should be less than 1 per hour" msgstr "" +"Tasa de lectura de la siguiente fila de una tabla: %s, este valor debería de " +"ser menor a 1 por hora" #: po/advisory_rules.php:140 msgid "tmp_table_size vs. max_heap_table_size" -msgstr "" +msgstr "«tmp_table_size» vs. «max_heap_table_size»" #: po/advisory_rules.php:141 msgid "tmp_table_size and max_heap_table_size are not the same." -msgstr "" +msgstr "«tmp_table_size» y «max_heap_table_size» no son iguales." #: po/advisory_rules.php:142 msgid "" @@ -12511,23 +12553,29 @@ msgid "" "wish to increase the in-memory table limit you will have to increase the " "other value as well." msgstr "" +"Si ha modificado alguno de ellos deliberadamente: el servidor utiliza el " +"valor menor de ellos para determinar el tamaño máximo de tablas en memoria. " +"Si desea aumentar el límite de tamaño de tablas en memoria deberá también " +"aumentar el otro valor." #: po/advisory_rules.php:143 #, php-format msgid "Current values are tmp_table_size: %s, max_heap_table_size: %s" msgstr "" +"Los valores actuales son «tmp_table_size»: %s, «max_heap_table_size»: %s" #: po/advisory_rules.php:145 -#, fuzzy #| msgid "Where to show the table row links" msgid "Percentage of temp tables on disk" -msgstr "Donde mostrar los enlaces de filas de tabla" +msgstr "Porcentaje de tablas temporales en disco" #: po/advisory_rules.php:146 po/advisory_rules.php:151 msgid "" "Many temporary tables are being written to disk instead of being kept in " "memory." msgstr "" +"Muchas tablas temporales están siendo escritas la disco en lugar de ser " +"mantenidas en memoria." #: po/advisory_rules.php:147 msgid "" @@ -12539,6 +12587,14 @@ msgid "" "mentioned in the beginning of an Article by the Pythian Group" msgstr "" +"Aumentar «max_heap_table_size» y «tmp_table_size» podría ayudar. Sin " +"embargo, algunas tablas temporales son siempre escritas a disco " +"independientemente del valor de estas variables. Para eliminarlas deberá re-" +"escribir las consultas para evitar estas condiciones (en una tabla temporal: " +"la presencia de una columna «BLOB» o «TEXT», o la presencia de una columna " +"mayor a 512 bytes) como se menciona al comienzo del artículo de Pythian " +"Group" #: po/advisory_rules.php:148 #, php-format @@ -12546,15 +12602,14 @@ msgid "" "%s%% of all temporary tables are being written to disk, this value should be " "below 25%%" msgstr "" +"%s%% de todas las tablas temporales son escritas al disco, este valor " +"debería de ser menor a 25%%" -# singular: tabla -# plural: tablas #: po/advisory_rules.php:150 -#, fuzzy #| msgid "%s table" #| msgid_plural "%s tables" msgid "Temp disk rate" -msgstr "%s tabla" +msgstr "Tasa de tablas temporales en el disco" #: po/advisory_rules.php:152 msgid "" @@ -12566,6 +12621,14 @@ msgid "" "mentioned in in the MySQL Documentation" msgstr "" +"Aumentar «max_heap_table_size» y «tmp_table_size» podría ayudar. Sin " +"embargo, algunas tablas temporales son siempre escritas a disco " +"independientemente del valor de estas variables. Para eliminarlas deberá re-" +"escribir las consultas para evitar estas condiciones (en una tabla temporal: " +"la presencia de una columna «BLOB» o «TEXT», o la presencia de una columna " +"mayor a 512 bytes) como se menciona en la documentación de MySQL" #: po/advisory_rules.php:153 #, php-format @@ -12573,38 +12636,43 @@ msgid "" "Rate of temporay tables being written to disk: %s, this value should be less " "than 1 per hour" msgstr "" +"La tasa de tablas temporales escritas al disco: %s, este valor debería ser " +"menor a 1 por hora" #: po/advisory_rules.php:155 -#, fuzzy #| msgid "Sort buffer size" msgid "MyISAM key buffer size" -msgstr "Organizar el tamaño del búfer de memoria" +msgstr "Tamaño de búfer de claves MyISAM" #: po/advisory_rules.php:156 msgid "Key buffer is not initialized. No MyISAM indexes will be cached." msgstr "" +"El búfer de claves no fue inicializado. No se utilizará un caché de claves " +"MyISAM." #: po/advisory_rules.php:157 msgid "" "Set {key_buffer_size} depending on the size of your MyISAM indexes. 64M is a " "good start." msgstr "" +"Defina «key_buffer_size» dependiendo del tamaño de los índices MyISAM. 64M " +"es un buen comienzo." #: po/advisory_rules.php:158 msgid "key_buffer_size is 0" -msgstr "" +msgstr "«key_buffer_size» es 0" #: po/advisory_rules.php:160 -#, fuzzy, php-format +#, php-format #| msgid "Sort buffer size" msgid "Max %% MyISAM key buffer ever used" -msgstr "Organizar el tamaño del búfer de memoria" +msgstr "Porcentaje máximo del búfer de claves MyISAM usado en algún momento" #: po/advisory_rules.php:161 po/advisory_rules.php:166 -#, fuzzy, php-format +#, php-format #| msgid "Sort buffer size" msgid "MyISAM key buffer (index cache) %% used is low." -msgstr "Organizar el tamaño del búfer de memoria" +msgstr "El porcentaje del búfer de claves MyISAM (caché de índices) es bajo." #: po/advisory_rules.php:162 po/advisory_rules.php:167 msgid "" @@ -12612,93 +12680,106 @@ msgid "" "tables to see if indexes have been removed, or examine queries and " "expectations about what indexes are being used." msgstr "" +"Podría necesitar aumentar el valor de «key_buffer_size», examine sus tablas " +"nuevamente para ver si se han eliminado índices o sus consultas y las " +"expectativas de uso de los índices." #: po/advisory_rules.php:163 #, php-format msgid "max %% MyISAM key buffer ever used: %s, this value should be above 95%%" msgstr "" +"Maxímo porcentaje de búfer de claves MyISAM utilizado en algún momento: %s, " +"este valor debería ser mayor a 95%%" #: po/advisory_rules.php:165 -#, fuzzy #| msgid "Sort buffer size" msgid "Percentage of MyISAM key buffer used" -msgstr "Organizar el tamaño del búfer de memoria" +msgstr "Porcentaje de búfer de claves MyISAM utilizado" #: po/advisory_rules.php:168 #, php-format msgid "%% MyISAM key buffer used: %s, this value should be above 95%%" msgstr "" +"Porcentaje de búfer de claves MyISAM utilizado: %s, este valor debería ser " +"mayor a 95%%" #: po/advisory_rules.php:170 msgid "Percentage of index reads from memory" -msgstr "" +msgstr "Porcentaje de índices leídos desde memoria" #: po/advisory_rules.php:171 #, php-format msgid "The %% of indexes that use the MyISAM key buffer is low." msgstr "" +"El porcentaje de índices que utilizan el búfer de claves MyISAM es bajo." #: po/advisory_rules.php:172 msgid "You may need to increase {key_buffer_size}." -msgstr "" +msgstr "Podría necesitar aumentar «key_buffer_size»." #: po/advisory_rules.php:173 #, php-format msgid "Index reads from memory: %s%%, this value should be above 95%%" -msgstr "" +msgstr "Índices leídos desde memoria: %s%%, este valor debería ser mayor a 95%%" #: po/advisory_rules.php:175 -#, fuzzy #| msgid "Create table" msgid "Rate of table open" -msgstr "Crear tabla" +msgstr "Tasa de apertura de tablas" #: po/advisory_rules.php:176 -#, fuzzy #| msgid "The current number of pending writes." msgid "The rate of opening tables is high." -msgstr "El número actual de escrituras pendientess." +msgstr "La tasa de apertura de tablas es alta." #: po/advisory_rules.php:177 msgid "" "Opening tables requires disk I/O which is costly. Increasing " "{table_open_cache} might avoid this." msgstr "" +"Abrir tablas necesita E/S en disco, lo cual es costoso. Aumentar " +"«table_open_cache» podría evitarlo." #: po/advisory_rules.php:178 #, php-format msgid "Opened table rate: %s, this value should be less than 10 per hour" msgstr "" +"Tasa de apertura de tablas: %s, este valor debería ser menor a 10 por hora" #: po/advisory_rules.php:180 -#, fuzzy #| msgid "Format of imported file" msgid "Percentage of used open files limit" -msgstr "Formato del archivo importado" +msgstr "Porcentaje de uso del límite de archivos de abiertos" +# El mensaje de error llegará de PHP o MySQL por lo que no me parece correcto traducirlo #: po/advisory_rules.php:181 msgid "" "The number of open files is approaching the max number of open files. You " "may get a \\\"Too many open files\\\" error." msgstr "" +"La cantidad de archivos abiertos se acerca al máximo permitido. Podría " +"llegar a obtener un error al respecto («Too many open files»)." #: po/advisory_rules.php:182 po/advisory_rules.php:187 msgid "" "Consider increasing {open_files_limit}, and check the error log when " "restarting after changing open_files_limit." msgstr "" +"Considere aumentar «open_files_limit», y revise el registro de errores al " +"reiniciar luego de cambiar esta variable." #: po/advisory_rules.php:183 #, php-format msgid "" "The number of opened files is at %s%% of the limit. It should be below 85%%" msgstr "" +"La cantidad de archivos abiertos es %s%% del límite. Debería ser menor a 85%" +"%" #: po/advisory_rules.php:185 -#, fuzzy #| msgid "Format of imported file" msgid "Rate of open files" -msgstr "Formato del archivo importado" +msgstr "Tasa de apertura de archivos" #: po/advisory_rules.php:186 #, fuzzy diff --git a/po/sl.po b/po/sl.po index 5911f224f2..85dca7fa0e 100644 --- a/po/sl.po +++ b/po/sl.po @@ -4,7 +4,7 @@ msgstr "" "Project-Id-Version: phpMyAdmin 3.5.0-dev\n" "Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\n" "POT-Creation-Date: 2011-08-17 16:58+0200\n" -"PO-Revision-Date: 2011-08-18 00:48+0200\n" +"PO-Revision-Date: 2011-08-19 11:26+0200\n" "Last-Translator: Domen \n" "Language-Team: slovenian \n" "Language: sl\n" @@ -936,6 +936,8 @@ msgid "" "Chose \"GeomFromText\" from the \"Function\" column and paste the below " "string into the \"Value\" field" msgstr "" +"Izberite \"GeomFromText\" iz stolpca \"Funkcija\" in prilepite spodnji niz v " +"polje \"Vrednost\"" #: import.php:57 #, php-format @@ -1874,6 +1876,9 @@ msgid "" "This table does not contain a unique column. Features related to the grid " "edit, checkbox, Edit, Copy and Delete links may not work after saving." msgstr "" +"Tabela ne vsebuje unikatnega stolpca. Zmožnosti, povezane z urejanjem mreže, " +"potrditvenimi polji, povezavami Uredi, Kopiraj in Izbriši, po shranjevanju " +"morda ne bodo delovale." #: js/messages.php:318 msgid "" @@ -9481,6 +9486,8 @@ msgid "" "The Advisor system can provide recommendations on server variables by " "analyzing the server status variables." msgstr "" +"Svetovalni sistem lahko nudi priporočila o strežniških spremenljivkah tako, " +"da analizira spremenljivke stanja strežnika." #: server_status.php:810 msgid "" diff --git a/po/ta.po b/po/ta.po index 1a43107479..0f84323b53 100644 --- a/po/ta.po +++ b/po/ta.po @@ -7,8 +7,8 @@ msgstr "" "Project-Id-Version: phpMyAdmin 3.5.0-dev\n" "Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\n" "POT-Creation-Date: 2011-08-17 16:58+0200\n" -"PO-Revision-Date: 2011-08-14 22:35+0200\n" -"Last-Translator: சுரேஸ்குமார் செல்வநாயகம் \n" +"PO-Revision-Date: 2011-08-19 09:21+0200\n" +"Last-Translator: \n" "Language-Team: Tamil \n" "Language: ta\n" "MIME-Version: 1.0\n" @@ -622,17 +622,17 @@ msgstr "" #: db_structure.php:388 db_structure.php:402 libraries/header.inc.php:158 #: libraries/tbl_info.inc.php:60 tbl_structure.php:210 msgid "View" -msgstr "" +msgstr "நோக்கு" #: db_structure.php:439 libraries/db_structure.lib.php:35 #: libraries/server_links.inc.php:90 server_replication.php:31 #: server_replication.php:162 server_status.php:543 msgid "Replication" -msgstr "" +msgstr "படியெடுத்தல்" #: db_structure.php:443 msgid "Sum" -msgstr "" +msgstr "கூட்டுத்தொகை" #: db_structure.php:450 libraries/StorageEngine.class.php:313 #, php-format @@ -645,13 +645,13 @@ msgstr "" #: server_databases.php:264 server_privileges.php:1751 tbl_structure.php:554 #: tbl_structure.php:563 msgid "With selected:" -msgstr "" +msgstr "உடன் தெரிவுசெய்யப்பட்டது" #: db_structure.php:481 libraries/display_tbl.lib.php:2372 #: server_databases.php:261 server_privileges.php:671 #: server_privileges.php:1754 tbl_structure.php:557 msgid "Check All" -msgstr "" +msgstr "அனைத்தையும் தெரி" #: db_structure.php:485 libraries/display_tbl.lib.php:2373 #: libraries/replication_gui.lib.php:35 server_databases.php:263 @@ -671,40 +671,40 @@ msgstr "" #: server_privileges.php:1441 server_status.php:1485 #: setup/frames/menu.inc.php:21 msgid "Export" -msgstr "" +msgstr "ஏற்றுமதி" #: db_structure.php:500 db_structure.php:554 #: libraries/display_tbl.lib.php:2479 tbl_structure.php:609 msgid "Print view" -msgstr "" +msgstr "அச்சுப் பார்வை" #: db_structure.php:504 libraries/common.lib.php:3120 #: libraries/common.lib.php:3121 msgid "Empty" -msgstr "" +msgstr "வெறுமை" #: db_structure.php:506 db_tracking.php:104 libraries/Index.class.php:482 #: libraries/common.lib.php:3118 libraries/common.lib.php:3119 #: server_databases.php:265 tbl_structure.php:151 tbl_structure.php:152 #: tbl_structure.php:570 msgid "Drop" -msgstr "" +msgstr "அழி" #: db_structure.php:508 tbl_operations.php:608 msgid "Check table" -msgstr "" +msgstr "அட்டவணையை சரிபார்" #: db_structure.php:510 tbl_operations.php:657 tbl_structure.php:810 msgid "Optimize table" -msgstr "" +msgstr "அட்டவணையை உகப்பாக்கு" #: db_structure.php:512 tbl_operations.php:644 msgid "Repair table" -msgstr "" +msgstr "அட்டவணையை திருத்து" #: db_structure.php:514 tbl_operations.php:631 msgid "Analyze table" -msgstr "" +msgstr "அட்டவணையை பகுப்பாய்" #: db_structure.php:516 msgid "Add prefix to table" @@ -722,7 +722,7 @@ msgstr "" #: db_structure.php:560 libraries/schema/User_Schema.class.php:403 msgid "Data Dictionary" -msgstr "" +msgstr "தரவு அகராதி" #: db_tracking.php:79 msgid "Tracked tables" @@ -739,25 +739,25 @@ msgstr "" #: server_synchronize.php:1248 server_synchronize.php:1252 #: tbl_tracking.php:633 msgid "Database" -msgstr "" +msgstr "தரவுத்தளம்" #: db_tracking.php:86 msgid "Last version" -msgstr "" +msgstr "இறுதி பதிப்பு" #: db_tracking.php:87 tbl_tracking.php:636 msgid "Created" -msgstr "" +msgstr "உருவாக்கப்பட்டது" #: db_tracking.php:88 tbl_tracking.php:637 msgid "Updated" -msgstr "" +msgstr "புதுப்பிக்கப்பட்டது" #: db_tracking.php:89 libraries/rte/rte_events.lib.php:380 #: libraries/rte/rte_list.lib.php:67 libraries/server_links.inc.php:51 #: server_status.php:1121 sql.php:880 tbl_tracking.php:638 msgid "Status" -msgstr "" +msgstr "தகுநிலை" #: db_tracking.php:90 libraries/Index.class.php:430 #: libraries/db_structure.lib.php:39 libraries/rte/rte_list.lib.php:52 @@ -773,15 +773,15 @@ msgstr "" #: db_tracking.php:119 tbl_tracking.php:590 tbl_tracking.php:648 msgid "active" -msgstr "" +msgstr "செயற்படு" #: db_tracking.php:121 tbl_tracking.php:592 tbl_tracking.php:650 msgid "not active" -msgstr "" +msgstr "செயற்பாடற்ற" #: db_tracking.php:134 msgid "Versions" -msgstr "" +msgstr "பதிப்புக்கள்" #: db_tracking.php:135 tbl_tracking.php:400 tbl_tracking.php:667 msgid "Tracking report" @@ -818,7 +818,7 @@ msgstr "" #: enum_editor.php:67 gis_data_editor.php:311 msgid "Output" -msgstr "" +msgstr "வெளியீடு" #: enum_editor.php:68 msgid "Copy and paste the joined values into the \"Length/Values\" field" @@ -865,12 +865,12 @@ msgstr "" #: gis_data_editor.php:151 js/messages.php:289 #: libraries/display_tbl.lib.php:663 msgid "Geometry" -msgstr "" +msgstr "கேத்திர கணிதம்" #: gis_data_editor.php:172 gis_data_editor.php:194 gis_data_editor.php:240 #: gis_data_editor.php:290 js/messages.php:286 msgid "Point" -msgstr "" +msgstr "புள்ளி" #: gis_data_editor.php:173 gis_data_editor.php:195 gis_data_editor.php:241 #: gis_data_editor.php:291 js/messages.php:284 @@ -884,10 +884,9 @@ msgstr "" #: gis_data_editor.php:202 gis_data_editor.php:246 gis_data_editor.php:296 #: js/messages.php:292 -#, fuzzy #| msgid "Add %s field(s)" msgid "Add a point" -msgstr "%s களத்தை சேர்க்க" +msgstr "ஒரு புள்ளியை சேர்" #: gis_data_editor.php:218 js/messages.php:287 msgid "Linestring" @@ -913,13 +912,12 @@ msgstr "" #: gis_data_editor.php:262 js/messages.php:288 msgid "Polygon" -msgstr "" +msgstr "பல்கோணி" #: gis_data_editor.php:300 js/messages.php:294 -#, fuzzy #| msgid "Add %s field(s)" msgid "Add a polygon" -msgstr "%s களத்தை சேர்க்க" +msgstr "ஒரு பல்கோணியை சேர்" #: gis_data_editor.php:304 #, fuzzy @@ -1005,7 +1003,7 @@ msgstr "" #: import_status.php:29 libraries/common.lib.php:636 #: libraries/schema/Export_Relation_Schema.class.php:203 user_password.php:109 msgid "Back" -msgstr "" +msgstr "திரும்பி" #: index.php:164 msgid "phpMyAdmin is more friendly with a frames-capable browser." @@ -1072,7 +1070,7 @@ msgstr "" #. l10n: Default description for the y-Axis of Charts #: js/messages.php:51 msgid "Total count" -msgstr "" +msgstr "மொத்தம் எண்ணல்" #: js/messages.php:54 msgid "The host name is empty!" @@ -1108,7 +1106,7 @@ msgstr "" #: js/messages.php:61 js/messages.php:130 libraries/tbl_properties.inc.php:758 #: tbl_tracking.php:235 tbl_tracking.php:400 msgid "Close" -msgstr "" +msgstr "மூடு" #: js/messages.php:64 js/messages.php:249 libraries/Index.class.php:460 #: libraries/common.lib.php:580 libraries/common.lib.php:1116 @@ -1116,7 +1114,7 @@ msgstr "" #: libraries/config/messages.inc.php:478 libraries/display_tbl.lib.php:1326 #: libraries/schema/User_Schema.class.php:185 setup/frames/index.inc.php:138 msgid "Edit" -msgstr "" +msgstr "தொகு" #: js/messages.php:65 server_status.php:705 msgid "Live traffic chart" @@ -1140,12 +1138,12 @@ msgstr "" #: server_status.php:1021 server_status.php:1082 tbl_printview.php:315 #: tbl_structure.php:798 msgid "Total" -msgstr "" +msgstr "மொத்தம்" #. l10n: Other, small valued, queries #: js/messages.php:73 server_status.php:919 msgid "Other" -msgstr "" +msgstr "ஏனையது" #. l10n: Thousands separator #: js/messages.php:75 libraries/common.lib.php:1359 @@ -1225,7 +1223,7 @@ msgstr "" #: js/messages.php:101 msgid "System memory" -msgstr "" +msgstr "முறைமை நினைவகம்" #: js/messages.php:102 msgid "System swap" @@ -1247,11 +1245,11 @@ msgstr "" #: js/messages.php:107 msgid "Total memory" -msgstr "" +msgstr "மொத்த நினைவகம்" #: js/messages.php:108 msgid "Cached memory" -msgstr "" +msgstr "இடைமாற்று நினைவகம்" #: js/messages.php:109 msgid "Buffered memory" @@ -1259,11 +1257,11 @@ msgstr "" #: js/messages.php:110 msgid "Free memory" -msgstr "" +msgstr "விடுபட்ட நினைவகம்" #: js/messages.php:111 msgid "Used memory" -msgstr "" +msgstr "பாவிக்கப்பட்ட நினைவகம்" #: js/messages.php:113 msgid "Total Swap" @@ -1291,25 +1289,25 @@ msgstr "" #: js/messages.php:120 server_status.php:1040 msgid "Connections" -msgstr "" +msgstr "இணைப்புகள்" #. l10n: Questions is the name of a MySQL Status variable #: js/messages.php:124 msgid "Questions" -msgstr "" +msgstr "வினாக்கள்" #: js/messages.php:125 server_status.php:995 msgid "Traffic" -msgstr "" +msgstr "போக்குவரத்து" #: js/messages.php:126 libraries/server_links.inc.php:73 #: server_status.php:1442 msgid "Settings" -msgstr "" +msgstr "அமைப்புகள்" #: js/messages.php:127 msgid "Remove chart" -msgstr "" +msgstr "வரைபடத்தை நீக்கு" #: js/messages.php:128 msgid "Edit title and labels" @@ -1329,7 +1327,7 @@ msgstr "" #: server_privileges.php:2040 server_status.php:1155 server_status.php:1582 #: tbl_zoom_select.php:158 tbl_zoom_select.php:283 msgid "None" -msgstr "" +msgstr "எதுவுமில்லை" #: js/messages.php:133 msgid "Resume monitor" @@ -1392,13 +1390,13 @@ msgstr "" #: js/messages.php:148 #, php-format msgid "Enable %s" -msgstr "" +msgstr "இயலச்செய் %s" #. l10n: Disable in this context means setting a status variable to OFF #: js/messages.php:150 #, php-format msgid "Disable %s" -msgstr "" +msgstr "முடக்கு %s" #. l10n: %d seconds #: js/messages.php:152 @@ -1414,25 +1412,25 @@ msgstr "" #: js/messages.php:154 msgid "Change settings" -msgstr "" +msgstr "அமைப்புக்களை மாற்று" #: js/messages.php:155 msgid "Current settings" -msgstr "" +msgstr "நடப்பு அமைப்புக்கள்" #: js/messages.php:157 server_status.php:1530 msgid "Chart Title" -msgstr "" +msgstr "வரைபடத் தலைப்பு" #. l10n: As in differential values #: js/messages.php:159 msgid "Differential" -msgstr "" +msgstr "வேற்றுமை" #: js/messages.php:160 #, php-format msgid "Divided by %s:" -msgstr "" +msgstr "வகுக்கப்பட்ட %s" #: js/messages.php:162 msgid "From slow log" @@ -1475,12 +1473,12 @@ msgstr "" #. l10n: A collection of available filters #: js/messages.php:173 msgid "Filters" -msgstr "" +msgstr "வடிகட்டிகள்" #. l10n: Filter as in "Start Filtering" #: js/messages.php:175 msgid "Filter" -msgstr "" +msgstr "வடிகட்டி" #: js/messages.php:176 msgid "Filter queries by word/regexp:" @@ -1496,7 +1494,7 @@ msgstr "" #: js/messages.php:179 msgid "Total:" -msgstr "" +msgstr "மொத்த:" #: js/messages.php:181 msgid "Loading logs" @@ -1515,11 +1513,11 @@ msgstr "" #: js/messages.php:184 msgid "Reload page" -msgstr "" +msgstr "பக்கத்தை திரும்ப ஏற்று" #: js/messages.php:186 msgid "Affected rows:" -msgstr "" +msgstr "பாவனையான வரிசைகள்" #: js/messages.php:188 msgid "Failed parsing config file. It doesn't seem to be valid JSON code" @@ -1536,7 +1534,7 @@ msgstr "" #: libraries/tbl_links.inc.php:89 prefs_manage.php:229 server_status.php:1485 #: setup/frames/menu.inc.php:20 msgid "Import" -msgstr "" +msgstr "இறக்குமதி" #: js/messages.php:192 msgid "Analyse Query" @@ -1552,15 +1550,15 @@ msgstr "" #: js/messages.php:198 msgid "Issue" -msgstr "" +msgstr "பிரச்சினை" #: js/messages.php:199 msgid "Recommendation" -msgstr "" +msgstr "பரிந்துரை" #: js/messages.php:200 msgid "Rule details" -msgstr "" +msgstr "ஆளுகை விபரங்கள்" #: js/messages.php:201 #, fuzzy @@ -1574,7 +1572,7 @@ msgstr "" #: js/messages.php:203 msgid "Test" -msgstr "" +msgstr "சோதனை" #: js/messages.php:208 libraries/tbl_properties.inc.php:763 #: pmd_general.php:388 pmd_general.php:425 pmd_general.php:545 @@ -1585,7 +1583,7 @@ msgstr "விலக்கு" #: js/messages.php:211 msgid "Loading" -msgstr "" +msgstr "ஏற்றப்படுகிறது" #: js/messages.php:212 msgid "Processing Request" @@ -1608,7 +1606,7 @@ msgstr "" #: pmd_general.php:543 pmd_general.php:591 pmd_general.php:667 #: pmd_general.php:721 pmd_general.php:784 msgid "OK" -msgstr "" +msgstr "சரி" #: js/messages.php:219 msgid "Renaming Databases" @@ -1634,39 +1632,39 @@ msgstr "நீங்கள் புதிய பயனாளரை சேர் #: js/messages.php:224 msgid "Create Table" -msgstr "" +msgstr "அட்டவணையை உருவாக்கு" #: js/messages.php:229 msgid "Insert Table" -msgstr "" +msgstr "அட்டவணையை செருகு" #: js/messages.php:230 msgid "Hide indexes" -msgstr "" +msgstr "சுட்டுகளை மறை" #: js/messages.php:231 msgid "Show indexes" -msgstr "" +msgstr "சுட்டுகளை காட்டு" #: js/messages.php:234 msgid "Searching" -msgstr "" +msgstr "தேடுதல்" #: js/messages.php:235 msgid "Hide search results" -msgstr "" +msgstr "தேடல் முடிவுகளை மறை" #: js/messages.php:236 msgid "Show search results" -msgstr "" +msgstr "தேடல் முடிவுகளை காட்டு" #: js/messages.php:237 msgid "Browsing" -msgstr "" +msgstr "உலாவுதல்" #: js/messages.php:238 msgid "Deleting" -msgstr "" +msgstr "அழித்தல்" #: js/messages.php:241 msgid "The definition of a stored function must contain a RETURN statement!" @@ -1693,7 +1691,7 @@ msgstr "" #: libraries/display_tbl.lib.php:2385 querywindow.php:90 querywindow.php:94 #: querywindow.php:97 tbl_structure.php:150 tbl_structure.php:569 msgid "Change" -msgstr "" +msgstr "மாற்று" #: js/messages.php:252 msgid "Query execution time" @@ -1705,7 +1703,7 @@ msgstr "" #: setup/frames/index.inc.php:228 tbl_change.php:1019 #: tbl_gis_visualization.php:193 tbl_indexes.php:261 tbl_relation.php:563 msgid "Save" -msgstr "" +msgstr "சேமி" #: js/messages.php:258 msgid "Hide search criteria" @@ -1762,21 +1760,20 @@ msgstr "" #: js/messages.php:282 tbl_change.php:317 tbl_indexes.php:211 #: tbl_indexes.php:238 msgid "Ignore" -msgstr "" +msgstr "புறக்கணி" #: js/messages.php:283 libraries/display_tbl.lib.php:1327 msgid "Copy" -msgstr "" +msgstr "நகல்" #: js/messages.php:291 msgid "Outer Ring" msgstr "" #: js/messages.php:297 -#, fuzzy #| msgid "Add %s field(s)" msgid "Add columns" -msgstr "%s களத்தை சேர்க்க" +msgstr "வரிசைகளை சேர்" #: js/messages.php:300 msgid "Select referenced key" @@ -1843,25 +1840,24 @@ msgstr "" #: js/messages.php:319 msgid "Go to link" -msgstr "" +msgstr "இணைப்புக்கு செல்" #: js/messages.php:322 msgid "Generate password" -msgstr "" +msgstr "கடவுச்சொல்லை இயற்று" #: js/messages.php:323 libraries/replication_gui.lib.php:369 msgid "Generate" -msgstr "" +msgstr "இயற்று" #: js/messages.php:324 msgid "Change Password" -msgstr "" +msgstr "கடவுச்சொல்லை மாற்று" #: js/messages.php:327 tbl_structure.php:464 -#, fuzzy #| msgid "Mon" msgid "More" -msgstr "திங்கள்" +msgstr "மேலும்" #: js/messages.php:330 setup/lib/index.lib.php:173 #, php-format @@ -1884,35 +1880,33 @@ msgstr "" #. l10n: Display text for calendar close link #: js/messages.php:352 msgid "Done" -msgstr "" +msgstr "முடிந்த" #: js/messages.php:356 msgctxt "Previous month" msgid "Prev" -msgstr "" +msgstr "பின்" #: js/messages.php:361 msgctxt "Next month" msgid "Next" -msgstr "" +msgstr "அடுத்த" #. l10n: Display text for current month link in calendar #: js/messages.php:364 msgid "Today" -msgstr "" +msgstr "இன்று" #: js/messages.php:367 -#, fuzzy #| msgid "Jan" msgid "January" msgstr "தை" #: js/messages.php:368 msgid "February" -msgstr "" +msgstr "மாசி" #: js/messages.php:369 -#, fuzzy #| msgid "Mar" msgid "March" msgstr "பங்குனி" @@ -1928,26 +1922,23 @@ msgid "May" msgstr "வைகாசி" #: js/messages.php:372 -#, fuzzy #| msgid "Jun" msgid "June" msgstr "ஆணி" #: js/messages.php:373 -#, fuzzy #| msgid "Jul" msgid "July" msgstr "ஆடி" #: js/messages.php:374 -#, fuzzy #| msgid "Aug" msgid "August" msgstr "ஆவணி" #: js/messages.php:375 msgid "September" -msgstr "" +msgstr "புரட்டாதி" #: js/messages.php:376 #, fuzzy @@ -1957,11 +1948,11 @@ msgstr "ஐப்பசி" #: js/messages.php:377 msgid "November" -msgstr "" +msgstr "கார்த்திகை" #: js/messages.php:378 msgid "December" -msgstr "" +msgstr "மார்கழி" #. l10n: Short month name #: js/messages.php:382 libraries/common.lib.php:1509 @@ -2046,11 +2037,11 @@ msgstr "செவ்வாய்" #: js/messages.php:410 msgid "Wednesday" -msgstr "" +msgstr "புதன்" #: js/messages.php:411 msgid "Thursday" -msgstr "" +msgstr "வியாழன்" #: js/messages.php:412 #, fuzzy @@ -2060,7 +2051,7 @@ msgstr "வெள்ளி" #: js/messages.php:413 msgid "Saturday" -msgstr "" +msgstr "சனி" #. l10n: Short week day name #: js/messages.php:417 @@ -2068,32 +2059,32 @@ msgstr "" #| msgctxt "Short week day name" #| msgid "Sun" msgid "Sun" -msgstr "ஞாயிறு" +msgstr "ஞாயி" #. l10n: Short week day name #: js/messages.php:419 libraries/common.lib.php:1536 msgid "Mon" -msgstr "திங்கள்" +msgstr "திங்" #. l10n: Short week day name #: js/messages.php:421 libraries/common.lib.php:1538 msgid "Tue" -msgstr "செவ்வாய்" +msgstr "செவ்" #. l10n: Short week day name #: js/messages.php:423 libraries/common.lib.php:1540 msgid "Wed" -msgstr "புதன்" +msgstr "புத" #. l10n: Short week day name #: js/messages.php:425 libraries/common.lib.php:1542 msgid "Thu" -msgstr "வியாழன்" +msgstr "வியா" #. l10n: Short week day name #: js/messages.php:427 libraries/common.lib.php:1544 msgid "Fri" -msgstr "வெள்ளி" +msgstr "வெள்" #. l10n: Short week day name #: js/messages.php:429 libraries/common.lib.php:1546 @@ -2102,49 +2093,42 @@ msgstr "சனி" #. l10n: Minimal week day name #: js/messages.php:433 -#, fuzzy #| msgid "Sun" msgid "Su" -msgstr "ஞாயிறு" +msgstr "ஞாயி" #. l10n: Minimal week day name #: js/messages.php:435 -#, fuzzy #| msgid "Mon" msgid "Mo" -msgstr "திங்கள்" +msgstr "திங்" #. l10n: Minimal week day name #: js/messages.php:437 -#, fuzzy #| msgid "Tue" msgid "Tu" -msgstr "செவ்வாய்" +msgstr "செவ்" #. l10n: Minimal week day name #: js/messages.php:439 -#, fuzzy #| msgid "Wed" msgid "We" -msgstr "புதன்" +msgstr "புத" #. l10n: Minimal week day name #: js/messages.php:441 -#, fuzzy #| msgid "Thu" msgid "Th" -msgstr "வியாழன்" +msgstr "வியா" #. l10n: Minimal week day name #: js/messages.php:443 -#, fuzzy #| msgid "Fri" msgid "Fr" -msgstr "வெள்ளி" +msgstr "வெள்" #. l10n: Minimal week day name #: js/messages.php:445 -#, fuzzy #| msgid "Sat" msgid "Sa" msgstr "சனி" @@ -2152,19 +2136,19 @@ msgstr "சனி" #. l10n: Column header for week of the year in calendar #: js/messages.php:447 msgid "Wk" -msgstr "" +msgstr "கிழமை" #: js/messages.php:449 msgid "Hour" -msgstr "" +msgstr "மணித்தியாலம்" #: js/messages.php:450 msgid "Minute" -msgstr "" +msgstr "நிமிடம்" #: js/messages.php:451 msgid "Second" -msgstr "" +msgstr "வினாடிகள்" #: libraries/Advisor.class.php:145 #, php-format @@ -2173,7 +2157,7 @@ msgstr "" #: libraries/Config.class.php:1159 msgid "Font size" -msgstr "" +msgstr "எழுத்துரு அளவு" #: libraries/File.class.php:221 msgid "File was not an uploaded file." @@ -2199,7 +2183,7 @@ msgstr "" #: libraries/File.class.php:287 msgid "Missing a temporary folder." -msgstr "" +msgstr "ஒரு தற்காலிய உறையை காணவில்லை" #: libraries/File.class.php:290 msgid "Failed to write file to disk." @@ -2234,17 +2218,17 @@ msgstr "" #: libraries/Index.class.php:423 libraries/build_html_for_db.lib.php:41 #: tbl_tracking.php:300 msgid "Indexes" -msgstr "" +msgstr "சுட்டுகள்" #: libraries/Index.class.php:434 libraries/tbl_properties.inc.php:488 #: tbl_structure.php:155 tbl_structure.php:160 tbl_structure.php:573 #: tbl_tracking.php:306 msgid "Unique" -msgstr "" +msgstr "தனித்தன்மை" #: libraries/Index.class.php:435 tbl_tracking.php:307 msgid "Packed" -msgstr "" +msgstr "பொதிக்கப்பட்டது" #: libraries/Index.class.php:437 tbl_tracking.php:309 msgid "Cardinality" @@ -2254,7 +2238,7 @@ msgstr "" #: libraries/rte/rte_routines.lib.php:950 tbl_tracking.php:263 #: tbl_tracking.php:312 msgid "Comment" -msgstr "" +msgstr "கருத்துரை" #: libraries/Index.class.php:466 msgid "The primary key has been dropped" @@ -2276,14 +2260,14 @@ msgstr "" #: libraries/server_links.inc.php:43 server_databases.php:99 #: server_privileges.php:1825 msgid "Databases" -msgstr "" +msgstr "தரவுத்தளங்கள்" #: libraries/Message.class.php:193 libraries/blobstreaming.lib.php:325 #: libraries/blobstreaming.lib.php:331 libraries/common.lib.php:547 #: libraries/core.lib.php:210 libraries/import.lib.php:140 tbl_change.php:905 #: tbl_operations.php:229 tbl_relation.php:287 view_operations.php:60 msgid "Error" -msgstr "" +msgstr "வலு" #: libraries/Message.class.php:241 #, php-format @@ -2315,10 +2299,9 @@ msgid "Could not save recent table" msgstr "" #: libraries/RecentTable.class.php:142 -#, fuzzy #| msgid "Display table filter" msgid "Recent tables" -msgstr "கருதிட்குள் சேர்க்க" +msgstr "சமீபத்திய அட்டவணைகள்" #: libraries/RecentTable.class.php:149 msgid "There are no recent tables" @@ -2350,11 +2333,11 @@ msgstr "" #: libraries/Table.class.php:1034 msgid "Invalid database" -msgstr "" +msgstr "தகுதியற்ற தரவுத்தளம்" #: libraries/Table.class.php:1048 tbl_get_field.php:25 msgid "Invalid table name" -msgstr "" +msgstr "தகுதியற்ற அட்டவணைப் பெயர்" #: libraries/Table.class.php:1063 #, php-format @@ -2388,7 +2371,7 @@ msgstr "" #: libraries/Theme.class.php:343 msgid "take it" -msgstr "" +msgstr "அதை ஏற்றுக்கொள்" #: libraries/Theme_Manager.class.php:110 #, php-format @@ -2417,7 +2400,7 @@ msgstr "" #: libraries/auth/cookie.auth.lib.php:174 libraries/auth/http.auth.lib.php:64 #, php-format msgid "Welcome to %s" -msgstr "" +msgstr "வரவேற்கிறது %s" #: libraries/auth/config.auth.lib.php:100 #, php-format @@ -2441,14 +2424,14 @@ msgstr "" #: libraries/auth/cookie.auth.lib.php:199 msgid "Log in" -msgstr "" +msgstr "உள்நுழையா" #: libraries/auth/cookie.auth.lib.php:201 #: libraries/auth/cookie.auth.lib.php:203 #: libraries/navigation_header.inc.php:92 #: libraries/navigation_header.inc.php:96 msgid "phpMyAdmin documentation" -msgstr "" +msgstr "phpMyAdmin ஆவணச்சான்று" #: libraries/auth/cookie.auth.lib.php:213 #: libraries/auth/cookie.auth.lib.php:214 @@ -2457,19 +2440,19 @@ msgstr "" #: libraries/auth/cookie.auth.lib.php:213 msgid "Server:" -msgstr "" +msgstr "சேவையன்:" #: libraries/auth/cookie.auth.lib.php:218 msgid "Username:" -msgstr "" +msgstr "பயனாளர்:" #: libraries/auth/cookie.auth.lib.php:222 msgid "Password:" -msgstr "" +msgstr "கடவுச்சொல்" #: libraries/auth/cookie.auth.lib.php:229 msgid "Server Choice" -msgstr "" +msgstr "சேவையன் தேர்வு" #: libraries/auth/cookie.auth.lib.php:275 libraries/header.inc.php:87 msgid "Cookies must be enabled past this point." @@ -2521,7 +2504,7 @@ msgstr "" #: libraries/blobstreaming.lib.php:244 msgid "PBMS error" -msgstr "" +msgstr "PBMS வழு" #: libraries/blobstreaming.lib.php:277 msgid "PBMS connection failed:" @@ -2537,19 +2520,19 @@ msgstr "" #: libraries/blobstreaming.lib.php:363 msgid "View image" -msgstr "" +msgstr "படத்தை பார்" #: libraries/blobstreaming.lib.php:367 msgid "Play audio" -msgstr "" +msgstr "கேட்பொலியை ஒலிக்கச்செய்" #: libraries/blobstreaming.lib.php:372 msgid "View video" -msgstr "" +msgstr "காணொலி பார்" #: libraries/blobstreaming.lib.php:376 msgid "Download file" -msgstr "" +msgstr "கோப்பை பதிவிறக்கு" #: libraries/blobstreaming.lib.php:443 #, php-format @@ -2558,13 +2541,13 @@ msgstr "" #: libraries/bookmark.lib.php:73 msgid "shared" -msgstr "" +msgstr "பகிரப்பட்டது" #: libraries/build_html_for_db.lib.php:26 #: libraries/config/messages.inc.php:183 libraries/export/xml.php:49 #: server_status.php:545 msgid "Tables" -msgstr "" +msgstr "அட்டவணைகள்" #: libraries/build_html_for_db.lib.php:36 libraries/config/setup.forms.php:302 #: libraries/config/setup.forms.php:338 libraries/config/setup.forms.php:361 @@ -2577,7 +2560,7 @@ msgstr "" #: server_privileges.php:601 server_replication.php:314 tbl_printview.php:281 #: tbl_structure.php:767 msgid "Data" -msgstr "" +msgstr "தரவு" #: libraries/build_html_for_db.lib.php:51 libraries/db_structure.lib.php:55 #: tbl_printview.php:300 tbl_structure.php:784 @@ -2640,7 +2623,7 @@ msgstr "" #: libraries/header.inc.php:136 main.php:161 server_status.php:686 #: server_synchronize.php:1228 msgid "Server" -msgstr "" +msgstr "சேவையன்" #: libraries/common.inc.php:835 msgid "Invalid authentication method set in configuration:" @@ -2660,19 +2643,19 @@ msgstr "" #: libraries/common.lib.php:388 msgctxt "MySQL 5.5 documentation language" msgid "en" -msgstr "en" +msgstr "ஆங்" #. l10n: Language to use for MySQL 5.1 documentation, please use only languages which do exist in official documentation. #: libraries/common.lib.php:392 msgctxt "MySQL 5.1 documentation language" msgid "en" -msgstr "en" +msgstr "ஆங்" #. l10n: Language to use for MySQL 5.0 documentation, please use only languages which do exist in official documentation. #: libraries/common.lib.php:396 msgctxt "MySQL 5.0 documentation language" msgid "en" -msgstr "en" +msgstr "ஆங்" #: libraries/common.lib.php:410 libraries/common.lib.php:412 #: libraries/common.lib.php:414 libraries/common.lib.php:431 @@ -2683,12 +2666,12 @@ msgstr "en" #: libraries/sql_query_form.lib.php:387 libraries/sql_query_form.lib.php:390 #: main.php:212 server_variables.php:114 msgid "Documentation" -msgstr "" +msgstr "ஆவணச்சான்று" #: libraries/common.lib.php:559 libraries/header_printview.inc.php:60 #: server_status.php:532 server_status.php:1123 msgid "SQL query" -msgstr "" +msgstr "SQL வினவல்" #: libraries/common.lib.php:595 libraries/rte/rte_events.lib.php:103 #: libraries/rte/rte_events.lib.php:108 libraries/rte/rte_events.lib.php:118 @@ -2701,7 +2684,7 @@ msgstr "" #: libraries/rte/rte_triggers.lib.php:91 #: libraries/rte/rte_triggers.lib.php:104 msgid "MySQL said: " -msgstr "" +msgstr "MySQL சொன்னது:" #: libraries/common.lib.php:1050 msgid "Failed to connect to SQL validator!" @@ -2721,12 +2704,12 @@ msgstr "" #: libraries/common.lib.php:1132 libraries/config/messages.inc.php:481 msgid "Create PHP Code" -msgstr "" +msgstr "PHP குறிமுறை உருவாக்கு" #: libraries/common.lib.php:1151 libraries/config/messages.inc.php:480 #: server_status.php:697 server_status.php:719 server_status.php:738 msgid "Refresh" -msgstr "" +msgstr "புதுப்பி" #: libraries/common.lib.php:1161 msgid "Skip Validate SQL" @@ -2799,27 +2782,27 @@ msgstr "" #: libraries/display_tbl.lib.php:306 msgctxt "First page" msgid "Begin" -msgstr "" +msgstr "ஆரம்பம்" #: libraries/common.lib.php:2295 libraries/common.lib.php:2298 #: libraries/display_tbl.lib.php:307 server_binlog.php:135 #: server_binlog.php:137 msgctxt "Previous page" msgid "Previous" -msgstr "" +msgstr "முந்தைய" #: libraries/common.lib.php:2324 libraries/common.lib.php:2327 #: libraries/display_tbl.lib.php:370 server_binlog.php:170 #: server_binlog.php:172 msgctxt "Next page" msgid "Next" -msgstr "" +msgstr "அடுத்து" #: libraries/common.lib.php:2325 libraries/common.lib.php:2328 #: libraries/display_tbl.lib.php:385 msgctxt "Last page" msgid "End" -msgstr "" +msgstr "முடிவு" #: libraries/common.lib.php:2393 #, php-format @@ -2846,7 +2829,7 @@ msgstr "" #: libraries/tbl_properties.inc.php:608 pmd_general.php:151 #: server_privileges.php:601 server_replication.php:313 tbl_tracking.php:253 msgid "Structure" -msgstr "" +msgstr "கட்டமைப்பு" #: libraries/common.lib.php:2920 libraries/common.lib.php:2927 #: libraries/config/messages.inc.php:214 libraries/db_links.inc.php:53 @@ -2854,23 +2837,23 @@ msgstr "" #: libraries/server_links.inc.php:47 libraries/tbl_links.inc.php:65 #: querywindow.php:64 msgid "SQL" -msgstr "" +msgstr "SQL" #: libraries/common.lib.php:2922 libraries/common.lib.php:3115 #: libraries/common.lib.php:3116 libraries/sql_query_form.lib.php:284 #: libraries/sql_query_form.lib.php:287 libraries/tbl_links.inc.php:74 msgid "Insert" -msgstr "" +msgstr "செருகு" #: libraries/common.lib.php:2929 libraries/db_links.inc.php:86 #: libraries/tbl_links.inc.php:93 libraries/tbl_links.inc.php:114 #: view_operations.php:87 msgid "Operations" -msgstr "" +msgstr "செயல்பாடுகள்" #: libraries/common.lib.php:3061 msgid "Browse your computer:" -msgstr "" +msgstr "உனது கணினியை உலாவு" #: libraries/common.lib.php:3078 #, php-format @@ -2888,12 +2871,12 @@ msgstr "" #: libraries/common.lib.php:3126 libraries/common.lib.php:3127 msgid "Execute" -msgstr "" +msgstr "நிறைவேற்று" #: libraries/config.values.php:45 libraries/config.values.php:47 #: libraries/config.values.php:51 msgid "Both" -msgstr "" +msgstr "இரு சார்பிலும்" #: libraries/config.values.php:47 msgid "Nowhere" @@ -2901,37 +2884,37 @@ msgstr "" #: libraries/config.values.php:47 msgid "Left" -msgstr "" +msgstr "இடது" #: libraries/config.values.php:47 msgid "Right" -msgstr "" +msgstr "வலது" #: libraries/config.values.php:75 msgid "Open" -msgstr "" +msgstr "திற" #: libraries/config.values.php:75 msgid "Closed" -msgstr "" +msgstr "மூடப்பட்டது" #: libraries/config.values.php:96 libraries/export/htmlword.php:25 #: libraries/export/latex.php:42 libraries/export/odt.php:34 #: libraries/export/sql.php:129 libraries/export/texytext.php:24 msgid "structure" -msgstr "" +msgstr "கட்டமைப்பு" #: libraries/config.values.php:97 libraries/export/htmlword.php:25 #: libraries/export/latex.php:42 libraries/export/odt.php:34 #: libraries/export/sql.php:130 libraries/export/texytext.php:24 msgid "data" -msgstr "" +msgstr "தரவு" #: libraries/config.values.php:98 libraries/export/htmlword.php:25 #: libraries/export/latex.php:42 libraries/export/odt.php:34 #: libraries/export/sql.php:131 libraries/export/texytext.php:24 msgid "structure and data" -msgstr "" +msgstr "கட்டமைப்பும் தரவும்" #: libraries/config.values.php:100 msgid "Quick - display only the minimal options to configure" @@ -10649,7 +10632,7 @@ msgstr "" #: tbl_printview.php:72 msgid "Show tables" -msgstr "" +msgstr "அட்டவணைகளை காட்டு" #: tbl_printview.php:274 tbl_structure.php:758 msgid "Space usage" @@ -10657,7 +10640,7 @@ msgstr "" #: tbl_printview.php:278 tbl_structure.php:762 msgid "Usage" -msgstr "" +msgstr "பாவனையளவு" #: tbl_printview.php:305 tbl_structure.php:789 msgid "Effective" @@ -10669,19 +10652,19 @@ msgstr "" #: tbl_printview.php:344 tbl_structure.php:839 msgid "static" -msgstr "" +msgstr "மாறா" #: tbl_printview.php:346 tbl_structure.php:841 msgid "dynamic" -msgstr "" +msgstr "இறக்காற்றல்" #: tbl_printview.php:368 tbl_structure.php:884 msgid "Row length" -msgstr "" +msgstr "நிரல் நீளம்" #: tbl_printview.php:378 tbl_structure.php:892 msgid "Row size" -msgstr "" +msgstr "நிரல் அளவு" #: tbl_printview.php:388 tbl_structure.php:900 msgid "Next autoindex" @@ -10757,7 +10740,7 @@ msgstr "" #: tbl_structure.php:358 msgctxt "None for default" msgid "None" -msgstr "" +msgstr "ஒன்றுமில்லாத" #: tbl_structure.php:371 #, php-format @@ -10781,14 +10764,13 @@ msgid "Show more actions" msgstr "" #: tbl_structure.php:603 -#, fuzzy #| msgid "Add a new User" msgid "Edit view" -msgstr "புதிய பயனாளரை சேர்க்க" +msgstr "தொகுப்பு பார்வை" #: tbl_structure.php:620 msgid "Relation view" -msgstr "" +msgstr "தொடர்பு பார்வை" #: tbl_structure.php:626 msgid "Propose table structure" @@ -10871,7 +10853,7 @@ msgstr "" #: tbl_tracking.php:375 tbl_tracking.php:392 msgid "Query error" -msgstr "" +msgstr "வினவல் வழு" #: tbl_tracking.php:390 msgid "Tracking data manipulation successfully deleted" @@ -10892,11 +10874,11 @@ msgstr "" #: tbl_tracking.php:434 msgid "No data" -msgstr "" +msgstr "தரவு இல்லை" #: tbl_tracking.php:444 tbl_tracking.php:501 msgid "Date" -msgstr "" +msgstr "திகதி" #: tbl_tracking.php:446 msgid "Data definition statement" @@ -10929,11 +10911,11 @@ msgstr "" #: tbl_tracking.php:603 msgid "Show versions" -msgstr "" +msgstr "பதிப்புகளை காட்டு" #: tbl_tracking.php:635 msgid "Version" -msgstr "" +msgstr "பதிப்பு" #: tbl_tracking.php:683 #, php-format @@ -10951,7 +10933,7 @@ msgstr "" #: tbl_tracking.php:698 msgid "Activate now" -msgstr "" +msgstr "இப்போது செயற்படுத்து" #: tbl_tracking.php:711 #, php-format @@ -10968,7 +10950,7 @@ msgstr "" #: tbl_tracking.php:731 msgid "Create version" -msgstr "" +msgstr "பதிப்பை உருவாக்கு" #: tbl_zoom_select.php:140 msgid "Do a \"query by example\" (wildcard: \"%\") for two different columns" @@ -10994,7 +10976,7 @@ msgstr "" #: tbl_zoom_select.php:394 msgid "How to use" -msgstr "" +msgstr "எப்படி பயன்படுத்துவது" #: themes.php:28 msgid "Get more themes!" @@ -11016,7 +10998,7 @@ msgstr "" #: transformation_overview.php:47 msgctxt "for MIME transformation" msgid "Description" -msgstr "" +msgstr "விவரிப்பு" #: user_password.php:34 msgid "You don't have sufficient privileges to be here right now!" @@ -11028,7 +11010,7 @@ msgstr "" #: view_create.php:141 msgid "VIEW name" -msgstr "" +msgstr "பெயரை பார்" #: view_operations.php:91 msgid "Rename view to" @@ -11166,11 +11148,11 @@ msgstr "" #: po/advisory_rules.php:38 po/advisory_rules.php:43 po/advisory_rules.php:48 #, php-format msgid "Current version: %s" -msgstr "" +msgstr "நடப்பு பதிப்பு: %s" #: po/advisory_rules.php:40 po/advisory_rules.php:45 msgid "Minor Version" -msgstr "" +msgstr "சிறுய பதிப்பு" #: po/advisory_rules.php:41 msgid "Version less than 5.1.30 (the first GA release of 5.1)." @@ -11191,10 +11173,9 @@ msgid "You should upgrade, to a stable version of MySQL 5.5" msgstr "" #: po/advisory_rules.php:50 po/advisory_rules.php:55 -#, fuzzy #| msgid "Action" msgid "Distribution" -msgstr "செயல்" +msgstr "பரம்பல்" #: po/advisory_rules.php:51 msgid "Version is compiled from source, not a MySQL official binary." diff --git a/po/tr.po b/po/tr.po index 40c0dd229a..758eb37b98 100644 --- a/po/tr.po +++ b/po/tr.po @@ -4,7 +4,7 @@ msgstr "" "Project-Id-Version: phpMyAdmin 3.5.0-dev\n" "Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\n" "POT-Creation-Date: 2011-08-17 16:58+0200\n" -"PO-Revision-Date: 2011-08-18 10:40+0200\n" +"PO-Revision-Date: 2011-08-19 21:49+0200\n" "Last-Translator: Burak Yavuz \n" "Language-Team: turkish \n" "Language: tr\n" @@ -817,7 +817,8 @@ msgstr "Çıktı" #: enum_editor.php:68 msgid "Copy and paste the joined values into the \"Length/Values\" field" -msgstr "\"Genişlik/Değerler\" alanına katılan değerleri kopyala ve yapıştır" +msgstr "" +"\"Genişlik/Değerler\" alanında birleştirilen değerleri kopyala ve yapıştır" #: export.php:77 msgid "Selected export type has to be saved in file!" @@ -3075,7 +3076,7 @@ msgstr "Sıfırla" #: libraries/config/messages.inc.php:17 msgid "Improves efficiency of screen refresh" -msgstr "Ekran yenilemenin etkinliğini geliştirir" +msgstr "Ekran yenileme etkinliğini geliştirir" #: libraries/config/messages.inc.php:18 msgid "Enable Ajax" @@ -9782,8 +9783,8 @@ msgstr "" "Sabitlenmiş konumda satır tabanlı okumak için istek sayısıdır. Eğer " "sonuçları sıralamayı gerektiren çok fazla sorgu yapıyorsanız, bu değer " "yüksek olur. Muhtemelen bütün tabloları taramak için MySQL gerektiren çok " -"fazla sorgulamanız vardır veya düzgün bir şekilde anahtarları " -"kullanmamaktasınız." +"fazla sorgulamalara sahipsiniz ya da anahtarları düzgün kullanılmayan " +"birleştirmelere sahipsiniz." #: server_status.php:1209 msgid "" @@ -10245,7 +10246,7 @@ msgid "" msgstr "" "Yapılması zorunlu sıralama algoritması birleştirme geçişi sayısıdır. Eğer bu " "değer büyükse, sort_buffer_size sistem değişkeninin değerini arttırmayı " -"dikkate almalısınız." +"düşünmelisiniz." #: server_status.php:1290 msgid "The number of sorts that were done with ranges." @@ -11976,9 +11977,10 @@ msgid "" "cache, especially if you have multiple slaves." msgstr "" "Oldukça yüksek trafikli veritabanı ile MySQL Sorgu önbelleği " -"kullanıyorsunuz. MySQL Sorgu önbelleği yerine memcached kullanmayı hesaba " -"katmak değebilir özelliklede çoklu slave'lere sahipseniz." +"kullanıyorsunuz. MySQL Sorgu önbelleği yerine memcached kullanmayı düşünmek değebilir özelliklede " +"çoklu slave'lere sahipseniz." #: po/advisory_rules.php:73 #, php-format @@ -11999,7 +12001,7 @@ msgstr "Sorgu önbelleği verimli çalışmıyor, düşük tavan oranına sahip. #: po/advisory_rules.php:77 msgid "Consider increasing {query_cache_limit}." -msgstr "Dikkate değer artış {query_cache_limit}." +msgstr "Dikkate değer {query_cache_limit} artışı." #: po/advisory_rules.php:78 #, php-format @@ -12145,6 +12147,13 @@ msgid "" "(often invalidated due to table updates) increasing {query_cache_limit} " "might reduce efficiency." msgstr "" +"{query_cache_limit} değiştirmek (genelde artarak) verimi arttırabilir. Bu " +"değişken en fazla boyutu belirler sorgu sonucu sorgu önbelleği içine " +"eklenebilmek zorundadır. Eğer 1 MiB'ın üstünde iyi önbelleklenebilir (çok " +"okuma, az yazma) birçok sorgu sonucu varsa sonrasında {query_cache_limit} " +"arttırmak etkiyi arttıracaktır. Halbuki çoğu sonucun iyi önbelleklenemeyen " +"(tablo güncellemelerinden dolayı sıkça geçersiz kılınan) 1 MiB'ın üzerinde " +"olması durumunda {query_cache_limit} arttırmak verimi azaltacaktır." #: po/advisory_rules.php:103 msgid "query_cache_limit is set to 1 MiB" @@ -12163,6 +12172,8 @@ msgid "" "Consider increasing sort_buffer_size and/or read_rnd_buffer_size, depending " "on your system memory limits" msgstr "" +"Dikkate değer sort_buffer_size ve/veya read_rnd_buffer_size artışı, sistem " +"bellek sınırlarınıza bağlıdır." #: po/advisory_rules.php:108 #, php-format @@ -12170,6 +12181,8 @@ msgid "" "%s%% of all sorts cause temporary tables, this value should be lower than " "10%%." msgstr "" +"Tüm sıralamaların %%%s'i geçici tablolara sebep olur, bu değer %%10'dan " +"düşük olmalıdır." #: po/advisory_rules.php:110 msgid "Rate of sorts that cause temporary tables" @@ -12180,6 +12193,7 @@ msgstr "Geçici tablolara sebep olan sıralamaların oranı" msgid "" "Temporary tables average: %s, this value should be less than 1 per hour." msgstr "" +"Geçici tabloların ortalaması: %s, bu değer saat başına 1'den az olmalıdır." #: po/advisory_rules.php:115 msgid "Sort rows" @@ -12196,38 +12210,47 @@ msgid "" "indexed fields in the ORDER BY clause, as this will result in much faster " "sorting" msgstr "" +"Satır sıralamanın yüksek miktarıyla hiçbir sorun yokken, ORDER BY ibaresinde " +"indekslenmiş alanları kullanan çok fazla sıralama gerektiren sorgulardan " +"emin olmak isteyebilirsiniz, ki bu çok daha hızlı sıralamayla " +"sonuçlanacaktır." #: po/advisory_rules.php:118 #, php-format msgid "Sorted rows average: %s" -msgstr "" +msgstr "Sıralanmış satır ortalaması: %s" #: po/advisory_rules.php:120 msgid "Rate of joins without indexes" -msgstr "İndeksler olmaksızın katılım oranı" +msgstr "İndeksler olmaksızın birleştirme oranı" #: po/advisory_rules.php:121 msgid "There are too many joins without indexes." -msgstr "İndeksler olmaksızın çok fazla katılım var." +msgstr "İndeksler olmaksızın çok fazla birleştirme var." #: po/advisory_rules.php:122 msgid "" "This means that joins are doing full table scans. Adding indexes for the " "fields being used in the join conditions will greatly speed up table joins" msgstr "" +"Bu, birleştirmeler tam tablo taraması yapıyor anlamına gelir. Birleştirme " +"şartlarında kullanılan alanlar için indekslerin eklenmesi tablo " +"birleştirmelerini fazlasıyla hızlandıracaktır." #: po/advisory_rules.php:123 #, php-format msgid "Table joins average: %s, this value should be less than 1 per hour" msgstr "" +"Tablo birleştirmeleri ortalaması: %s, bu değer saat başına 1'den az " +"olmalıdır." #: po/advisory_rules.php:125 msgid "Rate of reading first index entry" -msgstr "" +msgstr "Okunan ilk indeks girişi oranı" #: po/advisory_rules.php:126 msgid "The rate of reading the first index entry is high." -msgstr "" +msgstr "Okunan ilk indeks girişi oranı yüksek." #: po/advisory_rules.php:127 msgid "" @@ -12530,7 +12553,7 @@ msgstr "İşlem önbelleği tavan oranı %%" #: po/advisory_rules.php:206 msgid "Thread cache is not efficient." -msgstr "İşlem önbelleği etkin değil." +msgstr "İşlem önbelleği verimli değil." #: po/advisory_rules.php:207 msgid "Increase {thread_cache_size}." diff --git a/server_privileges.php b/server_privileges.php index 78e4f06933..685b81726d 100644 --- a/server_privileges.php +++ b/server_privileges.php @@ -1416,7 +1416,7 @@ if (isset($_REQUEST['flush_privileges'])) { /** * defines some standard links */ -$link_edit = ''; -$link_export = '' . "\n" . '
@@ -915,8 +973,9 @@ function printQueryStatistics()
0) + if ($other_sum > 0) { $chart_json[__('Other')] = $other_sum; + } echo json_encode($chart_json); ?> @@ -971,8 +1030,7 @@ function printServerTraffic() } /* if the server works as master or slave in replication process, display useful information */ - if ($server_master_status || $server_slave_status) - { + if ($server_master_status || $server_slave_status) { ?>
@@ -1121,7 +1179,8 @@ function printServerTraffic()
' . "\n"; - $user_form .= sprintf($link_edit, urlencode($current_user), + $user_form .= sprintf( + $link_edit, + urlencode($current_user), urlencode($current_host), urlencode(! isset($current['Db']) || $current['Db'] == '*' ? '' : $current['Db']), ''); diff --git a/server_status.php b/server_status.php index 8d196adb85..1dd4852369 100644 --- a/server_status.php +++ b/server_status.php @@ -15,8 +15,9 @@ if (! defined('PMA_NO_VARIABLES_IMPORT')) { define('PMA_NO_VARIABLES_IMPORT', true); } -if (isset($_REQUEST['ajax_request']) && $_REQUEST['ajax_request'] == true) +if (isset($_REQUEST['ajax_request']) && $_REQUEST['ajax_request'] == true) { $GLOBALS['is_header_sent'] = true; +} require_once './libraries/common.inc.php'; @@ -31,166 +32,173 @@ if (isset($_REQUEST['ajax_request']) && $_REQUEST['ajax_request'] == true) { // real-time charting data if (isset($_REQUEST['chart_data'])) { switch($_REQUEST['type']) { - // Process and Connections realtime chart - case 'proc': - $c = PMA_DBI_fetch_result("SHOW GLOBAL STATUS WHERE Variable_name = 'Connections'", 0, 1); - $result = PMA_DBI_query('SHOW PROCESSLIST'); - $num_procs = PMA_DBI_num_rows($result); + // Process and Connections realtime chart + case 'proc': + $c = PMA_DBI_fetch_result("SHOW GLOBAL STATUS WHERE Variable_name = 'Connections'", 0, 1); + $result = PMA_DBI_query('SHOW PROCESSLIST'); + $num_procs = PMA_DBI_num_rows($result); - $ret = array( - 'x' => microtime(true)*1000, - 'y_proc' => $num_procs, - 'y_conn' => $c['Connections'] - ); + $ret = array( + 'x' => microtime(true) * 1000, + 'y_proc' => $num_procs, + 'y_conn' => $c['Connections'] + ); - exit(json_encode($ret)); + exit(json_encode($ret)); - // Query realtime chart - case 'queries': - $queries = PMA_DBI_fetch_result( - "SHOW GLOBAL STATUS - WHERE (Variable_name LIKE 'Com_%' OR Variable_name = 'Questions') - AND Value > 0'", 0, 1); - cleanDeprecated($queries); - // admin commands are not queries - unset($queries['Com_admin_commands']); - $questions = $queries['Questions']; - unset($queries['Questions']); + // Query realtime chart + case 'queries': + $queries = PMA_DBI_fetch_result( + "SHOW GLOBAL STATUS + WHERE (Variable_name LIKE 'Com_%' OR Variable_name = 'Questions') + AND Value > 0'", 0, 1); + cleanDeprecated($queries); + // admin commands are not queries + unset($queries['Com_admin_commands']); + $questions = $queries['Questions']; + unset($queries['Questions']); - //$sum=array_sum($queries); - $ret = array( - 'x' => microtime(true)*1000, - 'y' => $questions, - 'pointInfo' => $queries - ); + //$sum=array_sum($queries); + $ret = array( + 'x' => microtime(true) * 1000, + 'y' => $questions, + 'pointInfo' => $queries + ); - exit(json_encode($ret)); + exit(json_encode($ret)); - // Traffic realtime chart - case 'traffic': - $traffic = PMA_DBI_fetch_result( - "SHOW GLOBAL STATUS - WHERE Variable_name = 'Bytes_received' - OR Variable_name = 'Bytes_sent'", 0, 1); + // Traffic realtime chart + case 'traffic': + $traffic = PMA_DBI_fetch_result( + "SHOW GLOBAL STATUS + WHERE Variable_name = 'Bytes_received' + OR Variable_name = 'Bytes_sent'", 0, 1); - $ret = array( - 'x' => microtime(true)*1000, - 'y_sent' => $traffic['Bytes_sent'], - 'y_received' => $traffic['Bytes_received'] - ); + $ret = array( + 'x' => microtime(true) * 1000, + 'y_sent' => $traffic['Bytes_sent'], + 'y_received' => $traffic['Bytes_received'] + ); - exit(json_encode($ret)); + exit(json_encode($ret)); - // Data for the monitor - case 'chartgrid': - $ret = json_decode($_REQUEST['requiredData'], true); - $statusVars = array(); - $serverVars = array(); - $sysinfo = $cpuload = $memory = 0; - $pName = ''; + // Data for the monitor + case 'chartgrid': + $ret = json_decode($_REQUEST['requiredData'], true); + $statusVars = array(); + $serverVars = array(); + $sysinfo = $cpuload = $memory = 0; + $pName = ''; - /* Accumulate all required variables and data */ - // For each chart - foreach ($ret as $chart_id => $chartNodes) { - // For each data series - foreach ($chartNodes as $node_id => $nodeDataPoints) { - // For each data point in the series (usually just 1) - foreach ($nodeDataPoints as $point_id => $dataPoint) { - $pName = $dataPoint['name']; + /* Accumulate all required variables and data */ + // For each chart + foreach ($ret as $chart_id => $chartNodes) { + // For each data series + foreach ($chartNodes as $node_id => $nodeDataPoints) { + // For each data point in the series (usually just 1) + foreach ($nodeDataPoints as $point_id => $dataPoint) { + $pName = $dataPoint['name']; - switch ($dataPoint['type']) { - /* We only collect the status and server variables here to - * read them all in one query, and only afterwards assign them. - * Also do some white list filtering on the names - */ - case 'servervar': - if (!preg_match('/[^a-zA-Z_]+/', $pName)) - $serverVars[] = $pName; - break; - - case 'statusvar': - if (!preg_match('/[^a-zA-Z_]+/', $pName)) - $statusVars[] = $pName; - break; - - case 'proc': - $result = PMA_DBI_query('SHOW PROCESSLIST'); - $ret[$chart_id][$node_id][$point_id]['value'] = PMA_DBI_num_rows($result); - break; - - case 'cpu': - if (!$sysinfo) { - require_once('libraries/sysinfo.lib.php'); - $sysinfo = getSysInfo(); - } - if (!$cpuload) - $cpuload = $sysinfo->loadavg(); - - if (PHP_OS == 'Linux') { - $ret[$chart_id][$node_id][$point_id]['idle'] = $cpuload['idle']; - $ret[$chart_id][$node_id][$point_id]['busy'] = $cpuload['busy']; - } else - $ret[$chart_id][$node_id][$point_id]['value'] = $cpuload['loadavg']; - - break; - - case 'memory': - if (!$sysinfo) { - require_once('libraries/sysinfo.lib.php'); - $sysinfo = getSysInfo(); - } - if (!$memory) - $memory = $sysinfo->memory(); - - $ret[$chart_id][$node_id][$point_id]['value'] = $memory[$pName]; - break; + switch ($dataPoint['type']) { + /* We only collect the status and server variables here to + * read them all in one query, and only afterwards assign them. + * Also do some white list filtering on the names + */ + case 'servervar': + if (!preg_match('/[^a-zA-Z_]+/', $pName)) { + $serverVars[] = $pName; } + break; + + case 'statusvar': + if (!preg_match('/[^a-zA-Z_]+/', $pName)) { + $statusVars[] = $pName; + } + break; + + case 'proc': + $result = PMA_DBI_query('SHOW PROCESSLIST'); + $ret[$chart_id][$node_id][$point_id]['value'] = PMA_DBI_num_rows($result); + break; + + case 'cpu': + if (!$sysinfo) { + require_once('libraries/sysinfo.lib.php'); + $sysinfo = getSysInfo(); + } + if (!$cpuload) { + $cpuload = $sysinfo->loadavg(); + } + + if (PHP_OS == 'Linux') { + $ret[$chart_id][$node_id][$point_id]['idle'] = $cpuload['idle']; + $ret[$chart_id][$node_id][$point_id]['busy'] = $cpuload['busy']; + } else + $ret[$chart_id][$node_id][$point_id]['value'] = $cpuload['loadavg']; + + break; + + case 'memory': + if (!$sysinfo) { + require_once('libraries/sysinfo.lib.php'); + $sysinfo = getSysInfo(); + } + if (!$memory) { + $memory = $sysinfo->memory(); + } + + $ret[$chart_id][$node_id][$point_id]['value'] = $memory[$pName]; + break; + } /* switch */ + } /* foreach */ + } /* foreach */ + } /* foreach */ + + // Retrieve all required status variables + if (count($statusVars)) { + $statusVarValues = PMA_DBI_fetch_result( + "SHOW GLOBAL STATUS + WHERE Variable_name='" . implode("' OR Variable_name='", $statusVars) . "'", 0, 1); + } else { + $statusVarValues = array(); + } + + // Retrieve all required server variables + if (count($serverVars)) { + $serverVarValues = PMA_DBI_fetch_result( + "SHOW GLOBAL VARIABLES + WHERE Variable_name='" . implode("' OR Variable_name='", $serverVars) . "'", 0, 1); + } else { + $serverVarValues = array(); + } + + // ...and now assign them + foreach ($ret as $chart_id => $chartNodes) { + foreach ($chartNodes as $node_id => $nodeDataPoints) { + foreach ($nodeDataPoints as $point_id => $dataPoint) { + switch($dataPoint['type']) { + case 'statusvar': + $ret[$chart_id][$node_id][$point_id]['value'] = $statusVarValues[$dataPoint['name']]; + break; + case 'servervar': + $ret[$chart_id][$node_id][$point_id]['value'] = $serverVarValues[$dataPoint['name']]; + break; } } } + } - // Retrieve all required status variables - if (count($statusVars)) { - $statusVarValues = PMA_DBI_fetch_result( - "SHOW GLOBAL STATUS - WHERE Variable_name='" . implode("' OR Variable_name='", $statusVars) . "'", 0, 1); - } else { - $statusVarValues = array(); - } + $ret['x'] = microtime(true) * 1000; - // Retrieve all required server variables - if (count($serverVars)) { - $serverVarValues = PMA_DBI_fetch_result( - "SHOW GLOBAL VARIABLES - WHERE Variable_name='" . implode("' OR Variable_name='", $serverVars) . "'", 0, 1); - } else { - $serverVarValues = array(); - } - - // ...and now assign them - foreach ($ret as $chart_id => $chartNodes) { - foreach ($chartNodes as $node_id => $nodeDataPoints) { - foreach ($nodeDataPoints as $point_id => $dataPoint) { - switch($dataPoint['type']) { - case 'statusvar': - $ret[$chart_id][$node_id][$point_id]['value'] = $statusVarValues[$dataPoint['name']]; - break; - case 'servervar': - $ret[$chart_id][$node_id][$point_id]['value'] = $serverVarValues[$dataPoint['name']]; - break; - } - } - } - } - - $ret['x'] = microtime(true)*1000; - - exit(json_encode($ret)); + exit(json_encode($ret)); } } if (isset($_REQUEST['log_data'])) { - if(PMA_MYSQL_INT_VERSION < 50106) exit('""'); + if (PMA_MYSQL_INT_VERSION < 50106) { + /* FIXME: why this? */ + exit('""'); + } $start = intval($_REQUEST['time_start']); $end = intval($_REQUEST['time_end']); @@ -210,19 +218,23 @@ if (isset($_REQUEST['ajax_request']) && $_REQUEST['ajax_request'] == true) { $type = strtolower(substr($row['sql_text'], 0, strpos($row['sql_text'], ' '))); switch($type) { - case 'insert': - case 'update': - // Cut off big inserts and updates, but append byte count therefor - if(strlen($row['sql_text']) > 220) - $row['sql_text'] = substr($row['sql_text'], 0, 200) . '... [' . - implode(' ', PMA_formatByteDown(strlen($row['sql_text']), 2, 2)) . ']'; - - break; - default: - break; + case 'insert': + case 'update': + // Cut off big inserts and updates, but append byte count therefor + if (strlen($row['sql_text']) > 220) { + $row['sql_text'] = substr($row['sql_text'], 0, 200) + . '... [' + . implode(' ', PMA_formatByteDown(strlen($row['sql_text']), 2, 2)) + . ']'; + } + break; + default: + break; } - if(!isset($return['sum'][$type])) $return['sum'][$type] = 0; + if (!isset($return['sum'][$type])) { + $return['sum'][$type] = 0; + } $return['sum'][$type] += $row['#']; $return['rows'][] = $row; } @@ -235,7 +247,7 @@ if (isset($_REQUEST['ajax_request']) && $_REQUEST['ajax_request'] == true) { exit(json_encode($return)); } - if($_REQUEST['type'] == 'general') { + if ($_REQUEST['type'] == 'general') { $limitTypes = (isset($_REQUEST['limitTypes']) && $_REQUEST['limitTypes']) ? 'AND argument REGEXP \'^(INSERT|SELECT|UPDATE|DELETE)\' ' : ''; @@ -257,39 +269,44 @@ if (isset($_REQUEST['ajax_request']) && $_REQUEST['ajax_request'] == true) { preg_match('/^(\w+)\s/', $row['argument'], $match); $type = strtolower($match[1]); - if(!isset($return['sum'][$type])) $return['sum'][$type] = 0; + if (!isset($return['sum'][$type])) { + $return['sum'][$type] = 0; + } $return['sum'][$type] += $row['#']; switch($type) { - case 'insert': - // Group inserts if selected - if($removeVars && preg_match('/^INSERT INTO (`|\'|"|)([^\s\\1]+)\\1/i', $row['argument'], $matches)) { - $insertTables[$matches[2]]++; - if ($insertTables[$matches[2]] > 1) { - $return['rows'][$insertTablesFirst]['#'] = $insertTables[$matches[2]]; + case 'insert': + // Group inserts if selected + if ($removeVars && preg_match('/^INSERT INTO (`|\'|"|)([^\s\\1]+)\\1/i', $row['argument'], $matches)) { + $insertTables[$matches[2]]++; + if ($insertTables[$matches[2]] > 1) { + $return['rows'][$insertTablesFirst]['#'] = $insertTables[$matches[2]]; - // Add a ... to the end of this query to indicate that there's been other queries - if($return['rows'][$insertTablesFirst]['argument'][strlen($return['rows'][$insertTablesFirst]['argument'])-1] != '.') - $return['rows'][$insertTablesFirst]['argument'] .= '
...'; - - // Group this value, thus do not add to the result list - continue 2; - } else { - $insertTablesFirst = $i; - $insertTables[$matches[2]] += $row['#'] - 1; + // Add a ... to the end of this query to indicate that there's been other queries + if ($return['rows'][$insertTablesFirst]['argument'][strlen($return['rows'][$insertTablesFirst]['argument'])-1] != '.') { + $return['rows'][$insertTablesFirst]['argument'] .= '
...'; } + + // Group this value, thus do not add to the result list + continue 2; + } else { + $insertTablesFirst = $i; + $insertTables[$matches[2]] += $row['#'] - 1; } - // No break here + } + // No break here - case 'update': - // Cut off big inserts and updates, but append byte count therefor - if(strlen($row['argument']) > 220) - $row['argument'] = substr($row['argument'], 0, 200) . '... [' . - implode(' ', PMA_formatByteDown(strlen($row['argument'])), 2, 2) . ']'; + case 'update': + // Cut off big inserts and updates, but append byte count therefor + if (strlen($row['argument']) > 220) { + $row['argument'] = substr($row['argument'], 0, 200) + . '... [' + . implode(' ', PMA_formatByteDown(strlen($row['argument'])), 2, 2) + . ']'; + } + break; - break; - - default: break; + default: break; } $return['rows'][] = $row; @@ -306,12 +323,15 @@ if (isset($_REQUEST['ajax_request']) && $_REQUEST['ajax_request'] == true) { } if (isset($_REQUEST['logging_vars'])) { - if(isset($_REQUEST['varName']) && isset($_REQUEST['varValue'])) { + if (isset($_REQUEST['varName']) && isset($_REQUEST['varValue'])) { $value = PMA_sqlAddslashes($_REQUEST['varValue']); - if(!is_numeric($value)) $value="'" . $value . "'"; + if (!is_numeric($value)) { + $value="'" . $value . "'"; + } - if(! preg_match("/[^a-zA-Z0-9_]+/", $_REQUEST['varName'])) + if (! preg_match("/[^a-zA-Z0-9_]+/", $_REQUEST['varName'])) { PMA_DBI_query('SET GLOBAL ' . $_REQUEST['varName'] . ' = ' . $value); + } } @@ -319,14 +339,16 @@ if (isset($_REQUEST['ajax_request']) && $_REQUEST['ajax_request'] == true) { exit(json_encode($loggingVars)); } - if(isset($_REQUEST['query_analyzer'])) { + if (isset($_REQUEST['query_analyzer'])) { $return = array(); - if(strlen($_REQUEST['database'])) + if (strlen($_REQUEST['database'])) { PMA_DBI_select_db($_REQUEST['database']); + } - if ($profiling = PMA_profilingSupported()) + if ($profiling = PMA_profilingSupported()) { PMA_DBI_query('SET PROFILING=1;'); + } // Do not cache query $query = preg_replace('/^(\s*SELECT)/i', '\\1 SQL_NO_CACHE', $_REQUEST['query']); @@ -344,7 +366,7 @@ if (isset($_REQUEST['ajax_request']) && $_REQUEST['ajax_request'] == true) { PMA_DBI_free_result($result); - if($profiling) { + if ($profiling) { $return['profiling'] = array(); $result = PMA_DBI_try_query('SELECT seq,state,duration FROM INFORMATION_SCHEMA.PROFILING WHERE QUERY_ID=1 ORDER BY seq'); while ($row = PMA_DBI_fetch_assoc($result)) { @@ -356,7 +378,7 @@ if (isset($_REQUEST['ajax_request']) && $_REQUEST['ajax_request'] == true) { exit(json_encode($return)); } - if(isset($_REQUEST['advisor'])) { + if (isset($_REQUEST['advisor'])) { include('libraries/Advisor.class.php'); $advisor = new Advisor(); exit(json_encode($advisor->run())); @@ -598,7 +620,8 @@ $links['innodb']['doc'] = 'innodb'; // Variable to contain all com_ variables $used_queries = array(); -// Variable to map variable names to their respective section name (used for js category filtering) +// Variable to map variable names to their respective section name +// (used for js category filtering) $allocationMap = array(); // sort vars into arrays @@ -606,36 +629,43 @@ foreach ($server_status as $name => $value) { foreach ($allocations as $filter => $section) { if (strpos($name, $filter) !== false) { $allocationMap[$name] = $section; - if ($section == 'com' && $value > 0) $used_queries[$name] = $value; + if ($section == 'com' && $value > 0) { + $used_queries[$name] = $value; + } break; // Only exits inner loop } } } if(PMA_DRIZZLE) { - $used_queries = PMA_DBI_fetch_result('SELECT * FROM data_dictionary.global_statements', 0, 1); + $used_queries = PMA_DBI_fetch_result( + 'SELECT * FROM data_dictionary.global_statements', + 0, + 1 + ); unset($used_queries['admin_commands']); } else { - // admin commands are not queries (e.g. they include COM_PING, which is excluded from $server_status['Questions']) + // admin commands are not queries (e.g. they include COM_PING, + // which is excluded from $server_status['Questions']) unset($used_queries['Com_admin_commands']); } /* Ajax request refresh */ if (isset($_REQUEST['show']) && isset($_REQUEST['ajax_request'])) { switch($_REQUEST['show']) { - case 'query_statistics': - printQueryStatistics(); - exit(); - case 'server_traffic': - printServerTraffic(); - exit(); - case 'variables_table': - // Prints the variables table - printVariablesTable(); - exit(); + case 'query_statistics': + printQueryStatistics(); + exit(); + case 'server_traffic': + printServerTraffic(); + exit(); + case 'variables_table': + // Prints the variables table + printVariablesTable(); + exit(); - default: - break; + default: + break; } } @@ -643,14 +673,38 @@ $server_db_isLocal = strtolower($cfg['Server']['host']) == 'localhost' || $cfg['Server']['host'] == '127.0.0.1' || $cfg['Server']['host'] == '::1'; -PMA_AddJSCode('pma_token = \'' . $_SESSION[' PMA_token '] . "';\n" . - 'url_query = \'' . str_replace('&', '&', PMA_generate_common_url($db)) . "';\n" . - 'server_time_diff = new Date().getTime() - ' . (microtime(true)*1000) . ";\n" . - 'server_os = \'' . PHP_OS . "';\n" . - 'is_superuser = ' . (PMA_isSuperuser() ? 'true' : 'false') . ";\n" . - 'server_db_isLocal = ' . ($server_db_isLocal ? 'true' : 'false') . ";\n" . - 'profiling_docu = \'' . PMA_showMySQLDocu('general-thread-states', 'general-thread-states') . "';\n" . - 'explain_docu = \'' . PMA_showMySQLDocu('explain-output', 'explain-output') . ";'\n"); +PMA_AddJSVar( + 'pma_token', + $_SESSION[' PMA_token '] +); +PMA_AddJSVar( + 'url_query', + str_replace('&', '&', PMA_generate_common_url($db)) +); +PMA_AddJSVar( + 'server_time_diff', + 'new Date().getTime() - ' . (microtime(true) * 1000) +); +PMA_AddJSVar( + 'server_os', + PHP_OS +); +PMA_AddJSVar( + 'is_superuser', + PMA_isSuperuser() +); +PMA_AddJSVar( + 'server_db_isLocal', + $server_db_isLocal +); +PMA_AddJSVar( + 'profiling_docu', + PMA_showMySQLDocu('general-thread-states', 'general-thread-states') +); +PMA_AddJSVar( + 'explain_docu', + PMA_showMySQLDocu('explain-output', 'explain-output') +); /** * start output @@ -772,7 +826,9 @@ echo __('Runtime Information'); echo ' '; $i=0; foreach ($section_links as $link_name => $link_url) { - if ($i > 0) echo ', '; + if ($i > 0) { + echo ', '; + } if ('doc' == $link_name) { echo PMA_showMySQLDocu($link_url, $link_url); } else { @@ -894,9 +950,11 @@ function printQueryStatistics() $name = str_replace(array('Com_', '_'), array('', ' '), $name); // Group together values that make out less than 2% into "Other", but only if we have more than 6 fractions already - if ($value < $query_sum * 0.02 && count($chart_json)>6) + if ($value < $query_sum * 0.02 && count($chart_json)>6) { $other_sum += $value; - else $chart_json[$name] = $value; + } else { + $chart_json[$name] = $value; + } ?>
+ if (! PMA_DRIZZLE) { + ?> - +

$value) { if (is_numeric($value)) { - if ($i++ > 0) echo ", "; + if ($i++ > 0) { + echo ", "; + } echo "'" . $name . "'"; } } @@ -1648,10 +1709,11 @@ function refreshList($name, $defaultRate=5, $refreshRates=Array(1, 2, 5, 10, 20, foreach ($refreshRates as $rate) { $selected = ($rate == $defaultRate)?' selected="selected"':''; - if ($rate<60) + if ($rate<60) { echo ''; - else + } else { echo ''; + } } ?> diff --git a/server_variables.php b/server_variables.php index ca39a5ed4f..af47f1fe83 100644 --- a/server_variables.php +++ b/server_variables.php @@ -16,9 +16,9 @@ require_once './libraries/common.inc.php'; $GLOBALS['js_include'][] = 'server_variables.js'; -PMA_AddJSCode('pma_token = \'' . $_SESSION[' PMA_token '] . "';\n" . - 'is_superuser = ' . (PMA_isSuperuser() ? 'true' : 'false') . ";\n" . - 'url_query = \'' . str_replace('&', '&', PMA_generate_common_url($db)) . "';\n"); +PMA_AddJSVar('pma_token', $_SESSION[' PMA_token ']); +PMA_AddJSVar('url_query', str_replace('&', '&', PMA_generate_common_url($db))); +PMA_AddJSVar('is_superuser', PMA_isSuperuser() ? true : false); /** @@ -43,11 +43,26 @@ if (isset($_REQUEST['ajax_request']) && $_REQUEST['ajax_request'] == true) { switch($_REQUEST['type']) { case 'getval': $varValue = PMA_DBI_fetch_single_row('SHOW GLOBAL VARIABLES WHERE Variable_name="' . PMA_sqlAddslashes($_REQUEST['varName']) . '";', 'NUM'); + if (isset($VARIABLE_DOC_LINKS[$_REQUEST['varName']][3]) + && $VARIABLE_DOC_LINKS[$_REQUEST['varName']][3] == 'byte') { + exit(implode(' ', PMA_formatByteDown($varValue[1],3,3))); + } exit($varValue[1]); break; + case 'setval': - $value = PMA_sqlAddslashes($_REQUEST['varValue']); - if (!is_numeric($value)) $value="'" . $value . "'"; + $value = $_REQUEST['varValue']; + + if (isset($VARIABLE_DOC_LINKS[$_REQUEST['varName']][3]) + && $VARIABLE_DOC_LINKS[$_REQUEST['varName']][3] == 'byte' + && preg_match('/^\s*(\d+(\.\d+)?)\s*(mb|kb|mib|kib|gb|gib)\s*$/i',$value,$matches)) { + $exp = array('kb' => 1, 'kib' => 1, 'mb' => 2, 'mib' => 2, 'gb' => 3, 'gib' => 3); + $value = floatval($matches[1]) * pow(1024, $exp[strtolower($matches[3])]); + } else { + $value = PMA_sqlAddslashes($value); + } + + if (! is_numeric($value)) $value="'" . $value . "'"; if (! preg_match("/[^a-zA-Z0-9_]+/", $_REQUEST['varName']) && PMA_DBI_query('SET GLOBAL ' . $_REQUEST['varName'] . ' = ' . $value)) { // Some values are rounded down etc. @@ -164,4 +179,4 @@ function formatVariable($name,$value) */ require './libraries/footer.inc.php'; -?> \ No newline at end of file +?> diff --git a/tbl_change.php b/tbl_change.php index 5329f159a1..e7011ebbf1 100644 --- a/tbl_change.php +++ b/tbl_change.php @@ -165,8 +165,7 @@ unset($show_create_table); * Get the list of the fields of the current table */ PMA_DBI_select_db($db); -$table_fields = PMA_DBI_fetch_result('SHOW FIELDS FROM ' . PMA_backquote($table) . ';', - null, null, null, PMA_DBI_QUERY_STORE); +$table_fields = array_values(PMA_DBI_get_columns($db, $table)); $rows = array(); if (isset($where_clause)) { // when in edit mode load all selected rows from table diff --git a/test/libraries/js_escape_test.php b/test/libraries/js_escape_test.php new file mode 100644 index 0000000000..ff185ef878 --- /dev/null +++ b/test/libraries/js_escape_test.php @@ -0,0 +1,36 @@ +assertEquals($expected, PMA_getJsValue($key, $value)); + } + + public function variables() { + return array( + array('foo', true, "foo = true;\n"), + array('foo', false, "foo = false;\n"), + array('foo', 100, "foo = 100;\n"), + array('foo', 0, "foo = 0;\n"), + array('foo', 'text', "foo = \"text\";\n"), + array('foo', 'quote"', "foo = \"quote\\\"\";\n"), + array('foo', 'apostroph\'', "foo = \"apostroph\\'\";\n"), + ); + } +} +?> diff --git a/themes/original/css/theme_right.css.php b/themes/original/css/theme_right.css.php index e97b1e9c9d..be996e6d38 100644 --- a/themes/original/css/theme_right.css.php +++ b/themes/original/css/theme_right.css.php @@ -2311,7 +2311,7 @@ span.CodeMirror-selected { .CodeMirror-matchingbracket {color: #0f0 !important;} .CodeMirror-nonmatchingbracket {color: #f22 !important;} -span.cm-keyword { +span.cm-keyword, span.cm-statement-verb { color: ; } span.cm-variable { @@ -2548,17 +2548,21 @@ span.cm-number { margin: 0.3em 0.2em; } +.cEdit .edit_box { + overflow: hidden; + padding: 0; +} + +.cEdit .edit_box_posting { + background: #FFF url(getImgPath(); ?>ajax_clock_small.gif) no-repeat right center; + padding-right: 1.5em; +} + .cEdit .edit_area_loading { background: #FFF url(getImgPath(); ?>ajax_clock_small.gif) no-repeat center; height: 10em; } - -.cEdit .edit_area_posting { - background: #FFF url(getImgPath(); ?>ajax_clock_small.gif) no-repeat center top; - padding-top: 1.5em; -} - .cEdit .goto_link { background: #EEE; color: #555; diff --git a/themes/pmahomme/css/theme_right.css.php b/themes/pmahomme/css/theme_right.css.php index 914ef0bf09..ca554f18cb 100644 --- a/themes/pmahomme/css/theme_right.css.php +++ b/themes/pmahomme/css/theme_right.css.php @@ -1462,7 +1462,7 @@ div#queryAnalyzerDialog div.CodeMirror-scroll { } div#queryAnalyzerDialog div#queryProfiling { - height: 250px; + height: 250px; } div#queryAnalyzerDialog td.explain { @@ -1470,9 +1470,9 @@ div#queryAnalyzerDialog td.explain { } div#queryAnalyzerDialog table.queryNums { - display: none; - border:0; - text-align:left; + display: none; + border:0; + text-align:left; } .smallIndent { @@ -2727,7 +2727,7 @@ span.CodeMirror-selected { .CodeMirror-matchingbracket {color: #0f0 !important;} .CodeMirror-nonmatchingbracket {color: #f22 !important;} -span.cm-keyword { +span.cm-keyword, span.cm-statement-verb { color: ; } span.cm-variable { @@ -2992,16 +2992,21 @@ span.cm-number { margin: 0.3em 0.2em; } +.cEdit .edit_box { + overflow: hidden; + padding: 0; +} + +.cEdit .edit_box_posting { + background: #FFF url(./themes/pmahomme/img/ajax_clock_small.gif) no-repeat right center; + padding-right: 1.5em; +} + .cEdit .edit_area_loading { background: #FFF url(./themes/pmahomme/img/ajax_clock_small.gif) no-repeat center; height: 10em; } -.cEdit .edit_area_posting { - background: #FFF url(./themes/pmahomme/img/ajax_clock_small.gif) no-repeat center top; - padding-top: 1.5em; -} - .cEdit .goto_link { background: #EEE; color: #555; @@ -3019,3 +3024,523 @@ span.cm-number { .ui-timepicker-div dl dt{ height: 25px; } .ui-timepicker-div dl dd{ margin: -25px 0 10px 65px; } .ui-timepicker-div td { font-size: 90%; } + +/* Designer */ +.input_tab { + background-color: #A6C7E1; + color: #000000; +} + +#canvas { + background-color: #FFFFFF; + color: #000000; +} + +canvas.pmd { + display: inline-block; + overflow: hidden; + text-align: left; +} + +canvas.pmd * { + behavior: url(#default#VML); +} + +.pmd_tab { + background-color: #FFFFFF; + color: #000000; + border-collapse: collapse; + border: 1px solid #AAAAAA; + z-index: 1; + -moz-user-select: none; +} + +.tab_zag { + background-image: url(images/Header.png); + background-repeat: repeat-x; + text-align: center; + cursor: move; + padding: 1px; + font-weight: bold; +} + +.tab_zag_2 { + background-image: url(images/Header_Linked.png); + background-repeat: repeat-x; + text-align: center; + cursor: move; + padding: 1px; + font-weight: bold; +} + +.tab_field { + background: #FFFFFF; + color: #000000; + cursor: default; +} + +.tab_field_2 { + background-color: #CCFFCC; + color: #000000; + background-repeat: repeat-x; + cursor: default; +} + +.tab_field_3 { + background-color: #FFE6E6; /*#DDEEFF*/ + color: #000000; + cursor: default; +} + +#pmd_hint { + white-space: nowrap; + position: absolute; + background-color: #99FF99; + color: #000000; + left: 200px; + top: 50px; + z-index: 3; + border: #00CC66 solid 1px; + display: none; +} + +.scroll_tab { + overflow: auto; + width: 100%; + height: 500px; +} + +.pmd_Tabs { + cursor: default; + color: #0055bb; + white-space: nowrap; + text-decoration: none; + text-indent: 3px; + font-weight: bold; + margin-left: 2px; + text-align: left; + background-color: #FFFFFF; + background-image: url(images/left_panel_butt.png); + border: #CCCCCC solid 1px; +} + +.pmd_Tabs2 { + cursor: default; + color: #0055bb; + background: #FFEE99; + text-indent: 3px; + font-weight: bold; + white-space: nowrap; + text-decoration: none; + border: #9999FF solid 1px; + text-align: left; +} + +.owner { + font-weight: normal; + color: #888888; +} + +.option_tab { + padding-left: 2px; + padding-right: 2px; + width: 5px; +} + +.select_all { + vertical-align: top; + padding-left: 2px; + padding-right: 2px; + cursor: default; + width: 1px; + color: #000000; + background-image: url(images/Header.png); + background-repeat: repeat-x; +} + +.small_tab { + vertical-align: top; + background-color: #0064ea; + color: #FFFFFF; + background-image: url(images/small_tab.png); + cursor: default; + text-align: center; + font-weight: bold; + padding-left: 2px; + padding-right: 2px; + width: 1px; + text-decoration: none; +} + +.small_tab2 { + vertical-align: top; + color: #FFFFFF; + background-color: #FF9966; + cursor: default; + padding-left: 2px; + padding-right: 2px; + text-align: center; + font-weight: bold; + width: 1px; + text-decoration: none; +} + +.small_tab_pref { + background-image: url(images/Header.png); + background-repeat: repeat-x; + text-align: center; + width: 1px; +} + +.small_tab_pref2 { + vertical-align: top; + color: #FFFFFF; + background-color: #FF9966; + cursor: default; + text-align: center; + font-weight: bold; + width: 1px; + text-decoration: none; +} + +.butt { + border: #4477aa solid 1px; + font-weight: bold; + height: 19px; + width: 70px; + background-color: #FFFFFF; + color: #000000; + vertical-align: baseline; +} + +.L_butt2_1 { + padding: 1px; + text-decoration: none; + background-color: #ffffff; + color: #000000; + vertical-align: middle; + cursor: default; +} + +.L_butt2_2 { + padding: 0; + border: #0099CC solid 1px; + background: #FFEE99; + text-decoration: none; + color: #000000; + cursor: default; +} + +/* ---------------------------------------------------------------------------*/ +.bor { + width: 10px; + height: 10px; +} + +.frams1 { + background: url(images/1.png) no-repeat right bottom; +} + +.frams2 { + background: url(images/2.png) no-repeat left bottom; +} + +.frams3 { + background: url(images/3.png) no-repeat left top; +} + +.frams4 { + background: url(images/4.png) no-repeat right top; +} + +.frams5 { + background: url(images/5.png) repeat-x center bottom; +} + +.frams6 { + background: url(images/6.png) repeat-y left; +} + +.frams7 { + background: url(images/7.png) repeat-x top; +} + +.frams8 { + background: url(images/8.png) repeat-y right; +} + +#osn_tab { + background-color: #FFFFFF; + color: #000000; + border: #A9A9A9 solid 1px; +} + +.header { + background-color: #EAEEF0; + color: #000000; + text-align: center; + font-weight: bold; + margin: 0; + padding: 0; + background-image: url(images/top_panel.png); + background-position: top; + background-repeat: repeat-x; + border-right: #999999 solid 1px; + border-left: #999999 solid 1px; + height: 28px; +} + +.header a { + display: block; + float: left; + margin: 3px 1px 4px 1px; + height: 20px; + border: 1px dotted #ffffff; +} + +.header .M_bord { + display: block; + float: left; + margin: 4px; + height: 20px; + width: 2px; +} + +.header a.first { + margin-right: 1em; +} + +.header a.last { + margin-left: 1em; +} + +a.M_butt_Selected_down_IE, +a.M_butt_Selected_down { + border: 1px solid #C0C0BB; + background-color: #99FF99; + color: #000000; +} + +a.M_butt_Selected_down_IE:hover, +a.M_butt_Selected_down:hover, +a.M_butt:hover { + border: 1px solid #0099CC; + background-color: #FFEE99; + color: #000000; +} + +#layer_menu { + z-index: 1000; + position: absolute; + left: 0; + background-color: #EAEEF0; + border: #999999 solid 1px; +} + +#layer_action { + position: absolute; + left: 638px; + top: 52px; + z-index: 1000; + background-color: #CCFF99; + padding: 3px; + border: #009933 solid 1px; + white-space: nowrap; + font-weight: bold; +} + +#layer_upd_relation { + position: absolute; + left: 637px; + top: 224px; + z-index: 1000; +} + +#layer_new_relation { + position: absolute; + left: 636px; + top: 85px; + z-index: 1000; + width: 153px; +} + +#pmd_optionse { + position: absolute; + left: 636px; + top: 85px; + z-index: 1000; + width: 153px; +} + +#layer_menu_sizer { + background-image: url(../../images/resize.png); + cursor: nw-resize; + width: 16px; + height: 16px; +} + +.panel { + position: fixed; + top: 50px; + right: 0; + display: none; + background: #FFF; + border:1px solid #F5F5F5; + width: 350 px; + height: auto; + padding: 30px 170px 30px 30px; + color:#FFF; + z-index:99; +} + +a.trigger{ + position: fixed; + text-decoration: none; + top: 60px; right: 0; + color:#fff; + padding: 10px 40px 10px 15px; + background:#333333 url(images/plus.png) 85% 55% no-repeat; + border:1px solid #444444; + display: block; +} + +a.trigger:hover{ + position: fixed; + text-decoration: none; + top: 60px; right: 0; + color:#080808; + padding: 10px 40px 10px 15px; + background:#fff696 url(images/plus.png) 85% 55% no-repeat; + border:1px solid #999; + display: block; +} + +a.active.trigger { + background:#222222 url(images/minus.png) 85% 55% no-repeat; + z-index:999; +} + +a.active.trigger:hover { + background:#fff696 url(images/minus.png) 85% 55% no-repeat; + z-index:999; +} + +h2.tiger{ + background-repeat: repeat-x; + padding: 1px; + font-weight: bold; + padding: 50 20 50 20px; + margin: 0 0 5px 0; + width: 250px; + float: left; + color : #333; + text-align: center; +} + +h2.tiger a { + background-image: url(images/Header.png); + text-align: center; + text-decoration: none; + color : #333; + display: block; +} + +h2.tiger a:hover { + color: #000; + background-image: url(images/Header_Linked.png); +} + +h2.active { + background-image: url(images/Header.png); + background-repeat: repeat-x; + padding: 1px; + background-position: left bottom; +} + +.toggle_container { + margin: 0 0 5px; + padding: 0; + border-top: 1px solid #d6d6d6; + background: #FFF ; + width: 250px; + overflow: hidden; + font-size: 1.2em; + clear: both; +} + +.toggle_container .block { + background-color: #DBE4E8; + padding:40 15 40 15px; /*--Padding of Container--*/ + border:1px solid #999; + color:#000; +} + +.history_table { + text-align: center; + background-color: #9999CC; +} + +.history_table2 { + text-align: center; + background-color: #DBE4E8; +} + +#filter { + display: none; + position: absolute; + top: 0%; + left: 0%; + width: 100%; + height: 100%; + background-color: #CCA; + z-index:10; + opacity:0.5; + filter: alpha(opacity=50); +} + +#box { + display: none; + position: absolute; + top: 20%; + left: 30%; + width: 500px; + height: 220px; + padding: 48px; + margin:0; + border: 1px solid black; + background-color: white; + z-index:101; + overflow: visible; +} + +#boxtitle { + position:absolute; + float:center; + top:0; + left:0; + width:593px; + height:20px; + padding:0; + padding-top:4px; + left-padding:8px; + margin:0; + border-bottom:4px solid #3CF; + background-color: #D0DCE0; + color:black; + font-weight:bold; + padding-left: 2px; + text-align:left; +} + +#tblfooter { + background-color: #D3DCE3; + float: right; + padding-top:10px; + color: black; + font-weight: normal; +} + +input.btn { + color:#333; + background-color: #D0DCE0; +} diff --git a/transformation_wrapper.php b/transformation_wrapper.php index 577a4353a0..1c5e16a3ec 100644 --- a/transformation_wrapper.php +++ b/transformation_wrapper.php @@ -27,7 +27,6 @@ require_once './libraries/db_table_exists.lib.php'; * Get the list of the fields of the current table */ PMA_DBI_select_db($db); -$table_def = PMA_DBI_query('SHOW FIELDS FROM ' . PMA_backquote($table), null, PMA_DBI_QUERY_STORE); if (isset($where_clause)) { $result = PMA_DBI_query('SELECT * FROM ' . PMA_backquote($table) . ' WHERE ' . $where_clause . ';', null, PMA_DBI_QUERY_STORE); $row = PMA_DBI_fetch_assoc($result);