@@ -14,11 +14,13 @@ discard block |
||
14 | 14 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
15 | 15 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
16 | 16 | */ |
17 | -if (!defined('DOKU_INC')) |
|
17 | +if (!defined('DOKU_INC')) { |
|
18 | 18 | die (); |
19 | +} |
|
19 | 20 | |
20 | -if (!defined('DOKU_PLUGIN')) |
|
21 | +if (!defined('DOKU_PLUGIN')) { |
|
21 | 22 | define('DOKU_PLUGIN', DOKU_INC . 'lib/plugins/'); |
23 | +} |
|
22 | 24 | |
23 | 25 | require_once (DOKU_PLUGIN . 'syntax.php'); |
24 | 26 | /** |
@@ -115,8 +117,9 @@ discard block |
||
115 | 117 | * @see DokuWiki_Syntax_Plugin::render() |
116 | 118 | */ |
117 | 119 | public function render($mode, Doku_Renderer $renderer, $data) { |
118 | - if ($data === false) |
|
119 | - return false; |
|
120 | + if ($data === false) { |
|
121 | + return false; |
|
122 | + } |
|
120 | 123 | list ($lat, $lon, $alt, $geohash, $region, $placename, $country, $showlocation, $style) = $data; |
121 | 124 | $ddlat = $lat; |
122 | 125 | $ddlon = $lon; |
@@ -170,8 +173,9 @@ discard block |
||
170 | 173 | $renderer->meta ['geo'] ['alt'] = $alt; |
171 | 174 | return true; |
172 | 175 | } elseif ($mode == 'odt') { |
173 | - if (!empty ($alt)) |
|
174 | - $alt = ', ' . $alt . 'm'; |
|
176 | + if (!empty ($alt)) { |
|
177 | + $alt = ', ' . $alt . 'm'; |
|
178 | + } |
|
175 | 179 | $renderer->p_open(); |
176 | 180 | $renderer->_odtAddImage(DOKU_PLUGIN . 'geotag/images/geotag.png', null, null, 'left', ''); |
177 | 181 | $renderer->doc .= '<text:span>' . $this->getLang('geotag_desc') . ' ' . $placename . ': </text:span>'; |
@@ -21,12 +21,12 @@ |
||
21 | 21 | * @license BSD license |
22 | 22 | * @author Mark C. Prins <[email protected]> |
23 | 23 | */ |
24 | -$meta ['geotag_pinggeourl'] = array ('onoff'); |
|
25 | -$meta ['geotag_location_prefix'] = array ('string'); |
|
26 | -$meta ['geotag_showlocation'] = array ('onoff'); |
|
27 | -$meta ['geotag_hide'] = array ('onoff' ); |
|
28 | -$meta ['geotag_prevent_microformat_render'] = array ('onoff' ); |
|
29 | -$meta ['toolbar_icon'] = array ('onoff' ); |
|
30 | -$meta ['geotag_showsearch'] = array ('onoff' ); |
|
31 | -$meta ['displayformat'] = array ('multichoice', |
|
32 | - '_choices' => array ('DD','DMS') ); |
|
24 | +$meta ['geotag_pinggeourl'] = array('onoff'); |
|
25 | +$meta ['geotag_location_prefix'] = array('string'); |
|
26 | +$meta ['geotag_showlocation'] = array('onoff'); |
|
27 | +$meta ['geotag_hide'] = array('onoff'); |
|
28 | +$meta ['geotag_prevent_microformat_render'] = array('onoff'); |
|
29 | +$meta ['toolbar_icon'] = array('onoff'); |
|
30 | +$meta ['geotag_showsearch'] = array('onoff'); |
|
31 | +$meta ['displayformat'] = array('multichoice', |
|
32 | + '_choices' => array('DD', 'DMS')); |
@@ -29,7 +29,7 @@ |
||
29 | 29 | * Simple test to make sure the plugin.info.txt is in correct format |
30 | 30 | */ |
31 | 31 | public function test_plugininfo() { |
32 | - $file = __DIR__.'/../plugin.info.txt'; |
|
32 | + $file = __DIR__ . '/../plugin.info.txt'; |
|
33 | 33 | $this->assertFileExists($file); |
34 | 34 | |
35 | 35 | $info = confToHash($file); |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | global $conf; |
34 | 34 | $conf['allowdebug'] = 1; |
35 | 35 | |
36 | - TestUtils::rcopy(TMP_DIR, dirname(__FILE__).'/data/'); |
|
36 | + TestUtils::rcopy(TMP_DIR, dirname(__FILE__) . '/data/'); |
|
37 | 37 | |
38 | 38 | dbglog("\nset up class syntax_plugin_geotag_test"); |
39 | 39 | } |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | idx_addPage($val['id'], $verbose, $force); |
57 | 57 | } |
58 | 58 | if ($conf['allowdebug']) { |
59 | - touch(DOKU_TMP_DATA.'cache/debug.log'); |
|
59 | + touch(DOKU_TMP_DATA . 'cache/debug.log'); |
|
60 | 60 | } |
61 | 61 | } |
62 | 62 | |
@@ -67,12 +67,12 @@ discard block |
||
67 | 67 | // try to get the debug log after running the test, print and clear |
68 | 68 | if ($conf['allowdebug']) { |
69 | 69 | print "\n"; |
70 | - readfile(DOKU_TMP_DATA.'cache/debug.log'); |
|
71 | - unlink(DOKU_TMP_DATA.'cache/debug.log'); |
|
70 | + readfile(DOKU_TMP_DATA . 'cache/debug.log'); |
|
71 | + unlink(DOKU_TMP_DATA . 'cache/debug.log'); |
|
72 | 72 | } |
73 | 73 | } |
74 | 74 | |
75 | - public function test_geotag(){ |
|
75 | + public function test_geotag() { |
|
76 | 76 | $request = new TestRequest(); |
77 | 77 | $response = $request->get(array('id'=>'minimalgeotag'), '/doku.php'); |
78 | 78 | |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | ); |
90 | 90 | } |
91 | 91 | |
92 | - public function test_fullgeotag(){ |
|
92 | + public function test_fullgeotag() { |
|
93 | 93 | $request = new TestRequest(); |
94 | 94 | $response = $request->get(array('id'=>'fullgeotag'), '/doku.php'); |
95 | 95 |
@@ -162,7 +162,7 @@ |
||
162 | 162 | $url = 'http://geourl.org/ping/?p=' . wl($ID, '', true); |
163 | 163 | $http = new DokuHTTPClient(); |
164 | 164 | $result = $http->get($url); |
165 | - dbglog ($result, "GeoURL Ping response for $url"); |
|
165 | + dbglog($result, "GeoURL Ping response for $url"); |
|
166 | 166 | return $result; |
167 | 167 | } |
168 | 168 |