@@ -93,8 +93,8 @@ function google_seo_redirect_hook()
9393 switch (THIS_SCRIPT )
9494 {
9595 case 'forumdisplay.php ' :
96- $ fid = (int )$ mybb ->input [ 'fid ' ] ;
97- $ page = (int )$ mybb ->input [ 'page ' ] ;
96+ $ fid = (int )$ mybb ->get_input ( 'fid ' ) ;
97+ $ page = (int )$ mybb ->get_input ( 'page ' ) ;
9898
9999 if ($ fid )
100100 {
@@ -126,29 +126,29 @@ function google_seo_redirect_hook()
126126 case 'showthread.php ' :
127127 // pid overrules tid, so we must check pid first,
128128 // even at the cost of an additional query.
129- if ((int )$ mybb ->input [ 'pid ' ] )
129+ if ((int )$ mybb ->get_input ( 'pid ' ) )
130130 {
131- $ tid = google_seo_tid ((int )$ mybb ->input [ 'pid ' ] ,
132- (int )$ mybb ->input [ 'tid ' ] ,
131+ $ tid = google_seo_tid ((int )$ mybb ->get_input ( 'pid ' ) ,
132+ (int )$ mybb ->get_input ( 'tid ' ) ,
133133 $ settings ['google_seo_redirect_posts ' ]);
134- $ target = get_post_link ((int )$ mybb ->input [ 'pid ' ] , $ tid );
134+ $ target = get_post_link ((int )$ mybb ->get_input ( 'pid ' ) , $ tid );
135135 $ kill ['pid ' ] = '' ;
136136 $ kill ['tid ' ] = '' ;
137137 $ kill ['google_seo_thread ' ] = '' ;
138138 $ kill ['google_seo ' ] = '' ;
139139 }
140140
141- else if ((int )$ mybb ->input [ 'tid ' ] )
141+ else if ((int )$ mybb ->get_input ( 'tid ' ) )
142142 {
143- $ target = get_thread_link ((int )$ mybb ->input [ 'tid ' ] ,
144- (int )$ mybb ->input [ 'page ' ] ,
145- (string )$ mybb ->input [ 'action ' ] );
143+ $ target = get_thread_link ((int )$ mybb ->get_input ( 'tid ' ) ,
144+ (int )$ mybb ->get_input ( 'page ' ) ,
145+ (string )$ mybb ->get_input ( 'action ' ) );
146146 $ kill ['tid ' ] = '' ;
147147 $ kill ['action ' ] = '' ;
148148 $ kill ['google_seo_thread ' ] = '' ;
149149 $ kill ['google_seo ' ] = '' ;
150150
151- if ($ mybb ->input [ 'page ' ] != 'last ' )
151+ if ($ mybb ->get_input ( 'page ' ) != 'last ' )
152152 {
153153 $ kill ['page ' ] = '' ;
154154 }
@@ -157,9 +157,9 @@ function google_seo_redirect_hook()
157157 break ;
158158
159159 case 'announcements.php ' :
160- if ((int )$ mybb ->input [ 'aid ' ] )
160+ if ((int )$ mybb ->get_input ( 'aid ' ) )
161161 {
162- $ target = get_announcement_link ((int )$ mybb ->input [ 'aid ' ] );
162+ $ target = get_announcement_link ((int )$ mybb ->get_input ( 'aid ' ) );
163163 $ kill ['aid ' ] = '' ;
164164 $ kill ['google_seo_announcement ' ] = '' ;
165165 $ kill ['google_seo ' ] = '' ;
@@ -168,21 +168,21 @@ function google_seo_redirect_hook()
168168 break ;
169169
170170 case 'member.php ' :
171- if ((int )$ mybb ->input [ 'uid ' ] )
171+ if ((int )$ mybb ->get_input ( 'uid ' ) )
172172 {
173173 if ($ settings ['google_seo_redirect_litespeed ' ]
174- && $ mybb ->input [ 'action ' ] != 'profile ' )
174+ && $ mybb ->get_input ( 'action ' ) != 'profile ' )
175175 {
176176 // Work around rewrite bug in LiteSpeed (double action conflict).
177177 break ;
178178 }
179179
180- $ target = get_profile_link ((int )$ mybb ->input [ 'uid ' ] );
180+ $ target = get_profile_link ((int )$ mybb ->get_input ( 'uid ' ) );
181181 $ kill ['uid ' ] = '' ;
182182 $ kill ['google_seo_user ' ] = '' ;
183183 $ kill ['google_seo ' ] = '' ;
184184
185- if ($ mybb ->input [ 'action ' ] == 'profile ' )
185+ if ($ mybb ->get_input ( 'action ' ) == 'profile ' )
186186 {
187187 $ kill ['action ' ] = '' ;
188188 }
@@ -191,29 +191,29 @@ function google_seo_redirect_hook()
191191 break ;
192192
193193 case 'calendar.php ' :
194- if ((int )$ mybb ->input [ 'eid ' ] )
194+ if ((int )$ mybb ->get_input ( 'eid ' ) )
195195 {
196196 if ($ settings ['google_seo_redirect_litespeed ' ]
197- && $ mybb ->input [ 'action ' ] != 'profile ' )
197+ && $ mybb ->get_input ( 'action ' ) != 'profile ' )
198198 {
199199 // Work around rewrite bug in LiteSpeed (double action conflict).
200200 break ;
201201 }
202202
203- $ target = get_event_link ((int )$ mybb ->input [ 'eid ' ] );
203+ $ target = get_event_link ((int )$ mybb ->get_input ( 'eid ' ) );
204204 $ kill ['eid ' ] = '' ;
205205 $ kill ['google_seo_event ' ] = '' ;
206206 $ kill ['google_seo ' ] = '' ;
207207
208- if ($ mybb ->input [ 'action ' ] == 'event ' )
208+ if ($ mybb ->get_input ( 'action ' ) == 'event ' )
209209 {
210210 $ kill ['action ' ] = '' ;
211211 }
212212 }
213213
214214 else
215215 {
216- if (!(int )$ mybb ->input [ 'calendar ' ] )
216+ if (!(int )$ mybb ->get_input ( 'calendar ' ) )
217217 {
218218 // Special case: Default calendar.
219219 // Code taken from calendar.php
@@ -224,10 +224,10 @@ function google_seo_redirect_hook()
224224 $ mybb ->input ['calendar ' ] = $ cid ;
225225 }
226226
227- if ($ mybb ->input [ 'action ' ] == "weekview " )
227+ if ($ mybb ->get_input ( 'action ' ) == "weekview " )
228228 {
229- $ target = get_calendar_week_link ((int )$ mybb ->input [ 'calendar ' ] ,
230- (int )str_replace ('n ' , '- ' , $ mybb ->input [ 'week ' ] ));
229+ $ target = get_calendar_week_link ((int )$ mybb ->get_input ( 'calendar ' ) ,
230+ (int )str_replace ('n ' , '- ' , $ mybb ->get_input ( 'week ' ) ));
231231 $ kill ['calendar ' ] = '' ;
232232 $ kill ['week ' ] = '' ;
233233 $ kill ['action ' ] = '' ;
@@ -237,10 +237,10 @@ function google_seo_redirect_hook()
237237
238238 else
239239 {
240- $ target = get_calendar_link ((int )$ mybb ->input [ 'calendar ' ] ,
241- (int )$ mybb ->input [ 'year ' ] ,
242- (int )$ mybb ->input [ 'month ' ] ,
243- (int )$ mybb ->input [ 'day ' ] );
240+ $ target = get_calendar_link ((int )$ mybb ->get_input ( 'calendar ' ) ,
241+ (int )$ mybb ->get_input ( 'year ' ) ,
242+ (int )$ mybb ->get_input ( 'month ' ) ,
243+ (int )$ mybb ->get_input ( 'day ' ) );
244244 $ kill ['calendar ' ] = '' ;
245245 $ kill ['year ' ] = '' ;
246246 $ kill ['month ' ] = '' ;
0 commit comments