This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Match webtrees 1.7.11 release - last release for this module

  • Loading branch information...
JustCarmen committed Sep 22, 2018
1 parent 68864de commit 1cf6b2ce7b9cb5297e145a3049d9472977654033
Showing with 137 additions and 150 deletions.
  1. +18 −29 README.md
  2. +52 −53 app/Template/AdminTemplate.php
  3. +67 −68 module.php
@@ -1,29 +1,18 @@
Fancy Database Backup
=====================
A database backup module for webtrees.
The latest release of this module requires [webtrees 1.7.0](https://github.com/fisharebest/webtrees) or later. Download the latest stable release [here](https://github.com/JustCarmen/fancy_database_backup/releases/latest).
Description
-----------
This is a very small module with a very powerful purpose. It provides the ability to include the excellent "MySQLDumper" backup software into your webtrees administration panel options. Throughout webtrees documentation you are very sensibly advised to back up your database at frequent intervals, and especially before any upgrade. If your webhost provides a tool like PhpMyAdmin or cPanel you should, if you know how, be able to use that. But for greater flexibility, simplicty and convenience MySQLDumper is hard to beat.
*Note: Since MySQLDumper is no longer maintained and incompatible with PHP7, MySQLDumper is replaced with MyOOSDumper which is a part of [MyOOS](https://github.com/r23/MyOOS/tree/master/msd).*
Translations
------------
You can help to translate this module. Updates to translations should be made at https://translate.webtrees.net/projects/justcarmen/. Changes made there will be pushed to the git repository periodically and will be available on the development version of the module. They will be included in the next release of this module.
Installation & upgrading
------------------------
For more information about these subjects go to the JustCarmen help pages: http://www.justcarmen.nl/help
The first time you start the configuration page of this module you will be lead through the installation process of MyOOSDumper. Just follow the instructions to complete the installation.
Bugs and feature requests
-------------------------
If you experience any bugs or have a feature request for this module you can [create a new issue](https://github.com/JustCarmen/fancy_database_backup/issues?state=open) or [use the webtrees subforum 'customising'](http://www.webtrees.net/index.php/en/forum/4-customising) to contact me.
Fancy Database Backup
=====================
THIS MODULE IS NO LONGER MAINTAINED.
A database backup module for webtrees.
The latest release of this module requires [webtrees 1.7.11](https://github.com/fisharebest/webtrees). Download the latest stable release [here](https://github.com/JustCarmen/fancy_database_backup/releases/latest).
Description
-----------
This is a very small module with a very powerful purpose. It provides the ability to include the excellent "MySQLDumper" backup software into your webtrees administration panel options. Throughout webtrees documentation you are very sensibly advised to back up your database at frequent intervals, and especially before any upgrade. If your webhost provides a tool like PhpMyAdmin or cPanel you should, if you know how, be able to use that. But for greater flexibility, simplicty and convenience MySQLDumper is hard to beat.
*Note: Since MySQLDumper is no longer maintained and incompatible with PHP7, MySQLDumper is replaced with MyOOSDumper which is a part of [MyOOS](https://github.com/r23/MyOOS/tree/master/msd).*
Note
----
Since the original product MySQLDumper is no longer maintained and MyOOSDumper is not a real replacement I have decided to stop with the development of this module. Webtrees 1.7.11 is the last release for this module.
@@ -1,53 +1,52 @@
<?php
/*
* webtrees: online genealogy
* Copyright (C) 2017 webtrees development team
* Copyright (C) 2017 JustCarmen
* 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
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
namespace JustCarmen\WebtreesAddOns\FancyDatabaseBackup\Template;
use Fisharebest\Webtrees\Auth;
use Fisharebest\Webtrees\Controller\PageController;
use Fisharebest\Webtrees\I18N;
use JustCarmen\WebtreesAddOns\FancyDatabaseBackup\FancyDatabaseBackupModule;
class AdminTemplate extends FancyDatabaseBackupModule {
protected function pageContent() {
$controller = new PageController;
return
$this->pageHeader($controller) .
$this->pageBody();
}
private function pageHeader(PageController $controller) {
$controller
->restrictAccess(Auth::isAdmin())
->pageHeader();
}
private function pageBody() {
?>
<ol class="breadcrumb small">
<li><a href="admin.php"><?= I18N::translate('Control panel') ?></a></li>
<li><a href="admin_modules.php"><?= I18N::translate('Module administration') ?></a></li>
<li class="active"><?= $this->getTitle() ?></li>
</ol>
<h2><?= $this->getTitle() ?></h2>
<iframe src="<?= WT_MODULES_DIR . $this->getName() . '/vendor/r23/msd' ?>" height="580" style="border: 1px solid #ddd; margin-bottom: 20px; width: 100%">
<p class="alert alert-danger"><?= I18N::translate('Sorry, your browser does not support iframes.') ?></p>
</iframe>
<?php
}
}
<?php
/*
* webtrees: online genealogy
* Copyright (C) 2018 JustCarmen (http://www.justcarmen.nl)
* 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
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
namespace JustCarmen\WebtreesAddOns\FancyDatabaseBackup\Template;
use Fisharebest\Webtrees\Auth;
use Fisharebest\Webtrees\Controller\PageController;
use Fisharebest\Webtrees\I18N;
use JustCarmen\WebtreesAddOns\FancyDatabaseBackup\FancyDatabaseBackupModule;
class AdminTemplate extends FancyDatabaseBackupModule {
protected function pageContent() {
$controller = new PageController;
return
$this->pageHeader($controller) .
$this->pageBody();
}
private function pageHeader(PageController $controller) {
$controller
->restrictAccess(Auth::isAdmin())
->pageHeader();
}
private function pageBody() {
?>
<ol class="breadcrumb small">
<li><a href="admin.php"><?= I18N::translate('Control panel') ?></a></li>
<li><a href="admin_modules.php"><?= I18N::translate('Module administration') ?></a></li>
<li class="active"><?= $this->getTitle() ?></li>
</ol>
<h2><?= $this->getTitle() ?></h2>
<iframe src="<?= WT_MODULES_DIR . $this->getName() . '/vendor/r23/msd' ?>" height="580" style="border: 1px solid #ddd; margin-bottom: 20px; width: 100%">
<p class="alert alert-danger"><?= I18N::translate('Sorry, your browser does not support iframes.') ?></p>
</iframe>
<?php
}
}
@@ -1,68 +1,67 @@
<?php
/**
* webtrees: online genealogy
* Copyright (C) 2017 webtrees development team
* Copyright (C) 2017 JustCarmen
* 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
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
namespace JustCarmen\WebtreesAddOns\FancyDatabaseBackup;
use Composer\Autoload\ClassLoader;
use Fisharebest\Webtrees\I18N;
use Fisharebest\Webtrees\Module\AbstractModule;
use Fisharebest\Webtrees\Module\ModuleConfigInterface;
use JustCarmen\WebtreesAddOns\FancyDatabaseBackup\Template\AdminTemplate;
class FancyDatabaseBackupModule extends AbstractModule implements ModuleConfigInterface {
const CUSTOM_VERSION = '1.7.9.2';
const CUSTOM_WEBSITE = 'http://www.justcarmen.nl/fancy-modules/fancy-database-backup/';
public function __construct() {
parent::__construct('fancy_database_backup');
// register the namespaces
$loader = new ClassLoader();
$loader->addPsr4('JustCarmen\\WebtreesAddOns\\FancyDatabaseBackup\\', WT_MODULES_DIR . $this->getName() . '/app');
$loader->register();
}
// Extend class Module
public function getTitle() {
return /* I18N: Name of a module/sidebar */ I18N::translate('Fancy Database Backup');
}
// Extend class Module
public function getDescription() {
return I18N::translate('Provides access to MySQLDumper. A database backup tool.');
}
// Extend Module
public function modAction($mod_action) {
switch ($mod_action) {
case 'admin':
$template = new AdminTemplate;
return $template->pageContent();
default:
http_response_code(404);
break;
}
}
// Implement ModuleConfigInterface
public function getConfigLink() {
return 'module.php?mod=' . $this->getName() . '&amp;mod_action=admin';
}
}
return new FancyDatabaseBackupModule;
<?php
/**
* webtrees: online genealogy
* Copyright (C) 2018 JustCarmen (http://www.justcarmen.nl)
* 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
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
namespace JustCarmen\WebtreesAddOns\FancyDatabaseBackup;
use Composer\Autoload\ClassLoader;
use Fisharebest\Webtrees\I18N;
use Fisharebest\Webtrees\Module\AbstractModule;
use Fisharebest\Webtrees\Module\ModuleConfigInterface;
use JustCarmen\WebtreesAddOns\FancyDatabaseBackup\Template\AdminTemplate;
class FancyDatabaseBackupModule extends AbstractModule implements ModuleConfigInterface {
const CUSTOM_VERSION = '1.7.11';
const CUSTOM_WEBSITE = 'http://www.justcarmen.nl/fancy-modules/fancy-database-backup/';
public function __construct() {
parent::__construct('fancy_database_backup');
// register the namespaces
$loader = new ClassLoader();
$loader->addPsr4('JustCarmen\\WebtreesAddOns\\FancyDatabaseBackup\\', WT_MODULES_DIR . $this->getName() . '/app');
$loader->register();
}
// Extend class Module
public function getTitle() {
return /* I18N: Name of a module/sidebar */ I18N::translate('Fancy Database Backup');
}
// Extend class Module
public function getDescription() {
return I18N::translate('Provides access to MySQLDumper. A database backup tool.');
}
// Extend Module
public function modAction($mod_action) {
switch ($mod_action) {
case 'admin':
$template = new AdminTemplate;
return $template->pageContent();
default:
http_response_code(404);
break;
}
}
// Implement ModuleConfigInterface
public function getConfigLink() {
return 'module.php?mod=' . $this->getName() . '&amp;mod_action=admin';
}
}
return new FancyDatabaseBackupModule;

0 comments on commit 1cf6b2c

Please sign in to comment.