phpBB

Code Changes

File: includes/acp/acp_attachments.php

  Unmodified   Added   Modified   Removed
Line 26Line 26

/** @var \phpbb\config\config */
protected $config;


/** @var \phpbb\config\config */
protected $config;

 

/** @var \phpbb\language\language */
protected $language;


/** @var ContainerBuilder */
protected $phpbb_container;


/** @var ContainerBuilder */
protected $phpbb_container;

Line 54Line 57
		$this->id = $id;
$this->db = $db;
$this->config = $config;

		$this->id = $id;
$this->db = $db;
$this->config = $config;

 
		$this->language = $phpbb_container->get('language');

		$this->template = $template;
$this->user = $user;
$this->phpbb_container = $phpbb_container;

		$this->template = $template;
$this->user = $user;
$this->phpbb_container = $phpbb_container;

Line 128Line 132
				$s_assigned_groups = array();
while ($row = $db->sql_fetchrow($result))
{

				$s_assigned_groups = array();
while ($row = $db->sql_fetchrow($result))
{

					$row['group_name'] = (isset($user->lang['EXT_GROUP_' . $row['group_name']])) ? $user->lang['EXT_GROUP_' . $row['group_name']] : $row['group_name'];

					$row['group_name'] = $this->language->is_set('EXT_GROUP_' . utf8_strtoupper($row['group_name'])) ? $this->language->lang('EXT_GROUP_' . utf8_strtoupper($row['group_name'])) : $row['group_name'];

					$s_assigned_groups[$row['cat_id']][] = $row['group_name'];
}
$db->sql_freeresult($result);

					$s_assigned_groups[$row['cat_id']][] = $row['group_name'];
}
$db->sql_freeresult($result);

Line 573Line 577
							$group_id = $db->sql_nextid();
}


							$group_id = $db->sql_nextid();
}


						$group_name = (isset($user->lang['EXT_GROUP_' . $group_name])) ? $user->lang['EXT_GROUP_' . $group_name] : $group_name;

						$group_name = $this->language->is_set('EXT_GROUP_' . utf8_strtoupper($group_name)) ? $this->language->lang('EXT_GROUP_' . utf8_strtoupper($group_name)) : $group_name;

						$phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_ATTACH_EXTGROUP_' . strtoupper($action), false, array($group_name));
}


						$phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_ATTACH_EXTGROUP_' . strtoupper($action), false, array($group_name));
}


Line 875Line 879
						'U_EDIT'		=> $this->u_action . "&action=edit&g={$row['group_id']}",
'U_DELETE' => $this->u_action . "&action=delete&g={$row['group_id']}",


						'U_EDIT'		=> $this->u_action . "&action=edit&g={$row['group_id']}",
'U_DELETE' => $this->u_action . "&action=delete&g={$row['group_id']}",


						'GROUP_NAME'	=> (isset($user->lang['EXT_GROUP_' . $row['group_name']])) ? $user->lang['EXT_GROUP_' . $row['group_name']] : $row['group_name'],

						'GROUP_NAME'	=> $this->language->is_set('EXT_GROUP_' . utf8_strtoupper($row['group_name'])) ? $this->language->lang('EXT_GROUP_' . utf8_strtoupper($row['group_name'])) : $row['group_name'],

						'CATEGORY'		=> $cat_lang[$row['cat_id']],
)
);

						'CATEGORY'		=> $cat_lang[$row['cat_id']],
)
);

Line 1244Line 1248
						'ATTACHMENT_POSTER'	=> get_username_string('full', (int) $row['poster_id'], (string) $row['username'], (string) $row['user_colour'], (string) $row['username']),
'FILESIZE' => get_formatted_filesize((int) $row['filesize']),
'FILETIME' => $user->format_date((int) $row['filetime']),

						'ATTACHMENT_POSTER'	=> get_username_string('full', (int) $row['poster_id'], (string) $row['username'], (string) $row['user_colour'], (string) $row['username']),
'FILESIZE' => get_formatted_filesize((int) $row['filesize']),
'FILETIME' => $user->format_date((int) $row['filetime']),

						'REAL_FILENAME'		=> (!$row['in_message']) ? utf8_basename((string) $row['real_filename']) : '',
'PHYSICAL_FILENAME' => utf8_basename((string) $row['physical_filename']),
'EXT_GROUP_NAME' => (!empty($extensions[$row['extension']]['group_name'])) ? $user->lang['EXT_GROUP_' . $extensions[$row['extension']]['group_name']] : '',

						'REAL_FILENAME'		=> utf8_basename((string) $row['real_filename']),
'EXT_GROUP_NAME' => $this->language->is_set('EXT_GROUP_' . utf8_strtoupper($extensions[$row['extension']]['group_name'])) ? $this->language->lang('EXT_GROUP_' . utf8_strtoupper($extensions[$row['extension']]['group_name'])) : $extensions[$row['extension']]['group_name'],


						'COMMENT'			=> $comment,
'TOPIC_TITLE' => (!$row['in_message']) ? (string) $row['topic_title'] : '',
'ATTACH_ID' => (int) $row['attach_id'],

						'COMMENT'			=> $comment,
'TOPIC_TITLE' => (!$row['in_message']) ? (string) $row['topic_title'] : '',
'ATTACH_ID' => (int) $row['attach_id'],

						'POST_ID'			=> (int) $row['post_msg_id'],
'TOPIC_ID' => (int) $row['topic_id'],
'POST_IDS' => (!empty($post_ids[$row['attach_id']])) ? (int) $post_ids[$row['attach_id']] : '',

 

'L_DOWNLOAD_COUNT' => $user->lang($l_downloaded_viewed, (int) $row['download_count']),



'L_DOWNLOAD_COUNT' => $user->lang($l_downloaded_viewed, (int) $row['download_count']),


Line 1434Line 1434
		$group_name = array();
while ($row = $db->sql_fetchrow($result))
{

		$group_name = array();
while ($row = $db->sql_fetchrow($result))
{

			$row['group_name'] = (isset($user->lang['EXT_GROUP_' . $row['group_name']])) ? $user->lang['EXT_GROUP_' . $row['group_name']] : $row['group_name'];

			$row['group_name'] = $this->language->is_set('EXT_GROUP_' . utf8_strtoupper($row['group_name'])) ? $this->language->lang('EXT_GROUP_' . utf8_strtoupper($row['group_name'])) : $row['group_name'];

			$group_name[] = $row;
}
$db->sql_freeresult($result);

			$group_name[] = $row;
}
$db->sql_freeresult($result);