For Lo�c
This commit is contained in:
@@ -5,6 +5,13 @@ phpMyAdmin - Changelog
|
|||||||
$Id$
|
$Id$
|
||||||
$Source$
|
$Source$
|
||||||
|
|
||||||
|
2002-08-30 Lo<4C>c Chapeaux <lolo@phpheaven.net>
|
||||||
|
* tbl_relation.php3, line 324; user_details.php3; lines 262-269:
|
||||||
|
fixed some warnings.
|
||||||
|
* libraries/display_tbl.lib.php3: fixed first part of bug
|
||||||
|
#601776 (Undefined variables).
|
||||||
|
* libraries/sqlvalidator.lib.php3: removed trailing spaces.
|
||||||
|
|
||||||
2002-08-29 Robin Johnson <robbat2@users.sourceforge.net>
|
2002-08-29 Robin Johnson <robbat2@users.sourceforge.net>
|
||||||
* libraries/sqlvalidator.lib.php3:
|
* libraries/sqlvalidator.lib.php3:
|
||||||
- Fix for bug in Alex's fix for bug #594947
|
- Fix for bug in Alex's fix for bug #594947
|
||||||
|
@@ -555,12 +555,12 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')){
|
|||||||
if ($is_display['sort_lnk'] == '1') {
|
if ($is_display['sort_lnk'] == '1') {
|
||||||
// Defines the url used to append/modify a sorting order
|
// Defines the url used to append/modify a sorting order
|
||||||
// 2.1.1 Checks if an hard coded 'order by' clause exists
|
// 2.1.1 Checks if an hard coded 'order by' clause exists
|
||||||
if (eregi('(.*)( ORDER BY (.*))', $sql_query, $regs1)) {
|
if (eregi('(.*)([[:space:]]ORDER BY[[:space:]](.*))', $sql_query, $regs1)) {
|
||||||
if (eregi('((.*)( ASC| DESC)( |$))(.*)', $regs1[2], $regs2)) {
|
if (eregi('((.*)([[:space:]]ASC|[[:space:]]DESC)([[:space:]]|$))(.*)', $regs1[2], $regs2)) {
|
||||||
$unsorted_sql_query = trim($regs1[1] . ' ' . $regs2[5]);
|
$unsorted_sql_query = trim($regs1[1] . ' ' . $regs2[5]);
|
||||||
$sql_order = trim($regs2[1]);
|
$sql_order = trim($regs2[1]);
|
||||||
}
|
}
|
||||||
else if (eregi('((.*)) (LIMIT (.*)|PROCEDURE (.*)|FOR UPDATE|LOCK IN SHARE MODE)', $regs1[2], $regs3)) {
|
else if (eregi('((.*))[[:space:]](LIMIT (.*)|PROCEDURE (.*)|FOR UPDATE|LOCK IN SHARE MODE)', $regs1[2], $regs3)) {
|
||||||
$unsorted_sql_query = trim($regs1[1] . ' ' . $regs3[3]);
|
$unsorted_sql_query = trim($regs1[1] . ' ' . $regs3[3]);
|
||||||
$sql_order = trim($regs3[1]) . ' ASC';
|
$sql_order = trim($regs3[1]) . ' ASC';
|
||||||
} else {
|
} else {
|
||||||
@@ -575,7 +575,7 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')){
|
|||||||
if (empty($sql_order)) {
|
if (empty($sql_order)) {
|
||||||
$is_in_sort = FALSE;
|
$is_in_sort = FALSE;
|
||||||
} else {
|
} else {
|
||||||
$is_in_sort = eregi(' (`?)' . str_replace('\\', '\\\\', $fields_meta[$i]->name) . '(`?)[ ,$]', $sql_order);
|
$is_in_sort = eregi('[[:space:]](`?)' . str_replace('\\', '\\\\', $fields_meta[$i]->name) . '(`?)[ ,$]', $sql_order);
|
||||||
}
|
}
|
||||||
// 2.1.3 Checks if the table name is required (it's the case
|
// 2.1.3 Checks if the table name is required (it's the case
|
||||||
// for a query with a "JOIN" statement and if the column
|
// for a query with a "JOIN" statement and if the column
|
||||||
@@ -596,15 +596,15 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')){
|
|||||||
$sort_order = ' ORDER BY ' . $sort_tbl . PMA_backquote($fields_meta[$i]->name) . ' ' . $cfg['Order'];
|
$sort_order = ' ORDER BY ' . $sort_tbl . PMA_backquote($fields_meta[$i]->name) . ' ' . $cfg['Order'];
|
||||||
$order_img = '';
|
$order_img = '';
|
||||||
}
|
}
|
||||||
else if (substr($sql_order, -3) == 'ASC' && $is_in_sort) {
|
else if (eregi('[[:space:]]ASC$', $sql_order)) {
|
||||||
$sort_order = ' ORDER BY ' . $sort_tbl . PMA_backquote($fields_meta[$i]->name) . ' DESC';
|
$sort_order = ' ORDER BY ' . $sort_tbl . PMA_backquote($fields_meta[$i]->name) . ' DESC';
|
||||||
$order_img = ' <img src="./images/asc_order.gif" border="0" width="7" height="7" alt="'. $GLOBALS['strAscending'] . '" title="'. $GLOBALS['strAscending'] . '" />';
|
$order_img = ' <img src="./images/asc_order.gif" border="0" width="7" height="7" alt="'. $GLOBALS['strAscending'] . '" title="'. $GLOBALS['strAscending'] . '" />';
|
||||||
}
|
}
|
||||||
else if (substr($sql_order, -4) == 'DESC' && $is_in_sort) {
|
else if (eregi('[[:space:]]DESC$', $sql_order)) {
|
||||||
$sort_order = ' ORDER BY ' . $sort_tbl . PMA_backquote($fields_meta[$i]->name) . ' ASC';
|
$sort_order = ' ORDER BY ' . $sort_tbl . PMA_backquote($fields_meta[$i]->name) . ' ASC';
|
||||||
$order_img = ' <img src="./images/desc_order.gif" border="0" width="7" height="7" alt="'. $GLOBALS['strDescending'] . '" title="'. $GLOBALS['strDescending'] . '" />';
|
$order_img = ' <img src="./images/desc_order.gif" border="0" width="7" height="7" alt="'. $GLOBALS['strDescending'] . '" title="'. $GLOBALS['strDescending'] . '" />';
|
||||||
}
|
}
|
||||||
if (eregi('(.*)( LIMIT (.*)| PROCEDURE (.*)| FOR UPDATE| LOCK IN SHARE MODE)', $unsorted_sql_query, $regs3)) {
|
if (eregi('(.*)([[:space:]](LIMIT (.*)|PROCEDURE (.*)|FOR UPDATE|LOCK IN SHARE MODE))', $unsorted_sql_query, $regs3)) {
|
||||||
$sorted_sql_query = $regs3[1] . $sort_order . $regs3[2];
|
$sorted_sql_query = $regs3[1] . $sort_order . $regs3[2];
|
||||||
} else {
|
} else {
|
||||||
$sorted_sql_query = $unsorted_sql_query . $sort_order;
|
$sorted_sql_query = $unsorted_sql_query . $sort_order;
|
||||||
@@ -833,15 +833,15 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')){
|
|||||||
|
|
||||||
// to fix the bug where float fields (primary or not)
|
// to fix the bug where float fields (primary or not)
|
||||||
// can't be matched because of the imprecision of
|
// can't be matched because of the imprecision of
|
||||||
// floating comparison, use CONCAT
|
// floating comparison, use CONCAT
|
||||||
// (also, the syntax "CONCAT(field) IS NULL"
|
// (also, the syntax "CONCAT(field) IS NULL"
|
||||||
// that we need on the next "if" will work)
|
// that we need on the next "if" will work)
|
||||||
|
|
||||||
if ($meta->type=='real') {
|
if ($meta->type == 'real') {
|
||||||
$condition = ' CONCAT(' . PMA_backquote($meta->name) . ') ';
|
$condition = ' CONCAT(' . PMA_backquote($meta->name) . ') ';
|
||||||
} else {
|
} else {
|
||||||
$condition = ' ' . PMA_backquote($meta->name) . ' ';
|
$condition = ' ' . PMA_backquote($meta->name) . ' ';
|
||||||
} // end if
|
} // end if... else...
|
||||||
|
|
||||||
// loic1: To fix bug #474943 under php4, the row
|
// loic1: To fix bug #474943 under php4, the row
|
||||||
// pointer will depend on whether the "is_null"
|
// pointer will depend on whether the "is_null"
|
||||||
@@ -871,7 +871,7 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')){
|
|||||||
} else {
|
} else {
|
||||||
$uva_condition = $uva_nonprimary_condition;
|
$uva_condition = $uva_nonprimary_condition;
|
||||||
}
|
}
|
||||||
$uva_condition = urlencode(ereg_replace(' ?AND$', '', $uva_condition));
|
$uva_condition = urlencode(ereg_replace('[[:space:]]?AND$', '', $uva_condition));
|
||||||
} // end if (1.1)
|
} // end if (1.1)
|
||||||
|
|
||||||
// 1.2 Defines the urls for the modify/delete link(s)
|
// 1.2 Defines the urls for the modify/delete link(s)
|
||||||
@@ -917,7 +917,7 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')){
|
|||||||
. '&goto=' . urlencode($lnk_goto);
|
. '&goto=' . urlencode($lnk_goto);
|
||||||
$js_conf = 'DELETE FROM ' . PMA_jsFormat($table)
|
$js_conf = 'DELETE FROM ' . PMA_jsFormat($table)
|
||||||
. ' WHERE ' . trim(PMA_jsFormat(urldecode($uva_condition), FALSE))
|
. ' WHERE ' . trim(PMA_jsFormat(urldecode($uva_condition), FALSE))
|
||||||
. ((PMA_MYSQL_INT_VERSION >= 32207) ? ' LIMIT 1' : '');
|
. ((PMA_MYSQL_INT_VERSION >= 32207) ? ' LIMIT 1' : '');
|
||||||
$del_str = $GLOBALS['strDelete'];
|
$del_str = $GLOBALS['strDelete'];
|
||||||
} else if ($is_display['del_lnk'] == 'kp') { // kill process case
|
} else if ($is_display['del_lnk'] == 'kp') { // kill process case
|
||||||
$lnk_goto = 'sql.php3'
|
$lnk_goto = 'sql.php3'
|
||||||
|
@@ -93,7 +93,7 @@ if (!defined('PMA_SQL_VALIDATOR_INCLUDED')) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
} // end if
|
} // end if
|
||||||
|
|
||||||
/*
|
/*
|
||||||
else {
|
else {
|
||||||
// The service is not available so note that properly
|
// The service is not available so note that properly
|
||||||
|
@@ -288,7 +288,8 @@ if ($col_rs && mysql_num_rows($col_rs) > 0) {
|
|||||||
</select>
|
</select>
|
||||||
<script type="text/javascript" language="javascript">
|
<script type="text/javascript" language="javascript">
|
||||||
<!--
|
<!--
|
||||||
// Fake js to allow the use of the <noscript> tag //-->
|
// Fake js to allow the use of the <noscript> tag
|
||||||
|
//-->
|
||||||
</script>
|
</script>
|
||||||
<noscript>
|
<noscript>
|
||||||
<input type="submit" value="<?php echo $strGo; ?>" />
|
<input type="submit" value="<?php echo $strGo; ?>" />
|
||||||
@@ -320,7 +321,7 @@ if ($col_rs && mysql_num_rows($col_rs) > 0) {
|
|||||||
<tr>
|
<tr>
|
||||||
<th><?php echo $field; ?></th>
|
<th><?php echo $field; ?></th>
|
||||||
<td>
|
<td>
|
||||||
<input type="text" name="comment[<?php echo $field;?>]" value="<?php echo htmlspecialchars($comments[$field]); ?>" />
|
<input type="text" name="comment[<?php echo $field; ?>]" value="<?php echo (isset($comments[$field]) ? htmlspecialchars($comments[$field]) : ''); ?>" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
|
@@ -260,9 +260,12 @@ function PMA_tablePrivileges($form, $row = FALSE)
|
|||||||
$checkpriv_url = $GLOBALS['cfg']['PmaAbsoluteUri']
|
$checkpriv_url = $GLOBALS['cfg']['PmaAbsoluteUri']
|
||||||
. 'user_details.php3?';
|
. 'user_details.php3?';
|
||||||
if (empty($GLOBALS['QUERY_STRING'])) {
|
if (empty($GLOBALS['QUERY_STRING'])) {
|
||||||
$GLOBALS['QUERY_STRING'] = (isset($_SERVER))
|
if (isset($_SERVER) && !empty($_SERVER['QUERY_STRING'])) {
|
||||||
? $_SERVER['QUERY_STRING']
|
$GLOBALS['QUERY_STRING'] = $_SERVER['QUERY_STRING'];
|
||||||
: $GLOBALS['HTTP_SERVER_VARS']['QUERY_STRING'];
|
}
|
||||||
|
else if (isset($GLOBALS['HTTP_SERVER_VARS']) && !empty($GLOBALS['HTTP_SERVER_VARS']['QUERY_STRING'])) {
|
||||||
|
$GLOBALS['QUERY_STRING'] = $GLOBALS['HTTP_SERVER_VARS']['QUERY_STRING'];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (!empty($GLOBALS['QUERY_STRING'])) {
|
if (!empty($GLOBALS['QUERY_STRING'])) {
|
||||||
$checkpriv_url .= str_replace('&', '&', $GLOBALS['QUERY_STRING']) . '&';
|
$checkpriv_url .= str_replace('&', '&', $GLOBALS['QUERY_STRING']) . '&';
|
||||||
|
Reference in New Issue
Block a user