XF 1.5 Template comparision: is this normal?

imthebest

Well-known member
On template warning_info I have removed the following block:

Code:
        <xen:if is="{$canExpireWarning}">
            <form action="{xen:link warnings/expire, $warning}" method="post">
                <dl class="ctrlUnit">
                    <dt></dt>
                    <dd><ul>
                        <li><label><input type="radio" name="expire" value="now" checked="checked" /> {xen:phrase expire_now}</label></li>
                        <li><label><input type="radio" name="expire" value="future" id="ExpireWarningFuture_{$warning.warning_id}" class="Disabler" /> {xen:phrase expire_in_time}:</label>
                            <ul id="ExpireWarningFuture_{$warning.warning_id}_Disabler">
                                <li>
                                    <input type="text" size="5" name="expiry_length" value="1" class="textCtrl autoSize" />
                                    <select name="expiry_unit" class="textCtrl autoSize">
                                        <option value="hours">{xen:phrase hours}</option>
                                        <option value="days" selected="selected">{xen:phrase days}</option>
                                        <option value="weeks">{xen:phrase weeks}</option>
                                        <option value="months">{xen:phrase months}</option>
                                    </select>
                                </li>
                            </ul>
                        </li>
                    </ul></dd>
                </dl>
                <dl class="ctrlUnit submitUnit">
                    <dt></dt>
                    <dd>
                        <input type="submit" value="{xen:phrase update_warning}" class="button primary" />
                    </dd>
                </dl>

                <input type="hidden" name="_xfConfirm" value="1" />
                <input type="hidden" name="redirect" value="{$redirect}" />
                <input type="hidden" name="_xfToken" value="{$visitor.csrf_token_page}" />
            </form>
        </xen:if>

However the template comparison feature says this:

start.webp

end.webp

Is this normal? If so, it ends being pretty confusing.

Thanks.
 
Yeah this is normal. You get used to it when working with diff comparisons. There's no programmatical way to know exactly which part of the code you removed when there's a duplicate piece of code at the beginning and the end of said removal.
 
You get used to it when working with diff comparisons.

You mean that there are tools that help you to determine where exactly you started to edit a template? Or you mean that this is a "design issue" of every template comparison system that soon or later I'll get used to?

Thanks.
 
To put it another way: what you say you removed and what the diff reports as being removed are 100% equivalent. There's no way to know the action that was taken. The "path" taken is based on various technical reasons.
 
Top Bottom