Changeset 159
- Timestamp:
- 11/25/08 11:12:37 (3 years ago)
- Files:
-
- include/functions_delete.php (modified) (4 diffs)
- log.php (modified) (1 diff)
- upload.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
include/functions_delete.php
r142 r159 18 18 $sql = 'DELETE FROM ' . BOOKMARKS_TABLE . ' WHERE torrentid IN (' . implode(',', $arr_ids) . ')'; 19 19 $db->sql_query($sql); 20 $sql = 'DELETE FROM ' . COMMENTS_NOTIFY_TABLE . ' WHERE torrent IN (' . implode(',', $arr_ids) . ')';20 $sql = 'DELETE FROM ' . COMMENTS_NOTIFY_TABLE . ' WHERE checkcomm_for_id IN (' . implode(',', $arr_ids) . ') AND checkcomm_type = ' . COMMENT_TYPE_TORRENT; 21 21 $db->sql_query($sql); 22 22 $sql = 'DELETE FROM ' . REPORTS_TABLE . ' WHERE type = 2 AND votedfor IN (' . implode(',', $arr_ids) . ')'; … … 79 79 $sql = 'DELETE FROM ' . BOOKMARKS_TABLE . ' WHERE userid IN (' . implode(',', $arr_ids) . ')'; 80 80 $db->sql_query($sql); 81 $sql = 'DELETE FROM ' . COMMENTS_NOTIFY_TABLE . ' WHERE userid IN (' . implode(',', $arr_ids) . ')';81 $sql = 'DELETE FROM ' . COMMENTS_NOTIFY_TABLE . ' WHERE checkcomm_userid IN (' . implode(',', $arr_ids) . ')'; 82 82 $db->sql_query($sql); 83 83 $sql = 'DELETE FROM ' . OFFERS_VOTES_TABLE . ' WHERE userid IN (' . implode(',', $arr_ids) . ')'; … … 192 192 $sql = 'DELETE FROM ' . COMMENTS_TABLE . ' WHERE comment_for_id IN (' . implode(', ', $ids) . ') AND comment_type = ' . COMMENT_TYPE_REQUEST; 193 193 $db->sql_query($sql); 194 $sql = 'DELETE FROM ' . COMMENTS_NOTIFY_TABLE . ' WHERE request IN (' . implode(', ', $ids) . ')';194 $sql = 'DELETE FROM ' . COMMENTS_NOTIFY_TABLE . ' WHERE checkcomm_for_id IN (' . implode(', ', $ids) . ') AND checkcomm_type = ' . COMMENT_TYPE_REQUEST; 195 195 $db->sql_query($sql); 196 196 $sql = 'DELETE FROM ' . SIMPATY_TABLE . ' WHERE simpid IN (' . implode(', ', $ids) . ') AND type = 3'; … … 210 210 $sql = 'DELETE FROM ' . COMMENTS_TABLE . ' WHERE comment_for_id IN (' . implode(', ', $ids) . ') AND comment_type = ' . COMMENT_TYPE_OFFER; 211 211 $db->sql_query($sql); 212 $sql = 'DELETE FROM ' . COMMENTS_NOTIFY_TABLE . ' WHERE offer IN (' . implode(', ', $ids) . ')';212 $sql = 'DELETE FROM ' . COMMENTS_NOTIFY_TABLE . ' WHERE checkcomm_for_id IN (' . implode(', ', $ids) . ') AND checkcomm_type = ' . COMMENT_TYPE_OFFER; 213 213 $db->sql_query($sql); 214 214 $sql = 'DELETE FROM ' . SIMPATY_TABLE . ' WHERE simpid IN (' . implode(', ', $ids) . ') AND type = 4'; log.php
r148 r159 1 1 <?php 2 2 $tracker_root_path = './'; 3 require($tracker_root_path . 'include/config.php'); 4 @include ($tracker_root_path . 'include/overall_header.php'); 5 @include ($tracker_root_path . 'include/overall_footer.php'); 6 @include ($tracker_root_path . 'languages/lang_' . $config['default_lang'] . '/lang_modcomment_log.php'); 3 require_once ($tracker_root_path . 'include/config.php'); 4 require_once ($tracker_root_path . 'include/overall_header.php'); 5 require_once ($tracker_root_path . 'include/overall_footer.php'); 6 require_once ($tracker_root_path . 'include/functions_search.php'); 7 require_once ($tracker_root_path . 'languages/lang_' . $config['default_lang'] . '/lang_modcomment_log.php'); 7 8 $userdata = session_pagestart($user_ip); 8 9 init_userprefs($userdata); upload.php
r154 r159 79 79 $id = $db->sql_nextid(); 80 80 if ( $userdata['commentpm'] ) { 81 $sql = 'INSERT INTO ' . COMMENTS_NOTIFY_TABLE . ' ( userid, request) VALUES (' . $userdata['uid'] . ', ' . $id. ')';81 $sql = 'INSERT INTO ' . COMMENTS_NOTIFY_TABLE . ' (checkcomm_userid, checkcomm_for_id, checkcomm_type) VALUES (' . $userdata['uid'] . ', ' . $id . ', ' . COMMENT_TYPE_REQUEST . ')'; 82 82 $db->sql_query($sql); 83 83 } … … 92 92 'descr' => $descr, 93 93 'added' => time() 94 ); 95 $sql = 'INSERT INTO ' . OFFERS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary); 96 $db->sql_query($sql); 97 $id = $db->sql_nextid(); 98 if ( $userdata['commentpm'] ) { 99 $sql = 'INSERT INTO ' . COMMENTS_NOTIFY_TABLE . ' (userid, offer) VALUES (' . $userdata['uid'] . ', ' . $id . ')'; 100 $db->sql_query($sql); 101 } 102 redirect( append_sid('offers.php?id=' . $id)); 94 ); 95 96 $sql = 'INSERT INTO ' . OFFERS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary); 97 $db->sql_query($sql); 98 99 $id = $db->sql_nextid(); 100 101 if ( $userdata['commentpm'] ) { 102 $sql = 'INSERT INTO ' . COMMENTS_NOTIFY_TABLE . ' (checkcomm_userid, checkcomm_for_id, checkcomm_type) VALUES (' . $userdata['uid'] . ', ' . $id . ', ' . COMMENT_TYPE_OFFER . ')'; 103 $db->sql_query($sql); 104 } 105 redirect( append_sid('offers.php?id=' . $id)); 103 106 } 104 107 else { … … 171 174 $id = $db->sql_nextid(); 172 175 $config['torrent_dir'] = ( !empty($config['torrent_dir']) ? $config['torrent_dir'] : $tracker_root_path . 'torrents'); 173 if ( @move_uploaded_file($tmpname, $config['torrent_dir'] . DIRECTORY_SEPARATOR . $id . '.torrent') !== FALSE ) { 174 $sql = 'INSERT INTO ' . COMMENTS_NOTIFY_TABLE . ' (userid, torrent) VALUES (' . $userdata['uid'] . ', ' . $id . ')'; 176 if ( @move_uploaded_file($tmpname, $config['torrent_dir'] . DIRECTORY_SEPARATOR . $id . '.torrent') !== false ) { 177 178 $sql = 'INSERT INTO ' . COMMENTS_NOTIFY_TABLE . ' (checkcomm_userid, checkcomm_for_id, checkcomm_type) VALUES (' . $userdata['uid'] . ', ' . $id . ', ' . COMMENT_TYPE_TORRENT . ')'; 175 179 $db->sql_query($sql); 180 176 181 $sql = 'DELETE FROM ' . FILES_TABLE . ' WHERE torrent = ' . $id; 177 182 $db->sql_query($sql);
