modExport.class.php 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. <?php
  2. /* Copyright (C) 2005-2007 Laurent Destailleur <eldy@users.sourceforge.net>
  3. * Copyright (C) 2005-2009 Regis Houssin <regis.houssin@capnetworks.com>
  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. /**
  19. * \defgroup export Module export
  20. * \brief Module generique pour realiser des exports de donnees en base
  21. * \file htdocs/core/modules/modExport.class.php
  22. * \ingroup export
  23. * \brief Fichier de description et activation du module export
  24. */
  25. include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
  26. /**
  27. * Class to describe and enable module export
  28. */
  29. class modExport extends DolibarrModules
  30. {
  31. /**
  32. * Constructor. Define names, constants, directories, boxes, permissions
  33. *
  34. * @param DoliDB $db Database handler
  35. */
  36. function __construct($db)
  37. {
  38. $this->db = $db;
  39. $this->numero = 240;
  40. $this->family = "technic";
  41. $this->module_position = 72;
  42. // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
  43. $this->name = preg_replace('/^mod/i','',get_class($this));
  44. $this->description = "Outils d'exports de donnees Dolibarr (via un assistant)";
  45. // Possible values for version are: 'experimental' or 'dolibarr' or version
  46. $this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version
  47. $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
  48. $this->special = 0;
  49. $this->picto = 'technic';
  50. // Data directories to create when module is enabled
  51. $this->dirs = array("/export/temp");
  52. // Config pages
  53. $this->config_page_url = array();
  54. // Dependencies
  55. $this->depends = array();
  56. $this->requiredby = array();
  57. $this->phpmin = array(4,2,0);
  58. $this->phpmax = array();
  59. // Constants
  60. $this->const = array();
  61. // Boxes
  62. $this->boxes = array();
  63. // Permissions
  64. $this->rights = array();
  65. $this->rights_class = 'export';
  66. $r=0;
  67. $r++;
  68. $this->rights[$r][0] = 1201;
  69. $this->rights[$r][1] = 'Lire les exports';
  70. $this->rights[$r][2] = 'r';
  71. $this->rights[$r][3] = 1;
  72. $this->rights[$r][4] = 'lire';
  73. $r++;
  74. $this->rights[$r][0] = 1202;
  75. $this->rights[$r][1] = 'Creer/modifier un export';
  76. $this->rights[$r][2] = 'w';
  77. $this->rights[$r][3] = 0;
  78. $this->rights[$r][4] = 'creer';
  79. }
  80. }