index.php
changeset 953 323c4cd1aa37
parent 907 44851d7e9bda
child 963 b572ce1114f1
equal deleted inserted replaced
952:d52dfa1f08da 953:323c4cd1aa37
    23   // Set up gzip encoding before any output is sent
    23   // Set up gzip encoding before any output is sent
    24   
    24   
    25   $aggressive_optimize_html = true;
    25   $aggressive_optimize_html = true;
    26   
    26   
    27   global $do_gzip;
    27   global $do_gzip;
       
    28   // FIXME: make this configurable
    28   $do_gzip = true;
    29   $do_gzip = true;
    29   
    30   
    30   if ( isset($_GET['nocompress']) )
    31   if ( isset($_GET['nocompress']) )
    31     $aggressive_optimize_html = false;
    32     $aggressive_optimize_html = false;
    32   
    33   
    68       break;
    69       break;
    69     case 'view':
    70     case 'view':
    70       // echo PageUtils::getpage($paths->page, true, ( (isset($_GET['oldid'])) ? $_GET['oldid'] : false ));
    71       // echo PageUtils::getpage($paths->page, true, ( (isset($_GET['oldid'])) ? $_GET['oldid'] : false ));
    71       $rev_id = ( (isset($_GET['oldid'])) ? intval($_GET['oldid']) : 0 );
    72       $rev_id = ( (isset($_GET['oldid'])) ? intval($_GET['oldid']) : 0 );
    72       $page = new PageProcessor( $paths->page_id, $paths->namespace, $rev_id );
    73       $page = new PageProcessor( $paths->page_id, $paths->namespace, $rev_id );
       
    74       // Feed this PageProcessor to the template processor. This prevents $template from starting another
       
    75       // PageProcessor when we already have one going.
       
    76       $template->set_page($page);
    73       $page->send_headers = true;
    77       $page->send_headers = true;
    74       $pagepass = ( isset($_REQUEST['pagepass']) ) ? sha1($_REQUEST['pagepass']) : '';
    78       $pagepass = ( isset($_REQUEST['pagepass']) ) ? sha1($_REQUEST['pagepass']) : '';
    75       $page->password = $pagepass;
    79       $page->password = $pagepass;
    76       $page->send(true);
    80       $page->send(true);
    77       $page_timestamp = $page->revision_time;
    81       $page_timestamp = $page->revision_time;