@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | */ |
| 31 | 31 | public function intuitionMessage($message = "", $vars = []) |
| 32 | 32 | { |
| 33 | - return $this->getIntuition()->msg($message, [ "domain" => "xtools", "variables" => $vars ]); |
|
| 33 | + return $this->getIntuition()->msg($message, ["domain" => "xtools", "variables" => $vars]); |
|
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | /*********************************** FUNCTIONS ***********************************/ |
@@ -41,18 +41,18 @@ discard block |
||
| 41 | 41 | */ |
| 42 | 42 | public function getFunctions() |
| 43 | 43 | { |
| 44 | - $options = [ 'is_safe' => [ 'html']]; |
|
| 44 | + $options = ['is_safe' => ['html']]; |
|
| 45 | 45 | return [ |
| 46 | - new Twig_SimpleFunction('wiki_link', [ $this, 'wikiLink' ], $options), |
|
| 47 | - new Twig_SimpleFunction('user_link', [ $this, 'userLink' ], $options), |
|
| 48 | - new Twig_SimpleFunction('user_log_link', [ $this, 'userLogLink' ], $options), |
|
| 49 | - new Twig_SimpleFunction('group_link', [ $this, 'groupLink' ], $options), |
|
| 50 | - new Twig_SimpleFunction('wiki_history_link', [ $this, 'wikiHistoryLink' ], $options), |
|
| 51 | - new Twig_SimpleFunction('wiki_log_link', [ $this, 'wikiLogLink' ], $options), |
|
| 52 | - new Twig_SimpleFunction('pageviews_links', [ $this, 'pageviewsLinks' ], $options), |
|
| 53 | - new Twig_SimpleFunction('diff_link', [ $this, 'diffLink' ], $options), |
|
| 54 | - new Twig_SimpleFunction('perma_link', [ $this, 'permaLink' ], $options), |
|
| 55 | - new Twig_SimpleFunction('edit_link', [ $this, 'editLink' ], $options), |
|
| 46 | + new Twig_SimpleFunction('wiki_link', [$this, 'wikiLink'], $options), |
|
| 47 | + new Twig_SimpleFunction('user_link', [$this, 'userLink'], $options), |
|
| 48 | + new Twig_SimpleFunction('user_log_link', [$this, 'userLogLink'], $options), |
|
| 49 | + new Twig_SimpleFunction('group_link', [$this, 'groupLink'], $options), |
|
| 50 | + new Twig_SimpleFunction('wiki_history_link', [$this, 'wikiHistoryLink'], $options), |
|
| 51 | + new Twig_SimpleFunction('wiki_log_link', [$this, 'wikiLogLink'], $options), |
|
| 52 | + new Twig_SimpleFunction('pageviews_links', [$this, 'pageviewsLinks'], $options), |
|
| 53 | + new Twig_SimpleFunction('diff_link', [$this, 'diffLink'], $options), |
|
| 54 | + new Twig_SimpleFunction('perma_link', [$this, 'permaLink'], $options), |
|
| 55 | + new Twig_SimpleFunction('edit_link', [$this, 'editLink'], $options), |
|
| 56 | 56 | ]; |
| 57 | 57 | } |
| 58 | 58 | |
@@ -277,8 +277,8 @@ discard block |
||
| 277 | 277 | public function getFilters() |
| 278 | 278 | { |
| 279 | 279 | return [ |
| 280 | - new \Twig_SimpleFilter('diff_format', [ $this, 'diffFormat' ], [ 'is_safe' => [ 'html' ] ]), |
|
| 281 | - new \Twig_SimpleFilter('wikify_comment', [ $this, 'wikifyComment' ], [ 'is_safe' => [ 'html' ] ]), |
|
| 280 | + new \Twig_SimpleFilter('diff_format', [$this, 'diffFormat'], ['is_safe' => ['html']]), |
|
| 281 | + new \Twig_SimpleFilter('wikify_comment', [$this, 'wikifyComment'], ['is_safe' => ['html']]), |
|
| 282 | 282 | ]; |
| 283 | 283 | } |
| 284 | 284 | |
@@ -317,7 +317,7 @@ discard block |
||
| 317 | 317 | if ($isSection) { |
| 318 | 318 | $sectionTitle = $sectionMatch[1][0]; |
| 319 | 319 | $sectionTitleLink = str_replace(' ', '_', $sectionTitle); |
| 320 | - $sectionWikitext = "<a target='_blank' href='$projectUrl/wiki/$title#$sectionTitleLink'>→</a>" . |
|
| 320 | + $sectionWikitext = "<a target='_blank' href='$projectUrl/wiki/$title#$sectionTitleLink'>→</a>". |
|
| 321 | 321 | "<em class='text-muted'>$sectionTitle:</em> "; |
| 322 | 322 | $wikitext = str_replace($sectionMatch[0][0], $sectionWikitext, $wikitext); |
| 323 | 323 | } |