function teamcommentAllowed($logType, $oldTeamComment = false)
 {
     // checks if teamcomment is allowed
     return teamcomment_allowed($this->getCacheId(), $logType, $oldTeamComment);
 }
示例#2
0
 $logtype_names = get_logtype_names();
 $allowed_logtypes = get_cache_log_types($log_record['cache_id'], $log_record['logtype'], !$disable_statuschange);
 $logtypeoptions = '';
 foreach ($allowed_logtypes as $logtype) {
     $selected = $log_record['logtype'] == $logtype ? ' selected="selected"' : '';
     $logtypeoptions .= '<option value="' . $logtype . '"' . $selected . '>';
     $logtypeoptions .= htmlspecialchars($logtype_names[$logtype], ENT_COMPAT, 'UTF-8');
     $logtypeoptions .= '</option>' . "\n";
 }
 $disable_typechange = $disable_statuschange && $log_record['is_status_log'];
 tpl_set_var('type_edit_disabled', $disable_typechange ? $type_edit_disabled : '');
 // TODO: Enforce the 'diables' when processing the posted data.
 // It's not that urgent, because nothing can be broken by changing
 // past status log types (it was even allowed up to OC 3.0.17);
 // just the log history may look weird.
 if (teamcomment_allowed($log_record['cache_id'], 3, $log_record['oc_team_comment'])) {
     tpl_set_var('teamcommentoption', mb_ereg_replace('{chk_sel}', $oc_team_comment ? 'checked' : '', $teamcomment_field));
 } else {
     tpl_set_var('teamcommentoption', '');
 }
 //set template vars
 tpl_set_var('cachename', htmlspecialchars($cache_name, ENT_COMPAT, 'UTF-8'));
 tpl_set_var('logtypeoptions', $logtypeoptions);
 tpl_set_var('logday', htmlspecialchars($log_date_day, ENT_COMPAT, 'UTF-8'));
 tpl_set_var('logmonth', htmlspecialchars($log_date_month, ENT_COMPAT, 'UTF-8'));
 tpl_set_var('logyear', htmlspecialchars($log_date_year, ENT_COMPAT, 'UTF-8'));
 tpl_set_var('loghour', htmlspecialchars($log_time_hour, ENT_COMPAT, 'UTF-8'));
 tpl_set_var('logminute', htmlspecialchars($log_time_minute, ENT_COMPAT, 'UTF-8'));
 tpl_set_var('cachename', htmlspecialchars($cache_name, ENT_COMPAT, 'UTF-8'));
 tpl_set_var('cacheid', $log_record['cache_id']);
 tpl_set_var('reset', $reset);
示例#3
0
 //set tpl vars
 tpl_set_var('cachename', htmlspecialchars($cachename, ENT_COMPAT, 'UTF-8'));
 tpl_set_var('cacheid', htmlspecialchars($cache_id, ENT_COMPAT, 'UTF-8'));
 tpl_set_var('logday', htmlspecialchars($log_date_day, ENT_COMPAT, 'UTF-8'));
 tpl_set_var('logmonth', htmlspecialchars($log_date_month, ENT_COMPAT, 'UTF-8'));
 tpl_set_var('logyear', htmlspecialchars($log_date_year, ENT_COMPAT, 'UTF-8'));
 tpl_set_var('loghour', htmlspecialchars($log_time_hour, ENT_COMPAT, 'UTF-8'));
 tpl_set_var('logminute', htmlspecialchars($log_time_minute, ENT_COMPAT, 'UTF-8'));
 tpl_set_var('logtypeoptions', $logtypeoptions);
 tpl_set_var('reset', $reset);
 // obsolete
 tpl_set_var('submit', $submit);
 tpl_set_var('date_message', '');
 tpl_set_var('adminlog', $adminlog);
 $oc_team_comment = isset($_REQUEST['teamcomment']) ? $_REQUEST['teamcomment'] != 0 : 0;
 if (teamcomment_allowed($cache_id, 3)) {
     $tco = mb_ereg_replace('{chk_sel}', $oc_team_comment || $adminlog ? 'checked' : '', $teamcomment_field);
     $tco = mb_ereg_replace('{textclass}', $adminlog ? 'redtext' : '', $tco);
     tpl_set_var('teamcommentoption', $tco);
 } else {
     tpl_set_var('teamcommentoption', '');
 }
 // Text / normal HTML / HTML editor
 tpl_set_var('use_tinymce', $descMode == 3 ? 1 : 0);
 if ($descMode == 1) {
     tpl_set_var('descMode', 1);
 } else {
     if ($descMode == 2) {
         tpl_set_var('descMode', 2);
     } else {
         // TinyMCE