if ($this->System->saveAll($this->data, array('fieldList' => array_merge($this->System->fields['edit'], $this->System->fields['image'])))) {
$this->Session->setFlash(sprintf(__('%s has been changed', true), $this->data['System']['name']));
+
+ if ($this->data['System']['public_flag'] != 'public') {
+ $this->System->Character->updateAll(array('Character.public_flag' => "'private'"), array('Character.system_id' => $id));
+ }
+
Cache::clear();
$this->redirect(array('action'=>'view', $id));
} else {
var $name = 'Users';
var $helpers = array(
+ 'Select',
'Time',
);
}
$this->set('public_characters', $public_characters);
+ $this->set_public_flag4view();
}
function _listview() {
echo $html->div('lastModified', $time->niceShort($character['Character']['modified'], array('format' => 'Y/m/d H:i')));
?>
<?php endif; ?>
+<?php if (isset($viewPublic) && $viewPublic === true): ?>
+<?php
+ echo $html->div('publicFlag', $select->get_i18n_unpublic_flag($character['Character']['public_flag'], $public_flags));
+?>
+<?php endif; ?>
</td>
<?php
'id' => null,
'isUser' => false,
'isSystem' => true,
+ 'viewPublic' => true,
'more_url' => array(
'controller' => 'characters',
'action' => 'index',
'label' => __('URL', true),
));
echo $select->create_publicflag_select($public_flags, 'public_flag', array(
- 'label' => __('Public Flag', true)
+ 'label' => __('Public Flag', true),
+ 'after' => $html->tag(
+ 'div',
+ __('If unpublic, the belonging characters will be also unpublic.', true),
+ array('class' => 'notice')
+ ),
));
echo $form->input('set_npc', array(
'label' => __('Use NPC', true),