From 59b4f49e583d2e54e978dce0aa04888a60eb3688 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sun, 26 Oct 2008 07:37:37 +0000 Subject: [PATCH] fixed errors in creating the home dirs of standard groups in sqlfs during setup --- phpgwapi/inc/class.sqlfs_stream_wrapper.inc.php | 6 ++++-- setup/inc/class.setup.inc.php | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/phpgwapi/inc/class.sqlfs_stream_wrapper.inc.php b/phpgwapi/inc/class.sqlfs_stream_wrapper.inc.php index 962be87350..68a6152534 100644 --- a/phpgwapi/inc/class.sqlfs_stream_wrapper.inc.php +++ b/phpgwapi/inc/class.sqlfs_stream_wrapper.inc.php @@ -596,6 +596,7 @@ class sqlfs_stream_wrapper implements iface_stream_wrapper if (self::LOG_LEVEL) error_log(__METHOD__."('$url',$mode,$options) already exist!"); if (!($options & STREAM_URL_STAT_QUIET)) { + //throw new Exception(__METHOD__."('$url',$mode,$options) already exist!"); trigger_error(__METHOD__."('$url',$mode,$options) already exist!",E_USER_WARNING); } return false; @@ -755,10 +756,11 @@ class sqlfs_stream_wrapper implements iface_stream_wrapper trigger_error("Only root can do that!",E_USER_WARNING); return false; } - if ($owner < 0 || !$GLOBALS['egw']->accounts->id2name($owner)) // not a user + if ($owner < 0 || $owner && !$GLOBALS['egw']->accounts->id2name($owner)) // not a user (0 == root) { if (self::LOG_LEVEL) error_log(__METHOD__."($url,$owner) unknown (numeric) user id!"); - trigger_error("Unknown (numeric) user id!",E_USER_WARNING); + trigger_error(__METHOD__."($url,$owner) Unknown (numeric) user id!",E_USER_WARNING); + //throw new Exception(__METHOD__."($url,$owner) Unknown (numeric) user id!"); return false; } $stmt = self::$pdo->prepare('UPDATE '.self::TABLE.' SET fs_uid=:fs_uid WHERE fs_id=:fs_id'); diff --git a/setup/inc/class.setup.inc.php b/setup/inc/class.setup.inc.php index d466f07c62..1b2984ea67 100644 --- a/setup/inc/class.setup.inc.php +++ b/setup/inc/class.setup.inc.php @@ -975,7 +975,7 @@ class setup } else { - vfs_home_hooks::addGroup($account); + vfs_home_hooks::addGroup($account+array('account_name' => $account['account_lid'])); } } if ($primary_group) // only for users, NOT groups