Index: trunk/extensions/SemanticMediaWiki/includes/SMW_Infolink.php |
— | — | @@ -142,7 +142,7 @@ |
143 | 143 | } else { // SMW_OUTPUT_HTML, SMW_OUTPUT_FILE |
144 | 144 | $link = $this->getLinker($linker)->makeKnownLinkObj($title, $this->m_caption); |
145 | 145 | } |
146 | | - } else { // Title creation failed, maybe illegal symbols or too long; make a direct URL link |
| 146 | + } else { // Title creation failed, maybe illegal symbols or too long; make a direct URL link |
147 | 147 | // (only possible if offending target parts belong to some parameter |
148 | 148 | // that can be separated from title text, |
149 | 149 | // e.g. as in Special:Bla/il<leg>al -> Special:Bla&p=il<leg>al) |
— | — | @@ -172,7 +172,7 @@ |
173 | 173 | /** |
174 | 174 | * Return hyperlink for this infolink in HTML format. |
175 | 175 | */ |
176 | | - public function getHTML($linker) { |
| 176 | + public function getHTML($linker = NULL) { |
177 | 177 | return $this->getText(SMW_OUTPUT_HTML, $linker); |
178 | 178 | } |
179 | 179 | |
— | — | @@ -213,7 +213,7 @@ |
214 | 214 | |
215 | 215 | /** |
216 | 216 | * Return a Linker object, using the parameter $linker if not NULL, and creatng a new one |
217 | | - * otherwise. $linker is usually a user skin object, while the fallback linker object is |
| 217 | + * otherwise. $linker is usually a user skin object, while the fallback linker object is |
218 | 218 | * not customised to user settings. |
219 | 219 | */ |
220 | 220 | protected function getLinker(&$linker = NULL) { |
— | — | @@ -242,21 +242,21 @@ |
243 | 243 | if ($forTitle) { |
244 | 244 | foreach ($params as $name => $value) { |
245 | 245 | if ( is_string($name) && ($name != '') ) $value = $name . '=' . $value; |
246 | | - // Escape certain problematic values. Use SMW-escape |
| 246 | + // Escape certain problematic values. Use SMW-escape |
247 | 247 | // (like URLencode but - instead of % to prevent double encoding by later MW actions) |
248 | 248 | // |
249 | 249 | // / : SMW's parameter separator, must not occur within params |
250 | 250 | // - : used in SMW-encoding strings, needs escaping too |
251 | 251 | // [ ] < > < > '' |: problematic in MW titles |
252 | 252 | // & : sometimes problematic in MW titles ([[&]] is OK, [[&test]] is OK, [[&test;]] is not OK) |
253 | | - // (Note: '&' in strings obtained during parsing already has &entities; replaced by |
| 253 | + // (Note: '&' in strings obtained during parsing already has &entities; replaced by |
254 | 254 | // UTF8 anyway) |
255 | 255 | // ' ': are equivalent with '_' in MW titles, but are not equivalent in certain parameter values |
256 | 256 | // "\n": real breaks not possible in [[...]] |
257 | 257 | // "#": has special meaning in URLs, triggers additional MW escapes (using . for %) |
258 | | - // '%': must be escaped to prevent any impact of double decoding when replacing - |
| 258 | + // '%': must be escaped to prevent any impact of double decoding when replacing - |
259 | 259 | // by % before urldecode |
260 | | - // '?': if not escaped, strange effects were observed on some sites (printout and other |
| 260 | + // '?': if not escaped, strange effects were observed on some sites (printout and other |
261 | 261 | // parameters ignored without obvious cause); SMW-escaping is always save to do -- it just |
262 | 262 | // make URLs less readable |
263 | 263 | // |
— | — | @@ -291,18 +291,18 @@ |
292 | 292 | * to recover the proper paramter strings after encoding for use in wiki title names |
293 | 293 | * as done by SMWInfolink::encodeParameters(). |
294 | 294 | * |
295 | | - * If $allparams is set to true, it is assumed that further data should be obtained |
| 295 | + * If $allparams is set to true, it is assumed that further data should be obtained |
296 | 296 | * from the global $wgRequest, and all given parameters are read. |
297 | 297 | * |
298 | | - * $titleparam is the string extracted by MediaWiki from special page calls of the |
| 298 | + * $titleparam is the string extracted by MediaWiki from special page calls of the |
299 | 299 | * form Special:Something/titleparam |
300 | 300 | * Note: it is assumed that the given $titleparam is already urldecoded, as is normal |
301 | | - * when getting such parameters from MediaWiki. SMW-escaped parameters largely prevent |
| 301 | + * when getting such parameters from MediaWiki. SMW-escaped parameters largely prevent |
302 | 302 | * double decoding effects (i.e. there are no new "%" after one pass of urldecoding) |
303 | 303 | * |
304 | | - * The function SMWInfolink::encodeParameters() can be used to create a suitable |
305 | | - * encoding. It is strongly recommended to not create any code that depends on the |
306 | | - * concrete way of how parameters are encoded within this function, and to always use |
| 304 | + * The function SMWInfolink::encodeParameters() can be used to create a suitable |
| 305 | + * encoding. It is strongly recommended to not create any code that depends on the |
| 306 | + * concrete way of how parameters are encoded within this function, and to always use |
307 | 307 | * the respective encoding/decoding methods instead. |
308 | 308 | */ |
309 | 309 | static public function decodeParameters($titleparam = '', $allparams = false) { |