/[drupal]/contributions/modules/wghtml/wghtml/class_wghtml.php
ViewVC logotype

Diff of /contributions/modules/wghtml/wghtml/class_wghtml.php

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1.4.2, Mon Feb 19 01:45:57 2007 UTC revision 1.1.4.3, Sun Feb 25 02:46:58 2007 UTC
# Line 1  Line 1 
1  <?php // $Id: class_wghtml.php,v 1.1 2005/10/09 15:59:51 djnz Exp $  <?php // $Id: class_wghtml.php,v 1.1.4.2 2007/02/19 01:45:57 djnz Exp $
2    
3  class wghtml_page {  class wghtml_page {
4    
5    function wghtml_page() {    function wghtml_page() {
6      $this->config =& $GLOBALS['wghtml_config'];      $this->config = $GLOBALS['wghtml_config'];
7    }    }
8    
9  /**  /**
# Line 86  class wghtml_page { Line 86  class wghtml_page {
86      }      }
87    
88      if ( $cache ) {      if ( $cache ) {
89        if ( $this->retrieve_page($this) ) {        if ( $this->retrieve_page() ) {
90    
91          // page exists in cache, but does it still exist on disk?          // page exists in cache, but does it still exist on disk?
92          if ( !file_exists($_SERVER['DOCUMENT_ROOT'].$decoded_url) ) {          if ( !file_exists($_SERVER['DOCUMENT_ROOT'].$decoded_url) ) {
# Line 162  class wghtml_page { Line 162  class wghtml_page {
162   *   The parsed HTML.   *   The parsed HTML.
163   */   */
164    function rebase_urls($text) {    function rebase_urls($text) {
165        if ( empty($this->config['rebase_urls']) ) {
166          return $text;
167        }
168      $find = array(      $find = array(
169        '@(<a\\s[^>]*href\\s*=\\s*")([^/\\\\][^":]*")@Umsi', // <a href=...        '@(<a\\s[^>]*href\\s*=\\s*")([^/\\\\][^":]*")@Umsi', // <a href=...
170        '@(<img\\s[^>]*src\\s*=\\s*")([^/\\\\][^":]*")@Umsi', // <img src=...        '@(<img\\s[^>]*src\\s*=\\s*")([^/\\\\][^":]*")@Umsi', // <img src=...

Legend:
Removed from v.1.1.4.2  
changed lines
  Added in v.1.1.4.3

  ViewVC Help
Powered by ViewVC 1.1.2