Merge remote branch 'upstream/master'

This commit is contained in:
Chanaka Indrajith 2012-07-30 01:58:58 +05:30
commit c433abda77
25 changed files with 925 additions and 199 deletions

View File

@ -1456,7 +1456,10 @@ class PMA_DisplayResults
&& ($direction != self::DISP_DIR_HORIZONTAL_FLIPPED)
) {
$comments_map = array();
if (isset($analyzed_sql[0]) && is_array($analyzed_sql[0]) && isset($analyzed_sql[0]['table_ref'])) {
if (isset($analyzed_sql[0])
&& is_array($analyzed_sql[0])
&& isset($analyzed_sql[0]['table_ref'])
) {
foreach ($analyzed_sql[0]['table_ref'] as $tbl) {
$tb = $tbl['table_true_name'];
$comments_map[$tb] = PMA_getComments($this->__get('_db'), $tb);
@ -3790,7 +3793,8 @@ class PMA_DisplayResults
$is_analyse = $this->__get('_is_analyse');
$field_flags = PMA_DBI_field_flags($dt_result, $col_index);
if (stristr($field_flags, self::BINARY_FIELD)
&& $GLOBALS['cfg']['ProtectBinary'] === 'all'
&& ($GLOBALS['cfg']['ProtectBinary'] == 'all'
|| $GLOBALS['cfg']['ProtectBinary'] == 'noblob')
) {
$class = str_replace('grid_edit', '', $class);
}

View File

@ -40,8 +40,10 @@ if (isset($mode)) {
die("<script>alert('Pages not found!');history.go(-2);</script>");
}
$pmd_table = $common_functions->backquote($GLOBALS['cfgRelation']['db']) . '.' . $common_functions->backquote($GLOBALS['cfgRelation']['designer_coords']);
$pma_table = $common_functions->backquote($GLOBALS['cfgRelation']['db']) . '.' . $common_functions->backquote($cfgRelation['table_coords']);
$pmd_table = $common_functions->backquote($GLOBALS['cfgRelation']['db']) . '.'
. $common_functions->backquote($GLOBALS['cfgRelation']['designer_coords']);
$pma_table = $common_functions->backquote($GLOBALS['cfgRelation']['db']) . '.'
. $common_functions->backquote($cfgRelation['table_coords']);
$scale_q = $common_functions->sqlAddSlashes($scale);
if ('create_export' == $mode) {
@ -57,7 +59,12 @@ if (isset($mode)) {
$pdf_page_number_q = $common_functions->sqlAddSlashes($pdf_page_number);
if ('export' == $mode) {
$sql = "REPLACE INTO " . $pma_table . " (db_name, table_name, pdf_page_number, x, y) SELECT db_name, table_name, " . $pdf_page_number_q . ", ROUND(x/" . $scale_q . ") , ROUND(y/" . $scale_q . ") y FROM " . $pmd_table . " WHERE db_name = '" . $common_functions->sqlAddSlashes($db) . "'";
$sql = "REPLACE INTO " . $pma_table
. " (db_name, table_name, pdf_page_number, x, y)"
. " SELECT db_name, table_name, " . $pdf_page_number_q . ","
. " ROUND(x/" . $scale_q . ") , ROUND(y/" . $scale_q . ") y"
. " FROM " . $pmd_table
. " WHERE db_name = '" . $common_functions->sqlAddSlashes($db) . "'";
PMA_queryAsControlUser($sql, true, PMA_DBI_QUERY_STORE);
}
@ -72,7 +79,7 @@ if (isset($mode)) {
AND
' . $pmd_table . '.`table_name` = ' . $pma_table . '.`table_name`
AND
' . $pmd_table . '.`db_name`=\''. $common_functions->sqlAddSlashes($db) .'\'
' . $pmd_table . '.`db_name`=\''. $common_functions->sqlAddSlashes($db) . '\'
AND pdf_page_number = ' . $pdf_page_number_q . ';',
true, PMA_DBI_QUERY_STORE
);

View File

@ -35,14 +35,14 @@ if ($common_functions->isForeignKeySupported($type_T1)
) {
PMD_return_new(0, __('Error: relation already exists.'));
}
// note: in InnoDB, the index does not requires to be on a PRIMARY
// or UNIQUE key
// improve: check all other requirements for InnoDB relations
// note: in InnoDB, the index does not requires to be on a PRIMARY
// or UNIQUE key
// improve: check all other requirements for InnoDB relations
$result = PMA_DBI_query(
'SHOW INDEX FROM ' . $common_functions->backquote($db)
. '.' . $common_functions->backquote($T1) . ';'
);
$index_array1 = array(); // will be use to emphasis prim. keys in the table view
$index_array1 = array(); // will be use to emphasis prim. keys in the table view
while ($row = PMA_DBI_fetch_assoc($result)) {
$index_array1[$row['Column_name']] = 1;
}
@ -52,7 +52,7 @@ if ($common_functions->isForeignKeySupported($type_T1)
'SHOW INDEX FROM ' . $common_functions->backquote($db)
. '.' . $common_functions->backquote($T2) . ';'
);
$index_array2 = array(); // will be used to emphasis prim. keys in the table view
$index_array2 = array(); // will be used to emphasis prim. keys in the table view
while ($row = PMA_DBI_fetch_assoc($result)) {
$index_array2[$row['Column_name']] = 1;
}
@ -76,11 +76,9 @@ if ($common_functions->isForeignKeySupported($type_T1)
}
$upd_query .= ';';
PMA_DBI_try_query($upd_query) or PMD_return_new(0, __('Error: Relation not added.'));
PMD_return_new(1, __('FOREIGN KEY relation added'));
PMD_return_new(1, __('FOREIGN KEY relation added'));
}
// internal (pmadb) relation
} else {
} else { // internal (pmadb) relation
if ($GLOBALS['cfgRelation']['relwork'] == false) {
PMD_return_new(0, _('General relation features') . ':' . _('Disabled'));
} else {
@ -102,7 +100,7 @@ if ($common_functions->isForeignKeySupported($type_T1)
} else {
PMD_return_new(0, __('Error: Relation not added.'));
}
}
}
}
function PMD_return_new($b,$ret)

View File

@ -38,17 +38,20 @@ foreach ($post_params as $one_post_param) {
}
foreach ($t_x as $key => $value) {
$KEY = empty($IS_AJAX) ? urldecode($key) : $key; // table name decode (post PDF exp/imp)
// table name decode (post PDF exp/imp)
$KEY = empty($IS_AJAX) ? urldecode($key) : $key;
list($DB,$TAB) = explode(".", $KEY);
PMA_queryAsControlUser(
'DELETE FROM ' . $common_functions->backquote($GLOBALS['cfgRelation']['db']) . '.' . $common_functions->backquote($GLOBALS['cfgRelation']['designer_coords'])
'DELETE FROM ' . $common_functions->backquote($GLOBALS['cfgRelation']['db'])
. '.' . $common_functions->backquote($GLOBALS['cfgRelation']['designer_coords'])
. ' WHERE `db_name` = \'' . $common_functions->sqlAddSlashes($DB) . '\''
. ' AND `table_name` = \'' . $common_functions->sqlAddSlashes($TAB) . '\'',
true, PMA_DBI_QUERY_STORE
);
PMA_queryAsControlUser(
'INSERT INTO ' . $common_functions->backquote($GLOBALS['cfgRelation']['db']) . '.' . $common_functions->backquote($GLOBALS['cfgRelation']['designer_coords'])
'INSERT INTO ' . $common_functions->backquote($GLOBALS['cfgRelation']['db'])
. '.' . $common_functions->backquote($GLOBALS['cfgRelation']['designer_coords'])
. ' (db_name, table_name, x, y, v, h)'
. ' VALUES ('
. '\'' . $common_functions->sqlAddSlashes($DB) . '\', '

186
po/ca.po
View File

@ -4,7 +4,7 @@ msgstr ""
"Project-Id-Version: phpMyAdmin 4.0.0-dev\n"
"Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\n"
"POT-Creation-Date: 2012-07-27 10:40+0200\n"
"PO-Revision-Date: 2012-07-26 17:20+0200\n"
"PO-Revision-Date: 2012-07-27 16:04+0200\n"
"Last-Translator: Xavier Navarro <xvnavarro@gmail.com>\n"
"Language-Team: catalan <ca@li.org>\n"
"Language: ca\n"
@ -3266,7 +3266,7 @@ msgstr "Ordre del llistat:"
#: libraries/TableSearch.class.php:856
msgid "Use this column to label each point"
msgstr ""
msgstr "Utilitza aquesta columna per etiquetar cada punt"
#: libraries/TableSearch.class.php:877
msgid "Maximum rows to plot"
@ -3293,7 +3293,7 @@ msgstr "Fer una \"petició segons exemple\" (comodí: \"%\")"
#: libraries/TableSearch.class.php:1198
msgid "Browse/Edit the points"
msgstr ""
msgstr "Veure/editar els punts"
#: libraries/TableSearch.class.php:1205
msgid "How to use"
@ -10474,6 +10474,8 @@ msgid ""
"The Advisor system can provide recommendations on server variables by "
"analyzing the server status variables."
msgstr ""
"El sistema de consells pot proporcionar recomanacions sobre les variables "
"del servidor mitjançant l'anàlisi de les variables d'estat del servidor."
#: server_status.php:930
msgid ""
@ -10481,6 +10483,9 @@ msgid ""
"calculations and by rule of thumb which may not necessarily apply to your "
"system."
msgstr ""
"Tingues en compte però que aquest sistema ofereix recomanacions basades en "
"càlculs senzills i regles generals que no necessàriament s'apliquen al seu "
"sistema."
#: server_status.php:932
msgid ""
@ -10488,6 +10493,10 @@ msgid ""
"changing (by reading the documentation) and how to undo the change. Wrong "
"tuning can have a very negative effect on performance."
msgstr ""
"Abans de canviar qualsevol configuració, assegura't de saber què estàs "
"canviant (mitjançant la lectura de la documentació) i cóm desfer el canvi. "
"Establir ajustaments incorrectes pot tenir un efecte molt negatiu en el "
"rendiment."
#: server_status.php:934
msgid ""
@ -10495,6 +10504,9 @@ msgid ""
"time, observe or benchmark your database, and undo the change if there was "
"no clearly measurable improvement."
msgstr ""
"La millor manera d'ajustar el sistema seria canviar només una configuració "
"al mateix temps, observar o mesurar la teva base de dades, i desfer el canvi "
"si no hi ha una millora clarament mesurable."
#. l10n: Questions is the name of a MySQL Status variable
#: server_status.php:957
@ -11345,6 +11357,11 @@ msgid ""
"enabled. Note however, that the general_log produces a lot of data and "
"increases server load by up to 15%"
msgstr ""
"El monitor de phpMyAdmin pot ajudar a optimitzar la configuració del "
"servidor i localitzar a temps les consultes intensives. En aquest darrer cas "
"s'haurà d'establir log_output a 'TABLE' i tenir el slow_query_log o "
"general_log habilitat. Noteu però, que la general_log produeix una gran "
"quantitat de dades i augmenta la càrrega del servidor fins en un 15%"
#: server_status.php:1689
msgid ""
@ -11353,10 +11370,15 @@ msgid ""
"table is supported by MySQL 5.1.6 and onwards. You may still use the server "
"charting features however."
msgstr ""
"Lamentablement, el teu servidor de bases de dades no és compatible amb el "
"registre a la taula, que és un requisit per a l'anàlisi dels registres de "
"base de dades amb phpMyAdmin. El registre a la taula se suporta a partir de "
"MySQL 5.1.6 i següents. Pots seguir utilitzant però les funcions de gràfics "
"de servidor."
#: server_status.php:1702
msgid "Using the monitor:"
msgstr ""
msgstr "Utilitzant el monitor:"
#: server_status.php:1704
msgid ""
@ -11364,6 +11386,10 @@ msgid ""
"may add charts and change the refresh rate under 'Settings', or remove any "
"chart using the cog icon on each respective chart."
msgstr ""
"El teu navegador actualitzarà tots els gràfics que es mostren en un interval "
"regular. Pots afegir gràfics i canviar la freqüència d'actualització a la "
"secció 'Configuració', o eliminar qualsevol gràfic amb la icona d'engranatge "
"en cada gràfic corresponent."
#: server_status.php:1706
msgid ""
@ -11372,10 +11398,15 @@ msgid ""
"confirmed, this will load a table of grouped queries, there you may click on "
"any occuring SELECT statements to further analyze them."
msgstr ""
"Per mostrar les consultes dels registres, selecciona l'interval de temps "
"rellevant en qualsevol gràfic mantenint premut el botó esquerre del ratolí i "
"arrosegant sobre el gràfic. Un cop confirmat, això carregarà una taula de "
"consultes agrupades, on podràs clicar en qualsevol de les instruccions "
"SELECT per analitzar-la amb més detall."
#: server_status.php:1713
msgid "Please note:"
msgstr ""
msgstr "Tingueu en compte:"
#: server_status.php:1715
msgid ""
@ -11384,6 +11415,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 ""
"Activar el general_log pot augmentar la càrrega del servidor en un 5-15%. "
"També tingues en compte que la generació d'estadístiques dels registres és "
"una tasca de càrrega intensiva, pel que és aconsellable seleccionar només un "
"lapse de temps petit i per desactivar el general_log i buidar la taula una "
"vegada que el monitoratge no es requereixi més."
#: server_status.php:1729
msgid "Preset chart"
@ -11399,7 +11435,7 @@ msgstr "Seleccionar series:"
#: server_status.php:1737
msgid "Commonly monitored"
msgstr ""
msgstr "Comunment monitoritzat"
#: server_status.php:1752
msgid "or type variable name:"
@ -11407,15 +11443,15 @@ msgstr "o escriu el nom de variable:"
#: server_status.php:1756
msgid "Display as differential value"
msgstr ""
msgstr "Mostra com a valor diferencial"
#: server_status.php:1758
msgid "Apply a divisor"
msgstr ""
msgstr "Aplicar un divisor"
#: server_status.php:1765
msgid "Append unit to data values"
msgstr ""
msgstr "Afegir unitat als valors"
#: server_status.php:1771
msgid "Add this series"
@ -11423,7 +11459,7 @@ msgstr "Afegir aquesta serie"
#: server_status.php:1773
msgid "Clear series"
msgstr ""
msgstr "Buidar sèrie"
#: server_status.php:1776
msgid "Series in Chart:"
@ -11439,19 +11475,21 @@ msgstr "Rang de temps seleccionat:"
#: server_status.php:1797
msgid "Only retrieve SELECT,INSERT,UPDATE and DELETE Statements"
msgstr ""
msgstr "Només recuperar instruccions SELECT, INSERT, UPDATE i DELETE"
#: server_status.php:1802
msgid "Remove variable data in INSERT statements for better grouping"
msgstr ""
"Elimina dades variables en les instruccions INSERT per a una millor "
"agrupació"
#: server_status.php:1807
msgid "Choose from which log you want the statistics to be generated from."
msgstr ""
msgstr "Tria de quin registre vols que es generin les estadístiques."
#: server_status.php:1809
msgid "Results are grouped by query text."
msgstr ""
msgstr "Els resultats s'agrupen pel text de la consulta."
#: server_status.php:1814
msgid "Query analyzer"
@ -11587,7 +11625,7 @@ msgstr ""
#: server_variables.php:87
msgid "Setting variable failed"
msgstr ""
msgstr "Errada a la configuració de la variable"
#: server_variables.php:100
msgid "Server variables and settings"
@ -11608,6 +11646,8 @@ msgstr "Descarrega"
#: setup/frames/form.inc.php:25
msgid "Incorrect formset, check $formsets array in setup/frames/form.inc.php"
msgstr ""
"Conjunt de formularis incorrecte, comprova l'array $formsets a l'arxiu "
"setup/frames/form.inc.php"
#: setup/frames/index.inc.php:51
msgid "Cannot load or save configuration"
@ -11655,6 +11695,9 @@ msgid ""
"Configuration saved to file config/config.inc.php in phpMyAdmin top level "
"directory, copy it to top level one and delete directory config to use it."
msgstr ""
"Configuració desada a l'arxiu config/config.inc.php dins el directori arrel "
"de phpMyAdmin, copia'l al nivell superior i elimina el directori de "
"configuració per utilitzar-lo."
#: setup/frames/index.inc.php:107 setup/frames/menu.inc.php:16
msgid "Overview"
@ -11718,7 +11761,7 @@ msgstr "Afegir un nou servidor"
#: setup/index.php:22
msgid "Wrong GET file attribute value"
msgstr ""
msgstr "Valor incorrecte d'atribut d'arxiu en GET"
#: setup/lib/form_processing.lib.php:43
msgid "Warning"
@ -12016,7 +12059,7 @@ msgstr "Títol del gràfic"
#: tbl_chart.php:106
msgid "X-Axis:"
msgstr ""
msgstr "Eix X:"
#: tbl_chart.php:121
msgid "Series:"
@ -12278,7 +12321,7 @@ msgstr "Mida de fila"
#: tbl_printview.php:406 tbl_structure.php:963
msgid "Next autoindex"
msgstr ""
msgstr "AUTOINDEX Següent"
#: tbl_relation.php:281
#, php-format
@ -12304,7 +12347,7 @@ msgstr "Límit de clau externa"
#: tbl_structure.php:154 tbl_structure.php:159 tbl_structure.php:601
msgid "Spatial"
msgstr ""
msgstr "Espacial"
#: tbl_structure.php:161 tbl_structure.php:165
#, fuzzy
@ -12590,22 +12633,26 @@ msgstr "Reanomena la vista a"
#: libraries/advisory_rules.txt:49
msgid "Uptime below one day"
msgstr ""
msgstr "Temps d'activitat per sota d'un dia"
#: libraries/advisory_rules.txt:52
msgid "Uptime is less than 1 day, performance tuning may not be accurate."
msgstr ""
"El temps d'activitat és inferior a 1 dia, l'optimització del rendiment pot "
"no ser exacta."
#: libraries/advisory_rules.txt:53
msgid ""
"To have more accurate averages it is recommended to let the server run for "
"longer than a day before running this analyzer"
msgstr ""
"Per tenir unes mitjanes més exactes, es recomana deixar que el servidor "
"funcioni durant més d'un dia abans d'executar aquest analitzador"
#: libraries/advisory_rules.txt:54
#, php-format
msgid "The uptime is only %s"
msgstr ""
msgstr "El temps d'activitat només és de %s"
#: libraries/advisory_rules.txt:56
msgid "Questions below 1,000"
@ -12616,12 +12663,16 @@ msgid ""
"Fewer than 1,000 questions have been run against this server. The "
"recommendations may not be accurate."
msgstr ""
"S'han fet menys de 1.000 consultes en aquest servidor. Les recomanacions "
"poden no ser exactes."
#: libraries/advisory_rules.txt:60
msgid ""
"Let the server run for a longer time until it has executed a greater amount "
"of queries."
msgstr ""
"Deixa que el servidor s'executi per més temps fins que s'hagi dut a terme "
"una major quantitat de consultes."
#: libraries/advisory_rules.txt:61
#, php-format
@ -12636,17 +12687,22 @@ msgstr "Percentatge de consultes lentes"
msgid ""
"There is a lot of slow queries compared to the overall amount of Queries."
msgstr ""
"Hi ha una gran quantitat de consultes lentes (slow-queries) en comparació "
"amb la quantitat total de consultes."
#: libraries/advisory_rules.txt:67 libraries/advisory_rules.txt:74
msgid ""
"You might want to increase {long_query_time} or optimize the queries listed "
"in the slow query log"
msgstr ""
"Podries augmentar la variable {long_query_time} o optimitzar les consultes "
"que figuren en el registre de consultes lentes"
#: libraries/advisory_rules.txt:68
#, php-format
msgid "The slow query rate should be below 5%%, your value is %s%%."
msgstr ""
"La taxa de consultes lentes ha de ser inferior al 5%%, el teu valor és %s%%."
#: libraries/advisory_rules.txt:70
msgid "Slow query rate"
@ -12656,6 +12712,8 @@ msgstr "Freqüència de consultes lentes"
msgid ""
"There is a high percentage of slow queries compared to the server uptime."
msgstr ""
"Hi ha un alt percentatge de consultes lentes en comparació amb el temps "
"d'activitat del servidor."
#: libraries/advisory_rules.txt:75
#, php-format
@ -12663,6 +12721,8 @@ msgid ""
"You have a slow query rate of %s per hour, you should have less than 1%% per "
"hour."
msgstr ""
"Tens una taxa de consultes lentes de %s per hora, hauries de tenir menys de "
"l'1%% per hora."
#: libraries/advisory_rules.txt:77
msgid "Long query time"
@ -12673,40 +12733,44 @@ msgid ""
"long_query_time is set to 10 seconds or more, thus only slow queries that "
"take above 10 seconds are logged."
msgstr ""
"long_query_time s'estableix en 10 segons o més, per tant, només entrarà les "
"consultes lentes que triguin més de 10 segons."
#: libraries/advisory_rules.txt:81
msgid ""
"It is suggested to set {long_query_time} to a lower value, depending on your "
"environment. Usually a value of 1-5 seconds is suggested."
msgstr ""
"Es suggereix establir {long_query_time} a un valor inferior, depenent del "
"teu entorn. En general, es recomana un valor de 1-5 segons."
#: libraries/advisory_rules.txt:82
#, fuzzy, php-format
#, php-format
#| msgid "long_query_time is set to %d second(s)."
msgid "long_query_time is currently set to %ds."
msgstr "«long_query_time» està configurat a %d segon(s)."
msgstr "long_query_time està configurat a %ds."
#: libraries/advisory_rules.txt:84
msgid "Slow query logging"
msgstr "Registre de consultes lentes"
#: libraries/advisory_rules.txt:87
#, fuzzy
#| msgid "slow_query_log is enabled."
msgid "The slow query log is disabled."
msgstr "«slow_query_log» està actiu."
msgstr "El registre de consultes lentes està desactivat."
#: libraries/advisory_rules.txt:88
msgid ""
"Enable slow query logging by setting {log_slow_queries} to 'ON'. This will "
"help troubleshooting badly performing queries."
msgstr ""
"Habilita el registre de consultes lentes establint {log_slow_queries} a "
"'ON'. Això t'ajudarà a solucionar les consultes amb mal rendiment."
#: libraries/advisory_rules.txt:89
#, fuzzy
#| msgid "long_query_time is set to %d second(s)."
msgid "log_slow_queries is set to 'OFF'"
msgstr "«long_query_time» està configurat a %d segon(s)."
msgstr "log_slow_queries està a 'OFF'"
#: libraries/advisory_rules.txt:93
msgid "Release Series"
@ -12714,13 +12778,15 @@ msgstr "Serie de versions"
#: libraries/advisory_rules.txt:96
msgid "The MySQL server version less than 5.1."
msgstr ""
msgstr "La versió del servidor MySQL és inferior a 5.1."
#: libraries/advisory_rules.txt:97
msgid ""
"You should upgrade, as MySQL 5.1 has improved performance, and MySQL 5.5 "
"even more so."
msgstr ""
"Hauries d'actualitzar, ja que MySQL 5.1 té millor rendiment, i encara és "
"millor en MySQL 5.5."
#: libraries/advisory_rules.txt:98 libraries/advisory_rules.txt:105
#: libraries/advisory_rules.txt:112
@ -12734,17 +12800,19 @@ msgstr "Versió menor"
#: libraries/advisory_rules.txt:103
msgid "Version less than 5.1.30 (the first GA release of 5.1)."
msgstr ""
msgstr "Versió inferior a 5.1.30 (la primera versió disponible pública de 5.1)."
#: libraries/advisory_rules.txt:104
msgid ""
"You should upgrade, as recent versions of MySQL 5.1 have improved "
"performance and MySQL 5.5 even more so."
msgstr ""
"Hauries d'actualitzar, ja que les darreres versions de MySQL 5.1 tenen "
"millor rendiment, i MySQL 5.05 encara més."
#: libraries/advisory_rules.txt:110
msgid "Version less than 5.5.8 (the first GA release of 5.5)."
msgstr ""
msgstr "Versió inferior a 5.5.8 (la primera versió disponible pública de 5.5)."
#: libraries/advisory_rules.txt:111
msgid "You should upgrade, to a stable version of MySQL 5.5"
@ -12757,7 +12825,7 @@ msgstr "Distribució"
#: libraries/advisory_rules.txt:117
msgid "Version is compiled from source, not a MySQL official binary."
msgstr ""
msgstr "Versió compilada des del codi font, no és un binari oficial de MySQL."
#: libraries/advisory_rules.txt:118
msgid ""
@ -12765,31 +12833,39 @@ msgid ""
"distribution. The MySQL manual only is accurate for official MySQL binaries, "
"not any package distributions (such as RedHat, Debian/Ubuntu etc)."
msgstr ""
"Si no vas compilar des del codi font, potser estàs utilitzant un paquet "
"modificat per una distribució. El manual de MySQL només és exacte per als "
"binaris de MySQL oficials, no per els paquets de distribucions (com RedHat, "
"Debian/Ubuntu, etc)."
#: libraries/advisory_rules.txt:119
msgid "'source' found in version_comment"
msgstr ""
"S'ha trobat \"font\" (\"source\") en el comentari de la versió "
"(\"version_comment\")"
#: libraries/advisory_rules.txt:124 libraries/advisory_rules.txt:131
msgid "The MySQL manual only is accurate for official MySQL binaries."
msgstr ""
msgstr "El manual de MySQL només és exacte per als binaris oficials de MySQL."
#: libraries/advisory_rules.txt:125
msgid "Percona documentation is at http://www.percona.com/docs/wiki/"
msgstr ""
msgstr "La documentació de Percona es troba a http://www.percona.com/docs/wiki/"
#: libraries/advisory_rules.txt:126
msgid "'percona' found in version_comment"
msgstr ""
msgstr "S'ha trobat 'percona' als comentaris de la versió (\"version_comment\")"
#: libraries/advisory_rules.txt:132
msgid "Drizzle documentation is at http://docs.drizzle.org/"
msgstr ""
msgstr "La documentació de Drizzle es troba a http://docs.drizzle.org/"
#: libraries/advisory_rules.txt:133
#, php-format
msgid "Version string (%s) matches Drizzle versioning scheme"
msgstr ""
"La cadena de la versió (%s) coincideix amb el sistema de control de versions "
"de Drizzle"
#: libraries/advisory_rules.txt:135
msgid "MySQL Architecture"
@ -12797,7 +12873,7 @@ msgstr "Arquitectura MySQL"
#: libraries/advisory_rules.txt:138
msgid "MySQL is not compiled as a 64-bit package."
msgstr ""
msgstr "MySQL no s'ha compilat com a paquet de 64 bits."
#: libraries/advisory_rules.txt:139
msgid ""
@ -12805,11 +12881,15 @@ msgid ""
"so MySQL might not be able to access all of your memory. You might want to "
"consider installing the 64-bit version of MySQL."
msgstr ""
"La teva capacitat de memòria és superior a 3 GiB (suposant que el servidor "
"està en localhost), de manera que MySQL no podria ser capaç d'accedir a la "
"totalitat de la seva memòria. És possible que vulgueu considerar la "
"instal·lació de la versió de 64 bits de MySQL."
#: libraries/advisory_rules.txt:140
#, php-format
msgid "Available memory on this host: %s"
msgstr ""
msgstr "Memòria disponible en aquest servidor: %s"
#: libraries/advisory_rules.txt:146
msgid "Query cache disabled"
@ -12826,20 +12906,23 @@ msgid ""
"and setting {query_cache_type} to 'ON'. <b>Note:</b> If you are using "
"memcached, ignore this recommendation."
msgstr ""
"Se sap que la memòria cau de consultes millora en gran mesura el rendiment "
"si s'ha configurat correctament. Activa'l mitjançant l'establiment de "
"{query_cache_size} a un valor MIB de 2 dígits i ajusta {query_cache_type} a "
"'ON'. <b>Nota:</b> Si utilitzes memcached, ignora aquesta recomanació."
#: libraries/advisory_rules.txt:151
msgid "query_cache_size is set to 0 or query_cache_type is set to 'OFF'"
msgstr ""
msgstr "query_cache_size s'estableix a 0 o query_cache_type està a 'OFF'"
#: libraries/advisory_rules.txt:153
msgid "Query caching method"
msgstr "Mètode de cau de consultes"
#: libraries/advisory_rules.txt:156
#, fuzzy
#| msgid "Query cache"
msgid "Suboptimal caching method."
msgstr "Memòria cau de consultes"
msgstr "Mètode d'emmagatzematge en memòria cau subòptima."
#: libraries/advisory_rules.txt:157
msgid ""
@ -12848,6 +12931,11 @@ msgid ""
"refman/5.5/en/ha-memcached.html\">memcached</a> instead of the MySQL Query "
"cache, especially if you have multiple slaves."
msgstr ""
"Estàs utilitzant la memòria cau de consultes de MySQL amb una base de dades "
"de força transit. Valdria la pena considerar l'ús <a "
"href=\"http://dev.mysql.com/doc/refman/5.5/en/ha-"
"memcached.html\">memcached</a> en lloc de la memòria cau de consultes de "
"MySQL, especialment si tens diversos servidors esclaus."
#: libraries/advisory_rules.txt:158
#, php-format
@ -12855,6 +12943,8 @@ msgid ""
"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."
msgstr ""
"La memòria cau de consultes està activat i el servidor rep %d consultes per "
"segon. Aquesta regla es dispara si hi ha més de 100 consultes per segon."
#: libraries/advisory_rules.txt:160
#, php-format
@ -12864,16 +12954,19 @@ msgstr "Eficiència del cau de consultes (%%)"
#: libraries/advisory_rules.txt:163
msgid "Query cache not running efficiently, it has a low hit rate."
msgstr ""
"La memòria cau de consulta no s'executa de manera eficient, té una taxa "
"d'èxit baixa."
#: libraries/advisory_rules.txt:164
msgid "Consider increasing {query_cache_limit}."
msgstr ""
msgstr "Pensa en la possibilitat d'augmentar {query_cache_limit}."
#: libraries/advisory_rules.txt:165
#, fuzzy, php-format
#, php-format
#| msgid "Sort buffer size"
msgid "The current query cache hit rate of %s%% is below 20%%"
msgstr "Tamany de l'àrea de classificació"
msgstr ""
"L'actual taxa d'èxit de la memòria cau de consultes %s%% és inferior al 20%%"
#: libraries/advisory_rules.txt:167
msgid "Query Cache usage"
@ -12882,13 +12975,15 @@ msgstr "Ús del cau de consultes"
#: libraries/advisory_rules.txt:170
#, php-format
msgid "Less than 80%% of the query cache is being utilized."
msgstr ""
msgstr "S'utilitza menys del 80%% de la memòria cau de consultes."
#: libraries/advisory_rules.txt:171
msgid ""
"This might be caused by {query_cache_limit} being too low. Flushing the "
"query cache might help as well."
msgstr ""
"Això pot ser causat perque el valor de {query_cache_limit} és massa baix. "
"Buidar la memòria cau de consulta també pot ajudar."
#: libraries/advisory_rules.txt:172
#, php-format
@ -12896,16 +12991,17 @@ msgid ""
"The current ratio of free query cache memory to total query cache size is %s"
"%%. It should be above 80%%"
msgstr ""
"La taxa actual de memòria lluire del cau de consultes respecte la mida total "
"és de %s%%. Hauria de estar per sobre de 80%%"
#: libraries/advisory_rules.txt:174
msgid "Query cache fragmentation"
msgstr "Fragmentació del cau de consultes"
#: libraries/advisory_rules.txt:177
#, fuzzy
#| msgid "The server is not responding"
msgid "The query cache is considerably fragmented."
msgstr "El servidor no respon"
msgstr "La memòria cau de consultes està bastant fragmentada."
#: libraries/advisory_rules.txt:178
msgid ""

View File

@ -4,7 +4,7 @@ msgstr ""
"Project-Id-Version: phpMyAdmin 4.0.0-dev\n"
"Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\n"
"POT-Creation-Date: 2012-07-27 10:40+0200\n"
"PO-Revision-Date: 2012-07-09 17:51+0200\n"
"PO-Revision-Date: 2012-07-27 18:07+0200\n"
"Last-Translator: Matías Bellone <matiasbellone@gmail.com>\n"
"Language-Team: spanish <es@li.org>\n"
"Language: es\n"
@ -7772,10 +7772,9 @@ msgstr ""
"clave)</i>"
#: libraries/plugins/export/ExportSql.class.php:354
#, fuzzy
#| msgid "Object creation options"
msgid "Data creation options"
msgstr "Opciones de creación de objetos"
msgstr "Opciones de creación de datos"
#: libraries/plugins/export/ExportSql.class.php:358
#: libraries/plugins/export/ExportSql.class.php:1573

View File

@ -4,8 +4,8 @@ msgstr ""
"Project-Id-Version: phpMyAdmin 4.0.0-dev\n"
"Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\n"
"POT-Creation-Date: 2012-07-27 10:40+0200\n"
"PO-Revision-Date: 2012-07-09 16:04+0200\n"
"Last-Translator: Nicholas Arnesen <baretester@live.no>\n"
"PO-Revision-Date: 2012-07-28 19:19+0200\n"
"Last-Translator: Stian Berg <mail.to.stian@gmail.com>\n"
"Language-Team: norwegian <no@li.org>\n"
"Language: nb\n"
"MIME-Version: 1.0\n"
@ -2708,16 +2708,14 @@ msgid "Inside column:"
msgstr "I kolonne:"
#: libraries/DisplayResults.class.php:683
#, fuzzy
#| msgid "Save directory"
msgid "Save edited data"
msgstr "Lagringsmappe"
msgstr "Lagre redigerte data"
#: libraries/DisplayResults.class.php:689
#, fuzzy
#| msgid "CHAR textarea columns"
msgid "Restore column order"
msgstr "CHAR textarea kolonner"
msgstr "Tilbakestill kolonnerekkefølge"
#: libraries/DisplayResults.class.php:889
#, fuzzy
@ -2726,16 +2724,14 @@ msgid "Start row"
msgstr "CHAR textarea rader"
#: libraries/DisplayResults.class.php:893
#, fuzzy
#| msgid "Number of rows:"
msgid "Number of rows"
msgstr "Antall rader:"
msgstr "Antall rader"
#: libraries/DisplayResults.class.php:902
#, fuzzy
#| msgid "More"
msgid "Mode"
msgstr "Mer"
msgstr "Modus"
#: libraries/DisplayResults.class.php:904
msgid "horizontal"
@ -2752,7 +2748,7 @@ msgstr "loddrett"
#: libraries/DisplayResults.class.php:918
#, php-format
msgid "Headers every %s rows"
msgstr ""
msgstr "Topptekst hver %s. rad"
#: libraries/DisplayResults.class.php:1214
msgid "Sort by key"
@ -2789,10 +2785,9 @@ msgstr "Innstillinger"
#: libraries/DisplayResults.class.php:1567
#: libraries/DisplayResults.class.php:1673
#, fuzzy
#| msgid "Partial Texts"
msgid "Partial texts"
msgstr "Delvis tekst"
msgstr "Delvise tekster"
#: libraries/DisplayResults.class.php:1568
#: libraries/DisplayResults.class.php:1677
@ -2830,11 +2825,11 @@ msgstr "Nettvisertransformasjon"
#: libraries/DisplayResults.class.php:1625
msgid "Well Known Text"
msgstr ""
msgstr "Velkjent Tekst"
#: libraries/DisplayResults.class.php:1626
msgid "Well Known Binary"
msgstr ""
msgstr "Velkjent Binær"
#: libraries/DisplayResults.class.php:3157
#: libraries/DisplayResults.class.php:3173
@ -2885,13 +2880,12 @@ msgstr "Vis PDF-skjema"
#: libraries/DisplayResults.class.php:5109
msgid "Visualize GIS data"
msgstr ""
msgstr "Visualiser GIS data"
#: libraries/DisplayResults.class.php:5142 view_create.php:122
#, fuzzy
#| msgid "Create User"
msgid "Create view"
msgstr "Opprett bruker"
msgstr "Opprett view"
#: libraries/DisplayResults.class.php:5335
msgid "Link not found"
@ -5185,6 +5179,8 @@ msgid ""
"Structure page if any of the required tables for the phpMyAdmin "
"configuration storage could not be found"
msgstr ""
"Deaktiver varselet som vises på databasedetaljsiden Struktur om det er noen "
"påkrevde tabeller for phpMyAdmins konfigurasjonslager som ikke ble funnet"
#: libraries/config/messages.inc.php:338
msgid "Missing phpMyAdmin configuration storage tables"
@ -5240,10 +5236,9 @@ msgid "Query window height"
msgstr "Høyde på spørringsvindu"
#: libraries/config/messages.inc.php:352
#, fuzzy
#| msgid "Query window"
msgid "Query window width (in pixels)"
msgstr "Spørringsvindu"
msgstr "Bredde på spørringsvindu (i piksler)"
#: libraries/config/messages.inc.php:353
msgid "Query window width"
@ -5278,7 +5273,7 @@ msgstr "Gjenta topptekst"
#: libraries/config/messages.inc.php:361
msgid "Save all edited cells at once"
msgstr ""
msgstr "Ikke lagre endrede celler umiddelbart"
#: libraries/config/messages.inc.php:362
msgid "Directory where exports can be saved on server"
@ -5293,20 +5288,18 @@ msgid "Leave blank if not used"
msgstr "La stå tom hvis ikke brukt"
#: libraries/config/messages.inc.php:365
#, fuzzy
#| msgid "Host authentication order"
msgid "Host authorization order"
msgstr "Rekkefølge for vertsautentisering"
msgstr "Rekkefølge for vertsautorisering"
#: libraries/config/messages.inc.php:366
msgid "Leave blank for defaults"
msgstr "La stå tom for standard"
#: libraries/config/messages.inc.php:367
#, fuzzy
#| msgid "Host authentication rules"
msgid "Host authorization rules"
msgstr "Vertsautentiseringsregler"
msgstr "Regler for vertsautorisering"
#: libraries/config/messages.inc.php:368
msgid "Allow logins without a password"
@ -5574,10 +5567,9 @@ msgstr ""
"La stå tom for ingen SQL spørringshistorie, anbefalt: [kbd]pma_tracking[/kbd]"
#: libraries/config/messages.inc.php:419
#, fuzzy
#| msgid "Recall user name"
msgid "Recently used table"
msgstr "Husk brukernavn"
msgstr "Nylig brukt tabell"
#: libraries/config/messages.inc.php:420
msgid ""
@ -5858,10 +5850,9 @@ msgid "Whether to show hint or not"
msgstr ""
#: libraries/config/messages.inc.php:473
#, fuzzy
#| msgid "Show grid"
msgid "Show hint"
msgstr "Vis rutenett"
msgstr "Vis hint"
#: libraries/config/messages.inc.php:474
msgid ""
@ -6116,10 +6107,9 @@ msgid "Cookie authentication"
msgstr "Autentisering informasjonskapsler"
#: libraries/config/setup.forms.php:48
#, fuzzy
#| msgid "Host authentication order"
msgid "HTTP authentication"
msgstr "Rekkefølge for vertsautentisering"
msgstr "HTTP autentisering"
#: libraries/config/setup.forms.php:51
#, fuzzy
@ -6143,7 +6133,7 @@ msgstr "Open Document regneark"
#: libraries/config/setup.forms.php:266
#: libraries/config/user_preferences.forms.php:168
msgid "Quick"
msgstr ""
msgstr "Rask"
#: libraries/config/setup.forms.php:270
#: libraries/config/user_preferences.forms.php:172
@ -6175,10 +6165,9 @@ msgid "Could not initialize Drizzle connection library"
msgstr ""
#: libraries/config/validate.lib.php:221 libraries/config/validate.lib.php:229
#, fuzzy
#| msgid "Could not connect to MySQL server"
msgid "Could not connect to Drizzle server"
msgstr "Kunne ikke koble til MySQL tjener"
msgstr "Kunne ikke koble til Drizzle tjener"
#: libraries/config/validate.lib.php:240 libraries/config/validate.lib.php:247
msgid "Could not connect to MySQL server"
@ -6225,18 +6214,18 @@ msgid "possible deep recursion attack"
msgstr ""
#: libraries/database_interface.lib.php:1989
#, fuzzy
#| msgid " the local MySQL server's socket is not correctly configured)"
msgid ""
"The server is not responding (or the local server's socket is not correctly "
"configured)."
msgstr "(eller den lokale MySQL tjenerens sokkel er ikke korrekt konfigurert)"
msgstr ""
"Tjeneren svarer ikke (eller den lokale MySQL tjenerens sokkel er ikke "
"korrekt konfigurert)."
#: libraries/database_interface.lib.php:1992
#, fuzzy
#| msgid "The server is not responding"
msgid "The server is not responding."
msgstr "Tjeneren svarer ikke"
msgstr "Tjeneren svarer ikke."
#: libraries/database_interface.lib.php:1997
msgid "Please check privileges of directory containing database."
@ -6280,7 +6269,6 @@ msgstr "MySQL 4.0 kompatibel"
#: libraries/display_create_database.lib.php:21
#: libraries/display_create_database.lib.php:39
#, fuzzy
#| msgid "Create new database"
msgid "Create database"
msgstr "Opprett ny database"
@ -6375,7 +6363,7 @@ msgstr "Dump alle rader"
#: libraries/display_export.lib.php:189 libraries/display_export.lib.php:210
msgid "Output:"
msgstr ""
msgstr "Utskrift:"
#: libraries/display_export.lib.php:196 libraries/display_export.lib.php:222
#, php-format
@ -6435,10 +6423,9 @@ msgid "zipped"
msgstr "Pakket (zip)"
#: libraries/display_export.lib.php:337
#, fuzzy
#| msgid "\"gzipped\""
msgid "gzipped"
msgstr "Komprimert (gz)"
msgstr "gzippet"
#: libraries/display_export.lib.php:339
#, fuzzy
@ -6447,17 +6434,15 @@ msgid "bzipped"
msgstr "Komprimert (bz2)"
#: libraries/display_export.lib.php:348
#, fuzzy
#| msgid "Save as file"
msgid "View output as text"
msgstr "Lagre som fil"
msgstr "Vis utskrift som tekst"
#: libraries/display_export.lib.php:353 libraries/display_import.lib.php:311
#: libraries/plugins/export/ExportCodegen.class.php:106
#, fuzzy
#| msgid "Format"
msgid "Format:"
msgstr "Format"
msgstr "Format:"
#: libraries/display_export.lib.php:358
msgid "Format-specific options:"
@ -6468,12 +6453,13 @@ msgid ""
"Scroll down to fill in the options for the selected format and ignore the "
"options for other formats."
msgstr ""
"Bla ned for å fylle ut valgene for det valgte formatet og ignorere valgene "
"for andre formater."
#: libraries/display_export.lib.php:367 libraries/display_import.lib.php:326
#, fuzzy
#| msgid "Encoding conversion"
msgid "Encoding Conversion:"
msgstr "Kodingskonvertering"
msgstr "Kodingskonvertering:"
#: libraries/display_git_revision.lib.php:59
#, php-format
@ -6579,10 +6565,9 @@ msgid "File uploads are not allowed on this server."
msgstr "Filopplastinger er ikke tillatt på denne tjeneren."
#: libraries/display_import.lib.php:275
#, fuzzy
#| msgid "Partial import"
msgid "Partial Import:"
msgstr "Delvis importering"
msgstr "Delvis importering:"
#: libraries/display_import.lib.php:281
#, php-format
@ -6613,7 +6598,7 @@ msgstr "Antall rader å hoppe over, fra første rad:"
#: libraries/display_import.lib.php:317
msgid "Format-Specific Options:"
msgstr ""
msgstr "Format-spesifikke valg:"
#: libraries/display_select_lang.lib.php:52
#: libraries/display_select_lang.lib.php:53 setup/frames/index.inc.php:75
@ -12245,7 +12230,7 @@ msgstr "Navn"
#: tbl_addfield.php:190 tbl_alter.php:216 tbl_indexes.php:107
#, php-format
msgid "Table %1$s has been altered successfully"
msgstr "Tabellen %1$s har blitt endrett"
msgstr "Tabellen %1$s har blitt endret"
#: tbl_alter.php:133
#, fuzzy

View File

@ -4,15 +4,15 @@ msgstr ""
"Project-Id-Version: phpMyAdmin 4.0.0-dev\n"
"Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\n"
"POT-Creation-Date: 2012-07-27 10:40+0200\n"
"PO-Revision-Date: 2012-06-29 18:49+0200\n"
"PO-Revision-Date: 2012-07-27 17:27+0200\n"
"Last-Translator: Victor Volkov <hanut@php-myadmin.ru>\n"
"Language-Team: russian <ru@li.org>\n"
"Language: ru\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"
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%"
"10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
"X-Generator: Weblate 1.1\n"
#: browse_foreigners.php:36 browse_foreigners.php:60 js/messages.php:354
@ -7711,10 +7711,9 @@ msgstr ""
"и полей содержащих специальные символы или зарезервированные слова)</i>"
#: libraries/plugins/export/ExportSql.class.php:354
#, fuzzy
#| msgid "Object creation options"
msgid "Data creation options"
msgstr "Параметры создания объектов"
msgstr "Параметры создания данных"
#: libraries/plugins/export/ExportSql.class.php:358
#: libraries/plugins/export/ExportSql.class.php:1573

View File

@ -4,7 +4,7 @@ msgstr ""
"Project-Id-Version: phpMyAdmin 4.0.0-dev\n"
"Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\n"
"POT-Creation-Date: 2012-07-27 10:40+0200\n"
"PO-Revision-Date: 2012-06-26 19:00+0200\n"
"PO-Revision-Date: 2012-07-28 18:20+0200\n"
"Last-Translator: Madhura Jayaratne <madhura.cj@gmail.com>\n"
"Language-Team: sinhala <si@li.org>\n"
"Language: si\n"
@ -12,7 +12,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Weblate 1.0\n"
"X-Generator: Weblate 1.1\n"
#: browse_foreigners.php:36 browse_foreigners.php:60 js/messages.php:354
#: libraries/DisplayResults.class.php:794
@ -815,7 +815,7 @@ msgid ""
"Chose \"GeomFromText\" from the \"Function\" column and paste the below "
"string into the \"Value\" field"
msgstr ""
"\"Function\" තීරුවෙන් \"GeomFromText\" තෝරා පහත ඇති දේ \"Value\" ක්ෂේත්‍රයට පිටපත් "
"\"ශ්‍රිතය\" තීරුවෙන් \"GeomFromText\" තෝරා පහත ඇති දේ \"අගය\" ක්ෂේත්‍රයට පිටපත් "
"කරන්න"
#: import.php:94

View File

@ -4,15 +4,15 @@ msgstr ""
"Project-Id-Version: phpMyAdmin 4.0.0-dev\n"
"Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\n"
"POT-Creation-Date: 2012-07-27 10:40+0200\n"
"PO-Revision-Date: 2012-06-29 18:51+0200\n"
"PO-Revision-Date: 2012-07-27 12:49+0200\n"
"Last-Translator: Domen <dbc334@gmail.com>\n"
"Language-Team: slovenian <sl@li.org>\n"
"Language: sl\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n"
"%100==4 ? 2 : 3);\n"
"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || "
"n%100==4 ? 2 : 3);\n"
"X-Generator: Weblate 1.1\n"
#: browse_foreigners.php:36 browse_foreigners.php:60 js/messages.php:354
@ -7662,10 +7662,9 @@ msgstr ""
"tabel, tvorjenih s posebnimi znaki ali ključnimi besedami)</i>"
#: libraries/plugins/export/ExportSql.class.php:354
#, fuzzy
#| msgid "Object creation options"
msgid "Data creation options"
msgstr "Možnosti ustvarjanja objektov"
msgstr "Možnosti ustvarjanja podatkov"
#: libraries/plugins/export/ExportSql.class.php:358
#: libraries/plugins/export/ExportSql.class.php:1573

View File

@ -4,7 +4,7 @@ msgstr ""
"Project-Id-Version: phpMyAdmin 4.0.0-dev\n"
"Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\n"
"POT-Creation-Date: 2012-07-27 10:40+0200\n"
"PO-Revision-Date: 2012-07-01 18:04+0200\n"
"PO-Revision-Date: 2012-07-29 13:55+0200\n"
"Last-Translator: ProUser <stefan@inkopsforum.se>\n"
"Language-Team: swedish <sv@li.org>\n"
"Language: sv\n"
@ -7627,10 +7627,9 @@ msgstr ""
"tabellnamn skapade med specialtecken eller nyckelord)</i>"
#: libraries/plugins/export/ExportSql.class.php:354
#, fuzzy
#| msgid "Object creation options"
msgid "Data creation options"
msgstr "Alternativ för skapande av objekt"
msgstr "Valmöjligheter vid skapande av data"
#: libraries/plugins/export/ExportSql.class.php:358
#: libraries/plugins/export/ExportSql.class.php:1573

View File

@ -4,7 +4,7 @@ msgstr ""
"Project-Id-Version: phpMyAdmin 4.0.0-dev\n"
"Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\n"
"POT-Creation-Date: 2012-07-27 10:40+0200\n"
"PO-Revision-Date: 2012-07-26 02:11+0200\n"
"PO-Revision-Date: 2012-07-27 17:50+0200\n"
"Last-Translator: Burak Yavuz <hitowerdigit@hotmail.com>\n"
"Language-Team: turkish <tr@li.org>\n"
"Language: tr\n"
@ -7680,10 +7680,9 @@ msgstr ""
"kelimelerle şekillendirilmiş sütun ve tablo adlarını korur)</i>"
#: libraries/plugins/export/ExportSql.class.php:354
#, fuzzy
#| msgid "Object creation options"
msgid "Data creation options"
msgstr "Nesne oluşturma seçenekleri"
msgstr "Veri oluşturma seçenekleri"
#: libraries/plugins/export/ExportSql.class.php:358
#: libraries/plugins/export/ExportSql.class.php:1573

View File

@ -21,7 +21,9 @@ require 'libraries/config/user_preferences.forms.php';
PMA_userprefs_pageinit();
$error = '';
if (isset($_POST['submit_export']) && filter_input(INPUT_POST, 'export_type') == 'text_file') {
if (isset($_POST['submit_export'])
&& filter_input(INPUT_POST, 'export_type') == 'text_file'
) {
// export to JSON file
PMA_Response::getInstance()->disable();
$filename = 'phpMyAdmin-config-' . urlencode(PMA_getenv('HTTP_HOST')) . '.json';
@ -78,7 +80,8 @@ if (isset($_POST['submit_export']) && filter_input(INPUT_POST, 'export_type') ==
if (! is_array($config)) {
$error = __('Could not import configuration');
} else {
// sanitize input values: treat them as though they came from HTTP POST request
// sanitize input values: treat them as though
// they came from HTTP POST request
$form_display = new FormDisplay();
foreach ($forms as $formset_id => $formset) {
foreach ($formset as $form_name => $form) {
@ -192,7 +195,9 @@ if (isset($_POST['submit_export']) && filter_input(INPUT_POST, 'export_type') ==
if ($result === true) {
$params = array();
if ($_SESSION['PMA_Theme_Manager']->theme->getId() != 'original') {
$GLOBALS['PMA_Config']->removeCookie($_SESSION['PMA_Theme_Manager']->getThemeCookieName());
$GLOBALS['PMA_Config']->removeCookie(
$_SESSION['PMA_Theme_Manager']->getThemeCookieName()
);
unset($_SESSION['PMA_Theme_Manager']);
unset($_SESSION['PMA_Theme']);
$params['reload_left_frame'] = true;

View File

@ -124,14 +124,14 @@ $scripts->addFile('common.js');
$scripts->addFile('querywindow.js');
if (PMA_isValid($_REQUEST['auto_commit'], 'identical', 'true')) {
$scripts->addEvent('load','PMA_queryAutoCommit');
$scripts->addEvent('load', 'PMA_queryAutoCommit');
}
if (PMA_isValid($_REQUEST['init'])) {
$scripts->addEvent('load','PMA_querywindowResize');
$scripts->addEvent('load', 'PMA_querywindowResize');
}
// always set focus to the textarea
if ($querydisplay_tab == 'sql' || $querydisplay_tab == 'full') {
$scripts->addEvent('load','PMA_querywindowSetFocus');
$scripts->addEvent('load', 'PMA_querywindowSetFocus');
}
echo '<div id="querywindowcontainer">';

View File

@ -56,7 +56,11 @@ PMA_DBI_select_db($db);
$path = PMA_securePath(ucfirst($export_type));
if (!file_exists('libraries/schema/' . $path . '_Relation_Schema.class.php')) {
PMA_Export_Relation_Schema::dieSchema($_POST['chpage'], $export_type, __('File doesn\'t exist'));
PMA_Export_Relation_Schema::dieSchema(
$_POST['chpage'],
$export_type,
__('File doesn\'t exist')
);
}
require "libraries/schema/".$path."_Relation_Schema.class.php";
$obj_schema = eval("new PMA_".$path."_Relation_Schema();");

View File

@ -29,7 +29,9 @@ if (! isset($_REQUEST['pos'])) {
$pos = (int) $_REQUEST['pos'];
}
if (! isset($_REQUEST['log']) || ! array_key_exists($_REQUEST['log'], $binary_logs)) {
if (! isset($_REQUEST['log'])
|| ! array_key_exists($_REQUEST['log'], $binary_logs)
) {
$_REQUEST['log'] = '';
} else {
$url_params['log'] = $_REQUEST['log'];

View File

@ -32,7 +32,9 @@ if (!PMA_DBI_get_columns($db, $table)) {
}
/* Grab data */
$sql = 'SELECT ' . $common_functions->backquote($transform_key) . ' FROM ' . $common_functions->backquote($table) . ' WHERE ' . $where_clause . ';';
$sql = 'SELECT ' . $common_functions->backquote($transform_key)
. ' FROM ' . $common_functions->backquote($table)
. ' WHERE ' . $where_clause . ';';
$result = PMA_DBI_fetch_value($sql);
/* Check return code */

View File

@ -90,11 +90,14 @@ if (isset($_REQUEST['saveToFile'])) {
exit();
}
$svg_support = (PMA_USR_BROWSER_AGENT == 'IE' && PMA_USR_BROWSER_VER <= 8) ? false : true;
$svg_support = (PMA_USR_BROWSER_AGENT == 'IE' && PMA_USR_BROWSER_VER <= 8)
? false : true;
$format = $svg_support ? 'svg' : 'png';
// get the chart and settings after chart generation
$visualization = PMA_GIS_visualizationResults($data, $visualizationSettings, $format);
$visualization = PMA_GIS_visualizationResults(
$data, $visualizationSettings, $format
);
/**
* Displays the page

View File

@ -22,7 +22,7 @@ foreach (PMA_DBI_get_columns_full($db, $table) as $row) {
$tmp[2] = substr(
preg_replace('@([^,])\'\'@', '\\1\\\'', ',' . $tmp[2]), 1
);
$fields[$row['Field']] = $tmp[1] . '('
$fields[$row['Field']] = $tmp[1] . '('
. str_replace(',', ', ', $tmp[2]) . ')';
} else {
$fields[$row['Field']] = $row['Type'];
@ -50,39 +50,41 @@ if (isset($_REQUEST['do_save_data'])) {
$error = false;
// $sql_query is the one displayed in the query box
$sql_query = 'ALTER TABLE ' . $common_functions->backquote($db) . '.' . $common_functions->backquote($table);
$sql_query = 'ALTER TABLE ' . $common_functions->backquote($db)
. '.' . $common_functions->backquote($table);
// Drops the old index
if (! empty($_REQUEST['old_index'])) {
if ($_REQUEST['old_index'] == 'PRIMARY') {
$sql_query .= ' DROP PRIMARY KEY,';
} else {
$sql_query .= ' DROP INDEX '
$sql_query .= ' DROP INDEX '
. $common_functions->backquote($_REQUEST['old_index']) . ',';
}
} // end if
// Builds the new one
switch ($index->getType()) {
case 'PRIMARY':
if ($index->getName() == '') {
$index->setName('PRIMARY');
} elseif ($index->getName() != 'PRIMARY') {
$error = PMA_Message::error(__(
'The name of the primary key must be "PRIMARY"!'));
}
$sql_query .= ' ADD PRIMARY KEY';
break;
case 'FULLTEXT':
case 'UNIQUE':
case 'INDEX':
case 'SPATIAL':
if ($index->getName() == 'PRIMARY') {
$error = PMA_Message::error(__('Can\'t rename index to PRIMARY!'));
}
$sql_query .= ' ADD ' . $index->getType() . ' '
. ($index->getName() ? $common_functions->backquote($index->getName()) : '');
break;
case 'PRIMARY':
if ($index->getName() == '') {
$index->setName('PRIMARY');
} elseif ($index->getName() != 'PRIMARY') {
$error = PMA_Message::error(
__('The name of the primary key must be "PRIMARY"!')
);
}
$sql_query .= ' ADD PRIMARY KEY';
break;
case 'FULLTEXT':
case 'UNIQUE':
case 'INDEX':
case 'SPATIAL':
if ($index->getName() == 'PRIMARY') {
$error = PMA_Message::error(__('Can\'t rename index to PRIMARY!'));
}
$sql_query .= ' ADD ' . $index->getType() . ' '
. ($index->getName() ? $common_functions->backquote($index->getName()) : '');
break;
} // end switch
$index_fields = array();
@ -103,8 +105,9 @@ if (isset($_REQUEST['do_save_data'])) {
if (! $error) {
PMA_DBI_query($sql_query);
$message = PMA_Message::success(__(
'Table %1$s has been altered successfully'));
$message = PMA_Message::success(
__('Table %1$s has been altered successfully')
);
$message->addParam($table);
if ($GLOBALS['is_ajax_request'] == true) {
@ -161,8 +164,8 @@ if (isset($_REQUEST['index']) && is_array($_REQUEST['index'])) {
?>
<form action="tbl_indexes.php" method="post" name="index_frm" id="index_frm" <?php
echo ($GLOBALS['cfg']['AjaxEnable']
? ' class="ajax"'
echo ($GLOBALS['cfg']['AjaxEnable']
? ' class="ajax"'
: ''); ?>
onsubmit="if (typeof(this.elements['index[Key_name]'].disabled) != 'undefined') {
this.elements['index[Key_name]'].disabled = false}">
@ -249,16 +252,16 @@ foreach ($index->getColumns() as $column) {
<option value="">-- <?php echo __('Ignore'); ?> --</option>
<?php
foreach ($fields as $field_name => $field_type) {
if (($index->getType() != 'FULLTEXT'
if (($index->getType() != 'FULLTEXT'
|| preg_match('/(char|text)/i', $field_type))
&& ($index->getType() != 'SPATIAL'
&& ($index->getType() != 'SPATIAL'
|| in_array($field_type, $spatial_types))
) {
echo '<option value="' . htmlspecialchars($field_name) . '"'
. (($field_name == $column->getName())
? ' selected="selected"'
. (($field_name == $column->getName())
? ' selected="selected"'
: '') . '>'
. htmlspecialchars($field_name) . ' ['
. htmlspecialchars($field_name) . ' ['
. htmlspecialchars($field_type) . ']'
. '</option>' . "\n";
}
@ -285,7 +288,7 @@ for ($i = 0; $i < $add_fields; $i++) {
<?php
foreach ($fields as $field_name => $field_type) {
echo '<option value="' . htmlspecialchars($field_name) . '">'
. htmlspecialchars($field_name) . ' ['
. htmlspecialchars($field_name) . ' ['
. htmlspecialchars($field_type) . ']'
. '</option>' . "\n";
} // end foreach $fields

View File

@ -58,13 +58,17 @@ if (PMA_isValid($_REQUEST['new_name'])) {
} else {
$message = PMA_Message::success(__('Table %s has been copied to %s.'));
}
$old = $common_functions->backquote($db) . '.' . $common_functions->backquote($table);
$old = $common_functions->backquote($db) . '.'
. $common_functions->backquote($table);
$message->addParam($old);
$new = $common_functions->backquote($_REQUEST['target_db']) . '.' . $common_functions->backquote($_REQUEST['new_name']);
$new = $common_functions->backquote($_REQUEST['target_db']) . '.'
. $common_functions->backquote($_REQUEST['new_name']);
$message->addParam($new);
/* Check: Work on new table or on old table? */
if (isset($_REQUEST['submit_move']) || PMA_isValid($_REQUEST['switch_to_new'])) {
if (isset($_REQUEST['submit_move'])
|| PMA_isValid($_REQUEST['switch_to_new'])
) {
$db = $_REQUEST['target_db'];
$table = $_REQUEST['new_name'];
}

View File

@ -5,11 +5,14 @@
*
* includes phpMyAdmin relations and InnoDB relations
*
* @todo fix name handling: currently names with dots (.) are not properly handled for internal relations (but foreign keys relations are correct)
* @todo fix name handling: currently names with dots (.) are not properly handled
* for internal relations (but foreign keys relations are correct)
* @todo foreign key constraints require both fields being of equal type and size
* @todo check foreign fields to be from same type and size, all other makes no sense
* @todo add an link to create an index required for constraints, or an option to do automatically
* @todo if above todos are fullfilled we can add all fields meet requirements in the select dropdown
* @todo add an link to create an index required for constraints,
* or an option to do automatically
* @todo if above todos are fullfilled we can add all fields meet requirements
* in the select dropdown
* @package PhpMyAdmin
*/
@ -108,7 +111,9 @@ function PMA_backquote_split($text)
if (false === $first_backquote || false === $second_backquote) {
break;
}
$elements[] = substr($text, $first_backquote, $second_backquote - $first_backquote + 1);
$elements[] = substr(
$text, $first_backquote, $second_backquote - $first_backquote + 1
);
$pos = $second_backquote + 1;
}
return($elements);
@ -361,15 +366,15 @@ if ($cfgRelation['relwork']
// same engine.
if ($common_functions->isForeignKeySupported($tbl_storage_engine)) {
$tab_query = 'SHOW TABLE STATUS FROM ' . $common_functions->backquote($db);
$tab_query = 'SHOW TABLE STATUS FROM ' . $common_functions->backquote($db);
// [0] of the row is the name
// [1] is the type
} else {
$tab_query = 'SHOW TABLES FROM ' . $common_functions->backquote($db);
$tab_query = 'SHOW TABLES FROM ' . $common_functions->backquote($db);
// [0] of the row is the name
}
$tab_rs = PMA_DBI_query($tab_query, null, PMA_DBI_QUERY_STORE);
$tab_rs = PMA_DBI_query($tab_query, null, PMA_DBI_QUERY_STORE);
$selectboxall[] = '';
$selectboxall_foreign[] = '';
@ -377,7 +382,10 @@ if ($cfgRelation['relwork']
$current_table = new PMA_Table($curr_table[0], $db);
// explicitely ask for non-quoted list of indexed columns
$selectboxall = array_merge($selectboxall, $current_table->getUniqueColumns($backquoted = false));
$selectboxall = array_merge(
$selectboxall,
$current_table->getUniqueColumns($backquoted = false)
);
// if foreign keys are supported, collect all keys from other
// tables of the same engine
@ -387,7 +395,10 @@ if ($cfgRelation['relwork']
) {
// explicitely ask for non-quoted list of indexed columns
// need to obtain backquoted values to support dots inside values
$selectboxall_foreign = array_merge($selectboxall_foreign, $current_table->getIndexedColumns($backquoted = true));
$selectboxall_foreign = array_merge(
$selectboxall_foreign,
$current_table->getIndexedColumns($backquoted = true)
);
}
} // end while over tables
} // end if

View File

@ -65,7 +65,8 @@ if (! empty($submit_mult) && isset($_REQUEST['selected_fld'])) {
// what is this htmlspecialchars() for??
//$sql_query .= ' FROM ' . backquote(htmlspecialchars($table));
$sql_query .= ' FROM ' . $common_functions->backquote($db) . '.' . $common_functions->backquote($table);
$sql_query .= ' FROM ' . $common_functions->backquote($db)
. '.' . $common_functions->backquote($table);
include 'sql.php';
exit;
} else {
@ -733,7 +734,7 @@ if (! $tbl_is_view
&& 'ARCHIVE' != $tbl_storage_engine
) {
echo $common_functions->getDivForSliderEffect('indexes', __('Indexes'));
/**
* Display indexes
*/

View File

@ -55,10 +55,10 @@ if (isset($_REQUEST['report_export'])) {
/**
* Filters tracking entries
*
* @param array the entries to filter
* @param string "from" date
* @param string "to" date
* @param string users
* @param array $data the entries to filter
* @param string $filter_ts_from "from" date
* @param string $filter_ts_to "to" date
* @param string $filter_users users
*
* @return array filtered entries
*/

View File

@ -0,0 +1,400 @@
<?php
/**
* Tests for DBQbe.class.php
*
* @package PhpMyAdmin-test
*/
/*
* Include to test.
*/
require_once 'libraries/DBQbe.class.php';
require_once 'libraries/php-gettext/gettext.inc';
require_once 'libraries/CommonFunctions.class.php';
require_once 'libraries/core.lib.php';
require_once 'libraries/relation.lib.php';
class PMA_DBQbe_test extends PHPUnit_Framework_TestCase
{
/**
* @access protected
*/
protected $object;
/**
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
*
* @access protected
* @return void
*/
protected function setUp()
{
if (! function_exists('PMA_DBI_query')) {
function PMA_DBI_query()
{
return array('table1', 'table2');
}
}
if (! function_exists('PMA_DBI_num_rows')) {
function PMA_DBI_num_rows()
{
return 2;
}
}
if (! function_exists('PMA_DBI_fetch_row')) {
function PMA_DBI_fetch_row()
{
return false;
}
}
if (! function_exists('PMA_DBI_get_columns')) {
function PMA_DBI_get_columns()
{
return array('column1', 'column2');
}
}
if (! function_exists('PMA_DBI_free_result')) {
function PMA_DBI_free_result()
{
return true;
}
}
if (! defined('PMA_DBI_QUERY_STORE')) {
define('PMA_DBI_QUERY_STORE', 1);
}
$this->object = $this->getMockForAbstractClass('PMA_DBQbe', array('pma'));
}
/**
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
*
* @access protected
* @return void
*/
protected function tearDown()
{
unset($this->object);
}
/**
* Call protected functions by making the visibitlity to public.
*
* @param string $name method name
* @param array $params parameters for the invocation
*
* @return the output from the protected method.
*/
private function _callProtectedFunction($name, $params)
{
$class = new ReflectionClass('PMA_DBQbe');
$method = $class->getMethod($name);
$method->setAccessible(true);
return $method->invokeArgs($this->object, $params);
}
/**
* Test for getCommonFunctions
*/
public function testGetCommonFunctions(){
$this->assertTrue($this->object->getCommonFunctions() instanceof PMA_CommonFunctions);
}
/**
* Test for _getSortSelectCell
*/
public function testGetSortSelectCell(){
$this->assertEquals(
$this->_callProtectedFunction(
'_getSortSelectCell',
array(1)
),
'<td class="center"><select style="width: 12ex" name="criteriaSort[1]" size="1"><option value="">&nbsp;</option><option value="ASC">Ascending</option><option value="DESC">Descending</option></select></td>'
);
}
/**
* Test for _getSortRow
*/
public function testGetSortRow(){
$this->assertEquals(
$this->_callProtectedFunction(
'_getSortRow',
array()
),
'<tr class="even noclick"><th>Sort:</th><td class="center"><select style="width: 12ex" name="criteriaSort[0]" size="1"><option value="">&nbsp;</option><option value="ASC">Ascending</option><option value="DESC">Descending</option></select></td><td class="center"><select style="width: 12ex" name="criteriaSort[1]" size="1"><option value="">&nbsp;</option><option value="ASC">Ascending</option><option value="DESC">Descending</option></select></td><td class="center"><select style="width: 12ex" name="criteriaSort[2]" size="1"><option value="">&nbsp;</option><option value="ASC">Ascending</option><option value="DESC">Descending</option></select></td></tr>'
);
}
/**
* Test for _getShowRow
*/
public function testGetShowRow(){
$this->assertEquals(
$this->_callProtectedFunction(
'_getShowRow',
array()
),
'<tr class="odd noclick"><th>Show:</th><td class="center"><input type="checkbox" name="criteriaShow[0]" /></td><td class="center"><input type="checkbox" name="criteriaShow[1]" /></td><td class="center"><input type="checkbox" name="criteriaShow[2]" /></td></tr>'
);
}
/**
* Test for _getCriteriaInputboxRow
*/
public function testGetCriteriaInputboxRow(){
$this->assertEquals(
$this->_callProtectedFunction(
'_getCriteriaInputboxRow',
array()
),
'<tr class="even noclick"><th>Criteria:</th><td class="center"><input type="hidden" name="prev_criteria[0]" value="" /><input type="text" name="criteria[0]" value="" class="textfield" style="width: 12ex" size="20" /></td><td class="center"><input type="hidden" name="prev_criteria[1]" value="" /><input type="text" name="criteria[1]" value="" class="textfield" style="width: 12ex" size="20" /></td><td class="center"><input type="hidden" name="prev_criteria[2]" value="" /><input type="text" name="criteria[2]" value="" class="textfield" style="width: 12ex" size="20" /></td></tr>'
);
}
/**
* Test for _getFootersOptions
*/
public function testGetFootersOptions(){
$this->assertEquals(
$this->_callProtectedFunction(
'_getFootersOptions',
array('row')
),
'<div class="floatleft">Add/Delete criteria rows:<select size="1" name="criteriaRowAdd"><option value="-3">-3</option><option value="-2">-2</option><option value="-1">-1</option><option value="0" selected="selected">0</option><option value="1">1</option><option value="2">2</option><option value="3">3</option></select></div>'
);
}
/**
* Test for _getTableFooters
*/
public function testGetTableFooters(){
$this->assertEquals(
$this->_callProtectedFunction(
'_getTableFooters',
array()
),
'<fieldset class="tblFooters"><div class="floatleft">Add/Delete criteria rows:<select size="1" name="criteriaRowAdd"><option value="-3">-3</option><option value="-2">-2</option><option value="-1">-1</option><option value="0" selected="selected">0</option><option value="1">1</option><option value="2">2</option><option value="3">3</option></select></div><div class="floatleft">Add/Delete columns:<select size="1" name="criteriaColumnAdd"><option value="-3">-3</option><option value="-2">-2</option><option value="-1">-1</option><option value="0" selected="selected">0</option><option value="1">1</option><option value="2">2</option><option value="3">3</option></select></div><div class="floatleft"><input type="submit" name="modify"value="Update Query" /></div></fieldset>'
);
}
/**
* Test for _getAndOrColCell
*/
public function testGetAndOrColCell(){
$this->assertEquals(
$this->_callProtectedFunction(
'_getAndOrColCell',
array(1)
),
'<td class="center"><strong>Or:</strong><input type="radio" name="criteriaAndOrColumn[1]" value="or" />&nbsp;&nbsp;<strong>And:</strong><input type="radio" name="criteriaAndOrColumn[1]" value="and" /><br />Ins<input type="checkbox" name="criteriaColumnInsert[1]" />&nbsp;&nbsp;Del<input type="checkbox" name="criteriaColumnDelete[1]" /></td>'
);
}
/**
* Test for _getModifyColumnsRow
*/
public function testGetModifyColumnsRow(){
$this->assertEquals(
$this->_callProtectedFunction(
'_getModifyColumnsRow',
array()
),
'<tr class="even noclick"><th>Modify:</th><td class="center"><strong>Or:</strong><input type="radio" name="criteriaAndOrColumn[0]" value="or" />&nbsp;&nbsp;<strong>And:</strong><input type="radio" name="criteriaAndOrColumn[0]" value="and" checked="checked" /><br />Ins<input type="checkbox" name="criteriaColumnInsert[0]" />&nbsp;&nbsp;Del<input type="checkbox" name="criteriaColumnDelete[0]" /></td><td class="center"><strong>Or:</strong><input type="radio" name="criteriaAndOrColumn[1]" value="or" />&nbsp;&nbsp;<strong>And:</strong><input type="radio" name="criteriaAndOrColumn[1]" value="and" checked="checked" /><br />Ins<input type="checkbox" name="criteriaColumnInsert[1]" />&nbsp;&nbsp;Del<input type="checkbox" name="criteriaColumnDelete[1]" /></td><td class="center"><strong>Or:</strong><input type="radio" name="criteriaAndOrColumn[2]" value="or" />&nbsp;&nbsp;<strong>And:</strong><input type="radio" name="criteriaAndOrColumn[2]" value="and" checked="checked" /><br />Ins<input type="checkbox" name="criteriaColumnInsert[2]" />&nbsp;&nbsp;Del<input type="checkbox" name="criteriaColumnDelete[2]" /></td></tr>'
);
}
/**
* Test for _getInsDelAndOrCell
*/
public function testGetInsDelAndOrCell(){
$GLOBALS['cell_align_right'] = 'cellAlign';
$this->assertEquals(
$this->_callProtectedFunction(
'_getInsDelAndOrCell',
array(3, 'checked')
),
'<td class="cellAlign nowrap"><!-- Row controls --><table class="nospacing nopadding"><tr><td class="cellAlign nowrap"><small>Ins:</small><input type="checkbox" name="criteriaRowInsert[3]" /></td><td class="cellAlign"><strong>And:</strong></td><td><input type="radio" name="criteriaAndOrRow[3]" value="and"c /></td></tr><tr><td class="cellAlign nowrap"><small>Del:</small><input type="checkbox" name="criteriaRowDelete[3]" /></td><td class="cellAlign"><strong>Or:</strong></td><td><input type="radio" name="criteriaAndOrRow[3]" value="or"c /></td></tr></table></td>'
);
}
/**
* Test for _getInputboxRow
*/
public function testGetInputboxRow(){
$this->assertEquals(
$this->_callProtectedFunction(
'_getInputboxRow',
array(2,3)
),
'<td class="center"><input type="text" name="Or2[0]" value="" class="textfield" style="width: 12ex" size="20" /></td><td class="center"><input type="text" name="Or2[1]" value="" class="textfield" style="width: 12ex" size="20" /></td><td class="center"><input type="text" name="Or2[2]" value="" class="textfield" style="width: 12ex" size="20" /></td>'
);
}
/**
* Test for _getInsDelAndOrCriteriaRows
*/
public function testGetInsDelAndOrCriteriaRows(){
$this->assertEquals(
$this->_callProtectedFunction(
'_getInsDelAndOrCriteriaRows',
array(2,3)
),
'<tr class="odd noclick"><td class="cellAlign nowrap"><!-- Row controls --><table class="nospacing nopadding"><tr><td class="cellAlign nowrap"><small>Ins:</small><input type="checkbox" name="criteriaRowInsert[0]" /></td><td class="cellAlign"><strong>And:</strong></td><td><input type="radio" name="criteriaAndOrRow[0]" value="and" /></td></tr><tr><td class="cellAlign nowrap"><small>Del:</small><input type="checkbox" name="criteriaRowDelete[0]" /></td><td class="cellAlign"><strong>Or:</strong></td><td><input type="radio" name="criteriaAndOrRow[0]" value="or" checked="checked" /></td></tr></table></td><td class="center"><input type="text" name="Or0[0]" value="" class="textfield" style="width: 12ex" size="20" /></td><td class="center"><input type="text" name="Or0[1]" value="" class="textfield" style="width: 12ex" size="20" /></td><td class="center"><input type="text" name="Or0[2]" value="" class="textfield" style="width: 12ex" size="20" /></td></tr>'
);
}
/**
* Test for _getSelectClause
*/
public function testGetSelectClause(){
$this->assertEquals(
$this->_callProtectedFunction(
'_getSelectClause',
array()
),
''
);
}
/**
* Test for _getWhereClause
*/
public function testGetWhereClause(){
$this->assertEquals(
$this->_callProtectedFunction(
'_getWhereClause',
array()
),
''
);
}
/**
* Test for _getOrderByClause
*/
public function testGetOrderByClause(){
$this->assertEquals(
$this->_callProtectedFunction(
'_getOrderByClause',
array()
),
''
);
}
/**
* Test for _getIndexes
*/
public function testGetIndexes(){
if (! function_exists('PMA_DBI_get_table_indexes')) {
function PMA_DBI_get_table_indexes()
{
return array(2,3);
}
}
$this->assertEquals(
$this->_callProtectedFunction(
'_getIndexes',
array(
array('table1','table2'),
array('column1', 'column2', 'column3'),
array('column2')
)
),
array(
'unique' => array(),
'index' => array()
)
);
}
/**
* Test for _getLeftJoinColumnCandidates
*/
public function test_getLeftJoinColumnCandidates(){
if (! function_exists('PMA_DBI_select_db')) {
function PMA_DBI_select_db()
{
return 'pma';
}
}
$this->assertEquals(
$this->_callProtectedFunction(
'_getLeftJoinColumnCandidates',
array(
array('table1','table2'),
array('column1', 'column2', 'column3'),
array('column2')
)
),
array(
0 => 'column2'
)
);
}
/**
* Test for _getMasterTable
*/
public function test_getMasterTable(){
$this->assertEquals(
$this->_callProtectedFunction(
'_getMasterTable',
array(
array('table1','table2'),
array('column1', 'column2', 'column3'),
array('column2'),
array('pma')
)
),
0
);
}
/**
* Test for _getWhereClauseTablesAndColumns
*/
public function test_getWhereClauseTablesAndColumns(){
$_POST['criteriaColumn'] = array('table1.id', 'table1.value', 'table1.name', 'table1.deleted');
$this->assertEquals(
$this->_callProtectedFunction(
'_getWhereClauseTablesAndColumns',
array()
),
array(
'where_clause_tables' => array(),
'where_clause_columns' => array()
)
);
}
/**
* Test for _getFromClause
*/
public function testGetFromClause(){
$this->assertEquals(
$this->_callProtectedFunction(
'_getFromClause',
array('relation')
),
'`table1`'
);
}
/**
* Test for _getSQLQuery
*/
public function test_getSQLQuery(){
$this->assertEquals(
$this->_callProtectedFunction(
'_getSQLQuery',
array('relation')
),
'FROM `table1`
'
);
}
}

View File

@ -0,0 +1,203 @@
<?php
/**
* Tests for DbSearch.class.php
*
* @package PhpMyAdmin-test
*/
/*
* Include to test.
*/
require_once 'libraries/DbSearch.class.php';
require_once 'libraries/php-gettext/gettext.inc';
require_once 'libraries/CommonFunctions.class.php';
require_once 'libraries/url_generating.lib.php';
require_once 'libraries/core.lib.php';
require_once 'libraries/Theme.class.php';
class PMA_DbSearch_test extends PHPUnit_Framework_TestCase
{
/**
* @access protected
*/
protected $object;
/**
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
*
* @access protected
* @return void
*/
protected function setUp()
{
if (! function_exists('PMA_DBI_get_tables')) {
function PMA_DBI_get_tables()
{
return array(
'table1',
'table2'
);
}
}
$this->object = $this->getMockForAbstractClass('PMA_DbSearch', array('pma'));
}
/**
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
*
* @access protected
* @return void
*/
protected function tearDown()
{
unset($this->object);
}
/**
* Call protected functions by making the visibitlity to public.
*
* @param string $name method name
* @param array $params parameters for the invocation
*
* @return the output from the protected method.
*/
private function _callProtectedFunction($name, $params)
{
$class = new ReflectionClass('PMA_DbSearch');
$method = $class->getMethod($name);
$method->setAccessible(true);
return $method->invokeArgs($this->object, $params);
}
/**
* Test for getCommonFunctions
*/
public function testGetCommonFunctions(){
$this->assertTrue($this->object->getCommonFunctions() instanceof PMA_CommonFunctions);
}
/**
* Test for _getSearchSqls
*/
public function testGetSearchSqls(){
$GLOBALS['db'] = 'pma';
if (! function_exists('PMA_DBI_get_columns')) {
function PMA_DBI_get_columns()
{
return array(
'column1',
'column2'
);
}
}
$this->assertEquals(
$this->_callProtectedFunction(
'_getSearchSqls',
array('table1')
),
array (
'select_columns' => 'SELECT * FROM `pma`.`table1` WHERE FALSE',
'select_count' => 'SELECT COUNT(*) AS `count` FROM `pma`.`table1` WHERE FALSE',
'delete' => 'DELETE FROM `pma`.`table1` WHERE FALSE'
)
);
}
/**
* Test for getSearchResults
*/
public function testGetSearchResults(){
$this->assertEquals(
$this->object->getSearchResults(),
'<br /><table class="data"><caption class="tblHeaders">Search results for "<i></i>" :</caption></table>'
);
}
/**
* Test for _getResultsRow
* @param string $each_table Tables on which search is to be performed
* @param array $newsearchsqls Contains SQL queries
* @param bool $odd_row For displaying contrasting table rows
* @param $output
*
* @dataProvider providerForTestGetResultsRow
*/
public function testGetResultsRow($each_table, $newsearchsqls, $odd_row, $output){
if (! function_exists('PMA_DBI_fetch_value')) {
function PMA_DBI_fetch_value()
{
return 2;
}
}
$GLOBALS['cfg']['AjaxEnable'] = true;
$this->assertEquals(
$this->_callProtectedFunction(
'_getResultsRow',
array($each_table, $newsearchsqls, $odd_row)
),
$output
);
}
/**
* @return array provider for testGetResultsRow
*/
public function providerForTestGetResultsRow(){
return array(
array(
'table1',
array(
'SELECT * FROM `pma`.`table1` WHERE FALSE',
'SELECT COUNT(*) AS `count` FROM `pma`.`table1` WHERE FALSE',
'select_count' => 2,
'select_columns' => 'column1',
'delete' => 'column2'
),
true,
'<tr class="noclick odd"><td>2 matches in <strong>table1</strong></td><td><a name="browse_search" href="sql.php?db=pma&amp;goto=db_sql.php&amp;pos=0&amp;is_js_confirmed=0&amp;sql_query=column1&amp;server=0&amp;lang=en&amp;token=token" onclick="loadResult(\'sql.php?db=pma&amp;goto=db_sql.php&amp;pos=0&amp;is_js_confirmed=0&amp;sql_query=column1&amp;server=0&amp;lang=en&amp;token=token\',\'table1\',\'db=pma&amp;table=table1&amp;server=0&amp;lang=en&amp;token=token\',\'1\');return false;" >Browse</a></td><td><a name="delete_search" href="sql.php?db=pma&amp;goto=db_sql.php&amp;pos=0&amp;is_js_confirmed=0&amp;sql_query=column2&amp;server=0&amp;lang=en&amp;token=token" onclick="deleteResult(\'sql.php?db=pma&amp;goto=db_sql.php&amp;pos=0&amp;is_js_confirmed=0&amp;sql_query=column2&amp;server=0&amp;lang=en&amp;token=token\' , \'Delete the matches for the table1 table?\',\'1\');return false;">Delete</a></td></tr>'
)
);
}
/**
* Test for getSelectionForm
*/
public function testGetSelectionForm(){
$_SESSION[' PMA_token '] = 'token';
$_SESSION['PMA_Theme'] = new PMA_Theme();
$GLOBALS['pmaThemeImage'] = 'themes/dot.gif';
$url_params = array('param1', 'param2');
$this->assertEquals(
$this->object->getSelectionForm($url_params),
'<a id="db_search"></a><form id="db_search_form" class="ajax" method="post" action="db_search.php" name="db_search"><input type="hidden" name="db" value="pma" /><input type="hidden" name="lang" value="en" /><input type="hidden" name="token" value="token" /><fieldset><legend>Search in database</legend><table class="formlayout"><tr><td>Words or values to search for (wildcard: "%"):</td><td><input type="text" name="criteriaSearchString" size="60" value="" /></td></tr><tr><td class="right vtop">Find:</td><td><input type="radio" name="criteriaSearchType" id="criteriaSearchType_1" value="1" checked="checked" />
<label for="criteriaSearchType_1">at least one of the words<span class="pma_hint"><img src="themes/dot.gifb_help.png" title="" alt="" /><span class="hide">Words are separated by a space character (" ").</span></span></label><br />
<input type="radio" name="criteriaSearchType" id="criteriaSearchType_2" value="2" />
<label for="criteriaSearchType_2">all words<span class="pma_hint"><img src="themes/dot.gifb_help.png" title="" alt="" /><span class="hide">Words are separated by a space character (" ").</span></span></label><br />
<input type="radio" name="criteriaSearchType" id="criteriaSearchType_3" value="3" />
<label for="criteriaSearchType_3">the exact phrase</label><br />
<input type="radio" name="criteriaSearchType" id="criteriaSearchType_4" value="4" />
<label for="criteriaSearchType_4">as regular expression <a href="./url.php?url=http%3A%2F%2Fdev.mysql.com%2Fdoc%2Frefman%2F5.0%2Fen%2Fregexp.html&amp;server=0&amp;lang=en&amp;token=token" target="mysql_doc"><img src="themes/dot.gifb_help.png" title="Documentation" alt="Documentation" /></a></label><br />
</td></tr><tr><td class="right vtop">Inside tables:</td><td rowspan="2"><select name="criteriaTables[]" size="6" multiple="multiple"><option value="table1">table1</option><option value="table2">table2</option></select></td></tr><tr><td class="right vbottom"><a href="db_search.php?0=param1&amp;1=param2&amp;selectall=1&amp;server=0&amp;lang=en&amp;token=token#db_search" onclick="setSelectOptions(\'db_search\', \'criteriaTables[]\', true); return false;">Select All</a> &nbsp;/&nbsp;<a href="db_search.php?0=param1&amp;1=param2&amp;unselectall=1&amp;server=0&amp;lang=en&amp;token=token#db_search" onclick="setSelectOptions(\'db_search\', \'criteriaTables[]\', false); return false;">Unselect All</a></td></tr><tr><td class="right">Inside column:</td><td><input type="text" name="criteriaColumnName" size="60"value="" /></td></tr></table></fieldset><fieldset class="tblFooters"><input type="submit" name="submit_search" value="Go" id="buttonGo" /></fieldset></form><!-- These two table-image and table-link elements display the table name in browse search results --><div id="table-info"><a class="item" id="table-link" ></a></div><div id="browse-results"><!-- this browse-results div is used to load the browse and delete results in the db search --></div><br class="clearfloat" /><div id="sqlqueryform"><!-- this sqlqueryform div is used to load the delete form in the db search --></div><!-- toggle query box link--><a id="togglequerybox"></a>'
);
}
/**
* Test for _getResultDivs
*/
public function testGetResultDivs(){
$this->assertEquals(
$this->_callProtectedFunction(
'_getResultDivs',
array()
),
'<!-- These two table-image and table-link elements display the table name in browse search results --><div id="table-info"><a class="item" id="table-link" ></a></div><div id="browse-results"><!-- this browse-results div is used to load the browse and delete results in the db search --></div><br class="clearfloat" /><div id="sqlqueryform"><!-- this sqlqueryform div is used to load the delete form in the db search --></div><!-- toggle query box link--><a id="togglequerybox"></a>'
);
}
}