aboutsummaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2013-02-10 13:52:39 +0100
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2013-02-10 13:52:39 +0100
commitf528d2c3152e35dcfe66b3bf87322decd847d49d (patch)
tree3844b2d815829dd6d687e0dc438e4f27e09b3f00 /app/models
parentc22fd80f993e82bdefd7c86fbf33c80bf72b9c49 (diff)
ajout export au format Uniflux
Diffstat (limited to 'app/models')
-rwxr-xr-xapp/models/Entry.php15
1 files changed, 10 insertions, 5 deletions
diff --git a/app/models/Entry.php b/app/models/Entry.php
index d434e99f6..4cdcf8265 100755
--- a/app/models/Entry.php
+++ b/app/models/Entry.php
@@ -250,12 +250,17 @@ class EntryDAO extends Model_pdo {
$res = $stm->fetchAll (PDO::FETCH_ASSOC);
$this->nbItems = $res[0]['count'];
- $deb = ($this->currentPage - 1) * $this->nbItemsPerPage;
- $fin = $this->nbItemsPerPage;
+ if($this->nbItemsPerPage < 0) {
+ $sql = 'SELECT * FROM entry' . $where
+ . ' ORDER BY date' . $order;
+ } else {
+ $deb = ($this->currentPage - 1) * $this->nbItemsPerPage;
+ $fin = $this->nbItemsPerPage;
- $sql = 'SELECT * FROM entry' . $where
- . ' ORDER BY date' . $order
- . ' LIMIT ' . $deb . ', ' . $fin;
+ $sql = 'SELECT * FROM entry' . $where
+ . ' ORDER BY date' . $order
+ . ' LIMIT ' . $deb . ', ' . $fin;
+ }
$stm = $this->bd->prepare ($sql);
$stm->execute ();