fix: Allow updateDatabase to accept numbers

pull/3307/head
iglocska 2018-05-31 14:39:28 +02:00
parent 93333dceff
commit a2746418ae
1 changed files with 3 additions and 0 deletions

View File

@ -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'));