Adding a warning that PHPCI can't save your settings if the config.yml file is not writeable, fixes #369
This commit is contained in:
parent
0de24b8738
commit
3ce85ab54a
2 changed files with 12 additions and 0 deletions
|
|
@ -48,6 +48,7 @@ class SettingsController extends Controller
|
|||
|
||||
$this->view->github = $this->getGithubForm();
|
||||
$this->view->emailSettings = $this->getEmailForm($emailSettings);
|
||||
$this->view->isWriteable = $this->canWriteConfig();
|
||||
|
||||
if (!empty($this->settings['phpci']['github']['token'])) {
|
||||
$this->view->githubUser = $this->getGithubUser($this->settings['phpci']['github']['token']);
|
||||
|
|
@ -242,4 +243,9 @@ class SettingsController extends Controller
|
|||
|
||||
return $user['body'];
|
||||
}
|
||||
|
||||
protected function canWriteConfig()
|
||||
{
|
||||
return is_writeable(APPLICATION_PATH . 'PHPCI/config.yml');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue