From 6dbac4ebfec6a0ae734a7f8ddc158da59c4aa9f4 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Mon, 5 Dec 2016 16:52:18 +0100 Subject: [PATCH] Fixed template diff overflow issue --- .../files/acp/templates/templateDiff.tpl | 62 ++++++++++--------- 1 file changed, 33 insertions(+), 29 deletions(-) diff --git a/wcfsetup/install/files/acp/templates/templateDiff.tpl b/wcfsetup/install/files/acp/templates/templateDiff.tpl index 0ffb282552..35ff629747 100644 --- a/wcfsetup/install/files/acp/templates/templateDiff.tpl +++ b/wcfsetup/install/files/acp/templates/templateDiff.tpl @@ -66,20 +66,22 @@ {assign var=removeOffset value=0} {assign var=lineNo value=0}
{*
-					*}
    {* - *}{foreach from=$diff->getRawDiff() item='line'}{* - *}{if $line[0] == ' '}{* - *}{assign var=removeOffset value=0}{assign var=lineNo value=$lineNo + 1}{* - *}
  1. {$line[1]}
  2. {* - *}{elseif $line[0] == '-'}{* - *}{assign var=removeOffset value=$removeOffset + 1}{assign var=lineNo value=$lineNo + 1}{* - *}
  3. {$line[1]}
  4. {* - *}{elseif $line[0] == '+'}{* - *}{assign var=removeOffset value=$removeOffset - 1}{* - *}{if $removeOffset < 0}
  5.  
  6. {/if}{* - *}{/if}{* - *}{/foreach}{* - *}
{* + *}{* <-- wrapper span to prevent content from overflowing the
  • + *}
      {* + *}{foreach from=$diff->getRawDiff() item='line'}{* + *}{if $line[0] == ' '}{* + *}{assign var=removeOffset value=0}{assign var=lineNo value=$lineNo + 1}{* + *}
    1. {$line[1]}
    2. {* + *}{elseif $line[0] == '-'}{* + *}{assign var=removeOffset value=$removeOffset + 1}{assign var=lineNo value=$lineNo + 1}{* + *}
    3. {$line[1]}
    4. {* + *}{elseif $line[0] == '+'}{* + *}{assign var=removeOffset value=$removeOffset - 1}{* + *}{if $removeOffset < 0}
    5.  
    6. {/if}{* + *}{/if}{* + *}{/foreach}{* + *}
    {* + *}{* *}
  • @@ -92,22 +94,24 @@ {assign var=removeOffset value=0} {assign var=lineNo value=0}