aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
authorNils Adermann <naderman@naderman.de>2006-06-09 19:20:51 +0000
committerNils Adermann <naderman@naderman.de>2006-06-09 19:20:51 +0000
commit753994810a19422d7145fcd615754dcb558bc52a (patch)
tree89515a32fd02cc5ba493df5c374060fefc72b40e /phpBB/includes
parentadc6d2a0c1d7b63caf07184a5e28580db1e1780f (diff)
downloadforums-753994810a19422d7145fcd615754dcb558bc52a.tar
forums-753994810a19422d7145fcd615754dcb558bc52a.tar.gz
forums-753994810a19422d7145fcd615754dcb558bc52a.tar.bz2
forums-753994810a19422d7145fcd615754dcb558bc52a.tar.xz
forums-753994810a19422d7145fcd615754dcb558bc52a.zip
- 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
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/acp/acp_permissions.php4
-rw-r--r--phpBB/includes/acp/acp_styles.php12
-rw-r--r--phpBB/includes/mcp/info/mcp_queue.php2
-rw-r--r--phpBB/includes/mcp/info/mcp_reports.php2
-rw-r--r--phpBB/includes/message_parser.php4
5 files changed, 11 insertions, 13 deletions
diff --git a/phpBB/includes/acp/acp_permissions.php b/phpBB/includes/acp/acp_permissions.php
index bb7c3e4267..758959f241 100644
--- a/phpBB/includes/acp/acp_permissions.php
+++ b/phpBB/includes/acp/acp_permissions.php
@@ -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,
diff --git a/phpBB/includes/acp/acp_styles.php b/phpBB/includes/acp/acp_styles.php
index 6b57442cfe..08b8126c36 100644
--- a/phpBB/includes/acp/acp_styles.php
+++ b/phpBB/includes/acp/acp_styles.php
@@ -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>', '', '', '&#91;', '&#93;', '&#46;', '&#58;');
+ $str_from = array('<span style="color: ', '<font color="syntax', '</font>', '<code>', '</code>','[', ']', '.', ':');
+ $str_to = array('<span class="', '<span class="syntax', '</span>', '', '', '&#91;', '&#93;', '&#46;', '&#58;');
$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 . "&amp;action=edit&amp;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) : '') : '',
diff --git a/phpBB/includes/mcp/info/mcp_queue.php b/phpBB/includes/mcp/info/mcp_queue.php
index ee0b20fecd..ee8b48f1aa 100644
--- a/phpBB/includes/mcp/info/mcp_queue.php
+++ b/phpBB/includes/mcp/info/mcp_queue.php
@@ -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')),
),
);
}
diff --git a/phpBB/includes/mcp/info/mcp_reports.php b/phpBB/includes/mcp/info/mcp_reports.php
index 8587094727..56987c18e9 100644
--- a/phpBB/includes/mcp/info/mcp_reports.php
+++ b/phpBB/includes/mcp/info/mcp_reports.php
@@ -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')),
),
);
}
diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php
index e16f930cce..11b4bb5ccb 100644
--- a/phpBB/includes/message_parser.php
+++ b/phpBB/includes/message_parser.php
@@ -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>', '', '', '&#91;', '&#93;', '&#46;', '&#58;');
+ $str_from = array('<span style="color: ', '<font color="syntax', '</font>', '<code>', '</code>','[', ']', '.', ':');
+ $str_to = array('<span class="', '<span class="syntax', '</span>', '', '', '&#91;', '&#93;', '&#46;', '&#58;');
if ($remove_tags)
{