@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | $match = substr($match, 12, -2); |
64 | 64 | |
65 | 65 | $includeNS = ''; |
66 | - if(strstr($match, "#")) { |
|
66 | + if (strstr($match, "#")) { |
|
67 | 67 | $includeNS = substr(strstr($match, "#", false), 1); |
68 | 68 | $match = strstr($match, "#", true); |
69 | 69 | } |
@@ -83,38 +83,38 @@ discard block |
||
83 | 83 | |
84 | 84 | $id = $ID; |
85 | 85 | // If it's a sidebar, get the original id. |
86 | - if($INFO != null) { |
|
86 | + if ($INFO != null) { |
|
87 | 87 | $id = $INFO['id']; |
88 | 88 | } |
89 | 89 | $match = $data[0]; |
90 | 90 | $match = ($match == '.') ? $id : $match; |
91 | - if(strstr($match, ".:")) { |
|
91 | + if (strstr($match, ".:")) { |
|
92 | 92 | resolve_pageid(getNS($id), $match, $exists); |
93 | 93 | } |
94 | 94 | |
95 | - if($format == 'xhtml') { |
|
95 | + if ($format == 'xhtml') { |
|
96 | 96 | $renderer->info['cache'] = false; |
97 | 97 | |
98 | 98 | $backlinks = ft_backlinks($match); |
99 | 99 | |
100 | 100 | dbglog($backlinks, "backlinks: all backlinks to: $match"); |
101 | 101 | |
102 | - $renderer->doc .= '<div id="plugin__backlinks">' . "\n"; |
|
102 | + $renderer->doc .= '<div id="plugin__backlinks">'."\n"; |
|
103 | 103 | |
104 | 104 | $filterNS = $data[1]; |
105 | - if(!empty($backlinks) && !empty($filterNS)) { |
|
106 | - if(stripos($filterNS, "!", 0) === 0) { |
|
105 | + if (!empty($backlinks) && !empty($filterNS)) { |
|
106 | + if (stripos($filterNS, "!", 0) === 0) { |
|
107 | 107 | $filterNS = substr($filterNS, 1); |
108 | 108 | dbglog($filterNS, "backlinks: exluding all of namespace: $filterNS"); |
109 | 109 | $backlinks = array_filter( |
110 | - $backlinks, function ($ns) use ($filterNS) { |
|
110 | + $backlinks, function($ns) use ($filterNS) { |
|
111 | 111 | return stripos($ns, $filterNS, 0) !== 0; |
112 | 112 | } |
113 | 113 | ); |
114 | 114 | } else { |
115 | 115 | dbglog($filterNS, "backlinks: including namespace: $filterNS only"); |
116 | 116 | $backlinks = array_filter( |
117 | - $backlinks, function ($ns) use ($filterNS) { |
|
117 | + $backlinks, function($ns) use ($filterNS) { |
|
118 | 118 | return stripos($ns, $filterNS, 0) === 0; |
119 | 119 | } |
120 | 120 | ); |
@@ -123,26 +123,26 @@ discard block |
||
123 | 123 | |
124 | 124 | dbglog($backlinks, "backlinks: all backlinks to be rendered"); |
125 | 125 | |
126 | - if(!empty($backlinks)) { |
|
126 | + if (!empty($backlinks)) { |
|
127 | 127 | |
128 | 128 | $renderer->doc .= '<ul class="idx">'; |
129 | 129 | |
130 | - foreach($backlinks as $backlink) { |
|
130 | + foreach ($backlinks as $backlink) { |
|
131 | 131 | $name = p_get_metadata($backlink, 'title'); |
132 | - if(empty($name)) { |
|
132 | + if (empty($name)) { |
|
133 | 133 | $name = $backlink; |
134 | 134 | } |
135 | 135 | $renderer->doc .= '<li><div class="li">'; |
136 | - $renderer->doc .= html_wikilink(':' . $backlink, $name); |
|
137 | - $renderer->doc .= '</div></li>' . "\n"; |
|
136 | + $renderer->doc .= html_wikilink(':'.$backlink, $name); |
|
137 | + $renderer->doc .= '</div></li>'."\n"; |
|
138 | 138 | } |
139 | 139 | |
140 | - $renderer->doc .= '</ul>' . "\n"; |
|
140 | + $renderer->doc .= '</ul>'."\n"; |
|
141 | 141 | } else { |
142 | - $renderer->doc .= "<strong>Plugin Backlinks: " . $lang['nothingfound'] . "</strong>" . "\n"; |
|
142 | + $renderer->doc .= "<strong>Plugin Backlinks: ".$lang['nothingfound']."</strong>"."\n"; |
|
143 | 143 | } |
144 | 144 | |
145 | - $renderer->doc .= '</div>' . "\n"; |
|
145 | + $renderer->doc .= '</div>'."\n"; |
|
146 | 146 | |
147 | 147 | return true; |
148 | 148 | } |