Changeset

12922:aaf055d6fe7a

mod_admin_shell: Show reverse dependencies in module:info() Why was this module loaded? Now you can find out!
author Kim Alvefur <zash@zash.se>
date Sun, 05 Mar 2023 14:08:26 +0100
parents 12921:d238633a9d67
children 12924:ae0fba27fc24
files plugins/mod_admin_shell.lua
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_admin_shell.lua	Sun Mar 05 14:07:08 2023 +0100
+++ b/plugins/mod_admin_shell.lua	Sun Mar 05 14:08:26 2023 +0100
@@ -575,6 +575,12 @@
 				print("  - mod_" .. dep);
 			end
 		end
+		if mod.module.reverse_dependencies and next(mod.module.reverse_dependencies) ~= nil then
+			print("  reverse dependencies:");
+			for dep in pairs(mod.module.reverse_dependencies) do
+				print("  - mod_" .. dep);
+			end
+		end
 	end
 	return true;
 end