File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed
Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change 44ob_start ();
55session_start ();
66include ($ _SERVER ['DOCUMENT_ROOT ' ]."/inc/main.php " );
7-
87// Check token
98if ((!isset ($ _GET ['token ' ])) || ($ _SESSION ['token ' ] != $ _GET ['token ' ])) {
109 header ('Location: /login/ ' );
1110 exit ();
1211}
1312
13+ $ backup = $ _GET ['backup ' ];
14+
1415if (!file_exists ('/backup/ ' .$ backup )){
1516 $ v_username = escapeshellarg ($ user );
16- exec (HESTIA_CMD ."v-schedule-user-backup " .$ v_username , $ output , $ return_var );
17+ $ backup = escapeshellarg ($ _GET ['backup ' ]);
18+ exec (HESTIA_CMD ."v-schedule-user-backup-download " .$ v_username ." " .$ backup , $ output , $ return_var );
1719 if ($ return_var == 0 ) {
18- $ _SESSION ['error_msg ' ] = __ ('BACKUP_SCHEDULED ' );
20+ $ _SESSION ['error_msg ' ] = __ ('BACKUP_DOWNLOAD_SCHEDULED ' );
1921 } else {
2022 $ _SESSION ['error_msg ' ] = implode ('<br> ' , $ output );
2123 if (empty ($ _SESSION ['error_msg ' ])) {
2224 $ _SESSION ['error_msg ' ] = __ ('Error: hestia did not return any output. ' );
23- }
24-
25- if ($ return_var == 4 ) {
26- $ _SESSION ['error_msg ' ] = __ ('BACKUP_EXISTS ' );
27- }
28-
25+ }
2926 }
3027 unset($ output );
3128 header ("Location: /list/backup/ " );
You can’t perform that action at this time.
0 commit comments