@@ -154,8 +154,7 @@ discard block |
||
| 154 | 154 | |
| 155 | 155 | $database = gGetDb(); |
| 156 | 156 | |
| 157 | - $database->transactionally(function() use ($database, $useOauthSignup) |
|
| 158 | - { |
|
| 157 | + $database->transactionally(function() use ($database, $useOauthSignup) { |
|
| 159 | 158 | |
| 160 | 159 | $newUser = new User(); |
| 161 | 160 | $newUser->setDatabase($database); |
@@ -483,8 +482,7 @@ discard block |
||
| 483 | 482 | |
| 484 | 483 | $database = gGetDb(); |
| 485 | 484 | |
| 486 | - $database->transactionally(function() use ($database) |
|
| 487 | - { |
|
| 485 | + $database->transactionally(function() use ($database) { |
|
| 488 | 486 | global $smarty; |
| 489 | 487 | |
| 490 | 488 | $message = InterfaceMessage::getById($_GET['edit'], $database); |
@@ -572,8 +570,7 @@ discard block |
||
| 572 | 570 | |
| 573 | 571 | $database = gGetDb(); |
| 574 | 572 | |
| 575 | - $database->transactionally(function() use ($database, $baseurl) |
|
| 576 | - { |
|
| 573 | + $database->transactionally(function() use ($database, $baseurl) { |
|
| 577 | 574 | $template = new WelcomeTemplate(); |
| 578 | 575 | $template->setDatabase($database); |
| 579 | 576 | $template->setUserCode($_POST['usercode']); |
@@ -658,8 +655,7 @@ discard block |
||
| 658 | 655 | die(); |
| 659 | 656 | } |
| 660 | 657 | |
| 661 | - $database->transactionally(function() use($database, $template) |
|
| 662 | - { |
|
| 658 | + $database->transactionally(function() use($database, $template) { |
|
| 663 | 659 | $tid = $template->getId(); |
| 664 | 660 | |
| 665 | 661 | $database |
@@ -695,8 +691,7 @@ discard block |
||
| 695 | 691 | } |
| 696 | 692 | |
| 697 | 693 | if (isset($_POST['submit'])) { |
| 698 | - $database->transactionally(function() use($database, $template) |
|
| 699 | - { |
|
| 694 | + $database->transactionally(function() use($database, $template) { |
|
| 700 | 695 | $template->setUserCode($_POST['usercode']); |
| 701 | 696 | $template->setBotCode($_POST['botcode']); |
| 702 | 697 | $template->save(); |
@@ -827,8 +822,7 @@ discard block |
||
| 827 | 822 | |
| 828 | 823 | $currentUsername = User::getCurrent()->getUsername(); |
| 829 | 824 | |
| 830 | - $database->transactionally(function() use ($database, $ban, $duration, $currentUsername) |
|
| 831 | - { |
|
| 825 | + $database->transactionally(function() use ($database, $ban, $duration, $currentUsername) { |
|
| 832 | 826 | $ban->setDatabase($database); |
| 833 | 827 | $ban->setActive(1); |
| 834 | 828 | $ban->setType($_POST['type']); |
@@ -893,8 +887,7 @@ discard block |
||
| 893 | 887 | else { |
| 894 | 888 | $database = gGetDb(); |
| 895 | 889 | |
| 896 | - $database->transactionally(function() use ($database, $ban) |
|
| 897 | - { |
|
| 890 | + $database->transactionally(function() use ($database, $ban) { |
|
| 898 | 891 | $ban->setActive(0); |
| 899 | 892 | $ban->save(); |
| 900 | 893 | |
@@ -1043,8 +1036,7 @@ discard block |
||
| 1043 | 1036 | } |
| 1044 | 1037 | |
| 1045 | 1038 | $database = gGetDb(); |
| 1046 | - $database->transactionally(function() use ($database, $request) |
|
| 1047 | - { |
|
| 1039 | + $database->transactionally(function() use ($database, $request) { |
|
| 1048 | 1040 | global $availableRequestStates; |
| 1049 | 1041 | |
| 1050 | 1042 | $request->setReserved(0); |
@@ -1194,7 +1186,8 @@ discard block |
||
| 1194 | 1186 | $emailTemplate = EmailTemplate::getById($gem, gGetDb()); |
| 1195 | 1187 | if ($emailTemplate instanceof EmailTemplate) { |
| 1196 | 1188 | $isForCreated = $emailTemplate->getDefaultAction() === EmailTemplate::CREATED; |
| 1197 | - } else { |
|
| 1189 | + } |
|
| 1190 | + else { |
|
| 1198 | 1191 | $isForCreated = false; |
| 1199 | 1192 | } |
| 1200 | 1193 | |
@@ -1463,8 +1456,7 @@ discard block |
||
| 1463 | 1456 | elseif ($action == "reserve") { |
| 1464 | 1457 | $database = gGetDb(); |
| 1465 | 1458 | |
| 1466 | - $database->transactionally(function() use ($database) |
|
| 1467 | - { |
|
| 1459 | + $database->transactionally(function() use ($database) { |
|
| 1468 | 1460 | $request = Request::getById($_GET['resid'], $database); |
| 1469 | 1461 | |
| 1470 | 1462 | if ($request == false) { |
@@ -1567,8 +1559,7 @@ discard block |
||
| 1567 | 1559 | if ($reservedUser->getId() != User::getCurrent()->getId()) { |
| 1568 | 1560 | if (User::getCurrent()->isAdmin()) { |
| 1569 | 1561 | if (isset($_GET['confirm']) && $_GET['confirm'] == 1) { |
| 1570 | - $database->transactionally(function() use($database, $request) |
|
| 1571 | - { |
|
| 1562 | + $database->transactionally(function() use($database, $request) { |
|
| 1572 | 1563 | $request->setReserved(0); |
| 1573 | 1564 | $request->save(); |
| 1574 | 1565 | |
@@ -1593,8 +1584,7 @@ discard block |
||
| 1593 | 1584 | } |
| 1594 | 1585 | } |
| 1595 | 1586 | else { |
| 1596 | - $database->transactionally(function() use ($database, $request) |
|
| 1597 | - { |
|
| 1587 | + $database->transactionally(function() use ($database, $request) { |
|
| 1598 | 1588 | $request->setReserved(0); |
| 1599 | 1589 | $request->save(); |
| 1600 | 1590 | |
@@ -1787,8 +1777,7 @@ discard block |
||
| 1787 | 1777 | |
| 1788 | 1778 | if ($_SERVER['REQUEST_METHOD'] == 'POST') { |
| 1789 | 1779 | $database = gGetDb(); |
| 1790 | - $database->transactionally(function() use ($database, $comment, $baseurl) |
|
| 1791 | - { |
|
| 1780 | + $database->transactionally(function() use ($database, $comment, $baseurl) { |
|
| 1792 | 1781 | |
| 1793 | 1782 | $comment->setComment($_POST['newcomment']); |
| 1794 | 1783 | $comment->setVisibility($_POST['visibility']); |
@@ -1835,8 +1824,7 @@ discard block |
||
| 1835 | 1824 | die(); |
| 1836 | 1825 | } |
| 1837 | 1826 | |
| 1838 | - $database->transactionally(function() use ($database, $user, $request, $curuser) |
|
| 1839 | - { |
|
| 1827 | + $database->transactionally(function() use ($database, $user, $request, $curuser) { |
|
| 1840 | 1828 | $updateStatement = $database->prepare("UPDATE request SET reserved = :userid WHERE id = :request LIMIT 1;"); |
| 1841 | 1829 | $updateStatement->bindValue(":userid", $user->getId()); |
| 1842 | 1830 | $updateStatement->bindValue(":request", $request); |
@@ -1864,8 +1852,7 @@ discard block |
||
| 1864 | 1852 | } |
| 1865 | 1853 | if (isset($_POST['submit'])) { |
| 1866 | 1854 | $database = gGetDb(); |
| 1867 | - $database->transactionally(function() use ($database) |
|
| 1868 | - { |
|
| 1855 | + $database->transactionally(function() use ($database) { |
|
| 1869 | 1856 | global $baseurl; |
| 1870 | 1857 | |
| 1871 | 1858 | $emailTemplate = new EmailTemplate(); |
@@ -1943,8 +1930,7 @@ discard block |
||
| 1943 | 1930 | die(); |
| 1944 | 1931 | } |
| 1945 | 1932 | |
| 1946 | - $database->transactionally(function() use ($database, $emailTemplate) |
|
| 1947 | - { |
|
| 1933 | + $database->transactionally(function() use ($database, $emailTemplate) { |
|
| 1948 | 1934 | $emailTemplate->save(); |
| 1949 | 1935 | |
| 1950 | 1936 | Logger::editedEmail($database, $emailTemplate); |
@@ -2009,8 +1995,7 @@ discard block |
||
| 2009 | 1995 | } |
| 2010 | 1996 | elseif ($action == "oauthattach") { |
| 2011 | 1997 | $database = gGetDb(); |
| 2012 | - $database->transactionally(function() use ($database) |
|
| 2013 | - { |
|
| 1998 | + $database->transactionally(function() use ($database) { |
|
| 2014 | 1999 | try { |
| 2015 | 2000 | global $oauthConsumerToken, $oauthSecretToken, $oauthBaseUrl, $oauthBaseUrlInternal; |
| 2016 | 2001 | |
@@ -9,7 +9,7 @@ |
||
| 9 | 9 | 'google' => 'https://www.google.com/search?q=%DATA%', |
| 10 | 10 | ); |
| 11 | 11 | |
| 12 | -if(!isset($_GET['tool']) |
|
| 12 | +if (!isset($_GET['tool']) |
|
| 13 | 13 | || !isset($toolList[$_GET['tool']]) |
| 14 | 14 | || !isset($_GET['data']) |
| 15 | 15 | ) |
@@ -12,8 +12,7 @@ |
||
| 12 | 12 | if(!isset($_GET['tool']) |
| 13 | 13 | || !isset($toolList[$_GET['tool']]) |
| 14 | 14 | || !isset($_GET['data']) |
| 15 | -) |
|
| 16 | -{ |
|
| 15 | +) { |
|
| 17 | 16 | header("HTTP/1.1 403 Forbidden"); |
| 18 | 17 | return; |
| 19 | 18 | } |