]> projects.mako.cc - scuttle/blob - templates/sidebar.block.watchstatus.php
removed code for string overloading
[scuttle] / templates / sidebar.block.watchstatus.php
1 <?php
2 $sf = new ServiceFactory();
3 $userservice =& $sf->getServiceInstance('UserService');
4 if ($userservice->isLoggedOn()) {
5     $currentUser = $userservice->getCurrentUser();
6     $currentUsername = $currentUser[$userservice->getFieldName('username')];
7
8     if ($currentUsername != $user) {
9         $result = $userservice->getWatchStatus($userid, $userservice->getCurrentUserId());
10         if ($result) {
11             $linkText = T_('Remove from Watchlist');
12         } else {
13             $linkText = T_('Add to Watchlist');
14         }
15         $linkAddress = createURL('watch', $user);
16 ?>
17
18 <h2><?php echo T_('Actions'); ?></h2>
19 <div id="watchlist">
20     <ul>
21         <li><a href="<?php echo $linkAddress ?>"><?php echo $linkText ?></a></li>
22     </ul>
23 </div>
24
25 <?php
26     }
27 }
28 ?>

Benjamin Mako Hill || Want to submit a patch?