@@ -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>'; |
@@ -54,7 +54,9 @@ |
||
54 | 54 | parent::tearDownAfterClass(); |
55 | 55 | |
56 | 56 | $log = file_get_contents(TMP_DIR . '/cache/debug.log'); |
57 | - if(!$log) print_r($log); |
|
57 | + if(!$log) { |
|
58 | + print_r($log); |
|
59 | + } |
|
58 | 60 | } |
59 | 61 | |
60 | 62 | public function setUp() { |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | $verbose = true; |
45 | 45 | $force = true; |
46 | 46 | foreach($data as $val) { |
47 | - print "======= adding page $val['id'] to index\n"; |
|
47 | + print "======= adding page $val['id'] to index\n"; |
|
48 | 48 | idx_addPage($val['id'], $verbose, $force); |
49 | 49 | } |
50 | 50 | |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | print_r(scandir(DOKU_TMP_DATA.'pages/')); |
55 | 55 | } |
56 | 56 | |
57 | - function setUp() { |
|
57 | + function setUp() { |
|
58 | 58 | parent::setUp(); |
59 | 59 | |
60 | 60 | global $conf; |
@@ -75,8 +75,8 @@ discard block |
||
75 | 75 | $indexer = idx_get_indexer(); |
76 | 76 | $query = array('Bob Ross'); |
77 | 77 | $this->assertEquals( |
78 | - array('Bob Ross' => array('link' => 1)), |
|
79 | - $indexer->lookup($query) |
|
78 | + array('Bob Ross' => array('link' => 1)), |
|
79 | + $indexer->lookup($query) |
|
80 | 80 | ); |
81 | 81 | |
82 | 82 | print_r($indexer->lookup($query)); |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | strpos($response->getContent(), 'A link to Bob Ross') !== false, |
100 | 100 | 'A link to Bob Ross was not in the output' |
101 | 101 | ); |
102 | - } |
|
102 | + } |
|
103 | 103 | |
104 | 104 | public function testStoryPage() { |
105 | 105 | $request = new TestRequest(); |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | //print "wikilink[0]:\n"; |
121 | 121 | //print_r(pq($wikilink->contents()[0], $doc)); |
122 | 122 | $this->assertEquals($wikilink->contents()[3],'A link to Bob Ross', |
123 | - 'The last backlink should be a link to Bob Ross'); |
|
123 | + 'The last backlink should be a link to Bob Ross'); |
|
124 | 124 | } |
125 | 125 | |
126 | 126 | public function testBacklinks() { |
@@ -142,6 +142,6 @@ discard block |
||
142 | 142 | //print "wikilink[0]:\n"; |
143 | 143 | //print_r(pq($wikilink->contents()[0], $doc)); |
144 | 144 | $this->assertEquals($wikilink->contents()[3],'A link to Bob Ross', |
145 | - 'The last backlink should be a link to Bob Ross'); |
|
145 | + 'The last backlink should be a link to Bob Ross'); |
|
146 | 146 | } |
147 | 147 | } |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | //print_r(scandir(DOKU_TMP_DATA.'pages/')); |
51 | 51 | } |
52 | 52 | |
53 | - function setUp() { |
|
53 | + function setUp() { |
|
54 | 54 | parent::setUp(); |
55 | 55 | |
56 | 56 | global $conf; |
@@ -87,6 +87,6 @@ discard block |
||
87 | 87 | $wikilink = pq('.idx .li .wikilink1', $doc); |
88 | 88 | $this->assertEquals(1, $wikilink->length, 'There should be 1 backlink'); |
89 | 89 | $this->assertEquals($wikilink->contents()[0],'An included link to Bob Ross', |
90 | - 'There should be a link to "An included link to Bob Ross"'); |
|
90 | + 'There should be a link to "An included link to Bob Ross"'); |
|
91 | 91 | } |
92 | 92 | } |
@@ -54,7 +54,9 @@ |
||
54 | 54 | parent::tearDownAfterClass(); |
55 | 55 | |
56 | 56 | $log = file_get_contents(TMP_DIR . '/cache/debug.log'); |
57 | - if(!$log) print_r($log); |
|
57 | + if(!$log) { |
|
58 | + print_r($log); |
|
59 | + } |
|
58 | 60 | } |
59 | 61 | |
60 | 62 | public function setUp() { |
@@ -50,7 +50,7 @@ |
||
50 | 50 | //print_r(scandir(DOKU_TMP_DATA.'pages/')); |
51 | 51 | } |
52 | 52 | |
53 | - function setUp() { |
|
53 | + function setUp() { |
|
54 | 54 | parent::setUp(); |
55 | 55 | |
56 | 56 | global $conf; |
@@ -54,7 +54,9 @@ |
||
54 | 54 | parent::tearDownAfterClass(); |
55 | 55 | |
56 | 56 | $log = file_get_contents(TMP_DIR . '/cache/debug.log'); |
57 | - if(!$log) print_r($log); |
|
57 | + if(!$log) { |
|
58 | + print_r($log); |
|
59 | + } |
|
58 | 60 | } |
59 | 61 | |
60 | 62 | public function setUp() { |