Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
timesheet
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
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
web2project
timesheet
Commits
d11bc0f2
Commit
d11bc0f2
authored
Jan 20, 2016
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setup.php: fix inserting of initial data.
parent
ed8c95d9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
9 deletions
+16
-9
setup.php
setup.php
+16
-9
No files found.
setup.php
View file @
d11bc0f2
...
@@ -197,16 +197,23 @@ class CSetupTimesheet extends w2p_System_Setup
...
@@ -197,16 +197,23 @@ class CSetupTimesheet extends w2p_System_Setup
}
}
private
function
_insertConfigurationData
()
{
private
function
_insertConfigurationData
()
{
$data
=
array
(
'timesheet_approval_by'
=>
'0'
,
'timesheet_book_year'
=>
'2014'
,
'timesheet_sort_order'
=>
'Ascending'
);
$q
=
new
w2p_Database_Query
();
$q
=
new
w2p_Database_Query
();
$q
->
addTable
(
'timesheet_config'
);
foreach
(
$data
as
$key
=>
$value
)
{
$q
->
addInsert
(
'timesheet_config'
,
'timesheet_approval_by'
);
$q
->
addTable
(
'timesheet_config'
);
$q
->
addInsert
(
'timesheet_value'
,
'0'
);
$q
->
addInsert
(
'timesheet_config'
,
$key
);
$q
->
addInsert
(
'timesheet_config'
,
'timesheet_book_year'
);
$q
->
addInsert
(
'timesheet_value'
,
$value
);
$q
->
addInsert
(
'timesheet_value'
,
'2014'
);
if
(
!
$q
->
exec
())
{
$q
->
addInsert
(
'timesheet_config'
,
'timesheet_sort_order'
);
db_error
();
$q
->
addInsert
(
'timesheet_value'
,
'Ascending'
);
return
false
;
$result
=
$q
->
exec
();
}
return
$result
;
$q
->
clear
();
}
return
true
;
}
}
}
}
...
...
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