]> jfr.im git - irc/unrealircd/unrealircd-webpanel.git/blobdiff - index.php
Cater for unix domain socket mysql connections
[irc/unrealircd/unrealircd-webpanel.git] / index.php
index 11bcd2729f7b8e0b0e30302cb28d352501895b2d..36ef64b482091c9713d27555c439619480d86173 100644 (file)
--- a/index.php
+++ b/index.php
@@ -7,7 +7,19 @@ $stats = $rpc->query("stats.get", []);
 
 <h2>Network Overview</h2>
 
-<?php Hook::run(HOOKTYPE_PRE_OVERVIEW_CARD, $stats); ?>
+<?php
+$array_of_stats = (array)$stats;
+
+/* What if someone wants to add their own stats... */
+Hook::run(HOOKTYPE_PRE_OVERVIEW_CARD, $array_of_stats);
+
+/* This makes sure that a plugin which called the parameter
+ * by reference can add/update the stats for display here.
+*/
+$stats = (object) $array_of_stats;
+
+
+?>
 
 <div class="container mt-5">