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

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

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

revision 1.1, Sun Oct 9 15:59:51 2005 UTC revision 1.1.4.1, Mon Feb 19 01:45:57 2007 UTC
# Line 1  Line 1 
1  <?php // $Id: Exp $  <?php // $Id: implement_module_drupal46.php,v 1.1 2005/10/09 15:59:51 djnz Exp $
2  /*  /*
3   * Implementation of wgHTML as a module for Drupal   * Implementation of wgHTML as a module for Drupal
4   * Tested with Drupal 4.6.3   * Tested with Drupal 4.6.3
# Line 14  class wghtml_implementation extends wght Line 14  class wghtml_implementation extends wght
14   * Retrieve a page from the cache   * Retrieve a page from the cache
15   */   */
16    function retrieve_page() {    function retrieve_page() {
17      $ret = db_fetch_object(db_query('SELECT pageId FROM {wghtml_pages} WHERE identity = \'%s\'', $this->identity));      if ( empty($this->pageId) ) {
18      $ret = db_fetch_object(db_query('SELECT * FROM {wghtml_versions} WHERE pageId = %d ORDER BY version DESC LIMIT 1', $ret->pageId));        $ret = db_fetch_object(db_query('SELECT pageId FROM {wghtml_pages} WHERE identity = \'%s\'', $this->identity));
19          $this->pageId = $ret->pageId;
20        }
21        $ret = db_fetch_object(db_query('SELECT * FROM {wghtml_versions} WHERE pageId = %d ORDER BY version DESC LIMIT 1', $this->pageId));
22      if ( $ret ) {      if ( $ret ) {
23        foreach ( $ret as $key=>$value ) {        foreach ( $ret as $key=>$value ) {
24          $this->$key = $value;          $this->$key = $value;

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.1.4.1

  ViewVC Help
Powered by ViewVC 1.1.2