This commit is contained in:
Robin 2010-05-02 13:24:39 +02:00
commit 0732264d67
9 changed files with 35 additions and 57 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

@ -33,35 +33,10 @@
+----------------------------------------------------------------------+
*/
oc_require_once "HTTP/WebDAV/Tools/_parse_propfind.php";
oc_require_once "HTTP/WebDAV/Tools/_parse_proppatch.php";
oc_require_once "HTTP/WebDAV/Tools/_parse_lockinfo.php";
=======
<?php
//
// +----------------------------------------------------------------------+
// | PHP Version 4 |
// +----------------------------------------------------------------------+
// | Copyright (c) 1997-2003 The PHP Group |
// +----------------------------------------------------------------------+
// | This source file is subject to version 2.02 of the PHP license, |
// | that is bundled with this package in the file LICENSE, and is |
// | available at through the world-wide-web at |
// | http://www.php.net/license/2_02.txt. |
// | If you did not receive a copy of the PHP license and are unable to |
// | obtain it through the world-wide-web, please send a note to |
// | license@php.net so we can mail you a copy immediately. |
// +----------------------------------------------------------------------+
// | Authors: Hartmut Holzgraefe <hholzgra@php.net> |
// | Christian Stocker <chregu@bitflux.ch> |
// +----------------------------------------------------------------------+
//
// $Id: Server.php,v 1.46 2006/03/03 21:43:09 hholzgra Exp $
//
oc_require_once("HTTP/WebDAV/Tools/_parse_propfind.php");
oc_require_once("HTTP/WebDAV/Tools/_parse_proppatch.php");
oc_require_once("HTTP/WebDAV/Tools/_parse_lockinfo.php");
>>>>>>> 854e0c5a9c9060e827fbbfddffeeeadfc2d27278:inc/HTTP/WebDAV/Server.php
/**
* Virtual base class for implementing WebDAV servers
@ -2162,11 +2137,4 @@ class HTTP_WebDAV_Server
return $func_overload & 2 ? mb_strlen($str,'ascii') : strlen($str);
}
}
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
*/
?>

View file

@ -32,9 +32,9 @@
| POSSIBILITY OF SUCH DAMAGE. |
+----------------------------------------------------------------------+
*/
require_once "../../../lib_base.php";
oc_require_once "HTTP/WebDAV/Server.php";
oc_require_once "System.php";
require_once("../inc/lib_base.php");
oc_require_once("HTTP/WebDAV/Server.php");
oc_require_once("System.php");
/**
* Filesystem access using WebDAV
@ -726,13 +726,13 @@
$where = "WHERE path = '$options[path]' AND token = '$options[update]'";
$query = "SELECT owner, exclusivelock FROM locks $where";
$res = OC_DB:query($query);
$row = OC_DB:fetch_assoc($res);
$res = OC_DB::query($query);
$row = OC_DB::fetch_assoc($res);
OC_DB:free_result($res);
if (is_array($row)) {
$query = "UPDATE locks SET expires = '$options[timeout]', modified = ".time()." $where";
OC_DB:query($query);
OC_DB::query($query);
$options['owner'] = $row['owner'];
$options['scope'] = $row["exclusivelock"] ? "exclusive" : "shared";

View file

@ -33,6 +33,7 @@ session_start();
// calculate the documentroot
$SERVERROOT=substr(__FILE__,0,-17);
$DOCUMENTROOT=$_SERVER['DOCUMENT_ROOT'];
$SERVERROOT=str_replace("\\",'/',$SERVERROOT);
$count=strlen($DOCUMENTROOT);
$WEBROOT=substr($SERVERROOT,$count);
if($WEBROOT{0}!=='/'){
@ -75,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

@ -47,6 +47,7 @@ echo('<h1><a id="owncloud-logo" href="'.$WEBROOT.'"><span>ownCloud</span></a></h
if(!$CONFIG_INSTALLED) {
global $FIRSTRUN;
$FIRSTRUN=true;
echo('</div><div class="body">');
echo('<div class="center">');
echo('<p class="errortext">'.$error.'</p>');
echo('<p class="highlighttext">First Run Wizard</p>');
@ -54,11 +55,7 @@ echo('<h1><a id="owncloud-logo" href="'.$WEBROOT.'"><span>ownCloud</span></a></h
echo('</div>');
OC_UTIL::showfooter();
exit();
}
// show the loginform if not loggedin
if(!isset($_SESSION['username']) or $_SESSION['username']=='') {
}elseif(!isset($_SESSION['username']) or $_SESSION['username']=='') { // show the loginform if not loggedin
echo('<div class="center">');
OC_UTIL::showloginform();
echo('</div>');

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();
@ -360,8 +360,8 @@ OC_FILES.browser.showMoreActions=function(){
input.setAttribute('id','newFileName');
form.addEvent('onsubmit',OC_FILES.browser.newFile);
var submit=document.createElement('input');
form.appendChild(submit);
submit.type='submit';
form.appendChild(submit);
submit.value='Create';
OC_FILES.browser.moreActionsList=div;
}else{
@ -474,10 +474,10 @@ OC_FILES.browser.rename_cancel=function(file){
}
OC_FILES.browser.showactions=function(file,hide){
node=document.getElementById(file);
var node=document.getElementById(file);
if(node &&(node.actionsshown || hide===true)){
if(node.actionsdiv){
node.removeChild(node.actionsdiv);
if(node.actionsshown){
node.actionsdiv.parentNode.removeChild(node.actionsdiv);
}
node.actionsdiv=null;
node.actionsshown=false
@ -492,6 +492,7 @@ OC_FILES.browser.showactions=function(file,hide){
table.appendChild(tbody);
var file=OC_FILES.files[file]
var actions=file.actions;
var name;
for(name in actions){
if(actions[name].call && name!='default' && name!='dropOn' && name!='drop'){
tr=document.createElement('tr');

View file

@ -87,6 +87,7 @@ if(typeof Node=='undefined'){
// alert(tagName);
node=document.createElementNative(tagName);
var proto=new Node()
var name;
for(name in proto){
node[name]=proto[name];
}
@ -118,7 +119,6 @@ if(typeof Node=='undefined'){
function getStyle(x,styleProp)
{
if (x.currentStyle){
alert(x.currentStyle);
var y = x.currentStyle[styleProp];
}else if (window.getComputedStyle){
var y = document.defaultView.getComputedStyle(x,null).getPropertyValue(styleProp);

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/get_file.php?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(){