dolibarr  9.0.0
modSyslog.class.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) 2004-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
3  * Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  */
18 
27 include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
28 
33 {
34 
40  function __construct($db)
41  {
42  $this->db = $db;
43  $this->numero = 42;
44 
45  // Family can be 'crm','financial','hr','projects','products','ecm','technic','other'
46  // It is used to group modules in module setup page
47  $this->family = "base";
48  // Module position in the family on 2 digits ('01', '10', '20', ...)
49  $this->module_position = '50';
50  // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
51  $this->name = preg_replace('/^mod/i','',get_class($this));
52  // Module description, used if translation string 'ModuleXXXDesc' not found (where XXX is value of numeric property 'numero' of module)
53  $this->description = "Activate debug logs (syslog)";
54  // Can be enabled / disabled only in the main company
55  $this->core_enabled = 1;
56  // Possible values for version are: 'development', 'experimental', 'dolibarr' or version
57  $this->version = 'dolibarr';
58  // Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase)
59  $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
60  // Name of image file used for this module.
61  $this->picto='technic';
62 
63  // Data directories to create when module is enabled
64  $this->dirs = array();
65 
66  // Config pages
67  $this->config_page_url = array("syslog.php");
68 
69  // Dependencies
70  $this->hidden = false; // A condition to hide module
71  $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled
72  $this->requiredby = array(); // List of module ids to disable if this one is disabled
73  $this->conflictwith = array(); // List of module class names as string this module is in conflict with
74  $this->phpmin = array(5,4); // Minimum version of PHP required by module
75 
76  // Constants
77  $this->const = array();
78 
79  // Boxes
80  $this->boxes = array();
81 
82  // Permissions
83  $this->rights = array();
84  $this->rights_class = 'syslog';
85 
86  // Cronjobs
87  $this->cronjobs = array(
88  0 => array(
89  'label' => 'CompressSyslogs',
90  'jobtype' => 'method',
91  'class' => 'core/class/utils.class.php',
92  'objectname' => 'Utils',
93  'method' => 'compressSyslogs',
94  'parameters' => '',
95  'comment' => 'Compress and archive log files. Warning: batch must be run with same account than your web server to avoid to get log files with different owner than required by web server. Another solution is to set web server Operating System group as the group of directory documents and set GROUP permission "rws" on this directory so log files will always have the group and permissions of the web server Operating System group',
96  'frequency' => 1,
97  'unitfrequency' => 3600 * 24,
98  'priority' => 50,
99  'status' => 0,
100  'test' => true
101  )
102  );
103  }
104 }
Class DolibarrModules.
</td >< td class="liste_titre" align="right"></td ></tr >< tr class="liste_titre">< input type="checkbox" onClick="toggle(this)"/> Ref p ref Label p label Duration p duration warehouseinternal SELECT description FROM product_lang WHERE qty< br > qty qty qty StockTooLow img yes disabled img no img no< tr class="oddeven">< td >< input type="checkbox" class="check" name="' . $i . '"' . $disabled . '></td >< td >< input type="checkbox" class="check" name="choose'.$i.'"></td >< td class="nowrap"></td >< td >< input type="hidden" name="desc' . $i . '" value="' . dol_escape_htmltag($objp-> description
Only used if Module[ID]Desc translation string is not found.
Definition: replenish.php:573
$conf db name
Only used if Module[ID]Name translation string is not found.
Definition: repair.php:103
Class to enable/disable module Logs.
__construct($db)
Constructor.