1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-02-21 01:42:30 +01:00

adjust text for getting image dimensions as well as not suppressing warnings for getimagesize()

git-svn-id: file:///svn/phpbb/trunk@6973 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen 2007-02-07 16:32:25 +00:00
parent 458bd5b3cd
commit 766e311ff3
7 changed files with 11 additions and 10 deletions

View File

@ -65,7 +65,7 @@ class acp_icons
{
foreach ($img_ary as $img)
{
$img_size = @getimagesize($phpbb_root_path . $img_path . '/' . $path . $img);
$img_size = getimagesize($phpbb_root_path . $img_path . '/' . $path . $img);
if (!$img_size[0] || !$img_size[1] || strlen($img) > 255)
{
@ -222,7 +222,7 @@ class acp_icons
{
if ($image_width[$image] == 0 || $image_height[$image] == 0)
{
$img_size = @getimagesize($phpbb_root_path . $img_path . '/' . $image);
$img_size = getimagesize($phpbb_root_path . $img_path . '/' . $image);
$image_width[$image] = $img_size[0];
$image_height[$image] = $img_size[1];
}

View File

@ -2619,7 +2619,7 @@ function parse_attachments($forum_id, &$message, &$attachments, &$update_count,
{
if ($config['img_link_width'] || $config['img_link_height'])
{
list($width, $height) = @getimagesize($filename);
list($width, $height) = getimagesize($filename);
$display_cat = (!$width && !$height) ? ATTACHMENT_CATEGORY_IMAGE : (($width <= $config['img_link_width'] && $height <= $config['img_link_height']) ? ATTACHMENT_CATEGORY_IMAGE : ATTACHMENT_CATEGORY_NONE);
}
@ -2704,7 +2704,7 @@ function parse_attachments($forum_id, &$message, &$attachments, &$update_count,
// Macromedia Flash Files
case ATTACHMENT_CATEGORY_FLASH:
list($width, $height) = @getimagesize($filename);
list($width, $height) = getimagesize($filename);
$l_downloaded_viewed = $user->lang['VIEWED'];

View File

@ -358,7 +358,7 @@ function upload_attachment($form_name, $forum_id, $local = false, $local_storage
// If this error occurs a user tried to exploit an IE Bug by renaming extensions
// Since the image category is displaying content inline we need to catch this.
trigger_error($user->lang['UNABLE_GET_IMAGE_SIZE']);
trigger_error($user->lang['ATTACHED_IMAGE_NOT_IMAGE']);
}
// Do we have to create a thumbnail?
@ -552,7 +552,7 @@ function create_thumbnail($source, $destination, $mimetype)
return false;
}
list($width, $height, $type, ) = @getimagesize($source);
list($width, $height, $type, ) = getimagesize($source);
if (!$width || !$height)
{

View File

@ -313,7 +313,7 @@ class filespec
{
$this->width = $this->height = 0;
if (($this->image_info = @getimagesize($this->destination_file)) !== false)
if (($this->image_info = getimagesize($this->destination_file)) !== false)
{
$this->width = $this->image_info[0];
$this->height = $this->image_info[1];

View File

@ -1394,7 +1394,7 @@ function avatar_remote($data, &$error)
}
// Make sure getimagesize works...
if (($image_data = @getimagesize($data['remotelink'])) === false)
if (($image_data = getimagesize($data['remotelink'])) === false)
{
$error[] = $user->lang['UNABLE_GET_IMAGE_SIZE'];
return false;

View File

@ -273,7 +273,7 @@ class bbcode_firstpass extends bbcode
if ($config['max_' . $this->mode . '_img_height'] || $config['max_' . $this->mode . '_img_width'])
{
$stats = @getimagesize($in);
$stats = getimagesize($in);
if ($stats === false)
{

View File

@ -65,6 +65,7 @@ $lang = array_merge($lang, array(
'ARE_WATCHING_TOPIC' => 'You have subscribed to receive updates on this topic.',
'ASCENDING' => 'Ascending',
'ATTACHMENTS' => 'Attachments',
'ATTACHED_IMAGE_NOT_IMAGE' => 'You tried to attach an invalid image file.',
'AUTHOR' => 'Author',
'AUTH_NO_PROFILE_CREATED' => 'Creating a user profile failed',
'AVATAR_DISALLOWED_EXTENSION' => 'The extension %s is not allowed',
@ -559,7 +560,7 @@ $lang = array_merge($lang, array(
'TOTAL_USERS_ZERO' => 'Total members <strong>0</strong>',
'TRACKED_PHP_ERROR' => 'Tracked PHP errors: %s',
'UNABLE_GET_IMAGE_SIZE' => 'Accessing the image was impossible or file isnt a valid image.',
'UNABLE_GET_IMAGE_SIZE' => 'It was not possible to determine the dimensions of the image.',
'UNABLE_TO_DELIVER_FILE'=> 'Unable to deliver file.',
'UNKNOWN_BROWSER' => 'Unknown browser',
'UNMARK_ALL' => 'Unmark all',