Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
acf-weblog
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ACF
acf-weblog
Commits
97c78c56
Commit
97c78c56
authored
Apr 28, 2012
by
Ted Trask
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated for handle_form now passing self to get and set functions
parent
68a8022f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
weblog-model.lua
weblog-model.lua
+10
-10
No files found.
weblog-model.lua
View file @
97c78c56
...
...
@@ -739,7 +739,7 @@ local validatesource = function(sourcedata)
return
success
end
function
updatesource
(
sourcedata
)
function
updatesource
(
s
elf
,
s
ourcedata
)
local
success
=
validatesource
(
sourcedata
)
sourcedata
.
errtxt
=
"Failed to update source"
if
success
then
...
...
@@ -774,7 +774,7 @@ function getnewsource()
return
cfe
({
type
=
"group"
,
value
=
source
,
label
=
"Source"
})
end
function
createsource
(
sourcedata
)
function
createsource
(
s
elf
,
s
ourcedata
)
local
success
=
validatesource
(
sourcedata
)
sourcedata
.
errtxt
=
"Failed to create source"
if
success
then
...
...
@@ -999,7 +999,7 @@ function geteditselected()
return
cfe
({
type
=
"group"
,
value
=
result
,
label
=
"Select / Deselect log entries"
})
end
function
editselected
(
data
)
function
editselected
(
self
,
data
)
local
res
,
err
=
pcall
(
function
()
databaseconnect
(
DatabaseOwner
)
con
:
execute
(
"START TRANSACTION"
)
...
...
@@ -1089,7 +1089,7 @@ function getweblogparameters()
return
cfe
({
type
=
"group"
,
value
=
result
,
label
=
"Weblog Access Log"
})
end
function
getweblog
(
result
)
function
getweblog
(
self
,
result
)
local
success
=
validateweblogparameters
(
result
)
result
.
value
.
log
=
cfe
({
type
=
"list"
,
value
=
{},
label
=
"Weblog Access Log"
})
result
.
value
.
window
=
cfe
({
value
=
config
.
window
or
"5"
,
label
=
"Time Window"
})
...
...
@@ -1144,7 +1144,7 @@ function completeaudit(timestamp)
conf
.
value
.
auditstart
.
value
=
conf
.
value
.
auditend
.
value
local
now
=
os.time
()
conf
.
value
.
auditend
.
value
=
timestamp
or
os.date
(
"%Y-%m-%d %H:%M:%S"
,
now
-
now
%
86400
-
86400
)
conf
=
updateconfig
(
conf
)
conf
=
updateconfig
(
self
,
conf
)
local
retval
=
cfe
({
value
=
"Audit completed"
,
label
=
"Complete Audit Result"
})
if
conf
.
errtxt
then
retval
.
value
=
""
...
...
@@ -1210,7 +1210,7 @@ local function validateconfig(newconfig)
return
success
,
newconfig
end
function
updateconfig
(
newconfig
)
function
updateconfig
(
self
,
newconfig
)
local
success
=
validateconfig
(
newconfig
)
if
success
then
configcontent
=
format
.
update_ini_file
(
configcontent
,
""
,
"auditstart"
,
newconfig
.
value
.
auditstart
.
value
)
...
...
@@ -1242,7 +1242,7 @@ function getnewadhocquery()
return
cfe
({
type
=
"group"
,
value
=
query
,
label
=
"Ad-hoc Query"
})
end
function
adhocquery
(
query
)
function
adhocquery
(
self
,
query
)
local
success
=
true
query
.
value
.
query
.
value
=
query
.
value
.
query
.
value
:
lower
()
if
query
.
value
.
query
.
value
==
""
then
...
...
@@ -1309,7 +1309,7 @@ function getnewdatabase()
return
cfe
({
type
=
"group"
,
value
=
database
,
label
=
"Create Database"
,
errtxt
=
errtxt
})
end
function
create_database
(
database
)
function
create_database
(
self
,
database
)
local
success
=
true
local
errtxt
...
...
@@ -1378,6 +1378,6 @@ function readfile(filename)
return
modelfunctions
.
getfiledetails
(
filename
,
files
)
end
function
updatefile
(
filedetails
)
return
modelfunctions
.
setfiledetails
(
filedetails
,
files
)
function
updatefile
(
self
,
filedetails
)
return
modelfunctions
.
setfiledetails
(
self
,
filedetails
,
files
)
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment