More bug fixes, mostly IE related

This commit is contained in:
Robin Appelman 2010-05-01 23:09:36 +02:00
parent 567c17fde5
commit c52e7d360f
5 changed files with 19 additions and 8 deletions

View File

@ -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);

View File

@ -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);
}

View File

@ -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";

View File

@ -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();

View File

@ -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(){