[ticket/289] Move store_selected_forums to modules_helper
This commit is contained in:
@@ -457,7 +457,7 @@ class announcements extends module_base
|
||||
'board3_number_of_announcements_' . $module_id => array('lang' => 'PORTAL_NUMBER_OF_ANNOUNCEMENTS' , 'validate' => 'int', 'type' => 'text:3:3', 'explain' => true),
|
||||
'board3_announcements_day_' . $module_id => array('lang' => 'PORTAL_ANNOUNCEMENTS_DAY' , 'validate' => 'int', 'type' => 'text:3:3', 'explain' => true),
|
||||
'board3_announcements_length_' . $module_id => array('lang' => 'PORTAL_ANNOUNCEMENTS_LENGTH' , 'validate' => 'int', 'type' => 'text:3:3', 'explain' => true),
|
||||
'board3_global_announcements_forum_' . $module_id => array('lang' => 'PORTAL_GLOBAL_ANNOUNCEMENTS_FORUM' , 'validate' => 'string', 'type' => 'custom', 'explain' => true, 'method' => array('board3.portal.modules_helper', 'generate_forum_select'), 'submit' => 'store_selected_forums'),
|
||||
'board3_global_announcements_forum_' . $module_id => array('lang' => 'PORTAL_GLOBAL_ANNOUNCEMENTS_FORUM' , 'validate' => 'string', 'type' => 'custom', 'explain' => true, 'method' => array('board3.portal.modules_helper', 'generate_forum_select'), 'submit' => array('board3.portal.modules_helper', 'store_selected_forums')),
|
||||
'board3_announcements_forum_exclude_' . $module_id => array('lang' => 'PORTAL_ANNOUNCEMENTS_FORUM_EXCLUDE', 'validate' => 'string', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'board3_announcements_archive_' . $module_id => array('lang' => 'PORTAL_ANNOUNCEMENTS_ARCHIVE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'board3_announcements_permissions_' . $module_id => array('lang' => 'PORTAL_ANNOUNCEMENTS_PERMISSIONS' , 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
@@ -504,20 +504,4 @@ class announcements extends module_base
|
||||
WHERE ' . $db->sql_in_set('config_name', $del_config);
|
||||
return $db->sql_query($sql);
|
||||
}
|
||||
|
||||
/**
|
||||
* Store selected forums
|
||||
*
|
||||
* @param string $key Key name
|
||||
* @param int $module_id Module ID
|
||||
*
|
||||
* @return null
|
||||
*/
|
||||
public function store_selected_forums($key, $module_id)
|
||||
{
|
||||
// Get selected forums
|
||||
$values = $this->request->variable($key, array(0 => ''));
|
||||
$news = implode(',', $values);
|
||||
set_config($key, $news);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -121,7 +121,7 @@ class attachments extends module_base
|
||||
'legend1' => 'ACP_PORTAL_ATTACHMENTS_NUMBER_SETTINGS',
|
||||
'board3_attachments_number_' . $module_id => array('lang' => 'PORTAL_ATTACHMENTS_NUMBER' , 'validate' => 'int', 'type' => 'text:3:3', 'explain' => true),
|
||||
'board3_attach_max_length_' . $module_id => array('lang' => 'PORTAL_ATTACHMENTS_MAX_LENGTH' , 'validate' => 'int', 'type' => 'text:3:3', 'explain' => true),
|
||||
'board3_attachments_forum_ids_' . $module_id => array('lang' => 'PORTAL_ATTACHMENTS_FORUM_IDS', 'validate' => 'string', 'type' => 'custom', 'explain' => true, 'method' => array('board3.portal.modules_helper', 'generate_forum_select'), 'submit' => 'store_selected_forums'),
|
||||
'board3_attachments_forum_ids_' . $module_id => array('lang' => 'PORTAL_ATTACHMENTS_FORUM_IDS', 'validate' => 'string', 'type' => 'custom', 'explain' => true, 'method' => array('board3.portal.modules_helper', 'generate_forum_select'), 'submit' => array('board3.portal.modules_helper', 'store_selected_forums')),
|
||||
'board3_attachments_forum_exclude_' . $module_id => array('lang' => 'PORTAL_ATTACHMENTS_FORUM_EXCLUDE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'board3_attachments_filetype_' . $module_id => array('lang' => 'PORTAL_ATTACHMENTS_FILETYPE', 'validate' => 'string', 'type' => 'custom', 'explain' => true, 'method' => 'select_filetype', 'submit' => 'store_filetypes'),
|
||||
'board3_attachments_exclude_' . $module_id => array('lang' => 'PORTAL_ATTACHMENTS_EXCLUDE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
@@ -212,22 +212,6 @@ class attachments extends module_base
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Store selected forums
|
||||
*
|
||||
* @param string $key Key name
|
||||
* @param int $module_id Module ID
|
||||
*
|
||||
* @return null
|
||||
*/
|
||||
public function store_selected_forums($key)
|
||||
{
|
||||
// Get selected extensions
|
||||
$values = $this->request->variable($key, array(0 => ''));
|
||||
$news = implode(',', $values);
|
||||
set_config($key, $news);
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse template variables for module
|
||||
*
|
||||
|
||||
@@ -436,7 +436,7 @@ class news extends module_base
|
||||
'board3_show_all_news_' . $module_id => array('lang' => 'PORTAL_SHOW_ALL_NEWS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'board3_number_of_news_' . $module_id => array('lang' => 'PORTAL_NUMBER_OF_NEWS', 'validate' => 'int', 'type' => 'text:3:3', 'explain' => true),
|
||||
'board3_news_length_' . $module_id => array('lang' => 'PORTAL_NEWS_LENGTH', 'validate' => 'int', 'type' => 'text:3:3', 'explain' => true),
|
||||
'board3_news_forum_' . $module_id => array('lang' => 'PORTAL_NEWS_FORUM', 'validate' => 'string', 'type' => 'custom', 'explain' => true, 'method' => array('board3.portal.modules_helper', 'generate_forum_select'), 'submit' => 'store_selected_forums'),
|
||||
'board3_news_forum_' . $module_id => array('lang' => 'PORTAL_NEWS_FORUM', 'validate' => 'string', 'type' => 'custom', 'explain' => true, 'method' => array('board3.portal.modules_helper', 'generate_forum_select'), 'submit' => array('board3.portal.modules_helper', 'store_selected_forums')),
|
||||
'board3_news_exclude_' . $module_id => array('lang' => 'PORTAL_NEWS_EXCLUDE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'board3_news_show_last_' . $module_id => array('lang' => 'PORTAL_NEWS_SHOW_LAST', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'board3_news_archive_' . $module_id => array('lang' => 'PORTAL_NEWS_ARCHIVE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
@@ -485,23 +485,4 @@ class news extends module_base
|
||||
WHERE ' . $db->sql_in_set('config_name', $del_config);
|
||||
return $db->sql_query($sql);
|
||||
}
|
||||
|
||||
/**
|
||||
* Store selected forums
|
||||
*
|
||||
* @param string $key Key name
|
||||
* @param int $module_id Module ID
|
||||
*
|
||||
* @return null
|
||||
*/
|
||||
public function store_selected_forums($key, $module_id)
|
||||
{
|
||||
// Get selected extensions
|
||||
$values = $this->request->variable($key, array(0 => ''));
|
||||
|
||||
$news = implode(',', $values);
|
||||
|
||||
set_config($key, $news);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@ class poll extends module_base
|
||||
'title' => 'ACP_PORTAL_POLLS_SETTINGS',
|
||||
'vars' => array(
|
||||
'legend1' => 'ACP_PORTAL_POLLS_SETTINGS',
|
||||
'board3_poll_topic_id_' . $module_id => array('lang' => 'PORTAL_POLL_TOPIC_ID' , 'validate' => 'string', 'type' => 'custom', 'explain' => true, 'method' => array('board3.portal.modules_helper', 'generate_forum_select'), 'submit' => 'store_selected_forums'),
|
||||
'board3_poll_topic_id_' . $module_id => array('lang' => 'PORTAL_POLL_TOPIC_ID' , 'validate' => 'string', 'type' => 'custom', 'explain' => true, 'method' => array('board3.portal.modules_helper', 'generate_forum_select'), 'submit' => array('board3.portal.modules_helper', 'store_selected_forums')),
|
||||
'board3_poll_exclude_id_' . $module_id => array('lang' => 'PORTAL_POLL_EXCLUDE_ID' , 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'board3_poll_limit_' . $module_id => array('lang' => 'PORTAL_POLL_LIMIT' , 'validate' => 'int', 'type' => 'text:3:3', 'explain' => true),
|
||||
'board3_poll_allow_vote_' . $module_id => array('lang' => 'PORTAL_POLL_ALLOW_VOTE' , 'validate' => 'ibool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
@@ -159,25 +159,6 @@ class poll extends module_base
|
||||
return $db->sql_query($sql);
|
||||
}
|
||||
|
||||
/**
|
||||
* Store selected forums
|
||||
*
|
||||
* @param string $key Key name
|
||||
* @param int $module_id Module ID
|
||||
*
|
||||
* @return null
|
||||
*/
|
||||
public function store_selected_forums($key, $module_id)
|
||||
{
|
||||
// Get selected forums
|
||||
$values = $this->request->variable($key, array(0 => ''));
|
||||
|
||||
$news = implode(',', $values);
|
||||
|
||||
set_config($key, $news);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse template variables for module
|
||||
*
|
||||
|
||||
@@ -219,7 +219,7 @@ class recent extends module_base
|
||||
'legend1' => 'ACP_PORTAL_RECENT_SETTINGS',
|
||||
'board3_max_topics_' . $module_id => array('lang' => 'PORTAL_MAX_TOPIC', 'validate' => 'int', 'type' => 'text:3:3', 'explain' => true),
|
||||
'board3_recent_title_limit_' . $module_id => array('lang' => 'PORTAL_RECENT_TITLE_LIMIT', 'validate' => 'int', 'type' => 'text:3:3', 'explain' => true),
|
||||
'board3_recent_forum_' . $module_id => array('lang' => 'PORTAL_RECENT_FORUM', 'validate' => 'string', 'type' => 'custom', 'explain' => true, 'method' => array('board3.portal.modules_helper', 'generate_forum_select'), 'submit' => 'store_selected_forums'),
|
||||
'board3_recent_forum_' . $module_id => array('lang' => 'PORTAL_RECENT_FORUM', 'validate' => 'string', 'type' => 'custom', 'explain' => true, 'method' => array('board3.portal.modules_helper', 'generate_forum_select'), 'submit' => array('board3.portal.modules_helper', 'store_selected_forums')),
|
||||
'board3_recent_exclude_forums_' . $module_id => array('lang' => 'PORTAL_EXCLUDE_FORUM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
)
|
||||
);
|
||||
@@ -252,22 +252,4 @@ class recent extends module_base
|
||||
WHERE ' . $db->sql_in_set('config_name', $del_config);
|
||||
return $db->sql_query($sql);
|
||||
}
|
||||
|
||||
/**
|
||||
* Store selected forums
|
||||
*
|
||||
* @param string $key Key name
|
||||
* @param int $module_id Module ID
|
||||
*
|
||||
* @return null
|
||||
*/
|
||||
public function store_selected_forums($key, $module_id)
|
||||
{
|
||||
// Get selected extensions
|
||||
$values = $this->request->variable($key, array(0 => ''));
|
||||
|
||||
$news = implode(',', $values);
|
||||
|
||||
set_config($key, $news);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user