1. YoureCom
    1. Über mich
  2. Lösungen
    1. Tipprunde
    2. Aufgaben & Support
    3. Mitglieder-Netzwerk
    4. Online-Shop
    5. Alle Lösungen & Preise
  3. Für Admins
    1. Plugins
    2. ByteMon
    3. ByteMon: Community verwalten
    4. ByteMon: Portalidentität
    5. Individuelle Entwicklung
    6. WSC 6.3 Alpha
    7. GitHub
  4. Neuigkeiten
    1. Kurzmeldungen
  5. Support
  6. Mein Konto
  7. Lösungen testen
  • Anmelden
  • Registrieren
  • Warenkorb 0
  • Suche
Alles
  • Alles
  • Artikel
  • Seiten
  • Aufgaben
  • Produkte
  • Pulse-Beiträge
  • Erweiterte Suche
  1. YoureCom – Software für Vereine, Teams & Communities
  2. Repository-Liste
  3. de.yourecom.wcf.api.mpdf

YoureCom Standard automatisch aktualisiert (verwaltete Dateien aus _dev/standard)

  • Marcel Beckers
  • +81 Hinzufügungen
  • 81 Gesamt
  • 1 Dateien
  • 15. Oktober 2026 um 13:19
  • tests/lint/check-php.php
    <pre>@@ -8,6 +8,8 @@
    * - `StringUtil::trim()` instead of the native `trim()` (it also removes Unicode whitespace); `trim()` with an own
    * character list stays allowed
    * - classes, interfaces, traits and enums have a docblock with a description, `@author` and `@license`
    + * - notifications (`files/lib/system/user/notification/`) link to an ACP controller of the package only with
    + * `'isACP' => true`; without it LinkHandler takes the frontend in the frontend and in cronjobs (the link leads nowhere)
    *
    * Methods (`#[\Override]` or a docblock) and strict comparisons are checked by PHPStan (phpstan.standard.neon).
    *
    @@ -20,6 +22,7 @@
    $errors = [];
    $count = 0;
    +$acpControllers = acpControllers();
    foreach (files(['files', 'files_wcf'], ['.php']) as $relative => $path) {
    $source = (string)\file_get_contents($path);
    @@ -37,6 +40,12 @@
    }
    }
    + if (\str_starts_with($relative, 'files/lib/system/user/notification/')) {
    + foreach (acpLinksWithoutIsAcp($source, $acpControllers) as [$line, $controller]) {
    + $errors[] = "{$relative}:{$line}: getLink('{$controller}') links to an ACP controller without 'isACP' => true (e-mails also 'isEmail' => true)";
    + }
    + }
    +
    $tokens = \token_get_all($source);
    foreach ($tokens as $index => $token) {
    if (!\is_array($token)) {
    @@ -85,6 +94,78 @@
    finish($errors, "{$count} files");
    +/**
    + * Returns the controller names of the ACP pages, forms and actions of the package (`FooForm` => `Foo`).
    + *
    + * @return list<string>
    + */
    +function acpControllers(): array
    +{
    + $controllers = [];
    + foreach (files(['files/lib/acp/page', 'files/lib/acp/form', 'files/lib/acp/action'], ['.class.php']) as $relative => $path) {
    + $controllers[] = (string)\preg_replace('~(Page|Form|Action)$~', '', \basename($relative, '.class.php'));
    + }
    +
    + return \array_values(\array_unique($controllers));
    +}
    +
    +/**
    + * Returns the `->getLink()` calls on an ACP controller of the package whose arguments do not set `isACP` to true.
    + *
    + * @param list<string> $acpControllers
    + * @return list<array{0: int, 1: string}> line and controller
    + */
    +function acpLinksWithoutIsAcp(string $source, array $acpControllers): array
    +{
    + $tokens = \token_get_all($source);
    + $found = [];
    + foreach ($tokens as $index => $token) {
    + if (!\is_array($token) || $token[0] !== \T_STRING || \strtolower($token[1]) !== 'getlink') {
    + continue;
    + }
    + $previous = nextToken($tokens, $index, -1);
    + $next = nextToken($tokens, $index, 1);
    + if ($previous === null || !\is_array($tokens[$previous]) || !\in_array($tokens[$previous][0], [\T_OBJECT_OPERATOR, \T_NULLSAFE_OBJECT_OPERATOR], true)) {
    + continue;
    + }
    + if ($next === null || $tokens[$next] !== '(') {
    + continue;
    + }
    + $first = nextToken($tokens, $next, 1);
    + if ($first === null || !\is_array($tokens[$first]) || $tokens[$first][0] !== \T_CONSTANT_ENCAPSED_STRING) {
    + continue;
    + }
    + $controller = \substr($tokens[$first][1], 1, -1);
    + if (!\in_array($controller, $acpControllers, true)) {
    + continue;
    + }
    +
    + // the source of the arguments up to the matching parenthesis, without whitespace and comments
    + $depth = 0;
    + $arguments = '';
    + for ($i = $next, $count = \count($tokens); $i < $count; $i++) {
    + if (\is_array($tokens[$i]) && \in_array($tokens[$i][0], [\T_WHITESPACE, \T_COMMENT, \T_DOC_COMMENT], true)) {
    + continue;
    + }
    + $text = \is_array($tokens[$i]) ? $tokens[$i][1] : $tokens[$i];
    + if ($text === '(' || $text === '[') {
    + $depth++;
    + } elseif ($text === ')' || $text === ']') {
    + $depth--;
    + }
    + $arguments .= $text;
    + if ($depth === 0) {
    + break;
    + }
    + }
    + if (!\preg_match('~[\'"]isACP[\'"]=>true~i', $arguments)) {
    + $found[] = [$token[2], $controller];
    + }
    + }
    +
    + return $found;
    +}
    +
    /**
    * Returns the number of arguments of a call, given the source of its parenthesized argument list.
    */
Es wurden keine Einträge gefunden.

Bereit, deine Community smarter zu machen?

Ob fertiges Produkt oder individuelle Softwarelösung – überzeuge dich selbst.

Jetzt kaufen Demo testen

Direkter Support vom Entwickler

Zuletzt erledigte Aufgaben

  1. Multihunter meldet jede Anmeldung als Doppelaccount Multihunter (Doppelaccount Jäger) Multihunter: Forum Benachrichtigungen

    villain Erledigt am 27. Oktober 2026 um 20:09
  2. Multihunter meldet jede Anmeldung als Doppelaccount Multihunter (Doppelaccount Jäger)

    villain Erledigt am 26. Oktober 2026 um 14:41
  3. Optionen vom "Dateien Feld-Typ" sprechen von Bildern Database: Medienfelder

    doerek Erledigt am 25. Oktober 2026 um 18:20
  4. Nach Installation ohne Popup Begriffserklärung

    mbbaureihen.de Erledigt am 24. Oktober 2026 um 23:33
  5. Fehlermeldung beim Hinzufügen einer neuen Clanseite Clan Verwaltung

    BMWTom Erledigt am 24. Oktober 2026 um 23:16
  6. neue Dateiendungen werden nicht übernommen. Database: Medienfelder

    doerek Erledigt am 24. Oktober 2026 um 19:46
Arbeitsplatz
YoureCom – Software für Vereine, Teams & Communities

YoureCom – Software für Vereine, Teams & Communities. Seit 2004.

Fertig eingerichtete Lösungen für Verein, Team und Community, dazu Erweiterungen für die WoltLab Suite. Aus Wuppertal, für Kunden weltweit.

Lösungen

  • Tipprunde
  • Aufgaben & Support
  • Mitglieder-Netzwerk
  • Online-Shop
  • Alle Lösungen & Preise

Für Administratoren

  • Plugins
  • Clan Verwaltung
  • Wettbewerbe
  • MultiHunter
  • ByteMon
  • Individuelle Entwicklung

YoureCom

  • Über mich
  • Shop
  • Kontakt
  • Neuigkeiten
  • GitHub

Cloud-Verträge

  • AGB Cloud
  • AVV Cloud
  • Rechtswidrige Inhalte melden
  • Datenwechsel

Rechtliches

  • Datenschutzerklärung
  • Impressum
  • AGB
  • Vertrag widerrufen
  • Abonnements kündigen
  • Widerrufsbelehrung
© 2026 YoureCom · Marcel Beckers