Index: trunk/extensions/Storyboard/specials/Story/Story_body.php |
— | — | @@ -22,8 +22,8 @@ |
23 | 23 | public function execute( $identifier ) { |
24 | 24 | wfProfileIn( __METHOD__ ); |
25 | 25 | |
26 | | - if ( trim($identifier) == '' ) { |
27 | | - global $wgOut; |
| 26 | + if ( trim( $identifier ) == '' ) { |
| 27 | + global $wgOut; |
28 | 28 | $wgOut->addHTML( wfMsg( 'storyboard-nostorytitle' ) ); |
29 | 29 | return; |
30 | 30 | } |
— | — | @@ -37,10 +37,10 @@ |
38 | 38 | } else { |
39 | 39 | $conds = array( |
40 | 40 | 'story_title' => str_replace( '_', ' ', $identifier ) // TODO: escaping required? |
41 | | - ); |
| 41 | + ); |
42 | 42 | } |
43 | 43 | |
44 | | - $stories = $dbr->Select( |
| 44 | + $stories = $dbr->Select( |
45 | 45 | 'storyboard', |
46 | 46 | array( |
47 | 47 | 'story_id', |
— | — | @@ -48,7 +48,7 @@ |
49 | 49 | 'story_title', |
50 | 50 | 'story_text', |
51 | 51 | 'story_created', |
52 | | - 'story_is_published', |
| 52 | + 'story_is_published', |
53 | 53 | ), |
54 | 54 | $conds |
55 | 55 | ); |
— | — | @@ -61,7 +61,7 @@ |
62 | 62 | } |
63 | 63 | else { |
64 | 64 | $wgOut->addHTML( wfMsg( 'storyboard-unpublished' ) ); |
65 | | - } |
| 65 | + } |
66 | 66 | } |
67 | 67 | else { |
68 | 68 | global $wgOut; |
Index: trunk/extensions/Storyboard/specials/StoryReview/StoryReview_body.php |
— | — | @@ -23,7 +23,7 @@ |
24 | 24 | wfProfileIn( __METHOD__ ); |
25 | 25 | |
26 | 26 | global $wgUser; |
27 | | - if( $this->userCanExecute( $wgUser ) ){ |
| 27 | + if ( $this->userCanExecute( $wgUser ) ) { |
28 | 28 | // If the user has the storyreview permission and is not blocked, show the regular output. |
29 | 29 | $this->addOutput(); |
30 | 30 | } else { |
— | — | @@ -52,7 +52,7 @@ |
53 | 53 | 'story_author_name', |
54 | 54 | 'story_title', |
55 | 55 | 'story_text', |
56 | | - 'story_is_published' |
| 56 | + 'story_is_published' |
57 | 57 | ), |
58 | 58 | array( 'story_is_hidden' => 0 ) |
59 | 59 | ); |
— | — | @@ -75,7 +75,7 @@ |
76 | 76 | $revMsg = wfMsg( 'storyboard-reviewed' ); |
77 | 77 | |
78 | 78 | // Output the html for the stories. |
79 | | - $wgOut->addHTML(<<<EOT |
| 79 | + $wgOut->addHTML( <<<EOT |
80 | 80 | <h2>$unrevMsg</h2> |
81 | 81 | <table width="100%"> |
82 | 82 | $unreviewed |
Index: trunk/extensions/Storyboard/api/ApiStoryReview.php |
— | — | @@ -44,7 +44,7 @@ |
45 | 45 | |
46 | 46 | if ( !$wgUser->isAllowed( 'storyreview' ) || $wgUser->isBlocked() ) { |
47 | 47 | $this->dieUsageMsg( array( 'storyreview' ) ); |
48 | | - } |
| 48 | + } |
49 | 49 | |
50 | 50 | $params = $this->extractRequestParams(); |
51 | 51 | |
— | — | @@ -82,11 +82,11 @@ |
83 | 83 | $values = array( |
84 | 84 | 'story_is_published' => 1 |
85 | 85 | ); |
86 | | - break; |
| 86 | + break; |
87 | 87 | case 'unpublish' : |
88 | 88 | $values = array( |
89 | 89 | 'story_is_published' => 0 |
90 | | - ); |
| 90 | + ); |
91 | 91 | break; |
92 | 92 | case 'hideimage' : |
93 | 93 | $values = array( |
— | — | @@ -102,7 +102,7 @@ |
103 | 103 | $values = array( |
104 | 104 | 'story_author_image' => '' |
105 | 105 | ); |
106 | | - break; |
| 106 | + break; |
107 | 107 | } |
108 | 108 | |
109 | 109 | $dbw->update( 'storyboard', $values, $conds ); |
— | — | @@ -112,16 +112,16 @@ |
113 | 113 | public function getAllowedParams() { |
114 | 114 | return array( |
115 | 115 | 'storyid' => array( |
116 | | - ApiBase :: PARAM_TYPE => 'integer', |
| 116 | + ApiBase :: PARAM_TYPE => 'integer', |
117 | 117 | ), |
118 | | - 'storyaction' => null, |
| 118 | + 'storyaction' => null, |
119 | 119 | ); |
120 | | - } |
| 120 | + } |
121 | 121 | |
122 | 122 | public function getParamDescription() { |
123 | 123 | return array( |
124 | 124 | 'storyid' => '', |
125 | | - 'storyaction' => '', |
| 125 | + 'storyaction' => '', |
126 | 126 | ); |
127 | 127 | } |
128 | 128 | |
— | — | @@ -134,7 +134,7 @@ |
135 | 135 | public function getPossibleErrors() { |
136 | 136 | return array_merge( parent::getPossibleErrors(), array( |
137 | 137 | array( 'missingparam', 'storyid' ), |
138 | | - array( 'missingparam', 'storyaction' ), |
| 138 | + array( 'missingparam', 'storyaction' ), |
139 | 139 | ) ); |
140 | 140 | } |
141 | 141 | |
— | — | @@ -148,5 +148,5 @@ |
149 | 149 | |
150 | 150 | public function getVersion() { |
151 | 151 | return __CLASS__ . ': $Id$'; |
152 | | - } |
| 152 | + } |
153 | 153 | } |
\ No newline at end of file |
Index: trunk/extensions/Storyboard/api/ApiQueryStories.php |
— | — | @@ -89,7 +89,7 @@ |
90 | 90 | ApiBase :: PARAM_MAX => ApiBase :: LIMIT_BIG1, |
91 | 91 | ApiBase :: PARAM_MAX2 => ApiBase :: LIMIT_BIG2 |
92 | 92 | ), |
93 | | - 'continue' => null, |
| 93 | + 'continue' => null, |
94 | 94 | ); |
95 | 95 | } |
96 | 96 | |
— | — | @@ -126,6 +126,6 @@ |
127 | 127 | |
128 | 128 | public function getVersion() { |
129 | 129 | return __CLASS__ . ': $Id$'; |
130 | | - } |
| 130 | + } |
131 | 131 | |
132 | 132 | } |
\ No newline at end of file |
Index: trunk/extensions/Storyboard/Storyboard.i18n.php |
— | — | @@ -23,10 +23,10 @@ |
24 | 24 | // Special:Story |
25 | 25 | 'storyboard-nosuchstory' => 'The story you requested does not exist. It might have been removed.', |
26 | 26 | 'storyboard-unpublished' => 'The story you requested has not been published yet.', |
27 | | - 'storyboard-nostorytitle' => 'You need to specify the title or id of the story you want to view.', |
| 27 | + 'storyboard-nostorytitle' => 'You need to specify the title or id of the story you want to view.', |
28 | 28 | |
29 | 29 | // Story review |
30 | | - 'storyboard-storyreview' => 'Story review', |
| 30 | + 'storyboard-storyreview' => 'Story review', |
31 | 31 | 'storyboard-publish' => 'Publish', |
32 | 32 | 'storyboard-unpublish' => 'Unpublish', |
33 | 33 | 'storyboard-reviewed' => 'Reviewed', |
Index: trunk/extensions/Storyboard/tags/Storysubmission/Storysubmission_body.php |
— | — | @@ -52,8 +52,8 @@ |
53 | 53 | $fieldSize = 50; |
54 | 54 | |
55 | 55 | $width = StoryboardUtils::getDimension( $args, 'width', $egStorysubmissionWidth ); |
56 | | - $maxLen = array_key_exists('maxlength', $args) && is_numeric($args['maxlength']) ? $args['maxlength'] : $egStoryboardMaxStoryLen; |
57 | | - $minLen = array_key_exists('minlength', $args) && is_numeric($args['minlength']) ? $args['minlength'] : $egStoryboardMinStoryLen; |
| 56 | + $maxLen = array_key_exists( 'maxlength', $args ) && is_numeric( $args['maxlength'] ) ? $args['maxlength'] : $egStoryboardMaxStoryLen; |
| 57 | + $minLen = array_key_exists( 'minlength', $args ) && is_numeric( $args['minlength'] ) ? $args['minlength'] : $egStoryboardMinStoryLen; |
58 | 58 | |
59 | 59 | $submissionUrl = $parser->getTitle()->getLocalURL( 'action=purge' ); |
60 | 60 | |
— | — | @@ -64,39 +64,39 @@ |
65 | 65 | $defaultName = $wgUser->getRealName() !== '' ? $wgUser->getRealName() : $wgUser->getName(); |
66 | 66 | } |
67 | 67 | $formBody .= '<tr>' . |
68 | | - Html::element( 'td', array('width' => '100%'), wfMsg( 'storyboard-yourname' ) ) . |
69 | | - '<td>' . |
70 | | - Html::input('name', $defaultName, 'text', array( 'size' => $fieldSize ) |
| 68 | + Html::element( 'td', array( 'width' => '100%' ), wfMsg( 'storyboard-yourname' ) ) . |
| 69 | + '<td>' . |
| 70 | + Html::input( 'name', $defaultName, 'text', array( 'size' => $fieldSize ) |
71 | 71 | ) . '</td></tr>'; |
72 | 72 | |
73 | 73 | $formBody .= '<tr>' . |
74 | | - Html::element( 'td', array('width' => '100%'), wfMsg( 'storyboard-location' ) ) . |
75 | | - '<td>' . Html::input('location', '', 'text', array( 'size' => $fieldSize ) |
| 74 | + Html::element( 'td', array( 'width' => '100%' ), wfMsg( 'storyboard-location' ) ) . |
| 75 | + '<td>' . Html::input( 'location', '', 'text', array( 'size' => $fieldSize ) |
76 | 76 | ) . '</td></tr>'; |
77 | 77 | |
78 | 78 | $formBody .= '<tr>' . |
79 | | - Html::element( 'td', array('width' => '100%'), wfMsg( 'storyboard-occupation' ) ) . |
80 | | - '<td>' . Html::input('occupation', '', 'text', array( 'size' => $fieldSize ) |
| 79 | + Html::element( 'td', array( 'width' => '100%' ), wfMsg( 'storyboard-occupation' ) ) . |
| 80 | + '<td>' . Html::input( 'occupation', '', 'text', array( 'size' => $fieldSize ) |
81 | 81 | ) . '</td></tr>'; |
82 | 82 | |
83 | 83 | $formBody .= '<tr>' . |
84 | | - Html::element( 'td', array('width' => '100%'), wfMsg( 'storyboard-contact' ) ) . |
85 | | - '<td>' . Html::input('contact', '', 'text', array( 'size' => $fieldSize ) |
| 84 | + Html::element( 'td', array( 'width' => '100%' ), wfMsg( 'storyboard-contact' ) ) . |
| 85 | + '<td>' . Html::input( 'contact', '', 'text', array( 'size' => $fieldSize ) |
86 | 86 | ) . '</td></tr>'; |
87 | 87 | |
88 | 88 | $formBody .= '<tr>' . |
89 | | - Html::element( 'td', array('width' => '100%'), wfMsg( 'storyboard-storytitle' ) ) . |
90 | | - '<td>' . Html::input('storytitle', '', 'text', array( 'size' => $fieldSize ) |
91 | | - ) . '</td></tr>'; |
| 89 | + Html::element( 'td', array( 'width' => '100%' ), wfMsg( 'storyboard-storytitle' ) ) . |
| 90 | + '<td>' . Html::input( 'storytitle', '', 'text', array( 'size' => $fieldSize ) |
| 91 | + ) . '</td></tr>'; |
92 | 92 | |
93 | 93 | $formBody .= '<tr><td colspan="2">' . |
94 | 94 | wfMsg( 'storyboard-story' ) . |
95 | 95 | Html::element( |
96 | 96 | 'div', |
97 | | - array('class' => 'storysubmission-charcount', 'id' => 'storysubmission-charlimitinfo'), |
| 97 | + array( 'class' => 'storysubmission-charcount', 'id' => 'storysubmission-charlimitinfo' ), |
98 | 98 | wfMsgExt( 'storyboard-charsneeded', 'parsemag', $minLen ) |
99 | 99 | ) . |
100 | | - '<br />' . |
| 100 | + '<br />' . |
101 | 101 | Html::element( |
102 | 102 | 'textarea', |
103 | 103 | array( |
— | — | @@ -110,13 +110,13 @@ |
111 | 111 | '</td></tr>'; |
112 | 112 | |
113 | 113 | // TODO: add upload functionality |
114 | | - |
| 114 | + |
115 | 115 | $formBody .= '<tr><td colspan="2"><input type="checkbox" id="storyboard-agreement" /> ' . |
116 | 116 | htmlspecialchars( wfMsg( 'storyboard-agreement' ) ) . |
117 | 117 | '</td></tr>'; |
118 | 118 | |
119 | | - $formBody .= '<tr><td colspan="2">' . |
120 | | - Html::input( '', wfMsg( 'htmlform-submit' ), 'submit', array('id' => 'storysubmission-button') ) . |
| 119 | + $formBody .= '<tr><td colspan="2">' . |
| 120 | + Html::input( '', wfMsg( 'htmlform-submit' ), 'submit', array( 'id' => 'storysubmission-button' ) ) . |
121 | 121 | '</td></tr>'; |
122 | 122 | |
123 | 123 | $formBody .= '</table>'; |
— | — | @@ -145,7 +145,7 @@ |
146 | 146 | $dbw = wfGetDB( DB_MASTER ); |
147 | 147 | |
148 | 148 | // TODO: some sort of validation? |
149 | | - |
| 149 | + |
150 | 150 | $story = array( |
151 | 151 | 'story_author_name' => $wgRequest->getText( 'name' ), |
152 | 152 | 'story_author_location' => $wgRequest->getText( 'location' ), |
— | — | @@ -164,7 +164,7 @@ |
165 | 165 | $dbw->insert( 'storyboard', $story ); |
166 | 166 | |
167 | 167 | $responseHtml = ''; // TODO: create html response |
168 | | - |
| 168 | + |
169 | 169 | return $responseHtml; |
170 | 170 | } |
171 | 171 | |