Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
simplesamlphp
Manage
Activity
Members
Labels
Plan
Jira
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Perun
Perun ProxyIdP
v1
simplesamlphp
Commits
a8f60543
Unverified
Commit
a8f60543
authored
7 years ago
by
Tim van Dijen
Committed by
GitHub
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Unused code + phpdoc
parent
aba79e5a
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
modules/statistics/lib/LogCleaner.php
+16
-2
16 additions, 2 deletions
modules/statistics/lib/LogCleaner.php
with
16 additions
and
2 deletions
modules/statistics/lib/LogCleaner.php
+
16
−
2
View file @
a8f60543
...
@@ -28,6 +28,9 @@ class sspmod_statistics_LogCleaner
...
@@ -28,6 +28,9 @@ class sspmod_statistics_LogCleaner
}
}
}
}
/*
* @return void
*/
public
function
dumpConfig
()
public
function
dumpConfig
()
{
{
echo
'Statistics directory : '
.
$this
->
statdir
.
"
\n
"
;
echo
'Statistics directory : '
.
$this
->
statdir
.
"
\n
"
;
...
@@ -35,7 +38,13 @@ class sspmod_statistics_LogCleaner
...
@@ -35,7 +38,13 @@ class sspmod_statistics_LogCleaner
echo
'Offset : '
.
$this
->
offset
.
"
\n
"
;
echo
'Offset : '
.
$this
->
offset
.
"
\n
"
;
}
}
public
function
clean
(
$debug
=
false
)
{
/*
* @param bool $debug
* @return array
*/
public
function
clean
(
$debug
=
false
)
{
if
(
!
is_dir
(
$this
->
statdir
))
{
if
(
!
is_dir
(
$this
->
statdir
))
{
throw
new
Exception
(
'Statistics module: output dir do not exists ['
.
$this
->
statdir
.
']'
);
throw
new
Exception
(
'Statistics module: output dir do not exists ['
.
$this
->
statdir
.
']'
);
}
}
...
@@ -49,7 +58,6 @@ class sspmod_statistics_LogCleaner
...
@@ -49,7 +58,6 @@ class sspmod_statistics_LogCleaner
$logparser
=
new
sspmod_statistics_LogParser
(
$logparser
=
new
sspmod_statistics_LogParser
(
$this
->
statconfig
->
getValue
(
'datestart'
,
0
),
$this
->
statconfig
->
getValue
(
'datelength'
,
15
),
$this
->
statconfig
->
getValue
(
'offsetspan'
,
44
)
$this
->
statconfig
->
getValue
(
'datestart'
,
0
),
$this
->
statconfig
->
getValue
(
'datelength'
,
15
),
$this
->
statconfig
->
getValue
(
'offsetspan'
,
44
)
);
);
$datehandler
=
new
sspmod_statistics_DateHandler
(
$this
->
offset
);
$results
=
array
();
$results
=
array
();
$sessioncounter
=
array
();
$sessioncounter
=
array
();
...
@@ -111,6 +119,12 @@ class sspmod_statistics_LogCleaner
...
@@ -111,6 +119,12 @@ class sspmod_statistics_LogCleaner
return
$todelete
;
return
$todelete
;
}
}
/*
* @param array $todelete
* @param string $outputfile
* @return void
*/
public
function
store
(
$todelete
,
$outputfile
)
public
function
store
(
$todelete
,
$outputfile
)
{
{
echo
"Preparing to delete ["
.
count
(
$todelete
)
.
"] trackids
\n
"
;
echo
"Preparing to delete ["
.
count
(
$todelete
)
.
"] trackids
\n
"
;
...
...
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