Merge branch 'stable'

This commit is contained in:
following
2013-06-24 14:08:54 +02:00
3 changed files with 11 additions and 3 deletions

View File

@@ -806,7 +806,7 @@ class Okapi
{
public static $data_store;
public static $server;
public static $revision = 817; # This gets replaced in automatically deployed packages
public static $revision = 828; # 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

@@ -87,7 +87,7 @@
<p>Please note, that sometimes it is faster to compute this yourself, on client-side, instead of querying OKAPI.</p>
</li>
<li>
<p><b>bearing3</b> - string, the absolute bearing to the cache, represented as a typical directon
<p><b>bearing3</b> - string, the absolute bearing to the cache, represented as a typical direction
string of length of 1 or 2 or 3 characters (ex. "N", "NNE", "NE", "ENE", etc.), or "n/a" if it cannot be calculated.
This requires <b>my_location</b> parameter to be provided.</p>
<p>Please note, that sometimes it is faster to compute this yourself, on client-side, instead of querying OKAPI.</p>
@@ -180,7 +180,7 @@
<li><b>descriptions</b> - a dictionary (language code =&gt; HTML string) of cache
descriptions,</li>
<li class="deprecated"><b>hint</b> - HTML-encoded string, cache hints/spoilers;
deprecated (<a href="http://code.google.com/p/opencaching-api/issues/detail?id=261">Why?</a>),
deprecated (<a href="http://code.google.com/p/opencaching-api/issues/detail?id=261">why?</a>),
use <b>hint2</b> instead,</li>
<li class="deprecated"><b>hints</b> - a dictionary (language code =&gt;
HTML-encoded string) of cache hints/spoilers; deprecated, use hints2 instead,</li>

View File

@@ -51,9 +51,15 @@ class WebService
throw new InvalidParam('fields', "'$field' is not a valid field code.");
if (Settings::get('OC_BRANCH') == 'oc.de')
{
$teamentry_field = 'cl.oc_team_comment';
$ratingdate_condition = 'and cr.rating_date=cl.date';
}
else
{
$teamentry_field = '(cl.type=12)';
$ratingdate_condition = '';
}
$rs = Db::query("
select
cl.id, c.wp_oc as cache_code, cl.uuid, cl.type,
@@ -68,6 +74,8 @@ class WebService
left join cache_rating cr
on cr.user_id = u.user_id
and cr.cache_id = c.cache_id
".$ratingdate_condition."
and cl.type in (1,7)
where
cl.uuid in ('".implode("','", array_map('mysql_real_escape_string', $log_uuids))."')
and ".((Settings::get('OC_BRANCH') == 'oc.pl') ? "cl.deleted = 0" : "true")."