Skip to content

Commit ebe5df7

Browse files
committed
- Mulitserver setup: list backups from remote servers in backup list.
1 parent 4664a29 commit ebe5df7

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

interface/lib/classes/plugin_backuplist.inc.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,13 @@ function onShow() {
108108
}
109109

110110
//* Get the data
111+
$server_ids = array();
111112
$web = $app->db->queryOneRecord("SELECT server_id FROM web_domain WHERE domain_id = ".$app->functions->intval($this->form->id));
112-
$sql = "SELECT * FROM web_backup WHERE parent_domain_id = ".$app->functions->intval($this->form->id)." AND server_id = ".$app->functions->intval($web['server_id'])." ORDER BY tstamp DESC, backup_type ASC";
113+
$database = $app->db->queryOneRecord("SELECT server_id FROM web_database WHERE parent_domain_id = ".$app->functions->intval($this->form->id));
114+
if($app->functions->intval($web['server_id']) > 0) $server_ids[] = $app->functions->intval($web['server_id']);
115+
if($app->functions->intval($database['server_id']) > 0) $server_ids[] = $app->functions->intval($database['server_id']);
116+
$server_ids = array_unique($server_ids);
117+
$sql = "SELECT * FROM web_backup WHERE parent_domain_id = ".$app->functions->intval($this->form->id)." AND server_id IN (".implode(',', $server_ids).") ORDER BY tstamp DESC, backup_type ASC";
113118
$records = $app->db->queryAllRecords($sql);
114119

115120
$bgcolor = "#FFFFFF";

0 commit comments

Comments
 (0)