Skip to content
This repository was archived by the owner on May 24, 2021. It is now read-only.

Commit d99c612

Browse files
committed
Merge branch 'release/1.1.0'
2 parents fd0f5c9 + ce5f31f commit d99c612

File tree

15 files changed

+1454
-26
lines changed

15 files changed

+1454
-26
lines changed

.tx/config

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[main]
2+
host = https://www.transifex.com
3+
lang_map = es: es_ES, fr:fr_FR, uz: uz_UZ, vi: vi_VN
4+
5+
[zenfusionmaps.zenfusionmaps]
6+
file_filter = langs/<lang>/zenfusionmaps.lang
7+
source_file = langs/en_US/zenfusionmaps.lang
8+
source_lang = en_US
9+
type = MOZILLAPROPERTIES

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Prerequisites
2020
License
2121
-------
2222

23-
Copyright (C) 2013-2014 GPC.solutions
23+
Copyright (C) 2013-2016 GPC.solutions
2424

2525
GPLv3 or (at your option) any later version.
2626

admin/about.php

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
/*
33
* ZenFusion Maps - A Google Maps module for Dolibarr
4-
* Copyright (C) 2013-2014 Raphaël Doursenaud <csalvador@gpcsolutions.fr>
4+
* Copyright (C) 2013-2016 Raphaël Doursenaud <csalvador@gpcsolutions.fr>
55
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
66
*
77
* This program is free software: you can redistribute it and/or modify
@@ -24,17 +24,9 @@
2424
* \brief Module about page
2525
*/
2626

27-
$res = 0;
28-
// from standard dolibarr install
29-
if (! $res && file_exists("../../main.inc.php")) {
30-
$res = @include("../../main.inc.php");
31-
}
32-
// from custom dolibarr install
33-
if (! $res && file_exists("../../../main.inc.php")) {
34-
$res = @include("../../../main.inc.php");
35-
}
36-
if (! $res) {
37-
die("Main include failed");
27+
// Load Dolibarr environment
28+
if (false === (@include '../../main.inc.php')) { // From htdocs directory
29+
require '../../../main.inc.php'; // From "custom" directory
3830
}
3931

4032
require_once '../core/modules/modZenFusionMaps.class.php';
@@ -78,7 +70,7 @@
7870
echo '<h3>', $langs->trans("Module105005Name"), '</h3>',
7971
'<em>', $langs->trans("Version"), ' ',
8072
$langs->trans($module->version), '</em><br>',
81-
'<em>&copy;2013-2014 GPC.solutions<br><em>',
73+
'<em>&copy;2013-2016 GPC.solutions<br><em>',
8274
'<a target="_blank" href="http://www.zenfusion.net/">',
8375
'<img src="../img/logo_zf.png" alt="Logo ZenFusion"></a>',
8476

@@ -124,4 +116,6 @@
124116
'&copy;2010-2014 GPC.solutions',
125117
'</li>',
126118
'</ul>';
119+
120+
dol_fiche_end();
127121
llxFooter();

class/actions_zenfusionmaps.class.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?php
22
/*
33
* ZenFusion Maps - A Google Maps module for Dolibarr
4-
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
5-
* Copyright (C) 2014 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
4+
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
5+
* Copyright (C) 2014-2016 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
66
*
77
* This program is free software: you can redistribute it and/or modify
88
* it under the terms of the GNU General Public License as published by
@@ -189,7 +189,7 @@ public function printAddress($parameters, $object, &$action)
189189
$id = $parameters['id'];
190190

191191
$staticobject = null;
192-
if ($element == 'thirdparty') {
192+
if ('thirdparty' == $element || 'societe' == $element) {
193193
require_once DOL_DOCUMENT_ROOT . '/societe/class/societe.class.php';
194194
$staticobject = new Societe($this->db);
195195
} elseif ($element == 'contact') {
@@ -203,7 +203,7 @@ public function printAddress($parameters, $object, &$action)
203203
return 0;
204204
}
205205

206-
// Get the full object so we can extract zip, town and coutry
206+
// Get the full object so we can extract zip, town and country
207207
$staticobject->fetch($id);
208208

209209
$maps_address = $object;

core/modules/modZenFusionMaps.class.php

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?php
22
/*
33
* ZenFusion Maps - A Google Maps module for Dolibarr
4-
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
5-
* Copyright (C) 2014 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
4+
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
5+
* Copyright (C) 2014-2016 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
66
*
77
* This program is free software: you can redistribute it and/or modify
88
* it under the terms of the GNU General Public License as published by
@@ -58,7 +58,7 @@ public function __construct($db)
5858
$this->family = "other";
5959
$this->name = preg_replace('/^mod/i', '', get_class($this));
6060
$this->description = "Google Maps";
61-
$this->version = '1.0.0';
61+
$this->version = '1.1.0';
6262
$this->const_name = 'MAIN_MODULE_' . strtoupper($this->name);
6363
$this->special = 1; // Interface
6464
$this->picto = 'maps@zenfusionmaps';
@@ -97,11 +97,12 @@ public function __construct($db)
9797
* The init function add constants, boxes, permissions and menus (defined in constructor) into Dolibarr database.
9898
* It also creates data directories.
9999
*
100-
* @param string $options Options when enabling module ('', 'noboxes')
101-
*
100+
* @param string $options Options when enabling module ('', 'newboxdefonly', 'noboxes')
101+
* 'noboxes' = Do not insert boxes
102+
* 'newboxdefonly' = For boxes, insert def of boxes only and not boxes activation
102103
* @return int 1 if OK, 0 if KO
103104
*/
104-
public function init($options='')
105+
public function init($options = '')
105106
{
106107
$sql = array();
107108
return $this->_init($sql, $options);
@@ -112,11 +113,12 @@ public function init($options='')
112113
* Remove from database constants, boxes and permissions from Dolibarr database.
113114
* Data directories are not deleted.
114115
*
116+
* @param string $options Options when enabling module ('', 'noboxes')
115117
* @return int 1 if OK, 0 if KO
116118
*/
117-
public function remove()
119+
public function remove($options = '')
118120
{
119121
$sql = array();
120-
return $this->_remove($sql);
122+
return $this->_remove($sql, $options);
121123
}
122124
}

dev/img/logo_maps_48dp.svg

Lines changed: 175 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)