Files
html/api/ambre-grep-diag.php
Opus Wire 0d49e735ca
Some checks failed
WEVAL NonReg / nonreg (push) Has been cancelled
fix(wtp-udock-public-doctrine): URGENT remove dock from 38 public pages
DOCTRINE CRITIQUE: WTP_UDOCK_V1 jamais sur pages publiques (vitrine weval-consulting.com)
User signaled dock visible on homepage (index.html) - violation doctrine

Fix:
- 38 pages publiques nettoyees (regex multi-pattern + GOLD backup chacune)
  * Homepage: index.html
  * Landings: landing-industrie, landing-ocp, landing-banque, landing-retail
  * SEO FR: consulting-*, crm-pharma, cyber, digitalisation, erp-pme, finance,
    formation, marketing, offshore, recrutement, transformation, achats, bpm, cloud
  * Corporate: contact, solutions, pricing, cgu, case-studies, use-cases,
    pitch, register, booking, apps, living-proof, faq-techniques/knowledge-base,
    ecosysteme-ia-maroc, candidates-pool, wepredict, ia-france-consulting

- Script Python sudo avec chattr mgmt + regex 3 patterns
- 38 GOLD backups /opt/wevads/vault/gold_*_REMOVEDOCK_*.html
- Syntax OK partout

Endpoint /api/wtp-udock-coverage.php:
- Added $PUBLIC_EXEMPT array (38 pages)
- Skip public pages from count (same pattern que SEO_EXEMPT)
- Coverage now reports pages INTERNES uniquement: 276/276 = 100 pct

Doctrine documentee: WTP_UDOCK uniquement pour outils internes
(admin, WEVIA Master, Orch, WTP platform, dashboards, monitors).
Pages user-facing externes (SEO, vitrine, landings) = JAMAIS de dock.

Zero regression · Zero ecrasement · GOLD backup integral
2026-04-21 14:33:41 +02:00

18 lines
659 B
PHP

<?php
header("Content-Type: application/json");
$hits = [];
$pattern = "scan_file_smart";
foreach (glob("/var/www/html/api/*.php") as $f) {
$c = @file_get_contents($f);
if ($c && strpos($c, $pattern) !== false) {
$count = substr_count($c, $pattern);
// Get line numbers
$lines = [];
foreach (explode("\n", $c) as $i => $line) {
if (strpos($line, $pattern) !== false) $lines[] = $i+1;
}
$hits[] = ["file"=>basename($f), "count"=>$count, "lines"=>$lines];
}
}
echo json_encode(["ok"=>true, "hits"=>$hits, "total_files_scanned"=>count(glob("/var/www/html/api/*.php"))], JSON_PRETTY_PRINT);