Final updates to rss.php with correct authentication and bookmark results

This commit is contained in:
Mark Pemberton 2011-05-12 23:12:11 -04:00
parent 23cdbb53d0
commit f18b8c0444
3 changed files with 17 additions and 4 deletions

View File

@ -716,7 +716,7 @@ class SemanticScuttle_Service_Bookmark extends SemanticScuttle_DbService
// All public bookmarks, user's own bookmarks
// and any shared with user
$privacy = ' AND ((B.bStatus = 0) OR (B.uId = '. $sId .')';
$watchnames = $userservice->getWatchNames($sId, true);
$watchnames = $userservice->getWatchNames($sId);
foreach ($watchnames as $watchuser) {
$privacy .= ' OR (U.username = "'. $watchuser;
$privacy .= '" AND B.bStatus = 1)';

View File

@ -377,7 +377,7 @@ class SemanticScuttle_Service_User extends SemanticScuttle_DbService
{
if (!is_null($newval)) {
//internal use only: reset currentuser
$currentuser = $newval;
$this->currentuser = $newval;
} else if ($refresh || !isset($this->currentuser)) {
if ($id = $this->getCurrentUserId()) {
$this->currentuser = $this->getUser($id);
@ -656,7 +656,8 @@ class SemanticScuttle_Service_User extends SemanticScuttle_DbService
@setcookie($this->getCookiekey(), '', time() - 1, '/');
unset($_COOKIE[$this->getCookiekey()]);
session_unset();
$this->getCurrentUser(true, false);
$this->currentuserId = null;
$this->currentuser = null;
}
/**

View File

@ -106,9 +106,21 @@ if ($user && $user != 'all') {
}
}
$pagetitle .= ": ". $user;
} else {
if ($privatekey != null) {
if ($userservice->loginPrivateKey($privatekey)) {
$isTempLogin = true;
} else {
$tplVars['error'] = sprintf(T_('Failed to Autenticate User with username %s using private key'), $user);
header('Content-type: text/html; charset=utf-8');
$templateservice->loadTemplate('error.404.tpl', $tplVars);
//throw a 404 error
exit();
}
} else {
$userid = null;
}
}
if ($cat) {
$pagetitle .= ": ". str_replace('+', ' + ', $cat);