diff --git a/class/gmaps_activity.class.php b/class/gmapsactivity.class.php
similarity index 92%
rename from class/gmaps_activity.class.php
rename to class/gmapsactivity.class.php
index 0a6edec..a06447b 100755
--- a/class/gmaps_activity.class.php
+++ b/class/gmapsactivity.class.php
@@ -17,9 +17,9 @@
*/
/**
- * \file class/gmaps_activity.class.php
+ * \file class/gmapsactivity.class.php
* \ingroup gmaps
- * \brief This file is a CRUD class file for Gmaps_activity (Create/Read/Update/Delete)
+ * \brief This file is a CRUD class file for GmapsActivity (Create/Read/Update/Delete)
*/
// Put here all includes required by your class file
@@ -28,9 +28,9 @@
//require_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php';
/**
- * Class for Gmaps_activity
+ * Class for GmapsActivity
*/
-class Gmaps_activity extends CommonObject
+class GmapsActivity extends CommonObject
{
/**
* @var string ID of module.
@@ -40,12 +40,12 @@ class Gmaps_activity extends CommonObject
/**
* @var string ID to identify managed object.
*/
- public $element = 'gmaps_activity';
+ public $element = 'gmapsActivity';
/**
* @var string Name of table without prefix where object is stored. This is also the key used for extrafields management.
*/
- public $table_element = 'gmaps_gmaps_activity';
+ public $table_element = 'gmaps_gmapsactivity';
/**
* @var int Does this object support multicompany module ?
@@ -59,7 +59,7 @@ class Gmaps_activity extends CommonObject
public $isextrafieldmanaged = 1;
/**
- * @var string String with name of icon for gmaps_activity. Must be the part after the 'object_' into object_gmaps_activity.png
+ * @var string String with name of icon for gmapsActivity. Must be the part after the 'object_' into object_gmapsActivity.png
*/
public $picto = 'gmaps_activity@gmaps';
@@ -102,8 +102,8 @@ class Gmaps_activity extends CommonObject
'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>0, 'noteditable'=>'1', 'index'=>1, 'css'=>'left', 'comment'=>"Id"),
'ref' => array('type'=>'varchar(128)', 'label'=>'Ref', 'enabled'=>'1', 'position'=>10, 'notnull'=>1, 'visible'=>1, 'index'=>1, 'searchall'=>1, 'showoncombobox'=>'1', 'comment'=>"Reference of object"),
'label' => array('type'=>'varchar(255)', 'label'=>'Label', 'enabled'=>'1', 'position'=>30, 'notnull'=>0, 'visible'=>1, 'searchall'=>1, 'css'=>'minwidth300', 'help'=>"Help text", 'showoncombobox'=>'1',),
- 'fk_soc' => array('type'=>'integer:Societe:societe/class/societe.class.php:1:((status:=:1) AND (entity:IN:__SHARED_ENTITIES__))', 'label'=>'ThirdParty', 'enabled'=>'1', 'position'=>50, 'notnull'=>-1, 'visible'=>1, 'index'=>1, 'help'=>"LinkToThirparty",),
- 'fk_project' => array('type'=>'integer:Project:projet/class/project.class.php:1', 'label'=>'Project', 'enabled'=>'1', 'position'=>52, 'notnull'=>-1, 'visible'=>-1, 'index'=>1,),
+ 'fk_soc' => array('type'=>'integer:Societe:societe/class/societe.class.php:1:((status:=:1) AND (entity:IN:__SHARED_ENTITIES__))', 'label'=>'ThirdParty', 'enabled'=>'1', 'position'=>50, 'notnull'=>-1, 'visible'=>1, 'index'=>1, 'help'=>"LinkToThirparty", 'enabled'=>'isModEnabled("societe")'),
+ 'fk_project' => array('type'=>'integer:Project:projet/class/project.class.php:1', 'label'=>'Project', 'enabled'=>'1', 'position'=>52, 'notnull'=>-1, 'visible'=>-1, 'index'=>1, 'enabled'=>'isModEnabled("project")'),
'description' => array('type'=>'text', 'label'=>'Description', 'enabled'=>'1', 'position'=>60, 'notnull'=>0, 'visible'=>3,),
'note_public' => array('type'=>'html', 'label'=>'NotePublic', 'enabled'=>'1', 'position'=>61, 'notnull'=>0, 'visible'=>0,),
'note_private' => array('type'=>'html', 'label'=>'NotePrivate', 'enabled'=>'1', 'position'=>62, 'notnull'=>0, 'visible'=>0,),
@@ -150,17 +150,17 @@ class Gmaps_activity extends CommonObject
/**
* @var int Name of subtable line
*/
- //public $table_element_line = 'gmaps_gmaps_activityline';
+ //public $table_element_line = 'gmaps_gmapsActivityline';
/**
* @var int Field with ID of parent key if this object has a parent
*/
- //public $fk_element = 'fk_gmaps_activity';
+ //public $fk_element = 'fk_gmapsactivity';
/**
* @var int Name of subtable class that manage subtable lines
*/
- //public $class_element_line = 'Gmaps_activityline';
+ //public $class_element_line = 'GmapsActivityline';
/**
* @var array List of child tables. To test if we can delete object.
@@ -172,15 +172,15 @@ class Gmaps_activity extends CommonObject
* If name matches '@ClassNAme:FilePathClass:ParentFkFieldName' it will
* call method deleteByParentField(parentId, ParentFkFieldName) to fetch and delete child object
*/
- protected $childtablesoncascade = array('@Gmaps_place:/gmaps/class/gmaps_place.class.php:fk_gmaps_activity');
+ protected $childtablesoncascade = array('@GmapsPlace:/gmaps/class/gmapsplace.class.php:fk_gmapsActivity');
/**
- * @var Gmaps_activityLine[] Array of subtable lines
+ * @var GmapsActivityLine[] Array of subtable lines
*/
//public $lines = array();
/**
- * @var Gmaps_activityPlaces[] Array of places linked
+ * @var GmapsActivityPlaces[] Array of places linked
*/
public $places = array();
@@ -201,7 +201,7 @@ public function __construct(DoliDB $db)
if (empty($conf->multicompany->enabled) && isset($this->fields['entity'])) $this->fields['entity']['enabled'] = 0;
// Example to show how to set values of fields definition dynamically
- /*if ($user->rights->gmaps->gmaps_activity->read) {
+ /*if ($user->rights->gmaps->gmapsActivity->read) {
$this->fields['myfield']['visible'] = 1;
$this->fields['myfield']['noteditable'] = 0;
}*/
@@ -370,10 +370,10 @@ public function fetchLines()
public function fetchPlaces()
{
$this->places = array();
- dol_include_once('/gmaps/class/gmaps_place.class.php');
+ dol_include_once('/gmaps/class/gmapsplace.class.php');
- $place = new Gmaps_place($this->db);
- $result = $place->fetchAll('','', 0, 0, array('t.fk_gmaps_activity'=>$this->id));
+ $place = new GmapsPlace($this->db);
+ $result = $place->fetchAll('','', 0, 0, array('t.fk_gmapsActivity'=>$this->id));
if (is_array($result) && count($result)>0) {
$this->places=$result;
} else {
@@ -390,9 +390,9 @@ public function findThirdpartyLinked() {
foreach($this->places as $place) {
if (!key_exists($place->id,$cached_places)) {
$sql = 'SELECT fk_object FROM ' . MAIN_DB_PREFIX . 'societe_extrafields WHERE ';
- $sql .= ' ( fk_gmaps_gmaps_place=\'' . $place->id . '\' OR ';
- $sql .= ' fk_gmaps_gmaps_place LIKE \'' . $place->id . ',%\' OR ';
- $sql .= ' fk_gmaps_gmaps_place LIKE \'%,' . $place->id . ',%\'';
+ $sql .= ' ( fk_gmaps_gmapsPlace=\'' . $place->id . '\' OR ';
+ $sql .= ' fk_gmaps_gmapsPlace LIKE \'' . $place->id . ',%\' OR ';
+ $sql .= ' fk_gmaps_gmapsPlace LIKE \'%,' . $place->id . ',%\'';
$sql .= ' )';
$resql = $this->db->query($sql);
if ($resql) {
@@ -564,8 +564,8 @@ public function validate($user, $notrigger = 0)
return 0;
}
- /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->gmaps->gmaps_activity->write))
- || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->gmaps->gmaps_activity->gmaps_activity_advance->validate))))
+ /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->gmaps->gmapsActivity->write))
+ || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->gmaps->gmapsActivity->gmapsActivity_advance->validate))))
{
$this->error='NotEnoughPermissions';
dol_syslog(get_class($this)."::valid ".$this->error, LOG_ERR);
@@ -606,7 +606,7 @@ public function validate($user, $notrigger = 0)
if (!$error && !$notrigger)
{
// Call trigger
- $result = $this->call_trigger('GMAPS_ACTIVITY_VALIDATE', $user);
+ $result = $this->call_trigger('GMAPSACTIVITY_VALIDATE', $user);
if ($result < 0) $error++;
// End call triggers
}
@@ -620,16 +620,16 @@ public function validate($user, $notrigger = 0)
if (preg_match('/^[\(]?PROV/i', $this->ref))
{
// Now we rename also files into index
- $sql = 'UPDATE '.MAIN_DB_PREFIX."ecm_files set filename = CONCAT('".$this->db->escape($this->newref)."', SUBSTR(filename, ".(strlen($this->ref) + 1).")), filepath = 'gmaps_activity/".$this->db->escape($this->newref)."'";
- $sql .= " WHERE filename LIKE '".$this->db->escape($this->ref)."%' AND filepath = 'gmaps_activity/".$this->db->escape($this->ref)."' and entity = ".$conf->entity;
+ $sql = 'UPDATE '.MAIN_DB_PREFIX."ecm_files set filename = CONCAT('".$this->db->escape($this->newref)."', SUBSTR(filename, ".(strlen($this->ref) + 1).")), filepath = 'gmapsActivity/".$this->db->escape($this->newref)."'";
+ $sql .= " WHERE filename LIKE '".$this->db->escape($this->ref)."%' AND filepath = 'gmapsActivity/".$this->db->escape($this->ref)."' and entity = ".$conf->entity;
$resql = $this->db->query($sql);
if (!$resql) { $error++; $this->error = $this->db->lasterror(); }
// We rename directory ($this->ref = old ref, $num = new ref) in order not to lose the attachments
$oldref = dol_sanitizeFileName($this->ref);
$newref = dol_sanitizeFileName($num);
- $dirsource = $conf->gmaps->dir_output.'/gmaps_activity/'.$oldref;
- $dirdest = $conf->gmaps->dir_output.'/gmaps_activity/'.$newref;
+ $dirsource = $conf->gmaps->dir_output.'/gmapsActivity/'.$oldref;
+ $dirdest = $conf->gmaps->dir_output.'/gmapsActivity/'.$newref;
if (!$error && file_exists($dirsource))
{
dol_syslog(get_class($this)."::validate() rename dir ".$dirsource." into ".$dirdest);
@@ -638,7 +638,7 @@ public function validate($user, $notrigger = 0)
{
dol_syslog("Rename ok");
// Rename docs starting with $oldref with $newref
- $listoffiles = dol_dir_list($conf->gmaps->dir_output.'/gmaps_activity/'.$newref, 'files', 1, '^'.preg_quote($oldref, '/'));
+ $listoffiles = dol_dir_list($conf->gmaps->dir_output.'/gmapsActivity/'.$newref, 'files', 1, '^'.preg_quote($oldref, '/'));
foreach ($listoffiles as $fileentry)
{
$dirsource = $fileentry['name'];
@@ -692,7 +692,7 @@ public function setDraft($user, $notrigger = 0)
return -1;
}*/
- return $this->setStatusCommon($user, self::STATUS_DRAFT, $notrigger, 'GMAPS_ACTIVITY_UNVALIDATE');
+ return $this->setStatusCommon($user, self::STATUS_DRAFT, $notrigger, 'GMAPSACTIVITY_UNVALIDATE');
}
/**
@@ -717,7 +717,7 @@ public function cancel($user, $notrigger = 0)
return -1;
}*/
- return $this->setStatusCommon($user, self::STATUS_CANCELED, $notrigger, 'GMAPS_ACTIVITY_CLOSE');
+ return $this->setStatusCommon($user, self::STATUS_CANCELED, $notrigger, 'GMAPSACTIVITY_CLOSE');
}
/**
@@ -742,7 +742,7 @@ public function reopen($user, $notrigger = 0)
return -1;
}*/
- return $this->setStatusCommon($user, self::STATUS_VALIDATED, $notrigger, 'GMAPS_ACTIVITY_REOPEN');
+ return $this->setStatusCommon($user, self::STATUS_VALIDATED, $notrigger, 'GMAPSACTIVITY_REOPEN');
}
/**
@@ -763,7 +763,7 @@ public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss
$result = '';
- $label = img_picto('', $this->picto).' '.$langs->trans("Gmaps_activity").'';
+ $label = img_picto('', $this->picto).' '.$langs->trans("GmapsActivity").'';
$label .= '
';
$label .= ''.$langs->trans('Ref').': '.$this->ref;
if (isset($this->status)) {
@@ -785,7 +785,7 @@ public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss
{
if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER))
{
- $label = $langs->trans("ShowGmaps_activity");
+ $label = $langs->trans("ShowGmapsActivity");
$linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"';
}
$linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"';
@@ -831,7 +831,7 @@ public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss
//if ($withpicto != 2) $result.=(($addlabel && $this->label) ? $sep . dol_trunc($this->label, ($addlabel > 1 ? $addlabel : 0)) : '');
global $action, $hookmanager;
- $hookmanager->initHooks(array('gmaps_activitydao'));
+ $hookmanager->initHooks(array('gmapsActivitydao'));
$parameters = array('id'=>$this->id, 'getnomurl'=>$result);
$reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook > 0) $result = $hookmanager->resPrint;
@@ -952,8 +952,8 @@ public function getLinesArray()
{
$this->lines = array();
- $objectline = new Gmaps_activityLine($this->db);
- $result = $objectline->fetchAll('ASC', 'position', 0, 0, array('customsql'=>'fk_gmaps_activity = '.$this->id));
+ $objectline = new GmapsActivityLine($this->db);
+ $result = $objectline->fetchAll('ASC', 'position', 0, 0, array('customsql'=>'fk_gmapsActivity = '.$this->id));
if (is_numeric($result))
{
@@ -976,16 +976,16 @@ public function getNextNumRef()
global $langs, $conf;
$langs->load("gmaps@gmaps");
- if (empty($conf->global->GMAPS_GMAPS_ACTIVITY_ADDON)) {
- $conf->global->GMAPS_GMAPS_ACTIVITY_ADDON = 'mod_gmaps_activity_standard';
+ if (empty($conf->global->GMAPS_GMAPSACTIVITY_ADDON)) {
+ $conf->global->GMAPS_GMAPSACTIVITY_ADDON = 'mod_gmapsActivity_standard';
}
- if (!empty($conf->global->GMAPS_GMAPS_ACTIVITY_ADDON))
+ if (!empty($conf->global->GMAPS_GMAPSACTIVITY_ADDON))
{
$mybool = false;
- $file = $conf->global->GMAPS_GMAPS_ACTIVITY_ADDON.".php";
- $classname = $conf->global->GMAPS_GMAPS_ACTIVITY_ADDON;
+ $file = $conf->global->GMAPS_GMAPSACTIVITY_ADDON.".php";
+ $classname = $conf->global->GMAPS_GMAPSACTIVITY_ADDON;
// Include file with class
$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
@@ -1046,12 +1046,12 @@ public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hided
$langs->load("gmaps@gmaps");
if (!dol_strlen($modele)) {
- $modele = 'standard_gmaps_activity';
+ $modele = 'standard_gmapsActivity';
if ($this->model_pdf) {
$modele = $this->model_pdf;
- } elseif (!empty($conf->global->GMAPS_ACTIVITY_ADDON_PDF)) {
- $modele = $conf->global->GMAPS_ACTIVITY_ADDON_PDF;
+ } elseif (!empty($conf->global->GMAPSACTIVITY_ADDON_PDF)) {
+ $modele = $conf->global->GMAPSACTIVITY_ADDON_PDF;
}
}
@@ -1099,12 +1099,12 @@ public function doScheduledJob()
require_once DOL_DOCUMENT_ROOT.'/core/class/commonobjectline.class.php';
/**
- * Class Gmaps_activityLine. You can also remove this and generate a CRUD class for lines objects.
+ * Class GmapsActivityLine. You can also remove this and generate a CRUD class for lines objects.
*/
-class Gmaps_activityLine extends CommonObjectLine
+class GmapsActivityLine extends CommonObjectLine
{
- // To complete with content of an object Gmaps_activityLine
- // We should have a field rowid, fk_gmaps_activity and position
+ // To complete with content of an object GmapsActivityLine
+ // We should have a field rowid, fk_gmapsActivity and position
/**
* @var int Does object support extrafields ? 0=No, 1=Yes
diff --git a/class/gmaps_import.class.php b/class/gmapsimport.class.php
similarity index 98%
rename from class/gmaps_import.class.php
rename to class/gmapsimport.class.php
index 05ace50..e4ed19a 100755
--- a/class/gmaps_import.class.php
+++ b/class/gmapsimport.class.php
@@ -17,20 +17,20 @@
*/
/**
- * \file class/gmaps_import.class.php
+ * \file class/gmapsimport.class.php
* \ingroup gmaps
* \brief This file is a CRUD class file for Gmaps_import (Create/Read/Update/Delete)
*/
// Put here all includes required by your class file
require_once DOL_DOCUMENT_ROOT . '/core/class/commonobject.class.php';
-dol_include_once('/gmaps/class/gmaps_activity.class.php');
-dol_include_once('/gmaps/class/gmaps_place.class.php');
+dol_include_once('/gmaps/class/gmapsactivity.class.php');
+dol_include_once('/gmaps/class/gmapsplace.class.php');
/**
* Class for Gmaps_import
*/
-class Gmaps_import extends CommonObject
+class GmapsImport extends CommonObject
{
/**
* @var string ID of module.
@@ -40,12 +40,12 @@ class Gmaps_import extends CommonObject
/**
* @var string ID to identify managed object.
*/
- public $element = 'gmaps_import';
+ public $element = 'gmapsImport';
/**
* @var string Name of table without prefix where object is stored. This is also the key used for extrafields management.
*/
- public $table_element = 'gmaps_gmaps_import';
+ public $table_element = 'gmaps_gmapsimport';
/**
* @var int Does this object support multicompany module ?
@@ -836,7 +836,7 @@ public function getLinesArray()
{
$this->lines = array();
- $objectline = new Gmaps_importLine($this->db);
+ $objectline = new gmapsImportLine($this->db);
$result = $objectline->fetchAll('ASC', 'position', 0, 0, array('customsql' => 'fk_gmaps_import = ' . $this->id));
if (is_numeric($result)) {
@@ -1005,7 +1005,7 @@ public function importFile($file, $user)
&& property_exists($activitySegment, 'endLocation')
&& property_exists($activitySegment, 'duration')
&& property_exists($activitySegment, 'distance')) {
- $gmapsActivity = new Gmaps_activity($this->db);
+ $gmapsActivity = new GmapsActivity($this->db);
$gmapsActivity->ref = $key;
$gmapsActivity->location_start_long = $activitySegment->startLocation->longitudeE7;
$gmapsActivity->location_start_lat = $activitySegment->startLocation->latitudeE7;
@@ -1018,7 +1018,7 @@ public function importFile($file, $user)
//$gmapsActivity->duration_end = round(((int) $activitySegment->duration->endTimestamp)*0.001);
$gmapsActivity->duration_end = dol_stringtotime($activitySegment->duration->endTimestamp);
$gmapsActivity->distance = $activitySegment->distance;
- $gmapsActivity->status = Gmaps_activity::STATUS_VALIDATED;
+ $gmapsActivity->status = GmapsActivity::STATUS_VALIDATED;
$result = $gmapsActivity->create($user);
if ($result < 0) {
@@ -1039,9 +1039,9 @@ public function importFile($file, $user)
&& property_exists($placeVisit->location, 'placeId')
&& property_exists($placeVisit->location, 'address')
&& property_exists($placeVisit, 'duration')) {
- $gmapsPlaceVisit = new Gmaps_place($this->db);
+ $gmapsPlaceVisit = new GmapsPlace($this->db);
$gmapsPlaceVisit->ref = $key;
- $gmapsPlaceVisit->fk_gmaps_activity = $gmapsActivity->id;
+ $gmapsPlaceVisit->fk_gmapsactivity = $gmapsActivity->id;
$gmapsPlaceVisit->location_placeid = $placeVisit->location->placeId;
$gmapsPlaceVisit->location_address_raw = $placeVisit->location->address;
$gmapsPlaceVisit->location_name = (property_exists($placeVisit->location, 'name')?$placeVisit->location->name:$placeVisit->location->address);
@@ -1049,7 +1049,7 @@ public function importFile($file, $user)
$gmapsPlaceVisit->duration_start = dol_stringtotime($placeVisit->duration->startTimestamp);
//$gmapsPlaceVisit->duration_end = round ((int) $placeVisit->duration->endTimestampMs)*0.001;
$gmapsPlaceVisit->duration_end = dol_stringtotime($placeVisit->duration->startTimestamp);
- $gmapsPlaceVisit->status = Gmaps_place::STATUS_VALIDATED;
+ $gmapsPlaceVisit->status = GmapsPlace::STATUS_VALIDATED;
$result = $gmapsPlaceVisit->create($user);
if ($result < 0) {
diff --git a/class/gmaps_place.class.php b/class/gmapsplace.class.php
similarity index 92%
rename from class/gmaps_place.class.php
rename to class/gmapsplace.class.php
index 4f91120..1fca745 100755
--- a/class/gmaps_place.class.php
+++ b/class/gmapsplace.class.php
@@ -17,9 +17,9 @@
*/
/**
- * \file class/gmaps_place.class.php
+ * \file class/gmapsplace.class.php
* \ingroup gmaps
- * \brief This file is a CRUD class file for Gmaps_place (Create/Read/Update/Delete)
+ * \brief This file is a CRUD class file for GmapsPlace (Create/Read/Update/Delete)
*/
// Put here all includes required by your class file
@@ -28,9 +28,9 @@
//require_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php';
/**
- * Class for Gmaps_place
+ * Class for GmapsPlace
*/
-class Gmaps_place extends CommonObject
+class GmapsPlace extends CommonObject
{
/**
* @var string ID of module.
@@ -40,12 +40,12 @@ class Gmaps_place extends CommonObject
/**
* @var string ID to identify managed object.
*/
- public $element = 'gmaps_place';
+ public $element = 'gmapsplace';
/**
* @var string Name of table without prefix where object is stored. This is also the key used for extrafields management.
*/
- public $table_element = 'gmaps_gmaps_place';
+ public $table_element = 'gmaps_gmapsplace';
/**
* @var int Does this object support multicompany module ?
@@ -59,9 +59,9 @@ class Gmaps_place extends CommonObject
public $isextrafieldmanaged = 1;
/**
- * @var string String with name of icon for gmaps_place. Must be the part after the 'object_' into object_gmaps_place.png
+ * @var string String with name of icon for gmapsPlace. Must be the part after the 'object_' into object_gmapsPlace.png
*/
- public $picto = 'gmaps_place@gmaps';
+ public $picto = 'gmapsPlace@gmaps';
const STATUS_DRAFT = 0;
@@ -112,7 +112,7 @@ class Gmaps_place extends CommonObject
'fk_user_modif' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserModif', 'enabled'=>'1', 'position'=>511, 'notnull'=>-1, 'visible'=>-2,),
'import_key' => array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>'1', 'position'=>1000, 'notnull'=>-1, 'visible'=>-2,),
'status' => array('type'=>'smallint', 'label'=>'Status', 'enabled'=>'1', 'position'=>1000, 'notnull'=>1, 'visible'=>1, 'index'=>1, 'arrayofkeyval'=>array('0'=>'Brouillon', '1'=>'Validé', '9'=>'Annulé'),),
- 'fk_gmaps_activity' => array('type'=>'integer:Gmaps_activity:gmaps/class/gmaps_activity.class.php:1', 'label'=>'Activity', 'enabled'=>'1', 'position'=>40, 'notnull'=>1, 'visible'=>-1, 'index'=>1,),
+ 'fk_gmapsactivity' => array('type'=>'integer:GmapsActivity:gmaps/class/gmapsactivity.class.php:1', 'label'=>'Activity', 'enabled'=>'1', 'position'=>40, 'notnull'=>1, 'visible'=>-1, 'index'=>1,),
'location_placeid' => array('type'=>'varchar(50)', 'label'=>'PlaceId', 'enabled'=>'1', 'position'=>40, 'notnull'=>-1, 'visible'=>1,),
'location_address_raw' => array('type'=>'varchar(200)', 'label'=>'PlaceAdress', 'enabled'=>'1', 'position'=>41, 'notnull'=>-1, 'visible'=>1,),
'location_name' => array('type'=>'varchar(200)', 'label'=>'PlaceName', 'enabled'=>'1', 'position'=>42, 'notnull'=>-1, 'visible'=>1,),
@@ -132,7 +132,7 @@ class Gmaps_place extends CommonObject
public $fk_user_modif;
public $import_key;
public $status;
- public $fk_gmaps_activity;
+ public $fk_gmapsActivity;
public $location_placeid;
public $location_address_raw;
public $location_name;
@@ -146,17 +146,17 @@ class Gmaps_place extends CommonObject
/**
* @var int Name of subtable line
*/
- //public $table_element_line = 'gmaps_gmaps_placeline';
+ //public $table_element_line = 'gmaps_gmapsPlaceline';
/**
* @var int Field with ID of parent key if this object has a parent
*/
- //public $fk_element = 'fk_gmaps_place';
+ //public $fk_element = 'fk_gmapsPlace';
/**
* @var int Name of subtable class that manage subtable lines
*/
- //public $class_element_line = 'Gmaps_placeline';
+ //public $class_element_line = 'GmapsPlaceline';
/**
* @var array List of child tables. To test if we can delete object.
@@ -168,10 +168,10 @@ class Gmaps_place extends CommonObject
* If name matches '@ClassNAme:FilePathClass;ParentFkFieldName' it will
* call method deleteByParentField(parentId, ParentFkFieldName) to fetch and delete child object
*/
- //protected $childtablesoncascade = array('gmaps_gmaps_placedet');
+ //protected $childtablesoncascade = array('gmaps_gmapsPlacedet');
/**
- * @var Gmaps_placeLine[] Array of subtable lines
+ * @var GmapsPlaceLine[] Array of subtable lines
*/
//public $lines = array();
@@ -192,7 +192,7 @@ public function __construct(DoliDB $db)
if (empty($conf->multicompany->enabled) && isset($this->fields['entity'])) $this->fields['entity']['enabled'] = 0;
// Example to show how to set values of fields definition dynamically
- /*if ($user->rights->gmaps->gmaps_place->read) {
+ /*if ($user->rights->gmaps->gmapsPlace->read) {
$this->fields['myfield']['visible'] = 1;
$this->fields['myfield']['noteditable'] = 0;
}*/
@@ -382,7 +382,7 @@ public function fetchAll($sortorder = '', $sortfield = '', $limit = 0, $offset =
$sqlwhere = array();
if (count($filter) > 0) {
foreach ($filter as $key => $value) {
- if ($key == 't.rowid' || $key == 't.fk_gmaps_activity') {
+ if ($key == 't.rowid' || $key == 't.fk_gmapsActivity') {
$sqlwhere[] = $key.'='.$value;
} elseif (in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) {
$sqlwhere[] = $key.' = \''.$this->db->idate($value).'\'';
@@ -499,8 +499,8 @@ public function validate($user, $notrigger = 0)
return 0;
}
- /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->gmaps->gmaps_place->write))
- || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->gmaps->gmaps_place->gmaps_place_advance->validate))))
+ /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->gmaps->gmapsPlace->write))
+ || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->gmaps->gmapsPlace->gmapsPlace_advance->validate))))
{
$this->error='NotEnoughPermissions';
dol_syslog(get_class($this)."::valid ".$this->error, LOG_ERR);
@@ -541,7 +541,7 @@ public function validate($user, $notrigger = 0)
if (!$error && !$notrigger)
{
// Call trigger
- $result = $this->call_trigger('GMAPS_PLACE_VALIDATE', $user);
+ $result = $this->call_trigger('GMAPSPLACE_VALIDATE', $user);
if ($result < 0) $error++;
// End call triggers
}
@@ -555,16 +555,16 @@ public function validate($user, $notrigger = 0)
if (preg_match('/^[\(]?PROV/i', $this->ref))
{
// Now we rename also files into index
- $sql = 'UPDATE '.MAIN_DB_PREFIX."ecm_files set filename = CONCAT('".$this->db->escape($this->newref)."', SUBSTR(filename, ".(strlen($this->ref) + 1).")), filepath = 'gmaps_place/".$this->db->escape($this->newref)."'";
- $sql .= " WHERE filename LIKE '".$this->db->escape($this->ref)."%' AND filepath = 'gmaps_place/".$this->db->escape($this->ref)."' and entity = ".$conf->entity;
+ $sql = 'UPDATE '.MAIN_DB_PREFIX."ecm_files set filename = CONCAT('".$this->db->escape($this->newref)."', SUBSTR(filename, ".(strlen($this->ref) + 1).")), filepath = 'gmapsPlace/".$this->db->escape($this->newref)."'";
+ $sql .= " WHERE filename LIKE '".$this->db->escape($this->ref)."%' AND filepath = 'gmapsPlace/".$this->db->escape($this->ref)."' and entity = ".$conf->entity;
$resql = $this->db->query($sql);
if (!$resql) { $error++; $this->error = $this->db->lasterror(); }
// We rename directory ($this->ref = old ref, $num = new ref) in order not to lose the attachments
$oldref = dol_sanitizeFileName($this->ref);
$newref = dol_sanitizeFileName($num);
- $dirsource = $conf->gmaps->dir_output.'/gmaps_place/'.$oldref;
- $dirdest = $conf->gmaps->dir_output.'/gmaps_place/'.$newref;
+ $dirsource = $conf->gmaps->dir_output.'/gmapsPlace/'.$oldref;
+ $dirdest = $conf->gmaps->dir_output.'/gmapsPlace/'.$newref;
if (!$error && file_exists($dirsource))
{
dol_syslog(get_class($this)."::validate() rename dir ".$dirsource." into ".$dirdest);
@@ -573,7 +573,7 @@ public function validate($user, $notrigger = 0)
{
dol_syslog("Rename ok");
// Rename docs starting with $oldref with $newref
- $listoffiles = dol_dir_list($conf->gmaps->dir_output.'/gmaps_place/'.$newref, 'files', 1, '^'.preg_quote($oldref, '/'));
+ $listoffiles = dol_dir_list($conf->gmaps->dir_output.'/gmapsPlace/'.$newref, 'files', 1, '^'.preg_quote($oldref, '/'));
foreach ($listoffiles as $fileentry)
{
$dirsource = $fileentry['name'];
@@ -627,7 +627,7 @@ public function setDraft($user, $notrigger = 0)
return -1;
}*/
- return $this->setStatusCommon($user, self::STATUS_DRAFT, $notrigger, 'GMAPS_PLACE_UNVALIDATE');
+ return $this->setStatusCommon($user, self::STATUS_DRAFT, $notrigger, 'GMAPSPLACE_UNVALIDATE');
}
/**
@@ -652,7 +652,7 @@ public function cancel($user, $notrigger = 0)
return -1;
}*/
- return $this->setStatusCommon($user, self::STATUS_CANCELED, $notrigger, 'GMAPS_PLACE_CLOSE');
+ return $this->setStatusCommon($user, self::STATUS_CANCELED, $notrigger, 'GMAPSPLACE_CLOSE');
}
/**
@@ -677,7 +677,7 @@ public function reopen($user, $notrigger = 0)
return -1;
}*/
- return $this->setStatusCommon($user, self::STATUS_VALIDATED, $notrigger, 'GMAPS_PLACE_REOPEN');
+ return $this->setStatusCommon($user, self::STATUS_VALIDATED, $notrigger, 'GMAPSPLACE_REOPEN');
}
/**
@@ -698,14 +698,14 @@ public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss
$result = '';
- $label = img_picto('', $this->picto).' '.$langs->trans("Gmaps_place").'';
+ $label = img_picto('', $this->picto).' '.$langs->trans("GmapsPlace").'';
$label .= '
';
$label .= ''.$langs->trans('Ref').': '.$this->ref;
if (isset($this->status)) {
$label .= '
'.$langs->trans("Status").": ".$this->getLibStatut(5);
}
- $url = dol_buildpath('/gmaps/gmaps_place_card.php', 1).'?id='.$this->id;
+ $url = dol_buildpath('/gmaps/gmapsPlace_card.php', 1).'?id='.$this->id;
if ($option != 'nolink')
{
@@ -720,7 +720,7 @@ public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss
{
if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER))
{
- $label = $langs->trans("ShowGmaps_place");
+ $label = $langs->trans("ShowGmapsPlace");
$linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"';
}
$linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"';
@@ -766,7 +766,7 @@ public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss
//if ($withpicto != 2) $result.=(($addlabel && $this->label) ? $sep . dol_trunc($this->label, ($addlabel > 1 ? $addlabel : 0)) : '');
global $action, $hookmanager;
- $hookmanager->initHooks(array('gmaps_placedao'));
+ $hookmanager->initHooks(array('gmapsPlacedao'));
$parameters = array('id'=>$this->id, 'getnomurl'=>$result);
$reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook > 0) $result = $hookmanager->resPrint;
@@ -887,8 +887,8 @@ public function getLinesArray()
{
$this->lines = array();
- $objectline = new Gmaps_placeLine($this->db);
- $result = $objectline->fetchAll('ASC', 'position', 0, 0, array('customsql'=>'fk_gmaps_place = '.$this->id));
+ $objectline = new GmapsPlaceLine($this->db);
+ $result = $objectline->fetchAll('ASC', 'position', 0, 0, array('customsql'=>'fk_gmapsPlace = '.$this->id));
if (is_numeric($result))
{
@@ -911,16 +911,16 @@ public function getNextNumRef()
global $langs, $conf;
$langs->load("gmaps@gmaps");
- if (empty($conf->global->GMAPS_GMAPS_PLACE_ADDON)) {
- $conf->global->GMAPS_GMAPS_PLACE_ADDON = 'mod_gmaps_place_standard';
+ if (empty($conf->global->GMAPS_GMAPSPLACE_ADDON)) {
+ $conf->global->GMAPS_GMAPSPLACE_ADDON = 'mod_gmapsPlace_standard';
}
- if (!empty($conf->global->GMAPS_GMAPS_PLACE_ADDON))
+ if (!empty($conf->global->GMAPS_GMAPSPLACE_ADDON))
{
$mybool = false;
- $file = $conf->global->GMAPS_GMAPS_PLACE_ADDON.".php";
- $classname = $conf->global->GMAPS_GMAPS_PLACE_ADDON;
+ $file = $conf->global->GMAPS_GMAPSPLACE_ADDON.".php";
+ $classname = $conf->global->GMAPS_GMAPSPLACE_ADDON;
// Include file with class
$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
@@ -981,12 +981,12 @@ public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hided
$langs->load("gmaps@gmaps");
if (!dol_strlen($modele)) {
- $modele = 'standard_gmaps_place';
+ $modele = 'standard_gmapsPlace';
if ($this->model_pdf) {
$modele = $this->model_pdf;
- } elseif (!empty($conf->global->GMAPS_PLACE_ADDON_PDF)) {
- $modele = $conf->global->GMAPS_PLACE_ADDON_PDF;
+ } elseif (!empty($conf->global->GMAPSPLACE_ADDON_PDF)) {
+ $modele = $conf->global->GMAPSPLACE_ADDON_PDF;
}
}
@@ -1034,12 +1034,12 @@ public function doScheduledJob()
require_once DOL_DOCUMENT_ROOT.'/core/class/commonobjectline.class.php';
/**
- * Class Gmaps_placeLine. You can also remove this and generate a CRUD class for lines objects.
+ * Class GmapsPlaceLine. You can also remove this and generate a CRUD class for lines objects.
*/
-class Gmaps_placeLine extends CommonObjectLine
+class GmapsPlaceLine extends CommonObjectLine
{
- // To complete with content of an object Gmaps_placeLine
- // We should have a field rowid, fk_gmaps_place and position
+ // To complete with content of an object GmapsPlaceLine
+ // We should have a field rowid, fk_gmapsPlace and position
/**
* @var int Does object support extrafields ? 0=No, 1=Yes
diff --git a/core/modules/modGmaps.class.php b/core/modules/modGmaps.class.php
index 6aa57ac..2c0c1ac 100755
--- a/core/modules/modGmaps.class.php
+++ b/core/modules/modGmaps.class.php
@@ -61,8 +61,8 @@ public function __construct($db)
$this->description = "GmapsDescription";
// Used only if file README.md and README-LL.md not found.
$this->descriptionlong = "Gmaps description (Long)";
- $this->editor_name = 'Editor name';
- $this->editor_url = 'https://www.example.com';
+ $this->editor_name = 'JeffInfo';
+ //$this->editor_url = 'https://www.example.com';
// Possible values for version are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'
$this->version = '1.0';
// Url to the file with your last numberversion of this module
@@ -226,8 +226,8 @@ public function __construct($db)
// 0 => array(
// 'label' => 'MyJob label',
// 'jobtype' => 'method',
- // 'class' => '/gmaps/class/gmaps_activity.class.php',
- // 'objectname' => 'Gmaps_activity',
+ // 'class' => '/gmaps/class/gmapsactivity.class.php',
+ // 'objectname' => 'GmapsActivity',
// 'method' => 'doScheduledJob',
// 'parameters' => '',
// 'comment' => 'Comment',
@@ -250,17 +250,17 @@ public function __construct($db)
/* BEGIN MODULEBUILDER PERMISSIONS */
$this->rights[$r][0] = $this->numero + $r; // Permission id (must not be already used)
$this->rights[$r][1] = 'Read objects of Gmaps'; // Permission label
- $this->rights[$r][4] = 'gmaps_activity'; // In php code, permission will be checked by test if ($user->rights->gmaps->level1->level2)
+ $this->rights[$r][4] = 'gmapsActivity'; // In php code, permission will be checked by test if ($user->rights->gmaps->level1->level2)
$this->rights[$r][5] = 'read'; // In php code, permission will be checked by test if ($user->rights->gmaps->level1->level2)
$r++;
$this->rights[$r][0] = $this->numero + $r; // Permission id (must not be already used)
$this->rights[$r][1] = 'Create/Update objects of Gmaps'; // Permission label
- $this->rights[$r][4] = 'gmaps_activity'; // In php code, permission will be checked by test if ($user->rights->gmaps->level1->level2)
+ $this->rights[$r][4] = 'gmapsActivity'; // In php code, permission will be checked by test if ($user->rights->gmaps->level1->level2)
$this->rights[$r][5] = 'write'; // In php code, permission will be checked by test if ($user->rights->gmaps->level1->level2)
$r++;
$this->rights[$r][0] = $this->numero + $r; // Permission id (must not be already used)
$this->rights[$r][1] = 'Delete objects of Gmaps'; // Permission label
- $this->rights[$r][4] = 'gmaps_activity'; // In php code, permission will be checked by test if ($user->rights->gmaps->level1->level2)
+ $this->rights[$r][4] = 'gmapsActivity'; // In php code, permission will be checked by test if ($user->rights->gmaps->level1->level2)
$this->rights[$r][5] = 'delete'; // In php code, permission will be checked by test if ($user->rights->gmaps->level1->level2)
$r++;
/* END MODULEBUILDER PERMISSIONS */
@@ -280,51 +280,51 @@ public function __construct($db)
'langs'=>'gmaps@gmaps', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
'position'=>1000 + $r,
'enabled'=>'$conf->gmaps->enabled', // Define condition to show or hide menu entry. Use '$conf->gmaps->enabled' if entry must be visible if module is enabled.
- 'perms'=>'1', // Use 'perms'=>'$user->rights->gmaps->gmaps_activity->read' if you want your menu with a permission rules
+ 'perms'=>'1', // Use 'perms'=>'$user->rights->gmaps->gmapsActivity->read' if you want your menu with a permission rules
'target'=>'',
'user'=>2, // 0=Menu for internal users, 1=external users, 2=both
);
/* END MODULEBUILDER TOPMENU */
- /* BEGIN MODULEBUILDER LEFTMENU GMAPS_ACTIVITY
+ /* BEGIN MODULEBUILDER LEFTMENU GMAPSACTIVITY
$this->menu[$r++]=array(
'fk_menu'=>'fk_mainmenu=gmaps', // '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
'type'=>'left', // This is a Top menu entry
- 'titre'=>'Gmaps_activity',
+ 'titre'=>'GmapsActivity',
'mainmenu'=>'gmaps',
- 'leftmenu'=>'gmaps_activity',
+ 'leftmenu'=>'gmapsActivity',
'url'=>'/gmaps/gmapsindex.php',
'langs'=>'gmaps@gmaps', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
'position'=>1000+$r,
'enabled'=>'$conf->gmaps->enabled', // Define condition to show or hide menu entry. Use '$conf->gmaps->enabled' if entry must be visible if module is enabled.
- 'perms'=>'$user->rights->gmaps->gmaps_activity->read', // Use 'perms'=>'$user->rights->gmaps->level1->level2' if you want your menu with a permission rules
+ 'perms'=>'$user->rights->gmaps->gmapsActivity->read', // Use 'perms'=>'$user->rights->gmaps->level1->level2' if you want your menu with a permission rules
'target'=>'',
'user'=>2, // 0=Menu for internal users, 1=external users, 2=both
);
$this->menu[$r++]=array(
- 'fk_menu'=>'fk_mainmenu=gmaps,fk_leftmenu=gmaps_activity', // '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
+ 'fk_menu'=>'fk_mainmenu=gmaps,fk_leftmenu=gmapsActivity', // '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
'type'=>'left', // This is a Left menu entry
- 'titre'=>'List_Gmaps_activity',
+ 'titre'=>'List_GmapsActivity',
'mainmenu'=>'gmaps',
- 'leftmenu'=>'gmaps_gmaps_activity_list',
+ 'leftmenu'=>'gmaps_gmapsActivity_list',
'url'=>'/gmaps/gmaps_activity_list.php',
'langs'=>'gmaps@gmaps', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
'position'=>1000+$r,
'enabled'=>'$conf->gmaps->enabled', // Define condition to show or hide menu entry. Use '$conf->gmaps->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
- 'perms'=>'$user->rights->gmaps->gmaps_activity->read', // Use 'perms'=>'$user->rights->gmaps->level1->level2' if you want your menu with a permission rules
+ 'perms'=>'$user->rights->gmaps->gmapsActivity->read', // Use 'perms'=>'$user->rights->gmaps->level1->level2' if you want your menu with a permission rules
'target'=>'',
'user'=>2, // 0=Menu for internal users, 1=external users, 2=both
);
$this->menu[$r++]=array(
- 'fk_menu'=>'fk_mainmenu=gmaps,fk_leftmenu=gmaps_activity', // '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
+ 'fk_menu'=>'fk_mainmenu=gmaps,fk_leftmenu=gmapsActivity', // '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
'type'=>'left', // This is a Left menu entry
- 'titre'=>'New_Gmaps_activity',
+ 'titre'=>'New_GmapsActivity',
'mainmenu'=>'gmaps',
- 'leftmenu'=>'gmaps_gmaps_activity_new',
+ 'leftmenu'=>'gmaps_gmapsActivity_new',
'url'=>'/gmaps/gmaps_activity_card.php?action=create',
'langs'=>'gmaps@gmaps', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
'position'=>1000+$r,
'enabled'=>'$conf->gmaps->enabled', // Define condition to show or hide menu entry. Use '$conf->gmaps->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
- 'perms'=>'$user->rights->gmaps->gmaps_activity->write', // Use 'perms'=>'$user->rights->gmaps->level1->level2' if you want your menu with a permission rules
+ 'perms'=>'$user->rights->gmaps->gmapsActivity->write', // Use 'perms'=>'$user->rights->gmaps->level1->level2' if you want your menu with a permission rules
'target'=>'',
'user'=>2, // 0=Menu for internal users, 1=external users, 2=both
);
@@ -355,9 +355,9 @@ public function __construct($db)
'fk_menu'=>'fk_mainmenu=gmaps',
// This is a Left menu entry
'type'=>'left',
- 'titre'=>'List_Gmaps_activity',
+ 'titre'=>'List_GmapsActivity',
'mainmenu'=>'gmaps',
- 'leftmenu'=>'gmaps_gmaps_activity',
+ 'leftmenu'=>'gmaps_gmapsActivity',
'url'=>'/gmaps/gmaps_activity_list.php',
// Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
'langs'=>'gmaps@gmaps',
@@ -372,12 +372,12 @@ public function __construct($db)
);
$this->menu[$r++]=array(
// '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
- 'fk_menu'=>'fk_mainmenu=gmaps,fk_leftmenu=gmaps_gmaps_activity',
+ 'fk_menu'=>'fk_mainmenu=gmaps,fk_leftmenu=gmaps_gmapsActivity',
// This is a Left menu entry
'type'=>'left',
- 'titre'=>'New_Gmaps_activity',
+ 'titre'=>'New_GmapsActivity',
'mainmenu'=>'gmaps',
- 'leftmenu'=>'gmaps_gmaps_activity',
+ 'leftmenu'=>'gmaps_gmapsActivity',
'url'=>'/gmaps/gmaps_activity_card.php?action=create',
// Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
'langs'=>'gmaps@gmaps',
@@ -397,7 +397,7 @@ public function __construct($db)
'type'=>'left',
'titre'=>'Alayse_KM',
'mainmenu'=>'gmaps',
- 'leftmenu'=>'gmaps_gmaps_activity',
+ 'leftmenu'=>'gmaps_gmapsActivity',
'url'=>'/gmaps/gmaps_analyses_km.php',
// Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
'langs'=>'gmaps@gmaps',
@@ -437,7 +437,7 @@ public function __construct($db)
'type'=>'left',
'titre'=>'GmapsPrepareNDF',
'mainmenu'=>'gmaps',
- 'leftmenu'=>'gmaps_gmaps_activity',
+ 'leftmenu'=>'gmaps_gmapsActivity',
'url'=>'/gmaps/gmaps_prepare_ndf.php',
// Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
'langs'=>'gmaps@gmaps',
@@ -451,57 +451,57 @@ public function __construct($db)
'user'=>0
);
- /* END MODULEBUILDER LEFTMENU GMAPS_ACTIVITY */
+ /* END MODULEBUILDER LEFTMENU GMAPSACTIVITY */
// Exports profiles provided by this module
$r = 1;
- /* BEGIN MODULEBUILDER EXPORT GMAPS_ACTIVITY */
+ /* BEGIN MODULEBUILDER EXPORT GMAPSACTIVITY */
/*
$langs->load("gmaps@gmaps");
$this->export_code[$r]=$this->rights_class.'_'.$r;
- $this->export_label[$r]='Gmaps_activityLines'; // Translation key (used only if key ExportDataset_xxx_z not found)
- $this->export_icon[$r]='gmaps_activity@gmaps';
+ $this->export_label[$r]='GmapsActivityLines'; // Translation key (used only if key ExportDataset_xxx_z not found)
+ $this->export_icon[$r]='gmapsActivity@gmaps';
// Define $this->export_fields_array, $this->export_TypeFields_array and $this->export_entities_array
- $keyforclass = 'Gmaps_activity'; $keyforclassfile='/gmaps/class/gmaps_activity.class.php'; $keyforelement='gmaps_activity@gmaps';
+ $keyforclass = 'GmapsActivity'; $keyforclassfile='/gmaps/class/gmapsactivity.class.php'; $keyforelement='gmapsActivity@gmaps';
include DOL_DOCUMENT_ROOT.'/core/commonfieldsinexport.inc.php';
//$this->export_fields_array[$r]['t.fieldtoadd']='FieldToAdd'; $this->export_TypeFields_array[$r]['t.fieldtoadd']='Text';
//unset($this->export_fields_array[$r]['t.fieldtoremove']);
- //$keyforclass = 'Gmaps_activityLine'; $keyforclassfile='/gmaps/class/gmaps_activity.class.php'; $keyforelement='gmaps_activityline@gmaps'; $keyforalias='tl';
+ //$keyforclass = 'GmapsActivityLine'; $keyforclassfile='/gmaps/class/gmapsactivity.class.php'; $keyforelement='gmapsActivityline@gmaps'; $keyforalias='tl';
//include DOL_DOCUMENT_ROOT.'/core/commonfieldsinexport.inc.php';
- $keyforselect='gmaps_activity'; $keyforaliasextra='extra'; $keyforelement='gmaps_activity@gmaps';
+ $keyforselect='gmapsActivity'; $keyforaliasextra='extra'; $keyforelement='gmapsActivity@gmaps';
include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php';
- //$keyforselect='gmaps_activityline'; $keyforaliasextra='extraline'; $keyforelement='gmaps_activityline@gmaps';
+ //$keyforselect='gmapsActivityline'; $keyforaliasextra='extraline'; $keyforelement='gmapsActivityline@gmaps';
//include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php';
- //$this->export_dependencies_array[$r] = array('gmaps_activityline'=>array('tl.rowid','tl.ref')); // To force to activate one or several fields if we select some fields that need same (like to select a unique key if we ask a field of a child to avoid the DISTINCT to discard them, or for computed field than need several other fields)
+ //$this->export_dependencies_array[$r] = array('gmapsActivityline'=>array('tl.rowid','tl.ref')); // To force to activate one or several fields if we select some fields that need same (like to select a unique key if we ask a field of a child to avoid the DISTINCT to discard them, or for computed field than need several other fields)
//$this->export_special_array[$r] = array('t.field'=>'...');
//$this->export_examplevalues_array[$r] = array('t.field'=>'Example');
//$this->export_help_array[$r] = array('t.field'=>'FieldDescHelp');
$this->export_sql_start[$r]='SELECT DISTINCT ';
- $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'gmaps_activity as t';
- //$this->export_sql_end[$r] =' LEFT JOIN '.MAIN_DB_PREFIX.'gmaps_activity_line as tl ON tl.fk_gmaps_activity = t.rowid';
+ $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'gmapsActivity as t';
+ //$this->export_sql_end[$r] =' LEFT JOIN '.MAIN_DB_PREFIX.'gmapsActivity_line as tl ON tl.fk_gmapsActivity = t.rowid';
$this->export_sql_end[$r] .=' WHERE 1 = 1';
- $this->export_sql_end[$r] .=' AND t.entity IN ('.getEntity('gmaps_activity').')';
+ $this->export_sql_end[$r] .=' AND t.entity IN ('.getEntity('gmapsActivity').')';
$r++; */
- /* END MODULEBUILDER EXPORT GMAPS_ACTIVITY */
+ /* END MODULEBUILDER EXPORT GMAPSACTIVITY */
// Imports profiles provided by this module
$r = 1;
- /* BEGIN MODULEBUILDER IMPORT GMAPS_ACTIVITY */
+ /* BEGIN MODULEBUILDER IMPORT GMAPSACTIVITY */
/*
$langs->load("gmaps@gmaps");
$this->export_code[$r]=$this->rights_class.'_'.$r;
- $this->export_label[$r]='Gmaps_activityLines'; // Translation key (used only if key ExportDataset_xxx_z not found)
- $this->export_icon[$r]='gmaps_activity@gmaps';
- $keyforclass = 'Gmaps_activity'; $keyforclassfile='/gmaps/class/gmaps_activity.class.php'; $keyforelement='gmaps_activity@gmaps';
+ $this->export_label[$r]='GmapsActivityLines'; // Translation key (used only if key ExportDataset_xxx_z not found)
+ $this->export_icon[$r]='gmapsActivity@gmaps';
+ $keyforclass = 'GmapsActivity'; $keyforclassfile='/gmaps/class/gmapsactivity.class.php'; $keyforelement='gmapsActivity@gmaps';
include DOL_DOCUMENT_ROOT.'/core/commonfieldsinexport.inc.php';
- $keyforselect='gmaps_activity'; $keyforaliasextra='extra'; $keyforelement='gmaps_activity@gmaps';
+ $keyforselect='gmapsActivity'; $keyforaliasextra='extra'; $keyforelement='gmapsActivity@gmaps';
include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php';
//$this->export_dependencies_array[$r]=array('mysubobject'=>'ts.rowid', 't.myfield'=>array('t.myfield2','t.myfield3')); // To force to activate one or several fields if we select some fields that need same (like to select a unique key if we ask a field of a child to avoid the DISTINCT to discard them, or for computed field than need several other fields)
$this->export_sql_start[$r]='SELECT DISTINCT ';
- $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'gmaps_activity as t';
+ $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'gmapsActivity as t';
$this->export_sql_end[$r] .=' WHERE 1 = 1';
- $this->export_sql_end[$r] .=' AND t.entity IN ('.getEntity('gmaps_activity').')';
+ $this->export_sql_end[$r] .=' AND t.entity IN ('.getEntity('gmapsActivity').')';
$r++; */
- /* END MODULEBUILDER IMPORT GMAPS_ACTIVITY */
+ /* END MODULEBUILDER IMPORT GMAPSACTIVITY */
}
/**
@@ -522,8 +522,8 @@ public function init($options = '')
// Create extrafields during init
include_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
$extrafields = new ExtraFields($this->db);
- $param['options']['gmaps_gmaps_place:CONCAT(location_name,\' \',location_address_raw):rowid::']=null;
- $result1=$extrafields->addExtraField('fk_gmaps_gmaps_place', "Lieu Gmaps", 'chkbxlst', 1, '', 'thirdparty', 0, 0, '', $param, 1, '', 1, 0, '', '', 'gmaps@gmaps', '$conf->gmaps->enabled');
+ $param['options']['gmaps_gmapsplace:CONCAT(location_name,\' \',location_address_raw):rowid::']=null;
+ $result1=$extrafields->addExtraField('fk_gmaps_gmapsplace', "Lieu Gmaps", 'chkbxlst', 1, '', 'thirdparty', 0, 0, '', $param, 1, '', 1, 0, '', '', 'gmaps@gmaps', '$conf->gmaps->enabled');
//$result2=$extrafields->addExtraField('gmaps_myattr2', "New Attr 2 label", 'varchar', 1, 10, 'project', 0, 0, '', '', 1, '', 0, 0, '', '', 'gmaps@gmaps', '$conf->gmaps->enabled');
//$result3=$extrafields->addExtraField('gmaps_myattr3', "New Attr 3 label", 'varchar', 1, 10, 'bank_account', 0, 0, '', '', 1, '', 0, 0, '', '', 'gmaps@gmaps', '$conf->gmaps->enabled');
//$result4=$extrafields->addExtraField('gmaps_myattr4', "New Attr 4 label", 'select', 1, 3, 'thirdparty', 0, 1, '', array('options'=>array('code1'=>'Val1','code2'=>'Val2','code3'=>'Val3')), 1,'', 0, 0, '', '', 'gmaps@gmaps', '$conf->gmaps->enabled');
@@ -537,14 +537,14 @@ public function init($options = '')
// Document templates
$moduledir = 'gmaps';
$myTmpObjects = array();
- $myTmpObjects['Gmaps_activity']=array('includerefgeneration'=>0, 'includedocgeneration'=>0);
+ $myTmpObjects['GmapsActivity']=array('includerefgeneration'=>0, 'includedocgeneration'=>0);
foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) {
- if ($myTmpObjectKey == 'Gmaps_activity') continue;
+ if ($myTmpObjectKey == 'GmapsActivity') continue;
if ($myTmpObjectArray['includerefgeneration']) {
- $src=DOL_DOCUMENT_ROOT.'/install/doctemplates/gmaps/template_gmaps_activitys.odt';
+ $src=DOL_DOCUMENT_ROOT.'/install/doctemplates/gmaps/template_gmapsActivitys.odt';
$dirodt=DOL_DATA_ROOT.'/doctemplates/gmaps';
- $dest=$dirodt.'/template_gmaps_activitys.odt';
+ $dest=$dirodt.'/template_gmapsActivitys.odt';
if (file_exists($src) && ! file_exists($dest))
{
diff --git a/gmaps_activity_agenda.php b/gmaps_activity_agenda.php
index f5b57e8..f28d75d 100755
--- a/gmaps_activity_agenda.php
+++ b/gmaps_activity_agenda.php
@@ -17,9 +17,9 @@
*/
/**
- * \file gmaps_activity_agenda.php
+ * \file gmapsActivity_agenda.php
* \ingroup gmaps
- * \brief Tab of events on Gmaps_activity
+ * \brief Tab of events on GmapsActivity
*/
//if (! defined('NOREQUIREDB')) define('NOREQUIREDB', '1'); // Do not create database handler $db
@@ -61,8 +61,8 @@
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
-dol_include_once('/gmaps/class/gmaps_activity.class.php');
-dol_include_once('/gmaps/lib/gmaps_gmaps_activity.lib.php');
+dol_include_once('/gmaps/class/gmapsactivity.class.php');
+dol_include_once('/gmaps/lib/gmaps_gmapsactivity.lib.php');
// Load translation files required by the page
@@ -95,10 +95,10 @@
if (!$sortorder) $sortorder = 'DESC,DESC';
// Initialize technical objects
-$object = new Gmaps_activity($db);
+$object = new GmapsActivity($db);
$extrafields = new ExtraFields($db);
$diroutputmassaction = $conf->gmaps->dir_output.'/temp/massgeneration/'.$user->id;
-$hookmanager->initHooks(array('gmaps_activityagenda', 'globalcard')); // Note that conf->hooks_modules contains array
+$hookmanager->initHooks(array('gmapsActivityagenda', 'globalcard')); // Note that conf->hooks_modules contains array
// Fetch optionals attributes and labels
$extrafields->fetch_name_optionals_label($object->table_element);
@@ -111,7 +111,7 @@
//if ($user->socid > 0) $socid = $user->socid;
//$result = restrictedArea($user, 'gmaps', $object->id);
-$permissiontoadd = $user->rights->gmaps->gmaps_activity->write; // Used by the include of actions_addupdatedelete.inc.php
+$permissiontoadd = $user->rights->gmaps->gmapsActivity->write; // Used by the include of actions_addupdatedelete.inc.php
/*
@@ -155,10 +155,10 @@
llxHeader('', $title, $help_url);
if (!empty($conf->notification->enabled)) $langs->load("mails");
- $head = gmaps_activityPrepareHead($object);
+ $head = gmapsActivityPrepareHead($object);
- print dol_get_fiche_head($head, 'agenda', $langs->trans("Gmaps_activity"), -1, 'object_'.$object->picto);
+ print dol_get_fiche_head($head, 'agenda', $langs->trans("GmapsActivity"), -1, 'object_'.$object->picto);
// Object card
// ------------------------------------------------------------
@@ -260,7 +260,7 @@
if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit);
- //print load_fiche_titre($langs->trans("ActionsOnGmaps_activity"), '', '');
+ //print load_fiche_titre($langs->trans("ActionsOnGmapsActivity"), '', '');
// List of all actions
$filters = array();
diff --git a/gmaps_activity_card.php b/gmaps_activity_card.php
index bf48c51..dfe792d 100755
--- a/gmaps_activity_card.php
+++ b/gmaps_activity_card.php
@@ -19,7 +19,7 @@
/**
* \file gmaps_activity_card.php
* \ingroup gmaps
- * \brief Page to create/edit/view gmaps_activity
+ * \brief Page to create/edit/view gmapsActivity
*/
//if (! defined('NOREQUIREDB')) define('NOREQUIREDB', '1'); // Do not create database handler $db
@@ -61,9 +61,9 @@
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
-dol_include_once('/gmaps/class/gmaps_activity.class.php');
-dol_include_once('/gmaps/lib/gmaps_gmaps_activity.lib.php');
-dol_include_once('/gmaps/class/gmaps_gmaps_place.class.php');
+dol_include_once('/gmaps/class/gmapsactivity.class.php');
+dol_include_once('/gmaps/lib/gmaps_gmapsactivity.lib.php');
+dol_include_once('/gmaps/class/gmaps_gmapsplace.class.php');
// Load translation files required by the page
$langs->loadLangs(array("gmaps@gmaps", "other"));
@@ -74,16 +74,16 @@
$action = GETPOST('action', 'aZ09');
$confirm = GETPOST('confirm', 'alpha');
$cancel = GETPOST('cancel', 'aZ09');
-$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'gmaps_activitycard'; // To manage different context of search
+$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'gmapsActivitycard'; // To manage different context of search
$backtopage = GETPOST('backtopage', 'alpha');
$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha');
//$lineid = GETPOST('lineid', 'int');
// Initialize technical objects
-$object = new Gmaps_activity($db);
+$object = new GmapsActivity($db);
$extrafields = new ExtraFields($db);
$diroutputmassaction = $conf->gmaps->dir_output.'/temp/massgeneration/'.$user->id;
-$hookmanager->initHooks(array('gmaps_activitycard', 'globalcard')); // Note that conf->hooks_modules contains array
+$hookmanager->initHooks(array('gmapsActivitycard', 'globalcard')); // Note that conf->hooks_modules contains array
// Fetch optionals attributes and labels
$extrafields->fetch_name_optionals_label($object->table_element);
@@ -107,11 +107,11 @@
$object->fetchPlaces();
}
-$permissiontoread = $user->rights->gmaps->gmaps_activity->read;
-$permissiontoadd = $user->rights->gmaps->gmaps_activity->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
-$permissiontodelete = $user->rights->gmaps->gmaps_activity->delete || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_DRAFT);
-$permissionnote = $user->rights->gmaps->gmaps_activity->write; // Used by the include of actions_setnotes.inc.php
-$permissiondellink = $user->rights->gmaps->gmaps_activity->write; // Used by the include of actions_dellink.inc.php
+$permissiontoread = $user->rights->gmaps->gmapsActivity->read;
+$permissiontoadd = $user->rights->gmaps->gmapsActivity->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
+$permissiontodelete = $user->rights->gmaps->gmapsActivity->delete || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_DRAFT);
+$permissionnote = $user->rights->gmaps->gmapsActivity->write; // Used by the include of actions_setnotes.inc.php
+$permissiondellink = $user->rights->gmaps->gmapsActivity->write; // Used by the include of actions_dellink.inc.php
$upload_dir = $conf->gmaps->multidir_output[isset($object->entity) ? $object->entity : 1];
// Security check - Protection if external user
@@ -143,7 +143,7 @@
else $backtopage = dol_buildpath('/gmaps/gmaps_activity_card.php', 1).'?id='.($id > 0 ? $id : '__ID__');
}
}
- $triggermodname = 'GMAPS_GMAPS_ACTIVITY_MODIFY'; // Name of trigger action code to execute when we modify record
+ $triggermodname = 'GMAPS_GMAPSACTIVITY_MODIFY'; // Name of trigger action code to execute when we modify record
// Actions cancel, add, update, update_extras, confirm_validate, confirm_delete, confirm_deleteline, confirm_clone, confirm_close, confirm_setdraft, confirm_reopen
include DOL_DOCUMENT_ROOT.'/core/actions_addupdatedelete.inc.php';
@@ -170,9 +170,9 @@
}
// Actions to send emails
- $triggersendname = 'GMAPS_GMAPS_ACTIVITY_SENTBYMAIL';
- $autocopy = 'MAIN_MAIL_AUTOCOPY_GMAPS_ACTIVITY_TO';
- $trackid = 'gmaps_activity'.$object->id;
+ $triggersendname = 'GMAPS_GMAPSACTIVITY_SENTBYMAIL';
+ $autocopy = 'MAIN_MAIL_AUTOCOPY_GMAPSACTIVITY_TO';
+ $trackid = 'gmapsActivity'.$object->id;
include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php';
}
@@ -189,7 +189,7 @@
$formfile = new FormFile($db);
$formproject = new FormProjets($db);
-$title = $langs->trans("Gmaps_activity");
+$title = $langs->trans("GmapsActivity");
$help_url = '';
llxHeader('', $title, $help_url);
@@ -212,7 +212,7 @@ function init_myfunc()
// Part to create
if ($action == 'create')
{
- print load_fiche_titre($langs->trans("NewObject", $langs->transnoentitiesnoconv("Gmaps_activity")), '', 'object_'.$object->picto);
+ print load_fiche_titre($langs->trans("NewObject", $langs->transnoentitiesnoconv("GmapsActivity")), '', 'object_'.$object->picto);
print '