From 91811b8289f733032e00f022a7a39a673ebb73c8 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Sat, 6 Mar 2004 12:28:40 +0000 Subject: [PATCH] changed extension group administration (more user friendly) git-svn-id: file:///svn/phpbb/trunk@4858 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/adm/admin_attachments.php | 774 +++++++++++++--------- phpBB/language/en/admin.php | 32 +- phpBB/language/en/common.php | 2 +- phpBB/styles/subSilver/template/editor.js | 1 + 4 files changed, 485 insertions(+), 324 deletions(-) diff --git a/phpBB/adm/admin_attachments.php b/phpBB/adm/admin_attachments.php index 391f24e16a..420e91434f 100644 --- a/phpBB/adm/admin_attachments.php +++ b/phpBB/adm/admin_attachments.php @@ -244,141 +244,116 @@ if ($submit && $mode == 'extensions') } } + if ($submit && $mode == 'ext_groups') { - // Change Extension Groups ? - $group_change_list = (isset($_POST['group_change_list'])) ? array_map('intval', $_POST['group_change_list']) : array(); - $extension_group_list = request_var('extension_group_list', ''); - $group_allowed_list = (isset($_POST['allowed_list'])) ? array_flip(array_map('intval', $_POST['allowed_list'])) : array(); - $download_mode_list = (isset($_POST['download_mode_list'])) ? array_map('intval', $_POST['download_mode_list']) : array(); - $category_list = (isset($_POST['category_list'])) ? array_map('intval', $_POST['category_list']) : array(); - $upload_icon_list = request_var('upload_icon_list', ''); - $filesize_list = (isset($_POST['max_filesize_list'])) ? array_map('intval', $_POST['max_filesize_list']) : array(); - $size_select_list = request_var('size_select_list', 'b'); - - foreach ($group_change_list as $group_id => $var) + $action = request_var('action', ''); + $group_id = request_var('g', 0); + + if ($action != 'add' && $action != 'edit') { - $filesize_list[$group_id] = ($size_select_list[$group_id] == 'kb') ? round($filesize_list[$group_id] * 1024) : (($size_select_list[$group_id] == 'mb') ? round($filesize_list[$group_id] * 1048576) : $filesize_list[$group_id]); + trigger_error('WRONG_MODE'); + } - $group_sql = array( - 'group_name' => $extension_group_list[$group_id], - 'cat_id' => $category_list[$group_id], - 'allow_group' => (isset($group_allowed_list[$group_id])) ? 1 : 0, - 'download_mode' => $download_mode_list[$group_id], - 'upload_icon' => ($upload_icon_list[$group_id] == 'no_image') ? '' : $upload_icon_list[$group_id], - 'max_filesize' => $filesize_list[$group_id] - ); - - $sql = 'UPDATE ' . EXTENSION_GROUPS_TABLE . ' - SET ' . $db->sql_build_array('UPDATE', $group_sql) . " + if (!$group_id && $action == 'edit') + { + trigger_error('NO_EXT_GROUP_SPECIFIED'); + } + + if ($group_id) + { + $sql = 'SELECT * FROM ' . EXTENSION_GROUPS_TABLE . " WHERE group_id = $group_id"; - $db->sql_query($sql); - } - - // Delete Extension Groups - $group_delete_list = (isset($_POST['group_delete_list'])) ? array_keys(array_map('intval', $_POST['group_delete_list'])) : array(); - - if (sizeof($group_delete_list)) - { - $sql = 'SELECT group_name - FROM ' . EXTENSION_GROUPS_TABLE . ' - WHERE group_id IN (' . implode(', ', $group_delete_list) . ')'; $result = $db->sql_query($sql); - - $l_group_list = array(); - while ($row = $db->sql_fetchrow($result)) - { - $l_group_list[] = $row['group_name']; - } + $ext_row = $db->sql_fetchrow($result); $db->sql_freeresult($result); - - $sql = 'DELETE - FROM ' . EXTENSION_GROUPS_TABLE . ' - WHERE group_id IN (' . implode(', ', $group_delete_list) . ')'; - $db->sql_query($sql); - - // Set corresponding Extensions to a pending Group - $sql ='"UPDATE ' . EXTENSIONS_TABLE . ' - SET group_id = 0 - WHERE group_id IN (' . implode(', ', $group_delete_list) . ')'; - $db->sql_query($sql); - - add_log('admin', 'LOG_ATTACH_EXTGROUP_DEL', implode(', ', $l_group_list)); } - - // Add Extensions Group ? - $extension_group = request_var('add_extension_group', ''); - $download_mode = request_var('add_download_mode', INLINE_LINK); - $cat_id = request_var('add_category', 0); - $upload_icon = request_var('add_upload_icon', ''); - $filesize = request_var('add_max_filesize', 0); - $size_select = request_var('add_size_select', 'b'); - $is_allowed = (isset($_POST['add_allowed'])) ? true : false; - $add = (isset($_POST['add_extension_group_check'])) ? true : false; - - if ($extension_group != '' && $add) + else { - // check Extension Group - $sql = 'SELECT group_name + $ext_row = array(); + } + + $group_name = request_var('group_name', ''); + $new_group_name = ($action == 'add') ? $group_name : (($ext_row['group_name'] != $group_name) ? $group_name : ''); + + if (!$group_name) + { + $error[] = $user->lang['NO_EXT_GROUP_NAME']; + } + + // Check New Group Name + if ($new_group_name) + { + $sql = 'SELECT group_id FROM ' . EXTENSION_GROUPS_TABLE . " - WHERE group_name = '" . $db->sql_escape($extension_group) . "'"; - $result = $db->sql_query_limit($sql, 1); - - if ($row = $db->sql_fetchrow($result)) + WHERE LOWER(group_name) = '" . strtolower($new_group_name) . "'"; + $result = $db->sql_query($sql); + if ($db->sql_fetchrow($result)) { - if ($row['group_name'] == $extension_group) - { - $error[] = sprintf($user->lang['EXTENSION_GROUP_EXIST'], $extension_group); - } + $error[] = sprintf($user->lang['EXTENSION_GROUP_EXIST'], $new_group_name); } $db->sql_freeresult($result); - - if (!sizeof($error)) - { - $filesize = ($size_select == 'kb') ? round($filesize * 1024) : (($size_select == 'mb') ? round($filesize * 1048576) : $filesize); - - $group_sql = array( - 'group_name' => $extension_group, - 'cat_id' => $cat_id, - 'allow_group' => $is_allowed, - 'download_mode' => $download_mode, - 'upload_icon' => ($upload_icon == 'no_image') ? '' : $upload_icon, - 'max_filesize' => $filesize - ); - - $sql = 'INSERT INTO ' . EXTENSION_GROUPS_TABLE . ' ' . - $db->sql_build_array('INSERT', $group_sql); - $db->sql_query($sql); - - add_log('admin', 'LOG_ATTACH_EXTGROUP_ADD', $extension_group); - } } - $sql = 'SELECT e.extension, g.* - FROM ' . EXTENSIONS_TABLE . ' e, ' . EXTENSION_GROUPS_TABLE . ' g - WHERE e.group_id = g.group_id - AND g.allow_group = 1'; - $result = $db->sql_query($sql); - - $extensions = array(); - while ($row = $db->sql_fetchrow($result)) - { - $extension = $row['extension']; - - $extensions['_allowed_'][] = $extension; - $extensions[$extension]['display_cat'] = (int) $row['cat_id']; - $extensions[$extension]['download_mode']= (int) $row['download_mode']; - $extensions[$extension]['upload_icon'] = (string) $row['upload_icon']; - $extensions[$extension]['max_filesize'] = (int) $row['max_filesize']; - } - $db->sql_freeresult($result); - - $cache->destroy('extensions'); - $cache->put('extensions', $extensions); - if (!sizeof($error)) { - $notify[] = $user->lang['EXTENSION_GROUPS_UPDATED']; + // Ok, build the update/insert array + $upload_icon = request_var('upload_icon', 'no_image'); + $size_select = request_var('size_select', 'b'); + $max_filesize = request_var('max_filesize', 0); + $max_filesize = ($size_select == 'kb') ? round($max_filesize * 1024) : (($size_select == 'mb') ? round($max_filesize * 1048576) : $max_filesize); + + if ($max_filesize == $config['max_filesize']) + { + $max_filesize = 0; + } + + $group_ary = array( + 'group_name' => $group_name, + 'cat_id' => request_var('special_category', NONE_CAT), + 'allow_group' => (isset($_REQUEST['allow_group'])) ? 1 : 0, + 'download_mode' => request_var('download_mode', INLINE_LINK), + 'upload_icon' => ($upload_icon == 'no_image') ? '' : $upload_icon, + 'max_filesize' => $max_filesize + ); + + $sql = ($action == 'add') ? 'INSERT INTO ' . EXTENSION_GROUPS_TABLE . ' ' : 'UPDATE ' . EXTENSION_GROUPS_TABLE . ' SET '; + $sql .= $db->sql_build_array((($action == 'add') ? 'INSERT' : 'UPDATE'), $group_ary); + $sql .= ($action == 'edit') ? " WHERE group_id = $group_id" : ''; + + $db->sql_query($sql); + + if ($action == 'add') + { + $group_id = $db->sql_nextid(); + } + + add_log('admin', 'LOG_ATTACH_EXTGROUP_' . strtoupper($action), $group_name); + } + + $extension_list = isset($_REQUEST['extensions']) ? array_map('intval', array_values($_REQUEST['extensions'])) : array(); + + if ($action == 'edit' && sizeof($extension_list)) + { + $sql = 'UPDATE ' . EXTENSIONS_TABLE . " + SET group_id = 0 + WHERE group_id = $group_id"; + $db->sql_query($sql); + } + + if (sizeof($extension_list)) + { + $sql = 'UPDATE ' . EXTENSIONS_TABLE . " + SET group_id = $group_id + WHERE extension_id IN (" . implode(', ', $extension_list) . ")"; + $db->sql_query($sql); + } + + rewrite_extensions(); + + if (!sizeof($error)) + { + $notify[] = $user->lang['SUCCESS_EXTENSION_GROUP_' . strtoupper($action)]; } } @@ -645,28 +620,40 @@ if ($mode == 'attach') sql_query($sql); + $sql = 'SELECT * + FROM ' . SITELIST_TABLE; + $result = $db->sql_query($sql); - $defined_ips = ''; - $ips = array(); + $defined_ips = ''; + $ips = array(); - while ($row = $db->sql_fetchrow($result)) + while ($row = $db->sql_fetchrow($result)) + { + $value = ($row['site_ip']) ? $row['site_ip'] : $row['site_hostname']; + if ($value) { - $value = ($row['site_ip']) ? $row['site_ip'] : $row['site_hostname']; - if ($value) - { - $defined_ips .= '' . $value . ''; - $ips[$row['site_id']] = $value; - } + $defined_ips .= '' . $value . ''; + $ips[$row['site_id']] = $value; } - $db->sql_freeresult($result); + } + $db->sql_freeresult($result); + + if (!$new['secure_downloads']) + { ?> +
+ + + + +
lang['SECURE_DOWNLOAD_NOTICE']; ?>
+ + +
@@ -690,8 +677,8 @@ if ($mode == 'attach') @@ -706,16 +693,15 @@ if ($mode == 'attach')
lang['NO_IPS_DEFINED']; ?>
@@ -725,197 +711,337 @@ if ($mode == 'attach') // Extension Groups if ($mode == 'ext_groups') { - $img_path = $config['upload_icons_path']; + $cat_lang = array( + NONE_CAT => $user->lang['NONE'], + IMAGE_CAT => $user->lang['CAT_IMAGES'], + WM_CAT => $user->lang['CAT_WM_FILES'], + RM_CAT => $user->lang['CAT_RM_FILES'] + ); - $imglist = filelist($phpbb_root_path . $img_path); - $imglist = array_values($imglist); - $imglist = $imglist[0]; - $filename_list = ''; - foreach ($imglist as $key => $img) + $action = request_var('action', 'show'); + $group_id = request_var('g', 0); + $action = (isset($_REQUEST['add'])) ? 'add' : $action; + $action = (($action == 'add' || $action == 'edit') && $submit && !sizeof($error)) ? 'show' : $action; + + if (isset($_REQUEST['select_mode'])) { - $filename_list .= ''; - } - - $size = request_var('size', 0); - - if (!$size && !$submit) - { - $max_add_filesize = intval($config['max_filesize']); - $size = ($max_add_filesize >= 1048576) ? 'mb' : (($max_add_filesize >= 1024) ? 'kb' : 'b'); + $action = 'show'; } - $max_add_filesize = ($max_add_filesize >= 1048576) ? round($max_add_filesize / 1048576 * 100) / 100 : (($max_add_filesize >= 1024) ? round($max_add_filesize / 1024 * 100) / 100 : $max_add_filesize); + if ($action == 'delete') + { + $confirm = (isset($_POST['confirm'])) ? true : false; + $cancel = (isset($_POST['cancel'])) ? true : false; + + if (!$cancel && !$confirm) + { + adm_page_confirm($user->lang['CONFIRM'], $user->lang['CONFIRM_OPERATION']); + } + else if ($confirm && !$cancel) + { + $sql = 'SELECT group_name + FROM ' . EXTENSION_GROUPS_TABLE . " + WHERE group_id = $group_id"; + $result = $db->sql_query($sql); + $group_name = $db->sql_fetchfield('group_name', 0, $result); + + $sql = 'DELETE + FROM ' . EXTENSION_GROUPS_TABLE . " + WHERE group_id = $group_id"; + $db->sql_query($sql); - $viewgroup = request_var('g', 0); + // Set corresponding Extensions to a pending Group + $sql = 'UPDATE ' . EXTENSIONS_TABLE . " + SET group_id = 0 + WHERE group_id = $group_id"; + $db->sql_query($sql); + + add_log('admin', 'LOG_ATTACH_EXTGROUP_DEL', $group_name); + + rewrite_extensions(); + + trigger_error('EXTENSION_GROUP_DELETED'); + } + else + { + $action = 'show'; + } + } + + switch ($action) + { + case 'edit': + + if (!$group_id) + { + trigger_error('NO_EXTENSION_GROUP'); + } + + $sql = 'SELECT * FROM ' . EXTENSION_GROUPS_TABLE . " + WHERE group_id = $group_id"; + $result = $db->sql_query($sql); + extract($db->sql_fetchrow($result)); + $db->sql_freeresult($result); + + case 'add': + + if ($action == 'add') + { + $group_name = request_var('group_name', ''); + $cat_id = 0; + $allow_group = 1; + $download_mode = 1; + $upload_icon = ''; + $max_filesize = 0; + } + + $extensions = array(); + + $sql = 'SELECT * FROM ' . EXTENSIONS_TABLE . " + WHERE group_id = $group_id OR group_id = 0 + ORDER BY extension"; + $result = $db->sql_query($sql); + $extensions = $db->sql_fetchrowset($result); + $db->sql_freeresult($result); + + $img_path = $config['upload_icons_path']; + + $imglist = filelist($phpbb_root_path . $img_path); + $imglist = array_values($imglist); + $imglist = $imglist[0]; + + $filename_list = ''; + foreach ($imglist as $key => $img) + { + $filename_list .= ''; + } + + if ($max_filesize == 0) + { + $max_filesize = (int) $config['max_filesize']; + } + + $size_format = ($max_filesize >= 1048576) ? 'mb' : (($max_filesize >= 1024) ? 'kb' : 'b'); + + $max_filesize = ($max_filesize >= 1048576) ? round($max_filesize / 1048576 * 100) / 100 : (($max_filesize >= 1024) ? round($max_filesize / 1024 * 100) / 100 : $max_filesize); + + $s_allowed = ($allow_group == 1) ? 'checked="checked"' : ''; + + $filename_list = ''; + $no_image_select = false; + foreach ($imglist as $key => $img) + { + if (!$upload_icon) + { + $no_image_select = true; + $selected = ''; + } + else + { + $selected = ($upload_icon == $img) ? ' selected="selected"' : ''; + } + + $filename_list .= ''; + } + + // Show Edit Screen ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
lang[strtoupper($action) . '_EXTENSION_GROUP']; ?>
lang['GROUP_NAME']; ?>:
lang['SPECIAL_CATEGORY']; ?>:
lang['ALLOWED']; ?>: />
lang['DOWNLOAD_MODE']; ?>:
lang['UPLOAD_ICON']; ?>: + + + + + +
  
+
lang['MAX_EXTGROUP_FILESIZE']; ?>:
+ +
lang['ASSIGNED_EXTENSIONS']; ?>:
»  
  $row) + { + if ($row['group_id'] == $group_id && $group_id) + { + echo ($i) ? ', ' . $row['extension'] : $row['extension']; + $i++; + } + } + ?>
+
  
+ - - + rewrite_extensions(); - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -sql_query($sql); +?> + +
 lang['EXTENSION_GROUP']; ?>  lang['SPECIAL_CATEGORY']; ?>  lang['ALLOWED']; ?>  lang['DOWNLOAD_MODE']; ?>  lang['UPLOAD_ICON']; ?>  lang['MAX_EXTGROUP_FILESIZE']; ?>  lang['ADD']; ?> 
- - - - - -
 
-
- - - - - -
  
-
 lang['EXTENSION_GROUP']; ?>  lang['SPECIAL_CATEGORY']; ?>  lang['ALLOWED']; ?>  lang['DOWNLOAD_MODE']; ?>  lang['UPLOAD_ICON']; ?>  lang['MAX_EXTGROUP_FILESIZE']; ?>  lang['DELETE']; ?> 
+ + + + + + +sql_fetchrow($result)) { - // Format the filesize - if ($row['max_filesize'] == 0) + $row_class = ($row_class == 'row1') ? 'row2' : 'row1'; + + if ($row['allow_group'] == 0 && $act_deact == 'deactivate') { - $row['max_filesize'] = (int) $config['max_filesize']; - } - - $size_format = ($row['max_filesize'] >= 1048576) ? 'mb' : (($row['max_filesize'] >= 1024) ? 'kb' : 'b'); - - $row['max_filesize'] = ($row['max_filesize'] >= 1048576) ? round($row['max_filesize'] / 1048576 * 100) / 100 : (($row['max_filesize'] >= 1024) ? round($row['max_filesize'] / 1024 * 100) / 100 : $row['max_filesize']); - - $s_allowed = ($row['allow_group'] == 1) ? 'checked="checked"' : ''; - $edit_img = ($row['upload_icon'] != '') ? $row['upload_icon'] : ''; - - $filename_list = ''; - $no_image_select = false; - foreach ($imglist as $key => $img) - { - if ($edit_img == '') - { - $no_image_select = true; - $selected = ''; - } - else - { - $selected = ($edit_img == $img) ? ' selected="selected"' : ''; - } - - $filename_list .= ''; - } ?> - - - - - - - - - - + + + + + sql_query($sql); - - $assigned_extensions = array(); - while ($e_row = $db->sql_fetchrow($e_result)) - { - $assigned_extensions[] = strtoupper($e_row['extension']); - } - $db->sql_freeresult($e_result); - -?> - - - - + - + + + + + + +sql_freeresult($result); + +?> +
lang['EXTENSION_GROUP']; ?>lang['SPECIAL_CATEGORY']; ?>lang['OPTIONS']; ?>
- - - - - -
" class="gen">
-
/> - - - - - -
  
-
 lang['ASSIGNED_EXTENSIONS'] . ' » ' . ((sizeof($assigned_extensions)) ? implode(', ', $assigned_extensions) : $user->lang['NONE']); ?>
  ">">lang[strtoupper($act_deact)]; ?>">lang['EDIT']; ?>">lang['DELETE']; ?>
lang['CREATE_GROUP']; ?>:
-sql_query($sql); if ($row = $db->sql_fetchrow($result)) @@ -1161,7 +1287,7 @@ function group_select($select_name, $default_group = '-1') } // Build select for download modes -function download_select($select_name, $group_id = FALSE) +function download_select($select_name, $group_id = false) { global $db, $user; @@ -1470,7 +1596,7 @@ function perform_site_list() add_log('admin', $log_entry, $ip_list_log); } - trigger_error($user->lang['SECURE_DOWNLOAD_UPDATE_SUCESSFUL']); + trigger_error($user->lang['SECURE_DOWNLOAD_UPDATE_SUCCESS']); } else if (isset($_POST['unsecuresubmit'])) { @@ -1498,8 +1624,36 @@ function perform_site_list() add_log('admin', 'LOG_DOWNLOAD_REMOVE_IP', $l_unip_list); } - trigger_error($user->lang['SECURE_DOWNLOAD_UPDATE_SUCESSFUL']); + trigger_error($user->lang['SECURE_DOWNLOAD_UPDATE_SUCCESS']); } } +// Re-Write extensions cache file +function rewrite_extensions() +{ + global $db, $cache; + + $sql = 'SELECT e.extension, g.* + FROM ' . EXTENSIONS_TABLE . ' e, ' . EXTENSION_GROUPS_TABLE . ' g + WHERE e.group_id = g.group_id + AND g.allow_group = 1'; + $result = $db->sql_query($sql); + + $extensions = array(); + while ($row = $db->sql_fetchrow($result)) + { + $extension = $row['extension']; + + $extensions['_allowed_'][] = $extension; + $extensions[$extension]['display_cat'] = (int) $row['cat_id']; + $extensions[$extension]['download_mode']= (int) $row['download_mode']; + $extensions[$extension]['upload_icon'] = (string) $row['upload_icon']; + $extensions[$extension]['max_filesize'] = (int) $row['max_filesize']; + } + $db->sql_freeresult($result); + + $cache->destroy('extensions'); + $cache->put('extensions', $extensions); +} + ?> \ No newline at end of file diff --git a/phpBB/language/en/admin.php b/phpBB/language/en/admin.php index e7ffe62c9b..04da22fe58 100644 --- a/phpBB/language/en/admin.php +++ b/phpBB/language/en/admin.php @@ -167,7 +167,8 @@ $lang += array( 'LOG_ATTACH_EXT_ADD' => 'Added or edited attachment extension
» %s', 'LOG_ATTACH_EXT_DEL' => 'Removed attachment extension
» %s', 'LOG_ATTACH_EXT_UPDATE' => 'Updated attachment extension
» %s', - 'LOG_ATTACH_EXTGROUP_ADD' => 'Added or edited extension group
» %s', + 'LOG_ATTACH_EXTGROUP_ADD' => 'Added extension group
» %s', + 'LOG_ATTACH_EXTGROUP_EDIT' => 'Edited extension group
» %s', 'LOG_ATTACH_EXTGROUP_DEL' => 'Removed extension group
» %s', 'LOG_ATTACH_FILEUPLOAD' => 'Orphan File uploaded to Post Number %1$d - %2$s', 'LOG_ATTACH_ORPHAN_DEL' => 'Orphan Files deleted
» %s', @@ -1704,7 +1705,7 @@ $lang += array( 'UPLOAD_DIR' => 'Upload Directory', 'UPLOAD_DIR_EXPLAIN' => 'Storage Path for Attachments.', 'DISPLAY_ORDER' => 'Attachment Display Order', - 'DISPLAY_ORDER_EXPLAIN' => 'Display attachments ordering by time.', + 'DISPLAY_ORDER_EXPLAIN' => 'Display attachments ordered by time.', 'ATTACH_MAX_FILESIZE' => 'Maximum filesize', 'ATTACH_MAX_FILESIZE_EXPLAIN' => 'Maximum size of each file, 0 is unlimited.', 'ATTACH_QUOTA' => 'Total attachment quota', @@ -1741,14 +1742,21 @@ $lang += array( 'EXTENSION_GROUPS_TITLE' => 'Manage Extension Groups', 'EXTENSION_GROUPS_TITLE_EXPLAIN' => 'Here you can add, delete and modify your Extension Groups, you can disable Extension Groups, assign a special Category to them, change the download mechanism and you can define an Upload Icon which will be displayed in front of an Attachment belonging to the Group.', - 'EXTENSION_GROUPS' => 'Extension groups', - 'EXTENSION_GROUP' => 'Extension group', - 'SPECIAL_CATEGORY' => 'Special category', - 'DOWNLOAD_MODE' => 'Download mode', - 'UPLOAD_ICON' => 'Upload icon', - 'MAX_EXTGROUP_FILESIZE' => 'Maximum filesize', - 'ADD_EXTGROUP' => 'Add extension group', + 'EXTENSION_GROUPS' => 'Extension Groups', + 'EXTENSION_GROUP' => 'Extension Group', + 'SPECIAL_CATEGORY' => 'Special Category', + 'DOWNLOAD_MODE' => 'Download Mode', + 'UPLOAD_ICON' => 'Upload Icon', + 'MAX_EXTGROUP_FILESIZE' => 'Maximum Filesize', 'ASSIGNED_EXTENSIONS' => 'Assigned Extensions', + 'ADD_EXTENSION_GROUP' => 'Add Extension Group', + 'EDIT_EXTENSION_GROUP' => 'Edit Extension Group', + 'NO_EXT_GROUP_SPECIFIED' => 'No Extension Group specified', + 'NO_EXT_GROUP_NAME' => 'No Group Name entered', + 'SUCCESS_EXTENSION_GROUP_ADD' => 'Extension Group successfully added', + 'SUCCESS_EXTENSION_GROUP_EDIT' => 'Extension Group successfully updated', + 'EXTENSION_GROUP_EXIST' => 'The Extension Group %s already exist', + 'EXTENSION_GROUP_DELETED' => 'Extension Group successfully deleted', 'CAT_IMAGES' => 'Images', 'CAT_WM_FILES' => 'Win Media Streams', @@ -1756,8 +1764,6 @@ $lang += array( 'MODE_INLINE' => 'Inline', 'MODE_PHYSICAL' => 'Physical', 'NO_IMAGE' => 'No Image', - 'EXTENSION_GROUPS_UPDATED' => 'Extension Groups updated successfully', - 'EXTENSION_GROUP_EXIST' => 'The Extension Group %s already exist', 'MANAGE_EXTENSIONS' => 'Manage Extensions', 'MANAGE_EXTENSIONS_EXPLAIN' => 'Here you can manage your allowed extensions. To activate your Extensions, please refer to the extension groups management panel. We strongly recommend not to allow scripting extensions (such as php, php3, php4, phtml, pl, cgi, asp, aspx...)', @@ -1795,8 +1801,8 @@ $lang += array( 'DOWNLOAD_REMOVE_IPS_EXPLAIN' => 'You can remove (or un-exclude) multiple IP addresses in one go using the appropriate combination of mouse and keyboard for your computer and browser. Excluded IP\'s have a blue background.', 'EXCLUDE_ENTERED_IP' => 'Enable this to exclude the entered IP/Hostname.', 'NO_IPS_DEFINED' => 'No IPs or Hostnames defined', - - 'SECURE_DOWNLOAD_UPDATE_SUCESSFUL' => 'The IP list has been updated successfully' + 'SECURE_DOWNLOAD_UPDATE_SUCCESS'=> 'The IP list has been updated successfully', + 'SECURE_DOWNLOAD_NOTICE' => 'Secure Downloads are not enabled. The settings below will be applied after enabling secure downloads.' ); // Installation diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php index 80e846200c..349d3a682a 100644 --- a/phpBB/language/en/common.php +++ b/phpBB/language/en/common.php @@ -45,6 +45,7 @@ $lang += array( 'ACP' => 'Administration Control Panel', 'ACTIVE_ERROR' => 'You have specified an inactive username. Please activate your account and try again. If you continue to have problems please contact a board administrator.', + 'ALLOWED' => 'Allowed', 'ALL_POSTS' => 'All Posts', 'ALL_TIMES' => 'All times are %s %s', 'ALL_TOPICS' => 'All Topics', @@ -451,7 +452,6 @@ $lang += array( // Pool of unused or currently not assignable language variables $unused = array( - 'ALLOWED' => 'Allowed', 'ALREADY_VOTED' => 'You have already voted in this poll and may not change your selection.', 'AM' => 'AM', 'AVATAR' => 'Avatar', diff --git a/phpBB/styles/subSilver/template/editor.js b/phpBB/styles/subSilver/template/editor.js index 79f633fa70..2ae7a75ed2 100644 --- a/phpBB/styles/subSilver/template/editor.js +++ b/phpBB/styles/subSilver/template/editor.js @@ -100,6 +100,7 @@ function insert_text(text) { function attach_inline() { insert_text('[attachment=' + document.forms[form_name].elements['attachments'].value + ']' + document.forms[form_name].elements['attachments'].options[document.forms[form_name].elements['attachments'].selectedIndex].text + '[/attachment]'); + document.forms[form_name].elements[text_name].focus(); } function addquote(post_id, username) {