- Data collection warnings when using cmd.php
- Replace <path_php_binary> in data input methods
- Spaces adjacent to double quotes are eliminated durate data input
method import
- Horor the column setting in graph tree view mode
- Replaced deprecated each() for foreach()
- Removed unnecessary reset() calls used for resetting pointers of an array before iterating by a foreach() loop
Alignment for:
- array_rekey()
- is_hex_string()
- get_graph_group(()
- calculate_percentiles()
- cacti_oid_numeric_format()
- CactiErrorHandler()
read_default_user_setting() and read_default_config_option()
- refactored each() info foreach()
- removed unnecessary parentheses
tail_file()
- small optimisiational refactoring
get_full_script_path()
- alignment
- optimised str_replace() into one execution
stri_replace()
- strlen() into variable
clean_up_path()
- optimised if statement by reordering
generate_data_source_path()
- Removed unneeded variable declarations
- Limited query result (because of fetch cell returning one cell)
generate_graph_def_name()
- put strval($graph_item_id) into variable
move_graph_group()
- moved query to lower position
- alignment
- foreach instead of each() (each() will be deprecated in php 7.2.0)
exec_into_array()
- I believe this code was a self-implemented array_values()
draw_login_status()
- declared only necessary fields in querystatement
draw_navigation_text()
- removed/repositioned unnecessary declaration of variables
- declared only necessary fields in querystatement
resolve_navigation_variables()
- refactored heavy function call stored into variable
get_hash_graph_template()
get_hash_data_template()
get_hash_data_input()
get_hash_cdef()
get_hash_vdef()
get_hash_data_query()
- refactored into switch statement (33% faster)
- added default case
generate_hash()
- removed global $config;
Cleanup of unused functions:
- is_valid_email()
- timer_start()
- timer_end()
- strip_newlines()
Small refactor in cacti_log():
- reduce function calls for read_config_option()
- refactor of loglevel if statement
- unnecessary parentheses
- syslog section refactor
- strpos() is 33% quicker than substr_count() in this case
draw_navigation_text():
- get result in 1 query instead of 2
auth.php:
- placed result of get_selected_theme() in var
functions.php:
- mailer():
- fetch date from setting by caching method
- read_config_option('settings_from_email') unnecessary
- 2x undefined function $mail->replyTo() (should be addReplyTo())
- calculate_percentiles()
- Final return statement has undeclared variable; I believe this should be results instead of result, but could not reproduce
index.php:
- only fetch the fields needed for querying external_links
- 2x </td> instead of </tr>
* the $index_recache string already contains the / separator. I don't need to add in preg_match function
* some errors in the methods to take in count the storage of the modified value
* a cosmetic change that permit to clean the debug value in debug_log_return function after the display
* a change in poller function that fixe an error when your index field in the XML file is a fake index oid
Back to original way of generating absolute paths. Relative paths needed for RRDproxy will be generated on the fly within /lib/rrd.php.
No need to rebuilt the poller cache after changing the data storage.