From 0d074672fa8209c85af75ef7d7cdfbaf8e16cbab Mon Sep 17 00:00:00 2001 From: Henry Sudhof Date: Mon, 11 Jun 2007 12:39:51 +0000 Subject: Introducing the ability to manually set the dimensions of an image in the imageset editor. A little spelling. Introduces new language variable(s). #11925 #11675 git-svn-id: file:///svn/phpbb/trunk@7750 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/acp/acp_styles.php | 19 ++++++++++++++----- phpBB/includes/mcp/mcp_topic.php | 2 +- 2 files changed, 15 insertions(+), 6 deletions(-) (limited to 'phpBB/includes') diff --git a/phpBB/includes/acp/acp_styles.php b/phpBB/includes/acp/acp_styles.php index cc3a54ad04..5f3aa024fc 100644 --- a/phpBB/includes/acp/acp_styles.php +++ b/phpBB/includes/acp/acp_styles.php @@ -1209,7 +1209,8 @@ parse_css_file = {PARSE_CSS_FILE} $imgpath = request_var('imgpath', ''); $imgsize = request_var('imgsize', false); $imgwidth = request_var('imgwidth', 0); - + $imgheight = request_var('imgheight', 0); + $imgname = preg_replace('#[^a-z0-9\-+_]#i', '', $imgname); $imgpath = str_replace('..', '.', $imgpath); @@ -1269,7 +1270,8 @@ parse_css_file = {PARSE_CSS_FILE} { // If imgwidth and imgheight are non-zero grab the actual size // from the image itself ... we ignore width settings for the poll center image - $imgwidth = $imgheight = 0; + $imgwidth = request_var('imgwidth', 0); + $imgheight = request_var('imgheight', 0); $imglang = ''; if ($imgpath && !file_exists("{$phpbb_root_path}styles/$imageset_path/imageset/$imgpath")) @@ -1279,10 +1281,16 @@ parse_css_file = {PARSE_CSS_FILE} if ($imgsize && $imgpath) { - list($imgwidth, $imgheight) = getimagesize("{$phpbb_root_path}styles/$imageset_path/imageset/$imgpath"); + if (!$imgwidth || !$imgheight) + { + list($imgwidth_file, $imgheight_file) = getimagesize("{$phpbb_root_path}styles/$imageset_path/imageset/$imgpath"); + $imgwidth = ($imgwidth) ? $imgwidth : $imgwidth_file; + $imgheight = ($imgheight) ? $imgheight : $imgheight_file; + } $imgwidth = ($imgname != 'poll_center') ? (int) $imgwidth : 0; $imgheight = (int) $imgheight; - } + } + if (strpos($imgpath, '/') !== false) { @@ -1442,7 +1450,8 @@ parse_css_file = {PARSE_CSS_FILE} 'L_TITLE' => $user->lang[$this->page_title], 'L_EXPLAIN' => $user->lang[$this->page_title . '_EXPLAIN'], 'IMAGE_OPTIONS' => $img_options, - 'IMAGE_SIZE' => $imgsize_bool, + 'IMAGE_SIZE' => $image_width, + 'IMAGE_HEIGHT' => $image_height, 'IMAGE_REQUEST' => $image_request, 'U_ACTION' => $this->u_action . "&action=edit&id=$imageset_id", 'U_BACK' => $this->u_action, diff --git a/phpBB/includes/mcp/mcp_topic.php b/phpBB/includes/mcp/mcp_topic.php index 3e9c5655e8..ef41ede5c4 100644 --- a/phpBB/includes/mcp/mcp_topic.php +++ b/phpBB/includes/mcp/mcp_topic.php @@ -417,7 +417,7 @@ function split_topic($action, $topic_id, $to_forum_id, $subject) $post_id_list = array(); while ($row = $db->sql_fetchrow($result)) { - // If splitted from selected post (split_beyond), we split the unapproved items too. + // If split from selected post (split_beyond), we split the unapproved items too. if (!$row['post_approved'] && !$auth->acl_get('m_approve', $row['forum_id'])) { // continue; -- cgit v1.2.1