Merge branch 'master' into plugins-and-OOP

This commit is contained in:
Alex Marin 2012-07-05 09:58:24 +03:00
commit 4c72450578
8 changed files with 839 additions and 361 deletions

View File

@ -11,6 +11,36 @@
*/
require_once 'libraries/common.inc.php';
/**
* Sets globals from $_POST
*/
$post_params = array(
'Field',
'Show',
'Sort'
);
foreach ($post_params as $one_post_param) {
if (isset($_POST[$one_post_param])) {
$GLOBALS[$one_post_param] = $_POST[$one_post_param];
}
}
/**
* Sets globals from $_POST patterns, for Or* variables
* (additional criteria lines)
*/
$post_patterns = array(
'/^Or/i'
);
foreach (array_keys($_POST) as $post_key) {
foreach ($post_patterns as $one_post_pattern) {
if (preg_match($one_post_pattern, $post_key)) {
$GLOBALS[$post_key] = $_POST[$post_key];
}
}
}
/**
* Gets the relation settings
*/

View File

@ -59,25 +59,16 @@ if (empty($_REQUEST['criteriaSearchType'])
unset($_REQUEST['submit_search']);
} else {
$criteriaSearchType = (int) $_REQUEST['criteriaSearchType'];
$option_str = $searchTypes[$_REQUEST['criteriaSearchType']];
$searchTypeDescription = $searchTypes[$_REQUEST['criteriaSearchType']];
}
if (empty($_REQUEST['criteriaSearchString'])
|| ! is_string($_REQUEST['criteriaSearchString'])
) {
$criteriaSearchString = '';
unset($_REQUEST['submit_search']);
$searched = '';
} else {
$searched = htmlspecialchars($_REQUEST['criteriaSearchString']);
// For "as regular expression" (search option 4), we should not treat
// this as an expression that contains a LIKE (second parameter of
// sqlAddSlashes()).
//
// Usage example: If user is seaching for a literal $ in a regexp search,
// he should enter \$ as the value.
$criteriaSearchString = $common_functions->sqlAddSlashes(
$_REQUEST['criteriaSearchString'], ($criteriaSearchType == 4 ? false : true)
);
$criteriaSearchString = $_REQUEST['criteriaSearchString'];
}
$criteriaTables = array();
@ -121,8 +112,8 @@ if ( $GLOBALS['is_ajax_request'] != true) {
if (isset($_REQUEST['submit_search'])) {
$response->addHTML(
PMA_dbSearchGetSearchResults(
$criteriaTables, $searched, $option_str,
$criteriaSearchString, $criteriaSearchType,
$criteriaTables, $searchTypeDescription,
$criteriaSearchString, $criteriaSearchType,
(! empty($criteriaColumnName) ? $criteriaColumnName : '')
)
);
@ -140,8 +131,9 @@ if ($GLOBALS['is_ajax_request'] == true) {
// Add search form
$response->addHTML(
PMA_dbSearchGetSelectionForm(
$searched, $criteriaSearchType, $tables_names_only, $criteriaTables,
$url_params, (! empty($criteriaColumnName) ? $criteriaColumnName : '')
$criteriaSearchString, $criteriaSearchType, $tables_names_only,
$criteriaTables, $url_params,
(! empty($criteriaColumnName) ? $criteriaColumnName : '')
)
);
?>

View File

@ -14,7 +14,7 @@ if (! defined('PHPMYADMIN')) {
*
* @param string $table The table name
* @param string $criteriaColumnName Restrict the search to this column
* @param string $criteriaSearchString The string to search
* @param string $criteriaSearchString The search word/phrase/regexp to be searched
* @param integer $criteriaSearchType Type of search
* (1 -> 1 word at least, 2 -> all words,
* 3 -> exact string, 4 -> regexp)
@ -33,24 +33,18 @@ if (! defined('PHPMYADMIN')) {
function PMA_getSearchSqls($table, $criteriaColumnName, $criteriaSearchString,
$criteriaSearchType
) {
$common_functions = PMA_CommonFunctions::getInstance();
// Statement types
$sqlstr_select = 'SELECT';
$sqlstr_delete = 'DELETE';
// Table to use
$sqlstr_from = ' FROM '
. PMA_backquote($GLOBALS['db']) . '.' . PMA_backquote($table);
// Search words or pattern
$search_words = (($criteriaSearchType > 2)
? array($criteriaSearchString) : explode(' ', $criteriaSearchString));
$like_or_regex = (($criteriaSearchType == 4) ? 'REGEXP' : 'LIKE');
$automatic_wildcard = (($criteriaSearchType < 3) ? '%' : '');
. $common_functions->backquote($GLOBALS['db']) . '.'
. $common_functions->backquote($table);
// Gets where clause for the query
$where_clause = PMA_dbSearchGetWhereClause(
$table, $search_words, $criteriaSearchType, $criteriaColumnName,
$like_or_regex, $automatic_wildcard
$table, $criteriaSearchString, $criteriaSearchType, $criteriaColumnName
);
// Builds complete queries
$sql['select_columns'] = $sqlstr_select . ' * ' . $sqlstr_from . $where_clause;
// here, I think we need to still use the COUNT clause, even for
@ -65,24 +59,35 @@ function PMA_getSearchSqls($table, $criteriaColumnName, $criteriaSearchString,
/**
* Provides where clause for bulding SQL query
*
* @param string $table the table name
* @param integer $search_words Search words or pattern
* @param integer $criteriaSearchType Type of search
* (1 -> 1 word at least, 2 -> all words,
* 3 -> exact string, 4 -> regexp)
* @param string $criteriaColumnName Restrict the search to this column
* @param string $like_or_regex Whether to use 'LIKE' or 'REGEXP'
* @param string $automatic_wildcard Use automatic wildcard
* @param string $table The table name
* @param integer $criteriaSearchString The search word/phrase/regexp to be searched
* @param integer $criteriaSearchType Type of search
* (1 -> 1 word at least, 2 -> all words,
* 3 -> exact string, 4 -> regexp)
* @param string $criteriaColumnName Restrict the search to this column
*
* @return string The generated where clause
*/
function PMA_dbSearchGetWhereClause($table, $search_words, $criteriaSearchType,
$criteriaColumnName, $like_or_regex, $automatic_wildcard
function PMA_dbSearchGetWhereClause($table, $criteriaSearchString,
$criteriaSearchType, $criteriaColumnName
) {
$common_functions = PMA_CommonFunctions::getInstance();
$where_clause = '';
// Columns to select
$allColumns = PMA_DBI_get_columns($GLOBALS['db'], $table);
$likeClauses = array();
// Based on search type, decide like/regex & '%'/''
$like_or_regex = (($criteriaSearchType == 4) ? 'REGEXP' : 'LIKE');
$automatic_wildcard = (($criteriaSearchType < 3) ? '%' : '');
// For "as regular expression" (search option 4), LIKE won't be used
// Usage example: If user is seaching for a literal $ in a regexp search,
// he should enter \$ as the value.
$criteriaSearchString = $common_functions->sqlAddSlashes(
$criteriaSearchString, ($criteriaSearchType == 4 ? false : true)
);
// Extract search words or pattern
$search_words = (($criteriaSearchType > 2)
? array($criteriaSearchString) : explode(' ', $criteriaSearchString));
foreach ($search_words as $search_word) {
// Eliminates empty values
@ -98,8 +103,9 @@ function PMA_dbSearchGetWhereClause($table, $search_words, $criteriaSearchType,
) {
// Drizzle has no CONVERT and all text columns are UTF-8
$column = ((PMA_DRIZZLE)
? PMA_backquote($column['Field'])
: 'CONVERT(' . PMA_backquote($column['Field']) . ' USING utf8)');
? $common_functions->backquote($column['Field'])
: 'CONVERT(' . $common_functions->backquote($column['Field'])
. ' USING utf8)');
$likeClausesPerColumn[] = $column . ' ' . $like_or_regex . ' '
. "'"
. $automatic_wildcard . $search_word . $automatic_wildcard
@ -110,14 +116,16 @@ function PMA_dbSearchGetWhereClause($table, $search_words, $criteriaSearchType,
$likeClauses[] = implode(' OR ', $likeClausesPerColumn);
}
} // end for
// Use 'OR' if 'at least one word' is to be searched, else use 'AND'
$implode_str = ($criteriaSearchType == 1 ? ' OR ' : ' AND ');
if ( empty($likeClauses)) {
// this could happen when the "inside column" does not exist
// in any selected tables
$where_clause = ' WHERE FALSE';
} else {
$where_clause = ' WHERE (' . implode(') ' . $implode_str . ' (', $likeClauses) . ')';
$where_clause = ' WHERE ('
. implode(') ' . $implode_str . ' (', $likeClauses)
. ')';
}
return $where_clause;
}
@ -125,18 +133,17 @@ function PMA_dbSearchGetWhereClause($table, $search_words, $criteriaSearchType,
/**
* Displays database search results
*
* @param array $criteriaTables Tables on which search is to be performed
* @param string $searched The search word/phrase/regexp
* @param string $option_str Type of search
* @param string $criteriaSearchString The string to search
* @param integer $criteriaSearchType Type of search
* (1 -> 1 word at least, 2 -> all words,
* 3 -> exact string, 4 -> regexp)
* @param string $criteriaColumnName Restrict the search to this column
* @param array $criteriaTables Tables on which search is to be performed
* @param string $searchTypeDescription Description for search type
* @param string $criteriaSearchString The search word/phrase/regexp to be searched
* @param integer $criteriaSearchType Type of search
* (1 -> 1 word at least, 2 -> all words,
* 3 -> exact string, 4 -> regexp)
* @param string $criteriaColumnName Restrict the search to this column
*
* @return string HTML for search results
*/
function PMA_dbSearchGetSearchResults($criteriaTables, $searched, $option_str,
function PMA_dbSearchGetSearchResults($criteriaTables, $searchTypeDescription,
$criteriaSearchString, $criteriaSearchType, $criteriaColumnName = null
) {
$html_output = '';
@ -146,7 +153,7 @@ function PMA_dbSearchGetSearchResults($criteriaTables, $searched, $option_str,
. '<caption class="tblHeaders">'
. sprintf(
__('Search results for "<i>%s</i>" %s:'),
$searched, $option_str
htmlspecialchars($criteriaSearchString), $searchTypeDescription
)
. '</caption>';
@ -162,13 +169,14 @@ function PMA_dbSearchGetSearchResults($criteriaTables, $searched, $option_str,
// Executes the "COUNT" statement
$res_cnt = PMA_DBI_fetch_value($newsearchsqls['select_count']);
$num_search_result_total += $res_cnt;
// Gets the result row's HTML for a table
$html_output .= PMA_dbSearchGetResultsRow(
$each_table, $newsearchsqls, $odd_row
);
$odd_row = ! $odd_row;
} // end for
$html_output .= '</table>';
// Displays total number of matches
if (count($criteriaTables) > 1) {
$html_output .= '<p>';
$html_output .= sprintf(
@ -205,6 +213,7 @@ function PMA_dbSearchGetResultsRow($each_table, $newsearchsqls, $odd_row)
$res_cnt = PMA_DBI_fetch_value($newsearchsqls['select_count']);
// Start forming search results row
$html_output = '<tr class="noclick ' . ($odd_row ? 'odd' : 'even') . '">';
// Displays results count for a table
$html_output .= '<td>';
$html_output .= sprintf(
_ngettext(
@ -214,7 +223,7 @@ function PMA_dbSearchGetResultsRow($each_table, $newsearchsqls, $odd_row)
$res_cnt, htmlspecialchars($each_table)
);
$html_output .= '</td>';
// Displays browse/delete link if result count > 0
if ($res_cnt > 0) {
$this_url_params['sql_query'] = $newsearchsqls['select_columns'];
$browse_result_path = 'sql.php' . PMA_generate_common_url($this_url_params);
@ -246,18 +255,19 @@ function PMA_dbSearchGetResultsRow($each_table, $newsearchsqls, $odd_row)
/**
* Provides the main search form's html
*
* @param string $searched Keyword/Regular expression to be searched
* @param integer $criteriaSearchType Type of search (one word, phrase etc.)
* @param array $tables_names_only Names of all tables
* @param array $criteriaTables Tables on which search is to be performed
* @param array $url_params URL parameters
* @param string $criteriaColumnName Restrict the search to this column
* @param string $criteriaSearchString Keyword/Regular expression earlier entered
* @param integer $criteriaSearchType Type of search (one word, phrase etc.)
* @param array $tables_names_only Names of all tables
* @param array $criteriaTables Tables on which search is to be performed
* @param array $url_params URL parameters
* @param string $criteriaColumnName Restrict the search to this column
*
* @return string HTML for selection form
*/
function PMA_dbSearchGetSelectionForm($searched, $criteriaSearchType,
function PMA_dbSearchGetSelectionForm($criteriaSearchString, $criteriaSearchType,
$tables_names_only, $criteriaTables, $url_params, $criteriaColumnName = null
) {
$common_functions = PMA_CommonFunctions::getInstance();
$html_output = '<a id="db_search"></a>';
$html_output .= '<form id="db_search_form"'
. ($GLOBALS['cfg']['AjaxEnable'] ? ' class="ajax"' : '')
@ -272,22 +282,29 @@ function PMA_dbSearchGetSelectionForm($searched, $criteriaSearchType,
$html_output .= '<td>' . __('Words or values to search for (wildcard: "%"):')
. '</td>';
$html_output .= '<td><input type="text" name="criteriaSearchString" size="60"'
. ' value="' . $searched . '" /></td>';
. ' value="' . htmlspecialchars($criteriaSearchString) . '" /></td>';
$html_output .= '</tr>';
// choices for types of search
$html_output .= '<tr>';
$html_output .= '<td class="right vtop">' . __('Find:') . '</td>';
$html_output .= '<td>';
$choices = array(
'1' => __('at least one of the words') . PMA_showHint(__('Words are separated by a space character (" ").')),
'2' => __('all words') . PMA_showHint(__('Words are separated by a space character (" ").')),
'1' => __('at least one of the words')
. $common_functions->showHint(
__('Words are separated by a space character (" ").')
),
'2' => __('all words')
. $common_functions->showHint(
__('Words are separated by a space character (" ").')
),
'3' => __('the exact phrase'),
'4' => __('as regular expression') . ' ' . PMA_showMySQLDocu('Regexp', 'Regexp')
'4' => __('as regular expression')
. ' ' . $common_functions->showMySQLDocu('Regexp', 'Regexp')
);
// 4th parameter set to true to add line breaks
// 5th parameter set to false to avoid htmlspecialchars() escaping in the label
// since we have some HTML in some labels
$html_output .= PMA_getRadioFields(
$html_output .= $common_functions->getRadioFields(
'criteriaSearchType', $choices, $criteriaSearchType, true, false
);
$html_output .= '</td></tr>';
@ -308,18 +325,27 @@ function PMA_dbSearchGetSelectionForm($searched, $criteriaSearchType,
. '</option>';
} // end for
$html_output .= '</select>';
$alter_select
= '<a href="db_search.php' . PMA_generate_common_url(array_merge($url_params, array('selectall' => 1))) . '#db_search"'
. ' onclick="setSelectOptions(\'db_search\', \'criteriaTables[]\', true); return false;">' . __('Select All') . '</a>'
. '&nbsp;/&nbsp;'
. '<a href="db_search.php' . PMA_generate_common_url(array_merge($url_params, array('unselectall' => 1))) . '#db_search"'
. ' onclick="setSelectOptions(\'db_search\', \'criteriaTables[]\', false); return false;">' . __('Unselect All') . '</a>';
$html_output .= '</td></tr>';
// Displays 'select all' and 'unselect all' links
$alter_select = '<a href="db_search.php'
. PMA_generate_common_url(
array_merge($url_params, array('selectall' => 1))
)
. '#db_search" onclick="setSelectOptions(\'db_search\', \'criteriaTables[]\', true); return false;">'
. __('Select All') . '</a> &nbsp;/&nbsp;';
$alter_select .= '<a href="db_search.php'
. PMA_generate_common_url(
array_merge($url_params, array('unselectall' => 1))
)
. '#db_search" onclick="setSelectOptions(\'db_search\', \'criteriaTables[]\', false); return false;">'
. __('Unselect All') . '</a>';
$html_output .= '<tr><td class="right vbottom">' . $alter_select . '</td></tr>';
// Inputbox for column name entry
$html_output .= '<tr>';
$html_output .= '<td class="right">' . __('Inside column:') . '</td>';
$html_output .= '<td><input type="text" name="criteriaColumnName" size="60"'
. 'value="' . (! empty($criteriaColumnName) ? htmlspecialchars($criteriaColumnName) : '')
. 'value="'
. (! empty($criteriaColumnName) ? htmlspecialchars($criteriaColumnName) : '')
. '" /></td>';
$html_output .= '</tr>';
$html_output .= '</table>';
@ -348,8 +374,8 @@ function getResultDivs()
$html_output .= '</div>';
// div for browsing results
$html_output .= '<div id="browse-results">';
$html_output .= '<!-- this browse-results div is used to load the browse and delete'
. ' results in the db search -->';
$html_output .= '<!-- this browse-results div is used to load the browse'
. ' and delete results in the db search -->';
$html_output .= '</div>';
$html_output .= '<br class="clearfloat" />';
$html_output .= '<div id="sqlqueryform">';

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-03 09:19+0200\n"
"PO-Revision-Date: 2012-06-25 16:57+0200\n"
"PO-Revision-Date: 2012-07-04 01:34+0200\n"
"Last-Translator: Aputsiaq Niels Janussen <aj@isit.gl>\n"
"Language-Team: danish <da@li.org>\n"
"Language: da\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:609 server_privileges.php:1851
@ -1868,15 +1868,14 @@ msgstr "Når der holdes over et punkt vises dets etiket."
#: js/messages.php:304
msgid "To zoom in, select a section of the plot with the mouse."
msgstr ""
msgstr "For at forstørre, vælg en sektion af plottet med musen."
#: js/messages.php:306
#, fuzzy
#| msgid "Click reset zoom link to come back to original state."
msgid "Click reset zoom button to come back to original state."
msgstr ""
"Klik på linket for nulstil zoom for at vende tilbage til den oprindelige "
"tilstand."
"Klik på knap til nulstilling af zoom for at vende tilbage til den "
"oprindelige tilstand."
#: js/messages.php:308
msgid "Click a data point to view and possibly edit the data row."
@ -1900,10 +1899,9 @@ msgid "Query results"
msgstr "Forespørgselsresultater"
#: js/messages.php:315
#, fuzzy
#| msgid "Data pointer size"
msgid "Data point content"
msgstr "Data pointer-størrelse"
msgstr "Datapunkt-indhold"
#: js/messages.php:318 tbl_change.php:244 tbl_indexes.php:249
#: tbl_indexes.php:284
@ -2329,22 +2327,24 @@ msgstr "Mislykkedes med at formatere streng for reglen '%s'."
msgid ""
"Invalid rule declaration on line %1$s, expected line %2$s of previous rule"
msgstr ""
"Ugyldig regel-deklaration på linje %1$s, forventede linje %2$s fra forrige "
"regel"
#: libraries/Advisor.class.php:378
#, fuzzy, php-format
#, php-format
#| msgid "Invalid format of CSV input on line %d."
msgid "Invalid rule declaration on line %s"
msgstr "Ugyldigt format for CSV-input på linie %d."
msgstr "Ugyldig regel-deklaration på linie %s"
#: libraries/Advisor.class.php:386
#, php-format
msgid "Unexpected characters on line %s"
msgstr ""
msgstr "Uventet tegn på linje %s"
#: libraries/Advisor.class.php:400
#, php-format
msgid "Unexpected character on line %1$s. Expected tab, but found \"%2$s\""
msgstr ""
msgstr "Uventet tegn på linje %1$s. Forventede tabulering, men fandt \"%2$s\""
#: libraries/Advisor.class.php:425 server_status.php:972
msgid "per second"
@ -2361,7 +2361,7 @@ msgstr "pr. time"
#: libraries/Advisor.class.php:434
msgid "per day"
msgstr ""
msgstr "per dag"
#: libraries/CommonFunctions.class.php:251
#, php-format
@ -2654,10 +2654,10 @@ msgid "vertical"
msgstr "lodret"
#: libraries/DisplayResults.class.php:734
#, fuzzy, php-format
#, php-format
#| msgid "Headers every %s rows"
msgid "Headers every %s rows"
msgstr "Overskrifter for hver %s rows"
msgstr "Overskrifter for hver %s. række"
#: libraries/DisplayResults.class.php:1217
msgid "Sort by key"
@ -2724,10 +2724,9 @@ msgid "Show binary contents as HEX"
msgstr "Vis binært indhold som HEX"
#: libraries/DisplayResults.class.php:1417
#, fuzzy
#| msgid "Browser transformation"
msgid "Hide browser transformation"
msgstr "Browser transformation"
msgstr "Skjul browser-transformation"
#: libraries/DisplayResults.class.php:1426
msgid "Well Known Text"
@ -2810,7 +2809,7 @@ msgstr "Link ikke fundet"
#: libraries/Error_Handler.class.php:65
msgid "Too many error messages, some are not displayed."
msgstr ""
msgstr "For mange fejlmeddelelser, nogle vises ikke."
#: libraries/File.class.php:235
msgid "File was not an uploaded file."
@ -2876,10 +2875,9 @@ msgstr "Herefter skal cookies være slået til."
#: libraries/Header.class.php:500
#: libraries/plugins/auth/AuthenticationCookie.class.php:152
#, fuzzy
#| msgid "Cookies must be enabled past this point."
msgid "Javascript must be enabled past this point"
msgstr "Herefter skal cookies være slået til."
msgstr "Herefter skal JavaScript være slået til"
#: libraries/Index.class.php:433 tbl_relation.php:540
msgid "No index defined!"
@ -2990,10 +2988,9 @@ msgid "Designer"
msgstr "Designer"
#: libraries/Menu.class.php:484
#, fuzzy
#| msgid "User"
msgid "Users"
msgstr "Bruger"
msgstr "Brugere"
#: libraries/Menu.class.php:505 server_synchronize.php:1320
#: server_synchronize.php:1327
@ -3085,10 +3082,10 @@ msgid "unknown table status: "
msgstr "ukendt tabelstatus: "
#: libraries/Table.class.php:766
#, fuzzy, php-format
#, php-format
#| msgid "Source database"
msgid "Source database `%s` was not found!"
msgstr "Kildedatabase"
msgstr "Kildedatabasen '%s' blev ikke fundet!"
#: libraries/Table.class.php:774
#, fuzzy, php-format

344
po/fa.po

File diff suppressed because it is too large Load Diff

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-03 09:19+0200\n"
"PO-Revision-Date: 2012-05-17 15:22+0200\n"
"Last-Translator: Michal Čihař <michal@cihar.com>\n"
"PO-Revision-Date: 2012-07-04 16:03+0200\n"
"Last-Translator: Nicholas Arnesen <baretester@live.no>\n"
"Language-Team: norwegian <no@li.org>\n"
"Language: nb\n"
"MIME-Version: 1.0\n"
"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:609 server_privileges.php:1851
@ -301,7 +301,7 @@ msgstr "Fjern database"
#: db_operations.php:505
#, php-format
msgid "Database %s has been dropped."
msgstr "Databasen %s har blitt slettet"
msgstr "Databasen %s har blitt slettet."
#: db_operations.php:510
msgid "Drop the database (DROP)"
@ -823,7 +823,7 @@ msgstr "Geometri"
#: gis_data_editor.php:161 js/messages.php:322
msgid "Point"
msgstr ""
msgstr "Punkt"
#: gis_data_editor.php:162 gis_data_editor.php:186 gis_data_editor.php:234
#: gis_data_editor.php:286 js/messages.php:320
@ -839,12 +839,12 @@ msgstr "Y"
#: js/messages.php:323
#, php-format
msgid "Point %d"
msgstr ""
msgstr "Peker %d"
#: gis_data_editor.php:193 gis_data_editor.php:239 gis_data_editor.php:291
#: js/messages.php:329
msgid "Add a point"
msgstr ""
msgstr "Legg til peker"
#: gis_data_editor.php:209 js/messages.php:324
msgid "Linestring"
@ -929,8 +929,9 @@ msgid ""
"[a@./Documentation.html#faq1_16@Documentation]FAQ 1.16[/a]."
msgstr ""
"Ingen data ble mottatt for importering. Enten ble ingen filnavn gitt, eller "
"filstørrelsen oversteg maksimum størrelse tillatt i din PHP konfigurasjon. "
"Se FAQ 1.16"
"så var filstørrelsen over maksimum størrelse tillatt i din PHP "
"konfigurasjon. Se [a@./Documentation.html#faq1_16@Documentation]FAQ "
"1.16[/a]."
#: import.php:412
msgid ""
@ -1202,7 +1203,7 @@ msgstr "System minne"
#: js/messages.php:99
msgid "System swap"
msgstr "System swap"
msgstr "Systembytte"
#. l10n: shortcuts for Megabyte
#: js/messages.php:100 js/messages.php:123
@ -1341,8 +1342,9 @@ msgid "Resume monitor"
msgstr "Gjenoppta monitor"
#: js/messages.php:141
#, fuzzy
msgid "Pause monitor"
msgstr "Pause monitor"
msgstr "Pause skjerm"
#: js/messages.php:143
msgid "general_log and slow_query_log are enabled."
@ -1583,7 +1585,7 @@ msgstr "Tabellvisningsinnstillinger"
#. l10n: Filter as in "Start Filtering"
#: js/messages.php:197
msgid "Filter"
msgstr "Filter"
msgstr "Filtrer"
#: js/messages.php:198
msgid "Filter queries by word/regexp:"
@ -2446,19 +2448,19 @@ msgstr "Dokumentasjon"
#: libraries/CommonFunctions.class.php:534
msgctxt "MySQL 5.5 documentation language"
msgid "en"
msgstr "en"
msgstr "no"
#. l10n: Please check that translation actually exists.
#: libraries/CommonFunctions.class.php:538
msgctxt "MySQL 5.1 documentation language"
msgid "en"
msgstr "en"
msgstr "no"
#. l10n: Please check that translation actually exists.
#: libraries/CommonFunctions.class.php:542
msgctxt "MySQL 5.0 documentation language"
msgid "en"
msgstr "en"
msgstr "no"
#: libraries/CommonFunctions.class.php:670 libraries/Message.class.php:199
#: libraries/core.lib.php:217 libraries/import.lib.php:154
@ -2528,9 +2530,10 @@ msgid "Inline edit of this query"
msgstr "Inline redigering av denne spørringa"
#: libraries/CommonFunctions.class.php:1405
#, fuzzy
msgctxt "Inline edit query"
msgid "Inline"
msgstr "Inline"
msgstr "Innebygd"
#: libraries/CommonFunctions.class.php:1476 sql.php:1036
msgid "Profiling"
@ -3245,7 +3248,7 @@ msgstr "Funksjon"
#: pmd_general.php:658 pmd_general.php:671 pmd_general.php:734
#: pmd_general.php:788
msgid "Operator"
msgstr "Operator"
msgstr "Operatør"
#: libraries/TableSearch.class.php:219 libraries/TableSearch.class.php:1238
#: libraries/insert_edit.lib.php:1600 libraries/replication_gui.lib.php:119
@ -3971,9 +3974,9 @@ msgid ""
"inside a frame, and is a potential [strong]security hole[/strong] allowing "
"cross-frame scripting attacks"
msgstr ""
"Å tillate dette gir sider på andre domener muligheten til å innlemme "
"Å tillate dette gir sider på andre domener muligheten til å legge inn "
"phpMyAdmin i en ramme, og er et potensielt [strong]sikkerhetshull[/strong] "
"og muligjør cross-site scripting."
"og muligjør cross-frame skripting"
#: libraries/config/messages.inc.php:22
msgid "Allow third party framing"
@ -3992,8 +3995,9 @@ msgstr ""
"autentisering"
#: libraries/config/messages.inc.php:25
#, fuzzy
msgid "Blowfish secret"
msgstr "Blowfish secret"
msgstr "Blowfish hemmelighet"
#: libraries/config/messages.inc.php:26
msgid "Highlight selected rows"
@ -4122,7 +4126,7 @@ msgstr "Bekreft DROP spørringer"
#: libraries/config/messages.inc.php:50
msgid "Debug SQL"
msgstr "Debug SQL"
msgstr "Feilsøk SQL"
#: libraries/config/messages.inc.php:51
msgid "Default display direction"
@ -5639,7 +5643,7 @@ msgstr "Signon sesjonsnavn"
#: libraries/config/messages.inc.php:426
msgid "Signon URL"
msgstr "Signon URL"
msgstr "Innloggingslink"
#: libraries/config/messages.inc.php:427
msgid "Socket on which MySQL server is listening, leave empty for default"
@ -6241,7 +6245,7 @@ msgstr "Ugyldig IP addresse: %s"
#: libraries/core.lib.php:255
msgctxt "PHP documentation language"
msgid "en"
msgstr "en"
msgstr "no"
#: libraries/core.lib.php:276
#, php-format
@ -6410,7 +6414,7 @@ msgstr "Eksporter rader fra %s tabell"
#: libraries/display_export.lib.php:105
msgid "Export Method:"
msgstr "Eksportmetode"
msgstr "Eksportmetode:"
#: libraries/display_export.lib.php:121
msgid "Quick - display only the minimal options"
@ -7492,7 +7496,7 @@ msgstr "Du kan skrive vertsnavn/IP adresse og port separert med mellomrom."
#: libraries/plugins/auth/AuthenticationCookie.class.php:181
msgid "Server:"
msgstr "Tjener"
msgstr "Tjener:"
#: libraries/plugins/auth/AuthenticationCookie.class.php:193
msgid "Username:"
@ -8154,8 +8158,8 @@ msgid ""
"Displays a clickable thumbnail. The options are the maximum width and height "
"in pixels. The original aspect ratio is preserved."
msgstr ""
"Viser et klikkbart tommelfingerbilde; valg: bredde, høyde i piksler (bevarer "
"originale forhold)"
"Viser et klikkbart ministyrbilde. Valgene er satt til maksimum lengde og "
"høyde i piksler. Det opprinnelige størrelsesforholdet blir bevart."
#: libraries/plugins/transformations/abstract/LongToIPv4TransformationsPlugin.class.php:31
msgid ""
@ -8984,7 +8988,7 @@ msgstr "Vis tabelldimensjoner"
#: libraries/schema/User_Schema.class.php:455
msgid "Display all tables with the same width"
msgstr "vis alle tabeller med samme bredde?"
msgstr "Vis alle tabeller med samme lengde"
#: libraries/schema/User_Schema.class.php:460
msgid "Only show keys"
@ -9115,8 +9119,8 @@ msgid ""
"below, if there is any, may also help you in diagnosing the problem"
msgstr ""
"Det ser ut til å være en feil i din SQL-spørring. En eventuell feilmelding "
"fra MySQL-tjeneren er skrevet ut nedenfor, kan kanskje hjelpe deg med å "
"finne feilen."
"fra MySQL-tjeneren er skrevet ut nedenfor, og kan kanskje hjelpe deg med å "
"finne feilen"
#: libraries/sqlparser.lib.php:171
msgid ""
@ -10602,8 +10606,9 @@ msgstr ""
"phpMyAdmin kunne ikke avslutte tråd %s. Den er sansynligvis alt avsluttet."
#: server_status.php:616
#, fuzzy
msgid "Handler"
msgstr "Handler"
msgstr "Behandler"
#: server_status.php:617
msgid "Query cache"
@ -10639,7 +10644,7 @@ msgstr "Transaksjonskoordinator"
#: server_status.php:639
msgid "Flush (close) all tables"
msgstr "Flush (close) all tables"
msgstr "Flush (lukk) alle tabeller"
#: server_status.php:641
msgid "Show open tables"
@ -10655,7 +10660,7 @@ msgstr "Vis slavestatus"
#: server_status.php:657
msgid "Flush query cache"
msgstr "Flush query cache"
msgstr "Flush spørringsbufferen"
#: server_status.php:797
msgid "Runtime Information"
@ -12676,14 +12681,13 @@ msgid "Distinct values"
msgstr "Se gjennom distinkte verdier"
#: tbl_structure.php:166 tbl_structure.php:167
#, fuzzy
#| msgid "Adding Primary Key"
msgid "Add primary key"
msgstr "Legger til primærnøkkel"
msgstr "Legg til primærnøkkel"
#: tbl_structure.php:170 tbl_structure.php:171
msgid "Add unique index"
msgstr ""
msgstr "Legg til unik indeks"
#: tbl_structure.php:172 tbl_structure.php:173
#, fuzzy

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-03 09:19+0200\n"
"PO-Revision-Date: 2012-06-28 16:25+0200\n"
"Last-Translator: Alexsandro Preis Dubinski <alexsandroeco@gmail.com>\n"
"PO-Revision-Date: 2012-07-04 15:59+0200\n"
"Last-Translator: Marcelo Altmann <altmannmarcelo@gmail.com>\n"
"Language-Team: brazilian_portuguese <pt_BR@li.org>\n"
"Language: pt_BR\n"
"MIME-Version: 1.0\n"
@ -1881,10 +1881,9 @@ msgid "To zoom in, select a section of the plot with the mouse."
msgstr "Para ampliar, selecione um trecho do gráfico com o mouse."
#: js/messages.php:306
#, fuzzy
#| msgid "Click reset zoom link to come back to original state."
msgid "Click reset zoom button to come back to original state."
msgstr "Clique no link resetar zoom para voltar ao estado original"
msgstr "Clique no botão resetar zoom para voltar ao estado original"
#: js/messages.php:308
msgid "Click a data point to view and possibly edit the data row."
@ -2013,6 +2012,8 @@ msgstr "Copiar nome coluna"
#: js/messages.php:359
msgid "Right-click the column name to copy it to your clipboard."
msgstr ""
"Clique com o botão direito do mouse para copiar\n"
"Right-click the column name to copy it to your clipboard."
#: js/messages.php:360
msgid "Show data row(s)"
@ -6893,7 +6894,7 @@ msgstr ""
#: libraries/engines/pbxt.lib.php:135
msgid "Related Links"
msgstr "Links relatados"
msgstr "Links relacionados"
#: libraries/engines/pbxt.lib.php:137
msgid "The PrimeBase XT Blog by Paul McCullagh"

View File

@ -12,6 +12,7 @@ require_once 'libraries/DisplayResults.class.php';
require_once 'libraries/url_generating.lib.php';
require_once 'libraries/php-gettext/gettext.inc';
require_once 'libraries/CommonFunctions.class.php';
require_once 'libraries/js_escape.lib.php';
class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
@ -640,7 +641,7 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
/**
* Data provider for testGetCheckBoxesForMultipleRowOperations
*
* return array parameters and output
* @return array parameters and output
*/
public function dataProviderForGetCheckBoxesForMultipleRowOperations()
{
@ -778,7 +779,7 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
/**
* Data provider for testGetSortParamsCase1
*
* return array parameters and output
* @return array parameters and output
*/
public function dataProviderForGetSortParamsCase1()
{
@ -808,7 +809,7 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
/**
* Data provider for testGetSortParamsCase2
*
* return array parameters and output
* @return array parameters and output
*/
public function dataProviderForGetSortParamsCase2()
{
@ -845,7 +846,7 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
/**
* Data provider for testGetCheckboxForMultiRowSubmissions
*
* return array parameters and output
* @return array parameters and output
*/
public function dataProviderForGetCheckboxForMultiRowSubmissions()
{
@ -886,6 +887,7 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
* @param string $id_suffix suffix for the id
* @param string $class css classes for the td element
* @param string $output output of _getSortParams
* @param string $output output of _getCheckboxForMultiRowSubmissions
*
* @dataProvider dataProviderForGetCheckboxForMultiRowSubmissions
*/
@ -905,5 +907,521 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
);
}
/**
* Data provider for testGetEditLink
*
* @return array parametres and output
*/
public function dataProviderForGetEditLink()
{
return array(
array(
'tbl_change.php?db=Data&amp;table=customer&amp;where_clause=%60customer%60.%60id%60+%3D+1&amp;clause_is_unique=1&amp;sql_query=SELECT+%2A+FROM+%60customer%60&amp;goto=sql.php&amp;default_action=update&amp;token=bbd5003198a3bd856b21d9607d6c6a1e',
'odd edit_row_anchor row_0 vpointer vmarker',
'<span class="nowrap"><img src="themes/dot.gif" title="Edit" alt="Edit" class="icon ic_b_edit" /> Edit</span>',
'`customer`.`id` = 1',
'%60customer%60.%60id%60+%3D+1',
'<td class="odd edit_row_anchor row_0 vpointer vmarker center" ><span class="nowrap">
<a href="tbl_change.php?db=Data&amp;table=customer&amp;where_clause=%60customer%60.%60id%60+%3D+1&amp;clause_is_unique=1&amp;sql_query=SELECT+%2A+FROM+%60customer%60&amp;goto=sql.php&amp;default_action=update&amp;token=bbd5003198a3bd856b21d9607d6c6a1e" ><span class="nowrap"><img src="themes/dot.gif" title="Edit" alt="Edit" class="icon ic_b_edit" /> Edit</span></a>
<input type="hidden" class="where_clause" value ="%60customer%60.%60id%60+%3D+1" /></span></td>'
)
);
}
/**
* Test for _getEditLink
*
* @param string $edit_url edit url
* @param string $class css classes for td element
* @param string $edit_str text for the edit link
* @param string $where_clause where clause
* @param string $where_clause_html url encoded where clause
* @param string $output output of _getEditLink
*
* @dataProvider dataProviderForGetEditLink
*/
public function testGetEditLink(
$edit_url, $class, $edit_str, $where_clause, $where_clause_html, $output
) {
$GLOBALS['cfg']['PropertiesIconic'] = 'both';
$GLOBALS['cfg']['LinkLengthLimit'] = 1000;
$this->assertEquals(
$this->_callPrivateFunction(
'_getEditLink',
array(
$edit_url, $class, $edit_str, $where_clause, $where_clause_html
)
),
$output
);
}
/**
* Data provider for testGetCopyLink
*
* @return array parameters and output
*/
public function dataProviderForGetCopyLink()
{
return array(
array(
'tbl_change.php?db=Data&amp;table=customer&amp;where_clause=%60customer%60.%60id%60+%3D+1&amp;clause_is_unique=1&amp;sql_query=SELECT+%2A+FROM+%60customer%60&amp;goto=sql.php&amp;default_action=insert&amp;token=f597309d3a066c3c81a6cb015a79636d',
'<span class="nowrap"><img src="themes/dot.gif" title="Copy" alt="Copy" class="icon ic_b_insrow" /> Copy</span>',
'`customer`.`id` = 1',
'%60customer%60.%60id%60+%3D+1',
'odd row_0 vpointer vmarker',
'<td class="odd row_0 vpointer vmarker center" ><span class="nowrap">
<a href="tbl_change.php?db=Data&amp;table=customer&amp;where_clause=%60customer%60.%60id%60+%3D+1&amp;clause_is_unique=1&amp;sql_query=SELECT+%2A+FROM+%60customer%60&amp;goto=sql.php&amp;default_action=insert&amp;token=f597309d3a066c3c81a6cb015a79636d" ><span class="nowrap"><img src="themes/dot.gif" title="Copy" alt="Copy" class="icon ic_b_insrow" /> Copy</span></a>
<input type="hidden" class="where_clause" value="%60customer%60.%60id%60+%3D+1" /></span></td>'
)
);
}
/**
* Test for _getCopyLink
*
* @param string $copy_url copy url
* @param string $copy_str text for the copy link
* @param string $where_clause where clause
* @param string $where_clause_html url encoded where clause
* @param string $class css classes for the td element
* @param string $output output of _getCopyLink
*
* @dataProvider dataProviderForGetCopyLink
*/
public function testGetCopyLink(
$copy_url, $copy_str, $where_clause, $where_clause_html, $class, $output
) {
$GLOBALS['cfg']['PropertiesIconic'] = 'both';
$GLOBALS['cfg']['LinkLengthLimit'] = 1000;
$this->assertEquals(
$this->_callPrivateFunction(
'_getCopyLink',
array(
$copy_url, $copy_str, $where_clause, $where_clause_html, $class
)
),
$output
);
}
/**
* Data provider for testGetDeleteLink
*
* @return array parameters and output
*/
public function dataProviderForGetDeleteLink()
{
return array(
array(
'sql.php?db=Data&amp;table=customer&amp;sql_query=DELETE+FROM+%60Data%60.%60customer%60+WHERE+%60customer%60.%60id%60+%3D+1&amp;message_to_show=The+row+has+been+deleted&amp;goto=sql.php%3Fdb%3DData%26table%3Dcustomer%26sql_query%3DSELECT%2B%252A%2BFROM%2B%2560customer%2560%26message_to_show%3DThe%2Brow%2Bhas%2Bbeen%2Bdeleted%26goto%3Dtbl_structure.php%26token%3Df597309d3a066c3c81a6cb015a79636d&amp;token=f597309d3a066c3c81a6cb015a79636d',
'<span class="nowrap"><img src="themes/dot.gif" title="Delete" alt="Delete" class="icon ic_b_drop" /> Delete</span>',
'DELETE FROM `Data`.`customer` WHERE `customer`.`id` = 1',
'odd row_0 vpointer vmarker',
'<td class="odd row_0 vpointer vmarker center" >
<a href="sql.php?db=Data&amp;table=customer&amp;sql_query=DELETE+FROM+%60Data%60.%60customer%60+WHERE+%60customer%60.%60id%60+%3D+1&amp;message_to_show=The+row+has+been+deleted&amp;goto=sql.php%3Fdb%3DData%26table%3Dcustomer%26sql_query%3DSELECT%2B%252A%2BFROM%2B%2560customer%2560%26message_to_show%3DThe%2Brow%2Bhas%2Bbeen%2Bdeleted%26goto%3Dtbl_structure.php%26token%3Df597309d3a066c3c81a6cb015a79636d&amp;token=f597309d3a066c3c81a6cb015a79636d" onclick="return confirmLink(this, \'DELETE FROM `Data`.`customer` WHERE `customer`.`id` = 1\')"><span class="nowrap"><img src="themes/dot.gif" title="Delete" alt="Delete" class="icon ic_b_drop" /> Delete</span></a>
</td>'
)
);
}
/**
* Test for _getDeleteLink
*
* @param string $del_url delete url
* @param string $del_str text for the delete link
* @param string $js_conf text for the JS confirmation
* @param string $class css classes for the td element
* @param string $output output of _getDeleteLink
*
* @dataProvider dataProviderForGetDeleteLink
*/
public function testGetDeleteLink(
$del_url, $del_str, $js_conf, $class, $output
) {
$GLOBALS['cfg']['PropertiesIconic'] = 'both';
$GLOBALS['cfg']['LinkLengthLimit'] = 1000;
$this->assertEquals(
$this->_callPrivateFunction(
'_getDeleteLink',
array(
$del_url, $del_str, $js_conf, $class
)
),
$output
);
}
/**
* Data provider for testGetCheckboxAndLinksCase1
*
* @return array parameters and output
*/
public function dataProviderForGetCheckboxAndLinksCase1()
{
return array(
array(
PMA_DisplayResults::POSITION_LEFT,
'sql.php?db=data&amp;table=new&amp;sql_query=DELETE+FROM+%60data%60.%60new%60+WHERE+%60new%60.%60id%60+%3D+1&amp;message_to_show=The+row+has+been+deleted&amp;goto=sql.php%3Fdb%3Ddata%26table%3Dnew%26sql_query%3DSELECT%2B%252A%2BFROM%2B%2560new%2560%26message_to_show%3DThe%2Brow%2Bhas%2Bbeen%2Bdeleted%26goto%3Dtbl_structure.php%26token%3Dae4c6d18375f446dfa068420c1f6a4e8&amp;token=ae4c6d18375f446dfa068420c1f6a4e8',
array(
'edit_lnk' => 'ur',
'del_lnk' => 'dr',
'sort_lnk' => '0',
'nav_bar' => '1',
'ins_row' => '1',
'bkm_form' => '1',
'text_btn' => '1',
'pview_lnk' => '1'
),
0,
'`new`.`id` = 1',
'%60new%60.%60id%60+%3D+1',
array(
'`new`.`id`' => '= 1',
),
'DELETE FROM `data`.`new` WHERE `new`.`id` = 1',
'l',
'tbl_change.php?db=data&amp;table=new&amp;where_clause=%60new%60.%60id%60+%3D+1&amp;clause_is_unique=1&amp;sql_query=SELECT+%2A+FROM+%60new%60&amp;goto=sql.php&amp;default_action=update&amp;token=ae4c6d18375f446dfa068420c1f6a4e8',
'tbl_change.php?db=data&amp;table=new&amp;where_clause=%60new%60.%60id%60+%3D+1&amp;clause_is_unique=1&amp;sql_query=SELECT+%2A+FROM+%60new%60&amp;goto=sql.php&amp;default_action=insert&amp;token=ae4c6d18375f446dfa068420c1f6a4e8',
'edit_row_anchor',
'<span class="nowrap"><img src="themes/dot.gif" title="Edit" alt="Edit" class="icon ic_b_edit" /> Edit</span>',
'<span class="nowrap"><img src="themes/dot.gif" title="Copy" alt="Copy" class="icon ic_b_insrow" /> Copy</span>',
'<span class="nowrap"><img src="themes/dot.gif" title="Delete" alt="Delete" class="icon ic_b_drop" /> Delete</span>',
'DELETE FROM `data`.`new` WHERE `new`.`id` = 1',
'<td class="center"><input type="checkbox" id="id_rows_to_delete0_left" name="rows_to_delete[0]" class="multi_checkbox" value="%60new%60.%60id%60+%3D+1" /><input type="hidden" class="condition_array" value="{&quot;`new`.`id`&quot;:&quot;= 1&quot;}" /> </td><td class="edit_row_anchor center" ><span class="nowrap">
<a href="tbl_change.php?db=data&amp;table=new&amp;where_clause=%60new%60.%60id%60+%3D+1&amp;clause_is_unique=1&amp;sql_query=SELECT+%2A+FROM+%60new%60&amp;goto=sql.php&amp;default_action=update&amp;token=ae4c6d18375f446dfa068420c1f6a4e8" ><span class="nowrap"><img src="themes/dot.gif" title="Edit" alt="Edit" class="icon ic_b_edit" /> Edit</span></a>
<input type="hidden" class="where_clause" value ="%60new%60.%60id%60+%3D+1" /></span></td><td class="center" ><span class="nowrap">
<a href="tbl_change.php?db=data&amp;table=new&amp;where_clause=%60new%60.%60id%60+%3D+1&amp;clause_is_unique=1&amp;sql_query=SELECT+%2A+FROM+%60new%60&amp;goto=sql.php&amp;default_action=insert&amp;token=ae4c6d18375f446dfa068420c1f6a4e8" ><span class="nowrap"><img src="themes/dot.gif" title="Copy" alt="Copy" class="icon ic_b_insrow" /> Copy</span></a>
<input type="hidden" class="where_clause" value="%60new%60.%60id%60+%3D+1" /></span></td><td class="center" >
<a href="sql.php?db=data&amp;table=new&amp;sql_query=DELETE+FROM+%60data%60.%60new%60+WHERE+%60new%60.%60id%60+%3D+1&amp;message_to_show=The+row+has+been+deleted&amp;goto=sql.php%3Fdb%3Ddata%26table%3Dnew%26sql_query%3DSELECT%2B%252A%2BFROM%2B%2560new%2560%26message_to_show%3DThe%2Brow%2Bhas%2Bbeen%2Bdeleted%26goto%3Dtbl_structure.php%26token%3Dae4c6d18375f446dfa068420c1f6a4e8&amp;token=ae4c6d18375f446dfa068420c1f6a4e8" onclick="return confirmLink(this, \'DELETE FROM `data`.`new` WHERE `new`.`id` = 1\')"><span class="nowrap"><img src="themes/dot.gif" title="Delete" alt="Delete" class="icon ic_b_drop" /> Delete</span></a>
</td>'
)
);
}
/**
* Test for _getCheckboxAndLinks - case 1
*
* @param string $position the position of the checkbox and links
* @param string $del_url delete url
* @param array $is_display array with explicit indexes for all the
* display elements
* @param string $row_no row number
* @param string $where_clause where clause
* @param string $where_clause_html url encoded where clause
* @param array $condition_array array of conditions in the where clause
* @param string $del_query delete query
* @param string $id_suffix suffix for the id
* @param string $edit_url edit url
* @param string $copy_url copy url
* @param string $class css classes for the td elements
* @param string $edit_str text for the edit link
* @param string $copy_str text for the copy link
* @param string $del_str text for the delete link
* @param string $js_conf text for the JS confirmation
* @param string $output output of _getCheckboxAndLinks
*
* @dataProvider dataProviderForGetCheckboxAndLinksCase1
*/
public function testGetCheckboxAndLinksCase1(
$position, $del_url, $is_display, $row_no, $where_clause,
$where_clause_html, $condition_array, $del_query, $id_suffix, $edit_url,
$copy_url, $class, $edit_str, $copy_str, $del_str, $js_conf, $output
) {
$this->assertEquals(
$this->_callPrivateFunction(
'_getCheckboxAndLinks',
array(
$position, $del_url, $is_display, $row_no, $where_clause,
$where_clause_html, $condition_array, $del_query,
$id_suffix, $edit_url, $copy_url, $class, $edit_str,
$copy_str, $del_str, $js_conf
)
),
$output
);
}
/**
* Data provider for testGetCheckboxAndLinksCase2
*
* @return array parameters and output
*/
public function dataProviderForGetCheckboxAndLinksCase2()
{
return array(
array(
PMA_DisplayResults::POSITION_RIGHT,
'sql.php?db=data&amp;table=new&amp;sql_query=DELETE+FROM+%60data%60.%60new%60+WHERE+%60new%60.%60id%60+%3D+1&amp;message_to_show=The+row+has+been+deleted&amp;goto=sql.php%3Fdb%3Ddata%26table%3Dnew%26sql_query%3DSELECT%2B%252A%2BFROM%2B%2560new%2560%26message_to_show%3DThe%2Brow%2Bhas%2Bbeen%2Bdeleted%26goto%3Dtbl_structure.php%26token%3Dae4c6d18375f446dfa068420c1f6a4e8&amp;token=ae4c6d18375f446dfa068420c1f6a4e8',
array(
'edit_lnk' => 'ur',
'del_lnk' => 'dr',
'sort_lnk' => '0',
'nav_bar' => '1',
'ins_row' => '1',
'bkm_form' => '1',
'text_btn' => '1',
'pview_lnk' => '1'
),
0,
'`new`.`id` = 1',
'%60new%60.%60id%60+%3D+1',
array(
'`new`.`id`' => '= 1',
),
'DELETE FROM `data`.`new` WHERE `new`.`id` = 1',
'l',
'tbl_change.php?db=data&amp;table=new&amp;where_clause=%60new%60.%60id%60+%3D+1&amp;clause_is_unique=1&amp;sql_query=SELECT+%2A+FROM+%60new%60&amp;goto=sql.php&amp;default_action=update&amp;token=ae4c6d18375f446dfa068420c1f6a4e8',
'tbl_change.php?db=data&amp;table=new&amp;where_clause=%60new%60.%60id%60+%3D+1&amp;clause_is_unique=1&amp;sql_query=SELECT+%2A+FROM+%60new%60&amp;goto=sql.php&amp;default_action=insert&amp;token=ae4c6d18375f446dfa068420c1f6a4e8',
'edit_row_anchor',
'<span class="nowrap"><img src="themes/dot.gif" title="Edit" alt="Edit" class="icon ic_b_edit" /> Edit</span>',
'<span class="nowrap"><img src="themes/dot.gif" title="Copy" alt="Copy" class="icon ic_b_insrow" /> Copy</span>',
'<span class="nowrap"><img src="themes/dot.gif" title="Delete" alt="Delete" class="icon ic_b_drop" /> Delete</span>',
'DELETE FROM `data`.`new` WHERE `new`.`id` = 1',
'<td class="center" >
<a href="sql.php?db=data&amp;table=new&amp;sql_query=DELETE+FROM+%60data%60.%60new%60+WHERE+%60new%60.%60id%60+%3D+1&amp;message_to_show=The+row+has+been+deleted&amp;goto=sql.php%3Fdb%3Ddata%26table%3Dnew%26sql_query%3DSELECT%2B%252A%2BFROM%2B%2560new%2560%26message_to_show%3DThe%2Brow%2Bhas%2Bbeen%2Bdeleted%26goto%3Dtbl_structure.php%26token%3Dae4c6d18375f446dfa068420c1f6a4e8&amp;token=ae4c6d18375f446dfa068420c1f6a4e8" onclick="return confirmLink(this, \'DELETE FROM `data`.`new` WHERE `new`.`id` = 1\')"><span class="nowrap"><img src="themes/dot.gif" title="Delete" alt="Delete" class="icon ic_b_drop" /> Delete</span></a>
</td><td class="center" ><span class="nowrap">
<a href="tbl_change.php?db=data&amp;table=new&amp;where_clause=%60new%60.%60id%60+%3D+1&amp;clause_is_unique=1&amp;sql_query=SELECT+%2A+FROM+%60new%60&amp;goto=sql.php&amp;default_action=insert&amp;token=ae4c6d18375f446dfa068420c1f6a4e8" ><span class="nowrap"><img src="themes/dot.gif" title="Copy" alt="Copy" class="icon ic_b_insrow" /> Copy</span></a>
<input type="hidden" class="where_clause" value="%60new%60.%60id%60+%3D+1" /></span></td><td class="edit_row_anchor center" ><span class="nowrap">
<a href="tbl_change.php?db=data&amp;table=new&amp;where_clause=%60new%60.%60id%60+%3D+1&amp;clause_is_unique=1&amp;sql_query=SELECT+%2A+FROM+%60new%60&amp;goto=sql.php&amp;default_action=update&amp;token=ae4c6d18375f446dfa068420c1f6a4e8" ><span class="nowrap"><img src="themes/dot.gif" title="Edit" alt="Edit" class="icon ic_b_edit" /> Edit</span></a>
<input type="hidden" class="where_clause" value ="%60new%60.%60id%60+%3D+1" /></span></td><td class="center"><input type="checkbox" id="id_rows_to_delete0_right" name="rows_to_delete[0]" class="multi_checkbox" value="%60new%60.%60id%60+%3D+1" /><input type="hidden" class="condition_array" value="{&quot;`new`.`id`&quot;:&quot;= 1&quot;}" /> </td>'
)
);
}
/**
* Test for _getCheckboxAndLinks - case 2
*
* @param string $position the position of the checkbox and links
* @param string $del_url delete url
* @param array $is_display array with explicit indexes for all the
* display elements
* @param string $row_no row number
* @param string $where_clause where clause
* @param string $where_clause_html url encoded where clause
* @param array $condition_array array of conditions in the where clause
* @param string $del_query delete query
* @param string $id_suffix suffix for the id
* @param string $edit_url edit url
* @param string $copy_url copy url
* @param string $class css classes for the td elements
* @param string $edit_str text for the edit link
* @param string $copy_str text for the copy link
* @param string $del_str text for the delete link
* @param string $js_conf text for the JS confirmation
* @param string $output output of _getCheckboxAndLinks
*
* @dataProvider dataProviderForGetCheckboxAndLinksCase2
*/
public function testGetCheckboxAndLinksCase2(
$position, $del_url, $is_display, $row_no, $where_clause,
$where_clause_html, $condition_array, $del_query, $id_suffix, $edit_url,
$copy_url, $class, $edit_str, $copy_str, $del_str, $js_conf, $output
) {
$this->assertEquals(
$this->_callPrivateFunction(
'_getCheckboxAndLinks',
array(
$position, $del_url, $is_display, $row_no, $where_clause,
$where_clause_html, $condition_array, $del_query,
$id_suffix, $edit_url, $copy_url, $class, $edit_str,
$copy_str, $del_str, $js_conf
)
),
$output
);
}
/**
* Data provider for testGetCheckboxAndLinksCase3
*
* @return array parameters and output
*/
public function dataProviderForGetCheckboxAndLinksCase3()
{
return array(
array(
PMA_DisplayResults::POSITION_NONE,
'sql.php?db=data&amp;table=new&amp;sql_query=DELETE+FROM+%60data%60.%60new%60+WHERE+%60new%60.%60id%60+%3D+1&amp;message_to_show=The+row+has+been+deleted&amp;goto=sql.php%3Fdb%3Ddata%26table%3Dnew%26sql_query%3DSELECT%2B%252A%2BFROM%2B%2560new%2560%26message_to_show%3DThe%2Brow%2Bhas%2Bbeen%2Bdeleted%26goto%3Dtbl_structure.php%26token%3Dae4c6d18375f446dfa068420c1f6a4e8&amp;token=ae4c6d18375f446dfa068420c1f6a4e8',
array(
'edit_lnk' => 'ur',
'del_lnk' => 'dr',
'sort_lnk' => '0',
'nav_bar' => '1',
'ins_row' => '1',
'bkm_form' => '1',
'text_btn' => '1',
'pview_lnk' => '1'
),
0,
'`new`.`id` = 1',
'%60new%60.%60id%60+%3D+1',
array(
'`new`.`id`' => '= 1',
),
'DELETE FROM `data`.`new` WHERE `new`.`id` = 1',
'l',
'tbl_change.php?db=data&amp;table=new&amp;where_clause=%60new%60.%60id%60+%3D+1&amp;clause_is_unique=1&amp;sql_query=SELECT+%2A+FROM+%60new%60&amp;goto=sql.php&amp;default_action=update&amp;token=ae4c6d18375f446dfa068420c1f6a4e8',
'tbl_change.php?db=data&amp;table=new&amp;where_clause=%60new%60.%60id%60+%3D+1&amp;clause_is_unique=1&amp;sql_query=SELECT+%2A+FROM+%60new%60&amp;goto=sql.php&amp;default_action=insert&amp;token=ae4c6d18375f446dfa068420c1f6a4e8',
'edit_row_anchor',
'<span class="nowrap"><img src="themes/dot.gif" title="Edit" alt="Edit" class="icon ic_b_edit" /> Edit</span>',
'<span class="nowrap"><img src="themes/dot.gif" title="Copy" alt="Copy" class="icon ic_b_insrow" /> Copy</span>',
'<span class="nowrap"><img src="themes/dot.gif" title="Delete" alt="Delete" class="icon ic_b_drop" /> Delete</span>',
'DELETE FROM `data`.`new` WHERE `new`.`id` = 1',
'<td class="center"><input type="checkbox" id="id_rows_to_delete0_left" name="rows_to_delete[0]" class="multi_checkbox" value="%60new%60.%60id%60+%3D+1" /><input type="hidden" class="condition_array" value="{&quot;`new`.`id`&quot;:&quot;= 1&quot;}" /> </td>'
)
);
}
/**
* Test for _getCheckboxAndLinks - case 3
*
* @param string $position the position of the checkbox and links
* @param string $del_url delete url
* @param array $is_display array with explicit indexes for all the
* display elements
* @param string $row_no row number
* @param string $where_clause where clause
* @param string $where_clause_html url encoded where clause
* @param array $condition_array array of conditions in the where clause
* @param string $del_query delete query
* @param string $id_suffix suffix for the id
* @param string $edit_url edit url
* @param string $copy_url copy url
* @param string $class css classes for the td elements
* @param string $edit_str text for the edit link
* @param string $copy_str text for the copy link
* @param string $del_str text for the delete link
* @param string $js_conf text for the JS confirmation
* @param string $output output of _getCheckboxAndLinks
*
* @dataProvider dataProviderForGetCheckboxAndLinksCase3
*/
public function testGetCheckboxAndLinksCase3(
$position, $del_url, $is_display, $row_no, $where_clause,
$where_clause_html, $condition_array, $del_query, $id_suffix, $edit_url,
$copy_url, $class, $edit_str, $copy_str, $del_str, $js_conf, $output
) {
$this->assertEquals(
$this->_callPrivateFunction(
'_getCheckboxAndLinks',
array(
$position, $del_url, $is_display, $row_no, $where_clause,
$where_clause_html, $condition_array, $del_query,
$id_suffix, $edit_url, $copy_url, $class, $edit_str,
$copy_str, $del_str, $js_conf
)
),
$output
);
}
/**
* Test for _mimeDefaultFunction
*/
public function testMimeDefaultFunction()
{
$this->assertEquals(
$this->_callPrivateFunction(
'_mimeDefaultFunction',
array("A 'quote' is <b>bold</b>")
),
"A 'quote' is &lt;b&gt;bold&lt;/b&gt;"
);
}
/**
* Data provider for testGetPlacedLinks
*
* @return array parameters and output
*/
public function dataProviderForGetPlacedLinks()
{
return array(
array(
PMA_DisplayResults::POSITION_NONE,
'sql.php?db=data&amp;table=new&amp;sql_query=DELETE+FROM+%60data%60.%60new%60+WHERE+%60new%60.%60id%60+%3D+1&amp;message_to_show=The+row+has+been+deleted&amp;goto=sql.php%3Fdb%3Ddata%26table%3Dnew%26sql_query%3DSELECT%2B%252A%2BFROM%2B%2560new%2560%26message_to_show%3DThe%2Brow%2Bhas%2Bbeen%2Bdeleted%26goto%3Dtbl_structure.php%26token%3Dae4c6d18375f446dfa068420c1f6a4e8&amp;token=ae4c6d18375f446dfa068420c1f6a4e8',
array(
'edit_lnk' => 'ur',
'del_lnk' => 'dr',
'sort_lnk' => '0',
'nav_bar' => '1',
'ins_row' => '1',
'bkm_form' => '1',
'text_btn' => '1',
'pview_lnk' => '1'
),
0,
'`new`.`id` = 1',
'%60new%60.%60id%60+%3D+1',
array(
'`new`.`id`' => '= 1',
),
'DELETE FROM `data`.`new` WHERE `new`.`id` = 1',
'l',
'tbl_change.php?db=data&amp;table=new&amp;where_clause=%60new%60.%60id%60+%3D+1&amp;clause_is_unique=1&amp;sql_query=SELECT+%2A+FROM+%60new%60&amp;goto=sql.php&amp;default_action=update&amp;token=ae4c6d18375f446dfa068420c1f6a4e8',
'tbl_change.php?db=data&amp;table=new&amp;where_clause=%60new%60.%60id%60+%3D+1&amp;clause_is_unique=1&amp;sql_query=SELECT+%2A+FROM+%60new%60&amp;goto=sql.php&amp;default_action=insert&amp;token=ae4c6d18375f446dfa068420c1f6a4e8',
'edit_row_anchor',
'<span class="nowrap"><img src="themes/dot.gif" title="Edit" alt="Edit" class="icon ic_b_edit" /> Edit</span>',
'<span class="nowrap"><img src="themes/dot.gif" title="Copy" alt="Copy" class="icon ic_b_insrow" /> Copy</span>',
'<span class="nowrap"><img src="themes/dot.gif" title="Delete" alt="Delete" class="icon ic_b_drop" /> Delete</span>',
null,
'<td class="center"><input type="checkbox" id="id_rows_to_delete0_left" name="rows_to_delete[0]" class="multi_checkbox" value="%60new%60.%60id%60+%3D+1" /><input type="hidden" class="condition_array" value="{&quot;`new`.`id`&quot;:&quot;= 1&quot;}" /> </td>'
)
);
}
/**
* Test for _getPlacedLinks
*
* @param string $dir the direction of links should place
* @param string $del_url the url for delete row
* @param array $is_display which elements to display
* @param integer $row_no the index of current row
* @param string $where_clause the where clause of the sql
* @param string $where_clause_html the html encoded where clause
* @param array $condition_array array of keys (primary, unique, condition)
* @param string $del_query the query for delete row
* @param string $dir_letter the letter denoted the direction
* @param string $edit_url the url for edit row
* @param string $copy_url the url for copy row
* @param string $edit_anchor_class the class for html element for edit
* @param string $edit_str the label for edit row
* @param string $copy_str the label for copy row
* @param string $del_str the label for delete row
* @param string $js_conf text for the JS confirmation
* @param string $output output of _getPlacedLinks
*
* @dataProvider dataProviderForGetPlacedLinks
*/
public function testGetPlacedLinks(
$dir, $del_url, $is_display, $row_no, $where_clause, $where_clause_html,
$condition_array, $del_query, $dir_letter, $edit_url, $copy_url,
$edit_anchor_class, $edit_str, $copy_str, $del_str, $js_conf, $output
) {
$this->assertEquals(
$this->_callPrivateFunction(
'_getPlacedLinks',
array(
$dir, $del_url, $is_display, $row_no, $where_clause,
$where_clause_html, $condition_array, $del_query,
$dir_letter, $edit_url, $copy_url, $edit_anchor_class,
$edit_str, $copy_str, $del_str, $js_conf
)
),
$output
);
}
}