aboutsummaryrefslogtreecommitdiffstats
path: root/feed.php
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2005-08-08 20:52:19 +0000
committerplegall <plg@piwigo.org>2005-08-08 20:52:19 +0000
commit273884a65274e2688df1b2d3dc37103a46117772 (patch)
tree6d0756672c6b415c38abea4c8ea831cdeb3673fb /feed.php
parent8b97a8154ebb024c1c2610d82646e48b913721bc (diff)
- new : external authentication in another users table. Previous users table
is divided between users (common properties with any web application) and user_infos (phpwebgallery specific informations). External table and fields can be configured. - modification : profile.php is not reachable through administration anymore (not useful). - modification : in profile.php, current password is mandatory only if user tries to change his password. Username can't be changed. - deletion : of obsolete functions get_user_restrictions, update_user_restrictions, get_user_all_restrictions, is_user_allowed, update_user - modification : $user['forbidden_categories'] equals at least "-1" so that category_id NOT IN ($user['forbidden_categories']) can always be used. - modification : user_forbidden table becomes user_cache so that not only restriction informations can be stored in this table. git-svn-id: http://piwigo.org/svn/trunk@808 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--feed.php20
1 files changed, 11 insertions, 9 deletions
diff --git a/feed.php b/feed.php
index 40c833e02..32c492032 100644
--- a/feed.php
+++ b/feed.php
@@ -130,12 +130,12 @@ SELECT DISTINCT category_id
function new_users($start, $end)
{
$query = '
-SELECT id
- FROM '.USERS_TABLE.'
+SELECT user_id
+ FROM '.USER_INFOS_TABLE.'
WHERE registration_date > \''.$start.'\'
AND registration_date <= \''.$end.'\'
;';
- return array_from_query($query, 'id');
+ return array_from_query($query, 'user_id');
}
/**
@@ -268,15 +268,17 @@ if (isset($_GET['feed'])
and preg_match('/^[A-Za-z0-9]{50}$/', $_GET['feed']))
{
$query = '
-SELECT id, status, last_feed_check
- FROM '.USERS_TABLE.'
+SELECT user_id AS id,
+ status,
+ last_feed_check
+ FROM '.USER_INFOS_TABLE.'
WHERE feed_id = \''.$_GET['feed'].'\'
;';
$user = mysql_fetch_array(pwg_query($query));
}
else
{
- $user = array('id' => ANONYMOUS,
+ $user = array('id' => $conf['guest_id'],
'status' => 'guest');
}
@@ -300,7 +302,7 @@ $rss->link = 'http://phpwebgallery.net';
// | Feed creation |
// +-----------------------------------------------------------------------+
-if (ANONYMOUS != $user['id'])
+if ($conf['guest_id'] != $user['id'])
{
$news = news($user['last_feed_check'], $dbnow);
@@ -330,9 +332,9 @@ if (ANONYMOUS != $user['id'])
}
$query = '
-UPDATE '.USERS_TABLE.'
+UPDATE '.USER_INFOS_TABLE.'
SET last_feed_check = \''.$dbnow.'\'
- WHERE id = '.$user['id'].'
+ WHERE user_id = '.$user['id'].'
;';
pwg_query($query);
}