Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
charts
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
drupal.org
charts
Commits
059aad8a
Commit
059aad8a
authored
15 years ago
by
Bruno Massa
Browse files
Options
Downloads
Patches
Plain Diff
Bugs fixed:
* Node activity from Charts system fixed.
parent
63faa7d9
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
charts_system/charts_system.inc
+7
-9
7 additions, 9 deletions
charts_system/charts_system.inc
with
7 additions
and
9 deletions
charts_system/charts_system.inc
+
7
−
9
View file @
059aad8a
...
@@ -48,7 +48,7 @@ function _charts_system_charts($ctype) {
...
@@ -48,7 +48,7 @@ function _charts_system_charts($ctype) {
FROM {users_roles} ur
FROM {users_roles} ur
LEFT JOIN {users} u ON ur.uid = u.uid
LEFT JOIN {users} u ON ur.uid = u.uid
LEFT JOIN {role} r ON r.rid = ur.rid
LEFT JOIN {role} r ON r.rid = ur.rid
GROUP BY r.rid
GROUP BY r.rid
, r.name
ORDER BY r.name'
ORDER BY r.name'
);
);
$output
.
=
_charts_system_generate
(
$output
.
=
_charts_system_generate
(
...
@@ -147,24 +147,22 @@ function _charts_system_node_activity() {
...
@@ -147,24 +147,22 @@ function _charts_system_node_activity() {
while
(
$result
=
db_fetch_array
(
$results
))
{
while
(
$result
=
db_fetch_array
(
$results
))
{
$day
=
ltrim
(
date
(
'd'
,
$result
[
'created'
]),
'0'
);
$day
=
ltrim
(
date
(
'd'
,
$result
[
'created'
]),
'0'
);
$types
[
]
=
$result
[
'type'
];
$types
[
$result
[
'type'
]
]
=
$type
++
;
$counts
[
$day
][
$result
[
'type'
]]
++
;
$counts
[
$day
][
$result
[
'type'
]]
++
;
}
}
// Generate data and labels
// Generate data and labels
if
(
!
empty
(
$counts
))
{
if
(
!
empty
(
$counts
))
{
for
(
$i
=
1
;
$i
<=
date
(
'd'
,
$now
);
$i
++
)
{
for
each
(
$types
as
$type
=>
$index
)
{
foreach
(
$types
as
$index
=
>
$type
)
{
$chart
[
$type
][
'#legend'
]
=
$type
;
$chart
[
$index
][
'#legend'
]
=
$type
;
for
(
$i
=
1
;
$i
<=
date
(
'd'
,
$now
);
$i
++
)
{
$chart
[
$
index
][]
=
array
(
$chart
[
$
type
][]
=
array
(
'#value'
=>
empty
(
$counts
[
$i
][
$type
])
?
0
:
$counts
[
$i
][
$type
],
'#value'
=>
empty
(
$counts
[
$i
][
$type
])
?
0
:
$counts
[
$i
][
$type
],
'#label'
=>
empty
(
$index
)
?
$i
:
NULL
'#label'
=>
$i
);
);
}
}
}
}
}
if
(
!
empty
(
$chart
))
{
$chart
[
'#title'
]
=
t
(
'Activity for !date'
,
array
(
'!date'
=>
date
(
'F Y'
,
$now
)));
$chart
[
'#title'
]
=
t
(
'Activity for !date'
,
array
(
'!date'
=>
date
(
'F Y'
,
$now
)));
$chart
[
'#type'
]
=
'line2D'
;
$chart
[
'#type'
]
=
'line2D'
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment