summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
authorMark Pemberton <mpemberton5@gmail.com>2011-06-04 00:29:04 -0400
committerMark Pemberton <mpemberton5@gmail.com>2011-06-04 00:29:04 -0400
commit84e603aa91a303a1419962ff3ff6086710a7b1a9 (patch)
tree5d706948d6b28ed8323ebf1c864726c2d7d4eccf /www
parent342d1c3205c2f2ae9d918f66e28e8ffa153c2854 (diff)
downloadsemanticscuttle-84e603aa91a303a1419962ff3ff6086710a7b1a9.tar.gz
semanticscuttle-84e603aa91a303a1419962ff3ff6086710a7b1a9.tar.bz2
Reverted changes of date() to gdate(), added tests to confirm existence of private RSS feed, and finalized changes to the user session usage with rss.php
Diffstat (limited to 'www')
-rw-r--r--www/ajaxGetNewPrivateKey.php31
-rw-r--r--www/index.php2
-rw-r--r--www/jsScuttle.php8
-rw-r--r--www/rss.php14
4 files changed, 23 insertions, 32 deletions
diff --git a/www/ajaxGetNewPrivateKey.php b/www/ajaxGetNewPrivateKey.php
index 59545a2..eacebd8 100644
--- a/www/ajaxGetNewPrivateKey.php
+++ b/www/ajaxGetNewPrivateKey.php
@@ -1,23 +1,16 @@
<?php
-/***************************************************************************
- Copyright (C) 2005 - 2006 Scuttle project
- http://sourceforge.net/projects/scuttle/
- http://scuttle.org/
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- ***************************************************************************/
+/**
+ * Ajax script to retrieve new Private Key
+ *
+ * PHP version 5.
+ *
+ * @category Bookmarking
+ * @package SemanticScuttle
+ * @author Christian Weiske <cweiske@cweiske.de>
+ * @author Mark Pemberton <mpemberton5@gmail.com>
+ * @license AGPL http://www.gnu.org/licenses/agpl.html
+ * @link http://sourceforge.net/projects/semanticscuttle
+ */
header("Last-Modified: ". gmdate("D, d M Y H:i:s") ." GMT");
header("Cache-Control: no-cache, must-revalidate");
diff --git a/www/index.php b/www/index.php
index 931d64d..fab235f 100644
--- a/www/index.php
+++ b/www/index.php
@@ -51,7 +51,7 @@ if ($userservice->isLoggedOn()) {
array_push(
$tplVars['rsschannels'],
array(
- filter($sitename . sprintf(T_(': (private) ')) . $currentUsername),
+ filter($sitename . sprintf(T_(': Recent bookmarks (private)')) . $currentUsername),
createURL('rss', filter($currentUsername, 'url') . '?sort='.getSortOrder().'&amp;privatekey='.$currentUser->getPrivateKey())
)
);
diff --git a/www/jsScuttle.php b/www/jsScuttle.php
index 76b49dc..3ca41ec 100644
--- a/www/jsScuttle.php
+++ b/www/jsScuttle.php
@@ -89,6 +89,14 @@ function useAddress(ele) {
}
}
+/**
+ * Makes an ajax call to PHP script to generate an new Private Key
+ *
+ * @param input Calling object
+ * @param response Response object that returned value is placed
+ *
+ * @return boolean Returns false to halt execution after call
+ */
function getNewPrivateKey(input, response){
var pk = document.getElementById('pPrivateKey');
if (response != null) {
diff --git a/www/rss.php b/www/rss.php
index 8c81e0e..2927534 100644
--- a/www/rss.php
+++ b/www/rss.php
@@ -71,7 +71,6 @@ if (isset($_GET['privatekey'])) {
$watchlist = null;
$pagetitle = '';
-$isTempLogin = false;
if ($user && $user != 'all') {
if ($user == 'watchlist') {
$user = $cat;
@@ -86,9 +85,7 @@ if ($user && $user != 'all') {
/* if user is not logged in and has valid privatekey */
if (!$userservice->isLoggedOn()) {
if ($privatekey != null) {
- if ($userservice->loginPrivateKey($privatekey)) {
- $isTempLogin = true;
- } else {
+ if (!$userservice->loginPrivateKey($privatekey)) {
$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);
@@ -109,9 +106,7 @@ if ($user && $user != 'all') {
$pagetitle .= ": ". $user;
} else {
if ($privatekey != null) {
- if ($userservice->loginPrivateKey($privatekey)) {
- $isTempLogin = true;
- } else {
+ if (!$userservice->loginPrivateKey($privatekey)) {
$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);
@@ -168,11 +163,6 @@ $tplVars['feedlastupdate'] = date('r', strtotime($latestdate));
$templateservice->loadTemplate('rss.tpl', $tplVars);
-/* If temporary login, please log out */
-if ($isTempLogin) {
- $userservice->logout();
-}
-
if ($usecache) {
// Cache output if existing copy has expired
$cacheservice->End($hash);