]> git.joonet.de Git - adminer.git/commitdiff
Mark approximate number of selected rows
authorJakub Vrana <jakub@vrana.cz>
Thu, 11 Jul 2013 23:34:14 +0000 (16:34 -0700)
committerJakub Vrana <jakub@vrana.cz>
Fri, 12 Jul 2013 15:17:26 +0000 (08:17 -0700)
adminer/select.inc.php

index 2f467b7a38269a81a650ef82cc9f426909faa653..d00edede80e17f065b2b3dabd5d7c932d2d58798 100644 (file)
@@ -493,7 +493,8 @@ if (!$columns && support("table")) {
                        
                        echo "<p>\n";
                        echo ($found_rows !== false ? "(" . ($exact_count ? "" : "~ ") . lang('%d row(s)', $found_rows) . ") " : "");
-                       echo checkbox("all", 1, 0, lang('whole result'), "var checked = formChecked(this, /check/); selectCount('selected', this.checked ? '$found_rows' : checked); selectCount('selected2', this.checked || !checked ? '$found_rows' : checked);") . "\n";
+                       $display_rows = ($exact_count ? "" : "~ ") . $found_rows;
+                       echo checkbox("all", 1, 0, lang('whole result'), "var checked = formChecked(this, /check/); selectCount('selected', this.checked ? '$display_rows' : checked); selectCount('selected2', this.checked || !checked ? '$display_rows' : checked);") . "\n";
                        
                        if ($adminer->selectCommandPrint()) {
                                ?>
@@ -503,7 +504,7 @@ if (!$columns && support("table")) {
 <fieldset><legend><?php echo lang('Selected'); ?> <span id="selected"></span></legend><div>
 <input type="submit" name="edit" value="<?php echo lang('Edit'); ?>">
 <input type="submit" name="clone" value="<?php echo lang('Clone'); ?>">
-<input type="submit" name="delete" value="<?php echo lang('Delete'); ?>" onclick="return confirm('<?php echo lang('Are you sure?'); ?> (' + (this.form['all'].checked ? '<?php echo $found_rows; ?>' : formChecked(this, /check/)) + ')');">
+<input type="submit" name="delete" value="<?php echo lang('Delete'); ?>" onclick="return confirm('<?php echo lang('Are you sure?'); ?> (' + (this.form['all'].checked ? '<?php echo $display_rows; ?>' : formChecked(this, /check/)) + ')');">
 </div></fieldset>
 <?php
                        }