Skip to content

Commit 15c1404

Browse files
author
Marius Burkard
committed
- fixed missing globals
1 parent b8b1b54 commit 15c1404

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

server/lib/classes/addon_installer.inc.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ private function extractPackage($package_file) {
5454
* @throws AddonInstallerValidationException
5555
*/
5656
private function validatePackage($path) {
57+
global $app;
58+
5759
$app->log('Validating extracted addon at ' . $path, 0, false);
5860

5961
if(!is_dir($path)) {

server/lib/classes/ispconfig_addon_installer_base.inc.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public function setAddonTempDir($path) {
3434
}
3535

3636
protected function copyInterfaceFiles() {
37-
global $conf;
37+
global $app, $conf;
3838

3939
$app->log('Copying interface files.', 0, false);
4040
$install_dir = realpath($conf['rootpath'] . '/..');
@@ -56,7 +56,7 @@ protected function copyInterfaceFiles() {
5656
}
5757

5858
protected function copyServerFiles() {
59-
global $conf;
59+
global $app, $conf;
6060

6161
$app->log('Copying server files.', 0, false);
6262

@@ -169,6 +169,8 @@ protected function executeSqlStatements() {
169169
public function onBeforeInstall() { }
170170

171171
public function onInstall() {
172+
global $app;
173+
172174
$app->log('Running onInstall()', 0, false);
173175
$this->copyAddonFiles();
174176
$this->copyInterfaceFiles();
@@ -182,6 +184,8 @@ public function onAfterInstall() { }
182184
public function onBeforeUpdate() { }
183185

184186
public function onUpdate() {
187+
global $app;
188+
185189
$app->log('Running onUpdate()', 0, false);
186190
$this->copyAddonFiles();
187191
$this->copyInterfaceFiles();

0 commit comments

Comments
 (0)