View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
1899 | RackTables | default | public | 2019-03-07 11:57 | 2022-10-31 17:29 |
Reporter | netniv | Assigned To | infrastation | ||
Priority | normal | Severity | tweak | Reproducibility | always |
Status | assigned | Resolution | open | ||
Product Version | 0.21.1 | ||||
Summary | 1899: Documentation on plugin upgrade code is not clear | ||||
Description | When looking through the plugin upgrade code, the documentation makes reference to pluign_PLUGINNAME_install, etc. It then gives an example of upgrade code for 'myplugin' as: Example modeled after the core RackTables upgrader:
| ||||
Additional Information | This is incorrect as it should be plugin_myplugin_info() which would be the name of the plugin in the example. The documentation should also make it clearer to novice programmers who may try to replicate the code that the previously defined plugin_PLUGINNAME_upgrade would, for a plugin named 'myplugin' become plugin_myplugin_upgrade(). This would then help properly establish the link between the templated names (with uppercase characters) and the example names which have been properly replaced with myplugin. | ||||
Tags | No tags attached. | ||||
It may be worth adding a table to show how the functions look for 'myplugin' {| class="wikitable" !Name !Becomes |- |plugin_PLUGINNAME_info |plugin_myplugin_info |- |plugin_PLUGINNAME_init |plugin_myplugin_init |- |plugin_PLUGINNAME_install |plugin_myplugin_install |- |plugin_PLUGINNAME_uninstall |plugin_nyplugin_uninstall |- |plugin_PLUGINNAME_upgrade |plugin_myplugin_upgrade |} |
|
Thank you for the feedback. Aaron is the best man to review this. | |
I'd forgotten about this. | |
I have just looked through the wiki page and this issue, but found it a bit hard to follow. Are you saying that the plugin upgrade function should be plugin_myplugin_info()instead of plugin_myplugin_upgrade()? |
|
Sorry, been a while since I last logged into here. Re-reading what I wrote, I believe that the problem is the inconsistency in the naming. Using _plugin_ instead of _myplugin_ (which would be correct for the example). | |
Date Modified | Username | Field | Change |
---|---|---|---|
2019-03-07 11:57 | netniv | New Issue | |
2019-03-07 12:00 | netniv | Note Added: 0003919 | |
2019-03-09 21:18 | infrastation | Assigned To | => adoom42 |
2019-03-09 21:18 | infrastation | Status | new => assigned |
2019-03-09 21:18 | infrastation | Note Added: 0003921 | |
2021-07-13 17:26 | netniv | Note Added: 0004317 | |
2021-07-23 14:13 | infrastation | Assigned To | adoom42 => infrastation |
2021-07-23 14:13 | infrastation | Note Added: 0004335 | |
2022-10-31 17:29 | netniv | Note Added: 0004443 |