From cf4cd2aa3f2a6f4f836ad7dc86ba03d12f76ec6d Mon Sep 17 00:00:00 2001
From: Ralf Becker <ralfbecker@outdoor-training.de>
Date: Mon, 21 Apr 2008 15:36:30 +0000
Subject: [PATCH] restore current egw_vfs::$is_root and egw_vfs::$user

---
 phpgwapi/inc/class.links_stream_wrapper.inc.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/phpgwapi/inc/class.links_stream_wrapper.inc.php b/phpgwapi/inc/class.links_stream_wrapper.inc.php
index 5d28c92525..3e32e707d1 100644
--- a/phpgwapi/inc/class.links_stream_wrapper.inc.php
+++ b/phpgwapi/inc/class.links_stream_wrapper.inc.php
@@ -168,14 +168,14 @@ class links_stream_wrapper extends sqlfs_stream_wrapper
 		$ret = false;
 		if ($apps == 'apps' && $app && !$id || self::check_extended_acl($path,egw_vfs::WRITABLE))	// app directory itself is allways ok
 		{
-			egw_vfs::$is_root = true;
+			$current_is_root = egw_vfs::$is_root; egw_vfs::$is_root = true;
 			$current_user = egw_vfs::$user; egw_vfs::$user = 0;
 
 			$ret = parent::mkdir($path,0,$options|STREAM_MKDIR_RECURSIVE);
 			if ($id) parent::chmod($path,0);	// no other rights
 
 			egw_vfs::$user = $current_user;
-			egw_vfs::$is_root = false;
+			egw_vfs::$is_root = $current_is_root;
 		}
 		//error_log(__METHOD__."($path,$mode,$options) apps=$apps, app=$app, id=$id: returning $ret");
 		return $ret;