@@ -47,10 +47,11 @@ |
||
| 47 | 47 | /* look up consumer to edit, if requested */ |
| 48 | 48 | } elseif (isset($_REQUEST['consumer_key'])) { |
| 49 | 49 | $consumer = new LTI_Tool_Consumer($_REQUEST['consumer_key'], LTI_Data_Connector::getDataConnector($sql)); |
| 50 | - if (isset($_REQUEST['action'])) |
|
| 51 | - switch ($_REQUEST['action']) { |
|
| 50 | + if (isset($_REQUEST['action'])) { |
|
| 51 | + switch ($_REQUEST['action']) { |
|
| 52 | 52 | case 'delete': { |
| 53 | 53 | $consumer->delete(); |
| 54 | + } |
|
| 54 | 55 | break; |
| 55 | 56 | } |
| 56 | 57 | case 'select': { |
@@ -305,7 +305,9 @@ discard block |
||
| 305 | 305 | ), false) . '</pre>', |
| 306 | 306 | NotificationMessage::ERROR |
| 307 | 307 | ); |
| 308 | - if (php_sapi_name() != 'cli') $smarty->display('page.tpl'); |
|
| 308 | + if (php_sapi_name() != 'cli') { |
|
| 309 | + $smarty->display('page.tpl'); |
|
| 310 | + } |
|
| 309 | 311 | exit; |
| 310 | 312 | } |
| 311 | 313 | $sql->query(" |
@@ -421,7 +423,9 @@ discard block |
||
| 421 | 423 | 'The Canvas URL you submitted could not be parsed.<pre>' . $_REQUEST['canvas_url'] . '</pre>', |
| 422 | 424 | NotificationMessage::ERROR |
| 423 | 425 | ); |
| 424 | - if (php_sapi_name() != 'cli') $smarty->display('page.tpl'); |
|
| 426 | + if (php_sapi_name() != 'cli') { |
|
| 427 | + $smarty->display('page.tpl'); |
|
| 428 | + } |
|
| 425 | 429 | exit; |
| 426 | 430 | } |
| 427 | 431 | } |