Skip to content
Browse files

Simplify load more data buffering

  • Loading branch information...
1 parent b7f1d56 commit 09d81ffee921db36d22a30ba9841fed2431065c6 @vrana committed Sep 7, 2012
Showing with 3 additions and 9 deletions.
  1. +0 −7 adminer/include/functions.inc.php
  2. +3 −2 adminer/select.inc.php
View
7 adminer/include/functions.inc.php
@@ -929,10 +929,3 @@ function slow_query($query) {
}
return array_keys($return);
}
-
-/** Callback registered to erase output buffer in AJAX calls
-* @return string
-*/
-function clean_output() {
- return '';
-}
View
5 adminer/select.inc.php
@@ -190,7 +190,7 @@
$table_name = $adminer->tableName($table_status);
if (is_ajax()) {
// needs to send headers
- ob_start('clean_output');
+ ob_start();
}
page_header(lang('Select') . ": $table_name", $error);
@@ -409,7 +409,7 @@
echo (!$group && $select ? "" : "<script type='text/javascript'>tableCheck();</script>\n");
}
- if ($rows || $page) {
+ if (($rows || $page) && !is_ajax()) {
$exact_count = true;
if ($_GET["page"] != "last" && +$limit && count($group) >= count($select) && ($found_rows >= $limit || $page)) {
$found_rows = found_rows($table_status, $where);
@@ -474,5 +474,6 @@
}
if (is_ajax()) {
+ ob_end_clean();
exit;
}

0 comments on commit 09d81ff

Please sign in to comment.
Something went wrong with that request. Please try again.