Ejemplo n.º 1
0
 /**
  * Administrtion view for smileys
  */
 public function index_action()
 {
     $this->view = Request::option('view', Smiley::getFirstUsedCharacter() ?: 'a');
     $this->smileys = Smiley::getGrouped($this->view);
     $this->favorites_enabled = SmileyFavorites::isEnabled();
     $this->setSidebar($this->view);
 }
Ejemplo n.º 2
0
 /**
  * Common tasks for all actions.
  */
 function before_filter(&$action, &$args)
 {
     parent::before_filter($action, $args);
     PageLayout::setTitle(_('Smiley-Übersicht'));
     $this->favorites_activated = SmileyFavorites::isEnabled() && $GLOBALS['user']->id != nobody;
     if ($this->favorites_activated) {
         $this->favorites = new SmileyFavorites($GLOBALS['user']->id);
         $this->default = count($this->favorites->get()) > 0 ? 'favorites' : Smiley::getFirstUsedCharacter();
     } else {
         $this->default = Smiley::getFirstUsedCharacter();
     }
 }