diff --git a/htdocs/mantis/admin/mantis.php b/htdocs/mantis/admin/mantis.php deleted file mode 100644 index 8504264034a..00000000000 --- a/htdocs/mantis/admin/mantis.php +++ /dev/null @@ -1,208 +0,0 @@ - - * Copyright (C) 2003 �ric Seigne - * Copyright (C) 2004-2008 Laurent Destailleur - * Copyright (C) 2004 Sebastien Di Cintio - * Copyright (C) 2004 Benoit Mortier - * - * 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 2 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 . - * - * $Id: mantis.php,v 1.3 2011/07/31 23:24:38 eldy Exp $ - */ - -/** - * \file htdocs/mantis/admin/mantis.php - * \ingroup mantis - * \brief Page de configuration du module mantis - * \version $Revision: 1.3 $ - */ - -require("../../main.inc.php"); -require_once(DOL_DOCUMENT_ROOT."/lib/admin.lib.php"); -require_once(DOL_DOCUMENT_ROOT.'/mantis/class/mantis.class.php'); - - -if (!$user->admin) - accessforbidden(); - - -$langs->load("admin"); -$langs->load("other"); - -$def = array(); -$actiontest=$_POST["test"]; -$actionsave=$_POST["save"]; - -// Sauvegardes parametres -if ($actionsave) -{ - $i=0; - - $db->begin(); - - $i+=dolibarr_set_const($db,'PHPMANTIS_URL',trim($_POST["phpmantis_url"]),'chaine',0,'',$conf->entity); - $i+=dolibarr_set_const($db,'PHPMANTIS_HOST',trim($_POST["phpmantis_host"]),'chaine',0,'',$conf->entity); - $i+=dolibarr_set_const($db,'PHPMANTIS_DBNAME',trim($_POST["phpmantis_dbname"]),'chaine',0,'',$conf->entity); - $i+=dolibarr_set_const($db,'PHPMANTIS_USER',trim($_POST["phpmantis_user"]),'chaine',0,'',$conf->entity); - $i+=dolibarr_set_const($db,'PHPMANTIS_PASS',trim($_POST["phpmantis_pass"]),'chaine',0,'',$conf->entity); - - if ($i >= 5) - { - $db->commit(); - $mesg = "".$langs->trans("MantisSetupSaved").""; - } - else - { - $db->rollback(); - header("Location: ".$_SERVER["PHP_SELF"]); - exit; - } -} -elseif ($actiontest) -{ - //$resql=$db->query("select count(*) from llx_const"); - //print "< ".$db." - ".$db->db." - ".$resql." - ".$db->error().">
\n"; - - // Test de la connexion a la database mantis - $conf->mantis->db->type=$dolibarr_main_db_type; - $conf->mantis->db->host=$_POST["phpmantis_host"]; - $conf->mantis->db->port=$_POST["phpmantis_port"]; - $conf->mantis->db->user=$_POST["phpmantis_user"]; - $conf->mantis->db->pass=$_POST["phpmantis_pass"]; - $conf->mantis->db->name=$_POST["phpmantis_dbname"]; - - $mantis=new Mantis(); - - //print "D ".$db." - ".$db->db."
\n"; - //print "W ".$mantis->localdb." - ".$mantis->localdb->db."
\n"; - - if ($mantis->localdb->connected == 1 && $mantis->localdb->database_selected == 1) - { - // V�rifie si bonne base - $sql="SELECT value FROM mantis_config_table WHERE config_id='database_version'"; - $resql=$mantis->localdb->query($sql); - if ($resql) { - $mesg ="
"; - $mesg.=$langs->trans("MantisTestOk",$_POST["phpmantis_host"],$_POST["phpmantis_dbname"],$_POST["phpmantis_user"]); - $mesg.="
"; - } - else { - $mesg ="
"; - $mesg.=$langs->trans("MantisErrorConnectOkButWrongDatabase"); - $mesg.="
"; - } - - //$mantis->localdb->close(); Ne pas fermer car la conn de mantis est la meme que dolibarr si parametre host/user/pass identique - } - elseif ($mantis->connected == 1 && $mantis->database_selected != 1) - { - $mesg ="
".$langs->trans("MantisTestKo1",$_POST["phpmantis_host"],$_POST["phpmantis_dbname"]); - $mesg.="
".$mantis->localdb->error(); - $mesg.="
"; - //$mantis->localdb->close(); Ne pas fermer car la conn de mantis est la meme que dolibarr si parametre host/user/pass identique - } - else - { - $mesg ="
".$langs->trans("MantisTestKo2",$_POST["phpmantis_host"],$_POST["phpmantis_user"]); - $mesg.="
".$mantis->localdb->error(); - $mesg.="
"; - } - - //$resql=$db->query("select count(*) from llx_const"); - //print "< ".$db." - ".$db->db." - ".$resql." - ".$db->error().">
\n"; -} - - -/** - * Affichage du formulaire de saisie - */ - -llxHeader(); - -$linkback=''.$langs->trans("BackToModuleList").''; -print_fiche_titre($langs->trans("MantisSetup"),$linkback,'setup'); -print '
'; - - -print '
'; -print ''; -print ""; - -print ""; -print ""; -print ""; -print ""; -print ""; - -print ""; -print ""; -print ""; -print ""; -print ""; - -print ""; -print ""; -print ""; -print ""; -print ""; - -print ""; -print ""; -print ""; -print ""; -print ""; - -print ""; -print ""; -print ""; -print ""; -print ""; - -print ""; -print ""; -print ""; -print ''; -print ""; - -print "
".$langs->trans("Parameter")."".$langs->trans("Value")."".$langs->trans("Examples")."
".$langs->trans("MantisURL")."global->PHPMANTIS_URL) . "\" size=\"40\">http://localhost/mantis/"; -print "
https://mantisserver/"; -print "
".$langs->trans("MantisServer")."global->PHPMANTIS_HOST) . "\" size=\"30\">localhost"; -//print "
__dolibarr_main_db_host__ (".$dolibarr_main_db_host.")" -print "
".$langs->trans("MantisDatabaseName")."global->PHPMANTIS_DBNAME) . "\" size=\"30\">bugtracker"; -//print "
__dolibarr_main_db_name__ (".$dolibarr_main_db_name.")"; -print "
".$langs->trans("MantisUser")."global->PHPMANTIS_USER) . "\" size=\"30\">mantis"; -//print "
__dolibarr_main_db_user__ (".$dolibarr_main_db_user.")"; -print "
".$langs->trans("Password")."global->PHPMANTIS_PASS) . "\" size=\"30\">'; -//if ($dolibarr_main_db_pass) print '__dolibarr_main_db_pass__ ('.preg_replace('/./i','*',$dolibarr_main_db_pass).')'; -print ' 
"; - - -print '
'; -print "trans("TestConnection")."\">"; -print "   "; -print "trans("Save")."\">"; -print "
"; - -print "
\n"; - - -clearstatcache(); - -if ($mesg) print "
$mesg
"; -print "
"; - -$db->close(); - -llxFooter('$Date: 2011/07/31 23:24:38 $ - $Revision: 1.3 $'); -?> diff --git a/htdocs/mantis/class/mantis.class.php b/htdocs/mantis/class/mantis.class.php deleted file mode 100644 index 31a003e4c10..00000000000 --- a/htdocs/mantis/class/mantis.class.php +++ /dev/null @@ -1,70 +0,0 @@ - - * Copyright (C) 2004-2008 Laurent Destailleur - * - * 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 2 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 . - * - * $Id: mantis.class.php,v 1.2 2011/07/31 23:24:38 eldy Exp $ - */ - -/** - \file htdocs/mantis/class/mantis.class.php - \ingroup mantis - \brief Ensemble des fonctions permettant d'acceder a la database mantis. - \author Laurent Destailleur. - \version $Revision: 1.2 $ -*/ - - -/** - \class Mantis - \brief Classe permettant d'acceder a la database mantis -*/ - -class Mantis { - - var $localdb; - - var $date; - var $duree = 0; // Secondes - var $texte; - var $desc; - - var $error; - - - /** - \brief Constructeur de la classe d'interface a mantisendar - */ - function Mantis() - { - global $conf; - global $dolibarr_main_db_type,$dolibarr_main_db_host,$dolibarr_main_db_user; - global $dolibarr_main_db_pass,$dolibarr_main_db_name; - - // Defini parametres mantis (avec substitution eventuelle) - $mantistype=preg_replace('/__dolibarr_main_db_type__/i',$dolibarr_main_db_type,$conf->mantis->db->type); - $mantishost=preg_replace('/__dolibarr_main_db_host__/i',$dolibarr_main_db_host,$conf->mantis->db->host); - $mantisport=preg_replace('/__dolibarr_main_db_port__/i',$dolibarr_main_db_port,$conf->mantis->db->port); - $mantisuser=preg_replace('/__dolibarr_main_db_user__/i',$dolibarr_main_db_user,$conf->mantis->db->user); - $mantispass=preg_replace('/__dolibarr_main_db_pass__/i',$dolibarr_main_db_pass,$conf->mantis->db->pass); - $mantisname=preg_replace('/__dolibarr_main_db_name__/i',$dolibarr_main_db_name,$conf->mantis->db->name); - - // On initie la connexion a la base mantisendar - require_once (DOL_DOCUMENT_ROOT ."/lib/databases/".$mantistype.".lib.php"); - $this->localdb = new DoliDb($mantistype,$mantishost,$mantisuser,$mantispass,$mantisname,$mantisport); - } - -} -?> diff --git a/htdocs/mantis/index.php b/htdocs/mantis/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/mantis/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/mantis/mantis.php b/htdocs/mantis/mantis.php deleted file mode 100644 index 4f1877aabdc..00000000000 --- a/htdocs/mantis/mantis.php +++ /dev/null @@ -1,69 +0,0 @@ - - * - * 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 2 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 . - * - * $Id: mantis.php,v 1.8 2011/07/31 23:24:38 eldy Exp $ - */ - -/** \file htdocs/mantis/mantis.php - \ingroup mantis - \brief Page generant 2 frames, une pour le menu Dolibarr, l'autre pour l'affichage de Mantis - \author Laurent Destailleur - \version $Revision: 1.8 $ -*/ - -require("../main.inc.php"); - -if (empty($conf->global->PHPMANTIS_URL)) -{ - llxHeader(); - print '
Module Mantis was not configured properly.
'; - llxFooter('$Date: 2011/07/31 23:24:38 $ - $Revision: 1.8 $'); -} - -$mainmenu=isset($_GET["mainmenu"])?$_GET["mainmenu"]:""; -$leftmenu=isset($_GET["leftmenu"])?$_GET["leftmenu"]:""; -$idmenu=isset($_GET["idmenu"])?$_GET["idmenu"]:""; - -print " - - -Dolibarr frame for Mantis - - - - - global->PHPMANTIS_URL."\"> - - <body> - - </body> - - - - -<body> - <br><center> - Sorry, your browser is too old or not correctly configured to view this area.<br> - Your browser must support frames.<br> - </center> -</body> - - - -"; - - -?> diff --git a/htdocs/mantis/mantistop.php b/htdocs/mantis/mantistop.php deleted file mode 100644 index 22d39f78d27..00000000000 --- a/htdocs/mantis/mantistop.php +++ /dev/null @@ -1,40 +0,0 @@ - - * - * 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 2 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 . - */ - -/** - \file htdocs/mantis/mantistop.php - \ingroup mantis - \brief Top frame to show mantis application - \version $Id: mantistop.php,v 1.5 2011/07/31 23:24:38 eldy Exp $ -*/ - -require ("../main.inc.php"); - -top_htmlhead("",""); -top_menu("","","_top"); - -?> - - - - - - - - - - diff --git a/test/phpunit/ModulesTest.php b/test/phpunit/ModulesTest.php index f3b7ae716f6..353d582d2b5 100755 --- a/test/phpunit/ModulesTest.php +++ b/test/phpunit/ModulesTest.php @@ -168,7 +168,7 @@ class ModulesTest extends PHPUnit_Framework_TestCase 'CashDesk','Categorie','ClickToDial','Commande','Comptabilite','Contrat','Deplacement','Document','Don', 'ECM','Expedition','Export','ExternalRss','ExternalSite','FTP','Facture', 'Fckeditor','Ficheinter','Fournisseur','GeoIPMaxmind','Gravatar','Import','Label','Ldap','Mailing', - 'Mantis','Notification','Paybox','Paypal','Prelevement','Product','Projet','Propale', + 'Notification','Paybox','Paypal','Prelevement','Product','Projet','Propale', 'Service','Societe','Stock','Syslog','Tax','User','WebServices'); foreach($modulelist as $modlabel) {