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
60badb2a
Commit
60badb2a
authored
Mar 25, 2008
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup tabs and replace them with spaces.
parent
80504d9a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
78 additions
and
78 deletions
+78
-78
setup.php
setup.php
+78
-78
No files found.
setup.php
View file @
60badb2a
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
*/
*/
/*
/*
* Copyright (C) 2007, M2X
* Copyright (C) 2007
-2008
, M2X
*
*
* Authors: Jean-Paul Saman
* Authors: Jean-Paul Saman
*
*
...
@@ -30,15 +30,15 @@
...
@@ -30,15 +30,15 @@
// MODULE CONFIGURATION DEFINITION
// MODULE CONFIGURATION DEFINITION
$config
=
array
();
$config
=
array
();
$config
[
'mod_name'
]
=
'Timesheet'
;
// name the module
$config
[
'mod_name'
]
=
'Timesheet'
;
// name the module
$config
[
'mod_version'
]
=
'1.0.2'
;
// add a version number
$config
[
'mod_version'
]
=
'1.0.2'
;
// add a version number
$config
[
'mod_directory'
]
=
'timesheet'
;
// tell dotProject where to find this module
$config
[
'mod_directory'
]
=
'timesheet'
;
// tell dotProject where to find this module
$config
[
'mod_setup_class'
]
=
'CSetupTimesheet'
;
// the name of the PHP setup class (used below)
$config
[
'mod_setup_class'
]
=
'CSetupTimesheet'
;
// the name of the PHP setup class (used below)
$config
[
'mod_type'
]
=
'user'
;
// 'core' for modules distributed with dP by standard, 'user' for additional modules from dotmods
$config
[
'mod_type'
]
=
'user'
;
// 'core' for modules distributed with dP by standard, 'user' for additional modules from dotmods
$config
[
'mod_ui_name'
]
=
'Timesheet'
;
// the name that is shown in the main menu of the User Interface
$config
[
'mod_ui_name'
]
=
'Timesheet'
;
// the name that is shown in the main menu of the User Interface
$config
[
'mod_ui_icon'
]
=
'communicate.gif'
;
// name of a related icon
$config
[
'mod_ui_icon'
]
=
'communicate.gif'
;
// name of a related icon
$config
[
'mod_description'
]
=
'Timesheet module for hour registration
s'
;
// some description of the module
$config
[
'mod_description'
]
=
'Timesheet module for hour registration
'
;
// some description of the module
$config
[
'mod_config'
]
=
true
;
// show 'configure' link in viewmods
$config
[
'mod_config'
]
=
true
;
// show 'configure' link in viewmods
// show module configuration with the dPframework (if requested via http)
// show module configuration with the dPframework (if requested via http)
if
(
@
$a
==
'setup'
)
{
if
(
@
$a
==
'setup'
)
{
...
@@ -47,77 +47,77 @@ if (@$a == 'setup') {
...
@@ -47,77 +47,77 @@ if (@$a == 'setup') {
class
CSetupTimesheet
{
class
CSetupTimesheet
{
function
configure
()
{
// configure this module
function
configure
()
{
global
$AppUI
;
global
$AppUI
;
$AppUI
->
redirect
(
'm=timesheet&a=configure'
);
// load module specific configuration page
$AppUI
->
redirect
(
'm=timesheet&a=configure'
);
// load module specific configuration page
return
true
;
return
true
;
}
}
function
remove
()
{
function
remove
()
{
$q
=
new
DBQuery
;
$q
=
new
DBQuery
()
;
$q
->
dropTable
(
'timesheet'
);
$q
->
dropTable
(
'timesheet'
);
$q
->
exec
();
$q
->
exec
();
$q
->
clear
();
$q
->
clear
();
$q
->
dropTable
(
'timesheet_project'
);
$q
->
dropTable
(
'timesheet_project'
);
$q
->
exec
();
$q
->
exec
();
return
null
;
return
null
;
}
}
function
upgrade
(
$old_version
)
{
function
upgrade
(
$old_version
)
{
// use this to provide upgrade functionality between different versions; not relevant here
// use this to provide upgrade functionality between different versions; not relevant here
switch
(
$old_version
)
switch
(
$old_version
)
{
{
case
"all"
:
// upgrade from scratch (called from install)
case
"all"
:
// upgrade from scratch (called from install)
case
"0.9"
:
case
"0.9"
:
//do some alter table commands
//do some alter table commands
case
"1.0"
:
case
"1.0"
:
case
"1.0.1"
:
case
"1.0.1"
:
case
"1.0.2"
:
case
"1.0.2"
:
return
true
;
return
true
;
default
:
default
:
return
false
;
return
false
;
}
}
return
false
;
return
false
;
}
}
function
install
()
{
function
install
()
{
// prepare the creation of a dbTable
// prepare the creation of a dbTable
$sql
=
"( "
.
$sql
=
"( "
.
" `timesheet_id` int(11) unsigned NOT NULL auto_increment,"
.
" `timesheet_id` int(11) unsigned NOT NULL auto_increment,"
.
" `timesheet_period` int(11)
, "
.
" `timesheet_period` int(11) NOT NULL default '0'
, "
.
" `timesheet_status` int(4) NOT NULL default '0', "
.
" `timesheet_status` int(4) NOT NULL default '0', "
.
" `timesheet_date` int(11) NOT NULL default '0', "
.
" `timesheet_date` int(11) NOT NULL default '0', "
.
" `timesheet_creator` int(11) NOT NULL default '0', "
.
" `timesheet_creator` int(11) NOT NULL default '0', "
.
" `timesheet_worked` int(11) NOT NULL default '0', "
.
" `timesheet_worked` int(11) NOT NULL default '0', "
.
" PRIMARY KEY (`timesheet_id`), "
.
" PRIMARY KEY (`timesheet_id`), "
.
" UNIQUE KEY `timesheet_id` (`timesheet_id`) "
.
" UNIQUE KEY `timesheet_id` (`timesheet_id`) "
.
") TYPE=MyISAM"
;
") TYPE=MyISAM"
;
$q
=
new
DBQuery
;
$q
=
new
DBQuery
;
$q
->
createTable
(
'timesheet'
);
$q
->
createTable
(
'timesheet'
);
$q
->
createDefinition
(
$sql
);
$q
->
createDefinition
(
$sql
);
$q
->
exec
();
$q
->
exec
();
db_error
();
db_error
();
$sql
=
"( "
.
$sql
=
"( "
.
" `timesheet_queue_id` int(11) NOT NULL auto_increment, "
.
" `timesheet_queue_id` int(11) NOT NULL auto_increment, "
.
" `timesheet_id` int(11) unsigned NOT NULL, "
.
" `timesheet_id` int(11) unsigned NOT NULL, "
.
" `timesheet_project` int(11) NOT NULL default '0', "
.
" `timesheet_project` int(11) NOT NULL default '0', "
.
" `timesheet_project_amount` bigint(20) NOT NULL default '0', "
.
" `timesheet_project_amount` bigint(20) NOT NULL default '0', "
.
" PRIMARY KEY (`timesheet_queue_id`) "
.
" PRIMARY KEY (`timesheet_queue_id`) "
.
") TYPE=MyISAM"
;
") TYPE=MyISAM"
;
$q
->
clear
();
$q
->
clear
();
$q
->
createTable
(
'timesheet_project'
);
$q
->
createTable
(
'timesheet_project'
);
$q
->
createDefinition
(
$sql
);
$q
->
createDefinition
(
$sql
);
$q
->
exec
();
$q
->
exec
();
db_error
();
db_error
();
return
null
;
return
null
;
}
}
}
}
?>
?>
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