löschung/deaktiverung

This commit is contained in:
2026-02-01 02:11:28 +01:00
parent adcd0efe2a
commit f5d2194839
3 changed files with 7 additions and 19 deletions

View File

@@ -2242,28 +2242,14 @@ class ApiKernel
if ($hasHtmlAttrs) return true;
if (preg_match($jsonTypePattern, $html) && preg_match($jsonIdPattern, $html)) return true;
$kindPattern = '/data-lib-(?:kind|section)\s*=\s*(["\"])([^"\']+)\1/i';
$libIdPattern = '/data-lib-id\s*=\s*(["\"])' . $id . '\1/i';
if (preg_match($libIdPattern, $html)) {
if (!$libKinds) return true;
if (preg_match($kindPattern, $html, $m)) {
$kind = strtolower(trim((string)($m[2] ?? '')));
if ($kind === '' || in_array($kind, $libKinds, true)) return true;
} else {
return true;
}
return true;
}
$jsonLibIdPattern = '/"data-lib-id"\s*:\s*("?)(?:' . $id . ')\1/i';
$jsonLibKindPattern = '/"data-lib-(?:kind|section)"\s*:\s*"([^"]+)"/i';
if (preg_match($jsonLibIdPattern, $html)) {
if (!$libKinds) return true;
if (preg_match($jsonLibKindPattern, $html, $m)) {
$kind = strtolower(trim((string)($m[1] ?? '')));
if ($kind === '' || in_array($kind, $libKinds, true)) return true;
} else {
return true;
}
return true;
}
return false;