Skip to content

Make plugins non-case sensitive for folder names, whilst allowing nicer display names #2428

@ddb4github

Description

@ddb4github

Under https://github.com/Cacti/documentation/blob/develop/Plugin-Guidelines.md#plugin-data-entry
I do not find 'name' field definition. But most Cacti official plugin INFO file have 'name' field.

If 'name' field is valid(or valid in future), how about show "plugin name" as diff below if INFO.name is a specified format, e.g. ionCube

--- plugins.php   2019-01-26 12:40:13.000000000 +0800
+++ plugins.php   2019-02-19 17:21:10.542168108 +0800
@@ -217,7 +217,7 @@
                                                (directory, name, status, author, webpage, version, requires, infoname)
                                                VALUES (?, ?, ?, ?, ?, ?, ?, ?)",
                                                array(
-                                                       $file,
+                                                       (strtolower($file) == strtolower($cinfo[$file]['name']) ? $cinfo[$file]['name'] : $file),
                                                        $cinfo[$file]['longname'],
                                                        $cinfo[$file]['status'],
                                                        $cinfo[$file]['author'],

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugUndesired behaviourpluginsPlugin related issueresolvedA fixed issue

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions