diff options
| author | 2013-11-30 22:47:48 +0100 | |
|---|---|---|
| committer | 2013-11-30 22:47:48 +0100 | |
| commit | 1e077160fca3306a273ecae5a366fd756c32baee (patch) | |
| tree | 942066b18dbf63c63f2dbddb547ed3e9bcc66d8d /app/layout | |
| parent | 37ce14c093c3dd009bcd7b627c5e819ac88dd5b7 (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/layout')
| -rw-r--r-- | app/layout/layout.phtml | 5 | ||||
| -rw-r--r-- | app/layout/nav_menu.phtml | 4 |
2 files changed, 4 insertions, 5 deletions
diff --git a/app/layout/layout.phtml b/app/layout/layout.phtml index 9b502275c..6fc5c1cf0 100644 --- a/app/layout/layout.phtml +++ b/app/layout/layout.phtml @@ -10,10 +10,9 @@ <?php $this->renderHelper ('javascript_vars'); ?> //]]></script> <?php - $next = isset($this->entryPaginator) ? $this->entryPaginator->next() : ''; - if (!empty($next)) { + if (!empty($this->nextId)) { $params = Request::params (); - $params['next'] = $next; + $params['next'] = $this->nextId; ?> <link id="prefetch" rel="next prefetch" href="<?php echo Url::display (array ('c' => Request::controllerName (), 'a' => Request::actionName (), 'params' => $params)); ?>" /> <?php } ?> diff --git a/app/layout/nav_menu.phtml b/app/layout/nav_menu.phtml index 289fe6542..4b4945108 100644 --- a/app/layout/nav_menu.phtml +++ b/app/layout/nav_menu.phtml @@ -17,8 +17,6 @@ $string_mark = Translate::t ('mark_cat_read'); } $nextGet = $get; - $p = $this->entryPaginator->peek(); - $idMax = $p === null ? '0' : $p->id(); if (($this->conf->onread_jump_next () === 'yes') && (strlen ($get) > 2)) { $anotherUnreadId = ''; $foundCurrent = false; @@ -54,6 +52,8 @@ break; } } + $p = isset($this->entries[0]) ? $this->entries[0] : null; + $idMax = $p === null ? '0' : $p->id(); $markReadUrl = _url ('entry', 'read', 'is_read', 1, 'get', $get, 'nextGet', $nextGet, 'idMax', $idMax); Session::_param ('markReadUrl', $markReadUrl); ?> |
