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

Di più
17/04/2014 14:58 #3126 da 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);
Ringraziano per il messaggio: dende

Si prega Accedi a partecipare alla conversazione.

Di più
23/05/2014 09:44 #3141 da dende
Thank you !

I've reported this thread to our technical dept.

Bye

Si prega Accedi a partecipare alla conversazione.

Di più
26/05/2014 16:37 #3146 da 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);

Si prega Accedi a partecipare alla conversazione.

Di più
27/05/2014 13:44 #3147 da 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

Si prega Accedi a partecipare alla conversazione.

Di più
09/06/2014 08:51 #3155 da dende
mmm no, your solution was worng because you put an array into an array.
We puts string values into it.

Regards

Si prega Accedi a partecipare alla conversazione.

Tempo creazione pagina: 0.170 secondi