Merge branch 'master' of https://github.com/opensupports/opensupports
This commit is contained in:
commit
e088114b17
|
@ -1,6 +1,6 @@
|
|||
![OpenSupports](http://www.opensupports.com/logo.png)
|
||||
|
||||
[![Build Status](https://travis-ci.org/opensupports/opensupports.svg?branch=master)](https://travis-ci.org/opensupports/opensupports) v4.1.1
|
||||
[![Build Status](https://travis-ci.org/opensupports/opensupports.svg?branch=master)](https://travis-ci.org/opensupports/opensupports) v4.1.2
|
||||
|
||||
OpenSupports is an open source ticket system built primarily with PHP and ReactJS.
|
||||
Please, visit our website for more information: [http://www.opensupports.com/](http://www.opensupports.com/)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "OpenSupports",
|
||||
"version": "4.1.1",
|
||||
"version": "4.1.2",
|
||||
"author": "Ivan Diaz <contact@opensupports.com>",
|
||||
"description": "Open source ticket system made with PHP and ReactJS",
|
||||
"repository": {
|
||||
|
|
|
@ -30,7 +30,6 @@ class InstallStep4UserSystem extends React.Component {
|
|||
<FormField name="registration" label={i18n('ENABLE_USER_REGISTRATION')} decorator={ToggleButton} fieldProps={{disabled: this.isDisabled()}}/>
|
||||
<div className="install-step-4__buttons">
|
||||
<SubmitButton className="install-step-4__next" size="medium" type="secondary">{i18n('NEXT')}</SubmitButton>
|
||||
<Button className="install-step-4__previous" size="medium" onClick={this.onPreviousClick.bind(this)}>{i18n('PREVIOUS')}</Button>
|
||||
</div>
|
||||
</Form>
|
||||
</div>
|
||||
|
@ -46,17 +45,12 @@ class InstallStep4UserSystem extends React.Component {
|
|||
});
|
||||
}
|
||||
|
||||
onPreviousClick(event) {
|
||||
event.preventDefault();
|
||||
history.push('/install/step-3');
|
||||
}
|
||||
|
||||
onSubmit(form) {
|
||||
this.props.dispatch(ConfigActions.updateUserSystemSettings({
|
||||
'user-system-enabled': form['user-system-enabled'] * 1,
|
||||
'registration': form['registration'] * 1
|
||||
}));
|
||||
|
||||
|
||||
history.push('/install/step-5');
|
||||
}
|
||||
|
||||
|
@ -69,4 +63,4 @@ export default connect((store) => {
|
|||
return {
|
||||
language: store.config.language
|
||||
};
|
||||
})(InstallStep4UserSystem);
|
||||
})(InstallStep4UserSystem);
|
||||
|
|
|
@ -30,7 +30,9 @@ class CheckRequirementsController extends Controller {
|
|||
}
|
||||
|
||||
public function handler() {
|
||||
$configWritable = !!fopen('config.php', 'w+');
|
||||
if(InstallationDoneController::isInstallationDone()) {
|
||||
throw new Exception(ERRORS::INIT_SETTINGS_DONE);
|
||||
}
|
||||
|
||||
Response::respondSuccess([
|
||||
'phpVersion' => [
|
||||
|
@ -50,8 +52,8 @@ class CheckRequirementsController extends Controller {
|
|||
],
|
||||
'files' => [
|
||||
'name' => 'Folder: /api/files',
|
||||
'value' => $configWritable ? 'Writable' : 'Not writable',
|
||||
'ok' => $configWritable
|
||||
'value' => is_writable('files') ? 'Writable' : 'Not writable',
|
||||
'ok' => is_writable('files')
|
||||
]
|
||||
]);
|
||||
}
|
||||
|
@ -64,4 +66,4 @@ class CheckRequirementsController extends Controller {
|
|||
else if($currentVersion[0] < $requiredVersion[0]) return false;
|
||||
else return $currentVersion[1] >= $requiredVersion[1];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -48,9 +48,7 @@ class InitDatabaseController extends Controller {
|
|||
$dbUser = Controller::request('dbUser');
|
||||
$dbPass = Controller::request('dbPassword');
|
||||
|
||||
if(!defined('MYSQL_HOST')) {
|
||||
RedBean::setup('mysql:host=' . $dbHost, $dbUser, $dbPass);
|
||||
}
|
||||
RedBean::setup('mysql:host=' . $dbHost, $dbUser, $dbPass);
|
||||
|
||||
if($dbName) {
|
||||
RedBean::addDatabase($dbName, 'mysql:host='. $dbHost . ';dbname=' . $dbName, $dbUser, $dbPass);
|
||||
|
@ -81,4 +79,4 @@ class InitDatabaseController extends Controller {
|
|||
fclose($configFile);
|
||||
Response::respondSuccess();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,17 @@
|
|||
describe '/system/init-settings' do
|
||||
it 'should prevent initing database if already called' do
|
||||
result = request('/system/init-database', {})
|
||||
(result['status']).should.equal('fail')
|
||||
(result['message']).should.equal('INIT_SETTINGS_DONE')
|
||||
|
||||
result = request('/system/check-requirements', {})
|
||||
(result['status']).should.equal('success')
|
||||
|
||||
result = request('/system/init-database', {})
|
||||
(result['status']).should.equal('fail')
|
||||
(result['message']).should.equal('INIT_SETTINGS_DONE')
|
||||
end
|
||||
|
||||
it 'should initialize correctly' do
|
||||
result = request('/system/init-settings', {
|
||||
'user-system-enabled' => true,
|
||||
|
@ -25,4 +38,4 @@ describe '/system/init-settings' do
|
|||
|
||||
(result['status']).should.equal('success')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
require_once '../../server/vendor/autoload.php';
|
||||
require_once '../../api/vendor/autoload.php';
|
||||
|
||||
class MailSender {
|
||||
|
Loading…
Reference in New Issue