diff --git a/htdocs/okapi/core.php b/htdocs/okapi/core.php
index d1e97d62..ba1def2d 100644
--- a/htdocs/okapi/core.php
+++ b/htdocs/okapi/core.php
@@ -689,7 +689,7 @@ class OkapiHttpResponse
if ($try_gzip && is_string($this->body))
{
header("Content-Encoding: gzip");
- $gzipped = gzencode($this->body, 5, true);
+ $gzipped = gzencode($this->body, 5);
header("Content-Length: ".strlen($gzipped));
print $gzipped;
}
@@ -778,7 +778,7 @@ class Okapi
{
public static $data_store;
public static $server;
- public static $revision = 567; # This gets replaced in automatically deployed packages
+ public static $revision = 576; # 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. */
diff --git a/htdocs/okapi/locale/de_DE/LC_MESSAGES/okapi_messages.mo b/htdocs/okapi/locale/de_DE/LC_MESSAGES/okapi_messages.mo
index 948dd123..3ac041b9 100644
Binary files a/htdocs/okapi/locale/de_DE/LC_MESSAGES/okapi_messages.mo and b/htdocs/okapi/locale/de_DE/LC_MESSAGES/okapi_messages.mo differ
diff --git a/htdocs/okapi/locale/de_DE/LC_MESSAGES/okapi_messages.po b/htdocs/okapi/locale/de_DE/LC_MESSAGES/okapi_messages.po
index 13b9d253..e8f24902 100644
--- a/htdocs/okapi/locale/de_DE/LC_MESSAGES/okapi_messages.po
+++ b/htdocs/okapi/locale/de_DE/LC_MESSAGES/okapi_messages.po
@@ -2,75 +2,84 @@ msgid ""
msgstr ""
"Project-Id-Version: OKAPI\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-08-22 21:18+0100\n"
-"PO-Revision-Date: 2012-08-22 21:18+0100\n"
-"Last-Translator: \n"
-"Language-Team: following \n"
+"POT-Creation-Date: 2013-03-26 16:20+0100\n"
+"PO-Revision-Date: 2013-03-26 16:21+0100\n"
+"Last-Translator: following \n"
+"Language-Team: following \n"
"Language: German\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Poedit-KeywordsList: _;gettext;gettext_noop\n"
-"X-Poedit-Basepath: c:\\source\\oc\\server-3.0\\htdocs\\okapi\n"
-"Plural-Forms: nplurals=2; plural=(n != 1)\n"
+"X-Poedit-Basepath: c:\\source\\okapi\\following2\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Poedit-SourceCharset: UTF-8\n"
-"X-Poedit-SearchPath-0: c:\\source\\oc\\server-3.0\\htdocs\\okapi\n"
+"X-Generator: Poedit 1.5.5\n"
+"X-Poedit-SearchPath-0: c:\\source\\okapi\\following2\n"
-#: c:\source\oc\server-3.0\htdocs\okapi/services/caches/geocaches.php:640
+#: c:\source\okapi\following2/okapi/services/caches/geocaches.php:777
msgid "Stage"
msgstr "Station"
-#: c:\source\oc\server-3.0\htdocs\okapi/services/caches/formatters/gpxfile.tpl.php:27
-#: c:\source\oc\server-3.0\htdocs\okapi/services/caches/formatters/gpxfile.tpl.php:44
+#: c:\source\okapi\following2/okapi/services/caches/geocaches.php:897
+#, php-format
+msgid ""
+"This geocache description comes from the %s"
+"a> site."
+msgstr ""
+"Diese Cache-Beschreibung stammt von %s."
+
+#: c:\source\okapi\following2/okapi/services/caches/formatters/gpxfile.tpl.php:31
+#: c:\source\okapi\following2/okapi/services/caches/formatters/gpxfile.tpl.php:48
msgid "hidden by"
msgstr "versteckt von"
-#: c:\source\oc\server-3.0\htdocs\okapi/services/caches/formatters/gpxfile.tpl.php:46
+#: c:\source\okapi\following2/okapi/services/caches/formatters/gpxfile.tpl.php:50
#, php-format
msgid "%d recommendation"
msgid_plural "%d recommendations"
msgstr[0] "%d Empfehlung"
msgstr[1] "%d Empfehlungen"
-#: c:\source\oc\server-3.0\htdocs\okapi/services/caches/formatters/gpxfile.tpl.php:47
+#: c:\source\okapi\following2/okapi/services/caches/formatters/gpxfile.tpl.php:51
#, php-format
msgid "found %d time"
msgid_plural "found %d times"
msgstr[0] "%d mal gefunden"
msgstr[1] "%d mal gefunden"
-#: c:\source\oc\server-3.0\htdocs\okapi/services/caches/formatters/gpxfile.tpl.php:50
+#: c:\source\okapi\following2/okapi/services/caches/formatters/gpxfile.tpl.php:54
#, php-format
msgid "%d trackable"
msgid_plural "%d trackables"
msgstr[0] "%d Geokret"
msgstr[1] "%d Geokrets"
-#: c:\source\oc\server-3.0\htdocs\okapi/services/caches/formatters/gpxfile.tpl.php:54
+#: c:\source\okapi\following2/okapi/services/caches/formatters/gpxfile.tpl.php:58
msgid "Personal notes"
msgstr "Persönliche Notizen"
-#: c:\source\oc\server-3.0\htdocs\okapi/services/caches/formatters/gpxfile.tpl.php:58
+#: c:\source\okapi\following2/okapi/services/caches/formatters/gpxfile.tpl.php:62
msgid "Attributes"
msgstr "Attribute"
-#: c:\source\oc\server-3.0\htdocs\okapi/services/caches/formatters/gpxfile.tpl.php:62
+#: c:\source\okapi\following2/okapi/services/caches/formatters/gpxfile.tpl.php:66
msgid "Trackables"
msgstr "Geokrets"
-#: c:\source\oc\server-3.0\htdocs\okapi/services/caches/formatters/gpxfile.tpl.php:80
+#: c:\source\okapi\following2/okapi/services/caches/formatters/gpxfile.tpl.php:84
msgid "Images"
msgstr "Bilder"
-#: c:\source\oc\server-3.0\htdocs\okapi/services/caches/formatters/gpxfile.tpl.php:87
+#: c:\source\okapi\following2/okapi/services/caches/formatters/gpxfile.tpl.php:91
msgid "Spoilers"
msgstr "Spoiler"
-#: c:\source\oc\server-3.0\htdocs\okapi/services/caches/formatters/gpxfile.tpl.php:95
+#: c:\source\okapi\following2/okapi/services/caches/formatters/gpxfile.tpl.php:99
msgid "Image descriptions"
msgstr "Bildbeschreibungen"
-#: c:\source\oc\server-3.0\htdocs\okapi/services/logs/submit.php:62
+#: c:\source\okapi\following2/okapi/services/logs/submit.php:62
msgid ""
"You are trying to publish a log entry with a date in future. Cache log "
"entries are allowed to be published in the past, but NOT in the future."
@@ -78,7 +87,7 @@ msgstr ""
"Das Datum deines Logeintrags liegt in der Zukunft. Cache-Logs können nur für "
"die Vergangenheit oder für heute eingetragen werden."
-#: c:\source\oc\server-3.0\htdocs\okapi/services/logs/submit.php:82
+#: c:\source\okapi\following2/okapi/services/logs/submit.php:82
#, php-format
msgid ""
"However, your cache rating was ignored, because %s does not have a rating "
@@ -86,11 +95,11 @@ msgid ""
msgstr ""
"Deine Cachewertung wurde jedoch ignoriert, weil %s kein Bewertungssystem hat."
-#: c:\source\oc\server-3.0\htdocs\okapi/services/logs/submit.php:92
+#: c:\source\okapi\following2/okapi/services/logs/submit.php:92
msgid "Recommending is allowed only for 'Found it' logtypes."
msgstr "Empfehlungen sind nur bei 'Gefunden'-Logs erlaubt."
-#: c:\source\oc\server-3.0\htdocs\okapi/services/logs/submit.php:101
+#: c:\source\okapi\following2/okapi/services/logs/submit.php:101
#, php-format
msgid ""
"However, your \"needs maintenance\" flag was ignored, because %s does not "
@@ -99,15 +108,7 @@ msgstr ""
"Deine Angabe \"benötigt Wartung\" wurde jedoch ignoriert, weil es diese "
"Funktion bei %s nicht gibt."
-#: c:\source\oc\server-3.0\htdocs\okapi/services/logs/submit.php:124
-msgid ""
-"This cache is archived. Only admins and the owner are allowed to add a log "
-"entry."
-msgstr ""
-"Dieser Cache ist archiviert. Nur OC-Admins und der Besitzer können "
-"Logeinträge machen."
-
-#: c:\source\oc\server-3.0\htdocs\okapi/services/logs/submit.php:128
+#: c:\source\okapi\following2/okapi/services/logs/submit.php:119
msgid ""
"This cache is an Event cache. You cannot \"Find it\"! (But - you may "
"\"Comment\" on it.)"
@@ -115,26 +116,26 @@ msgstr ""
"Dies ist ein Event-Cache. Du kannst ihn nicht \"finden\" (aber du kannst "
"einen Hinweis loggen)."
-#: c:\source\oc\server-3.0\htdocs\okapi/services/logs/submit.php:130
+#: c:\source\okapi\following2/okapi/services/logs/submit.php:121
msgid "Your have to supply some text for your comment."
msgstr "Du musst einen Text für dein Hinweislog eingeben!"
-#: c:\source\oc\server-3.0\htdocs\okapi/services/logs/submit.php:143
+#: c:\source\okapi\following2/okapi/services/logs/submit.php:134
msgid "This cache requires a password. You didn't provide one!"
msgstr ""
"Dieser Cache kann nur mit Kennwort geloggt werden, aber du hast keines "
"angegeben."
-#: c:\source\oc\server-3.0\htdocs\okapi/services/logs/submit.php:145
+#: c:\source\okapi\following2/okapi/services/logs/submit.php:136
msgid "Invalid password!"
msgstr "Ungültiges Kennwort!"
-#: c:\source\oc\server-3.0\htdocs\okapi/services/logs/submit.php:194
+#: c:\source\okapi\following2/okapi/services/logs/submit.php:186
msgid "You have already submitted a log entry with exactly the same contents."
msgstr ""
"Du hast bereits einen Logeintrag mit genau dem gleichen Inhalt gemacht."
-#: c:\source\oc\server-3.0\htdocs\okapi/services/logs/submit.php:213
+#: c:\source\okapi\following2/okapi/services/logs/submit.php:205
msgid ""
"You have already submitted a \"Found it\" log entry once. Now you may submit "
"\"Comments\" only!"
@@ -142,49 +143,49 @@ msgstr ""
"Du hast diesen Cache bereits als gefunden geloggt. Ein zweites Fundlog ist "
"nicht möglich, aber du kannst stattdessen einen Hinweis loggen."
-#: c:\source\oc\server-3.0\htdocs\okapi/services/logs/submit.php:215
+#: c:\source\okapi\following2/okapi/services/logs/submit.php:207
msgid "You are the owner of this cache. You may submit \"Comments\" only!"
msgstr ""
"Als Besitzer des Caches kannst du nur Hinweise loggen, keine Funde oder "
"Nichtfunde."
-#: c:\source\oc\server-3.0\htdocs\okapi/services/logs/submit.php:233
+#: c:\source\okapi\following2/okapi/services/logs/submit.php:225
msgid "You have already rated this cache once. Your rating cannot be changed."
msgstr ""
"Du hast diesen Cache bereits bewertet. Deine Bewertung ist nicht änderbar."
-#: c:\source\oc\server-3.0\htdocs\okapi/services/logs/submit.php:250
+#: c:\source\okapi\following2/okapi/services/logs/submit.php:242
msgid "You have already recommended this cache once."
msgstr "Du hast diesen Cache bereits empfohlen."
-#: c:\source\oc\server-3.0\htdocs\okapi/services/logs/submit.php:257
+#: c:\source\okapi\following2/okapi/services/logs/submit.php:249
msgid "You don't have any recommendations to give. Find more caches first!"
msgstr ""
"Du musst mehr Caches finden, um eine weitere Bewertung abgeben zu können!"
-#: c:\source\oc\server-3.0\htdocs\okapi/services/logs/submit.php:409
+#: c:\source\okapi\following2/okapi/services/logs/submit.php:413
msgid "Your cache log entry was posted successfully."
msgstr "Dein Log wurde veröffentlicht."
-#: c:\source\oc\server-3.0\htdocs\okapi/views/apps/authorize.tpl.php:5
+#: c:\source\okapi\following2/okapi/views/apps/authorize.tpl.php:5
msgid "Authorization Form"
msgstr "Authorisierungs-Formular"
-#: c:\source\oc\server-3.0\htdocs\okapi/views/apps/authorize.tpl.php:46
+#: c:\source\okapi\following2/okapi/views/apps/authorize.tpl.php:46
msgid "Expired request"
msgstr "Anfrage abgelaufen"
-#: c:\source\oc\server-3.0\htdocs\okapi/views/apps/authorize.tpl.php:47
+#: c:\source\okapi\following2/okapi/views/apps/authorize.tpl.php:47
msgid "Unfortunately, the request has expired. Please try again."
msgstr ""
"Die Anfrage ist wegen Zeitüberschreitung abgelaufen. Bitte versuche es noch "
"einmal."
-#: c:\source\oc\server-3.0\htdocs\okapi/views/apps/authorize.tpl.php:49
+#: c:\source\okapi\following2/okapi/views/apps/authorize.tpl.php:49
msgid "External application is requesting access..."
msgstr "Eine externe Anwendung wünscht Zugriff ..."
-#: c:\source\oc\server-3.0\htdocs\okapi/views/apps/authorize.tpl.php:50
+#: c:\source\okapi\following2/okapi/views/apps/authorize.tpl.php:50
#, php-format
msgid ""
"%s wants to access your %s account. Do you agree to grant "
@@ -193,15 +194,15 @@ msgstr ""
"%s möchte auf dein %s-Benutzerkonto zugreifen. Möchtest du "
"dieser Anwendung Zugriff gewähren?"
-#: c:\source\oc\server-3.0\htdocs\okapi/views/apps/authorize.tpl.php:53
+#: c:\source\okapi\following2/okapi/views/apps/authorize.tpl.php:53
msgid "I agree"
msgstr "Ja"
-#: c:\source\oc\server-3.0\htdocs\okapi/views/apps/authorize.tpl.php:54
+#: c:\source\okapi\following2/okapi/views/apps/authorize.tpl.php:54
msgid "Decline"
msgstr "Nein"
-#: c:\source\oc\server-3.0\htdocs\okapi/views/apps/authorize.tpl.php:56
+#: c:\source\okapi\following2/okapi/views/apps/authorize.tpl.php:56
#, php-format
msgid ""
"\n"
@@ -229,15 +230,15 @@ msgstr ""
"\t\t\t\t\tDu kannst diese Erlaubnis jederzeit widerrufen.
\n"
"\t\t\t\t"
-#: c:\source\oc\server-3.0\htdocs\okapi/views/apps/authorized.tpl.php:5
+#: c:\source\okapi\following2/okapi/views/apps/authorized.tpl.php:5
msgid "Authorization Succeeded"
msgstr "Authorisierung erfolgreich"
-#: c:\source\oc\server-3.0\htdocs\okapi/views/apps/authorized.tpl.php:28
+#: c:\source\okapi\following2/okapi/views/apps/authorized.tpl.php:28
msgid "Access successfully granted"
msgstr "Zugang wurde gewährt"
-#: c:\source\oc\server-3.0\htdocs\okapi/views/apps/authorized.tpl.php:29
+#: c:\source\okapi\following2/okapi/views/apps/authorized.tpl.php:29
#, php-format
msgid ""
"\n"
@@ -254,15 +255,15 @@ msgstr ""
"PIN-Code ein:\n"
"\t\t\t"
-#: c:\source\oc\server-3.0\htdocs\okapi/views/apps/index.tpl.php:5
+#: c:\source\okapi\following2/okapi/views/apps/index.tpl.php:5
msgid "My Apps"
msgstr "Meine Apps"
-#: c:\source\oc\server-3.0\htdocs\okapi/views/apps/index.tpl.php:29
+#: c:\source\okapi\following2/okapi/views/apps/index.tpl.php:29
msgid "Your external applications"
msgstr "Deine externe Anwendung"
-#: c:\source\oc\server-3.0\htdocs\okapi/views/apps/index.tpl.php:31
+#: c:\source\okapi\following2/okapi/views/apps/index.tpl.php:31
#, php-format
msgid ""
"\n"
@@ -284,11 +285,11 @@ msgstr ""
"Aktionen mehr unter deinem \t\t\t\t\tBenutzername ausführen können.\n"
"\t\t\t\t"
-#: c:\source\oc\server-3.0\htdocs\okapi/views/apps/index.tpl.php:45
+#: c:\source\okapi\following2/okapi/views/apps/index.tpl.php:45
msgid "remove"
msgstr "entfernen"
-#: c:\source\oc\server-3.0\htdocs\okapi/views/apps/index.tpl.php:50
+#: c:\source\okapi\following2/okapi/views/apps/index.tpl.php:50
#, php-format
msgid ""
"\n"
@@ -308,3 +309,10 @@ msgstr ""
"\t\t\t\t\tdazu ermächtigt. Sobald du externe Opencaching-Anwendungen "
"aktivierst, werden diese hier erscheinen.\n"
"\t\t\t\t"
+
+#~ msgid ""
+#~ "This cache is archived. Only admins and the owner are allowed to add a "
+#~ "log entry."
+#~ msgstr ""
+#~ "Dieser Cache ist archiviert. Nur OC-Admins und der Besitzer können "
+#~ "Logeinträge machen."
diff --git a/htdocs/okapi/services/caches/geocache.xml b/htdocs/okapi/services/caches/geocache.xml
index c09a1c47..3a028b35 100644
--- a/htdocs/okapi/services/caches/geocache.xml
+++ b/htdocs/okapi/services/caches/geocache.xml
@@ -127,7 +127,7 @@
null if geocache does not have a container,
- size2 - string indicating the size od the container, so called
+
size2 - string indicating the size of the container, so called
"size2 code". One of the following values:
'none', 'nano', 'micro', 'small', 'regular', 'large', 'xlarge', 'other'.
diff --git a/htdocs/okapi/services/caches/geocaches.php b/htdocs/okapi/services/caches/geocaches.php
index 5b4257c1..5f68e781 100644
--- a/htdocs/okapi/services/caches/geocaches.php
+++ b/htdocs/okapi/services/caches/geocaches.php
@@ -709,6 +709,8 @@ class WebService
{
foreach ($results as &$result_ref)
$result_ref['alt_wpts'] = array();
+ $cachelist = implode("','", array_map('mysql_real_escape_string', array_keys($cacheid2wptcode)));
+
if (Settings::get('OC_BRANCH') == 'oc.pl')
{
# OCPL uses 'waypoints' table to store additional waypoints. OCPL also have
@@ -716,6 +718,13 @@ class WebService
# of a multicache). Such hidden waypoints are not exposed by OKAPI. A stage
# fields is used for ordering and naming.
+ $waypoints = Db::select_value("
+ select count(*)
+ from waypoints
+ where
+ cache_id in ('".$cachelist."')
+ and status = 1
+ ");
$rs = Db::query("
select
cache_id, stage, latitude, longitude, `desc`,
@@ -727,7 +736,7 @@ class WebService
end as sym
from waypoints
where
- cache_id in ('".implode("','", array_map('mysql_real_escape_string', array_keys($cacheid2wptcode)))."')
+ cache_id in ('".$cachelist."')
and status = 1
order by cache_id, stage, `desc`
");
@@ -736,28 +745,40 @@ class WebService
{
# OCDE uses 'coordinates' table (with type=1) to store additional waypoints.
# All waypoints are are public.
-
+
+ $waypoints = Db::select_value("
+ select count(*)
+ from coordinates
+ where
+ type = 1
+ and cache_id in ('".$cachelist."')
+ ");
$rs = Db::query("
select
cache_id,
- null as stage,
+ @stage := @stage + 1 as stage,
latitude, longitude,
description as `desc`,
case subtype
when 1 then 'Parking Area'
+ when 3 then 'Flag, Blue'
+ when 4 then 'Circle with X'
+ when 5 then 'Diamond, Green'
else 'Flag, Green'
end as sym
from coordinates
+ join (select @stage := 0) s
where
type = 1
- and cache_id in ('".implode("','", array_map('mysql_real_escape_string', array_keys($cacheid2wptcode)))."')
- order by cache_id, `desc`
+ and cache_id in ('".$cachelist."')
+ order by cache_id, id, `desc`
");
}
+ $wpt_format = "%s-%0" . ($waypoints>0 ? (floor(log10(count($waypoints))) + 1) : "") . "d";
while ($row = mysql_fetch_assoc($rs))
{
$results[$cacheid2wptcode[$row['cache_id']]]['alt_wpts'][] = array(
- 'name' => $cacheid2wptcode[$row['cache_id']]."-".($row['stage'] ? $row['stage'] : "wpt"),
+ 'name' => sprintf($wpt_format, $cacheid2wptcode[$row['cache_id']], $row['stage']),
'location' => round($row['latitude'], 6)."|".round($row['longitude'], 6),
'sym' => $row['sym'],
'description' => ($row['stage'] ? _("Stage")." ".$row['stage'].": " : "").$row['desc'],
@@ -765,8 +786,8 @@ class WebService
}
}
- # Country and/or state.
-
+ # Country and/or state.
+
if (in_array('country', $fields) || in_array('state', $fields))
{
$rs = Db::query("
diff --git a/htdocs/okapi/services/caches/mark.xml b/htdocs/okapi/services/caches/mark.xml
index d52780e7..ff918770 100644
--- a/htdocs/okapi/services/caches/mark.xml
+++ b/htdocs/okapi/services/caches/mark.xml
@@ -3,7 +3,7 @@
166
This method allows your users to mark the geocache as watched or
- ignored, or to do modify user's personal notes saved along the geocache.
+ ignored.
Read the docs on separate parameters for details.