Skip to content

Commit e28c89c

Browse files
authored
absolute require, trailing whitespace, newline@eof (#189)
1 parent ab79344 commit e28c89c

20 files changed

+47
-48
lines changed

webroot/admin/ajax/get_group_members.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
require_once "../../../resources/autoload.php";
3+
require_once __DIR__ . "/../../../resources/autoload.php";
44

55
use UnityWebPortal\lib\UnityGroup;
66

webroot/admin/ajax/get_page_contents.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
require_once "../../../resources/autoload.php";
3+
require_once __DIR__ . "/../../../resources/autoload.php";
44

55
if (!$USER->isAdmin()) {
66
die();

webroot/admin/content.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
require_once "../../resources/autoload.php";
3+
require_once __DIR__ . "/../../resources/autoload.php";
44

55
if (!$USER->isAdmin()) {
66
die();

webroot/admin/notices.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
require_once "../../resources/autoload.php";
3+
require_once __DIR__ . "/../../resources/autoload.php";
44

55
if (!$USER->isAdmin()) {
66
die();

webroot/admin/pi-mgmt.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
require_once "../../resources/autoload.php";
3+
require_once __DIR__ . "/../../resources/autoload.php";
44

55
use UnityWebPortal\lib\UnityUser;
66
use UnityWebPortal\lib\UnityGroup;
@@ -90,9 +90,9 @@
9090
"<form action='' method='POST'>
9191
<input type='hidden' name='form_name' value='req'>
9292
<input type='hidden' name='uid' value='" . $request_user->getUID() . "'>
93-
<input type='submit' name='action' value='Approve'
93+
<input type='submit' name='action' value='Approve'
9494
onclick='return confirm(\"Are you sure you want to approve " . $request_user->getUID() . "?\");'>
95-
<input type='submit' name='action' value='Deny'
95+
<input type='submit' name='action' value='Deny'
9696
onclick='return confirm(\"Are you sure you want to deny " . $request_user->getUID() . "?\");'>
9797
</form>";
9898
echo "</td>";
@@ -130,7 +130,7 @@
130130
echo "<td><a href='mailto:" . $pi_user->getMail() . "'>" . $pi_user->getMail() . "</a></td>";
131131
echo "<td>";
132132
echo
133-
"<form action='' method='POST'
133+
"<form action='' method='POST'
134134
onsubmit='return confirm(\"Are you sure you want to remove " . $pi_group->getPIUID() . "?\")'>
135135
<input type='hidden' name='form_name' value='remGroup'>
136136
<input type='hidden' name='pi' value='" . $pi_group->getPIUID() . "'>

webroot/admin/user-mgmt.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
require_once "../../resources/autoload.php";
3+
require_once __DIR__ . "/../../resources/autoload.php";
44

55
use UnityWebPortal\lib\UnitySite;
66

@@ -63,7 +63,7 @@
6363
}
6464
echo "</td>";
6565
echo "<td>";
66-
echo "<form class='viewAsUserForm' action='' method='POST'
66+
echo "<form class='viewAsUserForm' action='' method='POST'
6767
onsubmit='return confirm(\"Are you sure you want to switch to the user " . $user->getUID() . "?\");'>
6868
<input type='hidden' name='form_name' value='viewAsUser'>
6969
<input type='hidden' name='uid' value='" . $user->getUID() . "'>

webroot/api/content/index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
header('Content-type: text/plain');
44

5-
require_once "../../../resources/autoload.php";
5+
require_once __DIR__ . "/../../../resources/autoload.php";
66

77
if (isset($_GET["line_wrap"])) {
88
$CHAR_WRAP = $_GET["line_wrap"];

webroot/api/notices/index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
header('Content-type: text/plain');
44

5-
require_once "../../../resources/autoload.php";
5+
require_once __DIR__ . "/../../../resources/autoload.php";
66

77
$notices = $SQL->getNotices();
88
$jsonArray = [];

webroot/index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
require_once "../resources/autoload.php";
3+
require_once __DIR__ . "/../resources/autoload.php";
44

55
require_once $LOC_HEADER;
66
?>

webroot/panel/account.php

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
require_once "../../resources/autoload.php";
3+
require_once __DIR__ . "/../../resources/autoload.php";
44

55
use UnityWebPortal\lib\UnitySite;
66

@@ -77,7 +77,6 @@
7777
case "account_deletion_request":
7878
$hasGroups = count($USER->getGroups()) > 0;
7979
if ($hasGroups) {
80-
die();
8180
break;
8281
}
8382
if (!$SQL->accDeletionRequestExists($USER->getUID())) {
@@ -115,16 +114,16 @@
115114
} elseif ($isActive) {
116115
echo "<p>You are curently a <strong>user</strong> on the Unity Cluster</p>";
117116
} else {
118-
echo "<p>You are currently not assigned to any PI, and will be
119-
<strong>unable to use the cluster</strong>. Go to the <a href='groups.php'>My PIs</a>
117+
echo "<p>You are currently not assigned to any PI, and will be
118+
<strong>unable to use the cluster</strong>. Go to the <a href='groups.php'>My PIs</a>
120119
page to join a PI, or click on the button below if you are a PI</p>";
121120
echo "<p>Students should not request a PI account.</p>";
122121
}
123122

124123
if (!$isPI) {
125124
if ($SQL->accDeletionRequestExists($USER->getUID())) {
126125
echo
127-
"<form action='' method='POST' id='piReq'
126+
"<form action='' method='POST' id='piReq'
128127
onsubmit='return confirm(\"Are you sure you want to request a PI account?\")'>
129128
<input type='hidden' name='form_type' value='pi_request'>";
130129
echo "<input type='submit' value='Request PI Account' disabled>";
@@ -135,7 +134,7 @@
135134
echo "</form>";
136135
} else {
137136
echo
138-
"<form action='' method='POST' id='piReq'
137+
"<form action='' method='POST' id='piReq'
139138
onsubmit='return confirm(\"Are you sure you want to request a PI account?\")'>
140139
<input type='hidden' name='form_type' value='pi_request'>";
141140
if ($SQL->requestExists($USER->getUID())) {
@@ -163,7 +162,7 @@
163162
echo
164163
"<div class='key-box'>
165164
<textarea spellcheck='false' readonly>" . $sshPubKeys[$i] . "</textarea>
166-
<form action='' id='del-" . $i . "'
165+
<form action='' id='del-" . $i . "'
167166
onsubmit='return confirm(\"Are you sure you want to delete this SSH key?\");' method='POST'>
168167
<input type='hidden' name='delIndex' value='$i'>
169168
<input type='hidden' name='form_type' value='delKey'>
@@ -182,7 +181,7 @@
182181

183182
<input type="hidden" name="form_type" value="loginshell">
184183

185-
<select id="loginSelector" name= "shellSelect">
184+
<select id="loginSelector" name= "shellSelect">
186185

187186
<option value="" disabled hidden>Select Login Shell...</option>
188187

@@ -209,10 +208,10 @@
209208
<?php
210209

211210
if ($found_selector) {
212-
echo "<input id='customLoginBox' type='text'
211+
echo "<input id='customLoginBox' type='text'
213212
placeholder='Enter login shell path (ie. /bin/bash)' name='shell'>";
214213
} else {
215-
echo "<input id='customLoginBox' type='text'
214+
echo "<input id='customLoginBox' type='text'
216215
placeholder='Enter login shell path (ie. /bin/bash)' name='shell' value='$cur_shell'>";
217216
}
218217

@@ -232,7 +231,7 @@
232231
echo "<p>You cannot request to delete your account while you are in a PI group.</p>";
233232
} else {
234233
echo
235-
"<form action='' method='POST' id='accDel'
234+
"<form action='' method='POST' id='accDel'
236235
onsubmit='return confirm(\"Are you sure you want to request an account deletion?\")'>
237236
<input type='hidden' name='form_type' value='account_deletion_request'>";
238237
if ($SQL->accDeletionRequestExists($USER->getUID())) {

0 commit comments

Comments
 (0)