no longer supporting ftp upload

git-svn-id: file:///svn/phpbb/trunk@4502 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen 2003-09-15 21:02:10 +00:00
parent 9ce85a9065
commit d065b8ea1e
2 changed files with 13 additions and 12 deletions

View file

@ -550,10 +550,10 @@ function delete_attachments($post_id_array = -1, $attach_id_array = -1, $page =
// delete attachments // delete attachments
while ($row = $db->sql_fetchrow($result)) while ($row = $db->sql_fetchrow($result))
{ {
phpbb_unlink($row['physical_filename'], 'file', $config['use_ftp_upload']); phpbb_unlink($row['physical_filename'], 'file');
if ($row['thumbnail']) if ($row['thumbnail'])
{ {
phpbb_unlink($row['physical_filename'], 'thumbnail', $config['use_ftp_upload']); phpbb_unlink($row['physical_filename'], 'thumbnail');
} }
$sql = 'DELETE FROM ' . ATTACHMENTS_DESC_TABLE . ' $sql = 'DELETE FROM ' . ATTACHMENTS_DESC_TABLE . '

View file

@ -21,7 +21,7 @@ function generate_smilies($mode)
if ($mode == 'window') if ($mode == 'window')
{ {
$user->setup(false); $user->setup(FALSE);
page_header($user->lang['SMILIES'] . ' - ' . $topic_title); page_header($user->lang['SMILIES'] . ' - ' . $topic_title);
@ -65,7 +65,7 @@ function generate_smilies($mode)
if ($mode == 'inline' && $num_smilies >= $max_smilies_inline) if ($mode == 'inline' && $num_smilies >= $max_smilies_inline)
{ {
$template->assign_vars(array( $template->assign_vars(array(
'S_SHOW_EMOTICON_LINK' => true, 'S_SHOW_EMOTICON_LINK' => TRUE,
'U_MORE_SMILIES' => "posting.$phpEx$SID&mode=smilies") 'U_MORE_SMILIES' => "posting.$phpEx$SID&mode=smilies")
); );
} }
@ -139,8 +139,9 @@ function update_last_post_information($type, $id, &$parent_sql)
$sql_where_add = 'AND p.topic_id = ' . (int) $id; $sql_where_add = 'AND p.topic_id = ' . (int) $id;
$sql_update_table = TOPICS_TABLE; $sql_update_table = TOPICS_TABLE;
break; break;
default: default:
return; return array();
} }
$sql = "SELECT p.post_id, p.poster_id, p.post_time, u.username, p.post_username $sql = "SELECT p.post_id, p.poster_id, p.post_time, u.username, p.post_username
@ -175,7 +176,7 @@ function update_last_post_information($type, $id, &$parent_sql)
// Not able to test this, since subforums seems to be broken // Not able to test this, since subforums seems to be broken
if ($type == 'forum') if ($type == 'forum')
{ {
$forum_parents = get_forum_branch($id, 'parents', 'descending', false); $forum_parents = get_forum_branch($id, 'parents', 'descending', FALSE);
$forum_ids = array(); $forum_ids = array();
foreach ($forum_parents as $row) foreach ($forum_parents as $row)
{ {
@ -256,7 +257,7 @@ function upload_attachment($filename)
if ($width > $config['img_max_width'] || $height > $config['img_max_height']) if ($width > $config['img_max_width'] || $height > $config['img_max_height'])
{ {
$filedata['error'][] = sprintf($user->lang['Error_imagesize'], $config['img_max_width'], $config['img_max_height']); $filedata['error'][] = sprintf($user->lang['Error_imagesize'], $config['img_max_width'], $config['img_max_height']);
$filedata['post_attach'] = false; $filedata['post_attach'] = FALSE;
return $filedata; return $filedata;
} }
} }
@ -270,7 +271,7 @@ function upload_attachment($filename)
$allowed_filesize = ($allowed_filesize >= 1048576) ? round($allowed_filesize / 1048576 * 100) / 100 : (($allowed_filesize >= 1024) ? round($allowed_filesize / 1024 * 100) / 100 : $allowed_filesize); $allowed_filesize = ($allowed_filesize >= 1048576) ? round($allowed_filesize / 1048576 * 100) / 100 : (($allowed_filesize >= 1024) ? round($allowed_filesize / 1024 * 100) / 100 : $allowed_filesize);
$filedata['error'][] = sprintf($user->lang['ATTACHMENT_TOO_BIG'], $allowed_filesize, $size_lang); $filedata['error'][] = sprintf($user->lang['ATTACHMENT_TOO_BIG'], $allowed_filesize, $size_lang);
$filedata['post_attach'] = false; $filedata['post_attach'] = FALSE;
return $filedata; return $filedata;
} }
@ -280,7 +281,7 @@ function upload_attachment($filename)
if ($config['total_filesize'] + $filedata['filesize'] > $config['attachment_quota']) if ($config['total_filesize'] + $filedata['filesize'] > $config['attachment_quota'])
{ {
$filedata['error'][] = $user->lang['ATTACH_QUOTA_REACHED']; $filedata['error'][] = $user->lang['ATTACH_QUOTA_REACHED'];
$filedata['post_attach'] = false; $filedata['post_attach'] = FALSE;
return $filedata; return $filedata;
} }
} }
@ -311,7 +312,7 @@ function upload_attachment($filename)
if ($result != '') if ($result != '')
{ {
$filedata['error'][] = $result; $filedata['error'][] = $result;
$filedata['post_attach'] = false; $filedata['post_attach'] = FALSE;
} }
return $filedata; return $filedata;
} }
@ -322,7 +323,7 @@ function move_uploaded_attachment($upload_mode, $source_filename, &$filedata)
global $user, $config; global $user, $config;
$destination_filename = $filedata['destination_filename']; $destination_filename = $filedata['destination_filename'];
$thumbnail = (isset($filedata['thumbnail'])) ? $filedata['thumbnail'] : false; $thumbnail = (isset($filedata['thumbnail'])) ? $filedata['thumbnail'] : FALSE;
switch ($upload_mode) switch ($upload_mode)
{ {
@ -367,7 +368,7 @@ function move_uploaded_attachment($upload_mode, $source_filename, &$filedata)
} }
// Delete File // Delete File
function phpbb_unlink($filename, $mode = 'file', $use_ftp = false) function phpbb_unlink($filename, $mode = 'file')
{ {
global $config, $user; global $config, $user;