Skip to content

Commit bafd3d3

Browse files
committed
only run updates for installed modules
1 parent f6d6706 commit bafd3d3

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

tools/cli/commands/updates_run.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,18 @@ function runUpdates($type = 'core', $module = null)
4040
$u = new \OBFUpdates($module);
4141
$list = $u->updates();
4242
} else {
43+
$db = new \OBFDB();
44+
4345
// Run all module updates.
4446
$modules = array_filter(scandir('./modules/'), fn($f) => $f[0] !== '.');
4547
foreach ($modules as $module) {
48+
$db->where('directory', $module);
49+
$installed = $db->get_one('modules');
50+
if (! $installed) {
51+
continue;
52+
}
53+
54+
echo "Running updates for module {$module}..." . PHP_EOL;
4655
runUpdates('module', $module);
4756
}
4857
return false;

0 commit comments

Comments
 (0)