@@ -158,8 +158,7 @@ discard block |
||
| 158 | 158 | |
| 159 | 159 | $database = gGetDb(); |
| 160 | 160 | |
| 161 | - $database->transactionally(function() use ($database, $useOauthSignup) |
|
| 162 | - { |
|
| 161 | + $database->transactionally(function() use ($database, $useOauthSignup) { |
|
| 163 | 162 | |
| 164 | 163 | $newUser = new User(); |
| 165 | 164 | $newUser->setDatabase($database); |
@@ -217,7 +216,8 @@ discard block |
||
| 217 | 216 | if($allowRegistration) { |
| 218 | 217 | $smarty->assign("useOauthSignup", $useOauthSignup); |
| 219 | 218 | $smarty->display("registration/register.tpl"); |
| 220 | - } else { |
|
| 219 | + } |
|
| 220 | + else { |
|
| 221 | 221 | $smarty->display("registration/registerdisabled.tpl"); |
| 222 | 222 | } |
| 223 | 223 | BootstrapSkin::displayInternalFooter(); |
@@ -491,8 +491,7 @@ discard block |
||
| 491 | 491 | |
| 492 | 492 | $database = gGetDb(); |
| 493 | 493 | |
| 494 | - $database->transactionally(function() use ($database) |
|
| 495 | - { |
|
| 494 | + $database->transactionally(function() use ($database) { |
|
| 496 | 495 | global $smarty; |
| 497 | 496 | |
| 498 | 497 | $message = InterfaceMessage::getById($_GET['edit'], $database); |
@@ -580,8 +579,7 @@ discard block |
||
| 580 | 579 | |
| 581 | 580 | $database = gGetDb(); |
| 582 | 581 | |
| 583 | - $database->transactionally(function() use ($database, $baseurl) |
|
| 584 | - { |
|
| 582 | + $database->transactionally(function() use ($database, $baseurl) { |
|
| 585 | 583 | $template = new WelcomeTemplate(); |
| 586 | 584 | $template->setDatabase($database); |
| 587 | 585 | $template->setUserCode($_POST['usercode']); |
@@ -666,8 +664,7 @@ discard block |
||
| 666 | 664 | die(); |
| 667 | 665 | } |
| 668 | 666 | |
| 669 | - $database->transactionally(function() use($database, $template) |
|
| 670 | - { |
|
| 667 | + $database->transactionally(function() use($database, $template) { |
|
| 671 | 668 | $tid = $template->getId(); |
| 672 | 669 | |
| 673 | 670 | $database |
@@ -703,8 +700,7 @@ discard block |
||
| 703 | 700 | } |
| 704 | 701 | |
| 705 | 702 | if (isset($_POST['submit'])) { |
| 706 | - $database->transactionally(function() use($database, $template) |
|
| 707 | - { |
|
| 703 | + $database->transactionally(function() use($database, $template) { |
|
| 708 | 704 | $template->setUserCode($_POST['usercode']); |
| 709 | 705 | $template->setBotCode($_POST['botcode']); |
| 710 | 706 | $template->save(); |
@@ -835,8 +831,7 @@ discard block |
||
| 835 | 831 | |
| 836 | 832 | $currentUsername = User::getCurrent()->getUsername(); |
| 837 | 833 | |
| 838 | - $database->transactionally(function() use ($database, $ban, $duration, $currentUsername) |
|
| 839 | - { |
|
| 834 | + $database->transactionally(function() use ($database, $ban, $duration, $currentUsername) { |
|
| 840 | 835 | $ban->setDatabase($database); |
| 841 | 836 | $ban->setActive(1); |
| 842 | 837 | $ban->setType($_POST['type']); |
@@ -901,8 +896,7 @@ discard block |
||
| 901 | 896 | else { |
| 902 | 897 | $database = gGetDb(); |
| 903 | 898 | |
| 904 | - $database->transactionally(function() use ($database, $ban) |
|
| 905 | - { |
|
| 899 | + $database->transactionally(function() use ($database, $ban) { |
|
| 906 | 900 | $ban->setActive(0); |
| 907 | 901 | $ban->save(); |
| 908 | 902 | |
@@ -1051,8 +1045,7 @@ discard block |
||
| 1051 | 1045 | } |
| 1052 | 1046 | |
| 1053 | 1047 | $database = gGetDb(); |
| 1054 | - $database->transactionally(function() use ($database, $request) |
|
| 1055 | - { |
|
| 1048 | + $database->transactionally(function() use ($database, $request) { |
|
| 1056 | 1049 | global $availableRequestStates; |
| 1057 | 1050 | |
| 1058 | 1051 | $request->setReserved(0); |
@@ -1202,7 +1195,8 @@ discard block |
||
| 1202 | 1195 | $emailTemplate = EmailTemplate::getById($gem, gGetDb()); |
| 1203 | 1196 | if ($emailTemplate instanceof EmailTemplate) { |
| 1204 | 1197 | $isForCreated = $emailTemplate->getDefaultAction() === EmailTemplate::CREATED; |
| 1205 | - } else { |
|
| 1198 | + } |
|
| 1199 | + else { |
|
| 1206 | 1200 | $isForCreated = false; |
| 1207 | 1201 | } |
| 1208 | 1202 | |
@@ -1263,7 +1257,8 @@ discard block |
||
| 1263 | 1257 | if (isset($_POST['ccmailist']) && $_POST['ccmailist'] == "on") { |
| 1264 | 1258 | $headers .= 'Cc: [email protected]' . "\r\n"; |
| 1265 | 1259 | } |
| 1266 | - } else { |
|
| 1260 | + } |
|
| 1261 | + else { |
|
| 1267 | 1262 | // these people do not. |
| 1268 | 1263 | $headers .= 'Cc: [email protected]' . "\r\n"; |
| 1269 | 1264 | } |
@@ -1479,8 +1474,7 @@ discard block |
||
| 1479 | 1474 | elseif ($action == "reserve") { |
| 1480 | 1475 | $database = gGetDb(); |
| 1481 | 1476 | |
| 1482 | - $database->transactionally(function() use ($database) |
|
| 1483 | - { |
|
| 1477 | + $database->transactionally(function() use ($database) { |
|
| 1484 | 1478 | $request = Request::getById($_GET['resid'], $database); |
| 1485 | 1479 | |
| 1486 | 1480 | if ($request == false) { |
@@ -1583,8 +1577,7 @@ discard block |
||
| 1583 | 1577 | if ($reservedUser->getId() != User::getCurrent()->getId()) { |
| 1584 | 1578 | if (User::getCurrent()->isAdmin()) { |
| 1585 | 1579 | if (isset($_GET['confirm']) && $_GET['confirm'] == 1) { |
| 1586 | - $database->transactionally(function() use($database, $request) |
|
| 1587 | - { |
|
| 1580 | + $database->transactionally(function() use($database, $request) { |
|
| 1588 | 1581 | $request->setReserved(0); |
| 1589 | 1582 | $request->save(); |
| 1590 | 1583 | |
@@ -1609,8 +1602,7 @@ discard block |
||
| 1609 | 1602 | } |
| 1610 | 1603 | } |
| 1611 | 1604 | else { |
| 1612 | - $database->transactionally(function() use ($database, $request) |
|
| 1613 | - { |
|
| 1605 | + $database->transactionally(function() use ($database, $request) { |
|
| 1614 | 1606 | $request->setReserved(0); |
| 1615 | 1607 | $request->save(); |
| 1616 | 1608 | |
@@ -1803,8 +1795,7 @@ discard block |
||
| 1803 | 1795 | |
| 1804 | 1796 | if ($_SERVER['REQUEST_METHOD'] == 'POST') { |
| 1805 | 1797 | $database = gGetDb(); |
| 1806 | - $database->transactionally(function() use ($database, $comment, $baseurl) |
|
| 1807 | - { |
|
| 1798 | + $database->transactionally(function() use ($database, $comment, $baseurl) { |
|
| 1808 | 1799 | |
| 1809 | 1800 | $comment->setComment($_POST['newcomment']); |
| 1810 | 1801 | $comment->setVisibility($_POST['visibility']); |
@@ -1852,8 +1843,7 @@ discard block |
||
| 1852 | 1843 | die(); |
| 1853 | 1844 | } |
| 1854 | 1845 | |
| 1855 | - $database->transactionally(function() use ($database, $user, $requestObject, $curuser) |
|
| 1856 | - { |
|
| 1846 | + $database->transactionally(function() use ($database, $user, $requestObject, $curuser) { |
|
| 1857 | 1847 | $updateStatement = $database->prepare("UPDATE request SET reserved = :userid WHERE id = :request;"); |
| 1858 | 1848 | $updateStatement->bindValue(":userid", $user->getId()); |
| 1859 | 1849 | $updateStatement->bindValue(":request", $requestObject->getId()); |
@@ -1881,8 +1871,7 @@ discard block |
||
| 1881 | 1871 | } |
| 1882 | 1872 | if (isset($_POST['submit'])) { |
| 1883 | 1873 | $database = gGetDb(); |
| 1884 | - $database->transactionally(function() use ($database) |
|
| 1885 | - { |
|
| 1874 | + $database->transactionally(function() use ($database) { |
|
| 1886 | 1875 | global $baseurl; |
| 1887 | 1876 | |
| 1888 | 1877 | $emailTemplate = new EmailTemplate(); |
@@ -1960,8 +1949,7 @@ discard block |
||
| 1960 | 1949 | die(); |
| 1961 | 1950 | } |
| 1962 | 1951 | |
| 1963 | - $database->transactionally(function() use ($database, $emailTemplate) |
|
| 1964 | - { |
|
| 1952 | + $database->transactionally(function() use ($database, $emailTemplate) { |
|
| 1965 | 1953 | $emailTemplate->save(); |
| 1966 | 1954 | |
| 1967 | 1955 | Logger::editedEmail($database, $emailTemplate); |
@@ -2026,8 +2014,7 @@ discard block |
||
| 2026 | 2014 | } |
| 2027 | 2015 | elseif ($action == "oauthattach") { |
| 2028 | 2016 | $database = gGetDb(); |
| 2029 | - $database->transactionally(function() use ($database) |
|
| 2030 | - { |
|
| 2017 | + $database->transactionally(function() use ($database) { |
|
| 2031 | 2018 | try { |
| 2032 | 2019 | global $oauthConsumerToken, $oauthSecretToken, $oauthBaseUrl, $oauthBaseUrlInternal; |
| 2033 | 2020 | |
@@ -2062,7 +2049,8 @@ discard block |
||
| 2062 | 2049 | |
| 2063 | 2050 | if ($enableEmailConfirm == 1) { |
| 2064 | 2051 | $query = "SELECT * FROM request WHERE status = :type AND emailconfirm = 'Confirmed';"; |
| 2065 | - } else { |
|
| 2052 | + } |
|
| 2053 | + else { |
|
| 2066 | 2054 | $query = "SELECT * FROM request WHERE status = :type;"; |
| 2067 | 2055 | } |
| 2068 | 2056 | |
@@ -2082,7 +2070,8 @@ discard block |
||
| 2082 | 2070 | $smarty->assign("showStatus", false); |
| 2083 | 2071 | $html = $smarty->fetch("mainpage/requesttable.tpl"); |
| 2084 | 2072 | echo $html; |
| 2085 | - } else { |
|
| 2073 | + } |
|
| 2074 | + else { |
|
| 2086 | 2075 | echo defaultpage(); |
| 2087 | 2076 | } |
| 2088 | 2077 | |