Overview
Comment:Change to ADMIN_URL for absolute URIs to admin
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | stable
Files: files | file ages | folders
SHA3-256: 33f97696beea5e18cce109350b2660ee9150c3f3b02e5121bc0d7f3cc4ded189
User & Date: bohwaz on 2021-11-27 15:44:14
Other Links: manifest | tags
Context
2021-11-29
15:10
Add filters to UserTemplates: 'delete_leading_number' and 'get_leading_number' check-in: 4f0dbadebc user: bohwaz tags: trunk, stable
2021-11-27
15:44
Change to ADMIN_URL for absolute URIs to admin check-in: 33f97696be user: bohwaz tags: trunk, stable
2021-11-26
16:59
Make sure temporary files are deleted when creating a PDF using a plugin check-in: 045748f2c2 user: bohwaz tags: trunk, stable
Changes

Modified src/include/lib/Garradin/Utils.php from [d5885f5206] to [566236e188].

177
178
179
180
181
182
183



184
185
186
187
188
189
190
        return sprintf('%s%s%s%s', $sign, number_format($number, 0, $dec_point, $thousands_sep), $dec_point, $decimals);
    }

    static public function getLocalURL(string $url = '', ?string $default_prefix = null): string
    {
        if ($url[0] == '!') {
            return ADMIN_URL . substr($url, 1);



        }
        elseif ($url[0] == '/' && ($pos = strpos($url, WWW_URI)) === 0) {
            return WWW_URL . substr($url, strlen(WWW_URI));
        }
        elseif (substr($url, 0, 5) == 'http:' || substr($url, 0, 6) == 'https:') {
            return $url;
        }







>
>
>







177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
        return sprintf('%s%s%s%s', $sign, number_format($number, 0, $dec_point, $thousands_sep), $dec_point, $decimals);
    }

    static public function getLocalURL(string $url = '', ?string $default_prefix = null): string
    {
        if ($url[0] == '!') {
            return ADMIN_URL . substr($url, 1);
        }
        elseif (substr($url, 0, 7) == '/admin/') {
            return ADMIN_URL . substr($url, 7);
        }
        elseif ($url[0] == '/' && ($pos = strpos($url, WWW_URI)) === 0) {
            return WWW_URL . substr($url, strlen(WWW_URI));
        }
        elseif (substr($url, 0, 5) == 'http:' || substr($url, 0, 6) == 'https:') {
            return $url;
        }