diff options
author | Colin Smith <colin@pfsense.org> | 2005-07-22 03:54:31 +0000 |
---|---|---|
committer | Colin Smith <colin@pfsense.org> | 2005-07-22 03:54:31 +0000 |
commit | 3a3c6b5ba10155dfb581ef8551d507a5712d1900 (patch) | |
tree | e3125ecb1357ac4a1ad9d0074d556085f13140f5 | |
parent | 3613998c9b201949530aa8a5601dea95e6cc477e (diff) | |
download | pfsense-3a3c6b5ba10155dfb581ef8551d507a5712d1900.zip pfsense-3a3c6b5ba10155dfb581ef8551d507a5712d1900.tar.gz |
Clean up get_filename_from_url.
-rw-r--r-- | etc/inc/pfsense-utils.inc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc index 484b864..bb055ca 100644 --- a/etc/inc/pfsense-utils.inc +++ b/etc/inc/pfsense-utils.inc @@ -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; } -?>
\ No newline at end of file +?> |