예제 #1
0
파일: Feeds.php 프로젝트: etu/0bRSS
 public function delete($feedId)
 {
     $feed = $this->feedsDao->getFeeds($_SESSION['user']['id'], $feedId)->fetch();
     if (false !== $feed) {
         try {
             $this->feedsDao->delete($feed->id);
         } catch (\Exception $e) {
         }
         return;
     }
     $this->slim->response->setStatus(403);
 }
예제 #2
0
파일: Articles.php 프로젝트: etu/0bRSS
 /**
  * Get all articles from feed by feedId, use ?previousId to get articles older
  * than the choosen article ID.
  */
 public function get($feedId)
 {
     $previousId = $this->slim->request->get('previousId', null);
     $read = $this->slim->request->get('read', null);
     $feed = $this->feedsDao->getFeeds($_SESSION['user']['id'], $feedId)->fetch();
     if (false !== $feed) {
         $articles = $this->articlesDao->getPagedArticles($feedId, $previousId, $read)->fetchAll();
         echo json_encode($articles);
         exit;
     }
     $this->slim->response->setStatus(403);
 }
예제 #3
0
파일: Index.php 프로젝트: etu/0bRSS
 public function get()
 {
     $this->slim->render('layout.twig', ['feeds' => $this->feedsDao->getFeeds($_SESSION['user']['id'])->fetchAll()]);
 }