예제 #1
0
파일: Edit.php 프로젝트: avewrigley/idno
 function postContent()
 {
     $this->createGatekeeper();
     $new = false;
     if (!empty($this->arguments)) {
         $object = \IdnoPlugins\Media\Media::getByID($this->arguments[0]);
     }
     if (empty($object)) {
         $object = new \IdnoPlugins\Media\Media();
     }
     if ($object->saveDataFromInput($this)) {
         //$this->forward(\Idno\Core\site()->config()->getURL() . 'content/all/#feed');
         $this->forward($object->getURL());
     }
 }
예제 #2
0
파일: Edit.php 프로젝트: kreativmind/Known
 function postContent()
 {
     $this->createGatekeeper();
     $new = false;
     if (!empty($this->arguments)) {
         $object = \IdnoPlugins\Media\Media::getByID($this->arguments[0]);
     }
     if (empty($object)) {
         $object = new \IdnoPlugins\Media\Media();
     }
     if ($object->saveDataFromInput()) {
         $forward = $this->getInput('forward-to', $object->getDisplayURL());
         $this->forward($forward);
     }
 }
예제 #3
0
파일: Delete.php 프로젝트: avewrigley/idno
 function getContent()
 {
     $this->createGatekeeper();
     // This functionality is for logged-in users only
     // Are we loading an entity?
     if (!empty($this->arguments)) {
         $object = \IdnoPlugins\Media\Media::getByID($this->arguments[0]);
     } else {
         // TODO 404
         $this->forward();
     }
     $t = \Idno\Core\site()->template();
     $body = $t->__(array('object' => $object))->draw('entity/Status/delete');
     if (!empty($this->xhr)) {
         echo $body;
     } else {
         $t->__(array('body' => $body, 'title' => "Delete " . $object->getTitle()))->drawPage();
     }
 }