r40302 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r40301‎ | r40302 | r40303 >
Date:13:40, 1 September 2008
Author:dantman
Status:old
Tags:
Comment:
Apparently I forgot to commit the actual subclass of EditPage for SF.
Modified paths:
  • /trunk/extensions/SemanticForms/includes/SF_FormEditPage.php (added) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/includes/SF_FormEditPage.php
@@ -0,0 +1,41 @@
 2+<?php
 3+/**
 4+ * Form Edit Page inheriting from EditPage
 5+ *
 6+ * @author Daniel Friesen
 7+ */
 8+
 9+class FormEditPage extends EditPage {
 10+
 11+ protected $form;
 12+
 13+ function __construct( $article, $form_name = '' ) {
 14+ global $wgRequest;
 15+ parent::__construct( $article );
 16+ wfLoadExtensionMessages('SemanticForms');
 17+ $this->action = 'formedit';
 18+ $form_name = $wgRequest->getText('form', $form_name);
 19+ $this->form = Title::newFromText($form_name, SF_NS_FORM);
 20+ }
 21+
 22+ function setHeaders() {
 23+ parent::setHeaders();
 24+ global $wgOut, $wgTitle;
 25+ if( !$this->isConflict ) {
 26+ $wgOut->setPageTitle( wfMsg( 'sf_editdata_title',
 27+ $this->form->getText(), $wgTitle->getPrefixedText() ) );
 28+ }
 29+ }
 30+
 31+ protected function showTextbox1() {
 32+ if( $this->isConflict ) {
 33+ // Fallback to normal mode when showing an editconflict
 34+ parent::showTextbox1();
 35+ return;
 36+ }
 37+
 38+
 39+ }
 40+
 41+
 42+}
Property changes on: trunk/extensions/SemanticForms/includes/SF_FormEditPage.php
___________________________________________________________________
Added: svn:eol-style
143 + native

Status & tagging log