Index: /trunk/expressoCalendar/setup/tables_update.inc.php
===================================================================
--- /trunk/expressoCalendar/setup/tables_update.inc.php	(revision 6996)
+++ /trunk/expressoCalendar/setup/tables_update.inc.php	(revision 7164)
@@ -171,4 +171,15 @@
 	    return $GLOBALS['setup_info']['expressoCalendar']['currentver'];
 	};
+
+    $test[] = '1.008';
+    function expressoCalendar_upgrade1_008() {
+        $oProc = $GLOBALS['phpgw_setup']->oProc;
+
+        $oProc->query("ALTER TABLE calendar_permission ADD COLUMN owner bigint;");
+        $oProc->query("UPDATE calendar_permission SET owner = sig.user_uidnumber FROM calendar_signature as sig WHERE (sig.calendar_id = object_id AND sig.is_owner = '1');");
+
+        $GLOBALS['setup_info']['expressoCalendar']['currentver'] = '1.009';
+        return $GLOBALS['setup_info']['expressoCalendar']['currentver'];
+    };
         
 ?>
Index: /trunk/expressoCalendar/setup/setup.inc.php
===================================================================
--- /trunk/expressoCalendar/setup/setup.inc.php	(revision 6996)
+++ /trunk/expressoCalendar/setup/setup.inc.php	(revision 7164)
@@ -13,5 +13,5 @@
 	$setup_info['expressoCalendar']['title']     	= 'Expresso Calendar';
 	/* Ao incrementar versão, não esquecer de declarar função do tables_update.inc.php*/
-	$setup_info['expressoCalendar']['version']   	= '1.008';
+	$setup_info['expressoCalendar']['version']   	= '1.009';
 	$setup_info['expressoCalendar']['app_order']	= 10;
 
Index: /trunk/prototype/config/calendarToPermission.ini
===================================================================
--- /trunk/prototype/config/calendarToPermission.ini	(revision 5907)
+++ /trunk/prototype/config/calendarToPermission.ini	(revision 7164)
@@ -24,2 +24,3 @@
 type = object_type
 acl = permission
+owner = owner
Index: /trunk/prototype/modules/calendar/interceptors/DBMapping.php
===================================================================
--- /trunk/prototype/modules/calendar/interceptors/DBMapping.php	(revision 7097)
+++ /trunk/prototype/modules/calendar/interceptors/DBMapping.php	(revision 7164)
@@ -744,10 +744,10 @@
     }
 
-    public function deepnessFindCalendarShared(&$uri, &$result, &$criteria, $original) {    
+    public function deepnessFindCalendarShared(&$uri, &$result, &$criteria, $original) {
     	if (isset($original['criteria']['deepness']) && $original['criteria']['deepness'] != '0' && count($result) > 0) {
 
     	    $calendarIds = array();
-    	    foreach ($result as $key => $value)
-    		array_push($calendarIds, $value['calendar']);
+    	    foreach ($result as $value)
+    		    $calendarIds[] = $value['calendar'];
 
     	    $calendar = Controller::find(array('concept' => 'calendar'), false, array('filter' => array('AND', array('IN', 'id', $calendarIds))));
@@ -755,24 +755,23 @@
     	    if ($calendar && count($calendar) > 0){
                 $newResult = array();
-        		foreach ($calendar as $key => $value) {
-        		    foreach ($result as $k => $r) {
+        		foreach ($calendar as  $value) {
+        		    foreach ($result as  $r) {
 
             			if ($r['calendar'] == $value['id']) {
             			    $r['calendar'] = $value;
-            			    array_push($newResult, $r);
+            			    $newResult[] = $r;
             			}
         		    }
         		}
 
-        		foreach ($newResult as $key => &$value) {
+        		foreach ($newResult as &$value) {
         		    if ($value['user'] != 0) {
-            			$user = $value['user'];
-            			$value['user'] = Controller::read(array('concept' => 'user', 'id' => $user));
+            			$value['user'] = Controller::read(array('concept' => 'user', 'id' => $value['user']));
 
             			if (!$value['user'])
-            			    $value['user'] = Controller::read(array('concept' => 'group', 'id' => $user));
+            			    $value['user'] = Controller::read(array('concept' => 'group', 'id' => $value['user']));
         		    }
+                    $value['owner'] = Controller::read(array('concept' => 'user', 'id' => $value['owner']));
         		}
-
         		$result = $newResult;
     	    }else
@@ -955,9 +954,9 @@
 		    //Caso não seja o dono da agenda retorna o objeto permission com as acls
 		    if ($result[$i]['isOwner'] == 0) {
-			$permission = Controller::find(array('concept' => 'calendarToPermission'), false, array('filter' => array('AND', array('=', 'calendar', $v['calendar']), array('=', 'user', Config::me('uidNumber')))));
+			$permission = Controller::find(array('concept' => 'calendarToPermission'), false, array('filter' => array('AND', array('=', 'calendar', $v['calendar']), array('=', 'user', Config::me('uidNumber')), 'deepness' => 2)));
 
 			if (!is_array($permission) || !$permission) {
 
-			    $permission = Controller::find(array('concept' => 'calendarToPermission'), false, array('filter' => array('AND', array('=', 'calendar', $v['calendar']), array('=', 'type', '1'))));
+			    $permission = Controller::find(array('concept' => 'calendarToPermission'), false, array('filter' => array('AND', array('=', 'calendar', $v['calendar']), array('=', 'type', '1')), 'deepness' => 2 ));
 			}
 			$result[$i]['permission'] = $permission[0];
Index: /trunk/prototype/modules/calendar/js/calendar.codecs.js
===================================================================
--- /trunk/prototype/modules/calendar/js/calendar.codecs.js	(revision 7075)
+++ /trunk/prototype/modules/calendar/js/calendar.codecs.js	(revision 7164)
@@ -133,4 +133,5 @@
 	    return returns;
 	};
+    console.log(evtObj);
 	var res = $.map(evtObj, function( objEvent ){			
 	    return {
@@ -140,5 +141,6 @@
 		user: objEvent.user,
 		acl: constantAcl(objEvent.acl)	,
-		aclValues: objEvent.acl
+		aclValues: objEvent.acl,
+		owner: objEvent.owner
 	    };
 	});	
@@ -190,5 +192,5 @@
 });
 
-/*Todo Melhorias serão feitas na API*/
+/*Todo Melhorias serï¿œo feitas na API*/
 //DataLayer.poll( "schedulable" );
 
@@ -718,5 +720,5 @@
         priority: form.priority,
         category: form.category,
-        summary: form.summary == '' ? 'Tarefa sem título' : form.summary,
+        summary: form.summary == '' ? 'Tarefa sem tï¿œtulo' : form.summary,
         description: form.description,
         timezone: tzId,
@@ -902,14 +904,14 @@
         'startTime': 'Data de inicio',
         'endTime' : 'Data de fim',
-        'summary' : 'Título',
-        'description': 'Descrição',
+        'summary' : 'Tï¿œtulo',
+        'description': 'Descriï¿œï¿œo',
         'status': 'Status',
         'percentage': 'Porcentagem',
         'priority': 'Prioridade',
-        'due' : 'Previsão de término'
+        'due' : 'Previsï¿œo de tï¿œrmino'
     };
     
     var statusDecoded = {
-	1: 'Sem ações',
+	1: 'Sem aï¿œï¿œes',
 	2: 'Em processo',
 	3: 'Finalzada',
@@ -1078,5 +1080,5 @@
         priority: form.priority,
         category: form.category,
-        summary: form.summary == '' ? 'Atividade sem título' : form.summary,
+        summary: form.summary == '' ? 'Atividade sem tï¿œtulo' : form.summary,
         description: form.description,
         timezone: tzId,
@@ -1127,5 +1129,5 @@
                     task = DataLayer.get('schedulable', task);
 
-                //Resolve problemas com atualização na camada Cliente
+                //Resolve problemas com atualizaï¿œï¿œo na camada Cliente
                 if(!$.isNumeric(task.startTime)){
                     DataLayer.remove('schedulable', task.id, false);
@@ -1347,5 +1349,5 @@
 		category: form.category,
 		priority: form.priority,
-		summary: form.summary == '' ? 'Evento sem título' : form.summary,
+		summary: form.summary == '' ? 'Evento sem tï¿œtulo' : form.summary,
 		description: form.description,
 		timezone: tzId,
@@ -1429,8 +1431,8 @@
 	    var typeRepeat = {
 		'none': false, 
-		'daily': 'Repetição diária',
-		'weekly': 'Repetição semanal',
-		'monthly': 'Repetição mensal',
-		'yearly': 'repetição anual'
+		'daily': 'Repetiï¿œï¿œo diï¿œria',
+		'weekly': 'Repetiï¿œï¿œo semanal',
+		'monthly': 'Repetiï¿œï¿œo mensal',
+		'yearly': 'repetiï¿œï¿œo anual'
 	    }
 
@@ -1520,8 +1522,8 @@
         var typeRepeat = {
         'none': false, 
-        'daily': 'Repetição diária',
-        'weekly': 'Repetição semanal',
-        'monthly': 'Repetição mensal',
-        'yearly': 'repetição anual'
+        'daily': 'Repetiï¿œï¿œo diï¿œria',
+        'weekly': 'Repetiï¿œï¿œo semanal',
+        'monthly': 'Repetiï¿œï¿œo mensal',
+        'yearly': 'repetiï¿œï¿œo anual'
         }
 
@@ -1787,13 +1789,13 @@
 			    ['AND', 
 				['>=', 'rangeEnd', filter.start.getTime()], 
-				['<=', 'rangeEnd', filter.end.getTime()] , 
+				['<=', 'rangeEnd', filter.end.getTime()]
 			    ],
 			    ['AND', 
 				['>=', 'rangeStart', filter.start.getTime()], 
-				['<=', 'rangeStart', filter.end.getTime()] , 
+				['<=', 'rangeStart', filter.end.getTime()]
 			    ],
 			    ['AND', 
 				['<=', 'rangeStart', filter.start.getTime()], 
-				['>=', 'rangeEnd', filter.end.getTime()] , 
+				['>=', 'rangeEnd', filter.end.getTime()]
 			    ]
 			],
Index: /trunk/prototype/modules/calendar/js/calendar.shared.js
===================================================================
--- /trunk/prototype/modules/calendar/js/calendar.shared.js	(revision 7097)
+++ /trunk/prototype/modules/calendar/js/calendar.shared.js	(revision 7164)
@@ -257,5 +257,5 @@
 	    text: false
 	}).click(function () {
-	    incompatibleAcl($(this), ['b',], ['busy']);
+	    incompatibleAcl($(this), ['b'], ['busy']);
 	    dependsAcl($(this), ['r'], ['read']);
 	    changeAcl($(this), 's');
@@ -454,4 +454,5 @@
 			name:resultPublic[i].calendar.name, 
 			mail: resultPublic[i].calendar.description,
+			owner: resultPublic[i].owner,
 			type: 1
 		    })
@@ -470,5 +471,5 @@
 			    currentCalendars[id] = {
 				id: id, 
-				name: resultNormalize[i].name, 
+				name: resultNormalize[i].name + ' ( '+resultNormalize[i].owner.uid +' )',
 				description: resultNormalize[i].description, 
 				type: resultNormalize[i].type, 
@@ -528,6 +529,6 @@
 		id: dataCurrent.id, 
 		idPermission:Calendar.signatures[i].id ,
-		name: dataCurrent.name, 
-		description: dataCurrent.description, 
+		name: dataCurrent.name + ' ( ' + Calendar.signatures[i].permission.owner.uid + ' )',
+		description: dataCurrent.description,
 		type: Calendar.signatures[i].permission.type, 
 		isCalendar: true,
Index: /trunk/prototype/modules/calendar/templates/calendar_search_itemlist.ejs
===================================================================
--- /trunk/prototype/modules/calendar/templates/calendar_search_itemlist.ejs	(revision 6052)
+++ /trunk/prototype/modules/calendar/templates/calendar_search_itemlist.ejs	(revision 7164)
@@ -3,5 +3,5 @@
 	<input type="checkbox" name="opcao" <%= (data[i].enabled) ?  '' : 'disabled="disabled"' %> />
 	<input type="hidden" value="<%=data[i]['id']%>" />
-	<label class="name"><%=data[i]['name']%></label>
+	<label class="name"><%=data[i]['name']%> ( <%=data[i]['owner']['uid']%> )</label>
 	<label class="mail hidden"><%=data[i]['mail']%></label>
 	<label class="id hidden"><%=data[i]['id']%></label>
