- $this->pos++;
- $this->start = ($this->count > 0 && $this->pos == 1);
- $this->stop = ($this->count > 0 && $this->pos == $this->count);
- if ($this->count == 0) {
- return null;
- }
-
- $x = current($this->p2);
- if ($x === false) {
- $this->p2 = next($this->p1);
- if ($this->p2 === false) {
- $this->p1 = next($this->notifs->_data);
- if ($this->p1 === false) {
- return null;
- }
- reset($this->p1);
- $this->p2 = current($this->p1);
- }
- reset($this->p2);
- $x = current($this->p2);
- }
- $cid = key($this->notifs->_data);
- next($this->p2);
-
- global $globals;
- $author = $x['prenom'] . ' ' . $x['nom'] . ' (X' . $x['promo'] . ')';
-
- @require_once 'Date.php';
- @$date = new Date($x['date']);
- @$date = $date->format('%e %B %Y');
- return array_merge($x,
- array('author' => $author,
- 'publication' => $x['known'],
- 'id' => 'carnet' . $x['known'] . $cid . $x['bestalias'],
- 'link' => $globals->baseurl . '/profile/private/'
- . $x['bestalias'],
- 'title' => '[' . $this->notifs->_cats[$cid]['short'] . '] '
- . $author . ' - le ' . $date));