mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-08-09 02:03:18 +02:00
Resolved issue 0000697: with generic user a author name is necessary to comment picture.
+ Change way to determinate if user is a guest (use functions like is_admin) git-svn-id: http://piwigo.org/svn/trunk@2029 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -702,8 +702,8 @@ SELECT id, date, author, content
|
||||
|
||||
$comment_post_data = null;
|
||||
if ($is_commentable and
|
||||
(!$user['is_the_guest']
|
||||
or ($user['is_the_guest'] and $conf['comments_forall'] )
|
||||
(!is_a_guest()
|
||||
or (is_a_guest() and $conf['comments_forall'] )
|
||||
)
|
||||
)
|
||||
{
|
||||
@@ -884,7 +884,7 @@ function ws_session_login($params, &$service)
|
||||
function ws_session_logout($params, &$service)
|
||||
{
|
||||
global $user, $conf;
|
||||
if (!$user['is_the_guest'])
|
||||
if (!is_a_guest())
|
||||
{
|
||||
$_SESSION = array();
|
||||
session_unset();
|
||||
@@ -902,7 +902,7 @@ function ws_session_getStatus($params, &$service)
|
||||
{
|
||||
global $user, $lang_info;
|
||||
$res = array();
|
||||
$res['username'] = $user['is_the_guest'] ? 'guest' : $user['username'];
|
||||
$res['username'] = is_a_guest() ? 'guest' : $user['username'];
|
||||
foreach ( array('status', 'template', 'theme', 'language') as $k )
|
||||
{
|
||||
$res[$k] = $user[$k];
|
||||
|
||||
Reference in New Issue
Block a user