Merge remote-tracking branch 'origin/master'

This commit is contained in:
Weblate 2013-01-24 17:32:17 +01:00
commit 0ed6971847
13 changed files with 15 additions and 27 deletions

View File

@ -63,7 +63,7 @@ class PMA_Partition
} else {
// see http://dev.mysql.com/doc/refman/5.6/en/partitioning.html
$plugins = PMA_DBI_fetch_result("SHOW PLUGINS");
foreach ($plugins as $key => $value) {
foreach ($plugins as $value) {
if ($value['Name'] == 'partition') {
$have_partitioning = true;
break;

View File

@ -52,7 +52,7 @@ class PMA_Scripts
{
$dynamic_scripts = "";
$params = array();
foreach ($files as $key => $value) {
foreach ($files as $value) {
if (strpos($value['filename'], "?") === false) {
$include = true;
if ($value['conditional_ie'] !== false && PMA_USR_BROWSER_AGENT === 'IE') {

View File

@ -127,7 +127,7 @@ class PMA_TableSearch
// Get details about the geometry fucntions
$geom_types = PMA_Util::getGISDatatypes();
foreach ($columns as $key => $row) {
foreach ($columns as $row) {
// set column name
$this->_columnNames[] = $row['Field'];

View File

@ -228,11 +228,6 @@ function PMA_fatalError(
}
}
$error_header = __('Error');
$lang = $GLOBALS['available_languages'][$GLOBALS['lang']][1];
$dir = $GLOBALS['text_dir'];
// on fatal errors it cannot hurt to always delete the current session
if ($delete_session
&& isset($GLOBALS['session_name'])

View File

@ -192,15 +192,12 @@ function PMA_DBI_try_query($query, $link = null, $options = 0,
$result = PMA_DBI_real_query($query, $link, $options);
if ($cache_affected_rows) {
$GLOBALS['cached_affected_rows'] = PMA_DBI_affected_rows(
$link, $get_from_cache = false
);
$GLOBALS['cached_affected_rows'] = PMA_DBI_affected_rows($link, false);
}
if ($GLOBALS['cfg']['DBG']['sql']) {
$time = microtime(true) - $time;
PMA_DBI_DBG_query($query, $link, $result, $time);
}
if ($result != false && PMA_Tracker::isActive() == true ) {
PMA_Tracker::handleQuery($query);
@ -2024,7 +2021,7 @@ function PMA_DBI_get_triggers($db, $table = '', $delimiter = '//')
// Sort results by name
$name = array();
foreach ($result as $key => $value) {
foreach ($result as $value) {
$name[] = $value['name'];
}
array_multisort($name, SORT_ASC, $result);

View File

@ -35,7 +35,7 @@ function PMA_languageCmp($a, $b)
*/
function PMA_getLanguageSelectorHtml($use_fieldset = false, $show_doc = true)
{
global $cfg, $lang;
global $lang;
$retval = '';
@ -66,7 +66,8 @@ function PMA_getLanguageSelectorHtml($use_fieldset = false, $show_doc = true)
. $language_title . ': </label></bdo>';
}
$retval .= '<select name="lang" class="autosubmit" lang="en" dir="ltr" id="sel-lang">';
$retval .= '<select name="lang" class="autosubmit" lang="en"'
. ' dir="ltr" id="sel-lang">';
uasort($GLOBALS['available_languages'], 'PMA_languageCmp');
foreach ($GLOBALS['available_languages'] as $id => $tmplang) {

View File

@ -59,7 +59,7 @@ function PMA_getFileSelectOptions($dir, $extensions = '', $active = '')
return false;
}
$result = '';
foreach ($list as $key => $val) {
foreach ($list as $val) {
$result .= '<option value="'. htmlspecialchars($val) . '"';
if ($val == $active) {
$result .= ' selected="selected"';

View File

@ -828,7 +828,6 @@ function PMA_analyzeTable(&$table)
/* Temp vars */
$curr_type = NONE;
$curr_size = 0;
/* If the passed array is not of the correct form, do not process it */
if (is_array($table)

View File

@ -173,7 +173,7 @@ function PMA_loadFirstRow($table, $db)
function PMA_urlParamsInEditMode($url_params, $where_clause_array, $where_clause)
{
if (isset($where_clause)) {
foreach ($where_clause_array as $key_id => $where_clause) {
foreach ($where_clause_array as $where_clause) {
$url_params['where_clause'] = trim($where_clause);
}
}
@ -2102,7 +2102,7 @@ function PMA_transformEditedValues($db, $table,
= $transformation_plugin->applyTransformation(
$column_data,
$transform_options,
$meta = ''
''
);
}
} // end of loop for each transformation cell

View File

@ -106,7 +106,7 @@ function PMA_getJsValue($key, $value, $escape = true)
$result .= $value;
} elseif (is_array($value)) {
$result .= '[';
foreach ($value as $id => $val) {
foreach ($value as $val) {
$result .= PMA_formatJsVal($val) . ",";
}
$result .= "];\n";

View File

@ -245,7 +245,7 @@ class ImportCsv extends ImportPlugin
/* Trim also `, if user already included backquoted fields */
$val = trim($val, " \t\r\n\0\x0B`");
$found = false;
foreach ($tmp_fields as $id => $field) {
foreach ($tmp_fields as $field) {
if ($field['Field'] == $val) {
$found = true;
break;
@ -457,7 +457,7 @@ class ImportCsv extends ImportPlugin
}
if ($this->_getAnalyze()) {
foreach ($values as $ley => $val) {
foreach ($values as $val) {
$tempRow[] = $val;
++$col_count;
}
@ -629,4 +629,4 @@ class ImportCsv extends ImportPlugin
{
$this->_analyze = $analyze;
}
}
}

View File

@ -344,7 +344,6 @@ function PMA_SQP_parse($sql)
$startquotepos = $count2;
$quotetype = $c;
$count2++;
$escaped = false;
$pos = $count2;
$oldpos = 0;
do {
@ -629,7 +628,6 @@ function PMA_SQP_parse($sql)
} else {
// Bad luck, lets split it up more
$first = $punct_data[0];
$first2 = $punct_data[0] . $punct_data[1];
$last2 = $punct_data[$l - 2] . $punct_data[$l - 1];
$last = $punct_data[$l - 1];
if (($first == ',') || ($first == ';') || ($first == '.') || ($first == '*')) {

View File

@ -97,7 +97,6 @@ function PMA_getZipContents($file, $specific_entry = null)
function PMA_findFileFromZipArchive ($file_regexp, $file)
{
$zip_handle = zip_open($file);
$found = false;
if (is_resource($zip_handle)) {
$entry = zip_read($zip_handle);
while (is_resource($entry)) {
@ -124,7 +123,6 @@ function PMA_getNoOfFilesInZip($file)
{
$count = 0;
$zip_handle = zip_open($file);
$found = false;
if (is_resource($zip_handle)) {
$entry = zip_read($zip_handle);
while (is_resource($entry)) {