Changeset 1529
- Timestamp:
- 02/24/08 23:48:26 (5 months ago)
- Files:
-
- branches/punbb-1.3-dev/upload/moderate.php (modified) (22 diffs)
- branches/punbb-1.3-dev/upload/post.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/punbb-1.3-dev/upload/moderate.php
r1504 r1529 112 112 // Did someone click a cancel button? 113 113 if (isset($_POST['cancel'])) 114 redirect(pun_link($pun_url['forum'], $fid), $lang_common['Cancel redirect']);114 redirect(pun_link($pun_url['forum'], array($fid, sef_friendly($cur_forum['forum_name']))), $lang_common['Cancel redirect']); 115 115 116 116 … … 123 123 if ($tid < 1) 124 124 message($lang_common['Bad request']); 125 126 // User pressed the cancel button127 if (isset($_POST['delete_posts_cancel']))128 redirect(pun_link($pun_url['topic'], $tid), $lang_common['Cancel redirect']);129 125 130 126 // Fetch some info about the topic … … 142 138 $cur_topic = $db->fetch_assoc($result); 143 139 140 // User pressed the cancel button 141 if (isset($_POST['delete_posts_cancel'])) 142 redirect(pun_link($pun_url['topic'], array($tid, sef_friendly($cur_topic['subject']))), $lang_common['Cancel redirect']); 143 144 144 // Delete one or more posts 145 145 if (isset($_POST['delete_posts']) || isset($_POST['delete_posts_comply'])) … … 154 154 { 155 155 if (!isset($_POST['req_confirm'])) 156 redirect(pun_link($pun_url['topic'], $tid), $lang_common['No confirm redirect']);156 redirect(pun_link($pun_url['topic'], array($tid, sef_friendly($cur_topic['subject']))), $lang_common['No confirm redirect']); 157 157 158 158 ($hook = get_hook('mr_confirm_delete_posts_form_submitted')) ? eval($hook) : null; … … 216 216 sync_forum($fid); 217 217 218 redirect(pun_link($pun_url['topic'], $tid), $lang_misc['Delete posts redirect']);218 redirect(pun_link($pun_url['topic'], array($tid, sef_friendly($cur_topic['subject']))), $lang_misc['Delete posts redirect']); 219 219 } 220 220 … … 231 231 $pun_page['crumbs'] = array( 232 232 array($pun_config['o_board_title'], pun_link($pun_url['index'])), 233 array($cur_forum['forum_name'], pun_link($pun_url['forum'], $fid)),234 array($cur_topic['subject'], pun_link($pun_url['topic'], $tid)),233 array($cur_forum['forum_name'], pun_link($pun_url['forum'], array($fid, sef_friendly($cur_forum['forum_name'])))), 234 array($cur_topic['subject'], pun_link($pun_url['topic'], array($tid, sef_friendly($cur_topic['subject'])))), 235 235 $lang_misc['Delete posts'] 236 236 ); … … 320 320 $pun_page['crumbs'] = array( 321 321 array($pun_config['o_board_title'], pun_link($pun_url['index'])), 322 array($cur_forum['forum_name'], pun_link($pun_url['forum'], $fid)),323 array($cur_topic['subject'], pun_link($pun_url['topic'], $tid)),322 array($cur_forum['forum_name'], pun_link($pun_url['forum'], array($fid, sef_friendly($cur_forum['forum_name'])))), 323 array($cur_topic['subject'], pun_link($pun_url['topic'], array($tid, sef_friendly($cur_topic['subject'])))), 324 324 $lang_topic['Delete posts'] 325 325 ); … … 500 500 message($lang_common['Bad request']); 501 501 502 // Fetch the forum name for the forum we're moving to 503 $query = array( 504 'SELECT' => 'f.forum_name', 505 'FROM' => 'forums AS f', 506 'WHERE' => 'f.id='.$move_to_forum 507 ); 508 509 ($hook = get_hook('mr_qr_get_move_to_forum_name')) ? eval($hook) : null; 510 $result = $db->query_build($query) or error(__FILE__, __LINE__); 511 512 if (!$db->num_rows($result)) 513 message($lang_common['Bad request']); 514 515 $move_to_forum_name = $db->result($result); 516 502 517 // Verify that the topic IDs are valid 503 518 $query = array( … … 563 578 564 579 $pun_page['redirect_msg'] = (count($topics) > 1) ? $lang_misc['Move topics redirect'] : $lang_misc['Move topic redirect']; 565 redirect(pun_link($pun_url['forum'], $move_to_forum), $pun_page['redirect_msg']);580 redirect(pun_link($pun_url['forum'], array($move_to_forum, sef_friendly($move_to_forum_name))), $pun_page['redirect_msg']); 566 581 } 567 582 … … 590 605 ); 591 606 592 ($hook = get_hook('mr_qr_get_topic_ subject')) ? eval($hook) : null;607 ($hook = get_hook('mr_qr_get_topic_to_move_subject')) ? eval($hook) : null; 593 608 $result = $db->query_build($query) or error(__FILE__, __LINE__); 609 610 if (!$db->num_rows($result)) 611 message($lang_common['Bad request']); 612 594 613 $subject = $db->result($result); 595 614 } … … 635 654 // Setup breadcrumbs 636 655 $pun_page['crumbs'][] = array($pun_config['o_board_title'], pun_link($pun_url['index'])); 637 $pun_page['crumbs'][] = array($cur_forum['forum_name'], pun_link($pun_url['forum'], $fid));656 $pun_page['crumbs'][] = array($cur_forum['forum_name'], pun_link($pun_url['forum'], array($fid, sef_friendly($cur_forum['forum_name'])))); 638 657 if ($action == 'single') 639 $pun_page['crumbs'][] = array($subject, pun_link($pun_url['topic'], $topics));658 $pun_page['crumbs'][] = array($subject, pun_link($pun_url['topic'], array($topics, sef_friendly($subject)))); 640 659 else 641 660 $pun_page['crumbs'][] = array($lang_misc['Moderate forum'], pun_link($pun_url['moderate_forum'], $fid)); … … 718 737 { 719 738 if (!isset($_POST['req_confirm'])) 720 redirect(pun_link($pun_url['forum'], $fid), $lang_common['Cancel redirect']);739 redirect(pun_link($pun_url['forum'], array($fid, sef_friendly($cur_forum['forum_name']))), $lang_common['Cancel redirect']); 721 740 722 741 ($hook = get_hook('mr_confirm_delete_topics_form_submitted')) ? eval($hook) : null; … … 790 809 sync_forum($fid); 791 810 792 redirect(pun_link($pun_url['forum'], $fid), $lang_misc['Delete topics redirect']);811 redirect(pun_link($pun_url['forum'], array($fid, sef_friendly($cur_forum['forum_name']))), $lang_misc['Delete topics redirect']); 793 812 } 794 813 … … 806 825 $pun_page['crumbs'] = array( 807 826 array($pun_config['o_board_title'], pun_link($pun_url['index'])), 808 array($cur_forum['forum_name'], pun_link($pun_url['forum'], $fid)),827 array($cur_forum['forum_name'], pun_link($pun_url['forum'], array($fid, sef_friendly($cur_forum['forum_name'])))), 809 828 array($lang_misc['Moderate forum'], pun_link($pun_url['moderate_forum'], $fid)), 810 829 $lang_misc['Delete topics'] … … 888 907 csrf_confirm_form(); 889 908 909 // Get the topic subject 910 $query = array( 911 'SELECT' => 't.subject', 912 'FROM' => 'topics AS t', 913 'WHERE' => 't.id='.$topic_id.' AND forum_id='.$fid 914 ); 915 916 ($hook = get_hook('mr_qr_get_open_close_topic_subject')) ? eval($hook) : null; 917 $result = $db->query_build($query) or error(__FILE__, __LINE__); 918 919 if (!$db->num_rows($result)) 920 message($lang_common['Bad request']); 921 922 $subject = $db->result($result); 923 890 924 $query = array( 891 925 'UPDATE' => 'topics', … … 898 932 899 933 $pun_page['redirect_msg'] = ($action) ? $lang_misc['Close topic redirect'] : $lang_misc['Open topic redirect']; 900 redirect(pun_link($pun_url['topic'], $topic_id), $pun_page['redirect_msg']);934 redirect(pun_link($pun_url['topic'], array($topic_id, sef_friendly($subject))), $pun_page['redirect_msg']); 901 935 } 902 936 } … … 917 951 ($hook = get_hook('mr_stick_topic_selected')) ? eval($hook) : null; 918 952 953 // Get the topic subject 954 $query = array( 955 'SELECT' => 't.subject', 956 'FROM' => 'topics AS t', 957 'WHERE' => 't.id='.$stick.' AND forum_id='.$fid 958 ); 959 960 ($hook = get_hook('mr_qr_get_stick_topic_subject')) ? eval($hook) : null; 961 $result = $db->query_build($query) or error(__FILE__, __LINE__); 962 963 if (!$db->num_rows($result)) 964 message($lang_common['Bad request']); 965 966 $subject = $db->result($result); 967 919 968 $query = array( 920 969 'UPDATE' => 'topics', … … 926 975 $db->query_build($query) or error(__FILE__, __LINE__); 927 976 928 redirect(pun_link($pun_url['topic'], $stick), $lang_misc['Stick topic redirect']);977 redirect(pun_link($pun_url['topic'], array($stick, sef_friendly($subject))), $lang_misc['Stick topic redirect']); 929 978 } 930 979 … … 944 993 ($hook = get_hook('mr_unstick_topic_selected')) ? eval($hook) : null; 945 994 995 // Get the topic subject 996 $query = array( 997 'SELECT' => 't.subject', 998 'FROM' => 'topics AS t', 999 'WHERE' => 't.id='.$unstick.' AND forum_id='.$fid 1000 ); 1001 1002 ($hook = get_hook('mr_qr_get_unstick_topic_subject')) ? eval($hook) : null; 1003 $result = $db->query_build($query) or error(__FILE__, __LINE__); 1004 1005 if (!$db->num_rows($result)) 1006 message($lang_common['Bad request']); 1007 1008 $subject = $db->result($result); 1009 946 1010 $query = array( 947 1011 'UPDATE' => 'topics', … … 953 1017 $db->query_build($query) or error(__FILE__, __LINE__); 954 1018 955 redirect(pun_link($pun_url['topic'], $unstick), $lang_misc['Unstick topic redirect']);1019 redirect(pun_link($pun_url['topic'], array($unstick, sef_friendly($subject))), $lang_misc['Unstick topic redirect']); 956 1020 } 957 1021 … … 1000 1064 $pun_page['crumbs'] = array( 1001 1065 array($pun_config['o_board_title'], pun_link($pun_url['index'])), 1002 array($cur_forum['forum_name'], pun_link($pun_url['forum'], $fid)),1066 array($cur_forum['forum_name'], pun_link($pun_url['forum'], array($fid, sef_friendly($cur_forum['forum_name'])))), 1003 1067 $lang_forum['Moderate forum'] 1004 1068 ); … … 1097 1161 } 1098 1162 1099 $pun_page['item_subject'][] = '<a href="'.pun_link($pun_url['topic'], $cur_topic['id']).'">'.htmlspecialchars($cur_topic['subject']).'</a>';1163 $pun_page['item_subject'][] = '<a href="'.pun_link($pun_url['topic'], array($cur_topic['id'], sef_friendly($cur_topic['subject']))).'">'.htmlspecialchars($cur_topic['subject']).'</a>'; 1100 1164 1101 1165 $pun_page['item_pages'] = ceil(($cur_topic['num_replies'] + 1) / $pun_user['disp_posts']); branches/punbb-1.3-dev/upload/post.php
r1490 r1529 336 336 // Setup breadcrumbs 337 337 $pun_page['crumbs'][] = array($pun_config['o_board_title'], pun_link($pun_url['index'])); 338 $pun_page['crumbs'][] = array($cur_posting['forum_name'], pun_link($pun_url['forum'], $cur_posting['id']));339 if ($tid) $pun_page['crumbs'][] = array($cur_posting['subject'], pun_link($pun_url['topic'], $tid));338 $pun_page['crumbs'][] = array($cur_posting['forum_name'], pun_link($pun_url['forum'], array($cur_posting['id'], sef_friendly($cur_posting['forum_name'])))); 339 if ($tid) $pun_page['crumbs'][] = array($cur_posting['subject'], pun_link($pun_url['topic'], array($tid, sef_friendly($cur_posting['subject'])))); 340 340 $pun_page['crumbs'][] = $tid ? $lang_post['Post reply'] : $lang_post['Post new topic']; 341 341
