Skip to content

Commit

Permalink
Fix #12394 : Create view should require a view name
Browse files Browse the repository at this point in the history
Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
  • Loading branch information
devenbansod committed Jul 23, 2016
1 parent 6115065 commit 622a6f2
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions view_create.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,20 @@
$sql_query = '';
}

// View name is a compulsory field
if (isset($_REQUEST['view']['name'])
&& empty($_REQUEST['view']['name'])
) {
$message = PMA\libraries\Message::error(__('View name can not be empty'));
$response = PMA\libraries\Response::getInstance();
$response->addJSON(
'message',
$message
);
$response->setRequestStatus(false);
exit;
}

if (isset($_REQUEST['createview']) || isset($_REQUEST['alterview'])) {
/**
* Creates the view
Expand Down

0 comments on commit 622a6f2

Please sign in to comment.