File indexing completed on 2025-05-04 05:29:04
0001 <?php 0002 0003 /** 0004 * ocs-webserver 0005 * 0006 * Copyright 2016 by pling GmbH. 0007 * 0008 * This file is part of ocs-webserver. 0009 * 0010 * This program is free software: you can redistribute it and/or modify 0011 * it under the terms of the GNU Affero General Public License as 0012 * published by the Free Software Foundation, either version 3 of the 0013 * License, or (at your option) any later version. 0014 * 0015 * This program is distributed in the hope that it will be useful, 0016 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0017 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0018 * GNU Affero General Public License for more details. 0019 * 0020 * You should have received a copy of the GNU Affero General Public License 0021 * along with this program. If not, see <http://www.gnu.org/licenses/>. 0022 * 0023 * Created: 31.05.2017 0024 */ 0025 class CreditsController extends Local_Controller_Action_DomainSwitch 0026 { 0027 0028 public function indexAction() 0029 { 0030 $this->view->page = (int)$this->getParam('page', 1); 0031 } 0032 0033 public function deleteAction() 0034 { 0035 $this->_helper->layout->disableLayout(); 0036 $id = (int)$this->getParam('id'); 0037 $m = new Default_Model_ProjectClone(); 0038 $m->setDelete($id); 0039 $this->_helper->json(array( 0040 'status' => 'ok', 0041 'message' => 'deleted', 0042 'data' => array(), 0043 )); 0044 0045 } 0046 0047 public function validAction() 0048 { 0049 $this->_helper->layout->disableLayout(); 0050 $id = (int)$this->getParam('id'); 0051 $m = new Default_Model_ProjectClone(); 0052 $m->setValid($id); 0053 $this->_helper->json(array( 0054 'status' => 'ok', 0055 'message' => 'validated', 0056 'data' => array(), 0057 )); 0058 0059 } 0060 0061 public function editAction() 0062 { 0063 $this->_helper->layout->disableLayout(); 0064 $id = (int)$this->getParam('id'); 0065 $text = $this->getParam('t'); 0066 $project_id = (int)$this->getParam('p'); // cloneID 0067 $link = $this->getParam('l'); 0068 $m = new Default_Model_ProjectClone(); 0069 0070 $arr = array( 0071 'text' => $text, 0072 'project_id' => $project_id, 0073 ); 0074 if ($link) { 0075 $arr['external_link'] = $link; 0076 } 0077 $m->update($arr, 'project_clone_id=' . $id); 0078 0079 $this->_helper->json(array( 0080 'status' => 'ok', 0081 'message' => 'updated', 0082 'data' => array(), 0083 )); 0084 0085 } 0086 0087 public function modsAction() 0088 { 0089 $this->view->headTitle('Modifications', 'SET'); 0090 $this->view->page = (int)$this->getParam('page', 1); 0091 } 0092 0093 }