Fixed empty list in synchronization, if there is no DB available

This commit is contained in:
Tomas Srnka
2009-11-26 00:04:43 +00:00
parent 352f9e38be
commit 53e18f0889
65 changed files with 35756 additions and 35175 deletions

View File

@@ -1,3 +1,4 @@
<?php
#!/bin/bash #!/bin/bash
# $Id$ # $Id$
# #
@@ -14,19 +15,18 @@ fi
for file in *.inc.php for file in *.inc.php
do do
echo $file " " echo $file " "
grep -v '?>' ${file} > ${file}.new
case $file in case $file in
english*) english*)
echo "$1 = '"$2"';" >> ${file}.new echo "$1 = '"$2"';" >> ${file}.new
;; ;;
*) *)
echo "$1 = '"$2"'; //to translate" >> ${file}.new
;; ;;
esac esac
echo "?>" >> ${file}.new
rm $file rm $file
mv ${file}.new $file mv ${file}.new $file
done done
./sort_lang.sh english* ./sort_lang.sh english*
echo " " echo " "
echo "Message added to all message files (including english)" echo "Message added to all message files (including english)"
?>

View File

@@ -1,8 +1,8 @@
<?php
#!/bin/bash #!/bin/bash
# $Id$ # $Id$
# #
# Shell script that adds a message file to all message files # Shell script that adds a message file to all message files
# adding "//to translate" on each line
# #
# Example: add_message_file.sh xxx # Example: add_message_file.sh xxx
# #
@@ -14,7 +14,6 @@ fi
for file in *.inc.php for file in *.inc.php
do do
echo $file " " echo $file " "
grep -v '?>' ${file} > ${file}.new
case $file in case $file in
english*) english*)
sed -n 's/\(.*\);/\1;/p' $1 >> ${file}.new sed -n 's/\(.*\);/\1;/p' $1 >> ${file}.new
@@ -23,10 +22,11 @@ do
sed -n 's/\(.*\);/\1; \/\/to translate/p' $1 >> ${file}.new sed -n 's/\(.*\);/\1; \/\/to translate/p' $1 >> ${file}.new
;; ;;
esac esac
echo "?>" >> ${file}.new
rm $file rm $file
mv ${file}.new $file mv ${file}.new $file
done done
./sort_lang.sh english* ./sort_lang.sh english*
echo " " echo " "
echo "Messages added to add message files (including english)" echo "Messages added to add message files (including english)"
?>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,3 +1,4 @@
<?php
#!/bin/sh #!/bin/sh
# $Id$ # $Id$
## ##
@@ -29,7 +30,6 @@ do
awk "/$STRINGMATCH/ && ! /$IGNOREMATCH/ { print \$1 }" $f | sort > $TMPDIR/$f awk "/$STRINGMATCH/ && ! /$IGNOREMATCH/ { print \$1 }" $f | sort > $TMPDIR/$f
done done
# Build the diff files used for checking # Build the diff files used for checking
# And if there are no differences, delete the empty files # And if there are no differences, delete the empty files
echo "Comparing data" echo "Comparing data"
@@ -60,3 +60,5 @@ echo "Dupe = Duplicate Variables"
echo "Miss = Missing Variables" echo "Miss = Missing Variables"
echo "For exact problem listings, look in the $TMPDIR/ directory" echo "For exact problem listings, look in the $TMPDIR/ directory"
echo "Please remember to remove '$TMPDIR/' once you are done" echo "Please remember to remove '$TMPDIR/' once you are done"
?>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,3 +1,4 @@
<?php
#!/bin/bash #!/bin/bash
# $Id$ # $Id$
# #
@@ -21,3 +22,5 @@ do
echo " lines after:" `wc -l $file` echo " lines after:" `wc -l $file`
done done
echo " " echo " "
?>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1058,12 +1058,17 @@ $strBLOBRepositoryRemove = 'Remove BLOB Repository Reference'; //to translate
$strBLOBRepositoryRepair = 'Repair'; //to translate $strBLOBRepositoryRepair = 'Repair'; //to translate
$strBLOBRepositoryUpload = 'Upload to BLOB repository'; //to translate $strBLOBRepositoryUpload = 'Upload to BLOB repository'; //to translate
$strClickToSelect = 'Click to select'; //to translate
$strClickToUnselect = 'Click to unselect'; //to translate
$strDataDiff = 'Data Difference'; //to translate $strDataDiff = 'Data Difference'; //to translate
$strDataSyn = 'Data Synchronization'; //to translate $strDataSyn = 'Data Synchronization'; //to translate
$strDeleteRelation = 'Delete relation'; //to translate $strDeleteRelation = 'Delete relation'; //to translate
$strDesignerHelpDisplayField = 'The display field is shown in pink. To set/unset a field as the display field, click the "Choose field to display" icon, then click on the appropriate field name.'; //to translate $strDesignerHelpDisplayField = 'The display field is shown in pink. To set/unset a field as the display field, click the "Choose field to display" icon, then click on the appropriate field name.'; //to translate
$strDetails = 'Details...'; //to translate $strDetails = 'Details...'; //to translate
$strDifference = 'Difference'; //to translate
$strDocSQL = 'DocSQL'; //to translate $strDocSQL = 'DocSQL'; //to translate
$strDumpAllRows = 'Dump all rows'; //to translate
$strErrorRelationAdded = 'Error: Relation not added.'; //to translate $strErrorRelationAdded = 'Error: Relation not added.'; //to translate
$strErrorRelationExists = 'Error: relation already exists.'; //to translate $strErrorRelationExists = 'Error: relation already exists.'; //to translate
@@ -1075,6 +1080,7 @@ $strForeignKeyRelationAdded = 'FOREIGN KEY relation added'; //to translate
$strFullStart = 'Full start'; //to translate $strFullStart = 'Full start'; //to translate
$strFullStop = 'Full stop'; //to translate $strFullStop = 'Full stop'; //to translate
$strHaveBeenSynchronized = 'Selected target tables have been synchronized with source tables.'; //to translate
$strHexForBLOB = 'Use hexadecimal for BLOB'; //to translate $strHexForBLOB = 'Use hexadecimal for BLOB'; //to translate
$strHideShowAll = 'Hide/Show all'; //to translate $strHideShowAll = 'Hide/Show all'; //to translate
$strHideShowNoRelation = 'Hide/Show Tables with no relation'; //to translate $strHideShowNoRelation = 'Hide/Show Tables with no relation'; //to translate
@@ -1094,6 +1100,9 @@ $strInternalRelationAdded = 'Internal relation added'; //to translate
$strMediaWiki = 'MediaWiki Table'; //to translate $strMediaWiki = 'MediaWiki Table'; //to translate
$strNoDatabaseAvailable = 'No database available'; //to translate
$strNotPresent = 'not present'; //to translate
$strPBXTCheckpointFrequency = 'Checkpoint frequency'; //to translate $strPBXTCheckpointFrequency = 'Checkpoint frequency'; //to translate
$strPBXTCheckpointFrequencyDesc = 'The amount of data written to the transaction log before a checkpoint is performed. The default value is 24MB.'; //to translate $strPBXTCheckpointFrequencyDesc = 'The amount of data written to the transaction log before a checkpoint is performed. The default value is 24MB.'; //to translate
$strPBXTDataFileGrowSize = 'Data file grow size'; //to translate $strPBXTDataFileGrowSize = 'Data file grow size'; //to translate
@@ -1130,6 +1139,8 @@ $strPrivDescProcess = 'Allows viewing processes of all users'; //to translate
$strPrivDescTrigger = 'Allows creating and dropping triggers'; //to translate $strPrivDescTrigger = 'Allows creating and dropping triggers'; //to translate
$strProfiling = 'Profiling'; //to translate $strProfiling = 'Profiling'; //to translate
$strQueriesExecuted = 'The following queries have been executed:'; //to translate
$strRebuild = 'Rebuild'; //to translate $strRebuild = 'Rebuild'; //to translate
$strRecommended = 'recommended'; //to translate $strRecommended = 'recommended'; //to translate
$strRelationDeleted = 'Relation deleted'; //to translate $strRelationDeleted = 'Relation deleted'; //to translate
@@ -1442,6 +1453,7 @@ $strSetupServers_relation_desc = 'Leave blank for no [a@http://wiki.phpmyadmin.n
$strSetupServers_relation_name = 'Relation table'; //to translate $strSetupServers_relation_name = 'Relation table'; //to translate
$strSetupServers_socket_desc = 'Socket on which MySQL server is listening, leave empty for default'; //to translate $strSetupServers_socket_desc = 'Socket on which MySQL server is listening, leave empty for default'; //to translate
$strSetupServers_socket_name = 'Server socket'; //to translate $strSetupServers_socket_name = 'Server socket'; //to translate
$strSetupServers_ssl_desc = 'Enable SSL for connection to MySQL server'; //to translate
$strSetupServers_ssl_name = 'Use SSL'; //to translate $strSetupServers_ssl_name = 'Use SSL'; //to translate
$strSetupServers_table_coords_desc = 'Leave blank for no PDF schema support, suggested: [kbd]pma_table_coords[/kbd]'; //to translate $strSetupServers_table_coords_desc = 'Leave blank for no PDF schema support, suggested: [kbd]pma_table_coords[/kbd]'; //to translate
$strSetupServers_table_coords_name = 'PDF schema: table coordinates'; //to translate $strSetupServers_table_coords_name = 'PDF schema: table coordinates'; //to translate
@@ -1542,6 +1554,7 @@ $strSynchronizationNote='Target database will be completely synchronized with so
$strTableAlterIndex = 'Alter index(s)'; //to translate $strTableAlterIndex = 'Alter index(s)'; //to translate
$strTableApplyIndex = 'Apply index(s)'; //to translate $strTableApplyIndex = 'Apply index(s)'; //to translate
$strTableDeleteRows = 'Would you like to delete all the previous rows from target tables?'; //to translate $strTableDeleteRows = 'Would you like to delete all the previous rows from target tables?'; //to translate
$strTargetDatabaseHasBeenSynchronized = 'Target database has been synchronized with source database'; //to translate
$strTexyText = 'Texy! text'; //to translate $strTexyText = 'Texy! text'; //to translate
$strToFromPage = 'to/from page'; //to translate $strToFromPage = 'to/from page'; //to translate
$strToSelectRelation = 'To select relation, click :'; //to translate $strToSelectRelation = 'To select relation, click :'; //to translate
@@ -1616,13 +1629,4 @@ $strXMLExportTables = 'Export tables'; //to translate
$strXMLExportTriggers = 'Export triggers'; //to translate $strXMLExportTriggers = 'Export triggers'; //to translate
$strXMLExportViews = 'Export views'; //to translate $strXMLExportViews = 'Export views'; //to translate
$strQueriesExecuted = 'The following queries have been executed:'; //to translate
$strHaveBeenSynchronized = 'Selected target tables have been synchronized with source tables.'; //to translate
$strDumpAllRows = 'Dump all rows'; //to translate
$strDifference = 'Difference'; //to translate
$strNotPresent = 'not present'; //to translate
$strSetupServers_ssl_desc = 'Enable SSL for connection to MySQL server'; //to translate
$strClickToSelect = 'Click to select'; //to translate
$strClickToUnselect = 'Click to unselect'; //to translate
$strTargetDatabaseHasBeenSynchronized = 'Target database has been synchronized with source database'; //to translate
?> ?>

File diff suppressed because it is too large Load Diff

View File

@@ -1,3 +1,4 @@
<?php
#!/bin/sh #!/bin/sh
# $Id$ # $Id$
## ##
@@ -27,7 +28,6 @@ sortlang()
targetdir=tmp-$f targetdir=tmp-$f
mkdir -p $targetdir mkdir -p $targetdir
TRANSLATIONSTRING='//.*translate.*$'
STRINGSTRING='^\$str[[:alnum:]_]+' STRINGSTRING='^\$str[[:alnum:]_]+'
WHITESPACE='^[[:blank:]]*$' WHITESPACE='^[[:blank:]]*$'
CVSID='/\* \$Id$ \*/' CVSID='/\* \$Id$ \*/'
@@ -35,7 +35,6 @@ sortlang()
echo -n "Extracting:" echo -n "Extracting:"
echo -n " head" echo -n " head"
egrep -i -v $TRANSLATIONSTRING $f | \ egrep -i -v $TRANSLATIONSTRING $f | \
egrep -v "$STRINGSTRING|$CVSID|\?>|<\?php" >> $targetdir/head
echo -n " cvs" echo -n " cvs"
egrep "$CVSID" $f >>$targetdir/cvs egrep "$CVSID" $f >>$targetdir/cvs
@@ -54,7 +53,6 @@ sortlang()
echo -n " pending_translations" echo -n " pending_translations"
if [ -s $targetdir/tmp-translate ] ; then if [ -s $targetdir/tmp-translate ] ; then
echo '// To translate:' > $targetdir/translate
specialsort $targetdir/tmp-translate $targetdir/translate specialsort $targetdir/tmp-translate $targetdir/translate
else else
echo -n > $targetdir/translate echo -n > $targetdir/translate
@@ -62,10 +60,8 @@ sortlang()
echo echo
echo "Assembling final" echo "Assembling final"
echo "<?php" > $f
cat $targetdir/cvs $targetdir/head $targetdir/sort $targetdir/translate \ cat $targetdir/cvs $targetdir/head $targetdir/sort $targetdir/translate \
| uniq >> $f | uniq >> $f
echo "?>" >> $f
rm -rf $targetdir rm -rf $targetdir
} }
@@ -81,3 +77,5 @@ do
fi fi
echo "-------------------------------------------------------------------" echo "-------------------------------------------------------------------"
done; done;
?>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,3 +1,4 @@
<?php
#!/bin/sh #!/bin/sh
# $Id$ # $Id$
## ##
@@ -10,7 +11,6 @@
## ##
srcfilelist=${@} srcfilelist=${@}
destfilelist="" destfilelist=""
translationmatch='//to translate'
suffixtoremove='.inc.php' suffixtoremove='.inc.php'
added=0 added=0
if [ -z "${srcfilelist}" ]; then if [ -z "${srcfilelist}" ]; then
@@ -29,3 +29,5 @@ destfilelist=`echo ${destfilelist} | xargs -n1 | egrep '.inc.php$'`
if [ ! -z "${destfilelist}" ]; then if [ ! -z "${destfilelist}" ]; then
grep -c -- "${translationmatch}" ${destfilelist} | sort -t':' -n +1 | sed -e "s/${suffixtoremove}//g" | xargs -n1 | egrep -v ':0$' grep -c -- "${translationmatch}" ${destfilelist} | sort -t':' -n +1 | sed -e "s/${suffixtoremove}//g" | xargs -n1 | egrep -v ':0$'
fi; fi;
?>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -283,6 +283,7 @@ function PMA_replication_gui_master_addslaveuser() {
. '<input type="hidden" name="createdb" id="createdb_0" value="0" />' . "\n" . '<input type="hidden" name="createdb" id="createdb_0" value="0" />' . "\n"
. '<input id="checkbox_Repl_slave_priv" type="hidden" title="Needed for the replication slaves." value="Y" name="Repl_slave_priv"/>'. "\n" . '<input id="checkbox_Repl_slave_priv" type="hidden" title="Needed for the replication slaves." value="Y" name="Repl_slave_priv"/>'. "\n"
. '<input id="checkbox_Repl_client_priv" type="hidden" title="Needed for the replication slaves." value="Y" name="Repl_client_priv"/>'. "\n" . '<input id="checkbox_Repl_client_priv" type="hidden" title="Needed for the replication slaves." value="Y" name="Repl_client_priv"/>'. "\n"
. '' . "\n"
. '<input type="hidden" name="sr_take_action" value="true" />'. "\n" . '<input type="hidden" name="sr_take_action" value="true" />'. "\n"
. '<div class="item">' . "\n" . '<div class="item">' . "\n"
. '<label for="select_pred_username">' . "\n" . '<label for="select_pred_username">' . "\n"

View File

@@ -1158,15 +1158,19 @@ if (isset($_REQUEST['synchronize_db'])) {
</tr> </tr>
<tr class="even" id="'.$type.'tr7" style="display: none;"> <tr class="even" id="'.$type.'tr7" style="display: none;">
<td>'. $GLOBALS['strDatabase']. '</td> <td>'. $GLOBALS['strDatabase']. '</td>
<td> <td>';
<select name="'.$type.'_db_sel"> if (count($databases)==2) {
'; echo $GLOBALS["strNoDatabaseAvailable"]; // TODO: move to LANG file
foreach ($databases as $db) { } else {
if ($db['SCHEMA_NAME'] != 'mysql' echo '
&& $db['SCHEMA_NAME'] != 'information_schema') { <select name="'.$type.'_db_sel">
echo ' <option>' . $db['SCHEMA_NAME'] . '</option>'."\n"; ';
} foreach ($databases as $db) {
} if ($db['SCHEMA_NAME'] != 'mysql'
&& $db['SCHEMA_NAME'] != 'information_schema')
echo ' <option>' . $db['SCHEMA_NAME'] . '</option>'."\n";
}
}
echo ' echo '
</select> </select>
</td> </td>