aboutsummaryrefslogtreecommitdiff
path: root/app/models/RSSPaginator.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2013-11-30 22:47:48 +0100
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2013-11-30 22:47:48 +0100
commit1e077160fca3306a273ecae5a366fd756c32baee (patch)
tree942066b18dbf63c63f2dbddb547ed3e9bcc66d8d /app/models/RSSPaginator.php
parent37ce14c093c3dd009bcd7b627c5e819ac88dd5b7 (diff)
Optimisation recherche et pagination
* Optimisation recherche SQL avec utilisation de HAVING plutôt que WHERE * Simplification et amélioration des performances en supprimant de RSSPaginator qui n'aidait plus vraiment et nécessitait plus de code et des copies de données. * Correction d'un bug dans le titre de la page introduit récemment, et simplification
Diffstat (limited to 'app/models/RSSPaginator.php')
-rw-r--r--app/models/RSSPaginator.php37
1 files changed, 0 insertions, 37 deletions
diff --git a/app/models/RSSPaginator.php b/app/models/RSSPaginator.php
deleted file mode 100644
index 39146f1ba..000000000
--- a/app/models/RSSPaginator.php
+++ /dev/null
@@ -1,37 +0,0 @@
-<?php
-
-// Un système de pagination beaucoup plus simple que Paginator
-// mais mieux adapté à nos besoins
-class RSSPaginator {
- private $items = array ();
- private $next = '';
-
- public function __construct ($items, $next) {
- $this->items = $items;
- $this->next = $next;
- }
-
- public function isEmpty () {
- return empty ($this->items);
- }
-
- public function items () {
- return $this->items;
- }
-
- public function next () {
- return $this->next;
- }
-
- public function peek () {
- return isset($this->items[0]) ? $this->items[0] : null;
- }
-
- public function render ($view, $getteur) {
- $view = APP_PATH . '/views/helpers/'.$view;
-
- if (file_exists ($view)) {
- include ($view);
- }
- }
-}