mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 15:03:25 +00:00
Fix CS
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -17,81 +17,75 @@
|
||||
*/
|
||||
class system_server
|
||||
{
|
||||
/**
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $_server_software;
|
||||
|
||||
/**
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $_server_software;
|
||||
|
||||
/**
|
||||
*
|
||||
* @return system_server
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
$this->_server_software = isset($_SERVER['SERVER_SOFTWARE']) ?
|
||||
/**
|
||||
*
|
||||
* @return system_server
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
$this->_server_software = isset($_SERVER['SERVER_SOFTWARE']) ?
|
||||
strtolower($_SERVER['SERVER_SOFTWARE']) : "";
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if server is Nginx
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function is_nginx()
|
||||
{
|
||||
if (strpos($this->_server_software, 'nginx') !== false)
|
||||
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if server is lighttpd
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function is_lighttpd()
|
||||
{
|
||||
if (strpos($this->_server_software, 'lighttpd') !== false)
|
||||
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if server is Apache
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function is_apache()
|
||||
{
|
||||
if (strpos($this->_server_software, 'apache') !== false)
|
||||
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return server platform name
|
||||
*
|
||||
* @staticvar string $_system
|
||||
* @return string
|
||||
*/
|
||||
public static function get_platform()
|
||||
{
|
||||
static $_system = NULL;
|
||||
if ($_system === NULL)
|
||||
{
|
||||
$_system = strtoupper(php_uname('s'));
|
||||
if ($_system == 'WINDOWS NT')
|
||||
$_system = 'WINDOWS';
|
||||
return $this;
|
||||
}
|
||||
|
||||
return($_system);
|
||||
}
|
||||
/**
|
||||
* Return true if server is Nginx
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function is_nginx()
|
||||
{
|
||||
if (strpos($this->_server_software, 'nginx') !== false)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if server is lighttpd
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function is_lighttpd()
|
||||
{
|
||||
if (strpos($this->_server_software, 'lighttpd') !== false)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if server is Apache
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function is_apache()
|
||||
{
|
||||
if (strpos($this->_server_software, 'apache') !== false)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return server platform name
|
||||
*
|
||||
* @staticvar string $_system
|
||||
* @return string
|
||||
*/
|
||||
public static function get_platform()
|
||||
{
|
||||
static $_system = NULL;
|
||||
if ($_system === NULL) {
|
||||
$_system = strtoupper(php_uname('s'));
|
||||
if ($_system == 'WINDOWS NT')
|
||||
$_system = 'WINDOWS';
|
||||
}
|
||||
|
||||
return($_system);
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Phraseanet
|
||||
*
|
||||
@@ -14,19 +15,18 @@
|
||||
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
|
||||
* @link www.phraseanet.com
|
||||
*/
|
||||
|
||||
class system_url
|
||||
{
|
||||
protected $url;
|
||||
protected $url;
|
||||
|
||||
function __construct($url)
|
||||
{
|
||||
$this->url = $url;
|
||||
}
|
||||
function __construct($url)
|
||||
{
|
||||
$this->url = $url;
|
||||
}
|
||||
|
||||
function get_url()
|
||||
{
|
||||
return $this->url;
|
||||
}
|
||||
function get_url()
|
||||
{
|
||||
return $this->url;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user