Optimized a bit and started to work on feature #444767 (Other cases for display=simple)

This commit is contained in:
Loïc Chapeaux
2001-08-20 14:22:06 +00:00
parent 7b5e0de828
commit 75e7497367
3 changed files with 22 additions and 10 deletions

View File

@@ -539,12 +539,16 @@ window.parent.frames['nav'].location.replace('<?php echo $reload_url; ?>');
echo ' ' . $query_base;
// If a 'LIMIT' clause has been programatically added to the query
// displays it
$is_append_limit = (isset($GLOBALS['pos'])
&& eregi('^SELECT', $GLOBALS['sql_query'])
&& !eregi('LIMIT[ 0-9,]+$', $GLOBALS['sql_query']));
if ($is_append_limit) {
echo ' LIMIT ' . $GLOBALS['pos'] . ', ' . $GLOBALS['cfgMaxRows'];
if (!empty($GLOBALS['sql_limit_to_append'])) {
echo $GLOBALS['sql_limit_to_append'];
}
// loic1 : this was far to be optimal
// $is_append_limit = (isset($GLOBALS['pos'])
// && (eregi('^SELECT', $GLOBALS['sql_query']) && !eregi('^SELECT COUNT\((.*\.+)?\*\) FROM ', $GLOBALS['sql_query']))
// && !eregi('LIMIT[ 0-9,]+$', $GLOBALS['sql_query']));
// if ($is_append_limit) {
// echo ' LIMIT ' . $GLOBALS['pos'] . ', ' . $GLOBALS['cfgMaxRows'];
// }
echo "\n";
?>
</td>
@@ -939,7 +943,7 @@ var errorMsg2 = '<?php echo(str_replace('\'', '\\\'', $GLOBALS['strNotValidNumbe
if (!$is_simple) {
show_table_navigation($pos_next, $pos_prev, $dt_result);
} else {
echo '<br /><br /><br /><br />';
echo "\n" . '<br /><br />' . "\n";
}
// Displays the results