Index: trunk/phpwiki/fpw/wikiPage.php |
— | — | @@ -24,6 +24,7 @@ |
25 | 25 | $this->knownUnlinkedLinks = array () ; |
26 | 26 | $this->SetTitle ( $t ) ; |
27 | 27 | $this->isSpecialPage = false ; |
| 28 | + $this->canBeCached = true ; |
28 | 29 | $this->revision = "current" ; |
29 | 30 | if ( $this->namespace == "special" ) { # Special page, calling appropriate function |
30 | 31 | $allowed = $wikiAllowedSpecialPages ; # List of allowed special pages |
— | — | @@ -40,6 +41,7 @@ |
41 | 42 | # include_once ( "./specialPages.php") ; |
42 | 43 | $this->contents = $call () ; |
43 | 44 | $this->isSpecialPage = true ; |
| 45 | + $this->canBeCached = false ; |
44 | 46 | return ; # contents of special page is returned here!!! |
45 | 47 | } |
46 | 48 | |
— | — | @@ -464,8 +466,8 @@ |
465 | 467 | } |
466 | 468 | */ |
467 | 469 | |
468 | | - if ( $countvars == substr_count ( "{{" , $s ) ) $this->canBeCached = true ; |
469 | | - else $this->canBeCached = false ; |
| 470 | + if ( $countvars != substr_count ( "{{" , $s ) ) |
| 471 | + $this->canBeCached = false ; |
470 | 472 | |
471 | 473 | return $s ; |
472 | 474 | } |
— | — | @@ -1062,13 +1064,14 @@ |
1063 | 1065 | global $pageTitle , $diff , $wikiArticleSource , $wikiCurrentServer , $wikiPrintLinksMarkup , $useCachedPages ; |
1064 | 1066 | $pageTitle = $this->title ; |
1065 | 1067 | if ( isset ( $diff ) ) { |
| 1068 | + $this->canBeCached = false; # A little crude, but effective |
1066 | 1069 | $middle = $this->doDiff().$this->contents ; |
1067 | | - $useCachedPages = false; # A little crude, but effective |
1068 | 1070 | } |
1069 | 1071 | else $middle = $this->contents ; |
1070 | | - if ( $useCachedPages and !$this->isSpecialPage) { |
| 1072 | + if ( $useCachedPages and !$this->isSpecialPage and $this->canBeCached) { |
1071 | 1073 | if ( $this->cache != "" ) { # Using cache |
1072 | 1074 | $middle = $this->cache ; |
| 1075 | + #$middle = "<p>(cached)</p>" . $this->cache ; #FIXME |
1073 | 1076 | } else { |
1074 | 1077 | $middle = $this->parseContents($middle) ; |
1075 | 1078 | if ( $this->canBeCached ) { # Generating cache |