Patch for bug 171478: XML bug output should include attachment flags; patch by Colin S. Ogilvie <colin.ogilvie@gmail.com>, r=wurblzap, a=myk.

This commit is contained in:
jocuri%softhome.net 2005-01-16 20:34:52 +00:00
Родитель 0a8eb9e801
Коммит d437c0fbdb
2 изменённых файлов: 32 добавлений и 2 удалений

Просмотреть файл

@ -47,9 +47,20 @@
<!ELEMENT who (#PCDATA)>
<!ELEMENT bug_when (#PCDATA)>
<!ELEMENT thetext (#PCDATA)>
<!ELEMENT attachment (attachid, date, desc, type?, data?)>
<!ELEMENT attachment (attachid, date, desc, type?, data?, flag*)>
<!ATTLIST attachment
isobsolete (0|1) #IMPLIED
ispatch (0|1) #IMPLIED
>
<!ELEMENT attachid (#PCDATA)>
<!ELEMENT date (#PCDATA)>
<!ELEMENT desc (#PCDATA)>
<!ELEMENT type (#PCDATA)>
<!ELEMENT data (#PCDATA)>
<!ELEMENT flag EMPTY>
<!ATTLIST flag
name CDATA #REQUIRED
status CDATA #REQUIRED
setter CDATA #IMPLIED
requestee CDATA #IMPLIED
>

Просмотреть файл

@ -65,10 +65,29 @@
[% IF displayfields.attachment %]
[% FOREACH a = bug.attachments %]
[% NEXT IF a.isprivate && !UserInGroup(Param("insidergroup")) %]
<attachment>
<attachment
[% IF a.isobsolete %]
isobsolete="1"
[% END %]
[% IF a.ispatch %]
ispatch="1"
[% END %]
>
<attachid>[% a.attachid %]</attachid>
<date>[% a.date FILTER time FILTER xml %]</date>
<desc>[% a.description FILTER xml %]</desc>
<ctype>[% a.contenttype FILTER xml %]</ctype>
[% FOREACH flag = a.flags %]
<flag name="[% flag.type.name FILTER xml %]"
status="[% flag.status FILTER xml %]"
[% IF flag.setter %]
setter="[% flag.setter.email FILTER xml %]"
[% END %]
[% IF flag.status == "?" && flag.requestee %]
requestee="[% flag.requestee.email FILTER xml %]"
[% END %]
/>
[% END %]
</attachment>
[% END %]
[% END %]