Changeset 2701

Show
Ignore:
Timestamp:
10/25/07 03:51:27 (1 year ago)
Author:
coling
Message:

Remove hacks now that Gnome bug 489854 has a fix

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • clientsplugin/0.11/cron/changes.xslt

    r2698 r2701  
    33<xsl:stylesheet 
    44  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
    5   xmlns:dt="http://xsltsl.org/date-time" 
    6   xmlns:str="http://xsltsl.org/string" 
    7   xmlns:hack='http://hack.com/hack' 
    8   xsl:exclude-result-prefixes='hack' 
    95  version="1.0"> 
    10  
    11   <xsl:import href="xsltsl/stdlib.xsl"/> 
     6   
    127  <xsl:output method="html" indent="yes" encoding="UTF-8" omit-xml-declaration="yes"/> 
    138  <xsl:decimal-format name="GBP" decimal-separator="." grouping-separator=","/> 
    149   
    15   <!-- Disabled until http://bugzilla.gnome.org/show_bug.cgi?id=489854 is fixed 
    16   <xsl:param name="view" /> --> 
    17   <xsl:variable name="view" select="hack:hack()"/> 
     10  <xsl:param name="view" /> 
    1811   
    1912  <!-- Match the root of the XML render the three views --> 
  • clientsplugin/0.11/cron/send-client-email

    r2699 r2701  
    6161 
    6262 
    63 ## Hideous hack to work around libxslt-python 1.1.22 bug 
    64 ## http://bugzilla.gnome.org/show_bug.cgi?id=489854 
    65 xslthackview = 'plain' 
    66 def fxslthackview(ctx): 
    67     global xslthackview 
    68  
    69     # 
    70     # Small check to verify the context is correcly accessed 
    71     # 
    72     try: 
    73         pctxt = libxslt.xpathParserContext(_obj=ctx) 
    74         ctxt = pctxt.context() 
    75         tctxt = ctxt.transformContext() 
    76         nodeName = tctxt.insertNode().name 
    77     except: 
    78         pass 
    79  
    80     return xslthackview 
    81  
    82 libxslt.registerExtModuleFunction('hack', 'http://hack.com/hack', fxslthackview) 
    83 ## End Hack 
    84  
    8563class SendClientMailer(object): 
    8664  def __init__(self, env): 
     
    8967   
    9068  def Send(self, subject, addresses, info, formatter): 
    91     global xslthackview 
    9269    if not self.config.getbool('notification', 'smtp_enabled'): 
    9370      return 
     
    134111     
    135112     
    136     # This should use XSLT params... but it's b0rken 
    137113    view = 'plain' 
    138     xslthackview = view 
    139     result = formatter.applyStylesheet(info, None) 
     114    result = formatter.applyStylesheet(info, {'view': '"%s"' % view }) 
    140115    msg_text = MIMEText(formatter.saveResultToString(result), view, 'utf-8') 
    141116    msg_alternative.attach(msg_text) 
     
    143118     
    144119    view = 'html' 
    145     xslthackview = view 
    146     result = formatter.applyStylesheet(info, None) 
     120    result = formatter.applyStylesheet(info, {'view': '"%s"' % view }) 
    147121    msg_text = MIMEText(formatter.saveResultToString(result), view, 'utf-8') 
    148122    msg_alternative.attach(msg_text) 
     
    151125    # Handle image embedding... 
    152126    view = 'images' 
    153     xslthackview = view 
    154     result = formatter.applyStylesheet(info, None) 
     127    result = formatter.applyStylesheet(info, {'view': '"%s"' % view }) 
    155128    if result and result.children and result.children.children: 
    156129      for img in result.children.children: 
  • clientsplugin/0.11/cron/summary.xslt

    r2697 r2701  
    33<xsl:stylesheet 
    44  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
    5   xmlns:dt="http://xsltsl.org/date-time" 
    6   xmlns:str="http://xsltsl.org/string" 
    7   xmlns:hack='http://hack.com/hack' 
    8   xsl:exclude-result-prefixes='hack' 
    95  version="1.0"> 
    10  
    11   <xsl:import href="xsltsl/stdlib.xsl"/> 
     6   
    127  <xsl:output method="html" indent="yes" encoding="UTF-8" omit-xml-declaration="yes"/> 
    138  <xsl:decimal-format name="GBP" decimal-separator="." grouping-separator=","/> 
    149   
    15   <!-- Disabled until http://bugzilla.gnome.org/show_bug.cgi?id=489854 is fixed 
    16   <xsl:param name="view" /> --> 
    17   <xsl:variable name="view" select="hack:hack()"/> 
     10  <xsl:param name="view" /> 
    1811   
    1912  <!-- Match the root of the XML render the three views -->