Fixes + code style fixes

This commit is contained in:
Dmitry Khomutov 2016-04-21 23:05:32 +06:00
commit e9b5de8ea9
108 changed files with 589 additions and 2104 deletions

View file

@ -40,7 +40,7 @@ class SettingsController extends Controller
parent::init();
$parser = new Parser();
$yaml = file_get_contents(PHPCI_CONFIG_FILE);
$yaml = file_get_contents(PHPCI_APP_DIR . 'config.yml');
$this->settings = $parser->parse($yaml);
}
@ -76,7 +76,7 @@ class SettingsController extends Controller
$authSettings = $this->settings['phpci']['authentication_settings'];
}
$this->view->configFile = PHPCI_CONFIG_FILE;
$this->view->configFile = PHPCI_APP_DIR . 'config.yml';
$this->view->basicSettings = $this->getBasicForm($basicSettings);
$this->view->buildSettings = $this->getBuildForm($buildSettings);
$this->view->github = $this->getGithubForm();
@ -242,7 +242,7 @@ class SettingsController extends Controller
{
$dumper = new Dumper();
$yaml = $dumper->dump($this->settings, 4);
file_put_contents(PHPCI_CONFIG_FILE, $yaml);
file_put_contents(PHPCI_APP_DIR . 'config.yml', $yaml);
if (error_get_last()) {
$error_get_last = error_get_last();
@ -387,7 +387,7 @@ class SettingsController extends Controller
*/
protected function canWriteConfig()
{
return is_writeable(PHPCI_CONFIG_FILE);
return is_writeable(PHPCI_APP_DIR . 'config.yml');
}
/**