2 $sf = new ServiceFactory();
3 $userservice =& $sf->getServiceInstance('UserService');
4 if ($userservice->isLoggedOn()) {
5 $currentUser = $userservice->getCurrentUser();
6 $currentUsername = $currentUser[$userservice->getFieldName('username')];
8 if ($currentUsername != $user) {
9 $result = $userservice->getWatchStatus($userid, $userservice->getCurrentUserId());
11 $linkText = T_('Remove from Watchlist');
13 $linkText = T_('Add to Watchlist');
15 $linkAddress = createURL('watch', $user);
18 <h2><?php echo T_('Actions'); ?></h2>
21 <li><a href="<?php echo $linkAddress ?>"><?php echo $linkText ?></a></li>