Refactor contact management functions and remove phpinfo.php

- Updated formatting and structure of functions in edit_contact.inc.php for better readability and consistency.
- Added comments to clarify the purpose of certain code sections, especially regarding mandant handling.
- Removed the deprecated phpinfo.php file to clean up the codebase.
This commit is contained in:
2026-05-11 08:54:44 +02:00
parent 8749bc7994
commit 52ca9249c3
64 changed files with 13445 additions and 3562 deletions

View File

@@ -51,7 +51,8 @@ function count_knowledgecenter(){
$opened = 0;
$closed = 0;
$read = 0;
$query = "SELECT DISTINCT main_collection.* FROM main_collection LEFT JOIN knowledgecenter_collection_link ON main_collection.id = knowledgecenter_collection_link.main_collection_id LEFT JOIN main_collection_mandant_link ON main_collection.id = main_collection_mandant_link.main_collection_id WHERE ((main_collection_mandant_link.main_collection_id IS NOT NULL AND main_mandant_id = ".$GLOBALS['main_contact']['current_mandant_id'].") OR main_collection_mandant_link.main_collection_id IS NULL) AND main_collection_setup_id = 3;";
$count = 0;
$query = "SELECT DISTINCT main_collection.* FROM main_collection LEFT JOIN knowledgecenter_collection_link ON main_collection.id = knowledgecenter_collection_link.main_collection_id LEFT JOIN main_collection_mandant_link ON main_collection.id = main_collection_mandant_link.main_collection_id WHERE ((main_collection_mandant_link.main_collection_id IS NOT NULL AND main_mandant_id = ".$GLOBALS['main_contact']['current_mandant_id'].") OR main_collection_mandant_link.main_collection_id IS NULL) AND main_collection_setup_id = 3 AND (main_collection.is_archived = 0 OR main_collection.is_archived IS NULL);";
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
while($posts = @mysqli_fetch_array($result)) {
$query2 = "SELECT * FROM main_collection_read WHERE main_collection_id = ".$posts['id']. " AND main_contact_id = ".$GLOBALS['main_contact']['id'];