From 7b6cb59f4bc1994c54680e086563055dd630ecc9 Mon Sep 17 00:00:00 2001 From: aspangaro Date: Thu, 19 Mar 2015 05:17:10 +0100 Subject: [PATCH] Move module Don in htdocs->donations --- htdocs/{ => donations}/core/lib/donation.lib.php | 0 .../core/modules/dons/html_cerfafr.html | 0 .../core/modules/dons/html_cerfafr.modules.php | 0 htdocs/{ => donations}/core/modules/dons/index.html | 0 .../{ => donations}/core/modules/dons/modules_don.php | 0 htdocs/{ => donations}/core/modules/modDon.class.php | 10 +++++----- 6 files changed, 5 insertions(+), 5 deletions(-) rename htdocs/{ => donations}/core/lib/donation.lib.php (100%) rename htdocs/{ => donations}/core/modules/dons/html_cerfafr.html (100%) rename htdocs/{ => donations}/core/modules/dons/html_cerfafr.modules.php (100%) rename htdocs/{ => donations}/core/modules/dons/index.html (100%) rename htdocs/{ => donations}/core/modules/dons/modules_don.php (100%) rename htdocs/{ => donations}/core/modules/modDon.class.php (95%) diff --git a/htdocs/core/lib/donation.lib.php b/htdocs/donations/core/lib/donation.lib.php similarity index 100% rename from htdocs/core/lib/donation.lib.php rename to htdocs/donations/core/lib/donation.lib.php diff --git a/htdocs/core/modules/dons/html_cerfafr.html b/htdocs/donations/core/modules/dons/html_cerfafr.html similarity index 100% rename from htdocs/core/modules/dons/html_cerfafr.html rename to htdocs/donations/core/modules/dons/html_cerfafr.html diff --git a/htdocs/core/modules/dons/html_cerfafr.modules.php b/htdocs/donations/core/modules/dons/html_cerfafr.modules.php similarity index 100% rename from htdocs/core/modules/dons/html_cerfafr.modules.php rename to htdocs/donations/core/modules/dons/html_cerfafr.modules.php diff --git a/htdocs/core/modules/dons/index.html b/htdocs/donations/core/modules/dons/index.html similarity index 100% rename from htdocs/core/modules/dons/index.html rename to htdocs/donations/core/modules/dons/index.html diff --git a/htdocs/core/modules/dons/modules_don.php b/htdocs/donations/core/modules/dons/modules_don.php similarity index 100% rename from htdocs/core/modules/dons/modules_don.php rename to htdocs/donations/core/modules/dons/modules_don.php diff --git a/htdocs/core/modules/modDon.class.php b/htdocs/donations/core/modules/modDon.class.php similarity index 95% rename from htdocs/core/modules/modDon.class.php rename to htdocs/donations/core/modules/modDon.class.php index b1b265146a4..bf5db49ec82 100644 --- a/htdocs/core/modules/modDon.class.php +++ b/htdocs/donations/core/modules/modDon.class.php @@ -2,7 +2,7 @@ /* Copyright (C) 2003-2005 Rodolphe Quiedeville * Copyright (C) 2004-2010 Laurent Destailleur * Copyright (C) 2005-2011 Regis Houssin - * Copyright (C) 2014 Alexandre Spangaro + * Copyright (C) 2015 Alexandre Spangaro * * 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 @@ -64,7 +64,7 @@ class modDon extends DolibarrModules $this->requiredby = array(); // Config pages - $this->config_page_url = array("dons.php"); + $this->config_page_url = array("dons.php@donations"); // Constants $this->const = array (); @@ -146,8 +146,8 @@ class modDon extends DolibarrModules global $conf; $sql = array( - "DELETE FROM ".MAIN_DB_PREFIX."document_model WHERE nom = '".$this->const[0][2]."' AND entity = ".$conf->entity, - "INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity) VALUES('".$this->const[0][2]."','donation',".$conf->entity.")", + "DELETE FROM ".MAIN_DB_PREFIX."document_model WHERE nom = '".$this->const[0][4]."' AND entity = ".$conf->entity, + "INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity) VALUES('".$this->const[0][4]."','donation',".$conf->entity.")", ); return $this->_init($sql,$options); @@ -168,4 +168,4 @@ class modDon extends DolibarrModules return $this->_remove($sql,$options); } -} +} \ No newline at end of file