OpenPKG CVS Repository
  http://cvs.openpkg.org/
  ____________________________________________________________________________

  Server: cvs.openpkg.org                  Name:   Ralf S. Engelschall
  Root:   /v/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-src                      Date:   29-May-2008 12:12:37
  Branch: HEAD                             Handle: 2008052911123600

  Modified files:
    openpkg-src/drupal      drupal.patch

  Log:
    fix template handling

  Summary:
    Revision    Changes     Path
    1.18        +25 -7      openpkg-src/drupal/drupal.patch
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/drupal/drupal.patch
  ============================================================================
  $ cvs diff -u -r1.17 -r1.18 drupal.patch
  --- openpkg-src/drupal/drupal.patch   29 May 2008 06:29:42 -0000      1.17
  +++ openpkg-src/drupal/drupal.patch   29 May 2008 10:12:36 -0000      1.18
  @@ -330,7 +330,7 @@
   --- /dev/null        2008-05-02 21:08:21 +0200
   +++ sites/all/modules/img_assist/img_assist_popup.js 2008-05-02 21:05:56 
+0200
   @@ -0,0 +1,20 @@
  -+/* $Id: drupal.patch,v 1.17 2008/05/29 06:29:42 rse Exp $ */
  ++/* $Id: drupal.patch,v 1.18 2008/05/29 10:12:36 rse Exp $ */
   +
   +function launch_popup(nid, mw, mh) {
   +    var ox = mw;
  @@ -583,18 +583,18 @@
   
   Index: sites/all/modules/xmlcontent/xmlcontent.module
   --- sites/all/modules/xmlcontent/xmlcontent.module.orig      2007-03-14 
22:59:59 +0100
  -+++ sites/all/modules/xmlcontent/xmlcontent.module   2008-05-29 08:27:28 
+0200
  ++++ sites/all/modules/xmlcontent/xmlcontent.module   2008-05-29 12:10:00 
+0200
   @@ -39,7 +39,16 @@
          return t('Allows users to post XML node content and get it 
transformed through a configured XSLT script');
    
        case 'process':
   -      $xslt_path = drupal_get_path('module', 'xmlcontent'). '/' . 
variable_get("xmlcontent_xslt_path_$format", '');
   +      $tpl_path = variable_get("xmlcontent_tpl_path_$format", '');
  -+      if ($tpl_path != "") {
  ++      if ($tpl_path) {
   +          if (substr($tpl_path, 0, 1) != "/")
   +              $tpl_path = drupal_get_path('module', 'xmlcontent') . '/' . 
$tpl_path;
   +          $tpl = file_get_contents($tpl_path);
  -+          $text = preg_replace(/&template_body;/, $text, $tpl);
  ++          $text = preg_replace("/&template_body;/", $text, $tpl);
   +      }
   +      $xslt_path = variable_get("xmlcontent_xslt_path_$format", '');
   +      if (substr($xslt_path, 0, 1) != "/")
  @@ -623,7 +623,25 @@
          if (!is_file($schema_path) && ($validation == 'xsd' or $validation == 
'rng')) {
            $schema_path = null;
            watchdog( 'xmlcontent', t('Validation required but no schema 
file'), WATCHDOG_WARNING );
  -@@ -156,6 +168,13 @@
  +@@ -93,7 +105,16 @@
  +       libxml_clear_errors();
  +       libxml_use_internal_errors(true);
  + 
  +-      if (!_xmlcontent_validate($node->body, $validation, $schema_path)) {
  ++      $text = $node->body;
  ++      $tpl_path = variable_get("xmlcontent_tpl_path_$format", '');
  ++      if ($tpl_path) {
  ++          if (substr($tpl_path, 0, 1) != "/")
  ++              $tpl_path = drupal_get_path('module', 'xmlcontent') . '/' . 
$tpl_path;
  ++          $tpl = file_get_contents($tpl_path);
  ++          $text = preg_replace("/&template_body;/", $text, $tpl);
  ++      }
  ++
  ++      if (!_xmlcontent_validate($text, $validation, $schema_path)) {
  +         form_set_error('body', t('XML Content: Invalid XML') . 
libxml_errors_string());
  +       }
  +       
  +@@ -156,6 +177,13 @@
        '#collapsible' => TRUE,
        '#collapsed' => FALSE,
      );
  @@ -637,7 +655,7 @@
      $form['xmlcontent']["xmlcontent_xslt_path_$format"] = array(
        '#type'    => 'textfield',
        '#title'   => t('XSLT Script File Path'),
  -@@ -218,6 +237,8 @@
  +@@ -218,6 +246,8 @@
      
      // Load the XML document
      $dom = new DomDocument('1.0', 'UTF-8');
  @@ -646,7 +664,7 @@
      $valid = $dom->loadXML($xml);
      if (!$valid) {
        watchdog('xmlcontent', "Invalid XML Content", WATCHDOG_WARNING);
  -@@ -242,10 +263,8 @@
  +@@ -242,10 +272,8 @@
      }
    
      // Transform
  @@ .
______________________________________________________________________
OpenPKG                                             http://openpkg.org
CVS Repository Commit List                     [email protected]

Reply via email to