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
|
// All public bookmarks, user's own bookmarks
|
||||||
// and any shared with user
|
// and any shared with user
|
||||||
$privacy = ' AND ((B.bStatus = 0) OR (B.uId = '. $sId .')';
|
$privacy = ' AND ((B.bStatus = 0) OR (B.uId = '. $sId .')';
|
||||||
$watchnames = $userservice->getWatchNames($sId, true);
|
$watchnames = $userservice->getWatchNames($sId);
|
||||||
foreach ($watchnames as $watchuser) {
|
foreach ($watchnames as $watchuser) {
|
||||||
$privacy .= ' OR (U.username = "'. $watchuser;
|
$privacy .= ' OR (U.username = "'. $watchuser;
|
||||||
$privacy .= '" AND B.bStatus = 1)';
|
$privacy .= '" AND B.bStatus = 1)';
|
||||||
|
@ -377,7 +377,7 @@ class SemanticScuttle_Service_User extends SemanticScuttle_DbService
|
|||||||
{
|
{
|
||||||
if (!is_null($newval)) {
|
if (!is_null($newval)) {
|
||||||
//internal use only: reset currentuser
|
//internal use only: reset currentuser
|
||||||
$currentuser = $newval;
|
$this->currentuser = $newval;
|
||||||
} else if ($refresh || !isset($this->currentuser)) {
|
} else if ($refresh || !isset($this->currentuser)) {
|
||||||
if ($id = $this->getCurrentUserId()) {
|
if ($id = $this->getCurrentUserId()) {
|
||||||
$this->currentuser = $this->getUser($id);
|
$this->currentuser = $this->getUser($id);
|
||||||
@ -656,7 +656,8 @@ class SemanticScuttle_Service_User extends SemanticScuttle_DbService
|
|||||||
@setcookie($this->getCookiekey(), '', time() - 1, '/');
|
@setcookie($this->getCookiekey(), '', time() - 1, '/');
|
||||||
unset($_COOKIE[$this->getCookiekey()]);
|
unset($_COOKIE[$this->getCookiekey()]);
|
||||||
session_unset();
|
session_unset();
|
||||||
$this->getCurrentUser(true, false);
|
$this->currentuserId = null;
|
||||||
|
$this->currentuser = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
14
www/rss.php
14
www/rss.php
@ -107,7 +107,19 @@ if ($user && $user != 'all') {
|
|||||||
}
|
}
|
||||||
$pagetitle .= ": ". $user;
|
$pagetitle .= ": ". $user;
|
||||||
} else {
|
} else {
|
||||||
$userid = null;
|
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) {
|
if ($cat) {
|
||||||
|
Loading…
Reference in New Issue
Block a user