# HG changeset patch # User Matti Hamalainen # Date 1417089899 -7200 # Node ID 6234816c1e4393f16744eb67b529aca0a2407d16 # Parent 054b612df423588e61e2714394a9b37435179c77 Add number of entries to compo header tabs. diff -r 054b612df423 -r 6234816c1e43 admajax.php --- a/admajax.php Thu Nov 27 14:04:45 2014 +0200 +++ b/admajax.php Thu Nov 27 14:04:59 2014 +0200 @@ -1559,8 +1559,11 @@ $index = 0; foreach (stExecSQL("SELECT * FROM compos") as $compo) { + $ne = stFetchSQLColumn("SELECT COUNT(*) FROM entries WHERE compo_id=".$compo["id"]); if ($index++ > 0) echo ","; - echo "\"".$compo["id"]."\":\"".chentities($compo["name"])."\""; + echo + "\"".$compo["id"]."\":\"".chentities($compo["name"]). + (($ne !== false && $ne > 0) ? " (".$ne.")" : "")."\""; } break;