diff options
author | Robin Appelman <robin@icewind.nl> | 2023-06-01 23:10:00 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-01 23:10:00 +0200 |
commit | 9f1d497a0b4dbda86e676a3a55758bc2909cc781 (patch) | |
tree | 968db9431470d4d0e1ea7c80caed373fc9029120 /lib/private/Template | |
parent | e81fdfefab6d46b9d326b70c278d52fbb941a431 (diff) | |
parent | fa31c707c0a4c2a72141b8017e66561710185a06 (diff) | |
download | nextcloud-server-9f1d497a0b4dbda86e676a3a55758bc2909cc781.tar.gz nextcloud-server-9f1d497a0b4dbda86e676a3a55758bc2909cc781.zip |
Merge pull request #38261 from fsamapoor/replace_strpos_calls_in_lib_private
Refactors "strpos" calls in lib/private to improve code readability.
Diffstat (limited to 'lib/private/Template')
-rw-r--r-- | lib/private/Template/JSResourceLocator.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/Template/JSResourceLocator.php b/lib/private/Template/JSResourceLocator.php index a84ef8968b9..b283f0b610f 100644 --- a/lib/private/Template/JSResourceLocator.php +++ b/lib/private/Template/JSResourceLocator.php @@ -52,7 +52,7 @@ class JSResourceLocator extends ResourceLocator { $app = substr($script, 0, strpos($script, '/')); $scriptName = basename($script); - if (strpos($script, '/l10n/') !== false) { + if (str_contains($script, '/l10n/')) { // For language files we try to load them all, so themes can overwrite // single l10n strings without having to translate all of them. $found = 0; @@ -113,7 +113,7 @@ class JSResourceLocator extends ResourceLocator { } // missing translations files will be ignored - if (strpos($script, 'l10n/') === 0) { + if (str_starts_with($script, 'l10n/')) { return; } |