- 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 */
|
/* Block hook */
|
||||||
function statistics_block($op = "list", $delta = 0) {
|
function statistics_block($op = "list", $delta = 0) {
|
||||||
if ($op == "list") {
|
if ($op == "list") {
|
||||||
|
if (variable_get("statistics_enable_node_counter", 0)) {
|
||||||
$blocks[0]["info"] = t("Top nodes");
|
$blocks[0]["info"] = t("Top nodes");
|
||||||
|
}
|
||||||
|
if (variable_get("statistics_enable_access_log", 0)) {
|
||||||
$blocks[1]["info"] = t("Who's online");
|
$blocks[1]["info"] = t("Who's online");
|
||||||
|
}
|
||||||
return $blocks;
|
return $blocks;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
@ -812,8 +812,12 @@ function statistics_get($nid) {
|
||||||
/* Block hook */
|
/* Block hook */
|
||||||
function statistics_block($op = "list", $delta = 0) {
|
function statistics_block($op = "list", $delta = 0) {
|
||||||
if ($op == "list") {
|
if ($op == "list") {
|
||||||
|
if (variable_get("statistics_enable_node_counter", 0)) {
|
||||||
$blocks[0]["info"] = t("Top nodes");
|
$blocks[0]["info"] = t("Top nodes");
|
||||||
|
}
|
||||||
|
if (variable_get("statistics_enable_access_log", 0)) {
|
||||||
$blocks[1]["info"] = t("Who's online");
|
$blocks[1]["info"] = t("Who's online");
|
||||||
|
}
|
||||||
return $blocks;
|
return $blocks;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Reference in New Issue