Completing 1ed4b9e7ec
As we already have an (unused) language
constant for this error, we seem to have
had this kind of check before ...
Signed-off-by: Thomas Hochstein <thh@inter.net>
* plugin_api.inc.php:
- Add static list of bundled plugins.
- Add function to check if plugin is
bundled.
* plugins.inc.php:
- Set source of plugin
(Spartacus, bundled or local).
* plugins.inc.tpl:
- Display plugin source.
* Add language constants.
Signed-off-by: Thomas Hochstein <thh@inter.net>
When installing / updating plugins, plugin data
is fetched from Spartacus first; those plugins
will habe "Spartacus" as "pluginlocation".
Later on, information about installed plugins
is fetched from cache / database, overwriting
the previously fetched data for all installed
plugins. After that, "pluginlocation" is
"local" even for plugins that live on
Spartacus if they have been installed.
So we save "pluginlocation" data to a new
"pluginsource" field before merging /
overwriting so we can detect plugins that
are available on Spartacus.
This data is present in plugins.inc.tpl
and can be used there.
Signed-off-by: Thomas Hochstein <thh@inter.net>
Note: Native to utf8 will not work if the data in the database table is actually utf8! These are helper functions for during the alpha, to make testing easier, not tasks for the beta/stable
"requirement_failures" from PHP is saved in
"requirements_failues" - "requirements" as
in plural, and with a typo. That doesn't make
sense. Let's use "requirement_failures"
everywhere.
Signed-off-by: Thomas Hochstein <thh@inter.net>
All messages and errors were appended to $msg
and $errormsg, respectively, creating one long
unformatted string - mostly unreadable.
So we make $msg and $errormsg arrays instead
and iterate over those arrays in the template,
displaying each message separately.
Fixes#525.
Signed-off-by: Thomas Hochstein <thh@inter.net>
Initial motivation for this rework was to add support for the responsive thumbnnails (#474). But it also is a re-implementation instead of an enahncement of the existing code because the moveMediaDirectory function had grown into a mess. It was very hard to debug possible renaming bugs, like https://board.s9y.org/viewtopic.php?f=3&t=21185. This approach uses several small functions instead that can be combined and re-used.