Merge branch 'master' of ssh://phpmyadmin.git.sourceforge.net/gitroot/phpmyadmin/phpmyadmin

Conflicts:
	libraries/db_links.inc.php
	libraries/tbl_links.inc.php
This commit is contained in:
Crack
2010-08-01 23:19:21 +02:00
81 changed files with 11031 additions and 7877 deletions

View File

@@ -2891,6 +2891,24 @@ function PMA_expandUserString($string, $escape = NULL, $updates = array()) {
}
}
/* Fetch fields list if required */
if (strpos($string, '@FIELDS@') !== FALSE) {
$fields_list = PMA_DBI_fetch_result(
'SHOW COLUMNS FROM ' . PMA_backquote($GLOBALS['db'])
. '.' . PMA_backquote($GLOBALS['table']));
$field_names = array();
foreach ($fields_list as $field) {
if (!is_null($escape)) {
$field_names[] = $escape($field['Field']);
} else {
$field_names[] = $field['Field'];
}
}
$replace['@FIELDS@'] = implode(',', $field_names);
}
/* Do the replacement */
return str_replace(array_keys($replace), array_values($replace), strftime($string));
}