From e84e3ef01fafabd51f10df939c179b03938a09b4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 19 May 2019 19:15:18 +0200 Subject: [PATCH] Move module into external module --- build/rpm/dolibarr_fedora.spec | 1 - build/rpm/dolibarr_generic.spec | 1 - build/rpm/dolibarr_mandriva.spec | 1 - build/rpm/dolibarr_opensuse.spec | 1 - htdocs/ifttt/README.md | 7 -- htdocs/ifttt/admin/index.php | 126 ------------------------------- 6 files changed, 137 deletions(-) delete mode 100644 htdocs/ifttt/README.md delete mode 100644 htdocs/ifttt/admin/index.php diff --git a/build/rpm/dolibarr_fedora.spec b/build/rpm/dolibarr_fedora.spec index 881b5b1a6a4..b6d526bf8e1 100755 --- a/build/rpm/dolibarr_fedora.spec +++ b/build/rpm/dolibarr_fedora.spec @@ -191,7 +191,6 @@ done >>%{name}.lang %_datadir/dolibarr/htdocs/ftp %_datadir/dolibarr/htdocs/holiday %_datadir/dolibarr/htdocs/hrm -%_datadir/dolibarr/htdocs/ifttt %_datadir/dolibarr/htdocs/imports %_datadir/dolibarr/htdocs/includes %_datadir/dolibarr/htdocs/install diff --git a/build/rpm/dolibarr_generic.spec b/build/rpm/dolibarr_generic.spec index 74d6bf700bb..32c6e50018e 100755 --- a/build/rpm/dolibarr_generic.spec +++ b/build/rpm/dolibarr_generic.spec @@ -271,7 +271,6 @@ done >>%{name}.lang %_datadir/dolibarr/htdocs/ftp %_datadir/dolibarr/htdocs/holiday %_datadir/dolibarr/htdocs/hrm -%_datadir/dolibarr/htdocs/ifttt %_datadir/dolibarr/htdocs/imports %_datadir/dolibarr/htdocs/includes %_datadir/dolibarr/htdocs/install diff --git a/build/rpm/dolibarr_mandriva.spec b/build/rpm/dolibarr_mandriva.spec index 181bdb4ded4..dbb8e0d1310 100755 --- a/build/rpm/dolibarr_mandriva.spec +++ b/build/rpm/dolibarr_mandriva.spec @@ -188,7 +188,6 @@ done >>%{name}.lang %_datadir/dolibarr/htdocs/ftp %_datadir/dolibarr/htdocs/holiday %_datadir/dolibarr/htdocs/hrm -%_datadir/dolibarr/htdocs/ifttt %_datadir/dolibarr/htdocs/imports %_datadir/dolibarr/htdocs/includes %_datadir/dolibarr/htdocs/install diff --git a/build/rpm/dolibarr_opensuse.spec b/build/rpm/dolibarr_opensuse.spec index 1410e5097cf..aa810a737b9 100755 --- a/build/rpm/dolibarr_opensuse.spec +++ b/build/rpm/dolibarr_opensuse.spec @@ -199,7 +199,6 @@ done >>%{name}.lang %_datadir/dolibarr/htdocs/ftp %_datadir/dolibarr/htdocs/holiday %_datadir/dolibarr/htdocs/hrm -%_datadir/dolibarr/htdocs/ifttt %_datadir/dolibarr/htdocs/imports %_datadir/dolibarr/htdocs/includes %_datadir/dolibarr/htdocs/install diff --git a/htdocs/ifttt/README.md b/htdocs/ifttt/README.md deleted file mode 100644 index 581853f80c6..00000000000 --- a/htdocs/ifttt/README.md +++ /dev/null @@ -1,7 +0,0 @@ -API REST -======== - -## Integrate your ERP with any other applications using IFTTT - -This module provides the triggers and services to make Dolibarr compatible with IFTTT Services. - diff --git a/htdocs/ifttt/admin/index.php b/htdocs/ifttt/admin/index.php deleted file mode 100644 index 30ed2ef0a86..00000000000 --- a/htdocs/ifttt/admin/index.php +++ /dev/null @@ -1,126 +0,0 @@ - - * Copyright (C) 2005-2016 Laurent Destailleur - * Copyright (C) 2011 Juanjo Menent - * Copyright (C) 2012-2018 Regis Houssin - * Copyright (C) 2015 Jean-François Ferry - * - * 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 . - */ - -/** - * \file htdocs/ifttt/admin/index.php - * \ingroup api - * \brief Page to setup IFTTT module - */ - -require '../../main.inc.php'; -require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - -// Load translation files required by the page -$langs->load("admin"); - -if (! $user->admin) - accessforbidden(); - -$action=GETPOST('action', 'aZ09'); - - -if ($action == 'set') -{ - $res1 = dolibarr_set_const($db, 'IFTTT_SERVICE_KEY', GETPOST('IFTTT_SERVICE_KEY', 'alpha'), 'chaine', 0, '', 0); - $res2 = dolibarr_set_const($db, 'IFTTT_DOLIBARR_ENDPOINT_SECUREKEY', GETPOST('IFTTT_DOLIBARR_ENDPOINT_SECUREKEY', 'alpha'), 'chaine', 0, '', 0); - - if ($res1 > 0 && $res2) - { - header("Location: ".$_SERVER["PHP_SELF"]); - exit; - } - else - { - dol_print_error($db); - } -} - - -/* - * View - */ - -llxHeader(); - -$linkback=''.$langs->trans("BackToModuleList").''; -print load_fiche_titre($langs->trans("IFTTTSetup"), $linkback, 'title_setup'); - -print ''.$langs->trans("IFTTTDesc")."
\n"; -print "
\n"; - -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("IFTTT_SERVICE_KEY").''; -print ''; -print ''.$langs->trans("YouWillFindItOnYourIFTTTAccount").'
'.$langs->trans("IFTTT_DOLIBARR_ENDPOINT_SECUREKEY").''; -print ''; -print '
'; - -print '
'; -print ''; -print '
'; - -print '
'; - -print '

'; - - - -// Define $urlwithroot -$urlwithouturlroot=preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root)); -$urlwithroot=$urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file -//$urlwithroot=DOL_MAIN_URL_ROOT; // This is to use same domain name than current - -// Show message -$message=''; -$url=$urlwithroot.'/public/ifttt/index.php?securekey='.$conf->global->IFTTT_DOLIBARR_ENDPOINT_SECUREKEY; -$message.=$langs->trans("UrlForIFTTT").':
'; -$message.=img_picto('', 'object_globe.png').' '; -print $message; -print ajax_autoselect("endpointforifttt"); -print '
'; -print '
'; - - -llxFooter(); -$db->close();