コード例 #1
0
 public function action_save()
 {
     if (!Can::show()) {
         exit;
     }
     $page_id = $this->request->post('page_id');
     $blocks = $this->request->post('blocks');
     $actived = $this->request->post('draft') === 'false';
     $result = Model_Page::draft($page_id, $blocks, $actived);
     $image = $this->save_image($page_id, $this->request->post('image'));
     $this->response->json($result);
 }