diff --git a/common.php b/common.php index 034529f..76c1e3e 100755 --- a/common.php +++ b/common.php @@ -19,7 +19,7 @@ } if(!defined('BASE_PATH')) { - define('BASE_PATH', rtrim(str_replace("common.php", "", $_SERVER['SCRIPT_FILENAME']),"/")); + define('BASE_PATH', rtrim(str_replace("index.php", "", $_SERVER['SCRIPT_FILENAME']),"/")); } if(!defined('COMPONENTS')) { diff --git a/components/collaborative/init.js b/components/collaborative/init.js index d1abdc5..661e9ae 100644 --- a/components/collaborative/init.js +++ b/components/collaborative/init.js @@ -190,7 +190,9 @@ function (data) { // console.log('complete unregistering'); // console.log(data); - codiad.jsend.parse(data); + if(data !== '') { + codiad.jsend.parse(data); + } }); this.currentFilename = null; diff --git a/components/filemanager/download.php b/components/filemanager/download.php index 19f15d9..2272c2e 100755 --- a/components/filemanager/download.php +++ b/components/filemanager/download.php @@ -63,7 +63,7 @@ }else{ $filename = explode("/",$_GET['path']); $filename = array_pop($filename); - $download_file = WORKSPACE . $_GET['path']; + $download_file = WORKSPACE . '/' . $_GET['path']; } header('Content-Description: File Transfer');