Removed: Backup files
This commit is contained in:
parent
08a4d9eb11
commit
34e4b6aafa
2 changed files with 0 additions and 3050 deletions
|
@ -1,125 +0,0 @@
|
|||
<?php
|
||||
class LanguagesController extends AppController {
|
||||
|
||||
var $name = 'Languages';
|
||||
|
||||
function index() {
|
||||
$this->Language->recursive = 0;
|
||||
$this->set('languages', $this->paginate());
|
||||
}
|
||||
|
||||
function view($id = null) {
|
||||
if (!$id) {
|
||||
$this->Session->setFlash(__('Invalid language', true));
|
||||
$this->redirect(array('action' => 'index'));
|
||||
}
|
||||
$this->set('language', $this->Language->read(null, $id));
|
||||
/* $options = array('Language.id' => $id, 'recursive' => 1,
|
||||
"joins" => array(
|
||||
array('table' => '
|
||||
),
|
||||
);
|
||||
var_dump($this);
|
||||
$this->set('language', $bumz = $this->Language->find('first', $options));
|
||||
var_dump($bumz);*/
|
||||
// $this->set('identifier', $this->Language->TranslationFile->read(null, $id));
|
||||
}
|
||||
|
||||
function add() {
|
||||
if (!empty($this->data)) {
|
||||
$this->Language->create();
|
||||
if ($this->Language->save($this->data)) {
|
||||
$this->Session->setFlash(__('The language has been saved', true));
|
||||
$this->redirect(array('action' => 'index'));
|
||||
} else {
|
||||
$this->Session->setFlash(__('The language could not be saved. Please, try again.', true));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function edit($id = null) {
|
||||
if (!$id && empty($this->data)) {
|
||||
$this->Session->setFlash(__('Invalid language', true));
|
||||
$this->redirect(array('action' => 'index'));
|
||||
}
|
||||
if (!empty($this->data)) {
|
||||
if ($this->Language->save($this->data)) {
|
||||
$this->Session->setFlash(__('The language has been saved', true));
|
||||
$this->redirect(array('action' => 'index'));
|
||||
} else {
|
||||
$this->Session->setFlash(__('The language could not be saved. Please, try again.', true));
|
||||
}
|
||||
}
|
||||
if (empty($this->data)) {
|
||||
$this->data = $this->Language->read(null, $id);
|
||||
}
|
||||
}
|
||||
|
||||
function delete($id = null) {
|
||||
if (!$id) {
|
||||
$this->Session->setFlash(__('Invalid id for language', true));
|
||||
$this->redirect(array('action'=>'index'));
|
||||
}
|
||||
if ($this->Language->delete($id)) {
|
||||
$this->Session->setFlash(__('Language deleted', true));
|
||||
$this->redirect(array('action'=>'index'));
|
||||
}
|
||||
$this->Session->setFlash(__('Language was not deleted', true));
|
||||
$this->redirect(array('action' => 'index'));
|
||||
}
|
||||
function admin_index() {
|
||||
$this->Language->recursive = 0;
|
||||
$this->set('languages', $this->paginate());
|
||||
}
|
||||
|
||||
function admin_view($id = null) {
|
||||
if (!$id) {
|
||||
$this->Session->setFlash(__('Invalid language', true));
|
||||
$this->redirect(array('action' => 'index'));
|
||||
}
|
||||
$this->set('language', $this->Language->read(null, $id));
|
||||
}
|
||||
|
||||
function admin_add() {
|
||||
if (!empty($this->data)) {
|
||||
$this->Language->create();
|
||||
if ($this->Language->save($this->data)) {
|
||||
$this->Session->setFlash(__('The language has been saved', true));
|
||||
$this->redirect(array('action' => 'index'));
|
||||
} else {
|
||||
$this->Session->setFlash(__('The language could not be saved. Please, try again.', true));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function admin_edit($id = null) {
|
||||
if (!$id && empty($this->data)) {
|
||||
$this->Session->setFlash(__('Invalid language', true));
|
||||
$this->redirect(array('action' => 'index'));
|
||||
}
|
||||
if (!empty($this->data)) {
|
||||
if ($this->Language->save($this->data)) {
|
||||
$this->Session->setFlash(__('The language has been saved', true));
|
||||
$this->redirect(array('action' => 'index'));
|
||||
} else {
|
||||
$this->Session->setFlash(__('The language could not be saved. Please, try again.', true));
|
||||
}
|
||||
}
|
||||
if (empty($this->data)) {
|
||||
$this->data = $this->Language->read(null, $id);
|
||||
}
|
||||
}
|
||||
|
||||
function admin_delete($id = null) {
|
||||
if (!$id) {
|
||||
$this->Session->setFlash(__('Invalid id for language', true));
|
||||
$this->redirect(array('action'=>'index'));
|
||||
}
|
||||
if ($this->Language->delete($id)) {
|
||||
$this->Session->setFlash(__('Language deleted', true));
|
||||
$this->redirect(array('action'=>'index'));
|
||||
}
|
||||
$this->Session->setFlash(__('Language was not deleted', true));
|
||||
$this->redirect(array('action' => 'index'));
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue