' . ($row->sledge_rental ? ' ' : '') . ' | ' .
'' . ($row->night_light ? ' ' : '') . ' | ' .
'' . ($row->lift ? ' ' : '') . ' | ' .
'' . ($row->walkup_separate ? ' ' : '') . ' | ' .
'' . ($row->public_transport ? ' ' : '') . ' | ' .
'' . $title->getEscapedText() . ' | ';
if ($wgWrReportMode != 'summer') {
// Check rights
$userMayReportThis = $userMayReport;
if ($userMayReportThis) {
if (in_array($title->getText(), $wgWrReportBlackListAll)) $userMayReportThis = FALSE;
if (!$wgUser->isLoggedIn() && in_array($title->getText(), $wgWrReportBlackListStrangers)) $userMayReportThis = FALSE; // TODO: Check getText() whether it uses _ or spaces
}
// Select condition
// select wrreport.id as report_id, `condition`, date_report from wrreport where page_title='Axamer Lizum' and `condition` is not null and date_invalid > now() and delete_date is null order by date_report desc, date_entry desc limit 1;
$cres = $dbr->select(
'wrreport',
array('wrreport.id as report_id', $cond, 'date_report'),
array('page_id' => $row->page_id, "$cond is not null", 'date_invalid > now()', 'delete_date is null'),
'wrReportConditionRender',
array('ORDER BY' => 'date_report desc, date_entry desc', 'LIMIT' => '1')
);
if ($cres->numRows() <= 0) {
$condition = NULL;
$date = '';
} else {
$crow = $dbr->fetchObject($cres);
$condition = $crow->condition;
$date = strftime('%d.%m.', strtotime($crow->date_report));
}
$dbr->freeResult($cres);
$html .= '';
if (isset($wrConditions[$condition])) {
$html .= '' . htmlspecialchars($wrConditions[$condition]) . " $date";
if ($userMayReportThis) $html .= ' Neu';
$html .= '';
} else {
if ($userMayReportThis) $html .= 'Bitte eintragen';
else $html .= '--';
}
$html .= ' | ';
}
$info = $row->information;
if ($info) {
$info_parts = explode('(', $info, 2);
if (count($info_parts) == 2) {
$info = htmlspecialchars($info_parts[0]) . '(' . htmlspecialchars($info_parts[1]) . '';
} else $info = htmlspecialchars($info);
}
$html .= "$info | " .
'' . ($row->walktime ? $row->walktime . ' min' : '') . ' | ' .
'' . ($row->height_bottom ? $row->height_bottom . ' m' : '') . ' | ' .
'' . ($row->height_top ? $row->height_top . ' m' : '') . ' | ' .
'' . ($row->length ? $row->length . ' m' : '') . " |
\n";
}
$dbr->freeResult($res);
$html .= "