mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Clean up get_filename_from_url.
This commit is contained in:
parent
3613998c9b
commit
3a3c6b5ba1
@ -492,9 +492,7 @@ function add_text_to_file($file, $text) {
|
||||
* get_filename_from_url($url): converts a url to its filename.
|
||||
*/
|
||||
function get_filename_from_url($url) {
|
||||
$filenamesplit = split("/", $url);
|
||||
foreach($filenamesplit as $fn) $filename = $fn;
|
||||
return $filename;
|
||||
return array_pop(explode("/", $filename));
|
||||
}
|
||||
|
||||
/*
|
||||
@ -988,4 +986,4 @@ function generate_random_mac() {
|
||||
return $mac;
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user