Skip to content

Commit

Permalink
Merge pull request #7 from mprins/scrutinizer-patch-1
Browse files Browse the repository at this point in the history
Scrutinizer Auto-Fixes
  • Loading branch information
mprins committed Aug 29, 2016
2 parents 9f9ee9b + 3cc1075 commit bc7daf7
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 18 deletions.
2 changes: 1 addition & 1 deletion _test/general.test.php
Expand Up @@ -29,7 +29,7 @@ class general_plugin_geotag_test extends DokuWikiTest {
* Simple test to make sure the plugin.info.txt is in correct format
*/
public function test_plugininfo() {
$file = __DIR__.'/../plugin.info.txt';
$file = __DIR__ . '/../plugin.info.txt';
$this->assertFileExists($file);

$info = confToHash($file);
Expand Down
12 changes: 6 additions & 6 deletions _test/syntax.test.php
Expand Up @@ -33,7 +33,7 @@ public static function setUpBeforeClass() {
global $conf;
$conf['allowdebug'] = 1;

TestUtils::rcopy(TMP_DIR, dirname(__FILE__).'/data/');
TestUtils::rcopy(TMP_DIR, dirname(__FILE__) . '/data/');

dbglog("\nset up class syntax_plugin_geotag_test");
}
Expand All @@ -54,7 +54,7 @@ function setUp() {
idx_addPage($val['id'], $verbose, $force);
}
if ($conf['allowdebug']) {
touch(DOKU_TMP_DATA.'cache/debug.log');
touch(DOKU_TMP_DATA . 'cache/debug.log');
}
}

Expand All @@ -65,12 +65,12 @@ public function tearDown() {
// try to get the debug log after running the test, print and clear
if ($conf['allowdebug']) {
print "\n";
readfile(DOKU_TMP_DATA.'cache/debug.log');
unlink(DOKU_TMP_DATA.'cache/debug.log');
readfile(DOKU_TMP_DATA . 'cache/debug.log');
unlink(DOKU_TMP_DATA . 'cache/debug.log');
}
}

public function test_geotag(){
public function test_geotag() {
$request = new TestRequest();
$response = $request->get(array('id'=>'minimalgeotag'), '/doku.php');

Expand All @@ -87,7 +87,7 @@ public function test_geotag(){
);
}

public function test_fullgeotag(){
public function test_fullgeotag() {
$request = new TestRequest();
$response = $request->get(array('id'=>'fullgeotag'), '/doku.php');

Expand Down
18 changes: 9 additions & 9 deletions conf/metadata.php
Expand Up @@ -21,12 +21,12 @@
* @license BSD license
* @author Mark C. Prins <mprins@users.sf.net>
*/
$meta ['geotag_pinggeourl'] = array ('onoff');
$meta ['geotag_location_prefix'] = array ('string');
$meta ['geotag_showlocation'] = array ('onoff');
$meta ['geotag_hide'] = array ('onoff' );
$meta ['geotag_prevent_microformat_render'] = array ('onoff' );
$meta ['toolbar_icon'] = array ('onoff' );
$meta ['geotag_showsearch'] = array ('onoff' );
$meta ['displayformat'] = array ('multichoice',
'_choices' => array ('DD','DMS') );
$meta ['geotag_pinggeourl'] = array('onoff');
$meta ['geotag_location_prefix'] = array('string');
$meta ['geotag_showlocation'] = array('onoff');
$meta ['geotag_hide'] = array('onoff');
$meta ['geotag_prevent_microformat_render'] = array('onoff');
$meta ['toolbar_icon'] = array('onoff');
$meta ['geotag_showsearch'] = array('onoff');
$meta ['displayformat'] = array('multichoice',
'_choices' => array('DD', 'DMS'));
5 changes: 3 additions & 2 deletions syntax/geotag.php
Expand Up @@ -117,8 +117,9 @@ public function handle($match, $state, $pos, Doku_Handler $handler) {
* @see DokuWiki_Syntax_Plugin::render()
*/
public function render($mode, Doku_Renderer $renderer, $data) {
if ($data === false)
return false;
if ($data === false) {
return false;
}
list ($lat, $lon, $alt, $geohash, $region, $placename, $country, $showlocation, $style) = $data;
$ddlat = $lat;
$ddlon = $lon;
Expand Down

0 comments on commit bc7daf7

Please sign in to comment.