From fd880eddcd472792a16f9a1b94e5223776f2d707 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Fri, 19 Jan 2024 19:39:55 +0100 Subject: [PATCH] refactoring --- lam/templates/pdfedit/pdfpage.php | 3 ++- lam/templates/profedit/profilepage.php | 1 + lam/templates/upload/massDoUpload.php | 4 ++-- rector.php | 3 +++ 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/lam/templates/pdfedit/pdfpage.php b/lam/templates/pdfedit/pdfpage.php index ae21bdcf3..93153a1ec 100644 --- a/lam/templates/pdfedit/pdfpage.php +++ b/lam/templates/pdfedit/pdfpage.php @@ -25,7 +25,7 @@ use LAMException; /* This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) Copyright (C) 2003 - 2006 Michael Duergner - 2007 - 2023 Roland Gruber + 2007 - 2024 Roland Gruber 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 @@ -129,6 +129,7 @@ if (!isset($_SESSION['currentPDFStructure'])) { } } catch (LAMException $e) { + logNewMessage(LOG_ERR, $e->getTitle()); metaRefresh('pdfmain.php?loadFailed=1&name=' . $_GET['edit']); exit; } diff --git a/lam/templates/profedit/profilepage.php b/lam/templates/profedit/profilepage.php index 65292aef3..608b03b92 100644 --- a/lam/templates/profedit/profilepage.php +++ b/lam/templates/profedit/profilepage.php @@ -138,6 +138,7 @@ if (isset($_POST['save'])) { exit(); } catch (LAMException $e) { + logNewMessage(LOG_ERR, $e->getTitle()); $errors[] = ["ERROR", _("Unable to save profile!"), $_POST['profname']]; } } diff --git a/lam/templates/upload/massDoUpload.php b/lam/templates/upload/massDoUpload.php index 5b1d004c0..912d5665d 100644 --- a/lam/templates/upload/massDoUpload.php +++ b/lam/templates/upload/massDoUpload.php @@ -3,7 +3,7 @@ namespace LAM\UPLOAD; /* This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) - Copyright (C) 2004 - 2023 Roland Gruber + Copyright (C) 2004 - 2024 Roland Gruber 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 @@ -84,6 +84,6 @@ $container = new htmlResponsiveRow(); $javaScript = new htmlJavaScript('window.lam.upload.continueUpload(\'../misc/ajax.php?function=upload&typeId=' . $type->getId() . '\', \'' . getSecurityTokenName() . '\', \'' . getSecurityTokenValue() . '\');'); $contentDiv = new htmlDiv('uploadContent', $javaScript, ['smallPaddingContent']); $container->add($contentDiv); -parseHtml(null, $container, array(), false, null); +parseHtml(null, $container, [], false, null); include __DIR__ . '/../../lib/adminFooter.inc'; diff --git a/rector.php b/rector.php index 1751263a8..44602e993 100644 --- a/rector.php +++ b/rector.php @@ -12,11 +12,14 @@ return static function (RectorConfig $rectorConfig): void { __DIR__ . '/lam/tests', ]); + //$rectorConfig->fileExtensions(['php', 'inc']); + $rectorConfig->skip([ __DIR__ . '/lam/lib/3rdParty', ]); $rectorConfig->sets([ SetList::DEAD_CODE, + LevelSetList::UP_TO_PHP_80 ]); };