[Glpi-dev] Reports Updated Patch

2009-06-02 Thread Roque, Dan
Changes:

 

-  Fixed order issue with $colnames. You can now specify
column titles in any order without data being in shown in wrong column.

-  If setColumnsName called = display only named columns in
$columns.

Else display all columns with default name (from SQL query).

 

 

 

186c186,187

  $nbcols =
$DB-num_fields($res);

---

  // if empty count select
columns else count $columns

  $nbcols =
(empty($this-columns)) ? $DB-num_fields($res) : count($this-columns);

194,199c195,211

  

  for ($i = 0; $i 
$nbcols; $i++) {

  $colname
= $DB-field_name($res, $i);

  $coltitle
= (isset ($this-columns[$colname]) ? $this-columns[$colname] :
$colname);

  echo
displaySearchHeaderItem($output_type, $coltitle, $num);


$colsname[] = $colname;

---

  // If setColumnsNames was
set, show only user specified columns

  // else display all
default column titles

  if
(!empty($this-columns)) { 

  for ($i =
0; $i  $nbcols; $i++) { 


$coltitle = current($this-columns);


echo displaySearchHeaderItem($output_type, $coltitle, $num);


$colsname[] = $coltitle;


next($this-columns);

  }

  }

  // else display all
columns with default select column titles

  else { 

  for ($i =
0; $i  $nbcols; $i++) {


$colname = $DB-field_name($res, $i);


echo displaySearchHeaderItem($output_type, $colname, $num);


$colsname[] = $colname;

  }

___
Glpi-dev mailing list
Glpi-dev@gna.org
https://mail.gna.org/listinfo/glpi-dev


[Glpi-dev] Reports plugin configuration (No input file specified. )

2009-06-02 Thread Wouter Beens
Hey,

 

When you configurate the Reports plug-in.

 

and click

Report configuration : Duplicate computers

 

And then want to go back to:

Reports plug-in configuration

 

You get an error:

No input file specified.

 

Reports/report/doublons/doubloons.config.php

 

Bug?

86:  //tr class='tab_bg_1' align='center'tha
href='./config.form.php' .$LANG['plugin_reports']['config'][1] .
/abr /nbsp;br / .

87:  //$LANG['plugin_reports']['config'][11] .  :  .
$LANG['plugin_reports']['doublons'][1] . /th/tr\n;

 

Works: 

86:  tr class='tab_bg_1' align='center'tha href=' .
GLPI_ROOT . /plugins/reports/front/plugin_reports.config.form.php'
.$LANG['plugin_reports']['config'][1] . /abr /nbsp;br / .

87:  $LANG['plugin_reports']['config'][11] .  :  .
$LANG['plugin_reports']['doublons'][1] . /th/tr\n;

 

 

 

Greatings,

Wouter

___
Glpi-dev mailing list
Glpi-dev@gna.org
https://mail.gna.org/listinfo/glpi-dev


Re: [Glpi-dev] Reports plugin configuration (No input file specified. )

2009-06-02 Thread Walid Nouh
Thank you,
I corrected the link

Walid.

Wouter Beens a écrit :

 Hey,

  

 When you configurate the Reports plug-in.

  

 and click

 Report configuration : Duplicate computers

  

 And then want to go back to:

 Reports plug-in configuration

  

 You get an error:

 No input file specified.

  

 Reports/report/doublons/doubloons.config.php

  

 Bug?

 86:  //tr class='tab_bg_1' align='center'tha 
 href='./config.form.php' .$LANG['plugin_reports']['config'][1] . 
 /abr /nbsp;br / .

 87:  //$LANG['plugin_reports']['config'][11] .  :  . 
 $LANG['plugin_reports']['doublons'][1] . /th/tr\n;

  

 Works:

 86:  tr class='tab_bg_1' align='center'tha href=' . 
 GLPI_ROOT . /plugins/reports/front/plugin_reports.config.form.php' 
 .$LANG['plugin_reports']['config'][1] . /abr /nbsp;br / .

 87:  $LANG['plugin_reports']['config'][11] .  :  . 
 $LANG['plugin_reports']['doublons'][1] . /th/tr\n;

  

  

  

 Greatings,

 Wouter

 

 ___
 Glpi-dev mailing list
 Glpi-dev@gna.org
 https://mail.gna.org/listinfo/glpi-dev
   


___
Glpi-dev mailing list
Glpi-dev@gna.org
https://mail.gna.org/listinfo/glpi-dev


Re: [Glpi-dev] Glpi-dev Digest, Vol 48, Issue 3

2009-06-02 Thread Wouter Beens
Hey
I think here is sort of the same problem. Link does not go back a level
up.

Wrong:
72: echo tr class='tab_bg_3' align='center'td
colspan='.($crit0?'3':'2').'a href='./doublons.php' .
$LANG['plugin_reports']['config'][11] . /a/td/tr\n;

Good:   
72: echo tr class='tab_bg_3' align='center'td
colspan='.($crit0?'3':'2').'a href='./doublons.config.php' .
$LANG['plugin_reports']['config'][11] . /a/td/tr\n;

Wouter



-Oorspronkelijk bericht-
Van: glpi-dev-boun...@gna.org [mailto:glpi-dev-boun...@gna.org] Namens
glpi-dev-requ...@gna.org
Verzonden: dinsdag 2 juni 2009 12:01
Aan: glpi-dev@gna.org
Onderwerp: Glpi-dev Digest, Vol 48, Issue 3

Send Glpi-dev mailing list submissions to
glpi-dev@gna.org

To subscribe or unsubscribe via the World Wide Web, visit
https://mail.gna.org/listinfo/glpi-dev
or, via email, send a message with subject or body 'help' to
glpi-dev-requ...@gna.org

You can reach the person managing the list at
glpi-dev-ow...@gna.org

When replying, please edit your Subject line so it is more specific
than Re: Contents of Glpi-dev digest...


Today's Topics:

   1. Reports plugin configuration (No input file specified. )
  (Wouter Beens)
   2. Re: Reports plugin configuration (No input file specified. )
  (Walid Nouh)


--

Message: 1
Date: Tue, 2 Jun 2009 10:14:10 +0200
From: Wouter Beens osg_...@dehogeberg.nl
Subject: [Glpi-dev] Reports plugin configuration (No input file
specified. )
To: glpi-dev@gna.org
Message-ID:

3035d1efd649bb4d95f2b55cbdbfea005d0...@mailserver.dehogeberg.nl
Content-Type: text/plain; charset=us-ascii

Hey,

 

When you configurate the Reports plug-in.

 

and click

Report configuration : Duplicate computers

 

And then want to go back to:

Reports plug-in configuration

 

You get an error:

No input file specified.

 

Reports/report/doublons/doubloons.config.php

 

Bug?

86:  //tr class='tab_bg_1' align='center'tha
href='./config.form.php' .$LANG['plugin_reports']['config'][1] .
/abr /nbsp;br / .

87:  //$LANG['plugin_reports']['config'][11] .  :  .
$LANG['plugin_reports']['doublons'][1] . /th/tr\n;

 

Works: 

86:  tr class='tab_bg_1' align='center'tha href=' .
GLPI_ROOT . /plugins/reports/front/plugin_reports.config.form.php'
.$LANG['plugin_reports']['config'][1] . /abr /nbsp;br / .

87:  $LANG['plugin_reports']['config'][11] .  :  .
$LANG['plugin_reports']['doublons'][1] . /th/tr\n;

 

 

 

Greatings,

Wouter

-- next part --
An HTML attachment was scrubbed...
URL: /public/glpi-dev/attachments/20090602/f1486fd5/attachment.htm 

--

Message: 2
Date: Tue, 02 Jun 2009 10:56:27 +0200
From: Walid Nouh walid.n...@gmail.com
Subject: Re: [Glpi-dev] Reports plugin configuration (No input file
specified. )
To: Liste de diffusion des developpeurs GLPI glpi-dev@gna.org
Message-ID: 4a24e93b.2010...@gmail.com
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Thank you,
I corrected the link

Walid.

Wouter Beens a ?crit :

 Hey,

  

 When you configurate the Reports plug-in.

  

 and click

 Report configuration : Duplicate computers

  

 And then want to go back to:

 Reports plug-in configuration

  

 You get an error:

 No input file specified.

  

 Reports/report/doublons/doubloons.config.php

  

 Bug?

 86:  //tr class='tab_bg_1' align='center'tha 
 href='./config.form.php' .$LANG['plugin_reports']['config'][1] . 
 /abr /nbsp;br / .

 87:  //$LANG['plugin_reports']['config'][11] .  :  . 
 $LANG['plugin_reports']['doublons'][1] . /th/tr\n;

  

 Works:

 86:  tr class='tab_bg_1' align='center'tha href=' . 
 GLPI_ROOT . /plugins/reports/front/plugin_reports.config.form.php' 
 .$LANG['plugin_reports']['config'][1] . /abr /nbsp;br / .

 87:  $LANG['plugin_reports']['config'][11] .  :  . 
 $LANG['plugin_reports']['doublons'][1] . /th/tr\n;

  

  

  

 Greatings,

 Wouter




 ___
 Glpi-dev mailing list
 Glpi-dev@gna.org
 https://mail.gna.org/listinfo/glpi-dev
   




--

___
Glpi-dev mailing list
Glpi-dev@gna.org
https://mail.gna.org/listinfo/glpi-dev


End of Glpi-dev Digest, Vol 48, Issue 3
***

___
Glpi-dev mailing list
Glpi-dev@gna.org
https://mail.gna.org/listinfo/glpi-dev


Re: [Glpi-dev] Glpi-dev Digest, Vol 48, Issue 3

2009-06-02 Thread nini.lasson
Hi,

This problem was corrected this afternoon

https://dev.indepnet.net/plugins/changeset/10654
https://dev.indepnet.net/plugins/changeset/10656

Regards,
Yllen


Wouter Beens a écrit :
 Hey
 I think here is sort of the same problem. Link does not go back a level
 up.

 Wrong:
 72:   echo tr class='tab_bg_3' align='center'td
 colspan='.($crit0?'3':'2').'a href='./doublons.php' .
 $LANG['plugin_reports']['config'][11] . /a/td/tr\n;

 Good: 
 72:   echo tr class='tab_bg_3' align='center'td
 colspan='.($crit0?'3':'2').'a href='./doublons.config.php' .
 $LANG['plugin_reports']['config'][11] . /a/td/tr\n;

 Wouter



 -Oorspronkelijk bericht-
 Van: glpi-dev-boun...@gna.org [mailto:glpi-dev-boun...@gna.org] Namens
 glpi-dev-requ...@gna.org
 Verzonden: dinsdag 2 juni 2009 12:01
 Aan: glpi-dev@gna.org
 Onderwerp: Glpi-dev Digest, Vol 48, Issue 3

 Send Glpi-dev mailing list submissions to
   glpi-dev@gna.org

 To subscribe or unsubscribe via the World Wide Web, visit
   https://mail.gna.org/listinfo/glpi-dev
 or, via email, send a message with subject or body 'help' to
   glpi-dev-requ...@gna.org

 You can reach the person managing the list at
   glpi-dev-ow...@gna.org

 When replying, please edit your Subject line so it is more specific
 than Re: Contents of Glpi-dev digest...


 Today's Topics:

1. Reports plugin configuration (No input file specified. )
   (Wouter Beens)
2. Re: Reports plugin configuration (No input file specified. )
   (Walid Nouh)


 --

 Message: 1
 Date: Tue, 2 Jun 2009 10:14:10 +0200
 From: Wouter Beens osg_...@dehogeberg.nl
 Subject: [Glpi-dev] Reports plugin configuration (No input file
   specified. )
 To: glpi-dev@gna.org
 Message-ID:
   
 3035d1efd649bb4d95f2b55cbdbfea005d0...@mailserver.dehogeberg.nl
 Content-Type: text/plain; charset=us-ascii

 Hey,

  

 When you configurate the Reports plug-in.

  

 and click

 Report configuration : Duplicate computers

  

 And then want to go back to:

 Reports plug-in configuration

  

 You get an error:

 No input file specified.

  

 Reports/report/doublons/doubloons.config.php

  

 Bug?

 86:  //tr class='tab_bg_1' align='center'tha
 href='./config.form.php' .$LANG['plugin_reports']['config'][1] .
 /abr /nbsp;br / .

 87:  //$LANG['plugin_reports']['config'][11] .  :  .
 $LANG['plugin_reports']['doublons'][1] . /th/tr\n;

  

 Works: 

 86:  tr class='tab_bg_1' align='center'tha href=' .
 GLPI_ROOT . /plugins/reports/front/plugin_reports.config.form.php'
 .$LANG['plugin_reports']['config'][1] . /abr /nbsp;br / .

 87:  $LANG['plugin_reports']['config'][11] .  :  .
 $LANG['plugin_reports']['doublons'][1] . /th/tr\n;

  

  

  

 Greatings,

 Wouter

 -- next part --
 An HTML attachment was scrubbed...
 URL: /public/glpi-dev/attachments/20090602/f1486fd5/attachment.htm 

 --

 Message: 2
 Date: Tue, 02 Jun 2009 10:56:27 +0200
 From: Walid Nouh walid.n...@gmail.com
 Subject: Re: [Glpi-dev] Reports plugin configuration (No input file
   specified. )
 To: Liste de diffusion des developpeurs GLPI glpi-dev@gna.org
 Message-ID: 4a24e93b.2010...@gmail.com
 Content-Type: text/plain; charset=ISO-8859-1; format=flowed

 Thank you,
 I corrected the link

 Walid.

 Wouter Beens a ?crit :
   
 Hey,

  

 When you configurate the Reports plug-in.

  

 and click

 Report configuration : Duplicate computers

  

 And then want to go back to:

 Reports plug-in configuration

  

 You get an error:

 No input file specified.

  

 Reports/report/doublons/doubloons.config.php

  

 Bug?

 86:  //tr class='tab_bg_1' align='center'tha 
 href='./config.form.php' .$LANG['plugin_reports']['config'][1] . 
 /abr /nbsp;br / .

 87:  //$LANG['plugin_reports']['config'][11] .  :  . 
 $LANG['plugin_reports']['doublons'][1] . /th/tr\n;

  

 Works:

 86:  tr class='tab_bg_1' align='center'tha href=' . 
 GLPI_ROOT . /plugins/reports/front/plugin_reports.config.form.php' 
 .$LANG['plugin_reports']['config'][1] . /abr /nbsp;br / .

 87:  $LANG['plugin_reports']['config'][11] .  :  . 
 $LANG['plugin_reports']['doublons'][1] . /th/tr\n;

  

  

  

 Greatings,

 Wouter


 
 
   
 ___
 Glpi-dev mailing list
 Glpi-dev@gna.org
 https://mail.gna.org/listinfo/glpi-dev
   
 




 --

 ___
 Glpi-dev mailing list
 Glpi-dev@gna.org
 https://mail.gna.org/listinfo/glpi-dev


 End of Glpi-dev Digest, Vol 48, Issue 3
 ***

 ___
 Glpi-dev mailing list
 Glpi-dev@gna.org
 https://mail.gna.org/listinfo/glpi-dev


   



___
Glpi-dev

Re: [Glpi-dev] Report Patch Suggestion

2009-06-02 Thread Roque, Dan
Updated patch with remi's suggestion and added check for $columns to
make sure no invalid data is set. Attached is the patch formatted file.

 

Dan (blood)

 

From: glpi-dev-boun...@gna.org [mailto:glpi-dev-boun...@gna.org] On
Behalf Of Roque, Dan
Sent: Tuesday, June 02, 2009 12:45 PM
To: Liste de diffusion des developpeurs GLPI
Subject: [Glpi-dev] Report Patch Suggestion

 

I added a patch to add 2 additional functionalities which I think will
allow for more customization in a user's report.

 

1.   Ability to put columns in any order in $columns.

2.   Show only what is specified in $columns else if not sett then
show default columns from select sql query.

 

Let me know what you think.

 

Dan  (blood)

 

 Below is the code:

 

../inc/plugin_reports.autoreport.class.php

 

New:

175:// if $columns is empty
count columns from SQL query else count $columns

176:$nbcols =
(empty($this-columns)) ? $DB-num_fields($res) : count($this-columns);

 

Old:

176:$nbcols =
$DB-num_fields($res);

 


---

 

New:

184:// If $columns is not empty,
display $columns

185:if (!empty($this-columns))
{ 

186:for ($i = 0;
$i  $nbcols; $i++) { 

187:
$coltitle = current($this-columns);

188:
echo displaySearchHeaderItem($output_type, $coltitle, $num);

189:
$colsname[] = $coltitle;

190:
next($this-columns);

191:}

192:}

193:// else display default
columns from SQL query

194:else { 

195:for ($i = 0;
$i  $nbcols; $i++) {

196:
$colname = $DB-field_name($res, $i);

197:
echo displaySearchHeaderItem($output_type, $colname, $num);

198:
$colsname[] = $colname;

199:}

200:}

 

Old:

184:

185:for ($i = 0; $i  $nbcols;
$i++) {

186:$colname =
$DB-field_name($res, $i);

187:$coltitle =
(isset ($this-columns[$colname]) ? $this-columns[$colname] :
$colname);

188:echo
displaySearchHeaderItem($output_type, $coltitle, $num);

189:$colsname[]
= $colname;

 

 



plugin_reports.autoreport.class.php.patch
Description: plugin_reports.autoreport.class.php.patch
___
Glpi-dev mailing list
Glpi-dev@gna.org
https://mail.gna.org/listinfo/glpi-dev