summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Appelman <icewind1991@gmail>2010-05-01 23:09:36 +0200
committerRobin Appelman <icewind1991@gmail>2010-05-01 23:09:36 +0200
commitc52e7d360fb9a0e57fe895724f4d082f9338a716 (patch)
treefcf855230891010711c4d1cbae4cb75ca6aa119a
parent567c17fde595ae47c6e281bcdad56d3723c642e6 (diff)
downloadnextcloud-server-c52e7d360fb9a0e57fe895724f4d082f9338a716.tar.gz
nextcloud-server-c52e7d360fb9a0e57fe895724f4d082f9338a716.zip
More bug fixes, mostly IE related
-rwxr-xr-xfiles/api.php3
-rwxr-xr-xinc/lib_base.php2
-rwxr-xr-xinc/lib_files.php3
-rwxr-xr-xjs/filebrowser.js4
-rwxr-xr-xjs/lib_files.js15
5 files changed, 19 insertions, 8 deletions
diff --git a/files/api.php b/files/api.php
index 5a4c8801d4e..b27228d9676 100755
--- a/files/api.php
+++ b/files/api.php
@@ -23,6 +23,9 @@
require_once('../inc/lib_base.php');
$arguments=$_POST;
+if(!isset($_POST['action']) and isset($_GET['action'])){
+ $arguments=$_GET;
+}
foreach($arguments as &$argument){
$argument=stripslashes($argument);
diff --git a/inc/lib_base.php b/inc/lib_base.php
index 4b5fb06a498..4abcccd4b43 100755
--- a/inc/lib_base.php
+++ b/inc/lib_base.php
@@ -76,7 +76,7 @@ if(!is_dir($CONFIG_DATADIRECTORY)){
}
if(OC_USER::isLoggedIn()){
//jail the user in a seperate data folder
- $CONFIG_DATADIRECTORY.=$_SESSION['username_clean'];
+ $CONFIG_DATADIRECTORY.='/'.$_SESSION['username_clean'];
if(!is_dir($CONFIG_DATADIRECTORY)){
mkdir($CONFIG_DATADIRECTORY);
}
diff --git a/inc/lib_files.php b/inc/lib_files.php
index 2e77067b4a7..9bd349bfd06 100755
--- a/inc/lib_files.php
+++ b/inc/lib_files.php
@@ -94,6 +94,9 @@ class OC_FILES {
if(strstr($files,'..') or strstr($dir,'..')){
die();
}
+ if(strpos($files,';')){
+ $files=explode(';',$files);
+ }
if(is_array($files)){
$zip = new ZipArchive();
$filename = sys_get_temp_dir()."/ownCloud.zip";
diff --git a/js/filebrowser.js b/js/filebrowser.js
index 18567f202c5..c95e1290642 100755
--- a/js/filebrowser.js
+++ b/js/filebrowser.js
@@ -30,11 +30,11 @@ OC_FILES.browser.showInitial=function(){
OC_FILES.getdirectorycontent(dir,OC_FILES.browser.show_callback,true);
}
-OC_FILES.browser.show=function(dir){
+OC_FILES.browser.show=function(dir,forceReload){
if(!dir || !dir.split){
dir='';
}
- OC_FILES.getdirectorycontent(dir,OC_FILES.browser.show_callback);
+ OC_FILES.getdirectorycontent(dir,OC_FILES.browser.show_callback,forceReload);
}
OC_FILES.browser.breadcrumb=new Object();
diff --git a/js/lib_files.js b/js/lib_files.js
index c66fc8d1215..aa70120e5e1 100755
--- a/js/lib_files.js
+++ b/js/lib_files.js
@@ -88,7 +88,7 @@ OC_FILES.getdirectorycontent=function(dir,callback,refresh){
OC_FILES.dir='';
OC_FILES.get=function(dir,file){
- window.location='files/api.php?action=get&dir='+encodeURIComponent(dir)+'&files='+encodeURIComponent(file);
+ window.location='files/api.php?action=get&dir='+encodeURIComponent(dir)+'&file='+encodeURIComponent(file);
}
OC_FILES.upload=function(dir,iframeId){
@@ -148,7 +148,13 @@ OC_FILES.upload_callback=function(iframeId){
this.uploadForm.parentNode.removeChild(this.uploadForm);
this.parentNode.removeChild(this);
OC_FILES.uploadIFrames[file.iframeId]=null;
- OC_FILES.browser.show(file.dir);
+ if(file.name){
+ OC_FILES.browser.show(file.dir);
+ }else{
+ OC_FILES.browser.show(file.dir,true);//if the data from the file isn't correct, force a reload of the cache
+ }
+ }else{
+ OC_FILES.browser.show(OC_FILES.dir);
}
}
@@ -208,7 +214,7 @@ OC_FILES.remove_callback=function(req,name){
OC_FILES.getSelected=function(){
var nodes=document.getElementsByName('fileSelector');
var files=Array();
- for(index in nodes){
+ for(var index=0;index<nodes.length;index++){
if(nodes[index].checked){
files[files.length]=nodes[index].value;
}
@@ -273,7 +279,7 @@ OC_FILES.move_callback=function(req,file){
OC_FILES.selectAll=function(){
var value=document.getElementById('select_all').checked;
var nodes=document.getElementsByName('fileSelector');
- for(index in nodes){
+ for(var index=0;index<nodes.length;index++){
if(nodes[index].value){
nodes[index].checked=value;
}
@@ -300,7 +306,6 @@ OC_FILES.actions_selected.download=function(){
files=files[0];
}
OC_FILES.get(dir,files);
-// window.location=WEBROOT+'/files/get_file.php?dir='+OC_FILES.dir+'&files='+files;
}
OC_FILES.actions_selected['delete']=function(){