diff --git a/include/functions.php b/include/functions.php index 7a7fa61c..d6836bf3 100644 --- a/include/functions.php +++ b/include/functions.php @@ -2217,9 +2217,15 @@ function get_cat_folder($cat = 101) $catrow = get_category_row($cat); $catmode = $catrow['catmodename']; $caticonrow = get_category_icon_row($CURUSER['caticon']); + /** + * @since v1.6 + * use setting, not user's caticon, that filed make no sense! + */ +// $caticonrow = get_category_icon_row(get_setting('main.browsecat')); +// dd($caticonrow); $catPath[$cat] = "category/".$catmode."/".$caticonrow['folder'] . ($caticonrow['multilang'] == 'yes' ? $CURLANGDIR."/" : ""); } - return $catPath[$cat] ?? ''; + return trim($catPath[$cat] ?? '', '/'); } function get_style_highlight() @@ -4430,7 +4436,7 @@ function return_category_image($categoryid, $link="") } else { $categoryrow = get_category_row($categoryid); $catimgurl = get_cat_folder($categoryid); - $catImg[$categoryid] = $catimg = ""; + $catImg[$categoryid] = $catimg = ""; } if ($link) { $catimg = "".$catimg.""; diff --git a/public/catmanage.php b/public/catmanage.php index ab57fc19..a41f3ff3 100644 --- a/public/catmanage.php +++ b/public/catmanage.php @@ -49,7 +49,7 @@ function return_category_db_table_name($type) } return $dbtablename; } -function return_category_mode_selection($selname, $selectionid) +function return_category_mode_selection($selname, $selectedid) { $res = sql_query("SELECT * FROM searchbox ORDER BY id ASC"); $selection = "