Skip to content

Commit

Permalink
Support J!4 with com_akeebabackup 9
Browse files Browse the repository at this point in the history
  • Loading branch information
GHSVS-de committed Aug 22, 2021
1 parent 07ccd35 commit 88c3208
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions backupslogghsvs.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class PlgSystemBackupslogghsvs extends CMSPlugin
protected $backuppaths = array();
protected $backuptables = array();
protected $log_file_name = 'plg_system_backupslogghsvs';

public function onUserAfterLogin($options)
{
if (
Expand All @@ -26,7 +26,7 @@ public function onUserAfterLogin($options)
}

$this->prepareExecutes();

if ($this->execute !== true)
{
return;
Expand All @@ -50,7 +50,7 @@ public function onUserAfterLogin($options)
{
$query->clear('from')->from($table);
$this->db->setQuery($query);

try
{
$result = $this->db->loadAssocList();
Expand Down Expand Up @@ -89,7 +89,7 @@ public function onUserAfterLogin($options)
$newLines[] = $data;
}
}

if ($newLines)
{
file_put_contents($logFile, implode("\n", $newLines) . "\n", FILE_APPEND);
Expand All @@ -103,6 +103,7 @@ public function prepareExecutes()
{
$this->backuppaths = array(
'akeeba' => JPATH_ADMINISTRATOR . '/components/com_akeeba/backup',
'akeebabackup' => JPATH_ADMINISTRATOR . '/components/com_akeebabackup/backup',
'ejb' => JPATH_ADMINISTRATOR . '/components/com_easyjoomlabackup/backups',
);

Expand All @@ -122,6 +123,7 @@ public function prepareExecutes()

$this->backuptables = array(
'akeeba' => 'ak_stats',
'akeebabackup' => 'akeebabackup_backups',
'ejb' => 'easyjoomlabackup',
);

Expand All @@ -142,7 +144,7 @@ public function prepareExecutes()
{
if (
!isset($this->backuppaths[$component])
|| !in_array($prefix . $table, $tables)
|| !in_array($prefix . $table, $tables)
){
unset($this->backuptables[$component]);
continue;
Expand Down

0 comments on commit 88c3208

Please sign in to comment.