Index: trunk/calendar/inc/class.bocalendar.inc.php
===================================================================
--- trunk/calendar/inc/class.bocalendar.inc.php	(revision 5281)
+++ trunk/calendar/inc/class.bocalendar.inc.php	(revision 5316)
@@ -974,5 +974,5 @@
 			$l_participants = (@$params['participants']?$params['participants']:$_POST['participants']);
 
-                        require_once($_SESSION['rootPath'].'/calendar/inc/class.ex_participants.inc.php');
+                        require_once(dirname(__FILE__).'/class.ex_participants.inc.php');
                         $this->ex_participants = new exParticipants();
                         $this->ex_participants->setParticipantsByString(@$params['ex_participants']?$params['ex_participants']:$_POST['ex_participants']);
@@ -3253,6 +3253,6 @@
                 function getLdap()
                 {
-                    require_once($_SESSION['rootPath'].'/header.inc.php');
-                    require_once($_SESSION['rootPath'].'/phpgwapi/inc/class.common.inc.php');
+                    require_once(dirname(__FILE__).'/../../header.inc.php');
+                    require_once(dirname(__FILE__).'/../../phpgwapi/inc/class.common.inc.php');
    
                     $common = new common();
@@ -3769,5 +3769,5 @@
                         if(!is_object($this->ex_participants))
                         {
-                            include_once($_SESSION['rootPath'].'/calendar/inc/class.ex_participants.inc.php');
+                            include_once(dirname(__FILE__).'/class.ex_participants.inc.php');
                             $objexP = new exParticipants();
                             $objexP->setParticipantsBySerializable($this->ex_participants);
@@ -3825,5 +3825,5 @@
                                  * Cria Arqvuio ICS
                                  */
-                                require_once $_SESSION['rootPath'].'/API/class.servicelocator.php';
+                                require_once dirname(__FILE__).'/../../API/class.servicelocator.php';
                                 $icalService = ServiceLocator::getService('ical');
 
@@ -3991,5 +3991,5 @@
                      }
                      
-                    require_once $_SESSION['rootPath'] . '/API/class.servicelocator.php';
+                    require_once dirname(__FILE__) . '/../../API/class.servicelocator.php';
                     $icalService = ServiceLocator::getService('ical');
                     $dia_inicio = $array_data_inicio[0];
@@ -4157,5 +4157,5 @@
 			}
                          //Verificando alterações em usuarios externos
-                         include_once($_SESSION['rootPath'].'/calendar/inc/class.ex_participants.inc.php');
+                         include_once(dirname(__FILE__).'/class.ex_participants.inc.php');
                          $extOld = new exParticipants();
                          $extNew = new exParticipants();
Index: trunk/calendar/inc/class.boicalendar.inc.php
===================================================================
--- trunk/calendar/inc/class.boicalendar.inc.php	(revision 5132)
+++ trunk/calendar/inc/class.boicalendar.inc.php	(revision 5316)
@@ -2785,5 +2785,5 @@
 	/*-------------------------------------------------------------*/
 
-	require_once ($_SESSION['rootPath'] . '/calendar/inc/class.ex_participants.inc.php');
+	require_once (dirname(__FILE__) . '/class.ex_participants.inc.php');
 
 	$c_events = count($ical['event']);
@@ -3058,5 +3058,5 @@
 
 		if (!isset ($this->bo)) {
-			require_once ($_SESSION['rootPath'] . '/calendar/inc/class.bocalendar.inc.php');
+			require_once (dirname(__FILE__) . '/class.bocalendar.inc.php');
 			$this->bo = new bocalendar();
 		}
@@ -3415,5 +3415,5 @@
 		return false;
 
-	include_once ($_SESSION['rootPath'] . '/calendar/inc/class.ex_participants.inc.php');
+	include_once (dirname(__FILE__) . '/class.ex_participants.inc.php');
 	$exParticipants = new exParticipants();
 	$exParticipants->setParticipantsBySerializable($row['ex_participants']);
Index: trunk/calendar/inc/class.socalendar_sql.inc.php
===================================================================
--- trunk/calendar/inc/class.socalendar_sql.inc.php	(revision 5281)
+++ trunk/calendar/inc/class.socalendar_sql.inc.php	(revision 5316)
@@ -13,14 +13,9 @@
   *  option) any later version.                                              *
   \**************************************************************************/
-if($_SESSION['isCrun']){
+require_once dirname(__FILE__).'/../../API/class.servicelocator.php';
+
+if(isset($_SESSION['isCrun']))
 	$_SESSION['isCrun'] = false;
-	$_SESSION['rootPath'] = PHPGW_INCLUDE_ROOT;
-	require_once $_SESSION['rootPath'].'/API/class.servicelocator.php';
-}else if($_SESSION['rootPath']){
-	require_once $_SESSION['rootPath'].'/API/class.servicelocator.php';
-}else{
-	require_once PHPGW_INCLUDE_ROOT.'/API/class.servicelocator.php';
-}
-
+    
 	if (@$GLOBALS['phpgw_info']['flags']['included_classes']['socalendar_'])
 	{
Index: trunk/calendar/inc/class.uicalendar.inc.php
===================================================================
--- trunk/calendar/inc/class.uicalendar.inc.php	(revision 5269)
+++ trunk/calendar/inc/class.uicalendar.inc.php	(revision 5316)
@@ -95,5 +95,5 @@
 			$GLOBALS['phpgw_info']['flags']['noappfooter'] = True;
                         $GLOBALS['phpgw_info']['flags']['currentapp'] = 'calendar';
-                        include_once( $_SESSION['rootPath'].'/header.inc.php' );
+                        include_once( dirname(__FILE__).'/../../header.inc.php' );
 
 			$GLOBALS['phpgw']->nextmatchs = CreateObject('phpgwapi.nextmatchs');
@@ -1028,5 +1028,5 @@
 		    );
 
-                   include_once($_SESSION['rootPath'].'/calendar/inc/class.ex_participants.inc.php');
+                   include_once(dirname(__FILE__).'/class.ex_participants.inc.php');
                    $exParticipants = new exParticipants();
                    $exParticipants->setParticipantsBySerializable($event['ex_participants']);
@@ -3899,5 +3899,5 @@
 			$porig = $GLOBALS['phpgw']->template;
 
-			$GLOBALS['phpgw']->template->root = $_SESSION['rootPath'].'/calendar/templates/'.$GLOBALS['phpgw_info']['server']['template_set'].'/';
+			$GLOBALS['phpgw']->template->root = dirname(__FILE__).'/../templates/'.$GLOBALS['phpgw_info']['server']['template_set'].'/';
 
 			$p = $GLOBALS['phpgw']->template;
@@ -4576,5 +4576,5 @@
 			$p->set_block('view','hr','hr');
 
-                        include_once($_SESSION['rootPath'].'/calendar/inc/class.ex_participants.inc.php');
+                        include_once(dirname(__FILE__).'/class.ex_participants.inc.php');
                         $langp = array();
                         $langp['ACCEPTED'] = lang('Accepted');
@@ -5054,5 +5054,5 @@
 			}
 			
-			include_once($_SESSION['rootPath'].'/calendar/inc/class.ex_participants.inc.php');
+			include_once(dirname(__FILE__).'/class.ex_participants.inc.php');
                         $langp = array();
                         $langp['ACCEPTED'] = lang('Accepted');
