[dev] Fix for kron templates/view/view.inc

David U. davidu@everydns.net
Sun, 8 Sep 2002 16:18:21 -0500


I'm not sure why php doesn't like this, and it could be because of some
other stuff I've done but...

I'm also not sure why the syntax at the bottom of the file doesn't match the
top of the file.

-davidu

Index: templates/view/view.inc
===================================================================
RCS file: /repository/kronolith/templates/view/view.inc,v
retrieving revision 1.14
diff -p --unified=3 -r1.14 view.inc
--- templates/view/view.inc     7 Sep 2002 05:40:08 -0000       1.14
+++ templates/view/view.inc     8 Sep 2002 21:12:02 -0000
@@ -28,12 +28,14 @@ $inviteurl = Horde::applicationUrl($invi
    <?php if ($currentShare->hasPermission(Auth::getAuth(), _PERMS_DELETE))
: ?>
    <?php $i=1 ; echo Horde::link($delurl, sprintf(_("Delete '%s'"),
$event->getTitle()), 'menuitem') . _("Delete") ?></a>
    <?php endif; ?>
-   <?php if ($i) { echo '|' ; } ?>
+   <?php if (isset($i)) { echo '|' ; } ?>
    <?php if ($currentShare->hasPermission(Auth::getAuth(), _PERMS_EDIT)) :
?>
    <?php $i=1 ; echo Horde::link($editurl, sprintf(_("Edit '%s'"),
$event->getTitle()), 'menuitem') . _("Edit") ?></a>
    <?php endif; ?>
-   <?php if ($i) { echo '|' ; } ?>
+   <?php if (isset($i)) { echo '|' ; } ?>
    <?php echo Horde::link($inviteurl, sprintf(_("Invite people to '%s'"),
$event->getTitle()), 'menuitem') . _("Invite") ?></a>
    </span></td>
   </tr>
  </table>
@@ -172,12 +176,14 @@ elseif ($event->hasRecurType(KRONOLITH_R
    <?php if ($currentShare->hasPermission(Auth::getAuth(), _PERMS_DELETE))
: ?>
    <?php $i=1 ; echo Horde::link($delurl, sprintf(_("Delete '%s'"),
$event->getTitle()), 'menuitem') . _("Delete") ?></a>
    <?php endif; ?>
-   <?php if ($i==1) { echo '|' ; } ?>
+   <?php if (isset($i)) { echo '|' ; } ?>
    <?php if ($currentShare->hasPermission(Auth::getAuth(), _PERMS_EDIT)) :
?>
-   <?php $i=2 ; echo Horde::link($editurl, sprintf(_("Edit '%s'"),
$event->getTitle()), 'menuitem') . _("Edit") ?></a>
+   <?php $i=1 ; echo Horde::link($editurl, sprintf(_("Edit '%s'"),
$event->getTitle()), 'menuitem') . _("Edit") ?></a>
    <?php endif; ?>
-   <?php if ($i==2) { echo '|' ; } ?>
+   <?php if (isset($i)) { echo '|' ; } ?>
    <?php echo Horde::link($inviteurl, sprintf(_("Invite people to '%s'"),
$event->getTitle()), 'menuitem') . _("Invite") ?></a>
  </span></td>
 </tr>


--
"Never doubt that a small group of thoughtful citizens can change the
world. Indeed, it is the only thing that ever has." --Margaret Mead