-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #269 from nicolas-eoxia/clean_code_and_files
#268 [Mod] clean: all files with PSR-12 - PHPCS
- Loading branch information
Showing
51 changed files
with
2,715 additions
and
7,839 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,23 @@ | ||
# Generated binaries | ||
/build/*.zip | ||
/bin/*.zip | ||
# Doxygen generated documentation | ||
/build/doxygen/doxygen_warnings.log | ||
/doc/code/doxygen | ||
# Composer managed dependencies | ||
/vendor | ||
/dev/bin | ||
# PHPdocumentor generated files | ||
/build/phpdoc | ||
/doc/code/phpdoc | ||
# Sphinx generated files | ||
/doc/user/build | ||
/.settings/ | ||
/.buildpath | ||
/.project | ||
# Other | ||
*.back | ||
/.editorconfig | ||
/.gitattributes | ||
node_modules | ||
npm-debug.log | ||
.idea | ||
vendor | ||
.editorconfig | ||
.gitattributes | ||
package-lock.json |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
<?php | ||
/* Copyright (C) 2004-2017 Laurent Destailleur <[email protected]> | ||
* Copyright (C) 2022 SuperAdmin <[email protected]> | ||
/* Copyright (C) 2023-2024 EVARISK <[email protected]> | ||
* | ||
* 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 | ||
|
@@ -17,82 +16,57 @@ | |
*/ | ||
|
||
/** | ||
* \file dolicar/admin/setup.php | ||
* \file dolicar/admin/quickcreation.php | ||
* \ingroup dolicar | ||
* \brief DoliCar setup page. | ||
* \brief DoliCar quickcreation config page | ||
*/ | ||
|
||
// Load DoliCar environment | ||
if (file_exists('../dolicar.main.inc.php')) { | ||
require_once __DIR__ . '/../dolicar.main.inc.php'; | ||
require_once __DIR__ . '/../dolicar.main.inc.php'; | ||
} elseif (file_exists('../../dolicar.main.inc.php')) { | ||
require_once __DIR__ . '/../../dolicar.main.inc.php'; | ||
require_once __DIR__ . '/../../dolicar.main.inc.php'; | ||
} else { | ||
die('Include of dolicar main fails'); | ||
die('Include of dolicar main fails'); | ||
} | ||
|
||
// Global variables definitions | ||
global $conf, $db, $langs, $user; | ||
|
||
// Libraries | ||
require_once DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php"; | ||
|
||
// Load DoliCar libraries | ||
require_once __DIR__ . '/../lib/dolicar.lib.php'; | ||
require_once __DIR__ . '/../lib/dolicar_functions.lib.php'; | ||
require_once __DIR__ . '/../lib/dolicar_registrationcertificatefr.lib.php'; | ||
//require_once "../class/myclass.class.php"; | ||
|
||
// Translations | ||
saturne_load_langs(['admin', 'categories']); | ||
|
||
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context | ||
$hookmanager->initHooks(array('dolicarsetup', 'globalsetup')); | ||
|
||
// Access control | ||
$permissiontoread = $user->rights->dolicar->adminpage->read; | ||
saturne_check_access($permissiontoread); | ||
|
||
// Parameters | ||
$action = GETPOST('action', 'aZ09'); | ||
$backtopage = GETPOST('backtopage', 'alpha'); | ||
$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php | ||
// Global variables definitions | ||
global $conf, $db, $langs, $user; | ||
|
||
/* | ||
* Actions | ||
*/ | ||
// Load translation files required by the page | ||
saturne_load_langs(); | ||
|
||
include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php'; | ||
// Security check - Protection if external user | ||
$permissionToRead = $user->rights->dolicar->adminpage->read && isModEnabled('easycrm'); | ||
saturne_check_access($permissionToRead); | ||
|
||
/* | ||
* View | ||
*/ | ||
|
||
$form = new Form($db); | ||
|
||
$help_url = ''; | ||
$page_name = $langs->transnoentities('DolicarSetup'); | ||
$title = $langs->trans('ModuleSetup', 'DoliCar'); | ||
$helpUrl = 'FR:Module_DoliCar'; | ||
|
||
saturne_header(0, '', $langs->trans($page_name), $help_url); | ||
saturne_header(0, '', $title, $helpUrl); | ||
|
||
// Subheader | ||
$linkback = '<a href="'.($backtopage ? $backtopage : DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1').'">'.$langs->trans("BackToModuleList").'</a>'; | ||
$linkBack = '<a href="'. DOL_URL_ROOT . '/admin/modules.php?restore_lastsearch_values=1' . '">' . $langs->trans('BackToModuleList') . '</a>'; | ||
|
||
print load_fiche_titre($langs->trans($page_name), $linkback, 'title_setup'); | ||
print load_fiche_titre($title, $linkBack, 'title_setup'); | ||
|
||
// Configuration header | ||
$head = dolicar_admin_prepare_head(); | ||
print dol_get_fiche_head($head, 'quickcreation', $langs->trans($page_name), -1, "dolicar_color@dolicar"); | ||
print dol_get_fiche_head($head, 'quickcreation', $title, -1, 'dolicar_color@dolicar'); | ||
|
||
print load_fiche_titre($langs->transnoentities("QuickCreationConfiguration"), '', ''); | ||
print load_fiche_titre($langs->transnoentities('Config'), '', ''); | ||
|
||
print '<div class="div-table-responsive-no-min">'; | ||
print '<form id="APIUsername">'; | ||
print '<input hidden name="action" value="setAPIUsername">'; | ||
print '<input hidden name="token" value="'. newToken() .'">'; | ||
print '<table class="noborder centpercent">'; | ||
print '<tr class="liste_titre">'; | ||
print '<td>' . $langs->transnoentities("Parameters") . '</td>'; | ||
print '<td class="center">' . $langs->transnoentities("Value") . '</td>'; | ||
print '<td>' . $langs->transnoentities('Parameters') . '</td>'; | ||
print '<td class="center">' . $langs->transnoentities('Status') . '</td>'; | ||
print '</tr>'; | ||
|
||
print '<tr class="oddeven">'; | ||
|
@@ -124,11 +98,8 @@ | |
print '</tr>'; | ||
|
||
print '</table>'; | ||
print '</form>'; | ||
print '</div>'; | ||
|
||
// Page end | ||
print dol_get_fiche_end(); | ||
|
||
llxFooter(); | ||
$db->close(); |
Oops, something went wrong.