2 $userservice =& ServiceFactory::getServiceInstance('UserService');
3 if ($userservice->isLoggedOn()) {
4 $currentUser = $userservice->getCurrentUser();
5 $currentUsername = $currentUser[$userservice->getFieldName('username')];
7 if ($currentUsername != $user) {
8 $result = $userservice->getWatchStatus($userid, $userservice->getCurrentUserId());
10 $linkText = T_('Remove from Watchlist');
12 $linkText = T_('Add to Watchlist');
14 $linkAddress = createURL('watch', $user);
17 <h2><?php echo T_('Actions'); ?></h2>
20 <li><a href="<?php echo $linkAddress ?>"><?php echo $linkText ?></a></li>