mirror of
https://github.com/Mibew/mibew.git
synced 2025-04-28 17:16:41 +03:00
parent
2c0d88c4d5
commit
fe0d2f2760
@ -118,12 +118,16 @@ class Installer
|
|||||||
if (!$this->checkPhpVersion()) {
|
if (!$this->checkPhpVersion()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->log[] = getlocal(
|
$this->log[] = getlocal(
|
||||||
'PHP version {0}',
|
'PHP version {0}',
|
||||||
array(format_version_id($this->getPhpVersionId()))
|
array(format_version_id($this->getPhpVersionId()))
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (!$this->checkFsPermissions()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
$this->log[] = getlocal('Directories permissions are correct');
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -472,6 +476,36 @@ class Installer
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if files and directories permissions are correct.
|
||||||
|
*
|
||||||
|
* @return boolean True if all permissions are correct and false otherwise.
|
||||||
|
*/
|
||||||
|
protected function checkFsPermissions()
|
||||||
|
{
|
||||||
|
// Check cache directory
|
||||||
|
if (!is_writable(MIBEW_FS_ROOT . '/cache')) {
|
||||||
|
$this->errors[] = getlocal(
|
||||||
|
'Cache directory "{0}" is not writable.',
|
||||||
|
array('cache/')
|
||||||
|
);
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check avatars directory
|
||||||
|
if (!is_writable(MIBEW_FS_ROOT . '/files/avatar')) {
|
||||||
|
$this->errors[] = getlocal(
|
||||||
|
'Avatars directory "{0}" is not writable.',
|
||||||
|
array('files/avatar/')
|
||||||
|
);
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if MySQL version is high enough or not to run Mibew.
|
* Checks if MySQL version is high enough or not to run Mibew.
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user