From 29422fa55379aa61a61019b832c83dab6d450264 Mon Sep 17 00:00:00 2001 From: cweiske Date: Sat, 3 Oct 2009 14:00:33 +0000 Subject: move files to new locations git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@386 b3834d28-1941-0410-a4f8-b48e95affb8f --- www/watch.php | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 www/watch.php (limited to 'www/watch.php') diff --git a/www/watch.php b/www/watch.php new file mode 100644 index 0000000..01a6bcc --- /dev/null +++ b/www/watch.php @@ -0,0 +1,61 @@ +isLoggedOn() && $user) { + $pagetitle = ''; + + $userid = $userservice->getIdFromUser($user); + + if($userid == NULL) { + $tplVars['error'] = sprintf(T_('User with username %s was not found'), $user); + $templateservice->loadTemplate('error.404.tpl', $tplVars); + exit(); + } + + $watched = $userservice->getWatchStatus($userid, $currentUser->getId()); + $changed = $userservice->setWatchStatus($userid); + + if ($watched) { + $tplVars['msg'] = T_('User removed from your watchlist'); + } else { + $tplVars['msg'] = T_('User added to your watchlist'); + } + + header('Location: '. createURL('watchlist', $currentUser->getUsername())); +} +?> -- cgit v1.2.3