Merge branch 'ent-3696-7723-No-inserta-comentario-create_event-API' into 'develop'
disable cache for events_comment See merge request artica/pandorafms!2257 Former-commit-id: 1293d55a9bc009b79e37dd54cd848544ae6c3286
This commit is contained in:
commit
046a126889
|
@ -701,19 +701,20 @@ function events_comment(
|
|||
$first_event = reset($id_event);
|
||||
}
|
||||
|
||||
$event_comments = db_get_value(
|
||||
'user_comment',
|
||||
$event_table,
|
||||
'id_evento',
|
||||
$first_event
|
||||
$event_comments = mysql_db_process_sql(
|
||||
'SELECT user_comment FROM '.$event_table.' WHERE id_evento = '.$first_event,
|
||||
'affected_rows',
|
||||
'',
|
||||
false
|
||||
);
|
||||
|
||||
$event_comments_array = [];
|
||||
|
||||
if ($event_comments == '') {
|
||||
if ($event_comments[0]['user_comment'] == '') {
|
||||
$comments_format = 'new';
|
||||
} else {
|
||||
// If comments are not stored in json, the format is old.
|
||||
$event_comments_array = json_decode($event_comments);
|
||||
$event_comments_array = json_decode($event_comments[0]['user_comment']);
|
||||
|
||||
if (empty($event_comments_array)) {
|
||||
$comments_format = 'old';
|
||||
|
|
Loading…
Reference in New Issue