@@ -59,12 +59,10 @@ |
||
| 59 | 59 | |
| 60 | 60 | if ($statement->execute()) { |
| 61 | 61 | $this->id = (int)$this->dbObject->lastInsertId(); |
| 62 | - } |
|
| 63 | - else { |
|
| 62 | + } else { |
|
| 64 | 63 | throw new Exception($statement->errorInfo()); |
| 65 | 64 | } |
| 66 | - } |
|
| 67 | - else { |
|
| 65 | + } else { |
|
| 68 | 66 | // update |
| 69 | 67 | $statement = $this->dbObject->prepare(<<<SQL |
| 70 | 68 | UPDATE `rdnscache` |
@@ -61,12 +61,10 @@ |
||
| 61 | 61 | |
| 62 | 62 | if ($statement->execute()) { |
| 63 | 63 | $this->id = (int)$this->dbObject->lastInsertId(); |
| 64 | - } |
|
| 65 | - else { |
|
| 64 | + } else { |
|
| 66 | 65 | throw new Exception($statement->errorInfo()); |
| 67 | 66 | } |
| 68 | - } |
|
| 69 | - else { |
|
| 67 | + } else { |
|
| 70 | 68 | // update |
| 71 | 69 | throw new Exception('Updating roles is not available'); |
| 72 | 70 | } |
@@ -47,8 +47,7 @@ |
||
| 47 | 47 | if ($this->isNew()) { |
| 48 | 48 | // insert |
| 49 | 49 | throw new Exception('Not allowed to create new site notice object'); |
| 50 | - } |
|
| 51 | - else { |
|
| 50 | + } else { |
|
| 52 | 51 | // update |
| 53 | 52 | $statement = $this->dbObject->prepare(<<<SQL |
| 54 | 53 | UPDATE sitenotice |
@@ -67,12 +67,10 @@ |
||
| 67 | 67 | |
| 68 | 68 | if ($statement->execute()) { |
| 69 | 69 | $this->id = (int)$this->dbObject->lastInsertId(); |
| 70 | - } |
|
| 71 | - else { |
|
| 70 | + } else { |
|
| 72 | 71 | throw new Exception($statement->errorInfo()); |
| 73 | 72 | } |
| 74 | - } |
|
| 75 | - else { |
|
| 73 | + } else { |
|
| 76 | 74 | // update |
| 77 | 75 | $statement = $this->dbObject->prepare(<<<SQL |
| 78 | 76 | UPDATE `request` SET |
@@ -109,8 +109,7 @@ |
||
| 109 | 109 | |
| 110 | 110 | if ($statement->execute()) { |
| 111 | 111 | $this->id = (int)$this->dbObject->lastInsertId(); |
| 112 | - } |
|
| 113 | - else { |
|
| 112 | + } else { |
|
| 114 | 113 | throw new Exception($statement->errorInfo()); |
| 115 | 114 | } |
| 116 | 115 | } |
@@ -65,12 +65,10 @@ |
||
| 65 | 65 | |
| 66 | 66 | if ($statement->execute()) { |
| 67 | 67 | $this->id = (int)$this->dbObject->lastInsertId(); |
| 68 | - } |
|
| 69 | - else { |
|
| 68 | + } else { |
|
| 70 | 69 | throw new Exception($statement->errorInfo()); |
| 71 | 70 | } |
| 72 | - } |
|
| 73 | - else { |
|
| 71 | + } else { |
|
| 74 | 72 | // update |
| 75 | 73 | $statement = $this->dbObject->prepare(<<<SQL |
| 76 | 74 | UPDATE `welcometemplate` |
@@ -49,12 +49,10 @@ |
||
| 49 | 49 | |
| 50 | 50 | if ($statement->execute()) { |
| 51 | 51 | $this->id = (int)$this->dbObject->lastInsertId(); |
| 52 | - } |
|
| 53 | - else { |
|
| 52 | + } else { |
|
| 54 | 53 | throw new Exception($statement->errorInfo()); |
| 55 | 54 | } |
| 56 | - } |
|
| 57 | - else { |
|
| 55 | + } else { |
|
| 58 | 56 | throw new Exception("Updating logs is not available"); |
| 59 | 57 | } |
| 60 | 58 | } |
@@ -40,8 +40,7 @@ |
||
| 40 | 40 | $this->getNotificationHelper()->siteNoticeEdited(); |
| 41 | 41 | |
| 42 | 42 | $this->redirect(); |
| 43 | - } |
|
| 44 | - else { |
|
| 43 | + } else { |
|
| 45 | 44 | $this->assignCSRFToken(); |
| 46 | 45 | |
| 47 | 46 | $this->setTemplate('site-notice/edit-form.tpl'); |
@@ -48,8 +48,7 @@ |
||
| 48 | 48 | |
| 49 | 49 | if ($request->getEmailConfirm() === $si) { |
| 50 | 50 | $request->setEmailConfirm('Confirmed'); |
| 51 | - } |
|
| 52 | - else { |
|
| 51 | + } else { |
|
| 53 | 52 | throw new ApplicationLogicException('The confirmation value does not appear to match the expected value'); |
| 54 | 53 | } |
| 55 | 54 | |