@@ -9,8 +9,7 @@ function comments(...$lot) {
99 }
1010 if (\class_exists ("\\Layout " ) && !\Layout::of ('comments ' )) {
1111 \Layout::set ('comments ' , static function ($ key , array $ lot = []) {
12- \extract ($ lot , \EXTR_SKIP );
13- \extract ($ GLOBALS , \EXTR_SKIP );
12+ \extract (\lot ($ lot ), \EXTR_SKIP );
1413 $ any = \P . \uniqid () . \P; // Dummy value
1514 $ c = \State::get ('x.comment ' , true );
1615 $ chunk = $ c ['page ' ]['chunk ' ] ?? null ;
@@ -104,7 +103,7 @@ function content($content) {
104103 if (!\class_exists ("\\Asset " )) {
105104 return $ content ;
106105 }
107- \extract ($ GLOBALS , \EXTR_SKIP );
106+ \extract (\lot () , \EXTR_SKIP );
108107 if (!$ state ->is ('page ' )) {
109108 return $ content ;
110109 }
@@ -122,7 +121,7 @@ function content($content) {
122121 // Set the comment state as quickly as possible, but as close as possible to the response body
123122 \Hook::set ('content ' , __NAMESPACE__ . "\\content " , -1 );
124123 function route__comment ($ content , $ path , $ query ) {
125- \extract ($ GLOBALS , \EXTR_SKIP );
124+ \extract (\lot () , \EXTR_SKIP );
126125 $ can_alert = \class_exists ("\\Alert " );
127126 $ path = \trim ($ path ?? "" , '/ ' );
128127 $ active = isset ($ state ->x ->user ) && \Is::user ();
@@ -291,7 +290,7 @@ function route__comment($content, $path, $query) {
291290 \kick ('/ ' . $ path . $ query . '#comment ' );
292291 }
293292 function route__page ($ content , $ path , $ query , $ hash ) {
294- \extract ($ GLOBALS , \EXTR_SKIP );
293+ \extract (\lot () , \EXTR_SKIP );
295294 $ path = \trim ($ path ?? $ state ->route ?? 'index ' , '/ ' );
296295 $ route = \trim ($ state ->x ->comment ->route ?? 'comment ' , '/ ' );
297296 // `/comment/article/lorem-ipsum`
0 commit comments