File tree Expand file tree Collapse file tree 1 file changed +12
-12
lines changed
components/ILIAS/Logging/classes/public Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -126,31 +126,31 @@ public function initUser(string $a_login): void
126126 */
127127 protected function isConsoleAvailable (): bool
128128 {
129- if (ilContext::getType () != ilContext::CONTEXT_WEB ) {
129+ if (ilContext::getType () !== ilContext::CONTEXT_WEB ) {
130130 return false ;
131131 }
132- if (
133- $ this ->dic ->isDependencyAvailable ('ctrl ' ) && $ this ->dic ->ctrl ()->isAsynch () ||
132+
133+ if (( $ this ->dic ->isDependencyAvailable ('ctrl ' ) && $ this ->dic ->ctrl ()->isAsynch () ) ||
134134 (
135135 $ this ->dic ->isDependencyAvailable ('http ' ) &&
136- strtolower ($ this ->dic ->http ()->request ()->getServerParams ()['HTTP_X_REQUESTED_WITH ' ] ?? '' ) === 'xmlhttprequest '
136+ strtolower (
137+ $ this ->dic ->http ()->request ()->getServerParams ()['HTTP_X_REQUESTED_WITH ' ] ?? ''
138+ ) === 'xmlhttprequest '
137139 )
138140 ) {
139141 return false ;
140142 }
141143
142- if (
143- $ this ->dic ->isDependencyAvailable ('http ' ) &&
144- strpos ($ this ->dic ->http ()->request ()->getServerParams ()['HTTP_ACCEPT ' ], 'text/html ' ) !== false
145- ) {
144+ if ($ this ->dic ->isDependencyAvailable ('http ' ) &&
145+ str_contains ($ this ->dic ->http ()->request ()->getServerParams ()['HTTP_ACCEPT ' ] ?? '' , 'text/html ' )) {
146146 return true ;
147147 }
148- if (
149- $ this ->dic ->isDependencyAvailable ('http ' ) &&
150- strpos ($ this ->dic ->http ()->request ()->getServerParams ()['HTTP_ACCEPT ' ], 'application/json ' ) !== false
151- ) {
148+
149+ if ($ this ->dic ->isDependencyAvailable ('http ' ) &&
150+ str_contains ($ this ->dic ->http ()->request ()->getServerParams ()['HTTP_ACCEPT ' ] ?? '' , 'application/json ' )) {
152151 return false ;
153152 }
153+
154154 return true ;
155155 }
156156
You can’t perform that action at this time.
0 commit comments