diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2006-09-13 18:19:39 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2006-09-13 18:19:39 +0000 |
commit | 665adc1722385e134ef20f8e470d5593a8be284b (patch) | |
tree | fcc458c328697bbd35a2c3e5b5a912bf3a31bde8 /phpBB/includes | |
parent | b76222cb6e9ed69ee8ed0c09f0196eaaafd33fad (diff) | |
download | forums-665adc1722385e134ef20f8e470d5593a8be284b.tar forums-665adc1722385e134ef20f8e470d5593a8be284b.tar.gz forums-665adc1722385e134ef20f8e470d5593a8be284b.tar.bz2 forums-665adc1722385e134ef20f8e470d5593a8be284b.tar.xz forums-665adc1722385e134ef20f8e470d5593a8be284b.zip |
seems like i forgot something. :)
git-svn-id: file:///svn/phpbb/trunk@6365 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes')
-rw-r--r-- | phpBB/includes/acp/acp_attachments.php | 62 | ||||
-rw-r--r-- | phpBB/includes/acp/acp_forums.php | 28 |
2 files changed, 14 insertions, 76 deletions
diff --git a/phpBB/includes/acp/acp_attachments.php b/phpBB/includes/acp/acp_attachments.php index acb1319c16..5fe58955f2 100644 --- a/phpBB/includes/acp/acp_attachments.php +++ b/phpBB/includes/acp/acp_attachments.php @@ -1124,68 +1124,6 @@ class acp_attachments return $group_select; } - /** - * Upload already uploaded file... huh? are you kidding? - function upload_file($post_id, $topic_id, $forum_id, $upload_dir, $filename) - { - global $message_parser, $db, $user, $phpbb_root_path; - - $message_parser->attachment_data = array(); - $message_parser->filename_data['filecomment'] = ''; - - $filedata = upload_attachment('local', $forum_id, true, $phpbb_root_path . $upload_dir . '/' . basename($filename)); - - if ($filedata['post_attach'] && !sizeof($filedata['error'])) - { - $message_parser->attachment_data = array( - 'post_msg_id' => $post_id, - 'poster_id' => $user->data['user_id'], - 'topic_id' => $topic_id, - 'in_message' => 0, - 'physical_filename' => $filedata['physical_filename'], - 'real_filename' => $filedata['real_filename'], - 'attach_comment' => $message_parser->filename_data['filecomment'], - 'extension' => $filedata['extension'], - 'mimetype' => $filedata['mimetype'], - 'filesize' => $filedata['filesize'], - 'filetime' => $filedata['filetime'], - 'thumbnail' => $filedata['thumbnail'] - ); - - $message_parser->filename_data['filecomment'] = ''; - $filedata['post_attach'] = false; - - // Submit Attachment - $attach_sql = $message_parser->attachment_data; - - $db->sql_transaction('begin'); - - $sql = 'INSERT INTO ' . ATTACHMENTS_TABLE . ' ' . $db->sql_build_array('INSERT', $attach_sql); - $db->sql_query($sql); - - $sql = 'UPDATE ' . POSTS_TABLE . " - SET post_attachment = 1 - WHERE post_id = $post_id"; - $db->sql_query($sql); - - $sql = 'UPDATE ' . TOPICS_TABLE . " - SET topic_attachment = 1 - WHERE topic_id = $topic_id"; - $db->sql_query($sql); - - $db->sql_transaction('commit'); - - add_log('admin', 'LOG_ATTACH_FILEUPLOAD', $post_id, $filename); - - return true; - } - else if (sizeof($filedata['error'])) - { - return sprintf($user->lang['ADMIN_UPLOAD_ERROR'], implode('<br />', $filedata['error'])); - } - } - */ - /** * Search Imagick */ diff --git a/phpBB/includes/acp/acp_forums.php b/phpBB/includes/acp/acp_forums.php index 5f70a15fc7..9a819d97e1 100644 --- a/phpBB/includes/acp/acp_forums.php +++ b/phpBB/includes/acp/acp_forums.php @@ -110,7 +110,7 @@ class acp_forums 'forum_style' => request_var('forum_style', 0), 'display_on_index' => request_var('display_on_index', false), 'forum_topics_per_page' => request_var('topics_per_page', 0), - 'enable_indexing' => request_var('enable_indexing',true), + 'enable_indexing' => request_var('enable_indexing', true), 'enable_icons' => request_var('enable_icons', false), 'enable_prune' => request_var('enable_prune', false), 'enable_post_review' => request_var('enable_post_review', true), @@ -322,12 +322,12 @@ class acp_forums if ($update) { $forum_data['forum_flags'] = 0; - $forum_data['forum_flags'] += (request_var('forum_link_track', false)) ? 1 : 0; - $forum_data['forum_flags'] += (request_var('prune_old_polls', false)) ? 2 : 0; - $forum_data['forum_flags'] += (request_var('prune_announce', false)) ? 4 : 0; - $forum_data['forum_flags'] += (request_var('prune_sticky', false)) ? 8 : 0; - $forum_data['forum_flags'] += ($forum_data['show_active']) ? 16 : 0; - $forum_data['forum_flags'] += (request_var('enable_post_review', true)) ? 32 : 0; + $forum_data['forum_flags'] += (request_var('forum_link_track', false)) ? FORUM_FLAG_LINK_TRACK : 0; + $forum_data['forum_flags'] += (request_var('prune_old_polls', false)) ? FORUM_FLAG_PRUNE_POLL : 0; + $forum_data['forum_flags'] += (request_var('prune_announce', false)) ? FORUM_FLAG_PRUNE_ANNOUNCE : 0; + $forum_data['forum_flags'] += (request_var('prune_sticky', false)) ? FORUM_FLAG_PRUNE_STICKY : 0; + $forum_data['forum_flags'] += ($forum_data['show_active']) ? FORUM_FLAG_ACTIVE_TOPICS : 0; + $forum_data['forum_flags'] += (request_var('enable_post_review', true)) ? FORUM_FLAG_POST_REVIEW : 0; } // Show form to create/modify a forum @@ -389,7 +389,7 @@ class acp_forums 'prune_days' => 7, 'prune_viewed' => 7, 'prune_freq' => 1, - 'forum_flags' => 0, + 'forum_flags' => FORUM_FLAG_POST_REVIEW, 'forum_password' => '', 'forum_password_confirm'=> '', ); @@ -779,12 +779,12 @@ class acp_forums // 16 = show active topics // 32 = enable post review $forum_data['forum_flags'] = 0; - $forum_data['forum_flags'] += ($forum_data['forum_link_track']) ? 1 : 0; - $forum_data['forum_flags'] += ($forum_data['prune_old_polls']) ? 2 : 0; - $forum_data['forum_flags'] += ($forum_data['prune_announce']) ? 4 : 0; - $forum_data['forum_flags'] += ($forum_data['prune_sticky']) ? 8 : 0; - $forum_data['forum_flags'] += ($forum_data['show_active']) ? 16 : 0; - $forum_data['forum_flags'] += ($forum_data['enable_post_review']) ? 32 : 0; + $forum_data['forum_flags'] += ($forum_data['forum_link_track']) ? FORUM_FLAG_LINK_TRACK : 0; + $forum_data['forum_flags'] += ($forum_data['prune_old_polls']) ? FORUM_FLAG_PRUNE_POLL : 0; + $forum_data['forum_flags'] += ($forum_data['prune_announce']) ? FORUM_FLAG_PRUNE_ANNOUNCE : 0; + $forum_data['forum_flags'] += ($forum_data['prune_sticky']) ? FORUM_FLAG_PRUNE_STICKY : 0; + $forum_data['forum_flags'] += ($forum_data['show_active']) ? FORUM_FLAG_ACTIVE_TOPICS : 0; + $forum_data['forum_flags'] += ($forum_data['enable_post_review']) ? FORUM_FLAG_POST_REVIEW : 0; // Unset data that are not database fields $forum_data_sql = $forum_data; |