Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
weblate committed Jan 24, 2013
2 parents d296bd3 + ed94a77 commit 0ed6971
Show file tree
Hide file tree
Showing 13 changed files with 15 additions and 27 deletions.
2 changes: 1 addition & 1 deletion libraries/Partition.class.php
Expand Up @@ -63,7 +63,7 @@ static public function havePartitioning()
} 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;
Expand Down
2 changes: 1 addition & 1 deletion libraries/Scripts.class.php
Expand Up @@ -52,7 +52,7 @@ private function _includeFiles($files)
{
$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') {
Expand Down
2 changes: 1 addition & 1 deletion libraries/TableSearch.class.php
Expand Up @@ -127,7 +127,7 @@ private function _loadTableInfo()
// 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'];

Expand Down
5 changes: 0 additions & 5 deletions libraries/core.lib.php
Expand Up @@ -228,11 +228,6 @@ function __($text)
}
}

$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'])
Expand Down
7 changes: 2 additions & 5 deletions libraries/database_interface.lib.php
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down
5 changes: 3 additions & 2 deletions libraries/display_select_lang.lib.php
Expand Up @@ -35,7 +35,7 @@ function PMA_languageCmp($a, $b)
*/
function PMA_getLanguageSelectorHtml($use_fieldset = false, $show_doc = true)
{
global $cfg, $lang;
global $lang;

$retval = '';

Expand Down Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion libraries/file_listing.lib.php
Expand Up @@ -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"';
Expand Down
1 change: 0 additions & 1 deletion libraries/import.lib.php
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions libraries/insert_edit.lib.php
Expand Up @@ -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);
}
}
Expand Down Expand Up @@ -2102,7 +2102,7 @@ function PMA_transformEditedValues($db, $table,
= $transformation_plugin->applyTransformation(
$column_data,
$transform_options,
$meta = ''
''
);
}
} // end of loop for each transformation cell
Expand Down
2 changes: 1 addition & 1 deletion libraries/js_escape.lib.php
Expand Up @@ -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";
Expand Down
6 changes: 3 additions & 3 deletions libraries/plugins/import/ImportCsv.class.php
Expand Up @@ -245,7 +245,7 @@ public function doImport()
/* 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;
Expand Down Expand Up @@ -457,7 +457,7 @@ public function doImport()
}

if ($this->_getAnalyze()) {
foreach ($values as $ley => $val) {
foreach ($values as $val) {
$tempRow[] = $val;
++$col_count;
}
Expand Down Expand Up @@ -629,4 +629,4 @@ private function _setAnalyze($analyze)
{
$this->_analyze = $analyze;
}
}
}
2 changes: 0 additions & 2 deletions libraries/sqlparser.lib.php
Expand Up @@ -344,7 +344,6 @@ function PMA_SQP_parse($sql)
$startquotepos = $count2;
$quotetype = $c;
$count2++;
$escaped = false;
$pos = $count2;
$oldpos = 0;
do {
Expand Down Expand Up @@ -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 == '*')) {
Expand Down
2 changes: 0 additions & 2 deletions libraries/zip_extension.lib.php
Expand Up @@ -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)) {
Expand All @@ -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)) {
Expand Down

0 comments on commit 0ed6971

Please sign in to comment.