";
}
$atleastoneforfamily++;
- if ($family!=$oldfamily)
+ if ($familykey!=$oldfamily)
{
- $familytext=empty($familylib[$family])?$family:$familylib[$family];
- //print $familytext;
- $oldfamily=$family;
+ $familytext=empty($familyinfo[$familykey]['label'])?$familykey:$familyinfo[$familykey]['label'];
+ $oldfamily=$familykey;
}
$var=!$var;
diff --git a/htdocs/core/modules/DolibarrModules.class.php b/htdocs/core/modules/DolibarrModules.class.php
index c059ff7c2cc..b8d4df05e92 100644
--- a/htdocs/core/modules/DolibarrModules.class.php
+++ b/htdocs/core/modules/DolibarrModules.class.php
@@ -35,17 +35,20 @@
class DolibarrModules // Can not be abstract, because we need to instantiant it into unActivateModule to be able to disable a module whose files were removed.
{
/**
+ * @var int Module unique ID
+ */
+ public $numero;
+
+ /**
+ * @var string Module name
+ */
+ public $name;
+
+ /**
* @var DoliDb Database handler
*/
public $db;
- /**
- * @var string Relative path to module style sheet
- * @deprecated
- * @see module_parts
- */
- public $style_sheet = '';
-
/**
* @var array Paths to create when module is activated
*/
@@ -134,16 +137,6 @@ class DolibarrModules // Can not be abstract, because we need to insta
*/
public $error;
- /**
- * @var int Module unique ID
- */
- public $numero;
-
- /**
- * @var string Module name
- */
- public $name;
-
/**
* @var string Module version
*/
@@ -193,7 +186,15 @@ class DolibarrModules // Can not be abstract, because we need to insta
* @var bool Module is enabled globally (Multicompany support)
*/
public $core_enabled;
+
+ /**
+ * @var string Relative path to module style sheet
+ * @deprecated
+ * @see module_parts
+ */
+ public $style_sheet = '';
+
/**
* Constructor. Define names, constants, directories, boxes, permissions
@@ -470,6 +471,7 @@ class DolibarrModules // Can not be abstract, because we need to insta
if ($this->version == 'dolibarr' || $this->version == 'dolibarr_deprecated') return 'core';
if (! empty($this->version) && ! in_array($this->version,array('experimental','development'))) return 'external';
if (! empty($this->editor_name) || ! empty($this->editor_web)) return 'external';
+ if ($this->numero >= 100000) return 'external';
return 'unknown';
}
diff --git a/htdocs/core/modules/modCashDesk.class.php b/htdocs/core/modules/modCashDesk.class.php
index a76531cd719..430d62146f5 100644
--- a/htdocs/core/modules/modCashDesk.class.php
+++ b/htdocs/core/modules/modCashDesk.class.php
@@ -45,7 +45,7 @@ class modCashDesk extends DolibarrModules
// Key text used to identify module (for permission, menus, etc...)
$this->rights_class = 'cashdesk';
- $this->family = "products";
+ $this->family = "portal";
// Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
$this->name = preg_replace('/^mod/i','',get_class($this));
$this->description = "CashDesk module";
diff --git a/htdocs/core/modules/modLabel.class.php b/htdocs/core/modules/modLabel.class.php
index 54f65a83591..0b282584261 100644
--- a/htdocs/core/modules/modLabel.class.php
+++ b/htdocs/core/modules/modLabel.class.php
@@ -43,7 +43,7 @@ class modLabel extends DolibarrModules
$this->db = $db;
$this->numero = 60;
- $this->family = "other";
+ $this->family = "technic";
// Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
$this->name = preg_replace('/^mod/i','',get_class($this));
$this->description = "Gestion des etiquettes";
diff --git a/htdocs/core/modules/modUser.class.php b/htdocs/core/modules/modUser.class.php
index 8c510186f06..d3be64d0560 100644
--- a/htdocs/core/modules/modUser.class.php
+++ b/htdocs/core/modules/modUser.class.php
@@ -45,7 +45,7 @@ class modUser extends DolibarrModules
$this->db = $db;
$this->numero = 0;
- $this->family = "base"; // Family for module (or "base" if core module)
+ $this->family = "hr"; // Family for module (or "base" if core module)
// Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
$this->name = preg_replace('/^mod/i','',get_class($this));
$this->description = "Gestion des utilisateurs (requis)";
diff --git a/htdocs/core/modules/modSyncSupplierWebServices.class.php b/htdocs/core/modules/modWebServicesClient.class.php
similarity index 94%
rename from htdocs/core/modules/modSyncSupplierWebServices.class.php
rename to htdocs/core/modules/modWebServicesClient.class.php
index 96403f67ee4..dd13d8920db 100644
--- a/htdocs/core/modules/modSyncSupplierWebServices.class.php
+++ b/htdocs/core/modules/modWebServicesClient.class.php
@@ -27,7 +27,7 @@ include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
/**
* Class to describe a sync supplier web services module
*/
-class modSyncSupplierWebServices extends DolibarrModules
+class modWebServicesClient extends DolibarrModules
{
/**
@@ -38,12 +38,12 @@ class modSyncSupplierWebServices extends DolibarrModules
function __construct($db)
{
$this->db = $db;
- $this->numero = 2650;
+ $this->numero = 2660;
$this->family = "technic";
// Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
$this->name = preg_replace('/^mod/i','',get_class($this));
- $this->description = "Enable the client for external supplier web services";
+ $this->description = "Enable the web service client to call external supplier web services";
$this->version = 'experimental'; // 'experimental' or 'dolibarr' or version
// Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase)
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
diff --git a/htdocs/core/modules/modWebsite.class.php b/htdocs/core/modules/modWebsite.class.php
new file mode 100644
index 00000000000..0e75daa26bd
--- /dev/null
+++ b/htdocs/core/modules/modWebsite.class.php
@@ -0,0 +1,124 @@
+
+ *
+ * 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
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+/**
+ * \defgroup website Module website
+ * \brief Website module descriptor.
+ * \file htdocs/core/modules/modWebsite.class.php
+ * \ingroup website
+ * \brief Description and activation file for module Website
+ */
+include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
+
+
+/**
+ * Class to describe Website module
+ */
+class modWebsite extends DolibarrModules
+{
+
+ /**
+ * Constructor. Define names, constants, directories, boxes, permissions
+ *
+ * @param DoliDB $db Database handler
+ */
+ function __construct($db)
+ {
+ global $langs,$conf;
+
+ $this->db = $db;
+ $this->numero = 10000;
+
+ // Family can be 'crm','financial','hr','projects','products','ecm','technic','other'
+ // It is used to group modules in module setup page
+ $this->family = "portal";
+ // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
+ $this->name = preg_replace('/^mod/i','',get_class($this));
+ $this->description = "Enable the public website with CMS features";
+ $this->version = 'development'; // 'experimental' or 'dolibarr' or version
+ // Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase)
+ $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
+ // Where to store the module in setup page (0=common,1=interface,2=others,3=very specific)
+ $this->special = 0;
+ // Name of image file used for this module.
+ $this->picto='globe';
+
+ // Data directories to create when module is enabled
+ $this->dirs = array();
+
+ // Config pages
+ //-------------
+ $this->config_page_url = array("website.php");
+
+ // Dependancies
+ //-------------
+ $this->hidden = ! empty($conf->global->WEBSITE_MODULE_DISABLED); // A condition to disable module
+ $this->depends = array(); // List of modules id that must be enabled if this module is enabled
+ $this->requiredby = array(); // List of modules id to disable if this one is disabled
+ $this->conflictwith = array(); // List of modules id this module is in conflict with
+ $this->langfiles = array("website");
+
+ // Constants
+ //-----------
+ $this->const = array();
+
+ // New pages on tabs
+ // -----------------
+ $this->tabs = array();
+
+ // Boxes
+ //------
+ $this->boxes = array();
+
+ // Permissions
+ $this->rights = array(); // Permission array used by this module
+ $this->rights_class = 'website';
+ $r=0;
+
+ $this->rights[$r][0] = 10001;
+ $this->rights[$r][1] = 'Read website content';
+ $this->rights[$r][3] = 1;
+ $this->rights[$r][4] = 'read';
+ $r++;
+
+ $this->rights[$r][0] = 10002;
+ $this->rights[$r][1] = 'Create/modify website content';
+ $this->rights[$r][3] = 0;
+ $this->rights[$r][4] = 'create';
+ $r++;
+
+ $this->rights[$r][0] = 10003;
+ $this->rights[$r][1] = 'Delete website content';
+ $this->rights[$r][3] = 0;
+ $this->rights[$r][4] = 'delete';
+ $r++;
+
+ // Main menu entries
+ $r=0;
+ $this->menu[$r]=array( 'fk_menu'=>'fk_mainmenu=home', // Use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
+ 'type'=>'top', // This is a Left menu entry
+ 'titre'=>'Website',
+ 'url'=>'/website/index.php',
+ 'langs'=>'website', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
+ 'position'=>100,
+ 'enabled'=>'$conf->website->enabled', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
+ 'perms'=>'$user->rights->website->read', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
+ 'target'=>'',
+ 'user'=>2); // 0=Menu for internal users, 1=external users, 2=both
+ $r++;
+ }
+}
diff --git a/htdocs/cron/list.php b/htdocs/cron/list.php
index 1f4e5126ed0..dd02db53bc8 100644
--- a/htdocs/cron/list.php
+++ b/htdocs/cron/list.php
@@ -197,9 +197,7 @@ print '
';
if ($user->rights->cron->delete)
{
print "id."&status=".$status."&action=delete\" title=\"".dol_escape_htmltag($langs->trans('CronDelete'))."\">".img_picto($langs->trans('CronDelete'),'delete')." ";
diff --git a/htdocs/install/mysql/data/llx_const.sql b/htdocs/install/mysql/data/llx_const.sql
index 13604638f01..2c25765223e 100644
--- a/htdocs/install/mysql/data/llx_const.sql
+++ b/htdocs/install/mysql/data/llx_const.sql
@@ -32,7 +32,7 @@
-- Visible in misc page
insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_NOT_INSTALLED','1','chaine','Setup is running',1,0);
-insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_FEATURES_LEVEL','0','chaine','Level of features to show (0=stable only, 1=stable+experimental, 2=stable+experimental+development',1,0);
+insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_FEATURES_LEVEL','0','chaine','Level of features to show: -1=stable+deprecated, 0=stable only (default), 1=stable+experimental, 2=stable+experimental+development',1,0);
insert into llx_const (name, value, type, note, visible, entity) values ('MAILING_LIMIT_SENDBYWEB','25','chaine','Number of targets to defined packet size when sending mass email',1,0);
-- Hidden and common to all entities
diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang
index 508a4dceee7..fec9f4876e1 100755
--- a/htdocs/langs/en_US/admin.lang
+++ b/htdocs/langs/en_US/admin.lang
@@ -285,14 +285,16 @@ ModuleSetup=Module setup
ModulesSetup=Modules setup
ModuleFamilyBase=System
ModuleFamilyCrm=Customer Relation Management (CRM)
-ModuleFamilyProducts=Products Management
-ModuleFamilyHr=Human Resource Management
+ModuleFamilyProducts=Products Management (PM)
+ModuleFamilyHr=Human Resource Management (HR)
ModuleFamilyProjects=Projects/Collaborative work
ModuleFamilyOther=Other
ModuleFamilyTechnic=Multi-modules tools
ModuleFamilyExperimental=Experimental modules
ModuleFamilyFinancial=Financial Modules (Accounting/Treasury)
ModuleFamilyECM=Electronic Content Management (ECM)
+ModuleFamilyPortal=Web sites and other frontal application
+ModuleFamilyInterface=Interfaces with external systems
MenuHandlers=Menu handlers
MenuAdmin=Menu editor
DoNotUseInProduction=Do not use in production
@@ -524,12 +526,12 @@ Module2400Name=Agenda
Module2400Desc=Events/tasks and agenda management
Module2500Name=Electronic Content Management
Module2500Desc=Save and share documents
-Module2600Name=API services (Web services SOAP)
+Module2600Name=API/Web services (SOAP server)
Module2600Desc=Enable the Dolibarr SOAP server providing API services
-Module2610Name=API services (Web services REST)
+Module2610Name=API/Web services (REST server)
Module2610Desc=Enable the Dolibarr REST server providing API services
-Module2650Name=WebServices (client)
-Module2650Desc=Enable the Dolibarr web services client (Can be used to push data/requests to external servers. Supplier orders supported only for the moment)
+Module2660Name=Call WebServices (SOAP client)
+Module2660Desc=Enable the Dolibarr web services client (Can be used to push data/requests to external servers. Supplier orders supported only for the moment)
Module2700Name=Gravatar
Module2700Desc=Use online Gravatar service (www.gravatar.com) to show photo of users/members (found with their emails). Need an internet access
Module2800Desc=FTP Client
@@ -1001,6 +1003,7 @@ SystemAreaForAdminOnly=This area is available for administrator users only. None
CompanyFundationDesc=Edit on this page all known information of the company or foundation you need to manage (For this, click on "Modify" button at bottom of page)
DisplayDesc=You can choose each parameter related to the Dolibarr look and feel here
AvailableModules=Available modules
+DeprecatedModules=Deprecated modules
ToActivateModule=To activate modules, go on setup Area (Home->Setup->Modules).
SessionTimeOut=Time out for session
SessionExplanation=This number guarantee that session will never expire before this delay, if the session cleaner is done by Internal PHP session cleaner (and nothing else). Internal PHP session cleaner does not guaranty that session will expire just after this delay. It will expire, after this delay, and when the session cleaner is ran, so every %s/%s access, but only during access made by other sessions. Note: on some servers with an external session cleaning mechanism (cron under debian, ubuntu ...), the sessions can be destroyed after a period defined by the default session.gc_maxlifetime, no matter what the value entered here.