Skip to content

Commit 1deb2fd

Browse files
committed
updates to licenses module
1 parent 79677be commit 1deb2fd

2 files changed

Lines changed: 13 additions & 8 deletions

File tree

myadmin.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@
55
- add way to call/hook into install/uninstall
66
*/
77
return [
8-
'name' => 'Licenses Licensing VPS Addon',
9-
'description' => 'Allows selling of Licenses Server and VPS License Types. More info at https://www.netenberg.com/licenses.php',
10-
'help' => 'It provides more than one million end users the ability to quickly install dozens of the leading open source content management systems into their web space. Must have a pre-existing cPanel license with cPanelDirect to purchase a licenses license. Allow 10 minutes for activation.',
11-
'module' => 'vps',
8+
'name' => 'MyAdmin Licensing Module',
9+
'description' => 'Allows selling of Licenses.',
10+
'help' => '',
11+
'module' => 'licenses',
1212
'author' => 'detain@interserver.net',
13-
'home' => 'https://github.com/detain/myadmin-licenses-vps-addon',
14-
'repo' => 'https://github.com/detain/myadmin-licenses-vps-addon',
13+
'home' => 'https://github.com/detain/myadmin-licenses-module',
14+
'repo' => 'https://github.com/detain/myadmin-licenses-module',
1515
'version' => '1.0.0',
16-
'type' => 'addon',
16+
'type' => 'module',
1717
'hooks' => [
18-
'vps.load_processing' => ['Detain\MyAdminLicenses\Plugin', 'Load'],
18+
'licenses.load_processing' => ['Detain\MyAdminLicenses\Plugin', 'Load'],
1919
/* 'function.requirements' => ['Detain\MyAdminLicenses\Plugin', 'Requirements'],
2020
'licenses.settings' => ['Detain\MyAdminLicenses\Plugin', 'Settings'],
2121
'licenses.activate' => ['Detain\MyAdminLicenses\Plugin', 'Activate'],

src/Plugin.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,9 @@ public static function Load(GenericEvent $event) {
5050

5151
}
5252

53+
public static function Settings(GenericEvent $event) {
54+
// will be executed when the licenses.settings event is dispatched
55+
$settings = $event->getSubject();
56+
$settings->add_dropdown_setting('licenses', 'General', 'outofstock_licenses', 'Out Of Stock Licenses', 'Enable/Disable Sales Of This Type', $settings->get_setting('OUTOFSTOCK_LICENSES'), array('0', '1'), array('No', 'Yes', ));
57+
}
5358
}

0 commit comments

Comments
 (0)