* code for custom set.
This commit is contained in:
@@ -19,7 +19,7 @@ class custom extends control
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
die(js::locate(inlink('setCustom')));
|
||||
die(js::locate(inlink('set')));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -30,7 +30,7 @@ class custom extends control
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function setCustom($module = 'story', $field = 'priList')
|
||||
public function set($module = 'story', $field = 'priList')
|
||||
{
|
||||
if($module == 'user' and $field == 'priList') $field = 'roleList';
|
||||
$currentLang = $this->app->getClientLang();
|
||||
@@ -44,10 +44,12 @@ class custom extends control
|
||||
foreach($_POST['keys'] as $index => $key)
|
||||
{
|
||||
$value = $_POST['values'][$index];
|
||||
if(!$value or !$key) continue;
|
||||
$system = $_POST['systems'][$index];
|
||||
$this->custom->setItem("{$lang}.{$module}.{$field}.{$key}.{$system}", $value);
|
||||
}
|
||||
if(!dao::getError()) die(js::reload('parent'));
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
die(js::reload('parent'));
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->custom->common . $this->lang->colon . $this->lang->custom->story;
|
||||
|
||||
Reference in New Issue
Block a user