summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2003-04-21 12:20:25 +0000
committerDries Buytaert <dries@buytaert.net>2003-04-21 12:20:25 +0000
commit9c3bca068da98c170ff0c55e3d74db90dec7dfbb (patch)
treefc618e547e1cc169abd4d869601b8d64df6b7e23
parentc7fc340e837e3ff4f40177b5aee55472f0957075 (diff)
downloadbrdo-9c3bca068da98c170ff0c55e3d74db90dec7dfbb.tar.gz
brdo-9c3bca068da98c170ff0c55e3d74db90dec7dfbb.tar.bz2
- Added some missing quotes.
-rw-r--r--modules/statistics.module8
-rw-r--r--modules/statistics/statistics.module8
2 files changed, 10 insertions, 6 deletions
diff --git a/modules/statistics.module b/modules/statistics.module
index 7dec3f05d..4d18fc444 100644
--- a/modules/statistics.module
+++ b/modules/statistics.module
@@ -89,14 +89,16 @@ function statistics_perm() {
function statistics_link($type, $node = 0, $main = 0) {
global $id;
+ $links = array();
+
if ($type == "node" && user_access("access statistics") && variable_get("statistics_display_counter", 0)) {
$statistics = statistics_get($node->nid);
if ($statistics) {
if (user_access("administer statistics")) {
- $links[] = l(format_plural($statistics[totalcount], "1 read", "%count reads"), "admin/statistics/referrers/$node->nid");
+ $links[] = l(format_plural($statistics["totalcount"], "1 read", "%count reads"), "admin/statistics/referrers/$node->nid");
}
else {
- $links[] = format_plural($statistics[totalcount], "1 read", "%count reads");
+ $links[] = format_plural($statistics["totalcount"], "1 read", "%count reads");
}
}
}
@@ -133,7 +135,7 @@ function statistics_link($type, $node = 0, $main = 0) {
menu("admin/block/whos online block", "configure 'who is online' block", "statistics_admin", $help["who is online block"], 5);
}
- return $links ? $links : array();
+ return $links;
}
diff --git a/modules/statistics/statistics.module b/modules/statistics/statistics.module
index 7dec3f05d..4d18fc444 100644
--- a/modules/statistics/statistics.module
+++ b/modules/statistics/statistics.module
@@ -89,14 +89,16 @@ function statistics_perm() {
function statistics_link($type, $node = 0, $main = 0) {
global $id;
+ $links = array();
+
if ($type == "node" && user_access("access statistics") && variable_get("statistics_display_counter", 0)) {
$statistics = statistics_get($node->nid);
if ($statistics) {
if (user_access("administer statistics")) {
- $links[] = l(format_plural($statistics[totalcount], "1 read", "%count reads"), "admin/statistics/referrers/$node->nid");
+ $links[] = l(format_plural($statistics["totalcount"], "1 read", "%count reads"), "admin/statistics/referrers/$node->nid");
}
else {
- $links[] = format_plural($statistics[totalcount], "1 read", "%count reads");
+ $links[] = format_plural($statistics["totalcount"], "1 read", "%count reads");
}
}
}
@@ -133,7 +135,7 @@ function statistics_link($type, $node = 0, $main = 0) {
menu("admin/block/whos online block", "configure 'who is online' block", "statistics_admin", $help["who is online block"], 5);
}
- return $links ? $links : array();
+ return $links;
}