Merge branch 'QA_4_0' of github.com:phpmyadmin/phpmyadmin into QA_4_0
This commit is contained in:
commit
1be72f7f78
@ -159,7 +159,7 @@ class PMA_Config
|
||||
{
|
||||
if (PMA_getenv('HTTP_USER_AGENT')) {
|
||||
$HTTP_USER_AGENT = PMA_getenv('HTTP_USER_AGENT');
|
||||
} elseif (! isset($HTTP_USER_AGENT)) {
|
||||
} else {
|
||||
$HTTP_USER_AGENT = '';
|
||||
}
|
||||
|
||||
|
||||
@ -304,126 +304,4 @@ function PMA_replication_master_replicated_dbs($link = null)
|
||||
|
||||
return $link;
|
||||
}
|
||||
/**
|
||||
* This function provides synchronization of structure and data
|
||||
* between two mysql servers.
|
||||
*
|
||||
* @param string $db name of database, which should be synchronized
|
||||
* @param mixed $src_link link of source server,
|
||||
* note: if the server is current PMA server, use null
|
||||
* @param mixed $trg_link link of target server,
|
||||
* note: if the server is current PMA server, use null
|
||||
* @param bool $data if true, then data will be copied as well
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @todo improve code sharing between the function and synchronization
|
||||
*/
|
||||
|
||||
function PMA_replication_synchronize_db($db, $src_link, $trg_link, $data = true)
|
||||
{
|
||||
$src_db = $trg_db = $db;
|
||||
|
||||
$src_tables = PMA_DBI_get_tables($src_db, $src_link);
|
||||
|
||||
$trg_tables = PMA_DBI_get_tables($trg_db, $trg_link);
|
||||
|
||||
/**
|
||||
* initializing arrays to save table names
|
||||
*/
|
||||
$source_tables_uncommon = array();
|
||||
$target_tables_uncommon = array();
|
||||
$matching_tables = array();
|
||||
$matching_tables_num = 0;
|
||||
|
||||
/**
|
||||
* Criterion for matching tables is just their names.
|
||||
* Finding the uncommon tables for the source database
|
||||
* BY comparing the matching tables with all the tables in the source database
|
||||
*/
|
||||
PMA_getMatchingTables($trg_tables, $src_tables, $matching_tables, $source_tables_uncommon);
|
||||
|
||||
/**
|
||||
* Finding the uncommon tables for the target database
|
||||
* BY comparing the matching tables with all the tables in the target database
|
||||
*/
|
||||
PMA_getNonMatchingTargetTables($trg_tables, $matching_tables, $target_tables_uncommon);
|
||||
|
||||
/**
|
||||
*
|
||||
* Comparing Data In the Matching Tables
|
||||
* It is assumed that the matching tables are structurally
|
||||
* and typely exactly the same
|
||||
*/
|
||||
$fields_num = array();
|
||||
$matching_tables_fields = array();
|
||||
$matching_tables_keys = array();
|
||||
$insert_array = array(array(array()));
|
||||
$update_array = array(array(array()));
|
||||
$delete_array = array();
|
||||
$row_count = array();
|
||||
$uncommon_tables_fields = array();
|
||||
$matching_tables_num = sizeof($matching_tables);
|
||||
|
||||
for ($i = 0; $i < sizeof($matching_tables); $i++) {
|
||||
PMA_dataDiffInTables(
|
||||
$src_db, $trg_db, $src_link, $trg_link, $matching_tables,
|
||||
$matching_tables_fields, $update_array, $insert_array,
|
||||
$delete_array, $fields_num, $i, $matching_tables_keys
|
||||
);
|
||||
}
|
||||
for ($j = 0; $j < sizeof($source_tables_uncommon); $j++) {
|
||||
PMA_dataDiffInUncommonTables($source_tables_uncommon, $src_db, $src_link, $j, $row_count);
|
||||
}
|
||||
|
||||
/**
|
||||
* INTEGRATION OF STRUCTURE DIFFERENCE CODE
|
||||
*
|
||||
*/
|
||||
$source_columns = array();
|
||||
$target_columns = array();
|
||||
$alter_str_array = array(array());
|
||||
$add_column_array = array(array());
|
||||
$uncommon_columns = array();
|
||||
$target_tables_keys = array();
|
||||
$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');
|
||||
|
||||
for ($counter = 0; $counter < $matching_tables_num; $counter++) {
|
||||
PMA_structureDiffInTables(
|
||||
$src_db, $trg_db, $src_link, $trg_link, $matching_tables,
|
||||
$source_columns, $target_columns, $alter_str_array, $add_column_array,
|
||||
$uncommon_columns, $criteria, $target_tables_keys, $counter
|
||||
);
|
||||
|
||||
PMA_indexesDiffInTables(
|
||||
$src_db, $trg_db, $src_link, $trg_link, $matching_tables,
|
||||
$source_indexes, $target_indexes, $add_indexes_array,
|
||||
$alter_indexes_array, $remove_indexes_array, $counter
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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($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) {
|
||||
PMA_populateTargetTables(
|
||||
$src_db, $trg_db, $src_link, $trg_link, $source_tables_uncommon,
|
||||
$q, $uncommon_tables_fields, false
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
27
po/lt.po
27
po/lt.po
@ -4,17 +4,17 @@ msgstr ""
|
||||
"Project-Id-Version: phpMyAdmin 4.0.1-dev\n"
|
||||
"Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\n"
|
||||
"POT-Creation-Date: 2013-05-02 13:12+0200\n"
|
||||
"PO-Revision-Date: 2013-02-11 19:03+0200\n"
|
||||
"Last-Translator: Edgaras Janušauskas <edgaras.janusauskas@gmail.com>\n"
|
||||
"Language-Team: Lithuanian <http://l10n.cihar.com/projects/phpmyadmin/master/"
|
||||
"lt/>\n"
|
||||
"PO-Revision-Date: 2013-05-16 14:41+0200\n"
|
||||
"Last-Translator: Rytis Slatkevičius <rytis.s@gmail.com>\n"
|
||||
"Language-Team: Lithuanian "
|
||||
"<http://l10n.cihar.com/projects/phpmyadmin/4-0/lt/>\n"
|
||||
"Language: lt\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n"
|
||||
"%100<10 || n%100>=20) ? 1 : 2;\n"
|
||||
"X-Generator: Weblate 1.5-dev\n"
|
||||
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%"
|
||||
"100<10 || n%100>=20) ? 1 : 2;\n"
|
||||
"X-Generator: Weblate 1.6-dev\n"
|
||||
|
||||
#: browse_foreigners.php:36 browse_foreigners.php:60 js/messages.php:344
|
||||
#: libraries/DisplayResults.class.php:809
|
||||
@ -736,10 +736,9 @@ msgid "Server"
|
||||
msgstr "Serveris"
|
||||
|
||||
#: index.php:240
|
||||
#, fuzzy
|
||||
#| msgid "Server port"
|
||||
msgid "Server type"
|
||||
msgstr "Serverio jungtis"
|
||||
msgstr "Serverio tipas"
|
||||
|
||||
#: index.php:244 libraries/plugins/export/ExportLatex.class.php:225
|
||||
#: libraries/plugins/export/ExportSql.class.php:612
|
||||
@ -1328,10 +1327,10 @@ msgid "Differential"
|
||||
msgstr "Skirtumas"
|
||||
|
||||
#: js/messages.php:154
|
||||
#, fuzzy, php-format
|
||||
#, php-format
|
||||
#| msgid "Divided by %s:"
|
||||
msgid "Divided by %s"
|
||||
msgstr "Padalintas į %s:"
|
||||
msgstr "Padalintas į %s"
|
||||
|
||||
#: js/messages.php:155
|
||||
msgid "Unit"
|
||||
@ -1346,10 +1345,9 @@ msgid "From general log"
|
||||
msgstr ""
|
||||
|
||||
#: js/messages.php:159
|
||||
#, fuzzy
|
||||
#| msgid "Loading logs"
|
||||
msgid "Analysing logs"
|
||||
msgstr "Įkeliami žurnalai"
|
||||
msgstr "Analizuojami žurnalai"
|
||||
|
||||
#: js/messages.php:160
|
||||
msgid "Analysing & loading logs. This may take a while."
|
||||
@ -1451,10 +1449,9 @@ msgid "Group queries, ignoring variable data in WHERE clauses"
|
||||
msgstr "Sugrupuoti užklausas, nepaisant kintamųjų duomenų WHERE dalyje"
|
||||
|
||||
#: js/messages.php:187
|
||||
#, fuzzy
|
||||
#| msgid "Number of inserted rows"
|
||||
msgid "Sum of grouped rows:"
|
||||
msgstr "Įkeltų eilučių skaičius"
|
||||
msgstr "Sugrupuotų eilučių suma:"
|
||||
|
||||
#: js/messages.php:188
|
||||
msgid "Total:"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user