summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Pemberton <mpemberton5@gmail.com>2011-05-12 23:12:11 -0400
committerMark Pemberton <mpemberton5@gmail.com>2011-05-12 23:12:11 -0400
commitf18b8c04448bbcbf913349f8239d857a12b6410f (patch)
treefc2616fd9fa2802bbd33fbf32c31e873ba1d3d0d
parent23cdbb53d0ab881f3b1fc196ac17c477f5463386 (diff)
downloadSemanticScuttle-origin/privatekey.zip
SemanticScuttle-origin/privatekey.tar.gz
SemanticScuttle-origin/privatekey.tar.bz2
Final updates to rss.php with correct authentication and bookmark resultsorigin/privatekey
-rw-r--r--src/SemanticScuttle/Service/Bookmark.php2
-rw-r--r--src/SemanticScuttle/Service/User.php5
-rw-r--r--www/rss.php14
3 files changed, 17 insertions, 4 deletions
diff --git a/src/SemanticScuttle/Service/Bookmark.php b/src/SemanticScuttle/Service/Bookmark.php
index 93c3ce1..4c30683 100644
--- a/src/SemanticScuttle/Service/Bookmark.php
+++ b/src/SemanticScuttle/Service/Bookmark.php
@@ -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)';
diff --git a/src/SemanticScuttle/Service/User.php b/src/SemanticScuttle/Service/User.php
index 7541d02..cef72fd 100644
--- a/src/SemanticScuttle/Service/User.php
+++ b/src/SemanticScuttle/Service/User.php
@@ -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;
}
/**
diff --git a/www/rss.php b/www/rss.php
index ae32cbd..ee6fb4b 100644
--- a/www/rss.php
+++ b/www/rss.php
@@ -107,7 +107,19 @@ if ($user && $user != 'all') {
}
$pagetitle .= ": ". $user;
} 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) {