|
@@ -3,7 +3,7 @@
|
|
|
class indexController extends ActionController {
|
|
class indexController extends ActionController {
|
|
|
private $get = false;
|
|
private $get = false;
|
|
|
private $nb_not_read = 0;
|
|
private $nb_not_read = 0;
|
|
|
- private $mode = 'all';
|
|
|
|
|
|
|
+ private $mode = 'all'; //TODO: Is this used?
|
|
|
|
|
|
|
|
public function indexAction () {
|
|
public function indexAction () {
|
|
|
$output = Request::param ('output');
|
|
$output = Request::param ('output');
|
|
@@ -40,6 +40,7 @@ class indexController extends ActionController {
|
|
|
$this->view->cat_aside = $catDAO->listCategories ();
|
|
$this->view->cat_aside = $catDAO->listCategories ();
|
|
|
$this->view->nb_favorites = $entryDAO->countFavorites ();
|
|
$this->view->nb_favorites = $entryDAO->countFavorites ();
|
|
|
$this->view->nb_total = $entryDAO->count ();
|
|
$this->view->nb_total = $entryDAO->count ();
|
|
|
|
|
+ $this->view->currentName = '';
|
|
|
|
|
|
|
|
$this->view->get_c = '';
|
|
$this->view->get_c = '';
|
|
|
$this->view->get_f = '';
|
|
$this->view->get_f = '';
|
|
@@ -116,23 +117,27 @@ class indexController extends ActionController {
|
|
|
*/
|
|
*/
|
|
|
private function checkAndProcessType ($type) {
|
|
private function checkAndProcessType ($type) {
|
|
|
if ($type['type'] == 'all') {
|
|
if ($type['type'] == 'all') {
|
|
|
- View::prependTitle (Translate::t ('your_rss_feeds'));
|
|
|
|
|
|
|
+ $this->view->currentName = Translate::t ('your_rss_feeds');
|
|
|
|
|
+ View::prependTitle ($this->view->currentName);
|
|
|
$this->view->get_c = $type['type'];
|
|
$this->view->get_c = $type['type'];
|
|
|
return false;
|
|
return false;
|
|
|
} elseif ($type['type'] == 'favoris') {
|
|
} elseif ($type['type'] == 'favoris') {
|
|
|
- View::prependTitle (Translate::t ('your_favorites'));
|
|
|
|
|
|
|
+ $this->view->currentName = Translate::t ('your_favorites');
|
|
|
|
|
+ View::prependTitle ($this->view->currentName);
|
|
|
$this->view->get_c = $type['type'];
|
|
$this->view->get_c = $type['type'];
|
|
|
return false;
|
|
return false;
|
|
|
} elseif ($type['type'] == 'public') {
|
|
} elseif ($type['type'] == 'public') {
|
|
|
- View::prependTitle (Translate::t ('public'));
|
|
|
|
|
|
|
+ $this->view->currentName = Translate::t ('public');
|
|
|
|
|
+ View::prependTitle ($this->view->currentName);
|
|
|
$this->view->get_c = $type['type'];
|
|
$this->view->get_c = $type['type'];
|
|
|
return false;
|
|
return false;
|
|
|
} elseif ($type['type'] == 'c') {
|
|
} elseif ($type['type'] == 'c') {
|
|
|
$catDAO = new CategoryDAO ();
|
|
$catDAO = new CategoryDAO ();
|
|
|
$cat = $catDAO->searchById ($type['id']);
|
|
$cat = $catDAO->searchById ($type['id']);
|
|
|
if ($cat) {
|
|
if ($cat) {
|
|
|
|
|
+ $this->view->currentName = $cat->name ();
|
|
|
$nbnr = $cat->nbNotRead ();
|
|
$nbnr = $cat->nbNotRead ();
|
|
|
- View::prependTitle ($cat->name () . ($nbnr > 0 ? ' (' . $nbnr . ')' : ''));
|
|
|
|
|
|
|
+ View::prependTitle ($this->view->currentName . ($nbnr > 0 ? ' (' . $nbnr . ')' : ''));
|
|
|
$this->view->get_c = $type['id'];
|
|
$this->view->get_c = $type['id'];
|
|
|
return false;
|
|
return false;
|
|
|
} else {
|
|
} else {
|
|
@@ -142,8 +147,9 @@ class indexController extends ActionController {
|
|
|
$feedDAO = new FeedDAO ();
|
|
$feedDAO = new FeedDAO ();
|
|
|
$feed = $feedDAO->searchById ($type['id']);
|
|
$feed = $feedDAO->searchById ($type['id']);
|
|
|
if ($feed) {
|
|
if ($feed) {
|
|
|
|
|
+ $this->view->currentName = $feed->name ();
|
|
|
$nbnr = $feed->nbNotRead ();
|
|
$nbnr = $feed->nbNotRead ();
|
|
|
- View::prependTitle ($feed->name () . ($nbnr > 0 ? ' (' . $nbnr . ')' : ''));
|
|
|
|
|
|
|
+ View::prependTitle ($this->view->currentName . ($nbnr > 0 ? ' (' . $nbnr . ')' : ''));
|
|
|
$this->view->get_f = $type['id'];
|
|
$this->view->get_f = $type['id'];
|
|
|
$this->view->get_c = $feed->category ();
|
|
$this->view->get_c = $feed->category ();
|
|
|
return false;
|
|
return false;
|