Index: trunk/extensions/Storyboard/specials/Story/Story_body.php |
— | — | @@ -100,11 +100,11 @@ |
101 | 101 | if ( $wgUser->isAllowed( 'storyreview' ) ) { |
102 | 102 | global $wgParser; |
103 | 103 | |
104 | | - $wgOut->addWikiMsg( |
105 | | - $wgParser->recursiveTagParse( |
| 104 | + $wgOut->addWikiMsgArray( |
| 105 | + //$wgParser->recursiveTagParse( |
106 | 106 | 'storyboard-canedit', |
107 | 107 | $this->getTitle()->getLocalURL( 'action=edit' ) |
108 | | - ) |
| 108 | + //) |
109 | 109 | ); |
110 | 110 | } |
111 | 111 | } |
Index: trunk/extensions/Storyboard/specials/StoryReview/StoryReview_body.php |
— | — | @@ -101,20 +101,22 @@ |
102 | 102 | $title = htmlspecialchars( $story->story_title ); |
103 | 103 | $text = htmlspecialchars( $story->story_text ); |
104 | 104 | |
105 | | - // TODO: htmlspecialchars the messages? |
106 | | - |
107 | 105 | $publishAction = $story->story_is_published ? 'unpublish' : 'publish'; |
108 | 106 | // Uses storyboard-unpublish or storyboard-publish |
109 | | - $publishMsg = wfMsg( "storyboard-$publishAction" ); |
| 107 | + $publishMsg = htmlspecialchars( wfMsg( "storyboard-$publishAction" ) ); |
110 | 108 | |
111 | 109 | $imageAction = $story->story_image_hidden ? 'unhideimage' : 'hideimage'; |
112 | 110 | // Uses storyboard-unhideimage or storyboard-hideimage |
113 | | - $imageMsg = wfMsg( "storyboard-$imageAction" ); |
| 111 | + $imageMsg = htmlspecialchars( wfMsg( "storyboard-$imageAction" ) ); |
114 | 112 | |
115 | | - $editMsg = wfMsg( 'edit' ); |
116 | | - $hideMsg = wfMsg( 'hide' ); |
117 | | - $deleteImageMsg = wfMsg( 'storyboard-deleteimage' ); |
| 113 | + $editMsg = htmlspecialchars( wfMsg( 'edit' ) ); |
| 114 | + $hideMsg = htmlspecialchars( wfMsg( 'hide' ) ); |
| 115 | + $deleteImageMsg = htmlspecialchars( wfMsg( 'storyboard-deleteimage' ) ); |
118 | 116 | |
| 117 | + // TODO: add some returnto feature here |
| 118 | + $editUrl = SpecialPage::getTitleFor( 'story', $story->story_title )->getFullURL('action=edit'); |
| 119 | + $editUrl = Xml::escapeJsString( $editUrl ); |
| 120 | + |
119 | 121 | return <<<EOT |
120 | 122 | <table width="100%" border="1" id="story_$story->story_id"> |
121 | 123 | <tr> |
— | — | @@ -129,7 +131,7 @@ |
130 | 132 | <tr> |
131 | 133 | <td align="center" height="35"> |
132 | 134 | <button type="button" onclick="stbDoStoryAction( this, $story->story_id, '$publishAction' )">$publishMsg</button> |
133 | | - <button type="button" onclick="">$editMsg</button> |
| 135 | + <button type="button" onclick="window.location='$editUrl'">$editMsg</button> |
134 | 136 | <button type="button" onclick="stbDoStoryAction( this, $story->story_id, 'hide' )">$hideMsg</button> |
135 | 137 | <button type="button" onclick="stbDoStoryAction( this, $story->story_id, '$imageAction' )">$imageMsg</button> |
136 | 138 | <button type="button" onclick="stbDeleteStoryImage( this, $story->story_id )">$deleteImageMsg</button> |
Index: trunk/extensions/Storyboard/Storyboard.php |
— | — | @@ -98,6 +98,7 @@ |
99 | 99 | } |
100 | 100 | |
101 | 101 | function efStoryboardAddStoryEditAction( &$content_actions ) { |
| 102 | + // TODO: currently not having any affect on Special:Story for some reason |
102 | 103 | global $wgRequest, $wgRequest, $wgTitle; |
103 | 104 | |
104 | 105 | $action = $wgRequest->getText( 'action' ); |