okapi r576

This commit is contained in:
following 2013-03-27 15:44:24 +01:00
parent 73ab3868e8
commit 92cee91169
6 changed files with 99 additions and 70 deletions

View File

@ -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. */

View File

@ -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 <following-okapi@online.de>\n"
"POT-Creation-Date: 2013-03-26 16:20+0100\n"
"PO-Revision-Date: 2013-03-26 16:21+0100\n"
"Last-Translator: following <following@online.de>\n"
"Language-Team: following <following@online.de>\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 <a href='%s'>geocache</a> description comes from the <a href='%s'>%s</"
"a> site."
msgstr ""
"Diese <a href='%s'>Cache</a>-Beschreibung stammt von <a href='%s'>%s</a>."
#: 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 ""
"<b>%s</b> wants to access your <b>%s</b> account. Do you agree to grant "
@ -193,15 +194,15 @@ msgstr ""
"<b>%s</b> möchte auf dein <b>%s</b>-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.</p>\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:</p>\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.</p>\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.</p>\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."

View File

@ -127,7 +127,7 @@
<b>null</b> if geocache does not have a container,
</li>
<li>
<p><b>size2</b> - string indicating the size od the container, so called
<p><b>size2</b> - string indicating the size of the container, so called
"size2 code". One of the following values:
'none', 'nano', 'micro', 'small', 'regular', 'large', 'xlarge', 'other'.</p>
</li>

View File

@ -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("

View File

@ -3,7 +3,7 @@
<issue-id>166</issue-id>
<desc>
<p>This method allows your users to mark the geocache as <b>watched</b> or
<b>ignored</b>, or to do modify user's personal <b>notes</b> saved along the geocache.
<b>ignored</b>.
Read the docs on separate parameters for details.</p>
</desc>
<req name='cache_code'>