This commit is contained in:
Jean-Christian Paul Denis 2022-12-20 20:36:40 +01:00
parent e176ff703f
commit 7a2145d2e2
Signed by: JcDenis
GPG Key ID: 1B5B8C5B90B6C951
3 changed files with 8 additions and 6 deletions

View File

@ -21,7 +21,6 @@ use dcPage;
/* clearbricks ns */ /* clearbricks ns */
use form; use form;
use http; use http;
use path;
/* php ns */ /* php ns */
use Exception; use Exception;

View File

@ -61,7 +61,7 @@ class Manage
$type = isset($_POST['type']) && in_array($_POST['type'], ['plugins', 'themes', 'repository']) ? $_POST['type'] : ''; $type = isset($_POST['type']) && in_array($_POST['type'], ['plugins', 'themes', 'repository']) ? $_POST['type'] : '';
# Settings # Settings
$s = dcCore::app()->blog->settings->get(Core::id()); $s = dcCore::app()->blog->settings->get(Core::id());
$dir = Utils::getRepositoryDir($s->get('pack_repository')); $dir = Utils::getRepositoryDir($s->get('pack_repository'));
# Modules # Modules
@ -172,7 +172,7 @@ class Manage
# Delete # Delete
} elseif ($action == 'delete') { } elseif ($action == 'delete') {
$del_success= false; $del_success = false;
foreach ($_POST['modules'] as $root => $id) { foreach ($_POST['modules'] as $root => $id) {
if (!file_exists($root) || !files::isDeletable($root)) { if (!file_exists($root) || !files::isDeletable($root)) {
dcPage::addWarningNotice(sprintf(__('Undeletable file "%s"', $root))); dcPage::addWarningNotice(sprintf(__('Undeletable file "%s"', $root)));
@ -287,7 +287,7 @@ class Manage
} }
# Settings # Settings
$s = dcCore::app()->blog->settings->get(Core::id()); $s = dcCore::app()->blog->settings->get(Core::id());
$dir = Utils::getRepositoryDir($s->get('pack_repository')); $dir = Utils::getRepositoryDir($s->get('pack_repository'));
$is_configured = Utils::is_configured( $is_configured = Utils::is_configured(

View File

@ -24,6 +24,9 @@ use form;
use html; use html;
use path; use path;
/* php */
use Exception;
class Utils class Utils
{ {
public static function is_configured(string $repo, string $file_a, string $file_b): bool public static function is_configured(string $repo, string $file_a, string $file_b): bool