Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
MaarchCourrier
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Redmine
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Harbor Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maarch
MaarchCourrier
Commits
7c0eac57
Commit
7c0eac57
authored
10 years ago
by
Florian Azizian
Browse files
Options
Downloads
Patches
Plain Diff
FEAT
#2093
Add new functions for export
parent
2666c2f8
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
core/trunk/core/class/ExportControler.php
+71
-0
71 additions, 0 deletions
core/trunk/core/class/ExportControler.php
with
71 additions
and
0 deletions
core/trunk/core/class/ExportControler.php
+
71
−
0
View file @
7c0eac57
...
@@ -325,4 +325,75 @@ class ExportFunctions
...
@@ -325,4 +325,75 @@ class ExportFunctions
$line_value
->
makeLink_detail
=
$link
;
$line_value
->
makeLink_detail
=
$link
;
}
}
}
}
function
get_priority
(
$libelle
)
{
$endLastQuery
=
substr
(
$_SESSION
[
'last_select_query'
],
strpos
(
$_SESSION
[
'last_select_query'
],
'FROM'
)
);
$query_priority
=
"SELECT priority FROM res_view_letterbox WHERE res_id = ##res_id## "
;
$db
=
new
dbquery
();
$db
->
connect
();
$i
=
0
;
foreach
(
$this
->
object_export
as
$line_name
=>
$line_value
)
{
if
(
$i
==
0
)
{
$line_value
->
get_priority
=
$libelle
;
$i
++
;
continue
;
}
$res_id
=
$line_value
->
res_id
;
$query
=
str_replace
(
'##res_id##'
,
$res_id
,
$query_priority
);
$db
->
query
(
$query
);
$result
=
$db
->
fetch_object
();
$link_label
=
$_SESSION
[
'mail_priorities'
][
$result
->
priority
];
$line_value
->
get_priority
=
$link_label
;
}
}
function
get_status
(
$libelle
)
{
$endLastQuery
=
substr
(
$_SESSION
[
'last_select_query'
],
strpos
(
$_SESSION
[
'last_select_query'
],
'FROM'
)
);
$query_status
=
"SELECT label_status FROM res_view_letterbox LEFT JOIN status on res_view_letterbox.status = status.id WHERE res_id = ##res_id## "
;
$db
=
new
dbquery
();
$db
->
connect
();
$i
=
0
;
foreach
(
$this
->
object_export
as
$line_name
=>
$line_value
)
{
if
(
$i
==
0
)
{
$line_value
->
get_status
=
$libelle
;
$i
++
;
continue
;
}
$res_id
=
$line_value
->
res_id
;
$query
=
str_replace
(
'##res_id##'
,
$res_id
,
$query_status
);
$db
->
query
(
$query
);
$result
=
$db
->
fetch_object
();
$line_value
->
get_status
=
$result
->
label_status
;
}
}
}
}
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