okapi r754
This commit is contained in:
parent
9b07f8423d
commit
66c7d21db8
@ -798,7 +798,7 @@ class Okapi
|
||||
{
|
||||
public static $data_store;
|
||||
public static $server;
|
||||
public static $revision = 749; # This gets replaced in automatically deployed packages
|
||||
public static $revision = 754; # 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. */
|
||||
|
Binary file not shown.
@ -2,9 +2,9 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OKAPI\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2013-04-10 01:04+0100\n"
|
||||
"PO-Revision-Date: 2013-04-10 01:06+0100\n"
|
||||
"Last-Translator: Wojciech Rygielski <rygielski@mimuw.edu.pl>\n"
|
||||
"POT-Creation-Date: 2013-04-18 20:26+0100\n"
|
||||
"PO-Revision-Date: 2013-04-18 20:29+0100\n"
|
||||
"Last-Translator: following <following@online.de>\n"
|
||||
"Language-Team: following <following@online.de>\n"
|
||||
"Language: German\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@ -19,11 +19,11 @@ msgstr ""
|
||||
"X-Poedit-SearchPath-1: D:\\PRIV\\Projekty\\EclipseWorkspace\\opencaching-api"
|
||||
"\\okapi\n"
|
||||
|
||||
#: D:\PRIV\Projekty\EclipseWorkspace\opencaching-api\okapi/services/caches/geocaches.php:846
|
||||
#: c:\source\oc\server-3.0\htdocs\okapi/services/caches/geocaches.php:910
|
||||
msgid "Stage"
|
||||
msgstr "Station"
|
||||
|
||||
#: D:\PRIV\Projekty\EclipseWorkspace\opencaching-api\okapi/services/caches/geocaches.php:1009
|
||||
#: c:\source\oc\server-3.0\htdocs\okapi/services/caches/geocaches.php:1138
|
||||
#, php-format
|
||||
msgid ""
|
||||
"This <a href='%s'>geocache</a> description comes from the <a href='%s'>%s</"
|
||||
@ -31,7 +31,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Diese <a href='%s'>Cache</a>-Beschreibung stammt von <a href='%s'>%s</a>."
|
||||
|
||||
#: D:\PRIV\Projekty\EclipseWorkspace\opencaching-api\okapi/services/caches/geocaches.php:1021
|
||||
#: c:\source\oc\server-3.0\htdocs\okapi/services/caches/geocaches.php:1150
|
||||
#, php-format
|
||||
msgid ""
|
||||
"© <a href='%s'>%s</a>, <a href='%s'>%s</a>, <a href='http://"
|
||||
@ -42,7 +42,7 @@ msgstr ""
|
||||
"creativecommons.org/licenses/by-nc-nd/3.0/de/'>CC-BY-NC-ND</a>, Stand: %s; "
|
||||
"alle Logeinträge © jeweiliger Autor"
|
||||
|
||||
#: D:\PRIV\Projekty\EclipseWorkspace\opencaching-api\okapi/services/caches/geocaches.php:1032
|
||||
#: c:\source\oc\server-3.0\htdocs\okapi/services/caches/geocaches.php:1161
|
||||
#, php-format
|
||||
msgid ""
|
||||
"© <a href='%s'>%s</a>, <a href='%s'>%s</a>, <a href='http://"
|
||||
@ -53,57 +53,57 @@ msgstr ""
|
||||
"creativecommons.org/licenses/by-nc-nd/3.0/de/'>CC-BY-NC-ND</a>; alle "
|
||||
"Logeinträge © jeweiliger Autor"
|
||||
|
||||
#: D:\PRIV\Projekty\EclipseWorkspace\opencaching-api\okapi/services/caches/formatters/gpxfile.tpl.php:31
|
||||
#: D:\PRIV\Projekty\EclipseWorkspace\opencaching-api\okapi/services/caches/formatters/gpxfile.tpl.php:48
|
||||
#: c:\source\oc\server-3.0\htdocs\okapi/services/caches/formatters/gpxfile.tpl.php:31
|
||||
#: c:\source\oc\server-3.0\htdocs\okapi/services/caches/formatters/gpxfile.tpl.php:48
|
||||
msgid "hidden by"
|
||||
msgstr "versteckt von"
|
||||
|
||||
#: D:\PRIV\Projekty\EclipseWorkspace\opencaching-api\okapi/services/caches/formatters/gpxfile.tpl.php:50
|
||||
#: c:\source\oc\server-3.0\htdocs\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"
|
||||
|
||||
#: D:\PRIV\Projekty\EclipseWorkspace\opencaching-api\okapi/services/caches/formatters/gpxfile.tpl.php:51
|
||||
#: c:\source\oc\server-3.0\htdocs\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"
|
||||
|
||||
#: D:\PRIV\Projekty\EclipseWorkspace\opencaching-api\okapi/services/caches/formatters/gpxfile.tpl.php:54
|
||||
#: c:\source\oc\server-3.0\htdocs\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"
|
||||
|
||||
#: D:\PRIV\Projekty\EclipseWorkspace\opencaching-api\okapi/services/caches/formatters/gpxfile.tpl.php:58
|
||||
#: c:\source\oc\server-3.0\htdocs\okapi/services/caches/formatters/gpxfile.tpl.php:58
|
||||
msgid "Personal notes"
|
||||
msgstr "Persönliche Notizen"
|
||||
|
||||
#: D:\PRIV\Projekty\EclipseWorkspace\opencaching-api\okapi/services/caches/formatters/gpxfile.tpl.php:62
|
||||
#: c:\source\oc\server-3.0\htdocs\okapi/services/caches/formatters/gpxfile.tpl.php:62
|
||||
msgid "Attributes"
|
||||
msgstr "Attribute"
|
||||
|
||||
#: D:\PRIV\Projekty\EclipseWorkspace\opencaching-api\okapi/services/caches/formatters/gpxfile.tpl.php:66
|
||||
#: c:\source\oc\server-3.0\htdocs\okapi/services/caches/formatters/gpxfile.tpl.php:66
|
||||
msgid "Trackables"
|
||||
msgstr "Geokrets"
|
||||
|
||||
#: D:\PRIV\Projekty\EclipseWorkspace\opencaching-api\okapi/services/caches/formatters/gpxfile.tpl.php:84
|
||||
#: c:\source\oc\server-3.0\htdocs\okapi/services/caches/formatters/gpxfile.tpl.php:84
|
||||
msgid "Images"
|
||||
msgstr "Bilder"
|
||||
|
||||
#: D:\PRIV\Projekty\EclipseWorkspace\opencaching-api\okapi/services/caches/formatters/gpxfile.tpl.php:91
|
||||
#: c:\source\oc\server-3.0\htdocs\okapi/services/caches/formatters/gpxfile.tpl.php:91
|
||||
msgid "Spoilers"
|
||||
msgstr "Spoiler"
|
||||
|
||||
#: D:\PRIV\Projekty\EclipseWorkspace\opencaching-api\okapi/services/caches/formatters/gpxfile.tpl.php:99
|
||||
#: c:\source\oc\server-3.0\htdocs\okapi/services/caches/formatters/gpxfile.tpl.php:99
|
||||
msgid "Image descriptions"
|
||||
msgstr "Bildbeschreibungen"
|
||||
|
||||
#: D:\PRIV\Projekty\EclipseWorkspace\opencaching-api\okapi/services/logs/submit.php:70
|
||||
#: c:\source\oc\server-3.0\htdocs\okapi/services/logs/submit.php:70
|
||||
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."
|
||||
@ -111,7 +111,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."
|
||||
|
||||
#: D:\PRIV\Projekty\EclipseWorkspace\opencaching-api\okapi/services/logs/submit.php:92
|
||||
#: c:\source\oc\server-3.0\htdocs\okapi/services/logs/submit.php:92
|
||||
#, php-format
|
||||
msgid ""
|
||||
"However, your cache rating was ignored, because %s does not have a rating "
|
||||
@ -119,7 +119,16 @@ msgid ""
|
||||
msgstr ""
|
||||
"Deine Cachewertung wurde jedoch ignoriert, weil %s kein Bewertungssystem hat."
|
||||
|
||||
#: D:\PRIV\Projekty\EclipseWorkspace\opencaching-api\okapi/services/logs/submit.php:113
|
||||
#: c:\source\oc\server-3.0\htdocs\okapi/services/logs/submit.php:111
|
||||
#, php-format
|
||||
msgid ""
|
||||
"However, your cache recommendation was ignored, because %s does not allow "
|
||||
"recommending event caches."
|
||||
msgstr ""
|
||||
"Deine Empfehlung wurde jedoch ignoriert, weil auf %s keine Event-Caches "
|
||||
"empfohlen werden können."
|
||||
|
||||
#: c:\source\oc\server-3.0\htdocs\okapi/services/logs/submit.php:125
|
||||
#, php-format
|
||||
msgid ""
|
||||
"However, your \"needs maintenance\" flag was ignored, because %s does not "
|
||||
@ -128,34 +137,42 @@ msgstr ""
|
||||
"Deine Angabe \"benötigt Wartung\" wurde jedoch ignoriert, weil es diese "
|
||||
"Funktion bei %s nicht gibt."
|
||||
|
||||
#: D:\PRIV\Projekty\EclipseWorkspace\opencaching-api\okapi/services/logs/submit.php:131
|
||||
#: c:\source\oc\server-3.0\htdocs\okapi/services/logs/submit.php:145
|
||||
msgid ""
|
||||
"This cache is an Event cache. You cannot \"Find it\"! (But - you may "
|
||||
"\"Comment\" on it.)"
|
||||
"This cache is an Event cache. You cannot \"Find\" it (but you can attend it, "
|
||||
"or comment on it)!"
|
||||
msgstr ""
|
||||
"Dies ist ein Event-Cache. Du kannst ihn nicht \"finden\" (aber du kannst "
|
||||
"einen Hinweis loggen)."
|
||||
"Dies ist ein Event-Cache. Du kannst ihn nicht \"finden\" (aber du kannst am "
|
||||
"Event teilnehmen oder einen Hinweis loggen)."
|
||||
|
||||
#: D:\PRIV\Projekty\EclipseWorkspace\opencaching-api\okapi/services/logs/submit.php:133
|
||||
#: c:\source\oc\server-3.0\htdocs\okapi/services/logs/submit.php:150
|
||||
msgid ""
|
||||
"This cache is NOT an Event cache. You cannot \"Attend\" it (but you can find "
|
||||
"it, or comment on it)!"
|
||||
msgstr ""
|
||||
"Dies ist KEIN Event-Cache. Du kannst an ihm nicht \"teilnehmen\" (aber du "
|
||||
"kannst ihn finden oder kommentieren)."
|
||||
|
||||
#: c:\source\oc\server-3.0\htdocs\okapi/services/logs/submit.php:155
|
||||
msgid "Your have to supply some text for your comment."
|
||||
msgstr "Du musst einen Text für dein Hinweislog eingeben!"
|
||||
|
||||
#: D:\PRIV\Projekty\EclipseWorkspace\opencaching-api\okapi/services/logs/submit.php:146
|
||||
#: c:\source\oc\server-3.0\htdocs\okapi/services/logs/submit.php:168
|
||||
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."
|
||||
|
||||
#: D:\PRIV\Projekty\EclipseWorkspace\opencaching-api\okapi/services/logs/submit.php:148
|
||||
#: c:\source\oc\server-3.0\htdocs\okapi/services/logs/submit.php:170
|
||||
msgid "Invalid password!"
|
||||
msgstr "Ungültiges Kennwort!"
|
||||
|
||||
#: D:\PRIV\Projekty\EclipseWorkspace\opencaching-api\okapi/services/logs/submit.php:260
|
||||
#: c:\source\oc\server-3.0\htdocs\okapi/services/logs/submit.php:282
|
||||
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."
|
||||
|
||||
#: D:\PRIV\Projekty\EclipseWorkspace\opencaching-api\okapi/services/logs/submit.php:279
|
||||
#: c:\source\oc\server-3.0\htdocs\okapi/services/logs/submit.php:305
|
||||
msgid ""
|
||||
"You have already submitted a \"Found it\" log entry once. Now you may submit "
|
||||
"\"Comments\" only!"
|
||||
@ -163,49 +180,53 @@ msgstr ""
|
||||
"Du hast diesen Cache bereits als gefunden geloggt. Ein zweites Fundlog ist "
|
||||
"nicht möglich, aber du kannst stattdessen einen Hinweis loggen."
|
||||
|
||||
#: D:\PRIV\Projekty\EclipseWorkspace\opencaching-api\okapi/services/logs/submit.php:281
|
||||
#: c:\source\oc\server-3.0\htdocs\okapi/services/logs/submit.php:307
|
||||
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."
|
||||
|
||||
#: D:\PRIV\Projekty\EclipseWorkspace\opencaching-api\okapi/services/logs/submit.php:299
|
||||
#: c:\source\oc\server-3.0\htdocs\okapi/services/logs/submit.php:325
|
||||
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."
|
||||
|
||||
#: D:\PRIV\Projekty\EclipseWorkspace\opencaching-api\okapi/services/logs/submit.php:316
|
||||
#: c:\source\oc\server-3.0\htdocs\okapi/services/logs/submit.php:342
|
||||
msgid "You have already recommended this cache once."
|
||||
msgstr "Du hast diesen Cache bereits empfohlen."
|
||||
|
||||
#: D:\PRIV\Projekty\EclipseWorkspace\opencaching-api\okapi/services/logs/submit.php:323
|
||||
#: c:\source\oc\server-3.0\htdocs\okapi/services/logs/submit.php:352
|
||||
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!"
|
||||
|
||||
#: D:\PRIV\Projekty\EclipseWorkspace\opencaching-api\okapi/services/logs/submit.php:491
|
||||
#: c:\source\oc\server-3.0\htdocs\okapi/services/logs/submit.php:395
|
||||
msgid "Event caches cannot \"need maintenance\"."
|
||||
msgstr "Event-Caches können keine \"Wartung benötigen\"."
|
||||
|
||||
#: c:\source\oc\server-3.0\htdocs\okapi/services/logs/submit.php:525
|
||||
msgid "Your cache log entry was posted successfully."
|
||||
msgstr "Dein Log wurde veröffentlicht."
|
||||
|
||||
#: D:\PRIV\Projekty\EclipseWorkspace\opencaching-api\okapi/views/apps/authorize.tpl.php:5
|
||||
#: c:\source\oc\server-3.0\htdocs\okapi/views/apps/authorize.tpl.php:5
|
||||
msgid "Authorization Form"
|
||||
msgstr "Authorisierungs-Formular"
|
||||
|
||||
#: D:\PRIV\Projekty\EclipseWorkspace\opencaching-api\okapi/views/apps/authorize.tpl.php:46
|
||||
#: c:\source\oc\server-3.0\htdocs\okapi/views/apps/authorize.tpl.php:46
|
||||
msgid "Expired request"
|
||||
msgstr "Anfrage abgelaufen"
|
||||
|
||||
#: D:\PRIV\Projekty\EclipseWorkspace\opencaching-api\okapi/views/apps/authorize.tpl.php:47
|
||||
#: c:\source\oc\server-3.0\htdocs\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."
|
||||
|
||||
#: D:\PRIV\Projekty\EclipseWorkspace\opencaching-api\okapi/views/apps/authorize.tpl.php:49
|
||||
#: c:\source\oc\server-3.0\htdocs\okapi/views/apps/authorize.tpl.php:49
|
||||
msgid "External application is requesting access..."
|
||||
msgstr "Eine externe Anwendung wünscht Zugriff ..."
|
||||
|
||||
#: D:\PRIV\Projekty\EclipseWorkspace\opencaching-api\okapi/views/apps/authorize.tpl.php:50
|
||||
#: c:\source\oc\server-3.0\htdocs\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 "
|
||||
@ -214,15 +235,15 @@ msgstr ""
|
||||
"<b>%s</b> möchte auf dein <b>%s</b>-Benutzerkonto zugreifen. Möchtest du "
|
||||
"dieser Anwendung Zugriff gewähren?"
|
||||
|
||||
#: D:\PRIV\Projekty\EclipseWorkspace\opencaching-api\okapi/views/apps/authorize.tpl.php:53
|
||||
#: c:\source\oc\server-3.0\htdocs\okapi/views/apps/authorize.tpl.php:53
|
||||
msgid "I agree"
|
||||
msgstr "Ja"
|
||||
|
||||
#: D:\PRIV\Projekty\EclipseWorkspace\opencaching-api\okapi/views/apps/authorize.tpl.php:54
|
||||
#: c:\source\oc\server-3.0\htdocs\okapi/views/apps/authorize.tpl.php:54
|
||||
msgid "Decline"
|
||||
msgstr "Nein"
|
||||
|
||||
#: D:\PRIV\Projekty\EclipseWorkspace\opencaching-api\okapi/views/apps/authorize.tpl.php:56
|
||||
#: c:\source\oc\server-3.0\htdocs\okapi/views/apps/authorize.tpl.php:56
|
||||
#, php-format
|
||||
msgid ""
|
||||
"\n"
|
||||
@ -250,15 +271,15 @@ msgstr ""
|
||||
"\t\t\t\t\tDu kannst diese Erlaubnis jederzeit widerrufen.</p>\n"
|
||||
"\t\t\t\t"
|
||||
|
||||
#: D:\PRIV\Projekty\EclipseWorkspace\opencaching-api\okapi/views/apps/authorized.tpl.php:5
|
||||
#: c:\source\oc\server-3.0\htdocs\okapi/views/apps/authorized.tpl.php:5
|
||||
msgid "Authorization Succeeded"
|
||||
msgstr "Authorisierung erfolgreich"
|
||||
|
||||
#: D:\PRIV\Projekty\EclipseWorkspace\opencaching-api\okapi/views/apps/authorized.tpl.php:28
|
||||
#: c:\source\oc\server-3.0\htdocs\okapi/views/apps/authorized.tpl.php:28
|
||||
msgid "Access successfully granted"
|
||||
msgstr "Zugang wurde gewährt"
|
||||
|
||||
#: D:\PRIV\Projekty\EclipseWorkspace\opencaching-api\okapi/views/apps/authorized.tpl.php:29
|
||||
#: c:\source\oc\server-3.0\htdocs\okapi/views/apps/authorized.tpl.php:29
|
||||
#, php-format
|
||||
msgid ""
|
||||
"\n"
|
||||
@ -275,15 +296,15 @@ msgstr ""
|
||||
"PIN-Code ein:</p>\n"
|
||||
"\t\t\t"
|
||||
|
||||
#: D:\PRIV\Projekty\EclipseWorkspace\opencaching-api\okapi/views/apps/index.tpl.php:5
|
||||
#: c:\source\oc\server-3.0\htdocs\okapi/views/apps/index.tpl.php:5
|
||||
msgid "My Apps"
|
||||
msgstr "Meine Apps"
|
||||
|
||||
#: D:\PRIV\Projekty\EclipseWorkspace\opencaching-api\okapi/views/apps/index.tpl.php:29
|
||||
#: c:\source\oc\server-3.0\htdocs\okapi/views/apps/index.tpl.php:29
|
||||
msgid "Your external applications"
|
||||
msgstr "Deine externe Anwendung"
|
||||
|
||||
#: D:\PRIV\Projekty\EclipseWorkspace\opencaching-api\okapi/views/apps/index.tpl.php:31
|
||||
#: c:\source\oc\server-3.0\htdocs\okapi/views/apps/index.tpl.php:31
|
||||
#, php-format
|
||||
msgid ""
|
||||
"\n"
|
||||
@ -305,11 +326,11 @@ msgstr ""
|
||||
"Aktionen mehr unter deinem \t\t\t\t\tBenutzername ausführen können.</p>\n"
|
||||
"\t\t\t\t"
|
||||
|
||||
#: D:\PRIV\Projekty\EclipseWorkspace\opencaching-api\okapi/views/apps/index.tpl.php:45
|
||||
#: c:\source\oc\server-3.0\htdocs\okapi/views/apps/index.tpl.php:45
|
||||
msgid "remove"
|
||||
msgstr "entfernen"
|
||||
|
||||
#: D:\PRIV\Projekty\EclipseWorkspace\opencaching-api\okapi/views/apps/index.tpl.php:50
|
||||
#: c:\source\oc\server-3.0\htdocs\okapi/views/apps/index.tpl.php:50
|
||||
#, php-format
|
||||
msgid ""
|
||||
"\n"
|
||||
|
@ -4,7 +4,7 @@ msgstr ""
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2013-04-10 01:07+0100\n"
|
||||
"PO-Revision-Date: 2013-04-10 01:08+0100\n"
|
||||
"Last-Translator: Wojciech Rygielski <rygielski@mimuw.edu.pl>\n"
|
||||
"Last-Translator: Stefano Cotterli <stefanocotterli@gmail.com>\n"
|
||||
"Language-Team: following <following@online.de>\n"
|
||||
"Language: Italian\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
|
@ -49,7 +49,7 @@ class WebService
|
||||
|
||||
$logtype = $request->get_parameter('logtype');
|
||||
if (!$logtype) throw new ParamMissing('logtype');
|
||||
if (!in_array($logtype, array('Found it', "Didn't find it", 'Comment')))
|
||||
if (!in_array($logtype, array('Found it', "Didn't find it", 'Comment', 'Will attend', 'Attended')))
|
||||
throw new InvalidParam('logtype', "'$logtype' in not a valid logtype code.");
|
||||
|
||||
$comment = $request->get_parameter('comment');
|
||||
@ -81,8 +81,8 @@ class WebService
|
||||
$rating = $request->get_parameter('rating');
|
||||
if ($rating !== null && (!in_array($rating, array(1,2,3,4,5))))
|
||||
throw new InvalidParam('rating', "If present, it must be an integer in the 1..5 scale.");
|
||||
if ($rating && $logtype != 'Found it')
|
||||
throw new BadRequest("Rating is allowed only for 'Found it' logtypes.");
|
||||
if ($rating && $logtype != 'Found it' && $logtype != 'Attended')
|
||||
throw new BadRequest("Rating is allowed only for 'Found it' and 'Attended' logtypes.");
|
||||
if ($rating !== null && (Settings::get('OC_BRANCH') == 'oc.de'))
|
||||
{
|
||||
# We will remove the rating request and change the success message
|
||||
@ -100,7 +100,19 @@ class WebService
|
||||
throw new InvalidParam('recommend', "Unknown option: '$recommend'.");
|
||||
$recommend = ($recommend == 'true');
|
||||
if ($recommend && $logtype != 'Found it')
|
||||
throw new BadRequest("Recommending is allowed only for 'Found it' logtypes.");
|
||||
{
|
||||
if ($logtype != 'Attended')
|
||||
throw new BadRequest("Recommending is allowed only for 'Found it' and 'Attended' logs.");
|
||||
else if (Settings::get('OC_BRANCH') == 'oc.pl')
|
||||
{
|
||||
# We will remove the recommendation request and change the success message
|
||||
# (which will be returned IF the rest of the query will meet all the
|
||||
# requirements).
|
||||
self::$success_message .= " ".sprintf(_("However, your cache recommendation was ignored, because %s does not allow recommending event caches."),
|
||||
Okapi::get_normalized_site_name());
|
||||
$recommend = null;
|
||||
}
|
||||
}
|
||||
|
||||
$needs_maintenance = $request->get_parameter('needs_maintenance');
|
||||
if (!$needs_maintenance) $needs_maintenance = 'false';
|
||||
@ -127,14 +139,24 @@ class WebService
|
||||
|
||||
# Various integrity checks.
|
||||
|
||||
if ($cache['type'] == 'Event' && $logtype != 'Comment')
|
||||
throw new CannotPublishException(_('This cache is an Event cache. You cannot "Find it"! (But - you may "Comment" on it.)'));
|
||||
if ($cache['type'] == 'Event')
|
||||
{
|
||||
if (!in_array($logtype, array('Will attend', 'Attended', 'Comment')))
|
||||
throw new CannotPublishException(_('This cache is an Event cache. You cannot "Find" it (but you can attend it, or comment on it)!'));
|
||||
}
|
||||
else # type != event
|
||||
{
|
||||
if (in_array($logtype, array('Will attend', 'Attended')))
|
||||
throw new CannotPublishException(_('This cache is NOT an Event cache. You cannot "Attend" it (but you can find it, or comment on it)!'));
|
||||
else if (!in_array($logtype, array('Found it', "Didn't find it", 'Comment')))
|
||||
throw new Exception("Unknown log entry - should be documented here.");
|
||||
}
|
||||
if ($logtype == 'Comment' && strlen(trim($comment)) == 0)
|
||||
throw new CannotPublishException(_("Your have to supply some text for your comment."));
|
||||
|
||||
# Password check.
|
||||
|
||||
if ($logtype == 'Found it' && $cache['req_passwd'])
|
||||
if (($logtype == 'Found it' || $logtype == 'Attended') && $cache['req_passwd'])
|
||||
{
|
||||
$valid_password = Db::select_value("
|
||||
select logpw
|
||||
@ -263,8 +285,12 @@ class WebService
|
||||
}
|
||||
|
||||
# Check if already found it (and make sure the user is not the owner).
|
||||
#
|
||||
# OCPL forbids logging 'Found it' or "Didn't find" for an already found cache,
|
||||
# while OCDE allows all kinds of duplicate logs.
|
||||
|
||||
if (($logtype == 'Found it') || ($logtype == "Didn't find it"))
|
||||
if (Settings::get('OC_BRANCH') == 'oc.pl'
|
||||
&& (($logtype == 'Found it') || ($logtype == "Didn't find it")))
|
||||
{
|
||||
$has_already_found_it = Db::select_value("
|
||||
select 1
|
||||
@ -318,6 +344,9 @@ class WebService
|
||||
# Check the number of recommendations.
|
||||
|
||||
$founds = $user['caches_found'] + 1; // +1, because he'll find THIS ONE in a moment, right?
|
||||
# Note: caches_found includes event attendance on both, OCDE and OCPL.
|
||||
# Though OCPL does not allow recommending events, for each 10 event
|
||||
# attendances the user may recommend a non-event cache.
|
||||
$rcmds_left = floor($founds / 10.0) - $user['rcmds_given'];
|
||||
if ($rcmds_left <= 0)
|
||||
throw new CannotPublishException(_("You don't have any recommendations to give. Find more caches first!"));
|
||||
@ -360,6 +389,11 @@ class WebService
|
||||
$second_formatted_comment = $formatted_comment;
|
||||
$formatted_comment = "";
|
||||
}
|
||||
else if ($logtype == 'Will attend' || $logtype == 'Attended')
|
||||
{
|
||||
# OC branches which know maintenance logs do not allow them on event caches.
|
||||
throw new CannotPublishException(_("Event caches cannot \"need maintenance\"."));
|
||||
}
|
||||
else
|
||||
throw new Exception();
|
||||
}
|
||||
|
@ -9,9 +9,16 @@
|
||||
<p>Code of the geocache.</p>
|
||||
</req>
|
||||
<req name='logtype'>
|
||||
<p>Type of an entry. This should be one of: <i>Found it</i>, <i>Didn't find it</i>
|
||||
or <i>Comment</i>. Currently this method does not support "Will attend" nor "Attended"
|
||||
log types which are used for Event Caches (we are planning to add this).</p>
|
||||
<p>Type of an entry. This should be one of:</p>
|
||||
<ul>
|
||||
<li>
|
||||
<i>Will attend</i>, <i>Attended</i> or <i>Comment</i> for Event caches;
|
||||
</li>
|
||||
<li>
|
||||
<i>Found it</i>, <i>Didn't find it</i> or <i>Comment</i> for all other
|
||||
cache types.
|
||||
</li>
|
||||
</ul>
|
||||
</req>
|
||||
<opt name='comment'>
|
||||
<p>Text to be submitted with the log entry.</p>
|
||||
@ -70,7 +77,10 @@
|
||||
</opt>
|
||||
<opt name='recommend' default='false'>
|
||||
<p>Set to <b>true</b> if the user wants to recommend this cache.</p>
|
||||
<p>Important: <b>logtype</b> has to be "Found it" in order to use this argument.</p>
|
||||
<p>Important: <b>logtype</b> has to be "Found it" or "Attended" in order to
|
||||
use this argument. However, some installations do not support recommending
|
||||
event caches (if you include a recommendation, the log entry will be posted
|
||||
successfully, but the recommendation will be <b>ignored</b>).</p>
|
||||
<p>Recommending may only succeed when the user meets certain criteria
|
||||
set on him by the OC site. If criteria are not met, the request will
|
||||
end with user error (HTTP 200, success=false).</p>
|
||||
@ -83,6 +93,8 @@
|
||||
comment). Even then, you will still receive only one UUID reference (pointing to
|
||||
only one of those entries). Moreover, on some OC servers this flag might be
|
||||
<b>completely ignored</b> (not all OC servers support this feature).</p>
|
||||
<p>Note: Currently, this is not allowed for Event Caches (you will get a HTTP 200
|
||||
"user friendly" response).</p>
|
||||
</opt>
|
||||
<common-format-params/>
|
||||
<returns>
|
||||
|
Loading…
x
Reference in New Issue
Block a user