Index: branches/liquidthreads/extensions/LqtExtension.php |
— | — | @@ -129,7 +129,8 @@ |
130 | 130 | // this only works for editing because we refer to the article directly. |
131 | 131 | |
132 | 132 | $e = new EditPage($pp->article); |
133 | | - $e->setAction( $this->title->getFullURL( "lqt_edit_post={$pp->article->getID()}" ) ); |
| 133 | + $e->editFormTextBottom .= "<input type=\"hidden\" name=\"lqt_edit_post\" value=\"{$pp->article->getID()}\">"; |
| 134 | +// $e->setAction( $this->title->getFullURL( "lqt_edit_post={$pp->article->getID()}" ) ); |
134 | 135 | |
135 | 136 | /* if ( $p->thread()->firstPost()->getID() == $p->getID() ) { |
136 | 137 | // This is the thread's root post; display topic field. |
— | — | @@ -204,7 +205,6 @@ |
205 | 206 | } |
206 | 207 | |
207 | 208 | function showPost( $post ) { |
208 | | - |
209 | 209 | $this->openDiv( 'lqt_post' ); |
210 | 210 | |
211 | 211 | if( $this->commandApplies( LQT_COMMAND_EDIT_POST, $post ) ) { |
— | — | @@ -224,14 +224,11 @@ |
225 | 225 | } |
226 | 226 | |
227 | 227 | function showThreadHeading( $thread ) { |
228 | | - |
229 | 228 | if ( $thread->hasSubject() ) |
230 | 229 | $this->output->addHTML( wfElement( "h{$this->headerLevel}", null, $thread->subject() ) ); |
231 | 230 | } |
232 | 231 | |
233 | 232 | function showThread( $thread ) { |
234 | | - |
235 | | - |
236 | 233 | $this->showThreadHeading( $thread ); |
237 | 234 | $this->showPost( $thread->rootPost() ); |
238 | 235 | $this->indent(); |
— | — | @@ -242,13 +239,11 @@ |
243 | 240 | } |
244 | 241 | |
245 | 242 | function indent() { |
246 | | - |
247 | 243 | $this->output->addHTML( wfOpenElement( 'dl', array('class'=>'lqt_replies') ) ); |
248 | 244 | $this->output->addHTML( wfOpenElement( 'dd') ); |
249 | 245 | $this->headerLevel += 1; |
250 | 246 | } |
251 | 247 | function unindent() { |
252 | | - |
253 | 248 | $this->output->addHTML( wfCloseElement( 'dd') ); |
254 | 249 | $this->output->addHTML( wfCloseElement( 'dl') ); |
255 | 250 | $this->headerLevel -= 1; |
Index: branches/liquidthreads/includes/EditPage.php |
— | — | @@ -45,35 +45,17 @@ |
46 | 46 | public $editFormTextAfterTools; |
47 | 47 | public $editFormTextBottom; |
48 | 48 | |
49 | | - |
50 | | - ##### LQT HACK |
51 | | - |
52 | | - var $didRedirect = false; |
53 | | - var $didSave = false; |
54 | | - |
55 | | - /** @param $action string URL that the form will submit to. */ |
56 | | - function setAction($action) { |
57 | | - $this->mAction = $action; |
58 | | - } |
59 | | - |
60 | | - ##### END |
61 | 49 | |
62 | | - |
63 | 50 | /** |
64 | 51 | * @todo document |
65 | 52 | * @param $article |
66 | 53 | */ |
67 | 54 | function EditPage( $article ) { |
68 | 55 | $this->mArticle =& $article; |
69 | | -// if( $article ) { |
70 | | -// $this->mTitle =& $article->getTitle(); ### LQT HACK. |
71 | | -// } |
72 | | -// else { # non-existant article; shouldn't affect LQT so leave it this way. |
73 | | - global $wgTitle; |
74 | | - $this->mTitle =& $wgTitle; |
75 | | -// } |
76 | | - |
77 | 56 | |
| 57 | + global $wgTitle; |
| 58 | + $this->mTitle =& $wgTitle; |
| 59 | + |
78 | 60 | # Placeholders for text injection by hooks (empty per default) |
79 | 61 | $this->editFormPageTop = |
80 | 62 | $this->editFormTextTop = |
— | — | @@ -1054,15 +1036,10 @@ |
1055 | 1037 | if ( $ew ) $ew = " style=\"width:100%\""; |
1056 | 1038 | else $ew = ''; |
1057 | 1039 | |
1058 | | - if ($this->mAction) { |
1059 | | - $action = $this->mAction; ### LQT HACK |
1060 | | - } else { |
1061 | | - $q = 'action=submit'; |
1062 | | - #if ( "no" == $redirect ) { $q .= "&redirect=no"; } |
1063 | | - $action = $this->mTitle->escapeLocalURL( $q ); |
1064 | | - } |
| 1040 | + $q = 'action=submit'; |
| 1041 | + #if ( "no" == $redirect ) { $q .= "&redirect=no"; } |
| 1042 | + $action = $this->mTitle->escapeLocalURL( $q ); |
1065 | 1043 | |
1066 | | - |
1067 | 1044 | $summary = wfMsg('summary'); |
1068 | 1045 | $subject = wfMsg('subject'); |
1069 | 1046 | |