Final updates to rss.php with correct authentication and bookmark results
This commit is contained in:
parent
23cdbb53d0
commit
f18b8c0444
@ -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)';
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
12
www/rss.php
12
www/rss.php
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user