mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 22:28:51 +00:00
- a few adjustments to permissions, specifically with regard to global topics
- forgot to change a line in permission trace [Bug #2100] - syntax highlighting for php5 - [Bug #2093] git-svn-id: file:///svn/phpbb/trunk@6028 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
adc6d2a0c1
commit
753994810a
6 changed files with 12 additions and 14 deletions
|
@ -917,7 +917,7 @@ class acp_permissions
|
|||
|
||||
if ($user_id != $user->data['user_id'])
|
||||
{
|
||||
$sql = 'SELECT user_id, user_permissions, user_type
|
||||
$sql = 'SELECT user_id, username, user_permissions, user_type
|
||||
FROM ' . USERS_TABLE . '
|
||||
WHERE user_id = ' . $user_id;
|
||||
$result = $db->sql_query($sql);
|
||||
|
@ -1100,7 +1100,7 @@ class acp_permissions
|
|||
if ($userdata['user_type'] == USER_FOUNDER && strpos($permission, 'a_') === 0)
|
||||
{
|
||||
$template->assign_block_vars('trace', array(
|
||||
'WHO' => $user_row['username'],
|
||||
'WHO' => $userdata['username'],
|
||||
'INFORMATION' => $user->lang['TRACE_USER_FOUNDER'],
|
||||
|
||||
'S_SETTING_UNSET' => ($auth_setting == ACL_UNSET) ? true : false,
|
||||
|
|
|
@ -740,8 +740,8 @@ pagination_sep = \'{PAGINATION_SEP}\'
|
|||
$code = highlight_string(str_replace("\n", $marker, $code), true);
|
||||
$code = str_replace($marker, "\n", $code);
|
||||
|
||||
$str_from = array('<font color="syntax', '</font>', '<code>', '</code>','[', ']', '.', ':');
|
||||
$str_to = array('<span class="syntax', '</span>', '', '', '[', ']', '.', ':');
|
||||
$str_from = array('<span style="color: ', '<font color="syntax', '</font>', '<code>', '</code>','[', ']', '.', ':');
|
||||
$str_to = array('<span class="', '<span class="syntax', '</span>', '', '', '[', ']', '.', ':');
|
||||
|
||||
$code = str_replace($str_from, $str_to, $code);
|
||||
$code = preg_replace('#^(<span class="[a-z_]+">)\n?(.*?)\n?(</span>)$#is', '$1$2$3', $code);
|
||||
|
@ -1383,6 +1383,8 @@ pagination_sep = \'{PAGINATION_SEP}\'
|
|||
|
||||
$imgsize_bool = (!empty($imgname) && ($imgsize || preg_match('#\*\d+#', $$imgname))) ? true : false;
|
||||
|
||||
$img_info = explode('*', $$imgname);
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_EDIT_IMAGESET' => true,
|
||||
'L_TITLE' => $user->lang[$this->page_title],
|
||||
|
@ -1390,7 +1392,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
|
|||
'IMAGE_OPTIONS' => $img_options,
|
||||
'IMAGELIST_OPTIONS' => $imagesetlist_options,
|
||||
'IMAGE_SIZE' => $imgsize_bool,
|
||||
'IMAGE_REQUEST' => (!empty($imgname)) ? '../styles/' . $imageset_path . '/imageset/' . str_replace('{LANG}', $imglang, current(explode('*', $$imgname))) : '',
|
||||
'IMAGE_REQUEST' => (!empty($imgname)) ? '../styles/' . $imageset_path . '/imageset/' . str_replace('{LANG}', $imglang, $img_info[0]) : '',
|
||||
'U_ACTION' => $this->u_action . "&action=edit&id=$imageset_id",
|
||||
'U_BACK' => $this->u_action,
|
||||
'NAME' => $imageset_name,
|
||||
|
@ -2886,8 +2888,6 @@ pagination_sep = \'{PAGINATION_SEP}\'
|
|||
switch ($mode)
|
||||
{
|
||||
case 'template':
|
||||
$store_db = (!is_writeable("{$phpbb_root_path}styles/$path/template")) ? 1 : $store_db;
|
||||
|
||||
// We set a pre-defined bitfield here which we may use further in 3.2
|
||||
$sql_ary += array(
|
||||
'bbcode_bitfield' => TEMPLATE_BITFIELD,
|
||||
|
@ -2896,8 +2896,6 @@ pagination_sep = \'{PAGINATION_SEP}\'
|
|||
break;
|
||||
|
||||
case 'theme':
|
||||
$store_db = (!is_writeable("{$phpbb_root_path}styles/$path/theme/stylesheet.css")) ? 1 : $store_db;
|
||||
|
||||
$sql_ary += array(
|
||||
'theme_storedb' => $store_db,
|
||||
'theme_data' => ($store_db) ? (($root_path) ? $this->db_theme_data($sql_ary, false, $root_path) : '') : '',
|
||||
|
|
|
@ -22,7 +22,7 @@ class mcp_queue_info
|
|||
'modes' => array(
|
||||
'unapproved_topics' => array('title' => 'MCP_QUEUE_UNAPPROVED_TOPICS', 'auth' => 'aclf_m_approve', 'cat' => array('MCP_QUEUE')),
|
||||
'unapproved_posts' => array('title' => 'MCP_QUEUE_UNAPPROVED_POSTS', 'auth' => 'aclf_m_approve', 'cat' => array('MCP_QUEUE')),
|
||||
'approve_details' => array('title' => 'MCP_QUEUE_APPROVE_DETAILS', 'auth' => 'aclf_m_approve', 'cat' => array('MCP_QUEUE')),
|
||||
'approve_details' => array('title' => 'MCP_QUEUE_APPROVE_DETAILS', 'auth' => 'acl_m_approve,$id || (!$id && aclf_m_approve)', 'cat' => array('MCP_QUEUE')),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ class mcp_reports_info
|
|||
'modes' => array(
|
||||
'reports' => array('title' => 'MCP_REPORTS_OPEN', 'auth' => 'aclf_m_report', 'cat' => array('MCP_REPORTS')),
|
||||
'reports_closed' => array('title' => 'MCP_REPORTS_CLOSED', 'auth' => 'aclf_m_report', 'cat' => array('MCP_REPORTS')),
|
||||
'report_details' => array('title' => 'MCP_REPORT_DETAILS', 'auth' => 'aclf_m_report', 'cat' => array('MCP_REPORTS')),
|
||||
'report_details' => array('title' => 'MCP_REPORT_DETAILS', 'auth' => 'acl_m_report,$id || (!$id && aclf_m_report)', 'cat' => array('MCP_REPORTS')),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
@ -354,8 +354,8 @@ class bbcode_firstpass extends bbcode
|
|||
|
||||
$code = highlight_string($code, true);
|
||||
|
||||
$str_from = array('<font color="syntax', '</font>', '<code>', '</code>','[', ']', '.', ':');
|
||||
$str_to = array('<span class="syntax', '</span>', '', '', '[', ']', '.', ':');
|
||||
$str_from = array('<span style="color: ', '<font color="syntax', '</font>', '<code>', '</code>','[', ']', '.', ':');
|
||||
$str_to = array('<span class="', '<span class="syntax', '</span>', '', '', '[', ']', '.', ':');
|
||||
|
||||
if ($remove_tags)
|
||||
{
|
||||
|
|
|
@ -98,7 +98,7 @@ if ($topic_id && !$forum_id)
|
|||
}
|
||||
|
||||
// If the user doesn't have any moderator powers (globally or locally) he can't access the mcp
|
||||
if (!$auth->acl_get('m_') && !$auth->acl_getf_global('m_'))
|
||||
if (!$auth->acl_getf_global('m_'))
|
||||
{
|
||||
// Except he is using one of the quickmod tools for users
|
||||
$user_quickmod_actions = array(
|
||||
|
|
Loading…
Add table
Reference in a new issue