Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
memcache-3339706
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Issue forks
memcache-3339706
Commits
a2f25b9c
Commit
a2f25b9c
authored
13 years ago
by
catch
Browse files
Options
Downloads
Patches
Plain Diff
Issue
1177512 by girishmuraly, hook_perm() is now hook_permission().
parent
02a0a4e7
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
memcache_admin/memcache_admin.module
+6
-6
6 additions, 6 deletions
memcache_admin/memcache_admin.module
with
6 additions
and
6 deletions
memcache_admin/memcache_admin.module
+
6
−
6
View file @
a2f25b9c
...
...
@@ -19,9 +19,9 @@ function memcache_admin_init() {
}
/**
* Implement
ation of
hook_perm().
* Implement
s
hook_perm().
*/
function
memcache_admin_perm
()
{
function
memcache_admin_perm
ission
()
{
return
array
(
'access memcache statistics'
=>
array
(
'title'
=>
t
(
'Access memcache statistics'
),
...
...
@@ -30,7 +30,7 @@ function memcache_admin_perm() {
}
/**
* Implement
ation of
hook_menu().
* Implement
s
hook_menu().
*/
function
memcache_admin_menu
()
{
$items
[
'admin/config/system/memcache'
]
=
array
(
...
...
@@ -133,8 +133,8 @@ function memcache_admin_stats($cluster = 'default', $type = 'default') {
$values
[
'limit_maxbytes'
]
=
format_size
(
$values
[
'limit_maxbytes'
]);
//Custom Entries
$values
[
'hit_percentage'
]
=
(
$values
[
'cmd_get'
]
>
0
)
?
number_format
(
100.0
*
$values
[
'get_hits'
]
/
$values
[
'cmd_get'
],
2
)
.
'%'
$values
[
'hit_percentage'
]
=
(
$values
[
'cmd_get'
]
>
0
)
?
number_format
(
100.0
*
$values
[
'get_hits'
]
/
$values
[
'cmd_get'
],
2
)
.
'%'
:
'0'
;
$mem_used
=
intval
(
$values
[
'bytes'
])
/
(
intval
(
$values
[
'limit_maxbytes'
])
*
1024
);
...
...
@@ -160,7 +160,7 @@ function memcache_admin_stats($cluster = 'default', $type = 'default') {
}
/**
* Implement
ation of
hook_theme().
* Implement
s
hook_theme().
*/
function
memcache_admin_theme
()
{
return
array
(
...
...
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