mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2025-04-20 15:45:49 -04:00
[fix] rename function canHtaccess by restrictAccessTo
This commit is contained in:
parent
9eea316b86
commit
fe24371cce
@ -91,7 +91,7 @@ class Paste extends AbstractModel
|
||||
|
||||
$this->_data->meta->postdate = time();
|
||||
$this->_data->meta->salt = ServerSalt::generate();
|
||||
$this->_data->webserver = WebServer::canHtaccess();
|
||||
$this->_data->webserver = WebServer::restrictAccessTo();
|
||||
|
||||
// store paste
|
||||
if (
|
||||
|
@ -62,10 +62,10 @@ class WebServer extends AbstractPersistence
|
||||
* @static
|
||||
* @throws Exception
|
||||
*/
|
||||
public static function canHtaccess()
|
||||
public static function restrictAccessTo()
|
||||
{
|
||||
$file = '.htaccess';
|
||||
if (is_dir(self::$_path) && !is_file($file)) {
|
||||
if (is_dir(self::$path) && !is_file($file)) {
|
||||
$server = self::getWebserver();
|
||||
if($server['software'] == "Apache") {
|
||||
if (version_compare($server['version'], '2.2') >= 0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user