We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 726e398 commit 32867b1Copy full SHA for 32867b1
config/areas/system/dialogs.php
@@ -74,14 +74,7 @@
74
];
75
},
76
'submit' => function () {
77
- $kirby = App::instance();
78
- $license = $kirby->system()->license();
79
- $file = $license->root();
80
-
81
- if (F::exists($file) === true) {
82
- return F::remove($file);
83
- }
84
+ App::instance()->system()->license()->delete();
85
return true;
86
}
87
],
src/Cms/License.php
@@ -101,6 +101,14 @@ public function date(
101
return $this->date !== null ? Str::date(strtotime($this->date), $format, $handler) : null;
102
103
104
+ /**
105
+ * Deletes the license file if it exists.
106
+ */
107
+ public function delete(): bool
108
+ {
109
+ return F::remove($this->root());
110
+ }
111
+
112
/**
113
* Returns the activation domain if available
114
*/
0 commit comments