[Web] domain/mailbox tagging check for empty tags

This commit is contained in:
FreddleSpl0it 2022-05-06 07:42:45 +02:00
parent 5613134fed
commit f40e682800
No known key found for this signature in database
GPG Key ID: F1B3BE8A3BBA3451

View File

@ -568,6 +568,7 @@ function mailbox($_action, $_type, $_data = null, $_extra = null) {
)); ));
// save tags // save tags
foreach($tags as $index => $tag){ foreach($tags as $index => $tag){
if (empty($tag)) continue;
if ($index > $GLOBALS['TAGGING_LIMIT']) { if ($index > $GLOBALS['TAGGING_LIMIT']) {
$_SESSION['return'][] = array( $_SESSION['return'][] = array(
'type' => 'warning', 'type' => 'warning',
@ -1124,6 +1125,7 @@ function mailbox($_action, $_type, $_data = null, $_extra = null) {
)); ));
// save tags // save tags
foreach($tags as $index => $tag){ foreach($tags as $index => $tag){
if (empty($tag)) continue;
if ($index > $GLOBALS['TAGGING_LIMIT']) { if ($index > $GLOBALS['TAGGING_LIMIT']) {
$_SESSION['return'][] = array( $_SESSION['return'][] = array(
'type' => 'warning', 'type' => 'warning',
@ -2201,8 +2203,9 @@ function mailbox($_action, $_type, $_data = null, $_extra = null) {
':gal' => $gal, ':gal' => $gal,
':domain' => $domain ':domain' => $domain
)); ));
// save tags, tag_name is unique // save tags
foreach($tags as $index => $tag){ foreach($tags as $index => $tag){
if (empty($tag)) continue;
if ($index > $GLOBALS['TAGGING_LIMIT']) { if ($index > $GLOBALS['TAGGING_LIMIT']) {
$_SESSION['return'][] = array( $_SESSION['return'][] = array(
'type' => 'warning', 'type' => 'warning',
@ -2368,8 +2371,9 @@ function mailbox($_action, $_type, $_data = null, $_extra = null) {
':description' => $description, ':description' => $description,
':domain' => $domain ':domain' => $domain
)); ));
// save tags, tag_name is unique // save tags
foreach($tags as $index => $tag){ foreach($tags as $index => $tag){
if (empty($tag)) continue;
if ($index > $GLOBALS['TAGGING_LIMIT']) { if ($index > $GLOBALS['TAGGING_LIMIT']) {
$_SESSION['return'][] = array( $_SESSION['return'][] = array(
'type' => 'warning', 'type' => 'warning',
@ -2712,6 +2716,7 @@ function mailbox($_action, $_type, $_data = null, $_extra = null) {
)); ));
// save tags // save tags
foreach($tags as $index => $tag){ foreach($tags as $index => $tag){
if (empty($tag)) continue;
if ($index > $GLOBALS['TAGGING_LIMIT']) { if ($index > $GLOBALS['TAGGING_LIMIT']) {
$_SESSION['return'][] = array( $_SESSION['return'][] = array(
'type' => 'warning', 'type' => 'warning',