index.php
changeset 32 4d87aad3c4c0
parent 28 dd2edcdc6c03
child 33 143d3ee32f3c
equal deleted inserted replaced
31:dc8741857bde 32:4d87aad3c4c0
    52     case 'view':
    52     case 'view':
    53       // echo PageUtils::getpage($paths->page, true, ( (isset($_GET['oldid'])) ? $_GET['oldid'] : false ));
    53       // echo PageUtils::getpage($paths->page, true, ( (isset($_GET['oldid'])) ? $_GET['oldid'] : false ));
    54       $rev_id = ( (isset($_GET['oldid'])) ? intval($_GET['oldid']) : 0 );
    54       $rev_id = ( (isset($_GET['oldid'])) ? intval($_GET['oldid']) : 0 );
    55       $page = new PageProcessor( $paths->cpage['urlname_nons'], $paths->namespace, $rev_id );
    55       $page = new PageProcessor( $paths->cpage['urlname_nons'], $paths->namespace, $rev_id );
    56       $page->send_headers = true;
    56       $page->send_headers = true;
       
    57       $pagepass = ( isset($_REQUEST['pagepass']) ) ? sha1($_REQUEST['pagepass']) : '';
       
    58       $page->password = $pagepass;
    57       $page->send();
    59       $page->send();
    58       break;
    60       break;
    59     case 'comments':
    61     case 'comments':
    60       $template->header();
    62       $template->header();
    61       $sub = ( isset ($_GET['sub']) ) ? $_GET['sub'] : false;
    63       $sub = ( isset ($_GET['sub']) ) ? $_GET['sub'] : false;
   185       echo $c[1];
   187       echo $c[1];
   186       $template->footer();
   188       $template->footer();
   187       break;
   189       break;
   188     case 'moreoptions':
   190     case 'moreoptions':
   189       $template->header();
   191       $template->header();
   190       echo '<div class="pagebar" id="pagebarpopup2" style="width: 150px; padding: 0;">'.$template->tpl_strings['TOOLBAR_EXTRAS'].'</div>';
   192       echo '<div class="menu_nojs" style="width: 150px; padding: 0;"><ul style="display: block;"><li><div class="label">More options for this page</div><div style="clear: both;"></div></li>'.$template->tpl_strings['TOOLBAR_EXTRAS'].'</ul></div>';
   191       $template->footer();
   193       $template->footer();
   192       break;
   194       break;
   193     case 'protect':
   195     case 'protect':
   194       if (!isset($_REQUEST['level'])) die_friendly('Invalid request', '<p>No protection level specified</p>');
   196       if (!isset($_REQUEST['level'])) die_friendly('Invalid request', '<p>No protection level specified</p>');
   195       if(!empty($_POST['reason']))
   197       if(!empty($_POST['reason']))