Skip to content

Commit

Permalink
Scene import fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sergejey committed Aug 9, 2018
1 parent ac51d14 commit 6533ebc
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions modules/scenes/scenes.class.php
Expand Up @@ -341,7 +341,12 @@ function admin(&$out) {

if ($this->view_mode=='import') {
global $file;
$this->import_scene($file);
$id=$this->import_scene($file);
if ($id) {
$this->redirect("?view_mode=edit_scenes&id=".$id);
} else {
$this->redirect("?");
}
}


Expand Down Expand Up @@ -471,11 +476,9 @@ function import_scene($file, $system = '') {
$filename=ROOT.$rec['WALLPAPER'];
SaveFile($filename, base64_decode($data['WALLPAPER_IMAGE']));
}
$this->redirect("?view_mode=edit_scenes&id=".$rec['ID']);
return $rec['ID'];
}

$this->redirect("?");

}

/**
Expand Down

0 comments on commit 6533ebc

Please sign in to comment.