diff options
author | Hamid Dehnavi <hamid.dev.pro@gmail.com> | 2023-07-07 04:54:20 +0330 |
---|---|---|
committer | Hamid Dehnavi <hamid.dev.pro@gmail.com> | 2023-07-07 04:54:20 +0330 |
commit | d0b20534b94d0295472ab22157a2bc4c2c9fb703 (patch) | |
tree | 11778f60be448d4a2eb9e0d66d2cd1a164898c01 /lib/private/URLGenerator.php | |
parent | 56402460121080cb0d63e4c4d4ec51e5b409fed2 (diff) | |
download | nextcloud-server-d0b20534b94d0295472ab22157a2bc4c2c9fb703.tar.gz nextcloud-server-d0b20534b94d0295472ab22157a2bc4c2c9fb703.zip |
Refactor "substr" calls to improve code readability
Signed-off-by: Hamid Dehnavi <hamid.dev.pro@gmail.com>
Diffstat (limited to 'lib/private/URLGenerator.php')
-rw-r--r-- | lib/private/URLGenerator.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/URLGenerator.php b/lib/private/URLGenerator.php index 3a52b99889c..57bafc3e18d 100644 --- a/lib/private/URLGenerator.php +++ b/lib/private/URLGenerator.php @@ -147,7 +147,7 @@ class URLGenerator implements IURLGenerator { $app_path = $this->getAppManager()->getAppPath($appName); // Check if the app is in the app folder if (file_exists($app_path . '/' . $file)) { - if (substr($file, -3) === 'php') { + if (str_ends_with($file, 'php')) { $urlLinkTo = \OC::$WEBROOT . '/index.php/apps/' . $appName; if ($frontControllerActive) { $urlLinkTo = \OC::$WEBROOT . '/apps/' . $appName; |