Completed
Push — master ( c88803...96f363 )
by Mark
18s queued 15s
created
action.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
      */
32 32
     public function register(Doku_Event_Handler $controller) {
33 33
         $controller->register_hook('TPL_METAHEADER_OUTPUT', 'BEFORE', $this, 'handleMetaheaderOutput');
34
-        if($this->getConf('toolbar_icon')) {
34
+        if ($this->getConf('toolbar_icon')) {
35 35
             $controller->register_hook('TOOLBAR_DEFINE', 'AFTER', $this, 'insertButton', array());
36 36
         }
37 37
     }
@@ -58,20 +58,20 @@  discard block
 block discarded – undo
58 58
         $placename = $geotags ['placename'];
59 59
         $geohash   = $geotags ['geohash'];
60 60
 
61
-        if(!empty ($region)) {
61
+        if (!empty ($region)) {
62 62
             $event->data ['meta'] [] = array(
63 63
                 'name'    => 'geo.region',
64 64
                 'content' => $region
65 65
             );
66 66
         }
67
-        if(!empty ($placename)) {
67
+        if (!empty ($placename)) {
68 68
             $event->data ['meta'] [] = array(
69 69
                 'name'    => 'geo.placename',
70 70
                 'content' => $placename
71 71
             );
72 72
         }
73
-        if(!(empty ($lat) && empty ($lon))) {
74
-            if(!empty ($alt)) {
73
+        if (!(empty ($lat) && empty ($lon))) {
74
+            if (!empty ($alt)) {
75 75
                 $event->data ['meta'] [] = array(
76 76
                     'name'    => 'geo.position',
77 77
                     'content' => $lat . ';' . $lon . ';' . $alt
@@ -83,20 +83,20 @@  discard block
 block discarded – undo
83 83
                 );
84 84
             }
85 85
         }
86
-        if(!empty ($country)) {
86
+        if (!empty ($country)) {
87 87
             $event->data ['meta'] [] = array(
88 88
                 'name'    => 'geo.country',
89 89
                 'content' => $country
90 90
             );
91 91
         }
92
-        if(!(empty ($lat) && empty ($lon))) {
92
+        if (!(empty ($lat) && empty ($lon))) {
93 93
             $event->data ['meta'] [] = array(
94 94
                 'name'    => "ICBM",
95 95
                 'content' => $lat . ', ' . $lon
96 96
             );
97 97
             // icbm is generally useless without a DC.title,
98 98
             // so we copy that from title unless it's empty...
99
-            if(!(empty ($title))) {
99
+            if (!(empty ($title))) {
100 100
                 /*
101 101
                  * don't specify the DC namespace as this is incomplete; it should be done at the
102 102
                  * template level as it also needs a 'profile' attribute on the head/container,
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
                 );
111 111
             }
112 112
         }
113
-        if(!empty ($geohash)) {
113
+        if (!empty ($geohash)) {
114 114
             $event->data ['meta'] [] = array(
115 115
                 'name'    => 'geo.geohash',
116 116
                 'content' => $geohash
Please login to merge, or discard this patch.
syntax/geotag.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -72,21 +72,21 @@  discard block
 block discarded – undo
72 72
         preg_match("(hide|unhide)", $tags, $hide);
73 73
 
74 74
         $showlocation = $this->getConf('geotag_location_prefix');
75
-        if($this->getConf('geotag_showlocation')) {
75
+        if ($this->getConf('geotag_showlocation')) {
76 76
             $showlocation = trim(substr($placename [0], 10));
77
-            if(strlen($showlocation) < 1) {
77
+            if (strlen($showlocation) < 1) {
78 78
                 $showlocation = $this->getConf('geotag_location_prefix');
79 79
             }
80 80
         }
81 81
         // read config for system setting
82 82
         $style = '';
83
-        if($this->getConf('geotag_hide')) {
83
+        if ($this->getConf('geotag_hide')) {
84 84
             $style = ' style="display: none;"';
85 85
         }
86 86
         // override config for the current tag
87
-        if(array_key_exists(0, $hide) && trim($hide [0]) == 'hide') {
87
+        if (array_key_exists(0, $hide) && trim($hide [0]) == 'hide') {
88 88
             $style = ' style="display: none;"';
89
-        } elseif(array_key_exists(0, $hide) && trim($hide [0]) == 'unhide') {
89
+        } elseif (array_key_exists(0, $hide) && trim($hide [0]) == 'unhide') {
90 90
             $style = '';
91 91
         }
92 92
 
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
      * @param float $lon
112 112
      */
113 113
     private function geohash($lat, $lon) {
114
-        if(!$geophp = plugin_load('helper', 'geophp')) {
114
+        if (!$geophp = plugin_load('helper', 'geophp')) {
115 115
             dbglog($geophp, 'syntax_plugin_geotag_geotag::geohash: geophp plugin is not available.');
116 116
             return "";
117 117
         }
@@ -126,13 +126,13 @@  discard block
 block discarded – undo
126 126
      * @see DokuWiki_Syntax_Plugin::render()
127 127
      */
128 128
     public function render($mode, Doku_Renderer $renderer, $data) {
129
-        if($data === false) {
129
+        if ($data === false) {
130 130
             return false;
131 131
         }
132 132
         list ($lat, $lon, $alt, $geohash, $region, $placename, $country, $showlocation, $style) = $data;
133 133
         $ddlat = $lat;
134 134
         $ddlon = $lon;
135
-        if($this->getConf('displayformat') === 'DMS') {
135
+        if ($this->getConf('displayformat') === 'DMS') {
136 136
             $lat = $this->convertLat($lat);
137 137
             $lon = $this->convertLon($lon);
138 138
         } else {
@@ -140,14 +140,14 @@  discard block
 block discarded – undo
140 140
             $lon .= 'º';
141 141
         }
142 142
 
143
-        if($mode == 'xhtml') {
144
-            if($this->getConf('geotag_prevent_microformat_render')) {
143
+        if ($mode == 'xhtml') {
144
+            if ($this->getConf('geotag_prevent_microformat_render')) {
145 145
                 return true;
146 146
             }
147 147
             $searchPre  = '';
148 148
             $searchPost = '';
149
-            if($this->getConf('geotag_showsearch')) {
150
-                if($spHelper = &plugin_load('helper', 'spatialhelper_search')) {
149
+            if ($this->getConf('geotag_showsearch')) {
150
+                if ($spHelper = &plugin_load('helper', 'spatialhelper_search')) {
151 151
                     $title      = $this->getLang('findnearby') . '&nbsp;' . $placename;
152 152
                     $url        = wl(
153 153
                         getID(), array(
@@ -171,13 +171,13 @@  discard block
 block discarded – undo
171 171
                 . $lat . '</span>;';
172 172
             $renderer->doc .= '<span class="p-longitude longitude" itemprop="longitude" data-longitude="' . $ddlon
173 173
                 . '">' . $lon . '</span>';
174
-            if(!empty ($alt)) {
174
+            if (!empty ($alt)) {
175 175
                 $renderer->doc .= ', <span class="p-altitude altitude" itemprop="elevation" data-altitude="' . $alt
176 176
                     . '">' . $alt . 'm</span>';
177 177
             }
178 178
             $renderer->doc .= '</span>' . $searchPost . '</div>' . DOKU_LF;
179 179
             return true;
180
-        } elseif($mode == 'metadata') {
180
+        } elseif ($mode == 'metadata') {
181 181
             // render metadata (our action plugin will put it in the page head)
182 182
             $renderer->meta ['geo'] ['lat']       = $ddlat;
183 183
             $renderer->meta ['geo'] ['lon']       = $ddlon;
@@ -187,8 +187,8 @@  discard block
 block discarded – undo
187 187
             $renderer->meta ['geo'] ['geohash']   = $geohash;
188 188
             $renderer->meta ['geo'] ['alt']       = $alt;
189 189
             return true;
190
-        } elseif($mode == 'odt') {
191
-            if(!empty ($alt)) {
190
+        } elseif ($mode == 'odt') {
191
+            if (!empty ($alt)) {
192 192
                 $alt = ', ' . $alt . 'm';
193 193
             }
194 194
             $renderer->p_open();
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
      * @todo move this into a shared library
212 212
      */
213 213
     private function convertLat($decimaldegrees) {
214
-        if(strpos($decimaldegrees, '-') !== false) {
214
+        if (strpos($decimaldegrees, '-') !== false) {
215 215
             $latPos = "S";
216 216
         } else {
217 217
             $latPos = "N";
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
         $secs = ($decimaldegrees - $dms) * 3600;
233 233
         $min  = floor($secs / 60);
234 234
         $sec  = round($secs - ($min * 60), 3);
235
-        $dms  .= 'º' . $min . '\'' . $sec . '"';
235
+        $dms .= 'º' . $min . '\'' . $sec . '"';
236 236
         return $dms;
237 237
     }
238 238
 
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
      * @todo move this into a shared library
245 245
      */
246 246
     private function convertLon($decimaldegrees) {
247
-        if(strpos($decimaldegrees, '-') !== false) {
247
+        if (strpos($decimaldegrees, '-') !== false) {
248 248
             $lonPos = "W";
249 249
         } else {
250 250
             $lonPos = "E";
Please login to merge, or discard this patch.
_test/syntax.test.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -50,10 +50,10 @@  discard block
 block discarded – undo
50 50
 
51 51
         $verbose = false;
52 52
         $force   = false;
53
-        foreach($data as $val) {
53
+        foreach ($data as $val) {
54 54
             idx_addPage($val['id'], $verbose, $force);
55 55
         }
56
-        if($conf['allowdebug']) {
56
+        if ($conf['allowdebug']) {
57 57
             touch(DOKU_TMP_DATA . 'cache/debug.log');
58 58
         }
59 59
     }
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 
64 64
         global $conf;
65 65
         // try to get the debug log after running the test, print and clear
66
-        if($conf['allowdebug']) {
66
+        if ($conf['allowdebug']) {
67 67
             print "\n";
68 68
             readfile(DOKU_TMP_DATA . 'cache/debug.log');
69 69
             unlink(DOKU_TMP_DATA . 'cache/debug.log');
Please login to merge, or discard this patch.
lang/de/settings.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,5 +26,5 @@
 block discarded – undo
26 26
 $lang['geotag_hide']                       = 'Verstecken Geotag (css)';
27 27
 $lang['geotag_prevent_microformat_render'] = 'Verhindern Rendering Geotag Mikroformat';
28 28
 $lang['toolbar_icon']                      = 'Toolbar-Symbol anzeigen';
29
-$lang['geotag_showsearch']              = 'Geotag verknüpfen an Suchen in der Nähe (spatialhelper plugin erforderlich)';
29
+$lang['geotag_showsearch'] = 'Geotag verknüpfen an Suchen in der Nähe (spatialhelper plugin erforderlich)';
30 30
 $lang['displayformat']                     = 'Koordinaten Anzeigeformat; Dezimalgrad oder Grad, Minuten, Sekunden ';
Please login to merge, or discard this patch.
lang/nl/settings.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,4 +27,4 @@
 block discarded – undo
27 27
 $lang['geotag_prevent_microformat_render'] = 'Voorkom geotag microformat rendering';
28 28
 $lang['toolbar_icon']                      = 'Toon toolbar icon';
29 29
 $lang['geotag_showsearch']                 = 'Link geotag als zoekactie (spatialhelper plugin benodigd)';
30
-$lang['displayformat']                   = 'Coördinaten weergave formaat; decimale graden of graden, minuten, seconden';
30
+$lang['displayformat'] = 'Coördinaten weergave formaat; decimale graden of graden, minuten, seconden';
Please login to merge, or discard this patch.
lang/ru/settings.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -22,9 +22,9 @@
 block discarded – undo
22 22
  * @author  Aleksej Kozlov <[email protected]>
23 23
  */
24 24
 $lang['geotag_location_prefix']            = 'Текст, по умолчанию показываемый перед геотегом';
25
-$lang['geotag_showlocation']             = 'Показывать название местоположения в геотеге (вместо текста по умолчанию)';
25
+$lang['geotag_showlocation'] = 'Показывать название местоположения в геотеге (вместо текста по умолчанию)';
26 26
 $lang['geotag_hide']                       = 'Прятать геотег (средствами css)';
27 27
 $lang['geotag_prevent_microformat_render'] = 'Запретить рендеринг микроформата геотега';
28 28
 $lang['toolbar_icon']                      = 'Показывать иконку';
29
-$lang['geotag_showsearch']      = 'Геотег является ссылкой на страницу поиска около точки (нужен плагин spatialhelper)';
30
-$lang['displayformat']  = 'Формат отображения координат: DD - градусы с дробной частью, DMS - градусы, минуты, секунды';
29
+$lang['geotag_showsearch'] = 'Геотег является ссылкой на страницу поиска около точки (нужен плагин spatialhelper)';
30
+$lang['displayformat'] = 'Формат отображения координат: DD - градусы с дробной частью, DMS - градусы, минуты, секунды';
Please login to merge, or discard this patch.