@@ -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 | |
@@ -117,8 +117,9 @@ |
||
| 117 | 117 | * @see DokuWiki_Syntax_Plugin::render() |
| 118 | 118 | */ |
| 119 | 119 | public function render($mode, Doku_Renderer $renderer, $data) { |
| 120 | - if ($data === false) |
|
| 121 | - return false; |
|
| 120 | + if ($data === false) { |
|
| 121 | + return false; |
|
| 122 | + } |
|
| 122 | 123 | list ($lat, $lon, $alt, $geohash, $region, $placename, $country, $showlocation, $style) = $data; |
| 123 | 124 | $ddlat = $lat; |
| 124 | 125 | $ddlon = $lon; |