Allow snapshot downloading

This commit is contained in:
Isaac Connor 2021-08-18 10:53:52 -04:00
parent 4c261eb413
commit 25f6935280
1 changed files with 2 additions and 2 deletions

View File

@ -18,7 +18,7 @@
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
// //
if ( !canView('Events') ) { if (!(canView('Events') or canView('Snapshots'))) {
$view = 'error'; $view = 'error';
return; return;
} }
@ -57,7 +57,7 @@ $filename = isset($_REQUEST['file'])?$_REQUEST['file']:"zmExport_$connkey.$file_
$filename = str_replace('/', '', $filename); # protect system files. must be a filename, not a path $filename = str_replace('/', '', $filename); # protect system files. must be a filename, not a path
$filename_path = ZM_DIR_EXPORTS.'/'.$filename; $filename_path = ZM_DIR_EXPORTS.'/'.$filename;
ZM\Debug("downloading archive from $filename_path"); ZM\Debug('downloading archive from '.$filename_path);
if ( is_readable($filename_path) ) { if ( is_readable($filename_path) ) {
while (ob_get_level()) { while (ob_get_level()) {
ob_end_clean(); ob_end_clean();