- Only export the "who is online" block when the access log is enabled.
Patch by Al. Fixed bug #1692. - Only export the "top nodes" block when the node counters are enabled.4.2.x
parent
badf1ca458
commit
07ab3915c4
|
@ -812,8 +812,12 @@ function statistics_get($nid) {
|
|||
/* Block hook */
|
||||
function statistics_block($op = "list", $delta = 0) {
|
||||
if ($op == "list") {
|
||||
$blocks[0]["info"] = t("Top nodes");
|
||||
$blocks[1]["info"] = t("Who's online");
|
||||
if (variable_get("statistics_enable_node_counter", 0)) {
|
||||
$blocks[0]["info"] = t("Top nodes");
|
||||
}
|
||||
if (variable_get("statistics_enable_access_log", 0)) {
|
||||
$blocks[1]["info"] = t("Who's online");
|
||||
}
|
||||
return $blocks;
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -812,8 +812,12 @@ function statistics_get($nid) {
|
|||
/* Block hook */
|
||||
function statistics_block($op = "list", $delta = 0) {
|
||||
if ($op == "list") {
|
||||
$blocks[0]["info"] = t("Top nodes");
|
||||
$blocks[1]["info"] = t("Who's online");
|
||||
if (variable_get("statistics_enable_node_counter", 0)) {
|
||||
$blocks[0]["info"] = t("Top nodes");
|
||||
}
|
||||
if (variable_get("statistics_enable_access_log", 0)) {
|
||||
$blocks[1]["info"] = t("Who's online");
|
||||
}
|
||||
return $blocks;
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Reference in New Issue