Skip to content

Commit

Permalink
Update upgrade.php
Browse files Browse the repository at this point in the history
  • Loading branch information
webbird authored Feb 14, 2022
1 parent f329c5c commit 67c5c90
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -278,13 +278,17 @@ function scandir($directory, $sorting_order = 0)
// install the droplet(s)
if(!defined('CAT_PATH')) {
try {
include WB_PATH.'/modules/droplets/functions.inc.php';
make_dir(WB_PATH.'/temp/unzip');
wbce_unpack_and_import(WB_PATH.'/modules/news_img/droplets/droplet_getNewsItems.zip', WB_PATH . '/temp/unzip/');
rm_full_dir(WB_PATH.'/temp/unzip');
// workaround for problem with global $module_directory overwritten
// by functions.inc.php here
$orig_module_dir = $module_directory;
include WB_PATH.'/modules/droplets/functions.inc.php';
make_dir(WB_PATH.'/temp/unzip');
wbce_unpack_and_import(WB_PATH.'/modules/news_img/droplets/droplet_getNewsItems.zip', WB_PATH . '/temp/unzip/');
rm_full_dir(WB_PATH.'/temp/unzip');
$module_directory = $orig_module_dir;
} catch ( \Exception $e ) {}
} else {
CAT_Helper_Droplet::installDroplet(WB_PATH.'/modules/news_img/droplets/droplet_getNewsItems.zip');
}

}
}

0 comments on commit 67c5c90

Please sign in to comment.