This commit is contained in:
Frédéric FRANCE 2019-12-15 10:02:20 +01:00
parent a796106c26
commit 9e4fb8d4fe
No known key found for this signature in database
GPG Key ID: 06809324E4B2ABC1
36 changed files with 147 additions and 264 deletions

View File

@ -38,7 +38,6 @@ class AccountancyCategory // extends CommonObject
/** /**
* @var string Error string * @var string Error string
* @see $errors
*/ */
public $error; public $error;

View File

@ -158,7 +158,7 @@ class SimpleOpenID
}else{ }else{
$identity = $u['scheme'] . '://' . $u['host'] . $u['path']; $identity = $u['scheme'] . '://' . $u['host'] . $u['path'];
} }
//*/ */
$this->openid_url_identity = $a; $this->openid_url_identity = $a;
} }

View File

@ -17,7 +17,7 @@
*/ */
/** /**
* \file htdocs/core/modules/export/export_excelnew.modules.php * \file htdocs/core/modules/export/export_excel2007new.modules.php
* \ingroup export * \ingroup export
* \brief File of class to generate export file with Excel format * \brief File of class to generate export file with Excel format
*/ */

View File

@ -10,8 +10,8 @@
*/ */
/** /**
* \file advtargetingemaling/modules/mailings/advthirdparties.modules.php * \file htdocs/core/modules/mailings/advthirdparties.modules.php
* \ingroup advtargetingemaling * \ingroup mailing
* \brief Example file to provide a list of recipients for mailing module * \brief Example file to provide a list of recipients for mailing module
*/ */

View File

@ -21,7 +21,7 @@
* \defgroup bom Module Bom * \defgroup bom Module Bom
* \brief Bom module descriptor. * \brief Bom module descriptor.
* *
* \file htdocs/bom/core/modules/modBom.class.php * \file htdocs/core/modules/modBom.class.php
* \ingroup bom * \ingroup bom
* \brief Description and activation file for module Bom * \brief Description and activation file for module Bom
*/ */

View File

@ -21,7 +21,7 @@
* \defgroup datapolicy Module datapolicy * \defgroup datapolicy Module datapolicy
* \brief datapolicy module descriptor. * \brief datapolicy module descriptor.
* *
* \file htdocs/datapolicy/core/modules/modDataPolicy.class.php * \file htdocs/core/modules/modDataPolicy.class.php
* \ingroup datapolicy * \ingroup datapolicy
* \brief Description and activation file for module DATAPOLICY * \brief Description and activation file for module DATAPOLICY
*/ */

View File

@ -19,7 +19,7 @@
* \defgroup emailcollector Module emailcollector * \defgroup emailcollector Module emailcollector
* \brief emailcollector module descriptor. * \brief emailcollector module descriptor.
* *
* \file htdocs/emailcollector/core/modules/modEmailCollector.class.php * \file htdocs/core/modules/modEmailCollector.class.php
* \ingroup emailcollector * \ingroup emailcollector
* \brief Description and activation file for module emailcollector * \brief Description and activation file for module emailcollector
*/ */

View File

@ -18,11 +18,10 @@
*/ */
/** /**
* \defgroup mymodule Module MyModule * \defgroup incoterm Module MyModule
* \brief Example of a module descriptor. *
* Such a file must be copied into htdocs/mymodule/core/modules directory. * \file htdocs/core/modules/modIncoterm.class.php
* \file htdocs/mymodule/core/modules/modMyModule.class.php * \ingroup incoterm
* \ingroup mymodule
* \brief Description and activation file for module MyModule * \brief Description and activation file for module MyModule
*/ */
include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php'; include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';

View File

@ -19,10 +19,10 @@
*/ */
/** /**
* \defgroup mrp Module Mrp * \defgroup mrp Module Mrp
* \brief Mrp module descriptor. * \brief Mrp module descriptor.
* *
* \file htdocs/mrp/core/modules/modMrp.class.php * \file htdocs/core/modules/modMrp.class.php
* \ingroup mrp * \ingroup mrp
* \brief Description and activation file for module Mrp * \brief Description and activation file for module Mrp
*/ */

View File

@ -20,7 +20,7 @@
* \defgroup takepos Module TakePos * \defgroup takepos Module TakePos
* \brief TakePos module descriptor. * \brief TakePos module descriptor.
* *
* \file htdocs/takepos/core/modules/modTakePos.class.php * \file htdocs/core/modules/modTakePos.class.php
* \ingroup takepos * \ingroup takepos
* \brief Description and activation file for module TakePos * \brief Description and activation file for module TakePos
*/ */

View File

@ -18,7 +18,7 @@
*/ */
/** /**
* \file htdocs/core/modules/mailings/modules_printing.php * \file htdocs/core/modules/printing/modules_printing.php
* \ingroup printing * \ingroup printing
* \brief File with parent class of printing modules * \brief File with parent class of printing modules
*/ */

View File

@ -19,7 +19,7 @@
*/ */
/** /**
* \file htdocs/core/modules/supplier_invoice/doc/pdf_standard.modules.php * \file htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php
* \ingroup fournisseur * \ingroup fournisseur
* \brief Class file to generate the supplier invoice payment file with the standard model * \brief Class file to generate the supplier invoice payment file with the standard model
*/ */

View File

@ -17,7 +17,7 @@
*/ */
/** /**
* \file htdocs/core/modules/payment/mod_payment_bronan.php * \file htdocs/core/modules/supplier_payment/mod_supplier_payment_bronan.php
* \ingroup supplier_payment * \ingroup supplier_payment
* \brief File containing class for numbering module Bronan * \brief File containing class for numbering module Bronan
*/ */

View File

@ -17,7 +17,7 @@
*/ */
/** /**
* \file htdocs/don/payment.php * \file htdocs/don/payment/payment.php
* \ingroup donations * \ingroup donations
* \brief Page to add payment of a donation * \brief Page to add payment of a donation
*/ */

View File

@ -4,7 +4,7 @@
* Copyright (C) 2015 Florian Henry <florian.henry@open-concept.pro> * Copyright (C) 2015 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr> * Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
* Copyright (C) 2018 Francis Appels <francis.appels@yahoo.com> * Copyright (C) 2018 Francis Appels <francis.appels@yahoo.com>
* Copyright (C) ---Put here your own copyright and developer email--- * Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -21,7 +21,7 @@
*/ */
/** /**
* \file ecm/ecmfiles.class.php * \file htdocs/ecm/class/ecmfiles.class.php
* \ingroup ecm * \ingroup ecm
* \brief Class to manage ECM Files (Create/Read/Update/Delete) * \brief Class to manage ECM Files (Create/Read/Update/Delete)
*/ */

View File

@ -208,15 +208,15 @@ class Shipments extends DolibarrApi
return $this->shipment->id; return $this->shipment->id;
} }
/** // /**
* Get lines of an shipment // * Get lines of an shipment
* // *
* @param int $id Id of shipment // * @param int $id Id of shipment
* // *
* @url GET {id}/lines // * @url GET {id}/lines
* // *
* @return int // * @return int
*/ // */
/* /*
public function getLines($id) public function getLines($id)
{ {
@ -241,16 +241,16 @@ class Shipments extends DolibarrApi
} }
*/ */
/** // /**
* Add a line to given shipment // * Add a line to given shipment
* // *
* @param int $id Id of shipment to update // * @param int $id Id of shipment to update
* @param array $request_data ShipmentLine data // * @param array $request_data ShipmentLine data
* // *
* @url POST {id}/lines // * @url POST {id}/lines
* // *
* @return int // * @return int
*/ // */
/* /*
public function postLine($id, $request_data = null) public function postLine($id, $request_data = null)
{ {
@ -303,17 +303,17 @@ class Shipments extends DolibarrApi
return false; return false;
}*/ }*/
/** // /**
* Update a line to given shipment // * Update a line to given shipment
* // *
* @param int $id Id of shipment to update // * @param int $id Id of shipment to update
* @param int $lineid Id of line to update // * @param int $lineid Id of line to update
* @param array $request_data ShipmentLine data // * @param array $request_data ShipmentLine data
* // *
* @url PUT {id}/lines/{lineid} // * @url PUT {id}/lines/{lineid}
* // *
* @return object // * @return object
*/ // */
/* /*
public function putLine($id, $lineid, $request_data = null) public function putLine($id, $lineid, $request_data = null)
{ {
@ -486,7 +486,7 @@ class Shipments extends DolibarrApi
* @url POST {id}/validate * @url POST {id}/validate
* *
* @return array * @return array
* FIXME An error 403 is returned if the request has an empty body. * \todo An error 403 is returned if the request has an empty body.
* Error message: "Forbidden: Content type `text/plain` is not supported." * Error message: "Forbidden: Content type `text/plain` is not supported."
* Workaround: send this in the body * Workaround: send this in the body
* { * {
@ -528,20 +528,20 @@ class Shipments extends DolibarrApi
} }
/** // /**
* Classify the shipment as invoiced // * Classify the shipment as invoiced
* // *
* @param int $id Id of the shipment // * @param int $id Id of the shipment
* // *
* @url POST {id}/setinvoiced // * @url POST {id}/setinvoiced
* // *
* @return int // * @return int
* // *
* @throws 400 // * @throws 400
* @throws 401 // * @throws 401
* @throws 404 // * @throws 404
* @throws 405 // * @throws 405
*/ // */
/* /*
public function setinvoiced($id) public function setinvoiced($id)
{ {
@ -566,19 +566,19 @@ class Shipments extends DolibarrApi
*/ */
/** // /**
* Create a shipment using an existing order. // * Create a shipment using an existing order.
* // *
* @param int $orderid Id of the order // * @param int $orderid Id of the order
* // *
* @url POST /createfromorder/{orderid} // * @url POST /createfromorder/{orderid}
* // *
* @return int // * @return int
* @throws 400 // * @throws 400
* @throws 401 // * @throws 401
* @throws 404 // * @throws 404
* @throws 405 // * @throws 405
*/ // */
/* /*
public function createShipmentFromOrder($orderid) public function createShipmentFromOrder($orderid)
{ {

View File

@ -3,7 +3,7 @@
* Copyright (C) 2014-2016 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2014-2016 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2015 Florian Henry <florian.henry@open-concept.pro> * Copyright (C) 2015 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr> * Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr> * Copyright (C) 2018-2019 Frédéric France <frederic.france@netlogic.fr>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -20,7 +20,7 @@
*/ */
/** /**
* \file ProductEntrepot/ProductStockEntrepot.class.php * \file htdocs/product/stock/class/productstockentrepot.class.php
* \ingroup ProductEntrepot * \ingroup ProductEntrepot
* \brief This file is an example for a CRUD class file (Create/Read/Update/Delete) * \brief This file is an example for a CRUD class file (Create/Read/Update/Delete)
* Put some comments here * Put some comments here

View File

@ -163,6 +163,7 @@ class Tasks extends DolibarrApi
{ {
$num = $db->num_rows($result); $num = $db->num_rows($result);
$min = min($num, ($limit <= 0 ? $num : $limit)); $min = min($num, ($limit <= 0 ? $num : $limit));
$i = 0;
while ($i < $min) while ($i < $min)
{ {
$obj = $db->fetch_object($result); $obj = $db->fetch_object($result);
@ -213,14 +214,14 @@ class Tasks extends DolibarrApi
return $this->task->id; return $this->task->id;
} }
/** // /**
* Get time spent of a task // * Get time spent of a task
* // *
* @param int $id Id of task // * @param int $id Id of task
* @return int // * @return int
* // *
* @url GET {id}/tasks // * @url GET {id}/tasks
*/ // */
/* /*
public function getLines($id, $includetimespent=0) public function getLines($id, $includetimespent=0)
{ {
@ -297,16 +298,16 @@ class Tasks extends DolibarrApi
} }
/** // /**
* Add a task to given project // * Add a task to given project
* // *
* @param int $id Id of project to update // * @param int $id Id of project to update
* @param array $request_data Projectline data // * @param array $request_data Projectline data
* // *
* @url POST {id}/tasks // * @url POST {id}/tasks
* // *
* @return int // * @return int
*/ // */
/* /*
public function postLine($id, $request_data = null) public function postLine($id, $request_data = null)
{ {
@ -359,17 +360,17 @@ class Tasks extends DolibarrApi
} }
*/ */
/** // /**
* Update a task to given project // * Update a task to given project
* // *
* @param int $id Id of project to update // * @param int $id Id of project to update
* @param int $taskid Id of task to update // * @param int $taskid Id of task to update
* @param array $request_data Projectline data // * @param array $request_data Projectline data
* // *
* @url PUT {id}/tasks/{taskid} // * @url PUT {id}/tasks/{taskid}
* // *
* @return object // * @return object
*/ // */
/* /*
public function putLine($id, $lineid, $request_data = null) public function putLine($id, $lineid, $request_data = null)
{ {
@ -616,6 +617,6 @@ class Tasks extends DolibarrApi
} }
// TODO // \todo
// getSummaryOfTimeSpent // getSummaryOfTimeSpent
} }

View File

@ -21,7 +21,7 @@
*/ */
/** /**
* \file htdocs/public/onlinesign/newsign.php * \file htdocs/public/onlinesign/newonlinesign.php
* \ingroup core * \ingroup core
* \brief File to offer a way to make an online signature for a particular Dolibarr entity * \brief File to offer a way to make an online signature for a particular Dolibarr entity
*/ */

View File

@ -1,7 +1,7 @@
<?php <?php
/* Copyright (C) 2013-2014 Jean-François Ferry <jfefe@aternatik.fr> /* Copyright (C) 2013-2014 Jean-François Ferry <jfefe@aternatik.fr>
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com> * Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr> * Copyright (C) 2018-2019 Frédéric France <frederic.france@netlogic.fr>
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -18,7 +18,7 @@
*/ */
/** /**
* \file resource/index.php * \file htdocs/resource/list.php
* \ingroup resource * \ingroup resource
* \brief Page to manage resource objects * \brief Page to manage resource objects
*/ */

View File

@ -17,7 +17,7 @@
*/ */
/** /**
* \file htdocs/admin/salaries.php * \file htdocs/salaries/admin/salaries.php
* \ingroup Salaries * \ingroup Salaries
* \brief Setup page to configure salaries module * \brief Setup page to configure salaries module
*/ */

View File

@ -18,7 +18,7 @@
*/ */
/** /**
* \file htdocs/admin/salaries_extrafields.php * \file htdocs/salaries/admin/salaries_extrafields.php
* \ingroup member * \ingroup member
* \brief Page to setup extra fields of salaries * \brief Page to setup extra fields of salaries
*/ */

View File

@ -36,7 +36,7 @@ class ProductAttribute
/** /**
* Ref of the product attribute * Ref of the product attribute
* @var * @var string
*/ */
public $ref; public $ref;

View File

@ -20,7 +20,7 @@
*/ */
/** /**
* \file website/website.class.php * \file htdocs/website/class/website.class.php
* \ingroup website * \ingroup website
* \brief File for the CRUD class of website (Create/Read/Update/Delete) * \brief File for the CRUD class of website (Create/Read/Update/Delete)
*/ */

View File

@ -19,7 +19,7 @@
*/ */
/** /**
* \file website/websitepage.class.php * \file htdocs/website/class/websitepage.class.php
* \ingroup website * \ingroup website
* \brief File for the CRUD class of websitepage (Create/Read/Update/Delete) * \brief File for the CRUD class of websitepage (Create/Read/Update/Delete)
*/ */

View File

@ -23,7 +23,7 @@ dol_include_once('/zapier/class/hook.class.php');
/** /**
* \file htdocs/modulebuilder/template/class/api_zapier.class.php * \file htdocs/zapier/class/api_zapier.class.php
* \ingroup zapier * \ingroup zapier
* \brief File for API management of hook. * \brief File for API management of hook.
*/ */

View File

@ -16,7 +16,7 @@
*/ */
/** /**
* \file htdocs/modulebuilder/template/class/hook.class.php * \file htdocs/zapier/class/hook.class.php
* \ingroup zapier * \ingroup zapier
* \brief This file is a CRUD class file for Hook (Create/Read/Update/Delete) * \brief This file is a CRUD class file for Hook (Create/Read/Update/Delete)
*/ */

View File

@ -17,26 +17,13 @@
*/ */
/** /**
* \file htdocs/modulebuilder/template/myobject_agenda.php * \file htdocs/zapier/hook_agenda.php
* \ingroup mymodule * \ingroup mymodule
* \brief Page of MyObject events * \brief Page of MyObject events
*/ */
// Load Dolibarr environment // Load Dolibarr environment
$res = 0; require '../main.inc.php';
// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined)
if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php";
// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME
$tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1;
while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { $i--; $j--; }
if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php";
if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php";
// Try main.inc.php using relative path
if (!$res && file_exists("../main.inc.php")) $res = @include "../main.inc.php";
if (!$res && file_exists("../../main.inc.php")) $res = @include "../../main.inc.php";
if (!$res && file_exists("../../../main.inc.php")) $res = @include "../../../main.inc.php";
if (!$res) die("Include of main fails");
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; 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/company.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';

View File

@ -17,46 +17,13 @@
*/ */
/** /**
* \file htdocs/modulebuilder/template/myobject_card.php * \file htdocs/zapier/myobject_card.php
* \ingroup mymodule * \ingroup mymodule
* \brief Page to create/edit/view myobject * \brief Page to create/edit/view myobject
*/ */
//if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); // Do not create database handler $db
//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); // Do not load object $user
//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1'); // Do not load object $mysoc
//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); // Do not load object $langs
//if (! defined('NOSCANGETFORINJECTION')) define('NOSCANGETFORINJECTION','1'); // Do not check injection attack on GET parameters
//if (! defined('NOSCANPOSTFORINJECTION')) define('NOSCANPOSTFORINJECTION','1'); // Do not check injection attack on POST parameters
//if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK','1'); // Do not check CSRF attack (test on referer + on token if option MAIN_SECURITY_CSRF_WITH_TOKEN is on).
//if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL','1'); // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on)
//if (! defined('NOSTYLECHECK')) define('NOSTYLECHECK','1'); // Do not check style html tag into posted data
//if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1'); // If there is no need to load and show top and left menu
//if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1'); // If we don't need to load the html.form.class.php
//if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1'); // Do not load ajax.lib.php library
//if (! defined("NOLOGIN")) define("NOLOGIN",'1'); // If this page is public (can be called outside logged session). This include the NOIPCHECK too.
//if (! defined('NOIPCHECK')) define('NOIPCHECK','1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip
//if (! defined("MAIN_LANG_DEFAULT")) define('MAIN_LANG_DEFAULT','auto'); // Force lang to a particular value
//if (! defined("MAIN_AUTHENTICATION_MODE")) define('MAIN_AUTHENTICATION_MODE','aloginmodule'); // Force authentication handler
//if (! defined("NOREDIRECTBYMAINTOLOGIN")) define('NOREDIRECTBYMAINTOLOGIN',1); // The main.inc.php does not make a redirect if not logged, instead show simple error message
//if (! defined("FORCECSP")) define('FORCECSP','none'); // Disable all Content Security Policies
// Load Dolibarr environment // Load Dolibarr environment
$res = 0; require '../main.inc.php';
// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined)
if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php";
// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME
$tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1;
while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { $i--; $j--; }
if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php";
if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php";
// Try main.inc.php using relative path
if (!$res && file_exists("../main.inc.php")) $res = @include "../main.inc.php";
if (!$res && file_exists("../../main.inc.php")) $res = @include "../../main.inc.php";
if (!$res && file_exists("../../../main.inc.php")) $res = @include "../../../main.inc.php";
if (!$res) die("Include of main fails");
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; 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.formfile.class.php';
dol_include_once('/mymodule/class/myobject.class.php'); dol_include_once('/mymodule/class/myobject.class.php');

View File

@ -17,26 +17,13 @@
*/ */
/** /**
* \file htdocs/modulebuilder/template/myobject_document.php * \file htdocs/zapier/myobject_document.php
* \ingroup mymodule * \ingroup mymodule
* \brief Tab for documents linked to MyObject * \brief Tab for documents linked to MyObject
*/ */
// Load Dolibarr environment // Load Dolibarr environment
$res = 0; require '../main.inc.php';
// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined)
if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php";
// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME
$tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1;
while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { $i--; $j--; }
if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php";
if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php";
// Try main.inc.php using relative path
if (!$res && file_exists("../main.inc.php")) $res = @include "../main.inc.php";
if (!$res && file_exists("../../main.inc.php")) $res = @include "../../main.inc.php";
if (!$res && file_exists("../../../main.inc.php")) $res = @include "../../../main.inc.php";
if (!$res) die("Include of main fails");
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';

View File

@ -1,6 +1,6 @@
<?php <?php
/* Copyright (C) 2007-2017 Laurent Destailleur <eldy@users.sourceforge.net> /* Copyright (C) 2007-2017 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) ---Put here your own copyright and developer email--- * Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -17,45 +17,14 @@
*/ */
/** /**
* \file htdocs/modulebuilder/template/hook_list.php * \file htdocs/zapier/hook_list.php
* \ingroup mymodule * \ingroup zapier
* \brief List page for hook * \brief List page for hook
*/ */
//if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); // Do not create database handler $db
//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); // Do not load object $user
//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1'); // Do not load object $mysoc
//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); // Do not load object $langs
//if (! defined('NOSCANGETFORINJECTION')) define('NOSCANGETFORINJECTION','1'); // Do not check injection attack on GET parameters
//if (! defined('NOSCANPOSTFORINJECTION')) define('NOSCANPOSTFORINJECTION','1'); // Do not check injection attack on POST parameters
//if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK','1'); // Do not check CSRF attack (test on referer + on token if option MAIN_SECURITY_CSRF_WITH_TOKEN is on).
//if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL','1'); // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on)
//if (! defined('NOSTYLECHECK')) define('NOSTYLECHECK','1'); // Do not check style html tag into posted data
//if (! defined('NOIPCHECK')) define('NOIPCHECK','1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip
//if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1'); // If there is no need to load and show top and left menu
//if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1'); // If we don't need to load the html.form.class.php
//if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1'); // Do not load ajax.lib.php library
//if (! defined("NOLOGIN")) define("NOLOGIN",'1'); // If this page is public (can be called outside logged session)
//if (! defined("MAIN_LANG_DEFAULT")) define('MAIN_LANG_DEFAULT','auto'); // Force lang to a particular value
//if (! defined("MAIN_AUTHENTICATION_MODE")) define('MAIN_AUTHENTICATION_MODE','aloginmodule'); // Force authentication handler
//if (! defined("NOREDIRECTBYMAINTOLOGIN")) define('NOREDIRECTBYMAINTOLOGIN',1); // The main.inc.php does not make a redirect if not logged, instead show simple error message
//if (! defined("XFRAMEOPTIONS_ALLOWALL")) define('XFRAMEOPTIONS_ALLOWALL',1); // Do not add the HTTP header 'X-Frame-Options: SAMEORIGIN' but 'X-Frame-Options: ALLOWALL'
// Load Dolibarr environment // Load Dolibarr environment
$res = 0; require '../main.inc.php';
// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined)
if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php";
// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME
$tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1;
while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { $i--; $j--; }
if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php";
if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php";
// Try main.inc.php using relative path
if (!$res && file_exists("../main.inc.php")) $res = @include "../main.inc.php";
if (!$res && file_exists("../../main.inc.php")) $res = @include "../../main.inc.php";
if (!$res && file_exists("../../../main.inc.php")) $res = @include "../../../main.inc.php";
if (!$res) die("Include of main fails");
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';

View File

@ -23,20 +23,7 @@
*/ */
// Load Dolibarr environment // Load Dolibarr environment
$res = 0; require '../main.inc.php';
// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined)
if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php";
// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME
$tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1;
while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { $i--; $j--; }
if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php";
if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php";
// Try main.inc.php using relative path
if (!$res && file_exists("../main.inc.php")) $res = @include "../main.inc.php";
if (!$res && file_exists("../../main.inc.php")) $res = @include "../../main.inc.php";
if (!$res && file_exists("../../../main.inc.php")) $res = @include "../../../main.inc.php";
if (!$res) die("Include of main fails");
dol_include_once('/mymodule/class/myobject.class.php'); dol_include_once('/mymodule/class/myobject.class.php');
dol_include_once('/mymodule/lib/mymodule_myobject.lib.php'); dol_include_once('/mymodule/lib/mymodule_myobject.lib.php');

View File

@ -19,36 +19,23 @@
*/ */
/** /**
* \file htdocs/zapierfordolibarr/template/zapierfordolibarrindex.php * \file htdocs/zapier/zapierindex.php
* \ingroup zapierfordolibarr * \ingroup zapier
* \brief Home page of zapierfordolibarr top menu * \brief Home page of zapier top menu
*/ */
// Load Dolibarr environment // Load Dolibarr environment
$res=0; require '../main.inc.php';
// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined)
if (! $res && ! empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) $res=@include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php";
// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME
$tmp=empty($_SERVER['SCRIPT_FILENAME'])?'':$_SERVER['SCRIPT_FILENAME'];$tmp2=realpath(__FILE__); $i=strlen($tmp)-1; $j=strlen($tmp2)-1;
while($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i]==$tmp2[$j]) { $i--; $j--; }
if (! $res && $i > 0 && file_exists(substr($tmp, 0, ($i+1))."/main.inc.php")) $res=@include substr($tmp, 0, ($i+1))."/main.inc.php";
if (! $res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i+1)))."/main.inc.php")) $res=@include dirname(substr($tmp, 0, ($i+1)))."/main.inc.php";
// Try main.inc.php using relative path
if (! $res && file_exists("../main.inc.php")) $res=@include "../main.inc.php";
if (! $res && file_exists("../../main.inc.php")) $res=@include "../../main.inc.php";
if (! $res && file_exists("../../../main.inc.php")) $res=@include "../../../main.inc.php";
if (! $res) die("Include of main fails");
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
// Load translation files required by the page // Load translation files required by the page
$langs->loadLangs(array("zapierfordolibarr@zapierfordolibarr")); $langs->loadLangs(array("zapier@zapier"));
$action=GETPOST('action', 'alpha'); $action=GETPOST('action', 'alpha');
// Securite acces client // Securite acces client
if (! $user->rights->zapierfordolibarr->read) accessforbidden(); if (! $user->rights->zapier->read) accessforbidden();
$socid=GETPOST('socid', 'int'); $socid=GETPOST('socid', 'int');
if (isset($user->socid) && $user->socid > 0) if (isset($user->socid) && $user->socid > 0)
{ {
@ -76,14 +63,14 @@ $formfile = new FormFile($db);
llxHeader("", $langs->trans("ZapierForDolibarrArea")); llxHeader("", $langs->trans("ZapierForDolibarrArea"));
print load_fiche_titre($langs->trans("ZapierForDolibarrArea"), '', 'zapierfordolibarr.png@zapierfordolibarr'); print load_fiche_titre($langs->trans("ZapierForDolibarrArea"), '', 'zapier.png@zapier');
print '<div class="fichecenter"><div class="fichethirdleft">'; print '<div class="fichecenter"><div class="fichethirdleft">';
/* BEGIN MODULEBUILDER DRAFT MYOBJECT /* BEGIN MODULEBUILDER DRAFT MYOBJECT
// Draft MyObject // Draft MyObject
if (! empty($conf->zapierfordolibarr->enabled) && $user->rights->zapierfordolibarr->read) if (! empty($conf->zapier->enabled) && $user->rights->zapier->read)
{ {
$langs->load("orders"); $langs->load("orders");
@ -169,7 +156,7 @@ $max=3;
/* BEGIN MODULEBUILDER LASTMODIFIED MYOBJECT /* BEGIN MODULEBUILDER LASTMODIFIED MYOBJECT
// Last modified myobject // Last modified myobject
if (! empty($conf->zapierfordolibarr->enabled) && $user->rights->zapierfordolibarr->read) if (! empty($conf->zapier->enabled) && $user->rights->zapier->read)
{ {
$sql = "SELECT s.rowid, s.nom as name, s.client, s.datec, s.tms, s.canvas"; $sql = "SELECT s.rowid, s.nom as name, s.client, s.datec, s.tms, s.canvas";
$sql.= ", s.code_client"; $sql.= ", s.code_client";

View File

@ -20,7 +20,7 @@
*/ */
/** /**
* \file htdocs/accountancy/admin/export-thirdpartyaccount.php * \file scripts/accountancy/export-thirdpartyaccount.php
* \ingroup Accounting Expert * \ingroup Accounting Expert
* \brief Page to detect empty accounting account * \brief Page to detect empty accounting account
*/ */

View File

@ -20,7 +20,7 @@
*/ */
/** /**
* \file scripts/user/sync_members_types_dolibarr2ldap.php * \file scripts/members/sync_members_types_dolibarr2ldap.php
* \ingroup ldap core * \ingroup ldap core
* \brief Script de mise a jour des types de membres dans LDAP depuis base Dolibarr * \brief Script de mise a jour des types de membres dans LDAP depuis base Dolibarr
*/ */

View File

@ -21,7 +21,7 @@
*/ */
/** /**
* \file scripts/user/sync_members_types_ldap2dolibarr.php * \file scripts/members/sync_members_types_ldap2dolibarr.php
* \ingroup ldap member * \ingroup ldap member
* \brief Script to update members types into Dolibarr from LDAP * \brief Script to update members types into Dolibarr from LDAP
*/ */