]> git.nbdom.net Git - nb.git/commitdiff
lib/php/db/table.php
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Wed, 4 Apr 2018 02:42:36 +0000 (03:42 +0100)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Wed, 4 Apr 2018 02:42:36 +0000 (03:42 +0100)
lib/php/db/table.php
lib/postgres/grant.sql [deleted file]
share/db/update.sh

index c1c7734370a2469716b7ef16c8d8a047b1083ae6..f7d7811abca4a1081ade4399942b101ca41ad5e0 100644 (file)
@@ -728,7 +728,7 @@ Class Table extends nb {
 
                if ($prev>=0) $html .= '<span class="prev"><a href="'.$this->url_list('limit',preg_replace('/^0,/','',"$prev,$y")).'">&lt;&lt;</a></span>&nbsp;';
 
-               $html .= '<span class="count">'.($tot ? ($x+1) : 0).' - '.( $count<($x+$y) ? $count : ($x+$y) ).' / '.$tot.' results</span>';
+               $html .= '<span class="count">'.($tot ? ($x+1) : 0).' - '.( $count<($x+$y) ? $count : ($x+$y) ).' / '.$tot.'</span>';
 
                if ($next<$tot) $html .= '&nbsp;<span class="prev"><a href="'.$this->url_list('limit',"$next,$y").'">&gt;&gt;</a></span>';
 
@@ -1331,7 +1331,6 @@ Class Table extends nb {
                        $this->tot = $opt['tot'] = $tot;
 
                } # < is_html
-               $this->tot = $opt['tot'] = $count;
 
                if ($count === 0 and !$format) {
                        echo $this->{"rows_begin_$format"}($fields,$opt);
diff --git a/lib/postgres/grant.sql b/lib/postgres/grant.sql
deleted file mode 100644 (file)
index b7a2bed..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-GRANT ALL ON ALL TABLES IN SCHEMA public TO www;
-GRANT ALL ON ALL TABLES IN SCHEMA public TO root;
-GRANT ALL ON ALL TABLES IN SCHEMA public TO nico;
index 04a510e15cf5c3c82d1ebd36e9bbd8559979a9c3..7bab10cf9843c01ae9e4eeb8ecbeb698215485b4 100755 (executable)
@@ -13,4 +13,4 @@ cd "$(dirname "$0")" && (
        nb_api '/pub/dump/sqlite?table-name=!~^(zipcode|geo)'
        echo 'VACUUM;'
 
-) | sqlite3 "nb.db"
+) | sqlite3 "/tmp/nb.db"