brusselopole / Worldopole

Worldopole is a third party extension for RocketMap showing some nice statistics.
MIT License
85 stars 79 forks source link

Combine PR #353 with #363 & Code formatting #371

Closed michikrug closed 5 years ago

michikrug commented 5 years ago

Description

With this PR I combined PR #353 and #363 with a complete run of a php linter for nice code formatting.

💯💯💯💯💯💯💯💯💯💯💯💯💯💯 All credit for the work goes to @123FLO321 ! 💯💯💯💯💯💯💯💯💯💯💯💯💯💯

It should be mergeable without conflicts.

Motivation and Context

Finally, we introduce support for various database schemata.

Notes for DB rework

Moved all queries to a new class. This allows easy support for different Scanners and even DB types. Currently RocketMap [MySQL] and the Monocle-Alternate [MySQL and PgSQL] fork is implemented. The DB Type can be set via in config.php. ["rocketmap", "monocle-alt-mysql" or "monocle-alt-pgsql"].

Run CreateStatsRocketMap.sql or CreateStatsMonocle.sql for counts to work.

Requires PR 27 Moncole-Alternate Recommended Settings for Moncole-Alternate:

KEEP_GYM_HISTORY = True
CLEANUP_SIGHTINGS_OLDER_THAN_X_HR = 168.0 (or higher | min: 24.0)
CLEANUP_FORT_SIGHTINGS_OLDER_THAN_X_HR = -1.0 (or 168.0 or higher)
CLEANUP_GYM_DEFENDERS_OLDER_THAN_X_HR = -1.0 (or 168.0 or higher)
RAIDERS_PER_GYM = 0.1 (target update interval of ~60s)

Notes for new nests

It is recommended to set nest_exclude_pokemon to an empty array ( '[ ]' ) Update your .htaccess (cp htaccess .htaccess) according to the new changes.

sc1

How Has This Been Tested?

Tested on own instance with only RM db. Everything worked so far, but I did not test any other DB type than RM. Also the new nests stuff worked very well.

Types of changes

Obihoernchen commented 5 years ago

FYI I lost my discord 2FA :D That's why I'm not online.

Obihoernchen commented 5 years ago

Is this ready to be merged?

michikrug commented 5 years ago

Yes

123FLO321 commented 5 years ago

Do it!