mirror of https://github.com/MISP/MISP
fix: Allow updateDatabase to accept numbers
parent
93333dceff
commit
a2746418ae
|
@ -586,6 +586,9 @@ class AppController extends Controller {
|
|||
public function updateDatabase($command) {
|
||||
if (!$this->_isSiteAdmin() || !$this->request->is('post')) throw new MethodNotAllowedException();
|
||||
$this->loadModel('Server');
|
||||
if (is_numeric($command)) {
|
||||
$command = intval($command);
|
||||
}
|
||||
$this->Server->updateDatabase($command);
|
||||
$this->Flash->success('Done.');
|
||||
$this->redirect(array('controller' => 'pages', 'action' => 'display', 'administration'));
|
||||
|
|
Loading…
Reference in New Issue