function add() {
if (!empty($this->data)) {
- $this->_add(false);
+ $this->_add();
}
}
function edit($id = null) {
- $this->_edit($id, false);
+ $this->_edit($id);
}
function delete($id = null) {
- $this->_delete($id, false);
+ $this->_delete($id);
}
function visit($id = null) {
}
function admin_index() {
- $this->_index(true);
+ $this->_index();
}
function admin_listview() {
- $this->_listview(true);
+ $this->_listview();
}
function admin_add() {
if (!empty($this->data)) {
- $this->_add(true);
+ $this->_add();
}
}
function admin_edit($id = null) {
- $this->_edit($id, true);
+ $this->_edit($id);
}
function admin_delete($id = null) {
- $this->_delete($id, true);
+ $this->_delete($id);
}
- function _index($isAdmin = false) {
+ function _index() {
$this->Link->beforeFind('');
// WhatsNew
$member = $this->Link->find('all', array('options' => array(
));
}
- function _listview($isAdmin = false) {
+ function _listview() {
$this->paginate = $this->Link->options();
$links = $this->paginate();
$this->set('title_for_layout', " - ". __('Links', true));
}
- function _add($isAdmin = false) {
+ function _add() {
// デモモードチェック
$this->_check_demo();
- if ($isAdmin) {
+ if ($this->isAdmin) {
$fieldList = $this->Link->fields['admin_add'];
} else {
$fieldList = $this->Link->fields['add'];
$this->set('title_for_layout', " - ". __('ADD Link', true));
}
- function _edit($id = null, $isAdmin = false) {
+ function _edit($id = null) {
// デモモードチェック
$this->_check_demo();
$link = $this->_getLink4id($id);
// 権限チェック
- if (!$isAdmin) {
+ if (!$this->isAdmin) {
if ($link['Link']['user_id'] != $this->user_id) {
$this->Session->setFlash(__('No Permission', true));
$this->redirect(array('action' => 'listview'));
}
if (!empty($this->data)) {
- if ($isAdmin) {
+ if ($this->isAdmin) {
$fieldList = $this->Link->fields['admin_edit'];
} else {
$fieldList = $this->Link->fields['edit'];
$this->set('title_for_layout', " - ". __('Edit Link', true). " - ". $link['Link']['title']. "(". $link['Link']['url']. ")");
}
- function _delete($id = null, $isAdmin = false) {
+ function _delete($id = null) {
// デモモードチェック
$this->_check_demo();
$link = $this->_getLink4id($id);
// 権限チェック
- if (!$isAdmin) {
+ if (!$this->isAdmin) {
if ($link['Link']['user_id'] != $this->user_id) {
$this->Session->setFlash(__('No Permission', true));
$this->redirect(array('action' => 'listview'));