mirror of
https://github.com/Mibew/mibew.git
synced 2024-11-15 16:44:11 +03:00
parent
2c0d88c4d5
commit
fe0d2f2760
@ -118,12 +118,16 @@ class Installer
|
||||
if (!$this->checkPhpVersion()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->log[] = getlocal(
|
||||
'PHP version {0}',
|
||||
array(format_version_id($this->getPhpVersionId()))
|
||||
);
|
||||
|
||||
if (!$this->checkFsPermissions()) {
|
||||
return false;
|
||||
}
|
||||
$this->log[] = getlocal('Directories permissions are correct');
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -472,6 +476,36 @@ class Installer
|
||||
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.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user