#11090 Fix the count that gave an error when there are no tags and the sql error when putting offset-20 when there are no tag

This commit is contained in:
miguel angel rasteu 2023-05-03 13:24:11 +02:00
parent 5983333965
commit 6813eb9d11
2 changed files with 5 additions and 3 deletions

View File

@ -212,7 +212,8 @@ $filter['limit'] = (int) $config['block_size'];
// Statements for pagination.
$url = 'index.php?sec=gusuarios&sec2=godmode/tag/tag';
$total_tags = tags_get_tag_count($filter);
$offset_delete = ($offset >= ($total_tags - 1)) ? ($offset - $config['block_size']) : $offset;
$offset_delete = ($offset >= $total_tags ) ? ($offset - $config['block_size']) : 0;
$result = tags_search_tag(false, $filter);
// Filter form.

View File

@ -2149,8 +2149,9 @@ function get_group_alerts(
break;
}
// WHEN SELECT ALL TAGS TO FILTER ALERTS
$modules_tags = count(db_process_sql('select * from ttag'));
// WHEN SELECT ALL TAGS TO FILTER ALERTS.
$modules_tag_query = db_process_sql('select * from ttag');
$modules_tags = ($modules_tag_query !== false) ? (count($modules_tag_query)) : false;
$modules_user_tags = count(explode(',', $tag));