remove nested dirname and use level parameter for better readability (#1025)

This commit is contained in:
Dennis Dudek
2022-04-13 10:14:03 +02:00
committed by GitHub
parent 3fbf23cb47
commit 7a13e4a421
7 changed files with 19 additions and 19 deletions

View File

@@ -17,7 +17,7 @@ use Froxlor\Cron\Http\Php\PhpInterface;
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Cron
*
*
*/
class LighttpdFcgi extends Lighttpd
{
@@ -95,7 +95,7 @@ class LighttpdFcgi extends Lighttpd
public function createOwnVhostStarter()
{
if (Settings::Get('phpfpm.enabled') == '1' && Settings::Get('phpfpm.enabled_ownvhost') == '1') {
$mypath = \Froxlor\FileDir::makeCorrectDir(dirname(dirname(dirname(__FILE__)))); // /var/www/froxlor, needed for chown
$mypath = \Froxlor\FileDir::makeCorrectDir(dirname(__FILE__, 3)); // /var/www/froxlor, needed for chown
$user = Settings::Get('phpfpm.vhost_httpuser');
$group = Settings::Get('phpfpm.vhost_httpgroup');

View File

@@ -17,7 +17,7 @@ use Froxlor\Cron\Http\Php\PhpInterface;
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Cron
*
*
*/
class NginxFcgi extends Nginx
{
@@ -64,7 +64,7 @@ class NginxFcgi extends Nginx
public function createOwnVhostStarter()
{
if (Settings::Get('phpfpm.enabled') == '1' && Settings::Get('phpfpm.enabled_ownvhost') == '1') {
$mypath = \Froxlor\FileDir::makeCorrectDir(dirname(dirname(dirname(__FILE__)))); // /var/www/froxlor, needed for chown
$mypath = \Froxlor\FileDir::makeCorrectDir(dirname(__FILE__, 3)); // /var/www/froxlor, needed for chown
$user = Settings::Get('phpfpm.vhost_httpuser');
$group = Settings::Get('phpfpm.vhost_httpgroup');

View File

@@ -23,7 +23,7 @@ final class Froxlor
*/
public static function getInstallDir()
{
return dirname(dirname(__DIR__)) . '/';
return dirname(__DIR__, 2) . '/';
}
/**