mirror of
https://github.com/OpenXE-org/OpenXE.git
synced 2024-12-25 14:10:28 +01:00
ticket system clean tags
This commit is contained in:
parent
63dbedc1a8
commit
1bf58aa8ba
@ -480,6 +480,22 @@ class Ticket {
|
|||||||
$input['warteschlange'] = explode(" ",$input['warteschlange'])[0]; // Just the label
|
$input['warteschlange'] = explode(" ",$input['warteschlange'])[0]; // Just the label
|
||||||
$input['zeit'] = date('Y-m-d H:i:s', time());
|
$input['zeit'] = date('Y-m-d H:i:s', time());
|
||||||
|
|
||||||
|
$tags = explode(',',$input['tags']);
|
||||||
|
// Replace multiple '!' and '?'
|
||||||
|
foreach ($tags as &$tag) {
|
||||||
|
$pos = strpos($tag, '?');
|
||||||
|
if ($pos !== false) {
|
||||||
|
$tag = substr($tag,0,$pos+1) . str_replace('?','',substr($tag,$pos+1));
|
||||||
|
}
|
||||||
|
$tag = preg_replace("/([?!])\\1+/", "$1", $tag);
|
||||||
|
}
|
||||||
|
$input['tags'] = implode(',',$tags);
|
||||||
|
|
||||||
|
$input['tags'] = str_replace(' ?','?',$input['tags']);
|
||||||
|
$input['tags'] = str_replace(' !','!',$input['tags']);
|
||||||
|
$input['tags'] = str_replace('?!','?',$input['tags']);
|
||||||
|
$input['tags'] = str_replace('!?','?',$input['tags']);
|
||||||
|
|
||||||
$columns = "id, ";
|
$columns = "id, ";
|
||||||
$values = "$id, ";
|
$values = "$id, ";
|
||||||
$update = "";
|
$update = "";
|
||||||
|
Loading…
Reference in New Issue
Block a user