Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
I
ISPConfig 3
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Helmo
ISPConfig 3
Commits
fd95b9b2
"README.md" did not exist on "f6174df192779fc7e1b6ce7b39e9682bb79d555c"
Commit
fd95b9b2
authored
4 years ago
by
Marius Burkard
Browse files
Options
Downloads
Patches
Plain Diff
- added fix to manual backup action
parent
48934fbb
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
interface/lib/classes/plugin_backuplist.inc.php
+17
-5
17 additions, 5 deletions
interface/lib/classes/plugin_backuplist.inc.php
with
17 additions
and
5 deletions
interface/lib/classes/plugin_backuplist.inc.php
+
17
−
5
View file @
fd95b9b2
...
@@ -56,10 +56,22 @@ class plugin_backuplist extends plugin_base {
...
@@ -56,10 +56,22 @@ class plugin_backuplist extends plugin_base {
$sql
=
"SELECT count(action_id) as number FROM sys_remoteaction WHERE action_state = 'pending' AND action_type = ? AND action_param = ?"
;
$sql
=
"SELECT count(action_id) as number FROM sys_remoteaction WHERE action_state = 'pending' AND action_type = ? AND action_param = ?"
;
$tmp
=
$app
->
db
->
queryOneRecord
(
$sql
,
$action_type
,
$domain_id
);
$tmp
=
$app
->
db
->
queryOneRecord
(
$sql
,
$action_type
,
$domain_id
);
if
(
$tmp
[
'number'
]
==
0
)
{
if
(
$tmp
[
'number'
]
==
0
)
{
$server_id
=
$this
->
form
->
dataRecord
[
'server_id'
];
if
(
$action_type
===
'backup_database'
)
{
// get all server ids of databases for this domain
$sql
=
'SELECT `server_id` FROM `web_database` WHERE `parent_domain_id` = ?'
;
$result
=
$app
->
db
->
query
(
$sql
,
$domain_id
);
while
((
$cur
=
$result
->
get
()))
{
$server_id
=
$cur
[
'server_id'
];
$sql
=
"INSERT INTO sys_remoteaction (server_id, tstamp, action_type, action_param, action_state, response) VALUES (?, UNIX_TIMESTAMP(), ?, ?, 'pending', '')"
;
$app
->
db
->
query
(
$sql
,
$server_id
,
$action_type
,
$domain_id
);
}
$result
->
free
();
}
else
{
$server_id
=
$this
->
form
->
dataRecord
[
'server_id'
];
$sql
=
"INSERT INTO sys_remoteaction (server_id, tstamp, action_type, action_param, action_state, response) VALUES (?, UNIX_TIMESTAMP(), ?, ?, 'pending', '')"
;
$app
->
db
->
query
(
$sql
,
$server_id
,
$action_type
,
$domain_id
);
}
$message
.
=
$wb
[
'backup_info_txt'
];
$message
.
=
$wb
[
'backup_info_txt'
];
$sql
=
"INSERT INTO sys_remoteaction (server_id, tstamp, action_type, action_param, action_state, response) VALUES (?, UNIX_TIMESTAMP(), ?, ?, 'pending', '')"
;
$app
->
db
->
query
(
$sql
,
$server_id
,
$action_type
,
$domain_id
);
}
else
{
}
else
{
$error
.
=
$wb
[
'backup_pending_txt'
];
$error
.
=
$wb
[
'backup_pending_txt'
];
}
}
...
@@ -193,10 +205,10 @@ class plugin_backuplist extends plugin_base {
...
@@ -193,10 +205,10 @@ class plugin_backuplist extends plugin_base {
$rec
[
'backup_encrypted'
]
=
empty
(
$rec
[
'backup_password'
])
?
$wb
[
"no_txt"
]
:
$wb
[
"yes_txt"
];
$rec
[
'backup_encrypted'
]
=
empty
(
$rec
[
'backup_password'
])
?
$wb
[
"no_txt"
]
:
$wb
[
"yes_txt"
];
$backup_manual_prefix
=
'manual-'
;
$backup_manual_prefix
=
'manual-'
;
$rec
[
'backup_job'
]
=
(
substr
(
$rec
[
'filename'
],
0
,
strlen
(
$backup_manual_prefix
))
==
$backup_manual_prefix
)
?
$wb
[
"backup_job_manual_txt"
]
:
$wb
[
"backup_job_auto_txt"
];
$rec
[
'backup_job'
]
=
(
substr
(
$rec
[
'filename'
],
0
,
strlen
(
$backup_manual_prefix
))
==
$backup_manual_prefix
)
?
$wb
[
"backup_job_manual_txt"
]
:
$wb
[
"backup_job_auto_txt"
];
$rec
[
'download_available'
]
=
true
;
$rec
[
'download_available'
]
=
true
;
if
(
$rec
[
'server_id'
]
!=
$web
[
'server_id'
])
$rec
[
'download_available'
]
=
false
;
if
(
$rec
[
'server_id'
]
!=
$web
[
'server_id'
])
$rec
[
'download_available'
]
=
false
;
if
(
$rec
[
'filesize'
]
>
0
){
if
(
$rec
[
'filesize'
]
>
0
){
$rec
[
'filesize'
]
=
$app
->
functions
->
currency_format
(
$rec
[
'filesize'
]
/
(
1024
*
1024
),
'client'
)
.
' MB'
;
$rec
[
'filesize'
]
=
$app
->
functions
->
currency_format
(
$rec
[
'filesize'
]
/
(
1024
*
1024
),
'client'
)
.
' MB'
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment