Commit 9c3bca06 authored by Dries's avatar Dries

- Added some missing quotes.
parent c7fc340e
...@@ -89,14 +89,16 @@ function statistics_perm() { ...@@ -89,14 +89,16 @@ function statistics_perm() {
function statistics_link($type, $node = 0, $main = 0) { function statistics_link($type, $node = 0, $main = 0) {
global $id; global $id;
$links = array();
if ($type == "node" && user_access("access statistics") && variable_get("statistics_display_counter", 0)) { if ($type == "node" && user_access("access statistics") && variable_get("statistics_display_counter", 0)) {
$statistics = statistics_get($node->nid); $statistics = statistics_get($node->nid);
if ($statistics) { if ($statistics) {
if (user_access("administer 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 { 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) { ...@@ -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); 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;
} }
......
...@@ -89,14 +89,16 @@ function statistics_perm() { ...@@ -89,14 +89,16 @@ function statistics_perm() {
function statistics_link($type, $node = 0, $main = 0) { function statistics_link($type, $node = 0, $main = 0) {
global $id; global $id;
$links = array();
if ($type == "node" && user_access("access statistics") && variable_get("statistics_display_counter", 0)) { if ($type == "node" && user_access("access statistics") && variable_get("statistics_display_counter", 0)) {
$statistics = statistics_get($node->nid); $statistics = statistics_get($node->nid);
if ($statistics) { if ($statistics) {
if (user_access("administer 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 { 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) { ...@@ -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); 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;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment