Skip to content

Commit 0d91a2a

Browse files
committed
delete removeTrailingWhitespace function
1 parent d1c4f66 commit 0d91a2a

File tree

2 files changed

+1
-12
lines changed

2 files changed

+1
-12
lines changed

Diff for: resources/lib/UnitySite.php

-11
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,6 @@ public static function redirect($destination)
1414
}
1515
}
1616

17-
public static function removeTrailingWhitespace($arr)
18-
{
19-
$out = array();
20-
foreach ($arr as $str) {
21-
$new_string = rtrim($str);
22-
array_push($out, $new_string);
23-
}
24-
25-
return $out;
26-
}
27-
2817
public static function getGithubKeys($username)
2918
{
3019
$url = "https://api.github.com/users/$username/keys";

Diff for: webroot/panel/account.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
}
5252

5353
if (!empty($added_keys)) {
54-
$added_keys = UnitySite::removeTrailingWhitespace($added_keys);
54+
$added_keys = array_map(trim, $added_keys);
5555
$totalKeys = array_merge($USER->getSSHKeys(), $added_keys);
5656
$USER->setSSHKeys($totalKeys, $OPERATOR);
5757
}

0 commit comments

Comments
 (0)