diff --git a/tbl_select.php3 b/tbl_select.php3
index c0592581c..b2f747458 100755
--- a/tbl_select.php3
+++ b/tbl_select.php3
@@ -8,12 +8,14 @@
require('./libraries/grab_globals.lib.php3');
require('./libraries/common.lib.php3');
-/*
-* Defines an array of functions (should possibly be in config.inc.
-* so i can also use it in tbl_qbe
-*/
-$numfunctions = array('=','>','>=','<','<=','!=');
-$textfunctions = array('LIKE','=','!=');
+
+/**
+ * Defines arrays of functions (should possibly be in config.inc.php3
+ * so it can also be used in tbl_qbe.php3)
+ */
+$numfunctions = array('=', '>', '>=', '<', '<=', '!=');
+$textfunctions = array('LIKE', '=', '!=');
+
/**
* Not selection yet required -> displays the selection form
@@ -111,20 +113,24 @@ if (!isset($param) || $param[0] == '') {
+ ' . htmlentities($fc) . '';
+ } // end while
+ } else {
+ while (list($k, $fc) = each($numfunctions)) {
+ echo "\n" . ' '
+ . '';
+ } // end while
+ } // end if... else...
+ echo "\n";
+ ?>
+
+
@@ -190,18 +196,19 @@ else {
for ($i = 0; $i < count($fields); $i++) {
if (!empty($fields) && $fields[$i] != '') {
if (strtoupper($fields[$i]) == 'NULL' || strtoupper($fields[$i]) == 'NOT NULL') {
- $quot = '';
- $func[$i] = 'IS';
+ $quot = '';
+ $func[$i] = 'IS';
}
- if (eregi('char|blob|text|set|enum|date|time|year', $types[$i])){
- $quot = '\'';
- }else{
- $quot = '';
+ if (eregi('char|blob|text|set|enum|date|time|year', $types[$i])) {
+ $quot = '\'';
+ } else {
+ $quot = '';
}
- $sql_query .= ' AND ' . PMA_backquote(urldecode($names[$i])) . " $func[$i] $quot$fields[$i]$quot";
+ $sql_query .= ' AND ' . PMA_backquote(urldecode($names[$i])) . " $func[$i] $quot$fields[$i]$quot";
} // end if
} // end for
} // end if
+
if ($orderField != '--nil--') {
$sql_query .= ' ORDER BY ' . PMA_backquote(urldecode($orderField)) . ' ' . $order;
} // end if
diff --git a/user_details.php3 b/user_details.php3
index d42df599b..557a408c7 100644
--- a/user_details.php3
+++ b/user_details.php3
@@ -33,7 +33,6 @@ $err_url = 'user_details.php3'
* @global string the current charset for MySQL
* @global integer the server to use (refers to the number in the
* configuration file)
- * @global string the current charset for MySQL
*
* @see PMA_checkDb()
*
@@ -42,7 +41,7 @@ $err_url = 'user_details.php3'
* user while these privileges applies to all users.
*/
function PMA_tableGrants(&$host_db_result, $dbcheck = FALSE) {
- global $lang, $convcharset, $server, $convertcharset;
+ global $lang, $convcharset, $server;
?>
@@ -72,7 +71,7 @@ function PMA_tableGrants(&$host_db_result, $dbcheck = FALSE) {
echo "\n";
// 2. Table body
- $url_query = 'lang=' . $lang . '&server=' . $server . '&db=mysql&table=user&convcharset=' . $convcharset;
+ $url_query = 'lang=' . $lang . '&convcharset=' . $convcharset . '&server=' . $server . '&db=mysql&table=user';
while ($row = (is_array($host_db_result) ? $host_db_result : PMA_mysql_fetch_array($host_db_result))) {
$local_query = 'SHOW GRANTS FOR \'' . $row['User'] . '\'@\'' . $row['Host'] . '\'';
@@ -322,22 +321,22 @@ function PMA_tablePrivileges($form, $row = FALSE)
* @return boolean always true
*
* @global string the current language
+ * @global string the current charset for MySQL
* @global integer the server to use (refers to the number in the
* configuration file)
- * @global string the current charset for MySQL
*
* @see PMA_tablePrivileges()
*/
function PMA_normalOperations()
{
- global $lang, $server, $convcharset;
+ global $lang, $convcharset, $server;
?>
@@ -456,9 +455,9 @@ function PMA_normalOperations()
* @return boolean always true
*
* @global string the current language
+ * @global string the current charset for MySQL
* @global integer the server to use (refers to the number in the
* configuration file)
- * @global string the current charset for MySQL
* @global string the host name to check grants for
* @global string the username to check grants for
* @global string the database to check grants for
@@ -468,7 +467,7 @@ function PMA_normalOperations()
*/
function PMA_grantOperations($grants)
{
- global $lang, $server, $convcharset, $host, $pma_user;
+ global $lang, $convcharset, $server, $host, $pma_user;
global $dbgrant, $tablegrant, $newdb;
?>
@@ -476,7 +475,7 @@ function PMA_grantOperations($grants)
@@ -653,15 +652,15 @@ function PMA_grantOperations($grants)
* @return boolean always true
*
* @global string the current language
+ * @global string the current charset for MySQL
* @global integer the server to use (refers to the number in the
* configuration file)
- * @global string the current charset for MySQL
*
* @see PMA_tablePrivileges()
*/
function PMA_editOperations($host, $user)
{
- global $lang, $server, $convcharset;
+ global $lang, $convcharset, $server;
$result = PMA_mysql_query('SELECT * FROM mysql.user WHERE User = \'' . PMA_sqlAddslashes($user) . '\' AND Host = \'' . PMA_sqlAddslashes($host) . '\'');
$rows = ($result) ? @mysql_num_rows($result) : 0;
@@ -677,7 +676,7 @@ function PMA_editOperations($host, $user)