Osclass forums

Support forums => General help => 3.7.x => Topic started by: marius-ciclistu on November 14, 2017, 02:00:12 pm

Title: Repair logo URL Bender (double slash // )
Post by: marius-ciclistu on November 14, 2017, 02:00:12 pm
The url of the bender logo has 2 slashes in it ...//bender_logo.png
Solution:
(please comment if this will break other things.)

/oc-content/themes/bender/functions.php
Replace
Code: [Select]

if( !function_exists('osc_uploads_url')) {
    function osc_uploads_url($item = '') {
        $logo = osc_get_preference('logo', 'bender');
        if ($logo != '' && file_exists(osc_uploads_path() . $logo)) {
            $path = str_replace(ABS_PATH, '', osc_uploads_path() . '/');
            return osc_base_url() . $path . $item;
        }
    }
}

with

Code: [Select]
if( !function_exists('osc_uploads_url')) {
    function osc_uploads_url($item = '') {
        $logo = osc_get_preference('logo', 'bender');
        if ($logo != '' && file_exists(osc_uploads_path() . $logo)) {
            $path = str_replace(ABS_PATH, '', osc_uploads_path() . '');
            return osc_base_url() . $path . $item;
        }
    }
}

PS
in osclass files the results of the search by "osc_uploads_url(" is only

oc-includes/osclass/gui/functions.php:                return osc_uploads_url($logo);
oc-includes/osclass/gui/functions.php:    function osc_uploads_url($item = '') {
oc-content/themes/bender/functions.php:                return osc_uploads_url($logo);
oc-content/themes/bender/functions.php:    function osc_uploads_url($item = '') {
Title: Re: Repair logo URL Bender (double slash // )
Post by: pixelpadre on November 24, 2018, 06:00:51 am
Is it safe to do this?
Title: Re: Repair logo URL Bender (double slash // )
Post by: marius-ciclistu on November 24, 2018, 11:11:17 am
I did it. Nothing broke.