From 666a9b3563b84ef127feb72d22ef235b976c0e7c Mon Sep 17 00:00:00 2001
From: Benoit Mortier <benoit.mortier@opensides.be>
Date: Mon, 9 Sep 2013 11:17:35 +0200
Subject: [PATCH] Fixes: #343 we need a webservice for fusiondirectory
 (bugfixes only in class_objects.in and class_session.inc

---
 include/class_objects.inc | 2 +-
 include/class_session.inc | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/class_objects.inc b/include/class_objects.inc
index 24125a784..4de869340 100644
--- a/include/class_objects.inc
+++ b/include/class_objects.inc
@@ -193,7 +193,7 @@ class objects
 
   static function create ($type)
   {
-    return self::open($type, 'new');
+    return self::open('new', $type);
   }
 
   static function infos ($type)
diff --git a/include/class_session.inc b/include/class_session.inc
index 1168ba0a9..09bdce75a 100644
--- a/include/class_session.inc
+++ b/include/class_session.inc
@@ -252,6 +252,7 @@ class session {
    */
   public static function start()
   {
+	session_name("FusionDirectory");
     /* Set cookie lifetime to one day (The parameter is in seconds ) */
     session_set_cookie_params(24*60*60);
 
@@ -262,7 +263,6 @@ class session {
        !! The garbage collector is a cron job on debian systems, the cronjob will fetch the timeout from
        the php.ini, so if you use debian, you must hardcode session.gc_maxlifetime in your php.ini */
     ini_set("session.gc_maxlifetime",24*60*60);
-    session_name("FusionDirectory");
     session_start();
 
     /* Check for changed browsers and bail out */
-- 
GitLab