Of course, this is a personal perspective, nothing more.
BTW, I had absolutely no problem when starting with KB. So what?
Of course, this is a personal perspective, nothing more.
BTW, I had absolutely no problem when starting with KB. So what?
Why not?
Progress so farā¦
STILL NOT READY FOR RELEASEā¦
You can sort it by php built-in function:
https://www.php.net/manual/en/function.array-multisort.php
Just an additional thought:
For me, an important plugin property would be, whether the plugin modifies the database scheme. Even if I know that this wonāt be cleaned up on uninstallation. Unfortunately, there are no resources for that, it always has to be done manually. This property (has Schema directory) would be helpful for users that try or test plugins frequently.
Recent example: The plugin SubtaskDescription adds a new column to the subtask table. After uninstalling the plugin, that addition remains forever, even if no longer useful.
Keep it clean and proper!ā¢
I understand and agree with you on thatā¦
for the schema issue, could we not adjust/adapt what @creecros did for getting the latest versio of KBā¦
if (strpos(APP_VERSION, 'master') !== false && file_exists('ChangeLog')) { $accurate_version = trim(file_get_contents('ChangeLog', false, null, 8, 6), ' '); }
i mean could the above not be changed to check for a schema folder?
Yeah, for installed plugins that should be possible. But real coolness comes up, when you know that from all plugins, in advance, before installing them.
if a schema folder exists in a plugin, its there to modify you database. would be an easy thing to check for, if you are trying to write code to detect that.
also, makes me wonder though, does it have to be there foreverā¦never really thought about that. What would it take to undo.
thought experiment:
$pdo->exec("ALTER TABLE `subtasks` ADD COLUMN `due_description` TEXT NOT NULL DEFAULT ''");
$pdo->exec("ALTER TABLE `subtasks` DROP COLUMN `due_description`");
Not to forget dropping the appropriate record in table āplugin_schema_versionsā.
I tried this but it didnāt work:
<?php
$pluginName = $this->text->e($plugin->getPluginName())
?>
<?php if (SchemaHandler::hasSchema($pluginName)): ?>
This plugin makes database changes
<?php endif ?>
What exactly didnāt work?
it doesnt load the page
Quick & dirty: I think you need the full qualified name.
<?php $schema = Kanboard\Core\Plugin\SchemaHandler::hasSchema($plugin->getPluginName()); ?>
<?= $schema ? " YES" : " NO" ?>
nice but this still doesnt work on 1.2.20
Iām on the current version, and I donāt have any 1.2.20 running. Sorry.
stop testing on old stuff
getPluginName() will work on installed plugins, but it will not work on info from the Directory.
ya thats a bust, there wouldnāt be any way to determine the schema at all, if it is not already installedā¦
if the info is not here:
we canāt conjure it. Wellā¦maybe we could, if we check the github pageā¦hmmm
Yes, I know that. I think scanning the entire directory would be too expensive for practical use.
Ya, weād have to do more than just scan the directory, weād have to scan each github repo associated with each plugin within the directory.