MantisBT: master-1.2.x db0e3d3b

Author Committer Branch Timestamp Parent
dregad dregad master-1.2.x 2013-01-02 08:13 master-1.2.x d76a2106
Affected Issues  0013680: Configuration page takes a very long time to load
Changeset

Fix performance issue on adm_config_report.php

In systems with large numbers of config items in mantis_config_table, the
Configuration Report page can take a very long time to load.

This behavior is due to each of the 'Delete' buttons being printed with
its own form, each one having a security token. The performance
bottleneck is actually the serialize/unserialize calls executed while
storing/retrieving the token from the PHP session.

To avoid this problem, the print_button() and form_security_field()
functions have been modified to accept a security token as an optional
parameter. This allows the calling page to generate a single token,
which is shared by all buttons.

Furthermore, print_button() also allows the security token parameter to
be 'OFF', which prevents the function from displaying a security field.
This is useful for buttons not resulting in modifications (i.e. not
requiring CSRF protection).

Fixes 0013680

mod - adm_config_report.php Diff File
mod - core/form_api.php Diff File
mod - core/print_api.php Diff File