8$it =
new RecursiveIteratorIterator(
new RecursiveDirectoryIterator(
$modules, FilesystemIterator::SKIP_DOTS));
10 if (!
$file->isFile() || strtolower(
$file->getExtension()) !==
'htm') {
13 $html = (string)file_get_contents(
$file->getPathname());
14 if (!preg_match(
'/<form\b/i',
$html)) {
18 $hasBar = preg_match(
'/\[tpl=dbx\|(module-bar|form-shell-head|frame-head)\]/i',
$html)
19 || preg_match(
'/class="[^"]*(dbx-bar|dbx-auth-panel-head)[^"]*"/i',
$html);
25 $usesStandardBar = preg_match(
'/\[tpl=dbx\|(module-bar|form-shell-head|frame-head)\]/i',
$html);
26 $hasHelpSlot = strpos(
$html,
'{bar_extra}') !==
false
27 || strpos(
$html,
'{help_button}') !==
false
28 || strpos(
$html,
'{obj:help_button}') !==
false;
29 if (!$usesStandardBar && !$hasHelpSlot) {
30 $errors[] = str_replace(
'\\',
'/', substr(
$file->getPathname(), strlen(
$root) + 1));
35 fwrite(STDERR,
"Keine Formularleisten gefunden.\n");
39$formClass = (string)file_get_contents(
$root . DIRECTORY_SEPARATOR .
'include' . DIRECTORY_SEPARATOR .
'dbxForm.class.php');
40$reportClass = (string)file_get_contents(
$root . DIRECTORY_SEPARATOR .
'include' . DIRECTORY_SEPARATOR .
'dbxReport.class.php');
41$fallbackTemplate =
$modules . DIRECTORY_SEPARATOR .
'dbx' . DIRECTORY_SEPARATOR .
'tpl' . DIRECTORY_SEPARATOR .
'htm' . DIRECTORY_SEPARATOR .
'form-help-bar.htm';
42if (strpos(
$formClass,
'ensureFormHelpBar($content)') ===
false
43 || strpos(
$reportClass,
'ensureFormHelpBar($report_tpl)') ===
false
44 || strpos(
$formClass,
'set_form_help_enabled(bool $enabled = true)') ===
false
46 fwrite(STDERR,
"Zentrale Help-Leiste fuer dbxForm/dbxReport-Templates ohne eigenen Bar-Slot fehlt.\n");
50 fwrite(STDERR,
"Formularleisten ohne Help-Slot:\n - " . implode(
"\n - ",
$errors) .
"\n");
54$helpButtonTemplate = (string)file_get_contents(
$modules . DIRECTORY_SEPARATOR .
'dbxAdmin' . DIRECTORY_SEPARATOR .
'tpl' . DIRECTORY_SEPARATOR .
'htm' . DIRECTORY_SEPARATOR .
'admin-help-button.htm');
55$dbxappTheme = (string)file_get_contents(
$root . DIRECTORY_SEPARATOR .
'design' . DIRECTORY_SEPARATOR .
'dbxapp' . DIRECTORY_SEPARATOR .
'css' . DIRECTORY_SEPARATOR .
'theme.css');
56$flowersTheme = (string)file_get_contents(
$root . DIRECTORY_SEPARATOR .
'design' . DIRECTORY_SEPARATOR .
'flowers' . DIRECTORY_SEPARATOR .
'css' . DIRECTORY_SEPARATOR .
'theme.css');
57$flowersForm = (string)file_get_contents(
$root . DIRECTORY_SEPARATOR .
'design' . DIRECTORY_SEPARATOR .
'flowers' . DIRECTORY_SEPARATOR .
'css' . DIRECTORY_SEPARATOR .
'c-form.css');
58$shopChannelTemplate = (string)file_get_contents(
$modules . DIRECTORY_SEPARATOR .
'dbxShop_admin' . DIRECTORY_SEPARATOR .
'tpl' . DIRECTORY_SEPARATOR .
'htm' . DIRECTORY_SEPARATOR .
'shop-channel-form.htm');
59$dashboardClass = (string)file_get_contents(
$modules . DIRECTORY_SEPARATOR .
'dbxAdmin' . DIRECTORY_SEPARATOR .
'include' . DIRECTORY_SEPARATOR .
'dbxDashboard.class.php');
60$dashboardCacheActions = (string)file_get_contents(
$modules . DIRECTORY_SEPARATOR .
'dbxAdmin' . DIRECTORY_SEPARATOR .
'tpl' . DIRECTORY_SEPARATOR .
'htm' . DIRECTORY_SEPARATOR .
'admin-dashboard-content-cache-actions.htm');
61$contextHelpClass = (string)file_get_contents(
$modules . DIRECTORY_SEPARATOR .
'dbxContent' . DIRECTORY_SEPARATOR .
'include' . DIRECTORY_SEPARATOR .
'dbxContentContextHelp.class.php');
62$contentClass = (string)file_get_contents(
$modules . DIRECTORY_SEPARATOR .
'dbxContent' . DIRECTORY_SEPARATOR .
'include' . DIRECTORY_SEPARATOR .
'dbxContent_content.class.php');
66 || strpos(
$flowersForm,
'.dbx-auth-panel-actions') ===
false
68 || strpos(
$dashboardClass,
"add_rep('bar_extra', \$this->help_action('cache'))") ===
false
71 fwrite(STDERR,
"Help-Buttons sind nicht in allen Designs und Sonderleisten als letzte rechte Aktion abgesichert.\n");
77 || strpos(
$contentClass,
"\$renderOptions['template'] = \$forcedTemplate") ===
false) {
78 fwrite(STDERR,
"Kontext-Hilfe wird nicht mit dem medienfreien Hilfe-Template gerendert.\n");
82echo
"OK: {$checked} Formular-Templates mit Leiste besitzen einen zentralen oder eigenen Help-Slot.\n";