diff -r 112debff64bd -r 5f1cd51bf1be index.php --- a/index.php Sat Dec 15 18:10:14 2007 -0500 +++ b/index.php Tue Dec 18 23:44:55 2007 -0500 @@ -64,7 +64,7 @@ case 'view': // echo PageUtils::getpage($paths->page, true, ( (isset($_GET['oldid'])) ? $_GET['oldid'] : false )); $rev_id = ( (isset($_GET['oldid'])) ? intval($_GET['oldid']) : 0 ); - $page = new PageProcessor( $paths->cpage['urlname_nons'], $paths->namespace, $rev_id ); + $page = new PageProcessor( $paths->page_id, $paths->namespace, $rev_id ); $page->send_headers = true; $pagepass = ( isset($_REQUEST['pagepass']) ) ? sha1($_REQUEST['pagepass']) : ''; $page->password = $pagepass; @@ -79,7 +79,7 @@ default: $act = ( isset ($_GET['action']) ) ? $_GET['action'] : false; $id = ( isset ($_GET['id']) ) ? intval($_GET['id']) : -1; - echo PageUtils::comments_html($paths->cpage['urlname_nons'], $paths->namespace, $act, Array('id'=>$id)); + echo PageUtils::comments_html($paths->page_id, $paths->namespace, $act, Array('id'=>$id)); break; case 'postcomment': if(empty($_POST['name']) || @@ -88,8 +88,8 @@ ) { echo 'Invalid request'; break; } $cid = ( isset($_POST['captcha_id']) ) ? $_POST['captcha_id'] : false; $cin = ( isset($_POST['captcha_input']) ) ? $_POST['captcha_input'] : false; - PageUtils::addcomment($paths->cpage['urlname_nons'], $paths->namespace, $_POST['name'], $_POST['subj'], $_POST['text'], $cin, $cid); // All filtering, etc. is handled inside this method - echo PageUtils::comments_html($paths->cpage['urlname_nons'], $paths->namespace); + PageUtils::addcomment($paths->page_id, $paths->namespace, $_POST['name'], $_POST['subj'], $_POST['text'], $cin, $cid); // All filtering, etc. is handled inside this method + echo PageUtils::comments_html($paths->page_id, $paths->namespace); break; case 'editcomment': if(!isset($_GET['id']) || ( isset($_GET['id']) && !preg_match('#^([0-9]+)$#', $_GET['id']) )) { echo '
Invalid comment ID
'; break; } @@ -107,16 +107,16 @@ break; case 'savecomment': if(empty($_POST['subj']) || empty($_POST['text'])) { echo 'Invalid request
'; break; } - $r = PageUtils::savecomment_neater($paths->cpage['urlname_nons'], $paths->namespace, $_POST['subj'], $_POST['text'], (int)$_POST['id']); + $r = PageUtils::savecomment_neater($paths->page_id, $paths->namespace, $_POST['subj'], $_POST['text'], (int)$_POST['id']); if($r != 'good') { echo "$r"; break; } - echo PageUtils::comments_html($paths->cpage['urlname_nons'], $paths->namespace); + echo PageUtils::comments_html($paths->page_id, $paths->namespace); break; case 'deletecomment': if(!empty($_GET['id'])) { - PageUtils::deletecomment_neater($paths->cpage['urlname_nons'], $paths->namespace, (int)$_GET['id']); + PageUtils::deletecomment_neater($paths->page_id, $paths->namespace, (int)$_GET['id']); } - echo PageUtils::comments_html($paths->cpage['urlname_nons'], $paths->namespace); + echo PageUtils::comments_html($paths->page_id, $paths->namespace); break; } $template->footer(); @@ -129,7 +129,7 @@ } if(isset($_POST['_save'])) { - $e = PageUtils::savepage($paths->cpage['urlname_nons'], $paths->namespace, $_POST['page_text'], $_POST['edit_summary'], isset($_POST['minor'])); + $e = PageUtils::savepage($paths->page_id, $paths->namespace, $_POST['page_text'], $_POST['edit_summary'], isset($_POST['minor'])); if ( $e == 'good' ) { redirect(makeUrl($paths->page), 'Changes saved', 'Your changes to this page have been saved. Redirecting...', 3); @@ -141,7 +141,7 @@ $text = $_POST['page_text']; echo PageUtils::genPreview($_POST['page_text']); } - else $text = RenderMan::getPage($paths->cpage['urlname_nons'], $paths->namespace, 0, false, false, false, false); + else $text = RenderMan::getPage($paths->page_id, $paths->namespace, 0, false, false, false, false); echo '