Forum

Outmode in jsonPlan...
 
Notifications
Retirer tout

Outmode in jsonPlanning.pdf

3 Posts
2 Utilisateurs
0 Reactions
2,275 Vu
(@antonio-grr)
Posts: 84
Active Member
Début du sujet
 
[#4091]

Hi.
In jsonPlanning.pdf at row 100 has been added the following lines :
if (array_key_exists('outMode', $_REQUEST) && $_REQUEST['outMode'] == 'csv') {
$outMode = 'csv';
} else {
$outMode = 'html';
}
So outMode will assume either the value 'csv' or 'html' and some tests in the following code semm to be useless.

( row 129)
if (! isset($outMode)) { $outMode=""; }
( row 244 )
if ($outMode=='mpp') {
exportGantt($result);
} else {
displayGantt($result);
}
(rows 853,861,867)
... and $outMode!='pdf'

The function exportGantt seems to be no more used.
Is it true ?


 
Posté : 9 Fév PM 21:022
(@babynus)
Posts: 14952
Membre Admin
 

In fact jsonPlanning_pdf.php is a contribution from member that was designed by copy of jsonPlanning.php and adapted to manage automatic zooming to fit pdf page width.
So, so functions may not be used in that file, only usefull for jsonPlanning.php.
It is the case for exportGantt() thzt is used only in jsonPlanning.php.
It's been preserve for simplicity and to easy reporting changes from jsonPlanning.php to jsonPlanning_pdf.php when needed (for some bug fixing for instance)


 
Posté : 9 Fév PM 22:022
(@antonio-grr)
Posts: 84
Active Member
Début du sujet
 

I'm very sorry : my question is misleading for a silly mistake. Where I wrote jsonPlanning.pdf I meant jsonPlanning.php (sometimes cut & paste creates monsters).
I know that the function exportGantt was not used in jsonPlanning_pdf.php; what's new is that now the same function is unreachable in jsonPlanning.php


 
Posté : 9 Fév PM 22:022
Share:
Retour en haut