示例#1
0
 protected function addAction()
 {
     if ($sheet_id = $this->sheet_model->create(_w('Board'))) {
         $this->response = $this->sheet_model->getById($sheet_id);
         $this->log('board_add', 1);
     } else {
         $this->errors = _w("Not enough rights to add new board");
     }
 }
 public function execute()
 {
     $name = $this->post('name', true);
     $sheet_model = new stickiesSheetModel();
     $sheet_id = $sheet_model->create($name, waRequest::post('background_id'));
     if ($sheet_id) {
         $_GET['id'] = $sheet_id;
         $method = new stickiesSheetGetInfoMethod();
         $this->response = $method->getResponse(true);
     } else {
         throw new waAPIException('server_error', 500);
     }
 }
示例#3
0
<?php

$sheet_model = new stickiesSheetModel();
$sheet_model->create(_w('My stickies'), null, false);