d582054c77
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@1 b3834d28-1941-0410-a4f8-b48e95affb8f
27 lines
753 B
PHP
27 lines
753 B
PHP
<?php
|
|
$userservice =& ServiceFactory::getServiceInstance('UserService');
|
|
if ($userservice->isLoggedOn()) {
|
|
$currentUser = $userservice->getCurrentUser();
|
|
$currentUsername = $currentUser[$userservice->getFieldName('username')];
|
|
|
|
if ($currentUsername != $user) {
|
|
$result = $userservice->getWatchStatus($userid, $userservice->getCurrentUserId());
|
|
if ($result) {
|
|
$linkText = T_('Remove from Watchlist');
|
|
} else {
|
|
$linkText = T_('Add to Watchlist');
|
|
}
|
|
$linkAddress = createURL('watch', $user);
|
|
?>
|
|
|
|
<h2><?php echo T_('Actions'); ?></h2>
|
|
<div id="watchlist">
|
|
<ul>
|
|
<li><a href="<?php echo $linkAddress ?>"><?php echo $linkText ?></a></li>
|
|
</ul>
|
|
</div>
|
|
|
|
<?php
|
|
}
|
|
}
|
|
?>
|