Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong directory for default theme's default.css file. #6

Open
SugarD-x opened this issue Dec 12, 2017 · 0 comments
Open

Wrong directory for default theme's default.css file. #6

SugarD-x opened this issue Dec 12, 2017 · 0 comments

Comments

@SugarD-x
Copy link

The Theme Manager currently pulls the default.css from the active theme, but if the active theme is the default MantisBT theme, it tries to pull it from a non-existent theme folder called "default" in "themes".

Here is the code:
` /**
* Load the theme file
*/
function loadTheme( $p_event ) {
global $g_css_include_file;
global $g_active_theme;
$themes = getcwd() . "/css/themes/";
$g_active_theme = plugin_config_get('active_theme');

    if (file_exists($themes . $active_theme)) {
        $g_css_include_file = "/css/themes/" . $g_active_theme . "/default.css";
    }
}`

This should probably be updated to detect the default theme when being used instead of a custom one, and pull its default.css properly, either by defaulting to the correct directory, or just not attempting to override it at all. (I'm not sure if the theme manager applies theme CSS files alongside the default one, or instead of it).

I don't know PHP well enough to actually code a fix, but I'm assuming it would be a check in the function as to whether the user had the default theme applied, and if so, use the standard directory instead of an active theme one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant