r50261 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r50260‎ | r50261 | r50262 >
Date:14:04, 6 May 2009
Author:yaron
Status:deferred
Tags:
Comment:
Added Ryan Lane's fix for disabling cache; more fixes for Special:Ask handling
Modified paths:
  • /trunk/extensions/SemanticResultFormats/Calendar/SRF_Calendar.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticResultFormats/Calendar/SRF_Calendar.php
@@ -149,6 +149,8 @@
150150 function displayCalendar($events) {
151151 global $wgOut, $srfgScriptPath, $wgParser, $wgRequest;
152152
 153+ $wgParser->disableCache();
 154+
153155 $wgOut->addLink( array(
154156 'rel' => 'stylesheet',
155157 'type' => 'text/css',
@@ -160,20 +162,22 @@
161163 // set variables differently depending on whether this is
162164 // being called from an #ask call or the Special:Ask page
163165 $page_title = $wgParser->getTitle();
 166+ $additional_query_string = '';
 167+ $hidden_inputs = '';
164168 $in_ask_page = is_null($page_title);
165169 if ($in_ask_page) {
166170 global $wgTitle;
167171 $page_title = $wgTitle;
168172 global $wgUser;
169173 $skin = $wgUser->getSkin();
170 - $additional_query_string = '';
171174 foreach ($wgRequest->getValues() as $key => $value) {
172 - if ($key != 'month' && $key != 'year')
 175+ if ($key != 'month' && $key != 'year') {
173176 $additional_query_string .= "&$key=$value";
 177+ $hidden_inputs .= "<input type=\"hidden\" name=\"$key\" value=\"$value\" />\n";
 178+ }
174179 }
175180 } else {
176181 $skin = $wgParser->getOptions()->getSkin();
177 - $additional_query_string = '';
178182 }
179183 // get all the date-based values we need - the current month
180184 // and year (i.e., the one the user is looking at - not
@@ -259,6 +263,7 @@
260264 $text .=<<<END
261265 </select>
262266 <input name="year" type="text" value="$cur_year" size="4">
 267+$hidden_inputs
263268 <input type="submit" value="$go_to_month_text">
264269 </form>
265270 </td>

Status & tagging log