Pass complete identity to views.
authorJan Schneider <jan@horde.org>
Thu, 6 Jan 2011 16:45:18 +0000 (17:45 +0100)
committerJan Schneider <jan@horde.org>
Thu, 6 Jan 2011 16:45:18 +0000 (17:45 +0100)
kronolith/lib/Kronolith.php
kronolith/templates/share/notification.html.php
kronolith/templates/share/notification.plain.php

index 403f912..303fa2d 100644 (file)
@@ -1705,7 +1705,7 @@ class Kronolith
             $image = self::getImagePart('big_share.png');
             $view = new Horde_View(array('templatePath' => KRONOLITH_TEMPLATES . '/share'));
             new Horde_View_Helper_Text($view);
-            $view->user = $identity->getName();
+            $view->identity = $identity;
             $view->calendar = $share->get('name');
             $view->imageId = $image->getContentId();
         }
@@ -2206,6 +2206,7 @@ class Kronolith
         $share = $GLOBALS['kronolith_shares']->getShare($event->calendar);
         $view = new Horde_View(array('templatePath' => KRONOLITH_TEMPLATES . '/itip'));
         new Horde_View_Helper_Text($view);
+        $view->identity = $ident;
         $view->event = $event;
         $view->imageId = $image->getContentId();
 
index 19b53cf..821dbc3 100644 (file)
@@ -1,4 +1,4 @@
-<p><font size="4"><strong><?php printf(_("Invitation from %s to the calendar %s"), $this->h($this->user), $this->h($this->calendar)) ?></strong></font></p>
+<p><font size="4"><strong><?php printf(_("Invitation from %s to the calendar %s"), $this->h($this->identity->getName()), $this->h($this->calendar)) ?></strong></font></p>
 
 <table width="100%" border="0" cellspacing="0" cellpadding="0"><tr>
   <td width="140" valign="top">
@@ -10,9 +10,9 @@
         <td>
           <font size="2">
             <?php if ($this->ownerChange): ?>
-            <?php printf(_("%s has assigned the ownership of the calendar %s to you."), '<strong>' . $this->h($this->user) . '</strong>', '<strong>' . $this->h($this->calendar) . '</strong>') ?>
+            <?php printf(_("%s has assigned the ownership of the calendar %s to you."), '<strong>' . $this->h($this->identity->getName()) . '</strong>', '<strong>' . $this->h($this->calendar) . '</strong>') ?>
             <?php else: ?>
-            <?php printf(_("%s wants to share the calendar %s with you to grant you access to all events in this calendar."), '<strong>' . $this->h($this->user) . '</strong>', '<strong>' . $this->h($this->calendar) . '</strong>') ?>
+            <?php printf(_("%s wants to share the calendar %s with you to grant you access to all events in this calendar."), '<strong>' . $this->h($this->identity->getName()) . '</strong>', '<strong>' . $this->h($this->calendar) . '</strong>') ?>
             <?php if ($this->subscribe): ?>
             <?php echo _("To subscribe to this calendar, you need to click the following link:") ?>
             <br><br>
index 6aaf435..cebc372 100644 (file)
@@ -1,10 +1,10 @@
-<?php printf(_("Invitation from %s to the calendar \"%s\""), $this->user, $this->calendar) ?>
+<?php printf(_("Invitation from %s to the calendar \"%s\""), $this->identity->getName(), $this->calendar) ?>
 
 
 <?php if ($this->ownerChange): ?>
-<?php printf(_("%s has assigned the ownership of the calendar \"%s\" to you."), $this->user, $this->calendar) ?>
+<?php printf(_("%s has assigned the ownership of the calendar \"%s\" to you."), $this->identity->getName(), $this->calendar) ?>
 <?php else: ?>
-<?php printf(_("%s wants to share the calendar \"%s\" with you to grant you access to all events in this calendar."), $this->user, $this->calendar) ?>
+<?php printf(_("%s wants to share the calendar \"%s\" with you to grant you access to all events in this calendar."), $this->identity->getName(), $this->calendar) ?>
 <?php if ($this->subscribe): ?>
  <?php echo _("To subscribe to this calendar, you need to click the following link:") ?>