From af474f0189fe63ca6f68e06a4eb073c3e05f7fa7 Mon Sep 17 00:00:00 2001
From: Jean-Christian Denis
Date: Mon, 1 Nov 2021 11:39:02 +0100
Subject: [PATCH] fix PSR coding style
---
_admin.php | 23 ++++++-----
_config.php | 39 +++++++++---------
_define.php | 19 +++++----
_install.php | 32 +++++++++------
_prepend.php | 11 +++---
_uninstall.php | 79 ++++++++++++++++++++++++-------------
inc/class.dc.packman.php | 32 +++++++--------
inc/lib.packman.filezip.php | 30 +++++++-------
inc/lib.packman.php | 28 ++++++-------
index.php | 68 +++++++++++++++----------------
10 files changed, 190 insertions(+), 171 deletions(-)
diff --git a/_admin.php b/_admin.php
index 7da3631..fc7ee91 100644
--- a/_admin.php
+++ b/_admin.php
@@ -1,16 +1,15 @@
register('pacKman', [
- 'title' => __('Packages repository'),
- 'url' => 'plugin.php?p=pacKman#packman-repository-repository',
- 'small-icon' => 'index.php?pf=pacKman/icon.png',
- 'large-icon' => 'index.php?pf=pacKman/icon-big.png',
+ 'title' => __('Packages repository'),
+ 'url' => 'plugin.php?p=pacKman#packman-repository-repository',
+ 'small-icon' => 'index.php?pf=pacKman/icon.png',
+ 'large-icon' => 'index.php?pf=pacKman/icon-big.png',
'permissions' => $core->auth->isSuperAdmin(),
- 'active_cb' => [
- 'packmanBehaviors',
+ 'active_cb' => [
+ 'packmanBehaviors',
'adminDashboardFavoritesActive'
]
]);
@@ -49,8 +48,8 @@ class packmanBehaviors
public static function adminDashboardFavoritesActive($request, $params)
{
- return $request == 'plugin.php'
- && isset($params['p'])
+ return $request == 'plugin.php'
+ && isset($params['p'])
&& $params['p'] == 'pacKman';
}
}
\ No newline at end of file
diff --git a/_config.php b/_config.php
index e08ba74..039d24a 100644
--- a/_config.php
+++ b/_config.php
@@ -1,45 +1,44 @@
getURL() . '#plugins' : $_REQUEST['redir'];
# -- Get settings --
$core->blog->settings->addNamespace('pacKman');
$s = $core->blog->settings->pacKman;
-$packman_pack_nocomment = $s->packman_pack_nocomment;
-$packman_pack_fixnewline = $s->packman_pack_fixnewline;
-$packman_pack_overwrite = $s->packman_pack_overwrite;
-$packman_pack_filename = $s->packman_pack_filename;
+$packman_pack_nocomment = $s->packman_pack_nocomment;
+$packman_pack_fixnewline = $s->packman_pack_fixnewline;
+$packman_pack_overwrite = $s->packman_pack_overwrite;
+$packman_pack_filename = $s->packman_pack_filename;
$packman_secondpack_filename = $s->packman_secondpack_filename;
-$packman_pack_repository = $s->packman_pack_repository;
-$packman_pack_excludefiles = $s->packman_pack_excludefiles;
+$packman_pack_repository = $s->packman_pack_repository;
+$packman_pack_excludefiles = $s->packman_pack_excludefiles;
# -- Set settings --
if (!empty($_POST['save'])) {
try {
- $packman_pack_nocomment = !empty($_POST['packman_pack_nocomment']);
- $packman_pack_fixnewline = !empty($_POST['packman_pack_fixnewline']);
- $packman_pack_overwrite = !empty($_POST['packman_pack_overwrite']);
- $packman_pack_filename = $_POST['packman_pack_filename'];
+ $packman_pack_nocomment = !empty($_POST['packman_pack_nocomment']);
+ $packman_pack_fixnewline = !empty($_POST['packman_pack_fixnewline']);
+ $packman_pack_overwrite = !empty($_POST['packman_pack_overwrite']);
+ $packman_pack_filename = $_POST['packman_pack_filename'];
$packman_secondpack_filename = $_POST['packman_secondpack_filename'];
- $packman_pack_repository = path::real($_POST['packman_pack_repository'], false);
- $packman_pack_excludefiles = $_POST['packman_pack_excludefiles'];
+ $packman_pack_repository = path::real($_POST['packman_pack_repository'], false);
+ $packman_pack_excludefiles = $_POST['packman_pack_excludefiles'];
$check = libPackman::is_configured(
$core,
@@ -78,7 +77,9 @@ echo '
' .
-'' . sprintf(__('Preconization: %s'), $core->blog->public_path ?
+'
' . sprintf(
+ __('Preconization: %s'),
+ $core->blog->public_path ?
$core->blog->public_path : __("Blog's public directory")
) . '
@@ -96,7 +97,7 @@ form::field('packman_secondpack_filename', 65, 255, $packman_secondpack_filename
'
' . sprintf(__('Preconization: %s'), '%type%-%id%-%version%') . '
-