Skip to content

Commit

Permalink
added new geocache and log fields to replication; updates #564
Browse files Browse the repository at this point in the history
(and removed a recently added documentation note, which is too specific)
  • Loading branch information
following5 committed Nov 15, 2018
1 parent bb0eda1 commit 53608bf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 0 additions & 3 deletions okapi/services/logs/entry/docs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,6 @@
<p><b>last_modified</b> - date (ISO 8601, no time) indicating
when the log entry was most recently edited. If the log was not
edited, the returned value is identical to <b>date_created</b>.</p>
<p>Opencaching.PL note: For all logs prior to 2012-08-23,
there is no modification date available at Opencaching.PL.
<b>date_created</b> value will be returned instead.</p>
</li>
<li>
<p><b>internal_id</b> - undocumented, you <u>should not</u> use
Expand Down
8 changes: 6 additions & 2 deletions okapi/services/replicate/ReplicateCommon.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
class ReplicateCommon
{
private static $chunk_size = 50;
private static $logged_cache_fields = 'code|names|location|type|status|url|owner|founds|notfounds|size|size2|oxsize|difficulty|terrain|rating|rating_votes|recommendations|req_passwd|descriptions|hints|images|trackables_count|trackables|alt_wpts|last_found|last_modified|date_created|date_hidden|attr_acodes|willattends|country|state|preview_image|trip_time|trip_distance|gc_code|hints2|protection_areas';
private static $logged_cache_fields = 'code|names|location|type|status|url|owner|founds|notfounds|size|size2|oxsize|difficulty|terrain|rating|rating_votes|recommendations|req_passwd|descriptions|hints|images|attr_acodes|trackables_count|trackables|alt_wpts|last_found|last_modified|date_created|date_hidden|willattends|country|state|preview_image|trip_time|trip_distance|gc_code|hints2|protection_areas|short_descriptions|needs_maintenance|watchers|oc_team_annotation';

# Consider https://github.com/opencaching/okapi/issues/382 before adding
# any new field to $logged_log_entry_fields! Care must be taken that
# changed values are reflected in cache_logs.okapi_syncbase.

private static $logged_log_entry_fields = 'uuid|cache_code|date|user|type|was_recommended|comment';
private static $logged_log_entry_fields = 'uuid|cache_code|date|user|type|oc_team_entry|was_recommended|needs_maintenance2|listing_is_outdated|comment|location|images|date_created|last_modified';

/** Return current (greatest) changelog revision number. */
public static function get_revision()
Expand Down Expand Up @@ -160,6 +160,10 @@ public static function update_clog_table()
* well as long as only log entry fields are replicated which update
* some cache_logs column when changed (by OKAPI or OC code). See
* https://github.com/opencaching/okapi/issues/382 for further discussion.
*
* Advantage of not verifying logs: We can add new log fields without
* producing gigabytes of unnecessary clog entries; see issue #559.
* Also, there could be performance problems; see issue #564.
*/
public static function verify_clog_consistency(
$force_all=false, $geocache_ignored_fields = null
Expand Down

0 comments on commit 53608bf

Please sign in to comment.