Difference between revisions of "Template:Editnotice"

From Timelines
Jump to: navigation, search
m
(Fix, was adding Category:Expired editnotice to all edit notices with a blank "expiry" parameter. See Template talk:Editnotice#Incorrect category)
Line 36: Line 36:
 
{{{text|{{{1}}}}}}
 
{{{text|{{{1}}}}}}
 
  }}
 
  }}
}}<includeonly>{{#ifeq:{{FULLROOTPAGENAME}}|Template:Editnotices|{{#iferror:{{#time:U|{{{expiry}}}}}
+
}}{{#ifeq:{{FULLROOTPAGENAME}}|Template:Editnotices|{{#switch:{{{expiry|¬}}}
 +
  |indefinite
 +
  |
 +
  |¬          = <!-- Expiry not specified -->
 +
  |#default  = {{#iferror:{{#time:U|{{{expiry}}}}}
 
   | <!-- Invalid expiry time -->
 
   | <!-- Invalid expiry time -->
 
   |{{#ifexpr:{{#time:U|{{{expiry}}}}}-{{#time:U|{{CURRENTTIMESTAMP}}}}>0
 
   |{{#ifexpr:{{#time:U|{{{expiry}}}}}-{{#time:U|{{CURRENTTIMESTAMP}}}}>0
 
     | <!-- Notice current -->
 
     | <!-- Notice current -->
 
     |[[Category:Expired editnotice]] <!-- Notice expired -->
 
     |[[Category:Expired editnotice]] <!-- Notice expired -->
   }}}}}}</includeonly><noinclude>
+
   }}
 +
  }}
 +
}}
 +
}}<noinclude>
 
{{documentation}}
 
{{documentation}}
 
</noinclude>
 
</noinclude>

Revision as of 04:33, 10 September 2014

Template documentation[create]