olah
committed
on 01 Aug 02
*** empty log message ***
openacs.org-dev/www/bboard/index.vuh (+4 -4)
37 37 "
38 38 }
39 39
40 40 set mapped_forum_sql "
41 41     select new_forum_id from migr_forum_map
42 42     where old_forum_id=:topic_id
43 43 "
44 44
45 45
46 46 set target [lindex [ad_conn urlv] end]
47 47
48 48 regsub {\.tcl$} $target {} target
49 49
50 50 switch $target {
51 51     q-and-a-fetch-msg {
52 52         # a simple message
53 53        
54 54         if { [db_0or1row get_new_ids $mapped_message_sql] } {
55 55             # Found a mapping, return new link.
56 56
57               #set new_link "[ad_conn location]$new_mount_point/message?message_id=$new_message_id&forum_id=:forum_id"
58               set new_link "[ad_conn location]$new_mount_point/message-view?message_id=:new_message_id"
  57             #set new_link "[ad_conn location]$new_mount_point/message?message_id=$new_message_id&forum_id=$forum_id"
  58             set new_link "[ad_conn location]$new_mount_point/message-view?message_id=$new_message_id"
59 59             ns_set put [ns_conn outputheaders] Location $new_link
60 60             ns_return 301 text/html "<html>
61 61 <head><title>Redirection</title></head>
62 62 <body>
63 63 <h2>Redirection</h2>
64 64 <a href=\"$new_link\">The requested URL has moved here permanently.</a>
65 65 </body>
66 66 </html>
67 67 "
68 68             return
69 69         }
70 70     }
71 71
72 72     q-and-a {
73 73         # a topic
74 74         if { [db_0or1row get_new_forum_id $mapped_forum_sql] } {
75               #set new_link "[ad_conn location]$new_mount_point/forum?forum_id=:new_forum_id"
76               set new_link "[ad_conn location]$new_mount_point/forum-view?forum_id=:new_forum_id"
  75             #set new_link "[ad_conn location]$new_mount_point/forum?forum_id=$new_forum_id"
  76             set new_link "[ad_conn location]$new_mount_point/forum-view?forum_id=$new_forum_id"
77 77             ns_set put [ns_conn outputheaders] Location $new_link
78 78             ns_return 301 text/html "<html>
79 79 <head><title>Redirection</title></head>
80 80 <body>
81 81 <h2>Redirection</h2>
82 82 <a href=\"$new_link\">The requested URL has moved here permanently.</a>
83 83 </body>
84 84 </html>
85 85 "
86 86             return
87 87         }
88 88     }
89 89    
90 90     default {
91 91         ns_log notice "A request for [ad_conn url]?[ad_conn query] occured - you might want to add it to /bboard/index.vuh"
92 92     }
93 93 }
94 94
95 95
96 96 # No success above.