@@ -13,10 +13,16 @@ discard block |
||
13 | 13 | * @author Michael Klier <[email protected]> |
14 | 14 | * @author Mark C. Prins <[email protected]> |
15 | 15 | */ |
16 | -if(!defined('DOKU_INC')) die(); |
|
16 | +if(!defined('DOKU_INC')) { |
|
17 | + die(); |
|
18 | +} |
|
17 | 19 | |
18 | -if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/'); |
|
19 | -if(!defined('DW_LF')) define('DW_LF',"\n"); |
|
20 | +if(!defined('DOKU_PLUGIN')) { |
|
21 | + define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/'); |
|
22 | +} |
|
23 | +if(!defined('DW_LF')) { |
|
24 | + define('DW_LF',"\n"); |
|
25 | +} |
|
20 | 26 | |
21 | 27 | require_once(DOKU_PLUGIN.'syntax.php'); |
22 | 28 | require_once(DOKU_INC.'inc/parserutils.php'); |
@@ -119,7 +125,9 @@ discard block |
||
119 | 125 | |
120 | 126 | foreach($backlinks as $backlink){ |
121 | 127 | $name = p_get_metadata($backlink,'title'); |
122 | - if(empty($name)) $name = $backlink; |
|
128 | + if(empty($name)) { |
|
129 | + $name = $backlink; |
|
130 | + } |
|
123 | 131 | $renderer->doc .= '<li><div class="li">'; |
124 | 132 | $renderer->doc .= html_wikilink(':'.$backlink,$name,''); |
125 | 133 | $renderer->doc .= '</div></li>'; |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | strpos($response->getContent(), 'A link to Bob Ross') !== false, |
104 | 104 | 'A link to Bob Ross was not in the output' |
105 | 105 | ); |
106 | - } |
|
106 | + } |
|
107 | 107 | |
108 | 108 | public function testBacklinks() { |
109 | 109 | $request = new TestRequest(); |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | //print "wikilink[0]:\n"; |
127 | 127 | //print_r(pq($wikilink->contents()[0], $doc)); |
128 | 128 | $this->assertEquals($wikilink->contents()[0],'A link to Bob Ross', |
129 | - 'There should be a link to Bob Ross'); |
|
129 | + 'There should be a link to Bob Ross'); |
|
130 | 130 | } |
131 | 131 | |
132 | 132 | public function testInclude() { |