Merge branch 'stable'
This commit is contained in:
@@ -191,6 +191,8 @@
|
||||
|
||||
$opt['page']['absolute_url'] = 'http://devel.opencaching.de/'; // may be overwritten by $opt['domain'][...]['uri']
|
||||
$opt['page']['develsystem'] = false;
|
||||
$opt['page']['origin_url'] = 'http://www.opencaching.de/'; // reference productive installation for this OC code fork
|
||||
|
||||
|
||||
/* maximum number of failed logins per hour before that IP address is blocked
|
||||
* (used to prevent brute-force-attacks)
|
||||
|
||||
@@ -814,7 +814,7 @@ class Okapi
|
||||
{
|
||||
public static $data_store;
|
||||
public static $server;
|
||||
public static $revision = 843; # This gets replaced in automatically deployed packages
|
||||
public static $revision = 851; # This gets replaced in automatically deployed packages
|
||||
private static $okapi_vars = null;
|
||||
|
||||
/** Get a variable stored in okapi_vars. If variable not found, return $default. */
|
||||
|
||||
@@ -690,9 +690,10 @@ class AdminStatsSender extends Cron5Job
|
||||
okapi_consumers c
|
||||
where a.consumer_key = c.`key`
|
||||
group by a.consumer_key
|
||||
having count(*) >= 5
|
||||
order by count(*) desc;
|
||||
");
|
||||
print "== Current OAuth usage by Consumers ==\n\n";
|
||||
print "== Current OAuth usage by Consumers with at least 5 users ==\n\n";
|
||||
print "Consumer name Users\n";
|
||||
print "----------------------------------- -------\n";
|
||||
foreach ($oauth_users as $row)
|
||||
|
||||
@@ -84,17 +84,12 @@ class AttrHelper
|
||||
*/
|
||||
public static function refresh_from_string($xml)
|
||||
{
|
||||
/* attribute.xml file defines attribute relationships between various OC
|
||||
* installations. Each installation uses its own internal IDs.
|
||||
* We will temporarily assume that "oc.pl" codebranch uses OCPL's schema
|
||||
* and "oc.de" codebranch - OCDE's. This is wrong for OCUS and OCORGUK
|
||||
* nodes, which use "oc.pl" codebranch, but have a schema of their own
|
||||
* WRTODO. */
|
||||
/* The attribute-definitions.xml file defines relationships between
|
||||
* attributes originating from various OC installations. Each
|
||||
* installation uses internal IDs of its own. Which "attribute schema"
|
||||
* is being used in THIS installation? */
|
||||
|
||||
if (Settings::get('OC_BRANCH') == 'oc.pl')
|
||||
$my_schema = "OCPL";
|
||||
else
|
||||
$my_schema = "OCDE";
|
||||
$my_schema = Settings::get('ORIGIN_URL');
|
||||
|
||||
$doc = simplexml_load_string($xml);
|
||||
$cachedvalue = array(
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
<!--
|
||||
|
||||
Current status: WORKING DRAFT
|
||||
|
||||
This is the list of all geocache attributes supported by OKAPI. It should
|
||||
include any attribute used by at least one of the Opencaching installations.
|
||||
|
||||
@@ -21,9 +19,10 @@ allows them to be merged with other attributes from other OC installations.
|
||||
|
||||
This file defines the mapping between:
|
||||
|
||||
- Internal attribute IDs of various Opencaching nodes ("db_branch").
|
||||
- Internal attribute IDs of various Opencaching nodes (the "schema" attribute
|
||||
must match the ORIGIN_URL used in the node).
|
||||
- Groundspeak's attribute IDs (used by geocaching.com).
|
||||
- OKAPI's attribute IDs.
|
||||
- OKAPI's attribute IDs (used in all OKAPI installations globally).
|
||||
|
||||
It also defines attribute names and descriptions in several languages.
|
||||
|
||||
@@ -36,7 +35,8 @@ It also defines attribute names and descriptions in several languages.
|
||||
-->
|
||||
|
||||
<attr acode="A1" categories="de-listing">
|
||||
<opencaching schema="OCDE" id="6"/>
|
||||
<opencaching schema="http://www.opencaching.de/" id="6"/>
|
||||
<opencaching schema="http://www.opencaching.nl/" id="6"/>
|
||||
<lang id="en">
|
||||
<name>Listed at Opencaching only</name>
|
||||
<desc>
|
||||
@@ -74,10 +74,14 @@ It also defines attribute names and descriptions in several languages.
|
||||
interessanti cache OC di qualità.
|
||||
</desc>
|
||||
</lang>
|
||||
<lang id="nl">
|
||||
<name>Alleen te loggen op Opencaching</name>
|
||||
</lang>
|
||||
</attr>
|
||||
|
||||
<attr acode="A2" categories="de-cache-types">
|
||||
<opencaching schema="OCPL" id="54" />
|
||||
<opencaching schema="http://opencaching.pl/" id="54" />
|
||||
<opencaching schema="http://www.opencaching.nl/" id="61" />
|
||||
<lang id="en">
|
||||
<name>Near a Survey Marker</name>
|
||||
<desc>
|
||||
@@ -101,7 +105,7 @@ It also defines attribute names and descriptions in several languages.
|
||||
</attr>
|
||||
|
||||
<attr acode="A3" categories="de-cache-types">
|
||||
<opencaching schema="OCPL" id="55" />
|
||||
<opencaching schema="http://opencaching.pl/" id="55" />
|
||||
<lang id="en">
|
||||
<name>Wherigo Cache</name>
|
||||
<desc>
|
||||
@@ -130,8 +134,9 @@ It also defines attribute names and descriptions in several languages.
|
||||
</attr>
|
||||
|
||||
<attr acode="A4" categories="de-cache-types">
|
||||
<opencaching schema="OCPL" id="56" />
|
||||
<opencaching schema="OCDE" id="8" />
|
||||
<opencaching schema="http://opencaching.pl/" id="56" />
|
||||
<opencaching schema="http://www.opencaching.de/" id="8" />
|
||||
<opencaching schema="http://www.opencaching.nl/" id="56" />
|
||||
<lang id="en">
|
||||
<name>Letterbox Cache</name>
|
||||
<desc>
|
||||
@@ -180,7 +185,8 @@ It also defines attribute names and descriptions in several languages.
|
||||
</attr>
|
||||
|
||||
<attr acode="A5" categories="de-cache-types">
|
||||
<opencaching schema="OCPL" id="43" />
|
||||
<opencaching schema="http://opencaching.pl/" id="43" />
|
||||
<opencaching schema="http://www.opencaching.nl/" id="43" />
|
||||
<lang id="en">
|
||||
<name>GeoHotel Cache</name>
|
||||
<desc>
|
||||
@@ -203,10 +209,14 @@ It also defines attribute names and descriptions in several languages.
|
||||
TravelBugs etc.).
|
||||
</desc>
|
||||
</lang>
|
||||
<lang id="nl">
|
||||
<name>GeoHotel</name>
|
||||
</lang>
|
||||
</attr>
|
||||
|
||||
<attr acode="A6" categories="de-cache-types">
|
||||
<opencaching schema="OCPL" id="49" />
|
||||
<opencaching schema="http://opencaching.pl/" id="49" />
|
||||
<opencaching schema="http://www.opencaching.nl/" id="49" />
|
||||
<lang id="en">
|
||||
<name>Magnetic Cache</name>
|
||||
<desc>
|
||||
@@ -225,23 +235,27 @@ It also defines attribute names and descriptions in several languages.
|
||||
Der Geocache ist mit einem Mangeten angebracht.
|
||||
</desc>
|
||||
</lang>
|
||||
<lang id="nl">
|
||||
<name>Bevestigd met magneet</name>
|
||||
</lang>
|
||||
</attr>
|
||||
|
||||
<attr acode="A7" categories="de-cache-types">
|
||||
<opencaching schema="OCPL" id="50" />
|
||||
<opencaching schema="http://opencaching.pl/" id="50" />
|
||||
<opencaching schema="http://www.opencaching.nl/" id="50" />
|
||||
<lang id="en">
|
||||
<name>Description contains an audio file</name>
|
||||
<desc>
|
||||
In order to find this cache, you must listen to an audio recording,
|
||||
which is attached to the cache description.
|
||||
In order to find this cache, you must listen to an audio recording
|
||||
(e.g. MP3 file), which is attached to the cache description.
|
||||
</desc>
|
||||
</lang>
|
||||
<lang id="pl">
|
||||
<name>Opis zawiera plik audio</name>
|
||||
<desc>
|
||||
Aby odnaleźć skrzynkę, należy odsłuchać plik dźwiękowy. Może on
|
||||
zawierać zakodowane informacje, dźwięki otoczenia, opis dotarcia
|
||||
do skrzynki.
|
||||
Aby odnaleźć skrzynkę, należy odsłuchać plik dźwiękowy zawarty w
|
||||
opisie skrzynki (np. w formacie MP3). Może on zawierać zakodowane
|
||||
informacje, dźwięki otoczenia, opis dotarcia do skrzynki.
|
||||
</desc>
|
||||
</lang>
|
||||
<lang id="de">
|
||||
@@ -254,7 +268,7 @@ It also defines attribute names and descriptions in several languages.
|
||||
</attr>
|
||||
|
||||
<attr acode="A8" categories="de-cache-types">
|
||||
<opencaching schema="OCPL" id="51" />
|
||||
<opencaching schema="http://opencaching.pl/" id="51" />
|
||||
<lang id="en">
|
||||
<name>Offset cache</name>
|
||||
<desc>
|
||||
@@ -285,7 +299,8 @@ It also defines attribute names and descriptions in several languages.
|
||||
|
||||
<attr acode="A9" categories="de-cache-types">
|
||||
<groundspeak id="60" inc="true" name="Wireless Beacon" />
|
||||
<opencaching schema="OCPL" id="52" />
|
||||
<opencaching schema="http://opencaching.pl/" id="52" />
|
||||
<opencaching schema="http://www.opencaching.nl/" id="52" />
|
||||
<lang id="en">
|
||||
<name>Garmin's wireless beacon</name>
|
||||
<desc>
|
||||
@@ -309,7 +324,8 @@ It also defines attribute names and descriptions in several languages.
|
||||
</attr>
|
||||
|
||||
<attr acode="A10" categories="de-cache-types">
|
||||
<opencaching schema="OCPL" id="53" />
|
||||
<opencaching schema="http://opencaching.pl/" id="53" />
|
||||
<opencaching schema="http://www.opencaching.nl/" id="53" />
|
||||
<lang id="en">
|
||||
<name>Dead Drop USB cache</name>
|
||||
<desc>
|
||||
@@ -339,7 +355,7 @@ It also defines attribute names and descriptions in several languages.
|
||||
</attr>
|
||||
|
||||
<attr acode="A11" categories="de-cache-types">
|
||||
<opencaching schema="OCDE" id="31" />
|
||||
<opencaching schema="http://www.opencaching.de/" id="31" />
|
||||
<lang id="en">
|
||||
<name>Has a moving target</name>
|
||||
<desc>
|
||||
@@ -382,7 +398,7 @@ It also defines attribute names and descriptions in several languages.
|
||||
</attr>
|
||||
|
||||
<attr acode="A12" categories="de-cache-types">
|
||||
<opencaching schema="OCDE" id="32" />
|
||||
<opencaching schema="http://www.opencaching.de/" id="32" />
|
||||
<lang id="en">
|
||||
<name>a webcam is involved</name>
|
||||
<desc>
|
||||
@@ -424,7 +440,7 @@ It also defines attribute names and descriptions in several languages.
|
||||
</attr>
|
||||
|
||||
<attr acode="A13" categories="de-cache-types">
|
||||
<opencaching schema="OCDE" id="57" />
|
||||
<opencaching schema="http://www.opencaching.de/" id="57" />
|
||||
<lang id="en">
|
||||
<name>Other cache type</name>
|
||||
<desc>
|
||||
@@ -455,7 +471,7 @@ It also defines attribute names and descriptions in several languages.
|
||||
</attr>
|
||||
|
||||
<attr acode="A14" categories="de-preconditions">
|
||||
<opencaching schema="OCDE" id="54" />
|
||||
<opencaching schema="http://www.opencaching.de/" id="54" />
|
||||
<lang id="en">
|
||||
<name>Investigation required</name>
|
||||
<desc>
|
||||
@@ -485,7 +501,7 @@ It also defines attribute names and descriptions in several languages.
|
||||
|
||||
<attr acode="A15" categories="de-preconditions">
|
||||
<groundspeak id="47" inc="true" name="Field puzzle" />
|
||||
<opencaching schema="OCDE" id="55" />
|
||||
<opencaching schema="http://www.opencaching.de/" id="55" />
|
||||
<lang id="en">
|
||||
<name>Puzzle / Mystery</name>
|
||||
<desc>
|
||||
@@ -514,7 +530,7 @@ It also defines attribute names and descriptions in several languages.
|
||||
</attr>
|
||||
|
||||
<attr acode="A16" categories="de-preconditions">
|
||||
<opencaching schema="OCDE" id="56" />
|
||||
<opencaching schema="http://www.opencaching.de/" id="56" />
|
||||
<lang id="en">
|
||||
<name>Arithmetical problem</name>
|
||||
<desc>
|
||||
@@ -547,7 +563,7 @@ It also defines attribute names and descriptions in several languages.
|
||||
</attr>
|
||||
|
||||
<attr acode="A17" categories="de-preconditions">
|
||||
<opencaching schema="OCDE" id="58" />
|
||||
<opencaching schema="http://www.opencaching.de/" id="58" />
|
||||
<lang id="en">
|
||||
<name>Ask owner for start conditions</name>
|
||||
<desc>
|
||||
@@ -578,7 +594,8 @@ It also defines attribute names and descriptions in several languages.
|
||||
|
||||
<attr acode="A18" categories="de-accessibility">
|
||||
<groundspeak id="24" inc="true" name="Wheelchair accessible" />
|
||||
<opencaching schema="OCPL" id="44" />
|
||||
<opencaching schema="http://opencaching.pl/" id="44" />
|
||||
<opencaching schema="http://www.opencaching.nl/" id="44" />
|
||||
<lang id="en">
|
||||
<name>Wheelchair accessible</name>
|
||||
<desc>
|
||||
@@ -598,11 +615,14 @@ It also defines attribute names and descriptions in several languages.
|
||||
<lang id="de">
|
||||
<name>rollstuhltauglich</name>
|
||||
</lang>
|
||||
<lang id="nl">
|
||||
<name>Rolstoel toegankelijk</name>
|
||||
</lang>
|
||||
</attr>
|
||||
|
||||
<attr acode="A19" categories="de-accessibility">
|
||||
<groundspeak id="53" inc="true" name="Park and grab" />
|
||||
<opencaching schema="OCDE" id="24" />
|
||||
<opencaching schema="http://www.opencaching.de/" id="24" />
|
||||
<lang id="en">
|
||||
<name>Near the parking area</name>
|
||||
<desc>
|
||||
@@ -631,7 +651,8 @@ It also defines attribute names and descriptions in several languages.
|
||||
</attr>
|
||||
|
||||
<attr acode="A20" categories="de-accessibility">
|
||||
<opencaching schema="OCPL" id="84" />
|
||||
<opencaching schema="http://opencaching.pl/" id="84" />
|
||||
<opencaching schema="http://www.opencaching.nl/" id="84" />
|
||||
<lang id="en">
|
||||
<name>Access only by walk</name>
|
||||
<desc>
|
||||
@@ -654,7 +675,8 @@ It also defines attribute names and descriptions in several languages.
|
||||
|
||||
<attr acode="A21" categories="de-accessibility">
|
||||
<groundspeak id="9" inc="true" name="Significant Hike" />
|
||||
<opencaching schema="OCDE" id="25" />
|
||||
<opencaching schema="http://www.opencaching.de/" id="25" />
|
||||
<opencaching schema="http://www.opencaching.nl/" id="25" />
|
||||
<lang id="en">
|
||||
<name>Long walk</name>
|
||||
<desc>
|
||||
@@ -689,11 +711,14 @@ It also defines attribute names and descriptions in several languages.
|
||||
equipaggiamento adeguato.
|
||||
</desc>
|
||||
</lang>
|
||||
<lang id="nl">
|
||||
<name>Lange wandeling</name>
|
||||
</lang>
|
||||
</attr>
|
||||
|
||||
<attr acode="A22" categories="de-accessibility">
|
||||
<groundspeak id="11" inc="true" name="May require wading" />
|
||||
<opencaching schema="OCDE" id="26" />
|
||||
<opencaching schema="http://www.opencaching.de/" id="26" />
|
||||
<lang id="en">
|
||||
<name>Swamp, marsh or wading</name>
|
||||
<desc>
|
||||
@@ -729,7 +754,7 @@ It also defines attribute names and descriptions in several languages.
|
||||
</attr>
|
||||
|
||||
<attr acode="A23" categories="de-accessibility">
|
||||
<opencaching schema="OCDE" id="27" />
|
||||
<opencaching schema="http://www.opencaching.de/" id="27" />
|
||||
<lang id="en">
|
||||
<name>Hilly area</name>
|
||||
<desc>
|
||||
@@ -759,7 +784,7 @@ It also defines attribute names and descriptions in several languages.
|
||||
|
||||
<attr acode="A24" categories="de-accessibility">
|
||||
<groundspeak id="10" inc="true" name="Difficult climbing" />
|
||||
<opencaching schema="OCDE" id="28" />
|
||||
<opencaching schema="http://www.opencaching.de/" id="28" />
|
||||
<lang id="en">
|
||||
<name>Some climbing (no gear needed)</name>
|
||||
<desc>
|
||||
@@ -800,7 +825,7 @@ It also defines attribute names and descriptions in several languages.
|
||||
|
||||
<attr acode="A25" categories="de-accessibility">
|
||||
<groundspeak id="12" inc="true" name="May require swimming" />
|
||||
<opencaching schema="OCDE" id="29" />
|
||||
<opencaching schema="http://www.opencaching.de/" id="29" />
|
||||
<lang id="en">
|
||||
<name>Swimming required</name>
|
||||
<desc>
|
||||
@@ -837,7 +862,7 @@ It also defines attribute names and descriptions in several languages.
|
||||
|
||||
<attr acode="A26" categories="de-accessibility">
|
||||
<groundspeak id="2" inc="true" name="Access or parking fee" />
|
||||
<opencaching schema="OCDE" id="36" />
|
||||
<opencaching schema="http://www.opencaching.de/" id="36" />
|
||||
<lang id="en">
|
||||
<name>Access or parking fee</name>
|
||||
<desc>
|
||||
@@ -867,7 +892,8 @@ It also defines attribute names and descriptions in several languages.
|
||||
|
||||
<attr acode="A27" categories="de-accessibility">
|
||||
<groundspeak id="32" inc="true" name="Bicycles" />
|
||||
<opencaching schema="OCPL" id="85" />
|
||||
<opencaching schema="http://opencaching.pl/" id="85" />
|
||||
<opencaching schema="http://www.opencaching.nl/" id="85" />
|
||||
<lang id="en">
|
||||
<name>Bikes allowed</name>
|
||||
<desc>
|
||||
@@ -889,7 +915,8 @@ It also defines attribute names and descriptions in several languages.
|
||||
</attr>
|
||||
|
||||
<attr acode="A28" categories="de-location">
|
||||
<opencaching schema="OCPL" id="60" />
|
||||
<opencaching schema="http://opencaching.pl/" id="60" />
|
||||
<opencaching schema="http://www.opencaching.nl/" id="60" />
|
||||
<lang id="en">
|
||||
<name>Hidden in natural surroundings (forests, mountains, etc.)</name>
|
||||
<desc>
|
||||
@@ -911,10 +938,13 @@ It also defines attribute names and descriptions in several languages.
|
||||
versteckt – in einem Wald oder einer Wiese, einem Sumpf etc.
|
||||
</desc>
|
||||
</lang>
|
||||
<lang id="nl">
|
||||
<name>Cache met veel natuur</name>
|
||||
</lang>
|
||||
</attr>
|
||||
|
||||
<attr acode="A29" categories="de-location">
|
||||
<opencaching schema="OCPL" id="61" />
|
||||
<opencaching schema="http://opencaching.pl/" id="61" />
|
||||
<lang id="en">
|
||||
<name>Historic site</name>
|
||||
<desc>
|
||||
@@ -939,7 +969,8 @@ It also defines attribute names and descriptions in several languages.
|
||||
</attr>
|
||||
|
||||
<attr acode="A30" categories="de-location">
|
||||
<opencaching schema="OCDE" id="30" />
|
||||
<opencaching schema="http://www.opencaching.de/" id="30" />
|
||||
<opencaching schema="http://www.opencaching.nl/" id="30" />
|
||||
<lang id="en">
|
||||
<name>Point of interest</name>
|
||||
<desc>
|
||||
@@ -972,10 +1003,13 @@ It also defines attribute names and descriptions in several languages.
|
||||
geocache vicina.
|
||||
</desc>
|
||||
</lang>
|
||||
<lang id="nl">
|
||||
<name>Interesante plek</name>
|
||||
</lang>
|
||||
</attr>
|
||||
|
||||
<attr acode="A31" categories="de-location">
|
||||
<opencaching schema="OCDE" id="33" />
|
||||
<opencaching schema="http://www.opencaching.de/" id="33" />
|
||||
<lang id="en">
|
||||
<name>Hidden wihin enclosed rooms (caves, buildings etc.)</name>
|
||||
<desc>
|
||||
@@ -1007,7 +1041,7 @@ It also defines attribute names and descriptions in several languages.
|
||||
</attr>
|
||||
|
||||
<attr acode="A32" categories="de-location">
|
||||
<opencaching schema="OCDE" id="34" />
|
||||
<opencaching schema="http://www.opencaching.de/" id="34" />
|
||||
<lang id="en">
|
||||
<name>Hidden under water</name>
|
||||
<desc>
|
||||
@@ -1040,7 +1074,8 @@ It also defines attribute names and descriptions in several languages.
|
||||
|
||||
<attr acode="A33" categories="de-facilities">
|
||||
<groundspeak id="25" inc="true" name="Parking available" />
|
||||
<opencaching schema="OCDE" id="18" />
|
||||
<opencaching schema="http://www.opencaching.de/" id="18" />
|
||||
<opencaching schema="http://www.opencaching.nl/" id="18" />
|
||||
<lang id="en">
|
||||
<name>Parking area nearby</name>
|
||||
<desc>
|
||||
@@ -1068,11 +1103,14 @@ It also defines attribute names and descriptions in several languages.
|
||||
questa cache.
|
||||
</desc>
|
||||
</lang>
|
||||
<lang id="nl">
|
||||
<name>Parkeerplaats vlakbij</name>
|
||||
</lang>
|
||||
</attr>
|
||||
|
||||
<attr acode="A34" categories="de-facilities">
|
||||
<groundspeak id="26" inc="true" name="Public transportation" />
|
||||
<opencaching schema="OCDE" id="19" />
|
||||
<opencaching schema="http://www.opencaching.de/" id="19" />
|
||||
<lang id="en">
|
||||
<name>Public transportation</name>
|
||||
<desc>
|
||||
@@ -1105,7 +1143,7 @@ It also defines attribute names and descriptions in several languages.
|
||||
|
||||
<attr acode="A35" categories="de-facilities">
|
||||
<groundspeak id="27" inc="true" name="Drinking water nearby" />
|
||||
<opencaching schema="OCDE" id="20" />
|
||||
<opencaching schema="http://www.opencaching.de/" id="20" />
|
||||
<lang id="en">
|
||||
<name>Drinking water nearby</name>
|
||||
<desc>
|
||||
@@ -1144,7 +1182,7 @@ It also defines attribute names and descriptions in several languages.
|
||||
|
||||
<attr acode="A36" categories="de-facilities">
|
||||
<groundspeak id="28" inc="true" name="Public restrooms nearby" />
|
||||
<opencaching schema="OCDE" id="21" />
|
||||
<opencaching schema="http://www.opencaching.de/" id="21" />
|
||||
<lang id="en">
|
||||
<name>Public restrooms nearby</name>
|
||||
<desc>
|
||||
@@ -1175,7 +1213,7 @@ It also defines attribute names and descriptions in several languages.
|
||||
|
||||
<attr acode="A37" categories="de-facilities">
|
||||
<groundspeak id="29" inc="true" name="Telephone nearby" />
|
||||
<opencaching schema="OCDE" id="22" />
|
||||
<opencaching schema="http://www.opencaching.de/" id="22" />
|
||||
<lang id="en">
|
||||
<name>Public phone nearby</name>
|
||||
<desc>
|
||||
@@ -1204,7 +1242,7 @@ It also defines attribute names and descriptions in several languages.
|
||||
</attr>
|
||||
|
||||
<attr acode="A38" categories="de-facilities">
|
||||
<opencaching schema="OCDE" id="23" />
|
||||
<opencaching schema="http://www.opencaching.de/" id="23" />
|
||||
<lang id="en">
|
||||
<name>First aid available</name>
|
||||
<desc>
|
||||
@@ -1237,7 +1275,7 @@ It also defines attribute names and descriptions in several languages.
|
||||
|
||||
<attr acode="A39" categories="de-time-and-seasons">
|
||||
<groundspeak id="13" inc="true" name="Available at all times" />
|
||||
<opencaching schema="OCDE" id="38" />
|
||||
<opencaching schema="http://www.opencaching.de/" id="38" />
|
||||
<lang id="en">
|
||||
<name>Available 24/7</name>
|
||||
<desc>
|
||||
@@ -1266,7 +1304,7 @@ It also defines attribute names and descriptions in several languages.
|
||||
|
||||
<attr acode="A40" categories="de-time-and-seasons">
|
||||
<groundspeak id="13" inc="false" name="Available at all times" />
|
||||
<opencaching schema="OCDE" id="39" />
|
||||
<opencaching schema="http://www.opencaching.de/" id="39" />
|
||||
<lang id="en">
|
||||
<name>Not 24/7</name>
|
||||
<desc>
|
||||
@@ -1308,7 +1346,7 @@ It also defines attribute names and descriptions in several languages.
|
||||
|
||||
<attr acode="A41" categories="de-time-and-seasons">
|
||||
<groundspeak id="14" inc="false" name="Recommended at night" />
|
||||
<opencaching schema="OCDE" id="40" />
|
||||
<opencaching schema="http://www.opencaching.de/" id="40" />
|
||||
<lang id="en">
|
||||
<name>Not recommended at night</name>
|
||||
<desc>
|
||||
@@ -1346,7 +1384,8 @@ It also defines attribute names and descriptions in several languages.
|
||||
|
||||
<attr acode="A42" categories="de-time-and-seasons">
|
||||
<groundspeak id="14" inc="true" name="Recommended at night" />
|
||||
<opencaching schema="OCPL" id="91" />
|
||||
<opencaching schema="http://opencaching.pl/" id="91" />
|
||||
<opencaching schema="http://www.opencaching.nl/" id="91" />
|
||||
<lang id="en">
|
||||
<name>Recommended at night</name>
|
||||
<desc>
|
||||
@@ -1376,7 +1415,7 @@ It also defines attribute names and descriptions in several languages.
|
||||
|
||||
<attr acode="A43" categories="de-time-and-seasons">
|
||||
<groundspeak id="52" inc="true" name="Night Cache" />
|
||||
<opencaching schema="OCDE" id="1" />
|
||||
<opencaching schema="http://www.opencaching.de/" id="1" />
|
||||
<lang id="en">
|
||||
<name>Only at night</name>
|
||||
<desc>
|
||||
@@ -1415,7 +1454,7 @@ It also defines attribute names and descriptions in several languages.
|
||||
|
||||
<attr acode="A44" categories="de-time-and-seasons">
|
||||
<groundspeak id="62" inc="false" name="Seasonal access" />
|
||||
<opencaching schema="OCDE" id="42" />
|
||||
<opencaching schema="http://www.opencaching.de/" id="42" />
|
||||
<lang id="en">
|
||||
<name>All seasons</name>
|
||||
<desc>
|
||||
@@ -1448,7 +1487,7 @@ It also defines attribute names and descriptions in several languages.
|
||||
|
||||
<attr acode="A45" categories="de-time-and-seasons">
|
||||
<groundspeak id="62" inc="true" name="Seasonal access" />
|
||||
<opencaching schema="OCDE" id="60" />
|
||||
<opencaching schema="http://www.opencaching.de/" id="60" />
|
||||
<lang id="en">
|
||||
<name>Only available during specified seasons</name>
|
||||
<desc>
|
||||
@@ -1480,7 +1519,7 @@ It also defines attribute names and descriptions in several languages.
|
||||
</attr>
|
||||
|
||||
<attr acode="A46" categories="de-time-and-seasons">
|
||||
<opencaching schema="OCDE" id="43" />
|
||||
<opencaching schema="http://www.opencaching.de/" id="43" />
|
||||
<lang id="en">
|
||||
<name>Breeding season / protected nature</name>
|
||||
<desc>
|
||||
@@ -1519,7 +1558,7 @@ It also defines attribute names and descriptions in several languages.
|
||||
|
||||
<attr acode="A47" categories="de-time-and-seasons">
|
||||
<groundspeak id="15" inc="true" name="Available during winter" />
|
||||
<opencaching schema="OCDE" id="44" />
|
||||
<opencaching schema="http://www.opencaching.de/" id="44" />
|
||||
<lang id="en">
|
||||
<name>Available during winter</name>
|
||||
<desc>
|
||||
@@ -1556,7 +1595,7 @@ It also defines attribute names and descriptions in several languages.
|
||||
</attr>
|
||||
|
||||
<attr acode="A48" categories="de-time-and-seasons">
|
||||
<opencaching schema="OCDE" id="41" />
|
||||
<opencaching schema="http://www.opencaching.de/" id="41" />
|
||||
<lang id="en">
|
||||
<name>Not at high water level</name>
|
||||
<desc>
|
||||
@@ -1575,8 +1614,9 @@ It also defines attribute names and descriptions in several languages.
|
||||
</attr>
|
||||
|
||||
<attr acode="A49" categories="de-tools">
|
||||
<opencaching schema="OCPL" id="47" />
|
||||
<opencaching schema="OCDE" id="47" />
|
||||
<opencaching schema="http://opencaching.pl/" id="47" />
|
||||
<opencaching schema="http://www.opencaching.de/" id="47" />
|
||||
<opencaching schema="http://www.opencaching.nl/" id="47" />
|
||||
<lang id="en">
|
||||
<name>Compass required</name>
|
||||
<desc>
|
||||
@@ -1609,10 +1649,14 @@ It also defines attribute names and descriptions in several languages.
|
||||
E' necessaria una bussola.
|
||||
</desc>
|
||||
</lang>
|
||||
<lang id="nl">
|
||||
<name>Kompas nodig</name>
|
||||
</lang>
|
||||
</attr>
|
||||
|
||||
<attr acode="A50" categories="de-tools">
|
||||
<opencaching schema="OCPL" id="48" />
|
||||
<opencaching schema="http://opencaching.pl/" id="48" />
|
||||
<opencaching schema="http://www.opencaching.nl/" id="48" />
|
||||
<lang id="en">
|
||||
<name>Take something to write</name>
|
||||
<desc>
|
||||
@@ -1631,10 +1675,14 @@ It also defines attribute names and descriptions in several languages.
|
||||
Es ist kein Stift zum Loggen im Cache; bringe bitte einen eigenen mit.
|
||||
</desc>
|
||||
</lang>
|
||||
<lang id="nl">
|
||||
<name>Neem iets mee om te schrijven</name>
|
||||
</lang>
|
||||
</attr>
|
||||
|
||||
<attr acode="A51" categories="de-tools">
|
||||
<opencaching schema="OCPL" id="81" />
|
||||
<opencaching schema="http://opencaching.pl/" id="81" />
|
||||
<opencaching schema="http://www.opencaching.nl/" id="81" />
|
||||
<lang id="en">
|
||||
<name>You may need a shovel</name>
|
||||
<desc>
|
||||
@@ -1658,8 +1706,9 @@ It also defines attribute names and descriptions in several languages.
|
||||
|
||||
<attr acode="A52" categories="de-tools">
|
||||
<groundspeak id="44" inc="true" name="Flashlight required" />
|
||||
<opencaching schema="OCPL" id="82" />
|
||||
<opencaching schema="OCDE" id="48" />
|
||||
<opencaching schema="http://opencaching.pl/" id="82" />
|
||||
<opencaching schema="http://www.opencaching.de/" id="48" />
|
||||
<opencaching schema="http://www.opencaching.nl/" id="82" />
|
||||
<lang id="en">
|
||||
<name>Flashlight required</name>
|
||||
<desc>
|
||||
@@ -1697,7 +1746,7 @@ It also defines attribute names and descriptions in several languages.
|
||||
|
||||
<attr acode="A53" categories="de-tools">
|
||||
<groundspeak id="3" inc="true" name="Climbing gear" />
|
||||
<opencaching schema="OCDE" id="49" />
|
||||
<opencaching schema="http://www.opencaching.de/" id="49" />
|
||||
<lang id="en">
|
||||
<name>Climbing gear required</name>
|
||||
<desc>
|
||||
@@ -1734,7 +1783,7 @@ It also defines attribute names and descriptions in several languages.
|
||||
</attr>
|
||||
|
||||
<attr acode="A54" categories="de-tools">
|
||||
<opencaching schema="OCDE" id="50" />
|
||||
<opencaching schema="http://www.opencaching.de/" id="50" />
|
||||
<lang id="en">
|
||||
<name>Cave equipment required</name>
|
||||
<desc>
|
||||
@@ -1783,7 +1832,7 @@ It also defines attribute names and descriptions in several languages.
|
||||
|
||||
<attr acode="A55" categories="de-tools">
|
||||
<groundspeak id="5" inc="true" name="Scuba gear" />
|
||||
<opencaching schema="OCDE" id="51" />
|
||||
<opencaching schema="http://www.opencaching.de/" id="51" />
|
||||
<lang id="en">
|
||||
<name>Diving equipment required</name>
|
||||
<desc>
|
||||
@@ -1827,8 +1876,9 @@ It also defines attribute names and descriptions in several languages.
|
||||
|
||||
<attr acode="A56" categories="de-tools">
|
||||
<groundspeak id="51" inc="true" name="Special tool required" />
|
||||
<opencaching schema="OCPL" id="83" />
|
||||
<opencaching schema="OCDE" id="46" />
|
||||
<opencaching schema="http://opencaching.pl/" id="83" />
|
||||
<opencaching schema="http://www.opencaching.de/" id="46" />
|
||||
<opencaching schema="http://www.opencaching.nl/" id="83" />
|
||||
<lang id="en">
|
||||
<name>Special tools required</name>
|
||||
<desc>
|
||||
@@ -1870,8 +1920,9 @@ It also defines attribute names and descriptions in several languages.
|
||||
|
||||
<attr acode="A57" categories="de-tools">
|
||||
<groundspeak id="4" inc="true" name="Boat" />
|
||||
<opencaching schema="OCPL" id="86" />
|
||||
<opencaching schema="OCDE" id="52" />
|
||||
<opencaching schema="http://opencaching.pl/" id="86" />
|
||||
<opencaching schema="http://www.opencaching.de/" id="52" />
|
||||
<opencaching schema="http://www.opencaching.nl/" id="86" />
|
||||
<lang id="en">
|
||||
<name>Requires a boat</name>
|
||||
<desc>
|
||||
@@ -1917,7 +1968,7 @@ It also defines attribute names and descriptions in several languages.
|
||||
</attr>
|
||||
|
||||
<attr acode="A58" categories="de-tools">
|
||||
<opencaching schema="OCDE" id="35" />
|
||||
<opencaching schema="http://www.opencaching.de/" id="35" />
|
||||
<lang id="en">
|
||||
<name>No GPS required</name>
|
||||
<desc>
|
||||
@@ -1951,8 +2002,9 @@ It also defines attribute names and descriptions in several languages.
|
||||
|
||||
<attr acode="A59" categories="de-dangers">
|
||||
<groundspeak id="23" inc="true" name="Dangerous area" />
|
||||
<opencaching schema="OCDE" id="9" />
|
||||
<opencaching schema="OCPL" id="90" />
|
||||
<opencaching schema="http://www.opencaching.de/" id="9" />
|
||||
<opencaching schema="http://opencaching.pl/" id="90" />
|
||||
<opencaching schema="http://www.opencaching.nl/" id="90" />
|
||||
<lang id="en">
|
||||
<name>Dangerous area</name>
|
||||
<desc>
|
||||
@@ -2002,7 +2054,7 @@ It also defines attribute names and descriptions in several languages.
|
||||
</attr>
|
||||
|
||||
<attr acode="A60" categories="de-dangers">
|
||||
<opencaching schema="OCDE" id="10" />
|
||||
<opencaching schema="http://www.opencaching.de/" id="10" />
|
||||
<lang id="en">
|
||||
<name>Active railway nearby</name>
|
||||
<desc>
|
||||
@@ -2038,7 +2090,7 @@ It also defines attribute names and descriptions in several languages.
|
||||
|
||||
<attr acode="A61" categories="de-dangers">
|
||||
<groundspeak id="21" inc="true" name="Cliff / falling rocks" />
|
||||
<opencaching schema="OCDE" id="11" />
|
||||
<opencaching schema="http://www.opencaching.de/" id="11" />
|
||||
<lang id="en">
|
||||
<name>Cliff / Rocks</name>
|
||||
<desc>
|
||||
@@ -2083,9 +2135,10 @@ It also defines attribute names and descriptions in several languages.
|
||||
|
||||
<attr acode="A62" categories="de-dangers">
|
||||
<groundspeak id="22" inc="true" name="Hunting" />
|
||||
<opencaching schema="OCDE" id="12" />
|
||||
<opencaching schema="http://www.opencaching.de/" id="12" />
|
||||
<opencaching schema="http://www.opencaching.nl/" id="12" />
|
||||
<lang id="en">
|
||||
<name>Hunting</name>
|
||||
<name>Hunting grounds</name>
|
||||
<desc>
|
||||
The geocache is placed within a hunting ground. At twilight and in the
|
||||
dark, a flashlight or headlight should always be used for security
|
||||
@@ -2118,13 +2171,17 @@ It also defines attribute names and descriptions in several languages.
|
||||
reciproca gentilezza.
|
||||
</desc>
|
||||
</lang>
|
||||
<lang id="nl">
|
||||
<name>jachtgebied</name>
|
||||
</lang>
|
||||
</attr>
|
||||
|
||||
<attr acode="A63" categories="de-dangers">
|
||||
<groundspeak id="39" inc="true" name="Thorns" />
|
||||
<opencaching schema="OCDE" id="13" />
|
||||
<opencaching schema="http://www.opencaching.de/" id="13" />
|
||||
<opencaching schema="http://www.opencaching.nl/" id="13" />
|
||||
<lang id="en">
|
||||
<name>Thorns</name>
|
||||
<name>Look out for thorns</name>
|
||||
<desc>
|
||||
There are thorns near the cache. Wear appropriate clothes.
|
||||
</desc>
|
||||
@@ -2148,13 +2205,17 @@ It also defines attribute names and descriptions in several languages.
|
||||
Ci sono spine nei pressi della cache. Indossare indumenti appropriati.
|
||||
</desc>
|
||||
</lang>
|
||||
<lang id="nl">
|
||||
<name>Let op: doornen</name>
|
||||
</lang>
|
||||
</attr>
|
||||
|
||||
<attr acode="A64" categories="de-dangers">
|
||||
<groundspeak id="19" inc="true" name="Ticks" />
|
||||
<opencaching schema="OCDE" id="14" />
|
||||
<opencaching schema="http://www.opencaching.de/" id="14" />
|
||||
<opencaching schema="http://www.opencaching.nl/" id="14" />
|
||||
<lang id="en">
|
||||
<name>Ticks</name>
|
||||
<name>Look out for ticks</name>
|
||||
<desc>
|
||||
There are seasonably many ticks in this area. It is recommended to wear
|
||||
long trousers and to check yourself for ticks after geocaching.
|
||||
@@ -2189,11 +2250,14 @@ It also defines attribute names and descriptions in several languages.
|
||||
e borelliosi da morso di zecca</i>.
|
||||
</desc>
|
||||
</lang>
|
||||
<lang id="nl">
|
||||
<name>Let op: teken</name>
|
||||
</lang>
|
||||
</attr>
|
||||
|
||||
<attr acode="A65" categories="de-dangers">
|
||||
<groundspeak id="20" inc="true" name="Abandoned mines" />
|
||||
<opencaching schema="OCDE" id="15" />
|
||||
<opencaching schema="http://www.opencaching.de/" id="15" />
|
||||
<lang id="en">
|
||||
<name>Abandoned mines</name>
|
||||
<desc>
|
||||
@@ -2236,7 +2300,7 @@ It also defines attribute names and descriptions in several languages.
|
||||
|
||||
<attr acode="A66" categories="de-dangers">
|
||||
<groundspeak id="17" inc="true" name="Poisonous plants" />
|
||||
<opencaching schema="OCDE" id="16" />
|
||||
<opencaching schema="http://www.opencaching.de/" id="16" />
|
||||
<lang id="en">
|
||||
<name>Poisonous plants</name>
|
||||
<desc>
|
||||
@@ -2269,7 +2333,7 @@ It also defines attribute names and descriptions in several languages.
|
||||
|
||||
<attr acode="A67" categories="de-dangers">
|
||||
<groundspeak id="18" inc="true" name="Dangerous animals" />
|
||||
<opencaching schema="OCDE" id="17" />
|
||||
<opencaching schema="http://www.opencaching.de/" id="17" />
|
||||
<lang id="en">
|
||||
<name>Dangerous animals</name>
|
||||
<desc>
|
||||
@@ -2302,7 +2366,8 @@ It also defines attribute names and descriptions in several languages.
|
||||
</attr>
|
||||
|
||||
<attr acode="A68" categories="de-rating">
|
||||
<opencaching schema="OCPL" id="40" />
|
||||
<opencaching schema="http://opencaching.pl/" id="40" />
|
||||
<opencaching schema="http://www.opencaching.nl/" id="40" />
|
||||
<lang id="en">
|
||||
<name>Quick cache</name>
|
||||
<desc>
|
||||
@@ -2324,10 +2389,13 @@ It also defines attribute names and descriptions in several languages.
|
||||
In der Nähe sollte auch ein Parkplatz sein.
|
||||
</desc>
|
||||
</lang>
|
||||
<lang id="nl">
|
||||
<name>Een snelle oppikker</name>
|
||||
</lang>
|
||||
</attr>
|
||||
|
||||
<attr acode="A69" categories="de-rating">
|
||||
<opencaching schema="OCDE" id="37" />
|
||||
<opencaching schema="http://www.opencaching.de/" id="37" />
|
||||
<lang id="en">
|
||||
<name>Overnight stay necessary</name>
|
||||
<desc>
|
||||
@@ -2368,7 +2436,8 @@ It also defines attribute names and descriptions in several languages.
|
||||
|
||||
<attr acode="A70" categories="de-rating">
|
||||
<groundspeak id="6" inc="true" name="Recommended for kids" />
|
||||
<opencaching schema="OCPL" id="41" />
|
||||
<opencaching schema="http://opencaching.pl/" id="41" />
|
||||
<opencaching schema="http://www.opencaching.nl/" id="59" />
|
||||
<lang id="en">
|
||||
<name>Take your children</name>
|
||||
<desc>
|
||||
@@ -2390,11 +2459,14 @@ It also defines attribute names and descriptions in several languages.
|
||||
ohne besondere Gefahren findbar.
|
||||
</desc>
|
||||
</lang>
|
||||
<lang id="nl">
|
||||
<name>Kindvriendelijke cache</name>
|
||||
</lang>
|
||||
</attr>
|
||||
|
||||
<attr acode="A71" categories="de-rating">
|
||||
<groundspeak id="6" inc="true" name="Recommended for kids" />
|
||||
<opencaching schema="OCDE" id="59" />
|
||||
<opencaching schema="http://www.opencaching.de/" id="59" />
|
||||
<lang id="en">
|
||||
<name>Suited for children (10-12 yo)</name>
|
||||
<desc>
|
||||
@@ -2435,7 +2507,7 @@ It also defines attribute names and descriptions in several languages.
|
||||
</attr>
|
||||
|
||||
<attr acode="A72" categories="de-cache-types">
|
||||
<opencaching schema="OCDE" id="61" />
|
||||
<opencaching schema="http://www.opencaching.de/" id="61" />
|
||||
<lang id="en">
|
||||
<name>Reverse Cache</name>
|
||||
<desc>
|
||||
@@ -2461,7 +2533,7 @@ It also defines attribute names and descriptions in several languages.
|
||||
|
||||
<attr acode="A73" categories="de-time-and-seasons">
|
||||
<groundspeak id="13" inc="false" name="Available at all times" />
|
||||
<opencaching schema="OCPL" id="80" />
|
||||
<opencaching schema="http://opencaching.pl/" id="80" />
|
||||
<lang id="en">
|
||||
<name>Available at specified hours (may require access fee)</name>
|
||||
<desc>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
</opt>
|
||||
<opt name='fields' default='name'>
|
||||
<p>Pipe-separated list of field names which you are interested with.
|
||||
See the <b>returns</b> section for the list of available fields.</p>
|
||||
See below for the list of available fields.</p>
|
||||
</opt>
|
||||
<opt name='forward_compatible' default='true'>
|
||||
By default, OKAPI will return an empty placeholder if you ask for an
|
||||
@@ -88,7 +88,7 @@
|
||||
<li>
|
||||
<p><b>is_locally_used</b> - boolean, indicates if the attribute is *currently*
|
||||
used by *this* Opencaching server. Or, to be more specific, <b>true</b>
|
||||
means that the attribute CAN *currently* be included in the <b>attr_anodes</b> field
|
||||
means that the attribute CAN *currently* be included in the <b>attr_acodes</b> field
|
||||
of the <b>geocache</b> method in the *current* OKAPI installation.</p>
|
||||
|
||||
<p>Since currently you cannot search with A-codes (we're implementing S-codes
|
||||
|
||||
@@ -4,6 +4,7 @@ namespace okapi\services\attrs\attribute_index;
|
||||
|
||||
use Exception;
|
||||
use ErrorException;
|
||||
use ArrayObject;
|
||||
use okapi\Okapi;
|
||||
use okapi\Settings;
|
||||
use okapi\Cache;
|
||||
@@ -56,13 +57,17 @@ class WebService
|
||||
|
||||
# Retrieve the attribute objects and return the results.
|
||||
|
||||
$params = array(
|
||||
'acodes' => implode("|", $acodes),
|
||||
'langpref' => $langpref,
|
||||
'fields' => $fields,
|
||||
);
|
||||
$results = OkapiServiceRunner::call('services/attrs/attributes',
|
||||
new OkapiInternalRequest($request->consumer, $request->token, $params));
|
||||
if (count($acodes) > 0) {
|
||||
$params = array(
|
||||
'acodes' => implode("|", $acodes),
|
||||
'langpref' => $langpref,
|
||||
'fields' => $fields,
|
||||
);
|
||||
$results = OkapiServiceRunner::call('services/attrs/attributes',
|
||||
new OkapiInternalRequest($request->consumer, $request->token, $params));
|
||||
} else {
|
||||
$results = new ArrayObject();
|
||||
}
|
||||
return Okapi::formatted_response($request, $results);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ class WebService
|
||||
# Read the parameters.
|
||||
|
||||
$acodes = $request->get_parameter('acodes');
|
||||
if ($acodes === null) throw new ParamMissing('acodes');
|
||||
if (!$acodes) throw new ParamMissing('acodes');
|
||||
$acodes = explode("|", $acodes);
|
||||
|
||||
$langpref = $request->get_parameter('langpref');
|
||||
|
||||
@@ -16,8 +16,73 @@
|
||||
</opt>
|
||||
<opt name='fields' default='code|name|location|type|status'>
|
||||
<p>Pipe-separated list of field names which you are interested with.
|
||||
Selected fields will be included in the response.</p>
|
||||
<p>Currently available fields:</p>
|
||||
Selected fields will be included in the response. See below for the
|
||||
list of available fields.</p>
|
||||
</opt>
|
||||
<opt name='attribution_append' default='full'>
|
||||
<p>By default, OKAPI appends the value of <b>attribution_note</b> field to all the
|
||||
cache descriptions. If you would like to display the attribution note separately,
|
||||
you may use this parameter. Use one of the following values:</p>
|
||||
<ul>
|
||||
<li>
|
||||
<b>full</b> - OKAPI will append the attribution note to the descriptions of the
|
||||
geocache. The language of the note will match the language of the description
|
||||
(i.e. each value in <b>descriptions</b> may contain attribution notes in
|
||||
a different language).
|
||||
</li>
|
||||
<li>
|
||||
<p><b>none</b> - OKAPI will not append the attribution note to geocache
|
||||
descriptions. You will use the <b>attribution_note</b> instead (which depends
|
||||
on the <b>langpref</b> parameter).</p>
|
||||
|
||||
<p><b>Important note:</b> You are still <b>required</b> to display the
|
||||
<b>attribution_note</b> field in some other way.</p>
|
||||
</li>
|
||||
<li>
|
||||
<b>static</b> - OKAPI will append a "static" attribution note to the descriptions
|
||||
of the geocache. This might equal the "full" attribution note, but not necessarilly,
|
||||
since the "full" note may contain a current date
|
||||
(<a href='https://code.google.com/p/opencaching-api/issues/detail?id=178'>why?</a>),
|
||||
and the "static" note will not. This is implemented primarily for internal use
|
||||
(i.e. the replicate module). Usually you should not use it, because on some
|
||||
installations the static note will not be sufficient to meet the data license
|
||||
requirements.
|
||||
</li>
|
||||
</ul>
|
||||
</opt>
|
||||
<opt name='lpc' default='10'>
|
||||
Log-entries per cache - the number of logs returned in the <b>latest_logs</b> field.
|
||||
This should be an integer or a special "all" value. Please note, that you must include
|
||||
the <b>latest_logs</b> field in <b>fields</b> in order to see the log entries.
|
||||
</opt>
|
||||
<opt name='log_fields' default='uuid|date|user|type|comment'>
|
||||
Pipe-separated list of log fields to include in the <b>latest_logs</b> field.
|
||||
For valid field names, see <b>logs/entry</b> method.
|
||||
</opt>
|
||||
<opt name='my_location'>
|
||||
<p>The reference point for cache distance and bearing calculation (typically - the user's location),
|
||||
in the "lat|lon" format. This parameter is required when accessing <b>distance</b> and/or <b>bearing</b>
|
||||
fields.</p>
|
||||
<p>Use positive numbers for latitudes in the northern hemisphere and
|
||||
longitudes in the eastern hemisphere (and negative for southern and
|
||||
western hemispheres accordingly). These are full degrees with a dot
|
||||
as a decimal point (ex. "54.3|22.3").</p>
|
||||
</opt>
|
||||
<opt name="user_uuid">
|
||||
<p>User'd ID. Required to access fields like <b>is_found</b> using <b>Level 1</b> Authentication.</p>
|
||||
<p>Please note that if you want to access private fields (like <b>my_notes</b>), then
|
||||
this parameter won't help you. You have to use <b>Level 3</b> Authentication instead.</p>
|
||||
<p>If you use <b>Level 3</b> Authentication, you shouldn't use this parameter. Or, to be exact:</p>
|
||||
<ul>
|
||||
<li><b>user_uuid</b> will be extracted from the Access Token you use. You don't have to provide it.</li>
|
||||
<li>If you provide <b>user_uuid</b>, then it HAS TO match your Access Token. If it doesn't, OKAPI
|
||||
will respond with HTTP 400 error.</li>
|
||||
</ul>
|
||||
</opt>
|
||||
<common-format-params/>
|
||||
<returns>
|
||||
<p>A dictionary of fields you have selected. Currently available fields:</p>
|
||||
|
||||
<ul>
|
||||
<li><b>code</b> - unique Opencaching code of the geocache,</li>
|
||||
<li><b>name</b> - name of the geocache,</li>
|
||||
@@ -320,70 +385,7 @@
|
||||
<li><b>internal_id</b> - internal ID of the cache (<b>do not</b> use
|
||||
this, unless you know what you're doing; use the "code" as an identifier).</li>
|
||||
</ul>
|
||||
</opt>
|
||||
<opt name='attribution_append' default='full'>
|
||||
<p>By default, OKAPI appends the value of <b>attribution_note</b> field to all the
|
||||
cache descriptions. If you would like to display the attribution note separately,
|
||||
you may use this parameter. Use one of the following values:</p>
|
||||
<ul>
|
||||
<li>
|
||||
<b>full</b> - OKAPI will append the attribution note to the descriptions of the
|
||||
geocache. The language of the note will match the language of the description
|
||||
(i.e. each value in <b>descriptions</b> may contain attribution notes in
|
||||
a different language).
|
||||
</li>
|
||||
<li>
|
||||
<p><b>none</b> - OKAPI will not append the attribution note to geocache
|
||||
descriptions. You will use the <b>attribution_note</b> instead (which depends
|
||||
on the <b>langpref</b> parameter).</p>
|
||||
|
||||
<p><b>Important note:</b> You are still <b>required</b> to display the
|
||||
<b>attribution_note</b> field in some other way.</p>
|
||||
</li>
|
||||
<li>
|
||||
<b>static</b> - OKAPI will append a "static" attribution note to the descriptions
|
||||
of the geocache. This might equal the "full" attribution note, but not necessarilly,
|
||||
since the "full" note may contain a current date
|
||||
(<a href='https://code.google.com/p/opencaching-api/issues/detail?id=178'>why?</a>),
|
||||
and the "static" note will not. This is implemented primarily for internal use
|
||||
(i.e. the replicate module). Usually you should not use it, because on some
|
||||
installations the static note will not be sufficient to meet the data license
|
||||
requirements.
|
||||
</li>
|
||||
</ul>
|
||||
</opt>
|
||||
<opt name='lpc' default='10'>
|
||||
Log-entries per cache - the number of logs returned in the <b>latest_logs</b> field.
|
||||
This should be an integer or a special "all" value. Please note, that you must include
|
||||
the <b>latest_logs</b> field in <b>fields</b> in order to see the log entries.
|
||||
</opt>
|
||||
<opt name='log_fields' default='uuid|date|user|type|comment'>
|
||||
Pipe-separated list of log fields to include in the <b>latest_logs</b> field.
|
||||
For valid field names, see <b>logs/entry</b> method.
|
||||
</opt>
|
||||
<opt name='my_location'>
|
||||
<p>The reference point for cache distance and bearing calculation (typically - the user's location),
|
||||
in the "lat|lon" format. This parameter is required when accessing <b>distance</b> and/or <b>bearing</b>
|
||||
fields.</p>
|
||||
<p>Use positive numbers for latitudes in the northern hemisphere and
|
||||
longitudes in the eastern hemisphere (and negative for southern and
|
||||
western hemispheres accordingly). These are full degrees with a dot
|
||||
as a decimal point (ex. "54.3|22.3").</p>
|
||||
</opt>
|
||||
<opt name="user_uuid">
|
||||
<p>User'd ID. Required to access fields like <b>is_found</b> using <b>Level 1</b> Authentication.</p>
|
||||
<p>Please note that if you want to access private fields (like <b>my_notes</b>), then
|
||||
this parameter won't help you. You have to use <b>Level 3</b> Authentication instead.</p>
|
||||
<p>If you use <b>Level 3</b> Authentication, you shouldn't use this parameter. Or, to be exact:</p>
|
||||
<ul>
|
||||
<li><b>user_uuid</b> will be extracted from the Access Token you use. You don't have to provide it.</li>
|
||||
<li>If you provide <b>user_uuid</b>, then it HAS TO match your Access Token. If it doesn't, OKAPI
|
||||
will respond with HTTP 400 error.</li>
|
||||
</ul>
|
||||
</opt>
|
||||
<common-format-params/>
|
||||
<returns>
|
||||
<p>A dictionary of fields you have selected.</p>
|
||||
|
||||
<p>For example, for <i>geocache?cache_code=OP3D96&fields=type</i>
|
||||
query, the result might look something link this:</p>
|
||||
<pre>{"type": "Traditional"}</pre>
|
||||
|
||||
@@ -7,8 +7,13 @@
|
||||
<req name='log_uuid'>UUID of the log entry</req>
|
||||
<opt name='fields' default='date|user|type|comment'>
|
||||
<p>Pipe-separated list of field names which you are interested with.
|
||||
Selected fields will be included in the response.</p>
|
||||
<p>Currently available fields:</p>
|
||||
Selected fields will be included in the response. See below fot the list
|
||||
of available fields.</p>
|
||||
</opt>
|
||||
<common-format-params/>
|
||||
<returns>
|
||||
<p>A dictionary of fields you have selected. Currently available fields:</p>
|
||||
|
||||
<ul>
|
||||
<li><b>uuid</b> - unique ID of the log entry,</li>
|
||||
<li><b>cache_code</b> - code of the cache which the log entry refers to,</li>
|
||||
@@ -99,12 +104,10 @@
|
||||
Try to use UUIDs instead.</p>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<p>Note, that some fields can change in time (users can edit/delete
|
||||
their log entries).</p>
|
||||
</opt>
|
||||
<common-format-params/>
|
||||
<returns>
|
||||
<p>A dictionary of fields you have selected.</p>
|
||||
|
||||
<p>If given log entry does not exist, the method will
|
||||
respond with an HTTP 400 error.</p>
|
||||
</returns>
|
||||
|
||||
@@ -47,12 +47,11 @@
|
||||
<li>You wait for some time between requesting the changelog again.</li>
|
||||
<li><b>changelog</b>?since=238017 - etc.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</desc>
|
||||
<req name='since'>
|
||||
<p>Current revision of your database. This should be the same as the value
|
||||
of <b>revision</b> attribute, which you received with your previous update.</p>
|
||||
|
||||
<p>Old revisions are deleted, the <b>since</b> argument MUST referer to a revision no older
|
||||
than 10 days. You will have to download a fulldump if you have an older copy
|
||||
(shame on you!).</p>
|
||||
|
||||
@@ -30,11 +30,14 @@
|
||||
the entire database every time they want, this could kill our servers.
|
||||
If you want to enable such features for your users, you can do it, but you
|
||||
must use <b>your own server</b> for data traffic (especially, fulldump requests).</li>
|
||||
|
||||
<li>Fulldump is a copy of the entire database. We generate such copy once every couple of
|
||||
days. This copy if intended for you to start only, later you must use the changelog to
|
||||
keep it up-to-date.</li>
|
||||
|
||||
<li>Every time our database is extended (new fields or new object types), and you want to
|
||||
make use of these new fields, you are of course allowed to download a fulldump copy again.</li>
|
||||
|
||||
<li>There is no XMLMAP version of this file.</li>
|
||||
</ul>
|
||||
</desc>
|
||||
|
||||
@@ -9,8 +9,19 @@
|
||||
</desc>
|
||||
<req name='fields'>
|
||||
<p>Pipe-separated list of field names which you are interested with.
|
||||
Selected fields will be included in the response.</p>
|
||||
<p>Currently available fields:</p>
|
||||
Selected fields will be included in the response. See below for the
|
||||
list of available fields.</p>
|
||||
</req>
|
||||
<opt name='user_uuid'>
|
||||
<p>ID of the user.</p>
|
||||
<p>This parameter is optional only when you sign your
|
||||
request with an Access Token (Level 3 Authentication). Otherwise,
|
||||
it is <b>required</b>.</p>
|
||||
</opt>
|
||||
<common-format-params/>
|
||||
<returns>
|
||||
<p>A dictionary of fields you have selected. Currently available fields:</p>
|
||||
|
||||
<ul>
|
||||
<li><b>uuid</b> - ID of the user,</li>
|
||||
<li><b>username</b> - username (login) of the user,</li>
|
||||
@@ -28,16 +39,7 @@
|
||||
<li><b>caches_hidden</b> - number of caches owned,</li>
|
||||
<li><b>rcmds_given</b> - number of recommendations given.</li>
|
||||
</ul>
|
||||
</req>
|
||||
<opt name='user_uuid'>
|
||||
<p>ID of the user.</p>
|
||||
<p>This parameter is optional only when you sign your
|
||||
request with an Access Token (Level 3 Authentication). Otherwise,
|
||||
it is <b>required</b>.</p>
|
||||
</opt>
|
||||
<common-format-params/>
|
||||
<returns>
|
||||
<p>A dictionary of fields you have selected.</p>
|
||||
|
||||
<p>If given user does not exist, the method will respond with an HTTP 400 error.</p>
|
||||
</returns>
|
||||
</xml>
|
||||
@@ -17,6 +17,7 @@
|
||||
<returns>
|
||||
<p>A dictionary. User IDs you provide will be mapped to dictionary keys,
|
||||
and each value will be a dictionary of fields you have selected.</p>
|
||||
|
||||
<p>Value of <b>null</b> means that the given user haven't been found.
|
||||
(This behavior is different than in the services/users/user method, which
|
||||
responds with an HTTP 400 error in such case.)</p>
|
||||
|
||||
@@ -130,9 +130,21 @@ final class Settings
|
||||
'DB_USERNAME' => null,
|
||||
'DB_PASSWORD' => null,
|
||||
|
||||
/** URL of the OC site (with slash, and without the "/okapi" part). */
|
||||
/**
|
||||
* URL of this site (with slash, and without "/okapi"). If this is a
|
||||
* development installation, it should point to the local URL (e.g.
|
||||
* "http://localhost/".
|
||||
*/
|
||||
'SITE_URL' => null,
|
||||
|
||||
/**
|
||||
* URL of the official OC site. For production sites, it should equal
|
||||
* SITE_URL (this is also the default). For development installations,
|
||||
* it should point to the official OC site from which you got your
|
||||
* database dump (e.g. "http://opencaching.pl/").
|
||||
*/
|
||||
'ORIGIN_URL' => null,
|
||||
|
||||
/** OKAPI needs this when inserting new data to cache_logs table. */
|
||||
'OC_NODE_ID' => null,
|
||||
|
||||
@@ -177,7 +189,7 @@ final class Settings
|
||||
self::verify(self::$SETTINGS);
|
||||
}
|
||||
|
||||
private static function verify($dict)
|
||||
private static function verify(&$dict)
|
||||
{
|
||||
if (!in_array($dict['OC_BRANCH'], array('oc.pl', 'oc.de')))
|
||||
throw new Exception("Currently, OC_BRANCH has to be either 'oc.pl' or 'oc.de'. Hint: Whom did you get your code from?");
|
||||
@@ -202,8 +214,12 @@ final class Settings
|
||||
foreach ($notnull as $k)
|
||||
if ($dict[$k] === null)
|
||||
throw new Exception("$k cannot be null.");
|
||||
if ($dict['SITE_URL'][strlen($dict['SITE_URL']) - 1] != '/')
|
||||
throw new Exception("SITE_URL must end with a slash.");
|
||||
if ($dict['ORIGIN_URL'] === null)
|
||||
$dict['ORIGIN_URL'] = $dict['SITE_URL'];
|
||||
$slash_keys = array('SITE_URL', 'ORIGIN_URL');
|
||||
foreach ($slash_keys as $key)
|
||||
if ($dict[$key][strlen($dict[$key]) - 1] != '/')
|
||||
throw new Exception("$key must end with a slash.");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 34 KiB |
@@ -33,4 +33,4 @@ class OkapiUrls
|
||||
);
|
||||
}
|
||||
|
||||
# This line is used for commit-hooks testing: .........>
|
||||
# This line is used for commit-hooks testing: ..........>
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
<title>OKAPI Examples</title>
|
||||
<link rel="stylesheet" href="<?= $vars['okapi_base_url'] ?>static/common.css?<?= $vars['okapi_rev'] ?>">
|
||||
<link rel="icon" type="image/x-icon" href="<?= $vars['okapi_base_url'] ?>static/favicon.ico">
|
||||
<script src='https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js'></script>
|
||||
<script>
|
||||
var okapi_base_url = "<?= $vars['okapi_base_url'] ?>";
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
<title>404 Page Not Found</title>
|
||||
<link rel="stylesheet" href="<?= $vars['okapi_base_url'] ?>static/common.css?<?= $vars['okapi_rev'] ?>">
|
||||
<link rel="icon" type="image/x-icon" href="<?= $vars['okapi_base_url'] ?>static/favicon.ico">
|
||||
</head>
|
||||
<body class='api'>
|
||||
<div class='okd_mid'>
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
<title>OKAPI - Opencaching API</title>
|
||||
<link rel="stylesheet" href="<?= $vars['okapi_base_url'] ?>static/common.css?<?= $vars['okapi_rev'] ?>">
|
||||
<link rel="icon" type="image/x-icon" href="<?= $vars['okapi_base_url'] ?>static/favicon.ico">
|
||||
<script src='https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js'></script>
|
||||
<script>
|
||||
var okapi_base_url = "<?= $vars['okapi_base_url'] ?>";
|
||||
|
||||
@@ -10,6 +10,7 @@ $m = $vars['method'];
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
<title><?= $m['brief_description'] ?> - OKAPI Reference</title>
|
||||
<link rel="stylesheet" href="<?= $vars['okapi_base_url'] ?>static/common.css?<?= $vars['okapi_rev'] ?>">
|
||||
<link rel="icon" type="image/x-icon" href="<?= $vars['okapi_base_url'] ?>static/favicon.ico">
|
||||
<script src='https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js'></script>
|
||||
<script>
|
||||
var okapi_base_url = "<?= $vars['okapi_base_url'] ?>";
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
<title>Sign up for an API Key</title>
|
||||
<link rel="stylesheet" href="<?= $vars['okapi_base_url'] ?>static/common.css?<?= $vars['okapi_rev'] ?>">
|
||||
<link rel="icon" type="image/x-icon" href="<?= $vars['okapi_base_url'] ?>static/favicon.ico">
|
||||
<script src='https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js'></script>
|
||||
<script>
|
||||
var okapi_base_url = "<?= $vars['okapi_base_url'] ?>";
|
||||
|
||||
@@ -37,6 +37,7 @@ function get_okapi_settings()
|
||||
'SITELANG' => strtolower($opt['template']['default']['locale']),
|
||||
'TIMEZONE' => $opt['php']['timezone'], # BTW, OCPL doesn't have it in settings.inc.php
|
||||
'SITE_URL' => $opt['page']['absolute_url'],
|
||||
'ORIGIN_URL' => $opt['page']['origin_url'],
|
||||
'VAR_DIR' => $GLOBALS['rootpath'].'var/okapi',
|
||||
'IMAGES_DIR' => rtrim($opt['logic']['pictures']['dir'], '/'),
|
||||
'OC_NODE_ID' => $opt['logic']['node']['id'],
|
||||
|
||||
Reference in New Issue
Block a user