From c5c8ee1f7a8cb9d8618455cb118c5f6991b307e5 Mon Sep 17 00:00:00 2001 From: following Date: Mon, 10 Jun 2013 13:02:01 +0200 Subject: [PATCH 1/2] update teamlist --- htdocs/templates2/ocstyle/articles/DE/team.tpl | 4 ++-- htdocs/templates2/ocstyle/articles/EN/team.tpl | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/templates2/ocstyle/articles/DE/team.tpl b/htdocs/templates2/ocstyle/articles/DE/team.tpl index 7bee3b45..95af53bd 100644 --- a/htdocs/templates2/ocstyle/articles/DE/team.tpl +++ b/htdocs/templates2/ocstyle/articles/DE/team.tpl @@ -30,8 +30,8 @@ Bundy609Anwendersupport, Datenpflege ClanFamilyDesign, Softwareentwicklung - dl6hboServerbetrieb, Dokumentation - doglobeProjekt „Cachewartung“ + cmanieSoftwareentwicklung + dl6hboDokumentation FloppSoftwareentwicklung, Anwendersupport, Datenpflege followingDatenpflege, Softwareentwicklung, Forenmoderation, Wiki FriedrichFröbelWiki, Forenmoderation diff --git a/htdocs/templates2/ocstyle/articles/EN/team.tpl b/htdocs/templates2/ocstyle/articles/EN/team.tpl index eaef6d9d..a8e63e13 100644 --- a/htdocs/templates2/ocstyle/articles/EN/team.tpl +++ b/htdocs/templates2/ocstyle/articles/EN/team.tpl @@ -29,8 +29,8 @@ Bundy609user support, data maintenance ClanFamilydesign, software development - dl6hboserver operation, documentation - doglobeproject „cache maintenance“ + cmaniesoftware development + dl6hbodocumentation Floppsoftware development, user support, data maintenance followingdata maintenance, software development, message board moderation, wiki FriedrichFröbelwiki, message board moderation From 5873cb46d9d56d2dd2ee7ec5a6cbd0dfa1d04bef Mon Sep 17 00:00:00 2001 From: following Date: Mon, 10 Jun 2013 14:17:46 +0200 Subject: [PATCH 2/2] fixed admin log editing --- htdocs/editlog.php | 5 ++--- htdocs/lib/logtypes.inc.php | 9 ++++++++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/htdocs/editlog.php b/htdocs/editlog.php index b3deae8b..ce0a5936 100644 --- a/htdocs/editlog.php +++ b/htdocs/editlog.php @@ -222,7 +222,7 @@ } // ignore unauthorized team comments - if (!teamcomment_allowed($log_record['cache_id'], $log_type)) + if (!teamcomment_allowed($log_record['cache_id'], $log_type, $log_record['oc_team_comment'])) $oc_team_comment = 0; //store? @@ -289,8 +289,7 @@ $selected = ($log_record['logtype'] == $logtype ? ' selected="selected"' : ''); $logtypeoptions .= '' . "\n"; } - - if (teamcomment_allowed($log_record['cache_id'],3)) + 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 diff --git a/htdocs/lib/logtypes.inc.php b/htdocs/lib/logtypes.inc.php index 638cdf9e..2d16dcf0 100644 --- a/htdocs/lib/logtypes.inc.php +++ b/htdocs/lib/logtypes.inc.php @@ -109,6 +109,11 @@ $allowed_logtypes[] = 3; // note } + // always allow to keep the existing logtype when the log is edited by an admin + if ($login->hasAdminPriv(ADMIN_USER) && + $old_logtype > 0 && !in_array($old_logtype+0,$allowed_logtypes)) + $allowed_logtypes[] = $old_logtype; + return $allowed_logtypes; } @@ -119,7 +124,7 @@ } - function teamcomment_allowed($cache_id, $logtype_id) + function teamcomment_allowed($cache_id, $logtype_id, $old_teamcomment=false) { global $login, $opt; @@ -127,6 +132,8 @@ return false; elseif ($logtype_id != 3 && ($logtype_id < 9 || $logtype_id > 14)) return false; + elseif ($old_teamcomment) + return true; else { $rs = sql("SELECT `user_id`,`status` FROM `caches` WHERE `cache_id`='&1'", $cache_id);