Ejemplo n.º 1
0
 public function __construct()
 {
     parent::__construct();
     $watcher = Model_WatchPhotographer::getCurrentWatch();
     if (!empty($watcher)) {
         $photo = $watcher->user->photos->where("moderation_status_id", "=", Model_ModerationStatus::APPROVED)->order_by(DB::expr('RAND()'))->find();
         $this->template->watcher = $watcher;
         $this->template->photo = $photo;
         $this->template->numPhotos = $watcher->user->photos->where("moderation_status_id", "=", Model_ModerationStatus::APPROVED)->find_all()->count();
     }
 }
Ejemplo n.º 2
0
 public function action_archive()
 {
     $this->template->content = View::factory("admin/watcher/index");
     $this->template->content->watchers = Model_WatchPhotographer::getPastWatchers();
 }