[SOLVED] - BUG - Messages with talk are not shared with user in talk if public talk are disabled

More
17 Apr 2014 14:58 #3126 by cpvt
If You disable the public talk for some or all users when you send a talk to user inside a message (email) the recipients can't open the message (autorization denied).

SOLUTION:

In modules/Messages/Messages.php around line 1657 find something like:

if ($user->column_fields == '1') {
$query .= "(visibility_comm = ? AND {$this->entity_table}.smownerid <> ?) OR";
}
$query .= "(visibility_comm = ? AND COALESCE({$table_prefix}_modcomments_users.user,0) = ?))";
$params = array('Messages','All',$user->id,'Users',$user->id);

replace with:

$params[]=array('Messages');
if ($user->column_fields == '1') {
$query .= "(visibility_comm = ? AND {$this->entity_table}.smownerid <> ?) OR";
$params[]=array('All',$user->id);
}
$query .= "(visibility_comm = ? AND COALESCE({$table_prefix}_modcomments_users.user,0) = ?))";
$params[] = array('Users',$user->id);
The following user(s) said Thank You: dende

Please Log in to join the conversation.

More
23 May 2014 09:44 #3141 by dende
Thank you !

I've reported this thread to our technical dept.

Bye

Please Log in to join the conversation.

More
26 May 2014 16:37 #3146 by mapokid
There are some errors in the solution. Here the correct solution:

$params[] = 'Messages';
if ($user->column_fields == '1') {
$query .= "(visibility_comm = ? AND {$this->entity_table}.smownerid <> ?) OR";
array_push($params, 'All', $user->id);
}
$query .= "(visibility_comm = ? AND COALESCE({$table_prefix}_modcomments_users.user,0) = ?))";
array_push($params, 'Users', $user->id);

Please Log in to join the conversation.

More
27 May 2014 13:44 #3147 by cpvt
Thank you for the answer.

With php 5.3 on ubuntu 12.04 64 bit I don't get any error, not even a warning by php debugger. I think could be a different syntax for the same thing?

cp

Please Log in to join the conversation.

More
09 Jun 2014 08:51 #3155 by dende
mmm no, your solution was worng because you put an array into an array.
We puts string values into it.

Regards

Please Log in to join the conversation.

Time to create page: 0.158 seconds