Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

actualizar core 2024.93 #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Controller/Backup.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@
use FacturaScripts\Core\Base\Controller;
use FacturaScripts\Core\Base\ControllerPermissions;
use FacturaScripts\Core\Cache;
use FacturaScripts\Core\Internal\UploadedFile;
use FacturaScripts\Core\Response;
use FacturaScripts\Core\Tools;
use FacturaScripts\Dinamic\Model\User;
use RecursiveDirectoryIterator;
use RecursiveIteratorIterator;
use Symfony\Component\HttpFoundation\File\UploadedFile;
use Symfony\Component\HttpFoundation\Response;
use ZipArchive;

/**
Expand All @@ -53,7 +53,7 @@ public function getPageData(): array
$data = parent::getPageData();
$data['menu'] = 'admin';
$data['title'] = 'backup';
$data['icon'] = 'fas fa-download';
$data['icon'] = 'fa-solid fa-download';
return $data;
}

Expand Down
16 changes: 10 additions & 6 deletions Init.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* This file is part of Backup plugin for FacturaScripts
* Copyright (C) 2021 Carlos Garcia Gomez <[email protected]>
* Copyright (C) 2021-2024 Carlos Garcia Gomez <[email protected]>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
Expand All @@ -16,25 +16,29 @@
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

namespace FacturaScripts\Plugins\Backup;

use FacturaScripts\Core\Template\InitClass;

/**
* Composer autoload.
*/
require_once __DIR__ . '/vendor/autoload.php';

use FacturaScripts\Core\Base\InitClass;

class Init extends InitClass
{

public function init()
public function init(): void
{
}

public function uninstall(): void
{
;
}

public function update()
public function update(): void
{
;
}
}
22 changes: 11 additions & 11 deletions View/Backup.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<div class="row">
<div class="col">
<h1 class="h4">
<i class="fas fa-save fa-fw"></i> {{ fsc.title }}
<i class="fa-solid fa-save fa-fw"></i> {{ fsc.title }}
</h1>
<br/>
</div>
Expand All @@ -19,16 +19,16 @@
<div class="card shadow mb-5">
<div class="card-body">
<h2 class="h3">
<i class="fas fa-download text-primary mr-2"></i> {{ trans('download-backup') }}
<i class="fa-solid fa-download text-primary me-2"></i> {{ trans('download-backup') }}
</h2>
<p class="card-text">{{ trans('download-backup-p') }}</p>
</div>
<div class="card-footer p-2">
<a href="#" class="btn btn-primary btn-spin-action mr-2" onclick="return downloadDbBackup()">
<i class="fas fa-database mr-2"></i> {{ trans('database') }}
<a href="#" class="btn btn-primary btn-spin-action me-2" onclick="return downloadDbBackup()">
<i class="fa-solid fa-database me-2"></i> {{ trans('database') }}
</a>
<a href="#" class="btn btn-secondary btn-spin-action" onclick="return downloadFilesBackup()">
<i class="fas fa-download mr-2"></i> {{ trans('files') }}
<i class="fa-solid fa-download me-2"></i> {{ trans('files') }}
</a>
</div>
</div>
Expand All @@ -39,15 +39,15 @@
<div class="card shadow mb-4">
<div class="card-body bg-warning">
<h3 class="h5 mb-0">
<i class="fas fa-database mr-2"></i> {{ trans('restore-backup') }}
<i class="fa-solid fa-database me-2"></i> {{ trans('restore-backup') }}
</h3>
</div>
<div class="card-body">
<p>
{{ trans('restore-backup-p') }}
<span class="text-danger">{{ trans('restore-backup-warning') }}</span>
</p>
<div class="form-group">
<div class="mb-3">
{{ trans('database') }}
<input type="file" name="db_file" accept=".sql,.sql.gz" class="form-control-file"
required/>
Expand All @@ -60,10 +60,10 @@
<button type="submit" class="btn btn-warning btn-spin-action">
{{ trans('restore') }}
</button>
<div class="btn-group ml-2">
<div class="btn-group ms-2">
<div class="dropdown">
<button class="btn btn-secondary dropdown-toggle" type="button"
data-toggle="dropdown" aria-expanded="false">
data-bs-toggle="dropdown" aria-expanded="false">
{{ trans('switch-db-charset') }}
</button>
<div class="dropdown-menu">
Expand All @@ -88,12 +88,12 @@
<div class="card shadow mb-4">
<div class="card-body text-white bg-secondary">
<h3 class="h5 mb-0">
<i class="fas fa-upload mr-2"></i> {{ trans('restore-files') }}
<i class="fa-solid fa-upload me-2"></i> {{ trans('restore-files') }}
</h3>
</div>
<div class="card-body">
<p>{{ trans('restore-files-p') }}</p>
<div class="form-group">
<div class="mb-3">
{{ trans('files') }}
<input type="file" name="zip_file" accept=".zip" class="form-control-file" required/>
</div>
Expand Down
2 changes: 1 addition & 1 deletion facturascripts.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name = "Backup"
description = "Permite realizar y restaurar copias de seguridad."
version = 2.3
min_version = 2022.6
min_version = 2024.93
require_php = 'zlib'