diff options
author | VirtualTam <virtualtam@flibidi.net> | 2016-01-02 20:09:29 +0100 |
---|---|---|
committer | VirtualTam <virtualtam@flibidi.net> | 2016-01-02 20:09:29 +0100 |
commit | defc8a3f033a44602c598c2028a9ee3ee2a86d1d (patch) | |
tree | efb09f1c0d7b16e2c2dcb0313157d93ece6775b4 /application | |
parent | 66d86ea521d737b1bc92b16b9c9b4126f545916c (diff) | |
parent | 938d9cce77ed5098dd69643795cb4014f3688b35 (diff) | |
download | Shaarli-defc8a3f033a44602c598c2028a9ee3ee2a86d1d.tar.gz Shaarli-defc8a3f033a44602c598c2028a9ee3ee2a86d1d.tar.zst Shaarli-defc8a3f033a44602c598c2028a9ee3ee2a86d1d.zip |
Merge pull request #417 from ArthurHoaro/wallabag-improve
Wallabag plugin improvement
Diffstat (limited to 'application')
-rw-r--r-- | application/Url.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/application/Url.php b/application/Url.php index af43b457..d80c9c58 100644 --- a/application/Url.php +++ b/application/Url.php | |||
@@ -52,6 +52,18 @@ function get_url_scheme($url) | |||
52 | } | 52 | } |
53 | 53 | ||
54 | /** | 54 | /** |
55 | * Adds a trailing slash at the end of URL if necessary. | ||
56 | * | ||
57 | * @param string $url URL to check/edit. | ||
58 | * | ||
59 | * @return string $url URL with a end trailing slash. | ||
60 | */ | ||
61 | function add_trailing_slash($url) | ||
62 | { | ||
63 | return $url . (!endsWith($url, '/') ? '/' : ''); | ||
64 | } | ||
65 | |||
66 | /** | ||
55 | * URL representation and cleanup utilities | 67 | * URL representation and cleanup utilities |
56 | * | 68 | * |
57 | * Form | 69 | * Form |