Commit d09d4117 authored by Langston Ball's avatar Langston Ball

refs #2806 - rescuing commit from dreamweavers amazingly bad git

parent cfc27305
<?xml version="1.0" encoding="utf-8" ?>
<dwsync>
<file name="AlexaController.php" server="192.168.80.1//var/www/lmce-api/" local="131616768661603936" remote="131616768600000000" Dst="1" />
<file name="AppController.php" server="192.168.80.1//var/www/lmce-api/" local="131609100597182078" remote="131609100600000000" Dst="1" />
</dwsync>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8" ?>
<dwsync>
<file name="DceCommandInterface.php" server="192.168.80.1//var/www/lmce-api/" local="131612434455749338" remote="131612434200000000" Dst="1" />
<file name="DceCommandExecutorComponent.php" server="192.168.80.1//var/www/lmce-api/" local="131616779351725376" remote="131616778800000000" Dst="1" />
</dwsync>
\ No newline at end of file
<?php
namespace App\Controller;
use App\Controller\AppController;
/**
* Device Controller
*
*
* @method \App\Model\Entity\Device[]|\Cake\Datasource\ResultSetInterface paginate($object = null, array $settings = [])
*/
class DeviceController extends AppController
{
/**
* Index method
*
* @return \Cake\Http\Response|void
*/
public function index()
{
$device = $this->paginate($this->Device);
$this->set(compact('device'));
}
/**
* View method
*
* @param string|null $id Device id.
* @return \Cake\Http\Response|void
* @throws \Cake\Datasource\Exception\RecordNotFoundException When record not found.
*/
public function view($id = null)
{
$device = $this->Device->get($id, [
'contain' => []
]);
$this->set('device', $device);
}
/**
* Add method
*
* @return \Cake\Http\Response|null Redirects on successful add, renders view otherwise.
*/
public function add()
{
$device = $this->Device->newEntity();
if ($this->request->is('post')) {
$device = $this->Device->patchEntity($device, $this->request->getData());
if ($this->Device->save($device)) {
$this->Flash->success(__('The device has been saved.'));
return $this->redirect(['action' => 'index']);
}
$this->Flash->error(__('The device could not be saved. Please, try again.'));
}
$this->set(compact('device'));
}
/**
* Edit method
*
* @param string|null $id Device id.
* @return \Cake\Http\Response|null Redirects on successful edit, renders view otherwise.
* @throws \Cake\Network\Exception\NotFoundException When record not found.
*/
public function edit($id = null)
{
$device = $this->Device->get($id, [
'contain' => []
]);
if ($this->request->is(['patch', 'post', 'put'])) {
$device = $this->Device->patchEntity($device, $this->request->getData());
if ($this->Device->save($device)) {
$this->Flash->success(__('The device has been saved.'));
return $this->redirect(['action' => 'index']);
}
$this->Flash->error(__('The device could not be saved. Please, try again.'));
}
$this->set(compact('device'));
}
/**
* Delete method
*
* @param string|null $id Device id.
* @return \Cake\Http\Response|null Redirects to index.
* @throws \Cake\Datasource\Exception\RecordNotFoundException When record not found.
*/
public function delete($id = null)
{
$this->request->allowMethod(['post', 'delete']);
$device = $this->Device->get($id);
if ($this->Device->delete($device)) {
$this->Flash->success(__('The device has been deleted.'));
} else {
$this->Flash->error(__('The device could not be deleted. Please, try again.'));
}
return $this->redirect(['action' => 'index']);
}
}
<?php
namespace App\Controller;
use App\Controller\AppController;
/**
* Devicecategory Controller
*
*
* @method \App\Model\Entity\Devicecategory[]|\Cake\Datasource\ResultSetInterface paginate($object = null, array $settings = [])
*/
class DevicecategoryController extends AppController
{
/**
* Index method
*
* @return \Cake\Http\Response|void
*/
public function index()
{
$devicecategory = $this->paginate($this->Devicecategory);
$this->set(compact('devicecategory'));
}
/**
* View method
*
* @param string|null $id Devicecategory id.
* @return \Cake\Http\Response|void
* @throws \Cake\Datasource\Exception\RecordNotFoundException When record not found.
*/
public function view($id = null)
{
$devicecategory = $this->Devicecategory->get($id, [
'contain' => []
]);
$this->set('devicecategory', $devicecategory);
}
/**
* Add method
*
* @return \Cake\Http\Response|null Redirects on successful add, renders view otherwise.
*/
public function add()
{
$devicecategory = $this->Devicecategory->newEntity();
if ($this->request->is('post')) {
$devicecategory = $this->Devicecategory->patchEntity($devicecategory, $this->request->getData());
if ($this->Devicecategory->save($devicecategory)) {
$this->Flash->success(__('The devicecategory has been saved.'));
return $this->redirect(['action' => 'index']);
}
$this->Flash->error(__('The devicecategory could not be saved. Please, try again.'));
}
$this->set(compact('devicecategory'));
}
/**
* Edit method
*
* @param string|null $id Devicecategory id.
* @return \Cake\Http\Response|null Redirects on successful edit, renders view otherwise.
* @throws \Cake\Network\Exception\NotFoundException When record not found.
*/
public function edit($id = null)
{
$devicecategory = $this->Devicecategory->get($id, [
'contain' => []
]);
if ($this->request->is(['patch', 'post', 'put'])) {
$devicecategory = $this->Devicecategory->patchEntity($devicecategory, $this->request->getData());
if ($this->Devicecategory->save($devicecategory)) {
$this->Flash->success(__('The devicecategory has been saved.'));
return $this->redirect(['action' => 'index']);
}
$this->Flash->error(__('The devicecategory could not be saved. Please, try again.'));
}
$this->set(compact('devicecategory'));
}
/**
* Delete method
*
* @param string|null $id Devicecategory id.
* @return \Cake\Http\Response|null Redirects to index.
* @throws \Cake\Datasource\Exception\RecordNotFoundException When record not found.
*/
public function delete($id = null)
{
$this->request->allowMethod(['post', 'delete']);
$devicecategory = $this->Devicecategory->get($id);
if ($this->Devicecategory->delete($devicecategory)) {
$this->Flash->success(__('The devicecategory has been deleted.'));
} else {
$this->Flash->error(__('The devicecategory could not be deleted. Please, try again.'));
}
return $this->redirect(['action' => 'index']);
}
}
<?php
/**
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
*
* Licensed under The MIT License
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
* @link https://cakephp.org CakePHP(tm) Project
* @since 0.2.9
* @license https://opensource.org/licenses/mit-license.php MIT License
*/
namespace App\Controller\Google;
use Cake\Controller\Controller;
use Cake\Event\Event;
/**
* Application Controller
*
* Add your application-wide methods in the class below, your controllers
* will inherit them.
*
* @link https://book.cakephp.org/3.0/en/controllers.html#the-app-controller
*/
class AppController extends Controller
{
/**
* Initialization hook method.
*
* Use this method to add common initialization code like loading components.
*
* e.g. `$this->loadComponent('Security');`
*
* @return void
*/
public function initialize()
{
parent::initialize();
$this->loadComponent('RequestHandler');
$this->loadComponent('Flash');
}
}
<?xml version="1.0" encoding="utf-8" ?>
<dwsync>
<file name="AssistantController.php" server="192.168.80.1//var/www/lmce-api/" local="131609099392053149" remote="131609099400000000" Dst="1" />
<file name="AppController.php" server="192.168.80.1//var/www/lmce-api/" local="131609098200000000" remote="131609098200000000" Dst="1" />
<file name="GoogleController.php" server="192.168.80.1//var/www/lmce-api/" local="131609098534244085" remote="131609098200000000" Dst="1" />
</dwsync>
\ No newline at end of file
<?php
namespace App\Controller;
use App\Controller\AppController;
/**
* Linuxmcefile Controller
*
* @property \App\Model\Table\LinuxmcefileTable $Linuxmcefile
*
* @method \App\Model\Entity\Linuxmcefile[]|\Cake\Datasource\ResultSetInterface paginate($object = null, array $settings = [])
*/
class LinuxmcefileController extends AppController
{
public function initialize()
{
parent::initialize();
$this->loadComponent('RequestHandler');
$this->loadComponent('DceCommandExecutor');
}
/**
* Index method
*
* @return \Cake\Http\Response|void
*/
public function index()
{
$linuxmcefile = $this->paginate($this->Linuxmcefile);
$this->set(compact('linuxmcefile'));
}
/**
* View method
*
* @param string|null $id Linuxmcefile id.
* @return \Cake\Http\Response|void
* @throws \Cake\Datasource\Exception\RecordNotFoundException When record not found.
*/
public function view($id = null)
{
$linuxmcefile = $this->Linuxmcefile->get($id, [
'contain' => []
]);
$this->set('linuxmcefile', $linuxmcefile);
}
/**
* Add method
*
* @return \Cake\Http\Response|null Redirects on successful add, renders view otherwise.
*/
public function add()
{
$linuxmcefile = $this->Linuxmcefile->newEntity();
if ($this->request->is('post')) {
$linuxmcefile = $this->Linuxmcefile->patchEntity($linuxmcefile, $this->request->getData());
if ($this->Linuxmcefile->save($linuxmcefile)) {
$this->Flash->success(__('The linuxmcefile has been saved.'));
return $this->redirect(['action' => 'index']);
}
$this->Flash->error(__('The linuxmcefile could not be saved. Please, try again.'));
}
$this->set(compact('linuxmcefile'));
}
/**
* Edit method
*
* @param string|null $id Linuxmcefile id.
* @return \Cake\Http\Response|null Redirects on successful edit, renders view otherwise.
* @throws \Cake\Network\Exception\NotFoundException When record not found.
*/
public function edit($id = null)
{
$linuxmcefile = $this->Linuxmcefile->get($id, [
'contain' => []
]);
if ($this->request->is(['patch', 'post', 'put'])) {
$linuxmcefile = $this->Linuxmcefile->patchEntity($linuxmcefile, $this->request->getData());
if ($this->Linuxmcefile->save($linuxmcefile)) {
$this->Flash->success(__('The linuxmcefile has been saved.'));
return $this->redirect(['action' => 'index']);
}
$this->Flash->error(__('The linuxmcefile could not be saved. Please, try again.'));
}
$this->set(compact('linuxmcefile'));
}
/**
* Delete method
*
* @param string|null $id Linuxmcefile id.
* @return \Cake\Http\Response|null Redirects to index.
* @throws \Cake\Datasource\Exception\RecordNotFoundException When record not found.
*/
public function delete($id = null)
{
$this->request->allowMethod(['post', 'delete']);
$linuxmcefile = $this->Linuxmcefile->get($id);
if ($this->Linuxmcefile->delete($linuxmcefile)) {
$this->Flash->success(__('The linuxmcefile has been deleted.'));
} else {
$this->Flash->error(__('The linuxmcefile could not be deleted. Please, try again.'));
}
return $this->redirect(['action' => 'index']);
}
public function findVideoFile(){
$name = $this->request->params['?']['name'];
$movieReply = $this->Linuxmcefile->getVideoByName($name);
$final = array();
$final['movieAnswer'] = $movieReply;
$this->set(compact('final'));
$this->set('_serialize', 'final');
}
}
<?xml version="1.0" encoding="utf-8" ?>
<dwsync>
<file name="PagesController.php" server="192.168.80.1//var/www/lmce-api/" local="131589967200000000" remote="131589967200000000" Dst="1" />
<file name="AppController.php" server="192.168.80.1//var/www/lmce-api/" local="131589967200000000" remote="131589967200000000" Dst="1" />
<file name="DeviceController.php" server="192.168.80.1//var/www/lmce-api/" local="131609458800000000" remote="131609458800000000" Dst="1" />
<file name="DevicesController.php" server="192.168.80.1//var/www/lmce-api/" local="131613001698638970" remote="131613001200000000" Dst="1" />
<file name="ManufacturersController.php" server="192.168.80.1//var/www/lmce-api/" local="131609682000000000" remote="131609682000000000" Dst="1" />
<file name="DevicecategoryController.php" server="192.168.80.1//var/www/lmce-api/" local="131609683200000000" remote="131609683200000000" Dst="1" />
<file name="RoomtypesController.php" server="192.168.80.1//var/www/lmce-api/" local="131609678400000000" remote="131609678400000000" Dst="1" />
<file name="DevicesmanufacturersController.php" server="192.168.80.1//var/www/lmce-api/" local="131610403200000000" remote="131610403200000000" Dst="1" />
<file name="LinuxmcefileController.php" server="192.168.80.1//var/www/lmce-api/" local="131616657549218672" remote="131616657000000000" Dst="1" />
</dwsync>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8" ?>
<dwsync>
<file name="Device.php" server="192.168.80.1//var/www/lmce-api/" local="131609623783679385" remote="131609623800000000" Dst="1" />
</dwsync>
\ No newline at end of file
<?php
namespace App\Model\Table;
use Cake\ORM\Table;
class CommandgroupTable extends Table{
public function initialize(array $config){
$this->setTable('CommandGroup');
$this->primaryKey('PK_CommandGroup');
$this->hasOne('Room',
[
'className' => 'Rooms',
'joinTable' => 'Commandgrouproom',
'bindingKey' => 'PK_CommandGroup',
'foreignKey' => 'PK_Room',
'targetForeignKey' =>'FK_Room'
]);
}
}
?>
\ No newline at end of file
<?php
namespace App\Model\Table;
use Cake\ORM\Table;
class CommandgroupcommandTable extends Table{
public function initialize(array $config){
$this->setTable('CommandGroup_Command');
$this->primaryKey('PK_CommandGroup_Command');
$this->belongsTo('CommandGroup',
[
'className' =>'Commandgroup',
'foreignKey' =>'FK_CommandGroup'
]);
$this->belongsTo('Command',
[
'className' => 'Commands',
'foreignKey' => 'FK_Command'
]);
$this->belongsTo('Device',
[
'className' => 'Devices',
'foreignKey' => 'FK_Device'
]);
}
}
?>
\ No newline at end of file
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
</head>
<body>
</body>
</html>
<?php
namespace App\Model\Table;
use Cake\ORM\Table;
class CommandsTable extends Table{
public function initialize(array $config){
$this->setTable('Command');
$this->primaryKey('PK_Command');
$this->belongsToMany('CommandGroup',
[
'className'=>'Commandgroup',
'joinTable' => 'Commandgroupcommand',
'foreignKey' => 'FK_Command',
'targetForeignKey' =>'FK_CommandGroup'
]
);
$this->belongsToMany('Device',
[
'className'=>'Devices',
'joinTable' => 'Commandgroupcommand',
'foreignKey' => 'FK_Command',
'targetForeignKey' =>'FK_Device'
]
);
}
}
\ No newline at end of file
<?php
namespace App\Model\Table;
use Cake\ORM\Table;
class Devicecategories extends Table{
public function initialize(array $config){
$this->setTable('DeviceCategory');
$this->primaryKey('PK_DeviceCategory');
}
}
?>
\ No newline at end of file
<?php
namespace App\Model\Table;
use Cake\ORM\Table;
class DeviceTable extends Table{
public function initialize(array $config){
$this->setTable('Device');
$this->primaryKey('PK_Device');
}
}
?>
\ No newline at end of file
<?php
namespace App\Model\Table;
use Cake\ORM\Table;
class Devicecategories extends Table{
public function initialize(array $config){
$this->setTable('DeviceCategory');
$this->primaryKey('PK_DeviceCategory');
}
}
?>
\ No newline at end of file
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
</head>
<body>
</body>
</html>
<?php
namespace App\Model\Table;
use App\Model\Table\PlutoMediaTable;
use Cake\ORM\Query;
use Cake\ORM\TableRegistry;
use Cake\Cache\Cache;
class LinuxmceattributesTable extends PlutoMediaTable{
public function initialize(array $config){
parent::initialize($config);
$this->table($this->connection()->config()['database'] . "." . 'File');
$this->setTable('File');
$this->primaryKey('PK_File');
}
}
\ No newline at end of file
<?php
namespace App\Model\Table;
use App\Model\Table\PlutoMediaTable;
use Cake\ORM\Query;
use Cake\ORM\TableRegistry;
use Cake\Cache\Cache;
class LinuxmceattributesTable extends PlutoMediaTable{
public function initialize(array $config){
parent::initialize($config);
$this->table($this->connection()->config()['database'] . "." . 'Attribute');
$this->setTable('Attribute');
$this->primaryKey('PK_Attribute');
$this->hasOne( 'AttributeType',
[
'className'=>'Linuxmceattributetypes',
'foreignKey' => 'PK_AttributeType',
'bindingKey' => 'FK_AttributeType'
] );
$this->belongsToMany('File',
[
'className' => 'Linuxmcefile',
'joinTable' => 'Linuxmcefileattributes',
'bindingKey' => 'PK_Attribute',
'foreignKey'=>'FK_Attribute',
'targetForeignKey' =>'FK_File'
]);
}
}
\ No newline at end of file
<?php
namespace App\Model\Table;
use App\Model\Table\PlutoMediaTable;
use Cake\ORM\Query;
use Cake\ORM\TableRegistry;
use Cake\Cache\Cache;
class LinuxmceattributetypesTable extends PlutoMediaTable{
public function initialize(array $config){
parent::initialize($config);
$this->table($this->connection()->config()['database'] . "." . 'AttributeType');
$this->setTable('AttributeType');
$this->primaryKey('PK_AttributeType');
}
}
\ No newline at end of file
<?php
namespace App\Model\Table;
use App\Model\Table\PlutoMediaTable;
use Cake\ORM\Query;
use Cake\ORM\TableRegistry;