mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-11 11:13:59 +02:00
Add sql_bit_or() dbal method. Add ability to enable quick reply in all forums. -- Voila ;-)
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10491 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -34,7 +34,7 @@ class acp_board
|
||||
$user->add_lang('acp/board');
|
||||
|
||||
$action = request_var('action', '');
|
||||
$submit = (isset($_POST['submit'])) ? true : false;
|
||||
$submit = (isset($_POST['submit']) || isset($_POST['allow_quick_reply_enable'])) ? true : false;
|
||||
|
||||
$form_key = 'acp_board';
|
||||
add_form_key($form_key);
|
||||
@@ -89,7 +89,7 @@ class acp_board
|
||||
'allow_nocensors' => array('lang' => 'ALLOW_NO_CENSORS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'allow_bookmarks' => array('lang' => 'ALLOW_BOOKMARKS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'allow_birthdays' => array('lang' => 'ALLOW_BIRTHDAYS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'allow_quick_reply' => array('lang' => 'ALLOW_QUICK_REPLY', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'allow_quick_reply' => array('lang' => 'ALLOW_QUICK_REPLY', 'validate' => 'bool', 'type' => 'custom', 'method' => 'quick_reply', 'explain' => true),
|
||||
|
||||
'legend2' => 'ACP_LOAD_SETTINGS',
|
||||
'load_birthdays' => array('lang' => 'YES_BIRTHDAYS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
@@ -472,6 +472,11 @@ class acp_board
|
||||
if ($submit)
|
||||
{
|
||||
set_config($config_name, $config_value);
|
||||
|
||||
if ($config_name == 'allow_quick_reply' && isset($_POST['allow_quick_reply_enable']))
|
||||
{
|
||||
enable_bitfield_column_flag(FORUMS_TABLE, 'forum_flags', log(FORUM_FLAG_QUICK_REPLY, 2));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -858,6 +863,20 @@ class acp_board
|
||||
return h_radio('config[board_disable]', $radio_ary, $value) . '<br /><input id="' . $key . '" type="text" name="config[board_disable_msg]" maxlength="255" size="40" value="' . $this->new_config['board_disable_msg'] . '" />';
|
||||
}
|
||||
|
||||
/**
|
||||
* Global quick reply enable/disable setting and button to enable in all forums
|
||||
*/
|
||||
function quick_reply($value, $key)
|
||||
{
|
||||
global $user;
|
||||
|
||||
$radio_ary = array(1 => 'YES', 0 => 'NO');
|
||||
|
||||
return h_radio('config[allow_quick_reply]', $radio_ary, $value) .
|
||||
'<br /><br /><input class="button2" type="submit" id="' . $key . '_enable" name="' . $key . '_enable" value="' . $user->lang['ALLOW_QUICK_REPLY_BUTTON'] . '" />';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Select default dateformat
|
||||
*/
|
||||
|
Reference in New Issue
Block a user