@@ -28,9 +28,9 @@ class Listener
28
28
* @param AbstractReply $reply Reply object.
29
29
* @param AbstractRenderer $renderer Renderer object.
30
30
* @param Response $response HTTP Response object.
31
- *
32
- * @noinspection PhpUnusedParameterInspection
33
- */
31
+ *
32
+ * @noinspection PhpUnusedParameterInspection
33
+ */
34
34
public static function dispatcherPostRender (
35
35
Dispatcher $ dispatcher ,
36
36
?string &$ content ,
@@ -49,39 +49,39 @@ public static function dispatcherPostRender(
49
49
{
50
50
$ permissionErrors = $ templater ->getPermissionErrors ();
51
51
52
- if (count ($ permissionErrors ))
53
- {
54
- $ warningHtml = '<div class="blockMessage blockMessage--warning"><h2 style="margin: 0 0 .5em 0">Permission errors</h2><ul> ' ;
55
- foreach ($ permissionErrors AS $ permissionError )
56
- {
57
- $ warningHtml .= sprintf ('<li>%s (%s:%d)</li> ' ,
58
- htmlspecialchars ($ permissionError ['error ' ]),
59
- htmlspecialchars (FileUtil::stripRootPathPrefix ($ permissionError ['file ' ])),
60
- $ permissionError ['line ' ]
61
- );
62
- }
63
- $ warningHtml .= '</ul></div> ' ;
52
+ if (count ($ permissionErrors ))
53
+ {
54
+ $ warningHtml = '<div class="blockMessage blockMessage--warning"><h2 style="margin: 0 0 .5em 0">Permission errors</h2><ul> ' ;
55
+ foreach ($ permissionErrors AS $ permissionError )
56
+ {
57
+ $ warningHtml .= sprintf ('<li>%s (%s:%d)</li> ' ,
58
+ htmlspecialchars ($ permissionError ['error ' ]),
59
+ htmlspecialchars (FileUtil::stripRootPathPrefix ($ permissionError ['file ' ])),
60
+ $ permissionError ['line ' ]
61
+ );
62
+ }
63
+ $ warningHtml .= '</ul></div> ' ;
64
64
65
- if (strpos ($ content , '<!--XF:EXTRA_OUTPUT--> ' ) !== false )
66
- {
67
- $ content = str_replace ('<!--XF:EXTRA_OUTPUT--> ' , $ warningHtml . '<!--XF:EXTRA_OUTPUT--> ' , $ content );
68
- }
69
- else
70
- {
71
- $ content = preg_replace ('#<body[^>]*>#i ' , "\\0 $ warningHtml " , $ content );
72
- }
73
- }
74
- }
75
- }
65
+ if (strpos ($ content , '<!--XF:EXTRA_OUTPUT--> ' ) !== false )
66
+ {
67
+ $ content = str_replace ('<!--XF:EXTRA_OUTPUT--> ' , $ warningHtml . '<!--XF:EXTRA_OUTPUT--> ' , $ content );
68
+ }
69
+ else
70
+ {
71
+ $ content = preg_replace ('#<body[^>]*>#i ' , "\\0 $ warningHtml " , $ content );
72
+ }
73
+ }
74
+ }
75
+ }
76
76
77
77
78
78
/**
79
79
* Called after the global \XF\App object has been setup. This will fire regardless of
80
80
* the application type.
81
81
*
82
82
* @param BaseApp $app Global App object.
83
- *
84
- * @noinspection PhpUnusedParameterInspection
83
+ *
84
+ * @noinspection PhpUnusedParameterInspection
85
85
*/
86
86
public static function appSetup (BaseApp $ app ): void
87
87
{
0 commit comments