Skip to content

Commit 9510c54

Browse files
committed
cleanup
1 parent 3f55456 commit 9510c54

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

webroot/admin/content.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@
5151
.catch(error => {
5252
console.error(error)
5353
});
54-
const prefix = '<?php echo CONFIG["site"]["prefix"]; ?>';
54+
const url = '<?php echo getURL("admin/ajax/get_page_contents.php"); ?>';
5555
$("#pageForm > select[name=pageSel]").change(function(e) {
5656
$.ajax({
57-
url: `${prefix}/admin/ajax/get_page_contents.php?pageid=` + $(this).val(),
57+
url: `${url}?pageid=` + $(this).val(),
5858
success: function(result) {
5959
mainEditor.setData(result);
6060
}});

webroot/panel/account.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@
128128
echo "<p>You are curently a <strong>qualified user</strong> on the Unity Cluster</p>";
129129
} else {
130130
$tos_url = CONFIG["site"]["terms_of_service_url"];
131-
$sitePrefix = substr(getURL(""), strlen(CONFIG["site"]["url"]), -1);
131+
$form_url = getURL("panel/groups.php");
132132
echo "
133133
<p>
134134
You are currently an <strong>unqualified user</strong>, and will be
@@ -137,7 +137,7 @@
137137
Do not request a PI group if you are a student.
138138
</p>
139139
<br>
140-
<form action='$sitePrefix/panel/groups.php' method='GET'>
140+
<form action='$form_url' method='GET'>
141141
<label>
142142
<input type='checkbox' name='tos' value='agree' required />
143143
I have read and accept the
@@ -269,11 +269,11 @@
269269
?>
270270

271271
<script>
272-
const sitePrefix = '<?php echo CONFIG["site"]["prefix"]; ?>';
272+
const url = '<?php echo getURL("panel/modal/new_key.php")?>';
273273
const ldapLoginShell = '<?php echo $USER->getLoginShell(); ?>';
274274

275275
$("button.btnAddKey").click(function() {
276-
openModal("Add New Key", `${sitePrefix}/panel/modal/new_key.php`);
276+
openModal("Add New Key", url);
277277
});
278278

279279
$("#loginSelector option").each(function(i, e) {

webroot/panel/modal/new_pi.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@
2626
<script>
2727
$("input[type=text][name=pi]").keyup(function() {
2828
var searchWrapper = $("div.searchWrapper");
29-
const prefix = '<?php echo CONFIG["site"]["prefix"]; ?>';
29+
const url = '<?php echo getURL("panel/modal/pi_search.php") ?>';
3030
$.ajax({
31-
url: `${prefix}/panel/modal/pi_search.php?search=` + $(this).val(),
31+
url: `${url}?search=` + $(this).val(),
3232
success: function(result) {
3333
searchWrapper.html(result);
3434

0 commit comments

Comments
 (0)