speedtest/results
Bernd Stellwag fb7575b67b
Refactor results/ PHP code (#369)
* put code to insert and query data from database into separate file

* simplify obfuscation salt file handling

* use new DB interaction functions in telemetry.php

* use new DB interaction functions in stats.php

and fix indentation levels

* format telemetry settings file

* use new function for interacting with DB in index.php

* move drawing of the image into function and try to comment each section with what it does

* reorder lines for parts of the image to align with the order they appear on the image

* bugfix: display obfuscated and deobfuscated id in stats if id obfuscation is enabled

* improve error handling

* add missing PHPDocs to functions

* imageftbbox returns an array on success and false on failure so to check if the font is usable, check if we got an array

* fix dsn for postgres

* fix limit sql statement for postgresql

* remove obsolete require statement

* use require instead of require_once since the settings file might need to be loaded multiple times

because it just contains plain variables which will just get loaded into the current scope

* move require statements to the top of the file

* make sure files are readable before requiring them

* add constant to refer to the telemetry settings file and check if it is readable before loading it

* return null if no speedtest result was found for the given id and show according message to the user instead of just exiting

* use existing constant instead of string for telemetry settings file name

* uniformly use single quotes instead of double quotes as most code places already used single quotes

* somehow some tabs sneaked in, replace them to uniformly use spaces

* mysql now uses pdo, too, reflect that in the requirements documentation

* pass username and password as constructor parameters instead of via DSN
2020-10-20 07:43:48 +02:00
..
idObfuscation.php Refactor results/ PHP code (#369) 2020-10-20 07:43:48 +02:00
index.php Refactor results/ PHP code (#369) 2020-10-20 07:43:48 +02:00
OpenSans-Light.ttf Added test result sharing; Added stats page; Improved project structure; Minor bug fixes 2018-08-06 18:15:52 +02:00
OpenSans-Semibold.ttf Added test result sharing; Added stats page; Improved project structure; Minor bug fixes 2018-08-06 18:15:52 +02:00
stats.php Refactor results/ PHP code (#369) 2020-10-20 07:43:48 +02:00
telemetry.php Refactor results/ PHP code (#369) 2020-10-20 07:43:48 +02:00
telemetry_db.php Refactor results/ PHP code (#369) 2020-10-20 07:43:48 +02:00
telemetry_mysql.sql Major project restructuring and unification with mpot branch 2019-06-30 07:03:06 +02:00
telemetry_postgresql.sql Major project restructuring and unification with mpot branch 2019-06-30 07:03:06 +02:00
telemetry_settings.php Refactor results/ PHP code (#369) 2020-10-20 07:43:48 +02:00