aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_posting.php
diff options
context:
space:
mode:
authorPaul S. Owen <psotfx@users.sourceforge.net>2003-08-27 16:31:54 +0000
committerPaul S. Owen <psotfx@users.sourceforge.net>2003-08-27 16:31:54 +0000
commit6225256418c127806f2c3d8a0ca0fe448b74c1c4 (patch)
treef6234c61eb8c304df981e875219b13f59dc59f24 /phpBB/includes/functions_posting.php
parent2c9b17ba48923df1d66d1b571dc92fa0db505374 (diff)
downloadforums-6225256418c127806f2c3d8a0ca0fe448b74c1c4.tar
forums-6225256418c127806f2c3d8a0ca0fe448b74c1c4.tar.gz
forums-6225256418c127806f2c3d8a0ca0fe448b74c1c4.tar.bz2
forums-6225256418c127806f2c3d8a0ca0fe448b74c1c4.tar.xz
forums-6225256418c127806f2c3d8a0ca0fe448b74c1c4.zip
bah, group handling needs some further discussion ... I'm done with it for M-2
git-svn-id: file:///svn/phpbb/trunk@4440 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_posting.php')
-rw-r--r--phpBB/includes/functions_posting.php19
1 files changed, 10 insertions, 9 deletions
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index a42952375b..a25c44f5e3 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -29,6 +29,8 @@ function generate_smilies($mode)
if ($mode == 'window')
{
+ $user->setup(false);
+
page_header($user->lang['SMILIES'] . ' - ' . $topic_title);
$template->set_filenames(array(
@@ -555,7 +557,8 @@ function move_uploaded_attachment($upload_mode, $source_filename, &$filedata)
}
}
}
- return '';
+
+ return;
}
// Delete File
@@ -568,14 +571,13 @@ function phpbb_unlink($filename, $mode = 'file', $use_ftp = false)
if (file_exists($filename))
{
- $filesys = eregi_replace('/','\\', $filename);
+ $filesys = str_replace('/','\\', $filename);
$deleted = @system("del $filesys");
if (file_exists($filename))
{
@chmod($filename, 0777);
- $deleted = @unlink($filename);
- if (!$deleted)
+ if (!($deleted = @unlink($filename)))
{
$deleted = @system("del $filename");
}
@@ -590,8 +592,8 @@ function phpbb_unlink($filename, $mode = 'file', $use_ftp = false)
function get_img_size_format($width, $height)
{
// Change these two values to define the Thumbnail Size
- $max_width = 300;
- $max_height = 85;
+ $max_width = 400;
+ $max_height = 200;
if ($height > $max_height)
{
@@ -673,8 +675,7 @@ function create_thumbnail($source, $new_file, $mimetype)
$new_size = get_img_size_format($size[0], $size[1]);
- $tmp_path = '';
- $old_file = '';
+ $tmp_path = $old_file = '';
$used_imagick = FALSE;
@@ -682,7 +683,7 @@ function create_thumbnail($source, $new_file, $mimetype)
{
if (is_array($size) && count($size) > 0)
{
- @exec($config['img_imagick'] . 'convert' . ((defined('PHP_OS') && preg_match('#win#i', PHP_OS)) ? '.exe' : '') . ' -quality 75 -antialias -sample ' . $new_size[0] . 'x' . $new_size[1] . ' ' . $source . ' +profile "*" ' . $new_file);
+ passthru($config['img_imagick'] . 'convert' . ((defined('PHP_OS') && preg_match('#win#i', PHP_OS)) ? '.exe' : '') . ' -quality 85 -antialias -sample ' . $new_size[0] . 'x' . $new_size[1] . ' "' . str_replace('\\', '/', $source) . '" +profile "*" "' . str_replace('\\', '/', $new_file) . '"');
if (file_exists($new_file))
{
$used_imagick = TRUE;