Advertisement:

Author Topic: Repair logo URL Bender (double slash // )  (Read 698 times)

marius-ciclistu

  • issues
  • Hero Member
  • *
  • Posts: 1652
  • "BE GRATEFUL TO THOSE THAT SUPPORTED YOU"
Repair logo URL Bender (double slash // )
« 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 = '') {
« Last Edit: November 23, 2017, 01:50:26 am by marius-ciclistu »

pixelpadre

  • Jr. Member
  • **
  • Posts: 76
Re: Repair logo URL Bender (double slash // )
« Reply #1 on: November 24, 2018, 06:00:51 am »
Is it safe to do this?

marius-ciclistu

  • issues
  • Hero Member
  • *
  • Posts: 1652
  • "BE GRATEFUL TO THOSE THAT SUPPORTED YOU"
Re: Repair logo URL Bender (double slash // )
« Reply #2 on: November 24, 2018, 11:11:17 am »
I did it. Nothing broke.