Index: trunk/extensions/CodeReview/backend/Subversion.php |
— | — | @@ -5,7 +5,7 @@ |
6 | 6 | /** |
7 | 7 | * @var string |
8 | 8 | */ |
9 | | - protected $mRepoPath; |
| 9 | + protected $repoPath; |
10 | 10 | |
11 | 11 | public static function newFromRepo( $repo ) { |
12 | 12 | global $wgSubversionProxy, $wgSubversionProxyTimeout; |
— | — | @@ -22,7 +22,7 @@ |
23 | 23 | * @param $repo String Path to SVN Repo |
24 | 24 | */ |
25 | 25 | function __construct( $repoPath ) { |
26 | | - $this->mRepoPath = $repoPath; |
| 26 | + $this->repoPath = $repoPath; |
27 | 27 | } |
28 | 28 | |
29 | 29 | abstract function canConnect(); |
— | — | @@ -80,13 +80,13 @@ |
81 | 81 | } |
82 | 82 | |
83 | 83 | function getFile( $path, $rev = null ) { |
84 | | - return svn_cat( $this->mRepoPath . $path, $rev ); |
| 84 | + return svn_cat( $this->repoPath . $path, $rev ); |
85 | 85 | } |
86 | 86 | |
87 | 87 | function getDiff( $path, $rev1, $rev2 ) { |
88 | 88 | list( $fout, $ferr ) = svn_diff( |
89 | | - $this->mRepoPath . $path, $rev1, |
90 | | - $this->mRepoPath . $path, $rev2 ); |
| 89 | + $this->repoPath . $path, $rev1, |
| 90 | + $this->repoPath . $path, $rev2 ); |
91 | 91 | |
92 | 92 | if ( $fout ) { |
93 | 93 | // We have to read out the file descriptors. :P |
— | — | @@ -104,13 +104,13 @@ |
105 | 105 | } |
106 | 106 | |
107 | 107 | function getDirList( $path, $rev = null ) { |
108 | | - return svn_ls( $this->mRepoPath . $path, |
| 108 | + return svn_ls( $this->repoPath . $path, |
109 | 109 | $this->_rev( $rev, SVN_REVISION_HEAD ) ); |
110 | 110 | } |
111 | 111 | |
112 | 112 | function getLog( $path, $startRev = null, $endRev = null ) { |
113 | 113 | wfSuppressWarnings(); |
114 | | - $log = svn_log( $this->mRepoPath . $path, |
| 114 | + $log = svn_log( $this->repoPath . $path, |
115 | 115 | $this->_rev( $startRev, SVN_REVISION_INITIAL ), |
116 | 116 | $this->_rev( $endRev, SVN_REVISION_HEAD ) ); |
117 | 117 | wfRestoreWarnings(); |
— | — | @@ -127,7 +127,7 @@ |
128 | 128 | $command = sprintf( |
129 | 129 | "svn info %s %s", |
130 | 130 | $this->getExtraArgs(), |
131 | | - wfEscapeShellArg( $this->mRepoPath ) ); |
| 131 | + wfEscapeShellArg( $this->repoPath ) ); |
132 | 132 | |
133 | 133 | $result = wfShellExec( $command ); |
134 | 134 | if ( $result == "" ) { |
— | — | @@ -146,7 +146,7 @@ |
147 | 147 | $command = sprintf( |
148 | 148 | "svn cat %s %s", |
149 | 149 | $this->getExtraArgs(), |
150 | | - wfEscapeShellArg( $this->mRepoPath . $path ) ); |
| 150 | + wfEscapeShellArg( $this->repoPath . $path ) ); |
151 | 151 | |
152 | 152 | return wfShellExec( $command ); |
153 | 153 | } |
— | — | @@ -157,7 +157,7 @@ |
158 | 158 | intval( $rev1 ), |
159 | 159 | intval( $rev2 ), |
160 | 160 | $this->getExtraArgs(), |
161 | | - wfEscapeShellArg( $this->mRepoPath . $path ) ); |
| 161 | + wfEscapeShellArg( $this->repoPath . $path ) ); |
162 | 162 | |
163 | 163 | return wfShellExec( $command ); |
164 | 164 | } |
— | — | @@ -169,7 +169,7 @@ |
170 | 170 | wfEscapeShellArg( $this->_rev( $startRev, 'BASE' ) ), |
171 | 171 | wfEscapeShellArg( $this->_rev( $endRev, 'HEAD' ) ), |
172 | 172 | $this->getExtraArgs(), |
173 | | - wfEscapeShellArg( $this->mRepoPath . $path ) ); |
| 173 | + wfEscapeShellArg( $this->repoPath . $path ) ); |
174 | 174 | |
175 | 175 | $lines = explode( "\n", wfShellExec( $command ) ); |
176 | 176 | $out = array(); |
— | — | @@ -265,7 +265,7 @@ |
266 | 266 | "svn list --xml -r%s %s %s", |
267 | 267 | wfEscapeShellArg( $this->_rev( $rev, 'HEAD' ) ), |
268 | 268 | $this->getExtraArgs(), |
269 | | - wfEscapeShellArg( $this->mRepoPath . $path ) ); |
| 269 | + wfEscapeShellArg( $this->repoPath . $path ) ); |
270 | 270 | $document = new DOMDocument(); |
271 | 271 | |
272 | 272 | if ( !@$document->loadXML( wfShellExec( $command ) ) ) |
— | — | @@ -326,8 +326,8 @@ |
327 | 327 | class SubversionProxy extends SubversionAdaptor { |
328 | 328 | function __construct( $repo, $proxy, $timeout = 30 ) { |
329 | 329 | parent::__construct( $repo ); |
330 | | - $this->mProxy = $proxy; |
331 | | - $this->mTimeout = $timeout; |
| 330 | + $this->proxy = $proxy; |
| 331 | + $this->timeout = $timeout; |
332 | 332 | } |
333 | 333 | |
334 | 334 | function canConnect() { |
— | — | @@ -342,7 +342,7 @@ |
343 | 343 | function getDiff( $path, $rev1, $rev2 ) { |
344 | 344 | return $this->_proxy( array( |
345 | 345 | 'action' => 'diff', |
346 | | - 'base' => $this->mRepoPath, |
| 346 | + 'base' => $this->repoPath, |
347 | 347 | 'path' => $path, |
348 | 348 | 'rev1' => $rev1, |
349 | 349 | 'rev2' => $rev2 ) ); |
— | — | @@ -351,7 +351,7 @@ |
352 | 352 | function getLog( $path, $startRev = null, $endRev = null ) { |
353 | 353 | return $this->_proxy( array( |
354 | 354 | 'action' => 'log', |
355 | | - 'base' => $this->mRepoPath, |
| 355 | + 'base' => $this->repoPath, |
356 | 356 | 'path' => $path, |
357 | 357 | 'start' => $startRev, |
358 | 358 | 'end' => $endRev ) ); |
— | — | @@ -360,7 +360,7 @@ |
361 | 361 | function getDirList( $path, $rev = null ) { |
362 | 362 | return $this->_proxy( array( |
363 | 363 | 'action' => 'list', |
364 | | - 'base' => $this->mRepoPath, |
| 364 | + 'base' => $this->repoPath, |
365 | 365 | 'path' => $path, |
366 | 366 | 'rev' => $rev ) ); |
367 | 367 | } |
— | — | @@ -372,8 +372,8 @@ |
373 | 373 | unset( $params[$key] ); |
374 | 374 | } |
375 | 375 | } |
376 | | - $target = $this->mProxy . '?' . wfArrayToCgi( $params ); |
377 | | - $blob = Http::get( $target, $this->mTimeout ); |
| 376 | + $target = $this->proxy . '?' . wfArrayToCgi( $params ); |
| 377 | + $blob = Http::get( $target, $this->timeout ); |
378 | 378 | if ( $blob === false ) { |
379 | 379 | throw new MWException( "SVN proxy error" ); |
380 | 380 | } |
Index: trunk/extensions/CodeReview/backend/CodeCommentLinker.php |
— | — | @@ -2,10 +2,20 @@ |
3 | 3 | |
4 | 4 | abstract class CodeCommentLinker { |
5 | 5 | |
| 6 | + /** |
| 7 | + * @var CodeRepository |
| 8 | + */ |
| 9 | + protected $repo; |
| 10 | + |
| 11 | + /** |
| 12 | + * @var Skin |
| 13 | + */ |
| 14 | + protected $skin; |
| 15 | + |
6 | 16 | function __construct( $repo ) { |
7 | 17 | global $wgUser; |
8 | 18 | $this->skin = $wgUser->getSkin(); |
9 | | - $this->mRepo = $repo; |
| 19 | + $this->repo = $repo; |
10 | 20 | } |
11 | 21 | |
12 | 22 | function link( $text ) { |
— | — | @@ -29,7 +39,7 @@ |
30 | 40 | function messageBugLink( $arr ) { |
31 | 41 | $text = $arr[0]; |
32 | 42 | $bugNo = intval( $arr[1] ); |
33 | | - $url = $this->mRepo->getBugPath( $bugNo ); |
| 43 | + $url = $this->repo->getBugPath( $bugNo ); |
34 | 44 | if ( $url ) { |
35 | 45 | return $this->makeExternalLink( $url, $text ); |
36 | 46 | } else { |
— | — | @@ -41,7 +51,7 @@ |
42 | 52 | $text = $matches[0]; |
43 | 53 | $rev = intval( $matches[1] ); |
44 | 54 | |
45 | | - $repo = $this->mRepo->getName(); |
| 55 | + $repo = $this->repo->getName(); |
46 | 56 | $title = SpecialPage::getTitleFor( 'Code', "$repo/$rev" ); |
47 | 57 | |
48 | 58 | return $this->makeInternalLink( $title, $text ); |
Index: trunk/extensions/CodeReview/ui/CodeCommentsAuthorListView.php |
— | — | @@ -3,6 +3,6 @@ |
4 | 4 | class CodeCommentsAuthorListView extends CodeCommentsListView { |
5 | 5 | function __construct( $repo, $author ) { |
6 | 6 | parent::__construct( $repo ); |
7 | | - $this->mAuthor = $author; |
| 7 | + $this->author = $author; |
8 | 8 | } |
9 | 9 | } |
Index: trunk/extensions/CodeReview/ui/CodeRevisionAuthorLink.php |
— | — | @@ -3,15 +3,15 @@ |
4 | 4 | // Special:Code/MediaWiki/author/johndoe/link |
5 | 5 | |
6 | 6 | class CodeRevisionAuthorLink extends CodeRevisionAuthorView { |
7 | | - function __construct( $repoName, $author ) { |
| 7 | + function __construct( $repo, $author ) { |
8 | 8 | global $wgRequest; |
9 | | - parent::__construct( $repoName, $author ); |
10 | | - $this->mTarget = $wgRequest->getVal( 'linktouser' ); |
| 9 | + parent::__construct( $repo, $author ); |
| 10 | + $this->target = $wgRequest->getVal( 'linktouser' ); |
11 | 11 | } |
12 | 12 | |
13 | 13 | function getTitle() { |
14 | | - $repo = $this->mRepo->getName(); |
15 | | - $auth = $this->mAuthor; |
| 14 | + $repo = $this->repo->getName(); |
| 15 | + $auth = $this->author; |
16 | 16 | return SpecialPage::getTitleFor( 'Code', "$repo/author/$auth/link" ); |
17 | 17 | } |
18 | 18 | |
— | — | @@ -39,7 +39,7 @@ |
40 | 40 | |
41 | 41 | $additional = ''; |
42 | 42 | // Is there already a user linked to this author? |
43 | | - if ( $this->mUser ) { |
| 43 | + if ( $this->user ) { |
44 | 44 | $form .= Xml::element( 'legend', array(), wfMsg( 'code-author-alterlink' ) ); |
45 | 45 | $additional = Xml::openElement( 'fieldset' ) . |
46 | 46 | Xml::element( 'legend', array(), wfMsg( 'code-author-orunlink' ) ) . |
— | — | @@ -67,29 +67,29 @@ |
68 | 68 | return; |
69 | 69 | } |
70 | 70 | |
71 | | - if ( strlen( $this->mTarget ) && $wgRequest->getCheck( 'newname' ) ) { |
72 | | - $user = User::newFromName( $this->mTarget, false ); |
| 71 | + if ( strlen( $this->target ) && $wgRequest->getCheck( 'newname' ) ) { |
| 72 | + $user = User::newFromName( $this->target, false ); |
73 | 73 | if ( !$user || !$user->getId() ) { |
74 | | - $wgOut->addWikiMsg( 'nosuchusershort', $this->mTarget ); |
| 74 | + $wgOut->addWikiMsg( 'nosuchusershort', $this->target ); |
75 | 75 | return; |
76 | 76 | } |
77 | | - $this->mRepo->linkUser( $this->mAuthor, $user ); |
| 77 | + $this->repo->linkUser( $this->author, $user ); |
78 | 78 | $userlink = $this->skin->userLink( $user->getId(), $user->getName() ); |
79 | 79 | $wgOut->addHTML( |
80 | 80 | '<div class="successbox">' . |
81 | | - wfMsgHtml( 'code-author-success', $this->authorLink( $this->mAuthor ), $userlink ) . |
| 81 | + wfMsgHtml( 'code-author-success', $this->authorLink( $this->author ), $userlink ) . |
82 | 82 | '</div>' |
83 | 83 | ); |
84 | 84 | // Unlink an author to a wiki users |
85 | 85 | } else if ( $wgRequest->getVal( 'unlink' ) ) { |
86 | | - if ( !$this->mUser ) { |
| 86 | + if ( !$this->user ) { |
87 | 87 | $wgOut->addHTML( wfMsg( 'code-author-orphan' ) ); |
88 | 88 | return; |
89 | 89 | } |
90 | | - $this->mRepo->unlinkUser( $this->mAuthor ); |
| 90 | + $this->repo->unlinkUser( $this->author ); |
91 | 91 | $wgOut->addHTML( |
92 | 92 | '<div class="successbox">' . |
93 | | - wfMsgHtml( 'code-author-unlinksuccess', $this->authorLink( $this->mAuthor ) ) . |
| 93 | + wfMsgHtml( 'code-author-unlinksuccess', $this->authorLink( $this->author ) ) . |
94 | 94 | '</div>' |
95 | 95 | ); |
96 | 96 | } |
Index: trunk/extensions/CodeReview/ui/CodeTagListView.php |
— | — | @@ -4,12 +4,12 @@ |
5 | 5 | class CodeTagListView extends CodeView { |
6 | 6 | function __construct( $repoName ) { |
7 | 7 | parent::__construct(); |
8 | | - $this->mRepo = CodeRepository::newFromName( $repoName ); |
| 8 | + $this->repo = CodeRepository::newFromName( $repoName ); |
9 | 9 | } |
10 | 10 | |
11 | 11 | function execute() { |
12 | 12 | global $wgOut; |
13 | | - $list = $this->mRepo->getTagList(); |
| 13 | + $list = $this->repo->getTagList(); |
14 | 14 | |
15 | 15 | if( count( $list ) === 0 ) { |
16 | 16 | $wgOut->addWikiMsg( 'code-tags-no-tags' ); |
— | — | @@ -21,7 +21,7 @@ |
22 | 22 | } |
23 | 23 | |
24 | 24 | public function linkCallback( $tag, $weight ) { |
25 | | - $query = $this->mRepo->getName() . '/tag/' . $tag; |
| 25 | + $query = $this->repo->getName() . '/tag/' . $tag; |
26 | 26 | return Html::element( 'a', array( |
27 | 27 | 'href' => SpecialPage::getTitleFor( 'Code', $query )->getFullURL(), |
28 | 28 | 'class' => 'plainlinks mw-wordcloud-size-' . $weight ), $tag ); |
Index: trunk/extensions/CodeReview/ui/CodeView.php |
— | — | @@ -7,7 +7,7 @@ |
8 | 8 | /** |
9 | 9 | * @var CodeRepository |
10 | 10 | */ |
11 | | - var $mRepo; |
| 11 | + var $repo; |
12 | 12 | |
13 | 13 | function __construct() { |
14 | 14 | global $wgUser; |
— | — | @@ -24,7 +24,7 @@ |
25 | 25 | abstract function execute(); |
26 | 26 | |
27 | 27 | function authorLink( $author, $extraParams = array() ) { |
28 | | - $repo = $this->mRepo->getName(); |
| 28 | + $repo = $this->repo->getName(); |
29 | 29 | $special = SpecialPage::getTitleFor( 'Code', "$repo/author/$author" ); |
30 | 30 | return $this->skin->link( $special, htmlspecialchars( $author ), array(), $extraParams ); |
31 | 31 | } |
— | — | @@ -35,7 +35,7 @@ |
36 | 36 | |
37 | 37 | function formatMessage( $text ) { |
38 | 38 | $text = nl2br( htmlspecialchars( $text ) ); |
39 | | - $linker = new CodeCommentLinkerHtml( $this->mRepo ); |
| 39 | + $linker = new CodeCommentLinkerHtml( $this->repo ); |
40 | 40 | return $linker->link( $text ); |
41 | 41 | } |
42 | 42 | |
— | — | @@ -72,8 +72,8 @@ |
73 | 73 | } |
74 | 74 | |
75 | 75 | function getRepo() { |
76 | | - if ( $this->mRepo ) { |
77 | | - return $this->mRepo; |
| 76 | + if ( $this->repo ) { |
| 77 | + return $this->repo; |
78 | 78 | } |
79 | 79 | return false; |
80 | 80 | } |
— | — | @@ -84,12 +84,12 @@ |
85 | 85 | /** |
86 | 86 | * @var CodeRepository |
87 | 87 | */ |
88 | | - protected $mRepo; |
| 88 | + protected $repo; |
89 | 89 | |
90 | 90 | /** |
91 | 91 | * @var CodeView |
92 | 92 | */ |
93 | | - protected $mView; |
| 93 | + protected $view; |
94 | 94 | |
95 | 95 | /** |
96 | 96 | * @param $view CodeView |
— | — | @@ -97,10 +97,10 @@ |
98 | 98 | */ |
99 | 99 | function __construct( $view ) { |
100 | 100 | global $IP; |
101 | | - $this->mView = $view; |
102 | | - $this->mRepo = $view->mRepo; |
103 | | - $this->mDefaultDirection = true; |
104 | | - $this->mCurSVN = SpecialVersion::getSvnRevision( $IP ); |
| 101 | + $this->view = $view; |
| 102 | + $this->repo = $view->repo; |
| 103 | + $this->defaultDirection = true; |
| 104 | + $this->curSVN = SpecialVersion::getSvnRevision( $IP ); |
105 | 105 | parent::__construct(); |
106 | 106 | } |
107 | 107 | |
— | — | @@ -118,7 +118,7 @@ |
119 | 119 | $s = "<tr class=\"$css\">\n"; |
120 | 120 | // Some of this stolen from Pager.php...sigh |
121 | 121 | $fieldNames = $this->getFieldNames(); |
122 | | - $this->mCurrentRow = $row; # In case formatValue needs to know |
| 122 | + $this->currentRow = $row; # In case formatValue needs to know |
123 | 123 | foreach ( $fieldNames as $field => $name ) { |
124 | 124 | $value = isset( $row->$field ) ? $row->$field : null; |
125 | 125 | $formatted = strval( $this->formatRevValue( $field, $value, $row ) ); |
Index: trunk/extensions/CodeReview/ui/CodeStatusListView.php |
— | — | @@ -4,12 +4,12 @@ |
5 | 5 | class CodeStatusListView extends CodeView { |
6 | 6 | function __construct( $repoName ) { |
7 | 7 | parent::__construct(); |
8 | | - $this->mRepo = CodeRepository::newFromName( $repoName ); |
| 8 | + $this->repo = CodeRepository::newFromName( $repoName ); |
9 | 9 | } |
10 | 10 | |
11 | 11 | function execute() { |
12 | 12 | global $wgOut; |
13 | | - $name = $this->mRepo->getName(); |
| 13 | + $name = $this->repo->getName(); |
14 | 14 | $states = CodeRevision::getPossibleStates(); |
15 | 15 | $wgOut->addWikiText( "== " . wfMsg ( "code-field-status" ) . " ==\n" ); |
16 | 16 | |
Index: trunk/extensions/CodeReview/ui/CodeCommentsListView.php |
— | — | @@ -2,17 +2,18 @@ |
3 | 3 | |
4 | 4 | // Special:Code/MediaWiki |
5 | 5 | class CodeCommentsListView extends CodeView { |
6 | | - public $mRepo; |
7 | 6 | |
| 7 | + protected $author; |
| 8 | + |
8 | 9 | function __construct( $repo ) { |
9 | 10 | parent::__construct(); |
10 | 11 | |
11 | | - $this->mRepo = ( $repo instanceof CodeRepository ) |
| 12 | + $this->repo = ( $repo instanceof CodeRepository ) |
12 | 13 | ? $repo |
13 | 14 | : CodeRepository::newFromName( $repo ); |
14 | 15 | |
15 | 16 | global $wgRequest; |
16 | | - $this->mAuthor = $wgRequest->getText( 'author' ); |
| 17 | + $this->author = $wgRequest->getText( 'author' ); |
17 | 18 | } |
18 | 19 | |
19 | 20 | function execute() { |
— | — | @@ -28,12 +29,22 @@ |
29 | 30 | ); |
30 | 31 | } |
31 | 32 | |
| 33 | + function getAuthor() { |
| 34 | + return $this->author; |
| 35 | + } |
| 36 | + |
| 37 | + /** |
| 38 | + * @return CodeCommentsTablePager |
| 39 | + */ |
32 | 40 | function getPager() { |
33 | 41 | return new CodeCommentsTablePager( $this ); |
34 | 42 | } |
35 | 43 | |
| 44 | + /** |
| 45 | + * @return CodeRepository|null |
| 46 | + */ |
36 | 47 | function getRepo() { |
37 | | - return $this->mRepo; |
| 48 | + return $this->repo; |
38 | 49 | } |
39 | 50 | } |
40 | 51 | |
— | — | @@ -52,14 +63,14 @@ |
53 | 64 | $query = array( |
54 | 65 | 'tables' => array( 'code_comment', 'code_rev' ), |
55 | 66 | 'fields' => array_keys( $this->getFieldNames() ), |
56 | | - 'conds' => array( 'cc_repo_id' => $this->mRepo->getId() ), |
| 67 | + 'conds' => array( 'cc_repo_id' => $this->repo->getId() ), |
57 | 68 | 'join_conds' => array( |
58 | 69 | 'code_rev' => array( 'LEFT JOIN', 'cc_repo_id = cr_repo_id AND cc_rev_id = cr_id' ) |
59 | 70 | ) |
60 | 71 | ); |
61 | 72 | |
62 | | - if( $this->mView->mAuthor ) { |
63 | | - $query['conds']['cc_user_text'] = $this->mView->mAuthor; |
| 73 | + if( $this->view instanceof CodeCommentsListView ) { |
| 74 | + $query['conds']['cc_user_text'] = $this->view->getAuthor(); |
64 | 75 | } |
65 | 76 | |
66 | 77 | return $query; |
— | — | @@ -80,18 +91,18 @@ |
81 | 92 | global $wgLang; |
82 | 93 | switch( $name ) { |
83 | 94 | case 'cc_rev_id': |
84 | | - return $this->mView->skin->link( |
85 | | - SpecialPage::getTitleFor( 'Code', $this->mRepo->getName() . '/' . $value . '#code-comments' ), |
| 95 | + return $this->view->skin->link( |
| 96 | + SpecialPage::getTitleFor( 'Code', $this->repo->getName() . '/' . $value . '#code-comments' ), |
86 | 97 | htmlspecialchars( $value ) ); |
87 | 98 | case 'cr_status': |
88 | | - return $this->mView->skin->link( |
| 99 | + return $this->view->skin->link( |
89 | 100 | SpecialPage::getTitleFor( 'Code', |
90 | | - $this->mRepo->getName() . '/status/' . $value ), |
91 | | - htmlspecialchars( $this->mView->statusDesc( $value ) ) ); |
| 101 | + $this->repo->getName() . '/status/' . $value ), |
| 102 | + htmlspecialchars( $this->view->statusDesc( $value ) ) ); |
92 | 103 | case 'cc_user_text': |
93 | | - return $this->mView->skin->userLink( - 1, $value ); |
| 104 | + return $this->view->skin->userLink( - 1, $value ); |
94 | 105 | case 'cr_message': |
95 | | - return $this->mView->messageFragment( $value ); |
| 106 | + return $this->view->messageFragment( $value ); |
96 | 107 | case 'cc_text': |
97 | 108 | # Truncate this, blah blah... |
98 | 109 | return htmlspecialchars( $wgLang->truncate( $value, 300 ) ); |
— | — | @@ -102,6 +113,6 @@ |
103 | 114 | } |
104 | 115 | |
105 | 116 | function getTitle() { |
106 | | - return SpecialPage::getTitleFor( 'Code', $this->mRepo->getName() . '/comments' ); |
| 117 | + return SpecialPage::getTitleFor( 'Code', $this->repo->getName() . '/comments' ); |
107 | 118 | } |
108 | 119 | } |
Index: trunk/extensions/CodeReview/ui/CodeRevisionAuthorView.php |
— | — | @@ -1,24 +1,24 @@ |
2 | 2 | <?php |
3 | 3 | |
4 | 4 | class CodeRevisionAuthorView extends CodeRevisionListView { |
5 | | - function __construct( $repoName, $author ) { |
6 | | - parent::__construct( $repoName ); |
7 | | - $this->mAuthor = $author; |
8 | | - $this->mUser = $this->mRepo->authorWikiUser( $author ); |
9 | | - $this->mAppliedFilter = wfMsg( 'code-revfilter-cr_author', $author ); |
| 5 | + function __construct( $repo, $author ) { |
| 6 | + parent::__construct( $repo ); |
| 7 | + $this->author = $author; |
| 8 | + $this->user = $this->repo->authorWikiUser( $author ); |
| 9 | + $this->appliedFilter = wfMsg( 'code-revfilter-cr_author', $author ); |
10 | 10 | } |
11 | 11 | |
12 | 12 | function getPager() { |
13 | | - return new SvnRevAuthorTablePager( $this, $this->mAuthor ); |
| 13 | + return new SvnRevAuthorTablePager( $this, $this->author ); |
14 | 14 | } |
15 | 15 | |
16 | 16 | function linkStatus() { |
17 | | - if ( !$this->mUser ) |
| 17 | + if ( !$this->user ) |
18 | 18 | return wfMsg( 'code-author-orphan' ); |
19 | 19 | |
20 | 20 | return wfMsgHtml( 'code-author-haslink', |
21 | | - $this->skin->userLink( $this->mUser->getId(), $this->mUser->getName() ) . |
22 | | - $this->skin->userToolLinks( $this->mUser->getId(), $this->mUser->getName() ) ); |
| 21 | + $this->skin->userLink( $this->user->getId(), $this->user->getName() ) . |
| 22 | + $this->skin->userToolLinks( $this->user->getId(), $this->user->getName() ) ); |
23 | 23 | } |
24 | 24 | |
25 | 25 | function execute() { |
— | — | @@ -27,17 +27,17 @@ |
28 | 28 | $linkInfo = $this->linkStatus(); |
29 | 29 | |
30 | 30 | if ( $wgUser->isAllowed( 'codereview-link-user' ) ) { |
31 | | - $repo = $this->mRepo->getName(); |
32 | | - $page = SpecialPage::getTitleFor( 'Code', "$repo/author/$this->mAuthor/link" ); |
| 31 | + $repo = $this->repo->getName(); |
| 32 | + $page = SpecialPage::getTitleFor( 'Code', "$repo/author/$this->author/link" ); |
33 | 33 | $linkInfo .= ' (' . $this->skin->link( $page, |
34 | | - wfMsg( 'code-author-' . ( $this->mUser ? 'un':'' ) . 'link' ) ) . ')' ; |
| 34 | + wfMsg( 'code-author-' . ( $this->user ? 'un':'' ) . 'link' ) ) . ')' ; |
35 | 35 | } |
36 | 36 | |
37 | | - $repoLink = $wgUser->getSkin()->link( SpecialPage::getTitleFor( 'Code', $this->mRepo->getName() ), |
38 | | - htmlspecialchars( $this->mRepo->getName() ) ); |
| 37 | + $repoLink = $wgUser->getSkin()->link( SpecialPage::getTitleFor( 'Code', $this->repo->getName() ), |
| 38 | + htmlspecialchars( $this->repo->getName() ) ); |
39 | 39 | $fields = array( |
40 | 40 | 'code-rev-repo' => $repoLink, |
41 | | - 'code-rev-author' => $this->authorLink( $this->mAuthor ), |
| 41 | + 'code-rev-author' => $this->authorLink( $this->author ), |
42 | 42 | ); |
43 | 43 | |
44 | 44 | $wgOut->addHTML( $this->formatMetaData( $fields ) . $linkInfo ); |
— | — | @@ -49,17 +49,17 @@ |
50 | 50 | class SvnRevAuthorTablePager extends SvnRevTablePager { |
51 | 51 | function __construct( $view, $author ) { |
52 | 52 | parent::__construct( $view ); |
53 | | - $this->mAuthor = $author; |
| 53 | + $this->author = $author; |
54 | 54 | } |
55 | 55 | |
56 | 56 | function getQueryInfo() { |
57 | 57 | $info = parent::getQueryInfo(); |
58 | | - $info['conds']['cr_author'] = $this->mAuthor; // fixme: normalize input? |
| 58 | + $info['conds']['cr_author'] = $this->author; // fixme: normalize input? |
59 | 59 | return $info; |
60 | 60 | } |
61 | 61 | |
62 | 62 | function getTitle() { |
63 | | - $repo = $this->mRepo->getName(); |
64 | | - return SpecialPage::getTitleFor( 'Code', "$repo/author/$this->mAuthor" ); |
| 63 | + $repo = $this->repo->getName(); |
| 64 | + return SpecialPage::getTitleFor( 'Code', "$repo/author/$this->author" ); |
65 | 65 | } |
66 | 66 | } |
Index: trunk/extensions/CodeReview/ui/CodeRepoStatsView.php |
— | — | @@ -5,14 +5,14 @@ |
6 | 6 | |
7 | 7 | function __construct( $repoName ) { |
8 | 8 | parent::__construct(); |
9 | | - $this->mRepo = CodeRepository::newFromName( $repoName ); |
| 9 | + $this->repo = CodeRepository::newFromName( $repoName ); |
10 | 10 | } |
11 | 11 | |
12 | 12 | function execute() { |
13 | 13 | global $wgOut, $wgLang; |
14 | 14 | |
15 | | - $stats = RepoStats::newFromRepo( $this->mRepo ); |
16 | | - $repoName = $this->mRepo->getName(); |
| 15 | + $stats = RepoStats::newFromRepo( $this->repo ); |
| 16 | + $repoName = $this->repo->getName(); |
17 | 17 | $wgOut->wrapWikiMsg( '<h2 id="stats-main">$1</h2>', array( 'code-stats-header', $repoName ) ); |
18 | 18 | $wgOut->addWikiMsg( 'code-stats-main', |
19 | 19 | $wgLang->timeanddate( $stats->time, true ), |
Index: trunk/extensions/CodeReview/ui/SpecialCode.php |
— | — | @@ -129,7 +129,7 @@ |
130 | 130 | |
131 | 131 | // If a repository was specified, but it does not exist, redirect to the |
132 | 132 | // repository list with an appropriate message. |
133 | | - if ( !$view->mRepo ) { |
| 133 | + if ( !$view->repo ) { |
134 | 134 | $view = new CodeRepoListView(); |
135 | 135 | global $wgOut; |
136 | 136 | $wgOut->addWikiMsg( 'code-repo-not-found', wfEscapeWikiText( $params[0] ) ); |
Index: trunk/extensions/CodeReview/ui/CodeStatusChangeListView.php |
— | — | @@ -2,11 +2,11 @@ |
3 | 3 | |
4 | 4 | // Special:Code/MediaWiki |
5 | 5 | class CodeStatusChangeListView extends CodeView { |
6 | | - public $mRepo; |
| 6 | + public $repo; |
7 | 7 | |
8 | 8 | function __construct( $repoName ) { |
9 | 9 | parent::__construct(); |
10 | | - $this->mRepo = CodeRepository::newFromName( $repoName ); |
| 10 | + $this->repo = CodeRepository::newFromName( $repoName ); |
11 | 11 | } |
12 | 12 | |
13 | 13 | function execute() { |
— | — | @@ -27,7 +27,7 @@ |
28 | 28 | } |
29 | 29 | |
30 | 30 | function getRepo() { |
31 | | - return $this->mRepo; |
| 31 | + return $this->repo; |
32 | 32 | } |
33 | 33 | } |
34 | 34 | |
— | — | @@ -44,7 +44,7 @@ |
45 | 45 | return array( |
46 | 46 | 'tables' => array( 'code_prop_changes', 'code_rev' ), |
47 | 47 | 'fields' => array_keys( $this->getFieldNames() ), |
48 | | - 'conds' => array( 'cpc_repo_id' => $this->mRepo->getId(), 'cpc_attrib' => 'status' ), |
| 48 | + 'conds' => array( 'cpc_repo_id' => $this->repo->getId(), 'cpc_attrib' => 'status' ), |
49 | 49 | 'join_conds' => array( |
50 | 50 | 'code_rev' => array( 'LEFT JOIN', 'cpc_repo_id = cr_repo_id AND cpc_rev_id = cr_id' ) |
51 | 51 | ) |
— | — | @@ -67,20 +67,20 @@ |
68 | 68 | function formatValue( $name, $value ) { |
69 | 69 | switch( $name ) { |
70 | 70 | case 'cpc_rev_id': |
71 | | - return $this->mView->skin->link( |
72 | | - SpecialPage::getTitleFor( 'Code', $this->mRepo->getName() . '/' . $value . '#code-changes' ), |
| 71 | + return $this->view->skin->link( |
| 72 | + SpecialPage::getTitleFor( 'Code', $this->repo->getName() . '/' . $value . '#code-changes' ), |
73 | 73 | htmlspecialchars( $value ) ); |
74 | 74 | case 'cr_author': |
75 | | - return $this->mView->authorLink( $value ); |
| 75 | + return $this->view->authorLink( $value ); |
76 | 76 | case 'cr_message': |
77 | | - return $this->mView->messageFragment( $value ); |
| 77 | + return $this->view->messageFragment( $value ); |
78 | 78 | case 'cr_status': |
79 | | - return $this->mView->skin->link( |
| 79 | + return $this->view->skin->link( |
80 | 80 | SpecialPage::getTitleFor( 'Code', |
81 | | - $this->mRepo->getName() . '/status/' . $value ), |
82 | | - htmlspecialchars( $this->mView->statusDesc( $value ) ) ); |
| 81 | + $this->repo->getName() . '/status/' . $value ), |
| 82 | + htmlspecialchars( $this->view->statusDesc( $value ) ) ); |
83 | 83 | case 'cpc_user_text': |
84 | | - return $this->mView->skin->userLink( - 1, $value ); |
| 84 | + return $this->view->skin->userLink( - 1, $value ); |
85 | 85 | case 'cpc_removed': |
86 | 86 | return wfMsgHtml( $value ? "code-status-$value" : "code-status-new" ); |
87 | 87 | case 'cpc_added': |
— | — | @@ -92,6 +92,6 @@ |
93 | 93 | } |
94 | 94 | |
95 | 95 | function getTitle() { |
96 | | - return SpecialPage::getTitleFor( 'Code', $this->mRepo->getName() . '/statuschanges' ); |
| 96 | + return SpecialPage::getTitleFor( 'Code', $this->repo->getName() . '/statuschanges' ); |
97 | 97 | } |
98 | 98 | } |
Index: trunk/extensions/CodeReview/ui/CodeRevisionCommitter.php |
— | — | @@ -9,13 +9,13 @@ |
10 | 10 | parent::execute(); |
11 | 11 | return; |
12 | 12 | } |
13 | | - if ( !$this->mRev ) { |
| 13 | + if ( !$this->rev ) { |
14 | 14 | parent::execute(); |
15 | 15 | return; |
16 | 16 | } |
17 | 17 | |
18 | | - $commentId = $this->revisionUpdate( $this->mStatus, $this->mAddTags, $this->mRemoveTags, |
19 | | - $this->mSignoffFlags, $this->mStrikeSignoffs, $this->mAddReference, $this->mRemoveReferences, |
| 18 | + $commentId = $this->revisionUpdate( $this->status, $this->addTags, $this->removeTags, |
| 19 | + $this->signoffFlags, $this->strikeSignoffs, $this->addReference, $this->removeReferences, |
20 | 20 | $this->text, $wgRequest->getIntOrNull( 'wpParent' ), |
21 | 21 | $wgRequest->getInt( 'wpReview' ) |
22 | 22 | ); |
— | — | @@ -31,18 +31,18 @@ |
32 | 32 | if ( !$redirTarget ) { |
33 | 33 | // Was "next & unresolved" clicked? |
34 | 34 | if ( $this->jumpToNext ) { |
35 | | - $next = $this->mRev->getNextUnresolved( $this->mPath ); |
| 35 | + $next = $this->rev->getNextUnresolved( $this->path ); |
36 | 36 | if ( $next ) { |
37 | | - $redirTarget = SpecialPage::getTitleFor( 'Code', $this->mRepo->getName() . '/' . $next ); |
| 37 | + $redirTarget = SpecialPage::getTitleFor( 'Code', $this->repo->getName() . '/' . $next ); |
38 | 38 | } else { |
39 | | - $redirTarget = SpecialPage::getTitleFor( 'Code', $this->mRepo->getName() ); |
| 39 | + $redirTarget = SpecialPage::getTitleFor( 'Code', $this->repo->getName() ); |
40 | 40 | } |
41 | 41 | } else { |
42 | 42 | # $redirTarget already set for comments |
43 | 43 | $redirTarget = $this->revLink(); |
44 | 44 | } |
45 | 45 | } |
46 | | - $wgOut->redirect( $redirTarget->getFullUrl( array( 'path' => $this->mPath ) ) ); |
| 46 | + $wgOut->redirect( $redirTarget->getFullUrl( array( 'path' => $this->path ) ) ); |
47 | 47 | } |
48 | 48 | |
49 | 49 | /** |
— | — | @@ -63,7 +63,7 @@ |
64 | 64 | public function revisionUpdate( $status, $addTags, $removeTags, $addSignoffs, $strikeSignoffs, |
65 | 65 | $addReferences, $removeReferences, $commentText, |
66 | 66 | $parent = null, $review = 0 ) { |
67 | | - if ( !$this->mRev ) { |
| 67 | + if ( !$this->rev ) { |
68 | 68 | return false; |
69 | 69 | } |
70 | 70 | |
— | — | @@ -74,8 +74,8 @@ |
75 | 75 | $dbw->begin(); |
76 | 76 | // Change the status if allowed |
77 | 77 | $statusChanged = false; |
78 | | - if ( $this->mRev->isValidStatus( $status ) && $this->validPost( 'codereview-set-status' ) ) { |
79 | | - $statusChanged = $this->mRev->setStatus( $status, $wgUser ); |
| 78 | + if ( $this->rev->isValidStatus( $status ) && $this->validPost( 'codereview-set-status' ) ) { |
| 79 | + $statusChanged = $this->rev->setStatus( $status, $wgUser ); |
80 | 80 | } |
81 | 81 | $validAddTags = $validRemoveTags = array(); |
82 | 82 | if ( count( $addTags ) && $this->validPost( 'codereview-add-tag' ) ) { |
— | — | @@ -86,23 +86,23 @@ |
87 | 87 | } |
88 | 88 | // If allowed to change any tags, then do so |
89 | 89 | if ( count( $validAddTags ) || count( $validRemoveTags ) ) { |
90 | | - $this->mRev->changeTags( $validAddTags, $validRemoveTags, $wgUser ); |
| 90 | + $this->rev->changeTags( $validAddTags, $validRemoveTags, $wgUser ); |
91 | 91 | } |
92 | 92 | // Add any signoffs |
93 | 93 | if ( count( $addSignoffs ) && $this->validPost( 'codereview-signoff' ) ) { |
94 | | - $this->mRev->addSignoff( $wgUser, $addSignoffs ); |
| 94 | + $this->rev->addSignoff( $wgUser, $addSignoffs ); |
95 | 95 | } |
96 | 96 | // Strike any signoffs |
97 | 97 | if ( count( $strikeSignoffs ) && $this->validPost( 'codereview-signoff' ) ) { |
98 | | - $this->mRev->strikeSignoffs( $wgUser, $strikeSignoffs ); |
| 98 | + $this->rev->strikeSignoffs( $wgUser, $strikeSignoffs ); |
99 | 99 | } |
100 | 100 | // Add reference if requested |
101 | 101 | if ( count( $addReferences ) && $this->validPost( 'codereview-associate' ) ) { |
102 | | - $this->mRev->addReferencesFrom( $addReferences ); |
| 102 | + $this->rev->addReferencesFrom( $addReferences ); |
103 | 103 | } |
104 | 104 | // Remove references if requested |
105 | 105 | if ( count( $removeReferences ) && $this->validPost( 'codereview-associate' ) ) { |
106 | | - $this->mRev->removeReferencesFrom( $removeReferences ); |
| 106 | + $this->rev->removeReferencesFrom( $removeReferences ); |
107 | 107 | } |
108 | 108 | |
109 | 109 | // Add any comments |
— | — | @@ -110,7 +110,7 @@ |
111 | 111 | $commentId = 0; |
112 | 112 | if ( strlen( $commentText ) && $this->validPost( 'codereview-post-comment' ) ) { |
113 | 113 | // $isPreview = $wgRequest->getCheck( 'wpPreview' ); |
114 | | - $commentId = $this->mRev->saveComment( $commentText, $review, $parent ); |
| 114 | + $commentId = $this->rev->saveComment( $commentText, $review, $parent ); |
115 | 115 | |
116 | 116 | $commentAdded = ($commentId !== 0); |
117 | 117 | } |
— | — | @@ -118,19 +118,19 @@ |
119 | 119 | |
120 | 120 | if ( $statusChanged || $commentAdded ) { |
121 | 121 | if ( $statusChanged && $commentAdded ) { |
122 | | - $url = $this->mRev->getFullUrl( $commentId ); |
123 | | - $this->mRev->emailNotifyUsersOfChanges( 'codereview-email-subj4', 'codereview-email-body4', |
124 | | - $wgUser->getName(), $this->mRev->getIdStringUnique(), $this->mRev->getOldStatus(), $this->mRev->getStatus(), |
| 122 | + $url = $this->rev->getFullUrl( $commentId ); |
| 123 | + $this->rev->emailNotifyUsersOfChanges( 'codereview-email-subj4', 'codereview-email-body4', |
| 124 | + $wgUser->getName(), $this->rev->getIdStringUnique(), $this->rev->getOldStatus(), $this->rev->getStatus(), |
125 | 125 | $url, $this->text |
126 | 126 | ); |
127 | 127 | } else if ( $statusChanged ) { |
128 | | - $this->mRev->emailNotifyUsersOfChanges( 'codereview-email-subj3', 'codereview-email-body3', |
129 | | - $wgUser->getName(), $this->mRev->getIdStringUnique(), $this->mRev->getOldStatus(), $this->mRev->getStatus() |
| 128 | + $this->rev->emailNotifyUsersOfChanges( 'codereview-email-subj3', 'codereview-email-body3', |
| 129 | + $wgUser->getName(), $this->rev->getIdStringUnique(), $this->rev->getOldStatus(), $this->rev->getStatus() |
130 | 130 | ); |
131 | 131 | } else if ( $commentAdded ) { |
132 | | - $url = $this->mRev->getFullUrl( $commentId ); |
133 | | - $this->mRev->emailNotifyUsersOfChanges( 'codereview-email-subj', 'codereview-email-body', |
134 | | - $wgUser->getName(), $url, $this->mRev->getIdStringUnique(), $this->text |
| 132 | + $url = $this->rev->getFullUrl( $commentId ); |
| 133 | + $this->rev->emailNotifyUsersOfChanges( 'codereview-email-subj', 'codereview-email-body', |
| 134 | + $wgUser->getName(), $url, $this->rev->getIdStringUnique(), $this->text |
135 | 135 | ); |
136 | 136 | } |
137 | 137 | } |
Index: trunk/extensions/CodeReview/ui/CodeRevisionListView.php |
— | — | @@ -5,29 +5,30 @@ |
6 | 6 | /** |
7 | 7 | * @var CodeRepository |
8 | 8 | */ |
9 | | - public $mRepo; |
10 | | - public $mPath, $batchForm; |
| 9 | + public $repo; |
11 | 10 | |
| 11 | + public $path, $batchForm; |
| 12 | + |
12 | 13 | /** |
13 | 14 | * @param $repo CodeRepository|String |
14 | 15 | */ |
15 | 16 | function __construct( $repo ) { |
16 | 17 | global $wgRequest; |
17 | 18 | parent::__construct(); |
18 | | - $this->mRepo = ( $repo instanceof CodeRepository ) |
| 19 | + $this->repo = ( $repo instanceof CodeRepository ) |
19 | 20 | ? $repo |
20 | 21 | : CodeRepository::newFromName( $repo ); |
21 | | - $this->mPath = htmlspecialchars( trim( $wgRequest->getVal( 'path' ) ) ); |
22 | | - if ( strlen( $this->mPath ) && $this->mPath[0] !== '/' ) { |
23 | | - $this->mPath = "/{$this->mPath}"; // make sure this is a valid path |
| 22 | + $this->path = htmlspecialchars( trim( $wgRequest->getVal( 'path' ) ) ); |
| 23 | + if ( strlen( $this->path ) && $this->path[0] !== '/' ) { |
| 24 | + $this->path = "/{$this->path}"; // make sure this is a valid path |
24 | 25 | } |
25 | | - $this->mAuthor = $wgRequest->getText( 'author' ); |
26 | | - $this->mAppliedFilter = null; |
| 26 | + $this->author = $wgRequest->getText( 'author' ); |
| 27 | + $this->appliedFilter = null; |
27 | 28 | } |
28 | 29 | |
29 | 30 | function execute() { |
30 | 31 | global $wgOut, $wgUser, $wgRequest, $wgLang; |
31 | | - if ( !$this->mRepo ) { |
| 32 | + if ( !$this->repo ) { |
32 | 33 | $view = new CodeRepoListView(); |
33 | 34 | $view->execute(); |
34 | 35 | return; |
— | — | @@ -88,9 +89,9 @@ |
89 | 90 | // Grab data from the DB |
90 | 91 | $dbr = wfGetDB( DB_SLAVE ); |
91 | 92 | $revObjects = array(); |
92 | | - $res = $dbr->select( 'code_rev', '*', array( 'cr_id' => $revisions, 'cr_repo_id' => $this->mRepo->getId() ), __METHOD__ ); |
| 93 | + $res = $dbr->select( 'code_rev', '*', array( 'cr_id' => $revisions, 'cr_repo_id' => $this->repo->getId() ), __METHOD__ ); |
93 | 94 | foreach ( $res as $row ) { |
94 | | - $revObjects[] = CodeRevision::newFromRow( $this->mRepo, $row ); |
| 95 | + $revObjects[] = CodeRevision::newFromRow( $this->repo, $row ); |
95 | 96 | } |
96 | 97 | |
97 | 98 | if ( $wgUser->isAllowed( 'codereview-add-tag' ) && |
— | — | @@ -159,26 +160,26 @@ |
160 | 161 | */ |
161 | 162 | function showForm() { |
162 | 163 | global $wgScript; |
163 | | - if ( $this->mAuthor ) { |
164 | | - $special = SpecialPage::getTitleFor( 'Code', $this->mRepo->getName() . '/author/' . $this->mAuthor ); |
| 164 | + if ( $this->author ) { |
| 165 | + $special = SpecialPage::getTitleFor( 'Code', $this->repo->getName() . '/author/' . $this->author ); |
165 | 166 | } else { |
166 | | - $special = SpecialPage::getTitleFor( 'Code', $this->mRepo->getName() . '/path' ); |
| 167 | + $special = SpecialPage::getTitleFor( 'Code', $this->repo->getName() . '/path' ); |
167 | 168 | } |
168 | 169 | |
169 | 170 | $ret = Xml::openElement( 'form', array( 'action' => $wgScript, 'method' => 'get' ) ) . |
170 | 171 | "<fieldset><legend>" . wfMsgHtml( 'code-pathsearch-legend' ) . "</legend>" . |
171 | 172 | '<table width="100%"><tr><td>' . |
172 | | - Xml::inputlabel( wfMsg( "code-pathsearch-path" ), 'path', 'path', 55, $this->mPath ) . |
| 173 | + Xml::inputlabel( wfMsg( "code-pathsearch-path" ), 'path', 'path', 55, $this->path ) . |
173 | 174 | ' ' . Xml::submitButton( wfMsg( 'allpagessubmit' ) ) . |
174 | 175 | '</td>'; |
175 | 176 | |
176 | | - if ( strlen( $this->mAppliedFilter ) ) { |
| 177 | + if ( strlen( $this->appliedFilter ) ) { |
177 | 178 | $ret .= '<td>' . |
178 | 179 | Xml::label( wfMsg( 'code-pathsearch-filter' ), 'revFilter' ) . ' <strong>' . |
179 | | - Xml::span( $this->mAppliedFilter, '' ) . '</strong> ' . |
| 180 | + Xml::span( $this->appliedFilter, '' ) . '</strong> ' . |
180 | 181 | Xml::submitButton( wfMsg( 'code-revfilter-clear' ) ) . |
181 | 182 | '</td>' . |
182 | | - Html::hidden( 'title', SpecialPage::getTitleFor( 'Code', $this->mRepo->getName() ) ); |
| 183 | + Html::hidden( 'title', SpecialPage::getTitleFor( 'Code', $this->repo->getName() ) ); |
183 | 184 | } else { |
184 | 185 | $ret .= Html::hidden( 'title', $special->getPrefixedDBKey() ) ; |
185 | 186 | } |
— | — | @@ -218,7 +219,7 @@ |
219 | 220 | } |
220 | 221 | |
221 | 222 | function getRepo() { |
222 | | - return $this->mRepo; |
| 223 | + return $this->repo; |
223 | 224 | } |
224 | 225 | } |
225 | 226 | |
— | — | @@ -226,11 +227,11 @@ |
227 | 228 | class SvnRevTablePager extends SvnTablePager { |
228 | 229 | |
229 | 230 | function getSVNPath() { |
230 | | - return $this->mView->mPath; |
| 231 | + return $this->view->path; |
231 | 232 | } |
232 | 233 | |
233 | 234 | function getDefaultSort() { |
234 | | - return strlen( $this->mView->mPath ) ? 'cp_rev_id' : 'cr_id'; |
| 235 | + return strlen( $this->view->path ) ? 'cp_rev_id' : 'cr_id'; |
235 | 236 | } |
236 | 237 | |
237 | 238 | function getQueryInfo() { |
— | — | @@ -241,7 +242,7 @@ |
242 | 243 | 'tables' => array( 'code_paths', 'code_rev', 'code_comment' ), |
243 | 244 | 'fields' => $this->getSelectFields(), |
244 | 245 | 'conds' => array( |
245 | | - 'cp_repo_id' => $this->mRepo->getId(), |
| 246 | + 'cp_repo_id' => $this->repo->getId(), |
246 | 247 | 'cp_path' => $this->getSVNPath(), |
247 | 248 | ), |
248 | 249 | 'options' => array( 'GROUP BY' => $defaultSort, 'USE INDEX' => array( 'code_path' => 'cp_repo_id' ) ), |
— | — | @@ -255,15 +256,15 @@ |
256 | 257 | $query = array( |
257 | 258 | 'tables' => array( 'code_rev', 'code_comment' ), |
258 | 259 | 'fields' => $this->getSelectFields(), |
259 | | - 'conds' => array( 'cr_repo_id' => $this->mRepo->getId() ), |
| 260 | + 'conds' => array( 'cr_repo_id' => $this->repo->getId() ), |
260 | 261 | 'options' => array( 'GROUP BY' => $defaultSort ), |
261 | 262 | 'join_conds' => array( |
262 | 263 | 'code_comment' => array( 'LEFT JOIN', 'cc_repo_id = cr_repo_id AND cc_rev_id = cr_id' ), |
263 | 264 | ) |
264 | 265 | ); |
265 | 266 | } |
266 | | - if( $this->mView->mAuthor ) { |
267 | | - $query['conds']['cr_author'] = $this->mView->mAuthor; |
| 267 | + if( $this->view->author ) { |
| 268 | + $query['conds']['cr_author'] = $this->view->author; |
268 | 269 | } |
269 | 270 | return $query; |
270 | 271 | } |
— | — | @@ -301,7 +302,7 @@ |
302 | 303 | 'cr_timestamp' => wfMsg( 'code-field-timestamp' ), |
303 | 304 | ); |
304 | 305 | # Only show checkboxen as needed |
305 | | - if ( $this->mView->batchForm ) { |
| 306 | + if ( $this->view->batchForm ) { |
306 | 307 | $fields = array( 'selectforchange' => wfMsg( 'code-field-select' ) ) + $fields; |
307 | 308 | } |
308 | 309 | return $fields; |
— | — | @@ -311,7 +312,7 @@ |
312 | 313 | |
313 | 314 | function formatRevValue( $name, $value, $row ) { |
314 | 315 | global $wgLang; |
315 | | - $pathQuery = ( strlen( $this->mView->mPath ) ) ? array( 'path' => $this->mView->mPath ) : array(); |
| 316 | + $pathQuery = ( strlen( $this->view->path ) ) ? array( 'path' => $this->view->path ) : array(); |
316 | 317 | |
317 | 318 | switch( $name ) { |
318 | 319 | case 'selectforchange': |
— | — | @@ -319,37 +320,37 @@ |
320 | 321 | return Xml::check( "wpRevisionSelected[]", false, array( 'value' => $row->$sort ) ); |
321 | 322 | case 'cp_rev_id': |
322 | 323 | case 'cr_id': |
323 | | - return $this->mView->skin->link( |
324 | | - SpecialPage::getTitleFor( 'Code', $this->mRepo->getName() . '/' . $value ), |
| 324 | + return $this->view->skin->link( |
| 325 | + SpecialPage::getTitleFor( 'Code', $this->repo->getName() . '/' . $value ), |
325 | 326 | htmlspecialchars( $value ), |
326 | 327 | array(), |
327 | 328 | $pathQuery |
328 | 329 | ); |
329 | 330 | case 'cr_status': |
330 | | - return $this->mView->skin->link( |
331 | | - SpecialPage::getTitleFor( 'Code', $this->mRepo->getName() . '/status/' . $value ), |
332 | | - htmlspecialchars( $this->mView->statusDesc( $value ) ), |
| 331 | + return $this->view->skin->link( |
| 332 | + SpecialPage::getTitleFor( 'Code', $this->repo->getName() . '/status/' . $value ), |
| 333 | + htmlspecialchars( $this->view->statusDesc( $value ) ), |
333 | 334 | array(), |
334 | 335 | $pathQuery |
335 | 336 | ); |
336 | 337 | case 'cr_author': |
337 | | - return $this->mView->authorLink( $value, $pathQuery ); |
| 338 | + return $this->view->authorLink( $value, $pathQuery ); |
338 | 339 | case 'cr_message': |
339 | | - return $this->mView->messageFragment( $value ); |
| 340 | + return $this->view->messageFragment( $value ); |
340 | 341 | case 'cr_timestamp': |
341 | 342 | return $wgLang->timeanddate( $value, true ); |
342 | 343 | case 'comments': |
343 | 344 | if ( $value ) { |
344 | | - $special = SpecialPage::getTitleFor( 'Code', $this->mRepo->getName() . '/' . $row-> { $this->getDefaultSort() } ); |
| 345 | + $special = SpecialPage::getTitleFor( 'Code', $this->repo->getName() . '/' . $row-> { $this->getDefaultSort() } ); |
345 | 346 | $special->setFragment( '#code-comments' ); |
346 | | - return $this->mView->skin->link( $special, htmlspecialchars( $value ) ); |
| 347 | + return $this->view->skin->link( $special, htmlspecialchars( $value ) ); |
347 | 348 | } else { |
348 | 349 | return '-'; |
349 | 350 | } |
350 | 351 | case 'cr_path': |
351 | 352 | return Xml::openElement( 'div', array( 'title' => (string)$value ) ) . |
352 | | - $this->mView->skin->link( |
353 | | - SpecialPage::getTitleFor( 'Code', $this->mRepo->getName() . '/path' ), |
| 353 | + $this->view->skin->link( |
| 354 | + SpecialPage::getTitleFor( 'Code', $this->repo->getName() . '/path' ), |
354 | 355 | $wgLang->truncate( (string)$value, 50 ), |
355 | 356 | array( 'title' => (string)$value ), |
356 | 357 | array( 'path' => (string)$value ) ) . "</div>"; |
— | — | @@ -357,6 +358,6 @@ |
358 | 359 | } |
359 | 360 | |
360 | 361 | function getTitle() { |
361 | | - return SpecialPage::getTitleFor( 'Code', $this->mRepo->getName() ); |
| 362 | + return SpecialPage::getTitleFor( 'Code', $this->repo->getName() ); |
362 | 363 | } |
363 | 364 | } |
Index: trunk/extensions/CodeReview/ui/CodeRevisionTagView.php |
— | — | @@ -3,18 +3,18 @@ |
4 | 4 | class CodeRevisionTagView extends CodeRevisionListView { |
5 | 5 | function __construct( $repoName, $tag ) { |
6 | 6 | parent::__construct( $repoName ); |
7 | | - $this->mTag = $tag; |
| 7 | + $this->tag = $tag; |
8 | 8 | } |
9 | 9 | |
10 | 10 | function getPager() { |
11 | | - return new SvnRevTagTablePager( $this, $this->mTag ); |
| 11 | + return new SvnRevTagTablePager( $this, $this->tag ); |
12 | 12 | } |
13 | 13 | } |
14 | 14 | |
15 | 15 | class SvnRevTagTablePager extends SvnRevTablePager { |
16 | 16 | function __construct( $view, $tag ) { |
17 | 17 | parent::__construct( $view ); |
18 | | - $this->mTag = $tag; |
| 18 | + $this->tag = $tag; |
19 | 19 | } |
20 | 20 | |
21 | 21 | function getDefaultSort() { |
— | — | @@ -28,12 +28,12 @@ |
29 | 29 | array_unshift( $info['tables'], 'code_tags' ); |
30 | 30 | $info['conds'][] = 'cr_repo_id=ct_repo_id'; |
31 | 31 | $info['conds'][] = 'cr_id=ct_rev_id'; |
32 | | - $info['conds']['ct_tag'] = $this->mTag; // fixme: normalize input? |
| 32 | + $info['conds']['ct_tag'] = $this->tag; // fixme: normalize input? |
33 | 33 | return $info; |
34 | 34 | } |
35 | 35 | |
36 | 36 | function getTitle() { |
37 | | - $repo = $this->mRepo->getName(); |
38 | | - return SpecialPage::getTitleFor( 'Code', "$repo/tag/$this->mTag" ); |
| 37 | + $repo = $this->repo->getName(); |
| 38 | + return SpecialPage::getTitleFor( 'Code', "$repo/tag/$this->tag" ); |
39 | 39 | } |
40 | 40 | } |
Index: trunk/extensions/CodeReview/ui/CodeRevisionView.php |
— | — | @@ -12,67 +12,67 @@ |
13 | 13 | function __construct( $repo, $rev, $replyTarget = null ) { |
14 | 14 | global $wgRequest; |
15 | 15 | parent::__construct(); |
16 | | - $this->mRepo = ( $repo instanceof CodeRepository ) |
| 16 | + $this->repo = ( $repo instanceof CodeRepository ) |
17 | 17 | ? $repo |
18 | 18 | : CodeRepository::newFromName( $repo ); |
19 | 19 | |
20 | 20 | if ( $rev instanceof CodeRevision ) { |
21 | | - $this->mRevId = $rev->getId(); |
22 | | - $this->mRev = $rev; |
| 21 | + $this->revId = $rev->getId(); |
| 22 | + $this->rev = $rev; |
23 | 23 | } else { |
24 | | - $this->mRevId = intval( ltrim( $rev, 'r' ) ); |
25 | | - $this->mRev = $this->mRepo |
26 | | - ? $this->mRepo->getRevision( $this->mRevId ) |
| 24 | + $this->revId = intval( ltrim( $rev, 'r' ) ); |
| 25 | + $this->rev = $this->repo |
| 26 | + ? $this->repo->getRevision( $this->revId ) |
27 | 27 | : null; |
28 | 28 | } |
29 | 29 | |
30 | | - $this->mPreviewText = false; |
| 30 | + $this->previewText = false; |
31 | 31 | # Search path for navigation links |
32 | | - $this->mPath = htmlspecialchars( trim( $wgRequest->getVal( 'path' ) ) ); |
33 | | - if ( strlen( $this->mPath ) && $this->mPath[0] !== '/' ) { |
34 | | - $this->mPath = "/{$this->mPath}"; // make sure this is a valid path |
| 32 | + $this->path = htmlspecialchars( trim( $wgRequest->getVal( 'path' ) ) ); |
| 33 | + if ( strlen( $this->path ) && $this->path[0] !== '/' ) { |
| 34 | + $this->path = "/{$this->path}"; // make sure this is a valid path |
35 | 35 | } |
36 | 36 | # URL params... |
37 | | - $this->mAddTags = $wgRequest->getText( 'wpTag' ); |
38 | | - $this->mRemoveTags = $wgRequest->getText( 'wpRemoveTag' ); |
39 | | - $this->mStatus = $wgRequest->getText( 'wpStatus' ); |
| 37 | + $this->addTags = $wgRequest->getText( 'wpTag' ); |
| 38 | + $this->removeTags = $wgRequest->getText( 'wpRemoveTag' ); |
| 39 | + $this->status = $wgRequest->getText( 'wpStatus' ); |
40 | 40 | $this->jumpToNext = $wgRequest->getCheck( 'wpSaveAndNext' ); |
41 | | - $this->mReplyTarget = $replyTarget ? |
| 41 | + $this->replyTarget = $replyTarget ? |
42 | 42 | (int)$replyTarget : $wgRequest->getIntOrNull( 'wpParent' ); |
43 | | - $this->text = $wgRequest->getText( "wpReply{$this->mReplyTarget}" ); |
44 | | - $this->mSkipCache = ( $wgRequest->getVal( 'action' ) == 'purge' ); |
| 43 | + $this->text = $wgRequest->getText( "wpReply{$this->replyTarget}" ); |
| 44 | + $this->skipCache = ( $wgRequest->getVal( 'action' ) == 'purge' ); |
45 | 45 | # Make tag arrays |
46 | | - $this->mAddTags = $this->splitTags( $this->mAddTags ); |
47 | | - $this->mRemoveTags = $this->splitTags( $this->mRemoveTags ); |
48 | | - $this->mSignoffFlags = $wgRequest->getCheck( 'wpSignoff' ) ? |
| 46 | + $this->addTags = $this->splitTags( $this->addTags ); |
| 47 | + $this->removeTags = $this->splitTags( $this->removeTags ); |
| 48 | + $this->signoffFlags = $wgRequest->getCheck( 'wpSignoff' ) ? |
49 | 49 | $wgRequest->getArray( 'wpSignoffFlags' ) : array(); |
50 | | - $this->mSelectedSignoffs = $wgRequest->getArray( 'wpSignoffs' ); |
51 | | - $this->mStrikeSignoffs = $wgRequest->getCheck( 'wpStrikeSignoffs' ) ? |
52 | | - $this->mSelectedSignoffs : array(); |
53 | | - $this->mAddReference = $wgRequest->getCheck( 'wpAddReferenceSubmit' ) ? |
| 50 | + $this->selectedSignoffs = $wgRequest->getArray( 'wpSignoffs' ); |
| 51 | + $this->strikeSignoffs = $wgRequest->getCheck( 'wpStrikeSignoffs' ) ? |
| 52 | + $this->selectedSignoffs : array(); |
| 53 | + $this->addReference = $wgRequest->getCheck( 'wpAddReferenceSubmit' ) ? |
54 | 54 | $wgRequest->getIntArray( 'wpAddReference', array() ) : array(); |
55 | | - $this->mRemoveReferences = $wgRequest->getCheck( 'wpRemoveReferences' ) ? |
| 55 | + $this->removeReferences = $wgRequest->getCheck( 'wpRemoveReferences' ) ? |
56 | 56 | $wgRequest->getIntArray( 'wpReferences', array() ) : array(); |
57 | 57 | } |
58 | 58 | |
59 | 59 | function execute() { |
60 | 60 | global $wgOut, $wgLang; |
61 | | - if ( !$this->mRepo ) { |
| 61 | + if ( !$this->repo ) { |
62 | 62 | $view = new CodeRepoListView(); |
63 | 63 | $view->execute(); |
64 | 64 | return; |
65 | 65 | } |
66 | | - if ( !$this->mRev ) { |
67 | | - if ( $this->mRevId !== 0 ) { |
68 | | - $wgOut->addWikiMsg( 'code-rev-not-found', $this->mRevId ); |
| 66 | + if ( !$this->rev ) { |
| 67 | + if ( $this->revId !== 0 ) { |
| 68 | + $wgOut->addWikiMsg( 'code-rev-not-found', $this->revId ); |
69 | 69 | } |
70 | 70 | |
71 | | - $view = new CodeRevisionListView( $this->mRepo->getName() ); |
| 71 | + $view = new CodeRevisionListView( $this->repo->getName() ); |
72 | 72 | $view->execute(); |
73 | 73 | return; |
74 | 74 | } |
75 | | - if ( $this->mStatus == '' ) { |
76 | | - $this->mStatus = $this->mRev->getStatus(); |
| 75 | + if ( $this->status == '' ) { |
| 76 | + $this->status = $this->rev->getStatus(); |
77 | 77 | } |
78 | 78 | |
79 | 79 | $redirectOnPost = $this->checkPostings(); |
— | — | @@ -81,16 +81,16 @@ |
82 | 82 | return; |
83 | 83 | } |
84 | 84 | |
85 | | - $pageTitle = $this->mRepo->getName() . wfMsg( 'word-separator' ) . $this->mRev->getIdString(); |
86 | | - $htmlTitle = $this->mRev->getIdString() . wfMsg( 'word-separator' ) . $this->mRepo->getName(); |
| 85 | + $pageTitle = $this->repo->getName() . wfMsg( 'word-separator' ) . $this->rev->getIdString(); |
| 86 | + $htmlTitle = $this->rev->getIdString() . wfMsg( 'word-separator' ) . $this->repo->getName(); |
87 | 87 | $wgOut->setPageTitle( wfMsgHtml( 'code-rev-title', $pageTitle ) ); |
88 | 88 | $wgOut->setHTMLTitle( wfMsgHtml( 'code-rev-title', $htmlTitle ) ); |
89 | 89 | |
90 | | - $repoLink = $this->skin->link( SpecialPage::getTitleFor( 'Code', $this->mRepo->getName() ), |
91 | | - htmlspecialchars( $this->mRepo->getName() ) ); |
| 90 | + $repoLink = $this->skin->link( SpecialPage::getTitleFor( 'Code', $this->repo->getName() ), |
| 91 | + htmlspecialchars( $this->repo->getName() ) ); |
92 | 92 | $revText = $this->navigationLinks(); |
93 | 93 | $paths = ''; |
94 | | - $modifiedPaths = $this->mRev->getModifiedPaths(); |
| 94 | + $modifiedPaths = $this->rev->getModifiedPaths(); |
95 | 95 | foreach ( $modifiedPaths as $row ) { |
96 | 96 | $paths .= $this->formatPathLine( $row->cp_path, $row->cp_action ); |
97 | 97 | } |
— | — | @@ -105,18 +105,18 @@ |
106 | 106 | $fields = array( |
107 | 107 | 'code-rev-repo' => $repoLink, |
108 | 108 | 'code-rev-rev' => $revText, |
109 | | - 'code-rev-date' => $wgLang->timeanddate( $this->mRev->getTimestamp(), true ), |
110 | | - 'code-rev-author' => $this->authorLink( $this->mRev->getAuthor() ), |
| 109 | + 'code-rev-date' => $wgLang->timeanddate( $this->rev->getTimestamp(), true ), |
| 110 | + 'code-rev-author' => $this->authorLink( $this->rev->getAuthor() ), |
111 | 111 | 'code-rev-status' => $this->statusForm() . $commentsLink, |
112 | 112 | 'code-rev-tags' => $this->tagForm(), |
113 | | - 'code-rev-message' => $this->formatMessage( $this->mRev->getMessage() ), |
| 113 | + 'code-rev-message' => $this->formatMessage( $this->rev->getMessage() ), |
114 | 114 | 'code-rev-paths' => $paths, |
115 | 115 | ); |
116 | | - $special = SpecialPage::getTitleFor( 'Code', $this->mRepo->getName() . '/' . $this->mRev->getId() ); |
| 116 | + $special = SpecialPage::getTitleFor( 'Code', $this->repo->getName() . '/' . $this->rev->getId() ); |
117 | 117 | |
118 | 118 | $html = ''; |
119 | | - if ( $this->mPath != '' ) { |
120 | | - $html .= wfMsgExt( 'code-browsing-path', 'parse', $this->mPath ); |
| 119 | + if ( $this->path != '' ) { |
| 120 | + $html .= wfMsgExt( 'code-browsing-path', 'parse', $this->path ); |
121 | 121 | } |
122 | 122 | # Output form |
123 | 123 | $html .= Xml::openElement( 'form', array( 'action' => $special->getLocalUrl(), 'method' => 'post' ) ); |
— | — | @@ -127,7 +127,7 @@ |
128 | 128 | |
129 | 129 | $html .= $this->formatMetaData( $fields ); |
130 | 130 | # Output diff |
131 | | - if ( $this->mRev->isDiffable() ) { |
| 131 | + if ( $this->rev->isDiffable() ) { |
132 | 132 | $diffHtml = $this->formatDiff(); |
133 | 133 | $html .= |
134 | 134 | "<h2>" . wfMsgHtml( 'code-rev-diff' ) . |
— | — | @@ -148,8 +148,8 @@ |
149 | 149 | "</h2>\n" . $comments; |
150 | 150 | } |
151 | 151 | |
152 | | - if ( $this->mReplyTarget ) { |
153 | | - $id = intval( $this->mReplyTarget ); |
| 152 | + if ( $this->replyTarget ) { |
| 153 | + $id = intval( $this->replyTarget ); |
154 | 154 | $html .= Html::inlineScript( |
155 | 155 | "addOnloadHook(function(){document.getElementById('wpReplyTo$id').focus();});" |
156 | 156 | ) . "\n"; |
— | — | @@ -171,21 +171,21 @@ |
172 | 172 | protected function navigationLinks() { |
173 | 173 | global $wgLang; |
174 | 174 | |
175 | | - $rev = $this->mRev->getId(); |
176 | | - $prev = $this->mRev->getPrevious( $this->mPath ); |
177 | | - $next = $this->mRev->getNext( $this->mPath ); |
178 | | - $repo = $this->mRepo->getName(); |
| 175 | + $rev = $this->rev->getId(); |
| 176 | + $prev = $this->rev->getPrevious( $this->path ); |
| 177 | + $next = $this->rev->getNext( $this->path ); |
| 178 | + $repo = $this->repo->getName(); |
179 | 179 | |
180 | 180 | $links = array(); |
181 | 181 | |
182 | 182 | if ( $prev ) { |
183 | 183 | $prevTarget = SpecialPage::getTitleFor( 'Code', "$repo/$prev" ); |
184 | | - $links[] = '< ' . $this->skin->link( $prevTarget, $this->mRev->getIdString( $prev ), |
185 | | - array(), array( 'path' => $this->mPath ) ); |
| 184 | + $links[] = '< ' . $this->skin->link( $prevTarget, $this->rev->getIdString( $prev ), |
| 185 | + array(), array( 'path' => $this->path ) ); |
186 | 186 | } |
187 | 187 | |
188 | | - $revText = "<b>" . $this->mRev->getIdString( $rev ) . "</b>"; |
189 | | - $viewvc = $this->mRepo->getViewVcBase(); |
| 188 | + $revText = "<b>" . $this->rev->getIdString( $rev ) . "</b>"; |
| 189 | + $viewvc = $this->repo->getViewVcBase(); |
190 | 190 | if ( $viewvc ) { |
191 | 191 | $url = htmlspecialchars( "$viewvc/?view=rev&revision=$rev" ); |
192 | 192 | $viewvcTxt = wfMsgHtml( 'code-rev-rev-viewvc' ); |
— | — | @@ -195,8 +195,8 @@ |
196 | 196 | |
197 | 197 | if ( $next ) { |
198 | 198 | $nextTarget = SpecialPage::getTitleFor( 'Code', "$repo/$next" ); |
199 | | - $links[] = $this->skin->link( $nextTarget, $this->mRev->getIdString( $next ), |
200 | | - array(), array( 'path' => $this->mPath ) ) . ' >'; |
| 199 | + $links[] = $this->skin->link( $nextTarget, $this->rev->getIdString( $next ), |
| 200 | + array(), array( 'path' => $this->path ) ) . ' >'; |
201 | 201 | } |
202 | 202 | |
203 | 203 | return $wgLang->pipeList( $links ); |
— | — | @@ -206,11 +206,11 @@ |
207 | 207 | global $wgRequest, $wgUser; |
208 | 208 | if ( $wgRequest->wasPosted() && $wgUser->matchEditToken( $wgRequest->getVal( 'wpEditToken' ) ) ) { |
209 | 209 | // Look for a posting... |
210 | | - $text = $wgRequest->getText( "wpReply{$this->mReplyTarget}" ); |
| 210 | + $text = $wgRequest->getText( "wpReply{$this->replyTarget}" ); |
211 | 211 | $isPreview = $wgRequest->getCheck( 'wpPreview' ); |
212 | 212 | if ( $isPreview ) { |
213 | 213 | // Save the text for reference on later comment display... |
214 | | - $this->mPreviewText = $text; |
| 214 | + $this->previewText = $text; |
215 | 215 | } |
216 | 216 | } |
217 | 217 | return false; |
— | — | @@ -246,11 +246,11 @@ |
247 | 247 | $from = isset( $matches[0] ) ? $matches[0] : ''; |
248 | 248 | // Remove ' (from x)' from rename comment in the path. |
249 | 249 | $path = preg_replace( '/ \([^\)]+\)$/', '', $path ); |
250 | | - $viewvc = $this->mRepo->getViewVcBase(); |
| 250 | + $viewvc = $this->repo->getViewVcBase(); |
251 | 251 | $diff = ''; |
252 | 252 | $safePath = wfUrlEncode( $path ); |
253 | 253 | if ( $viewvc ) { |
254 | | - $rev = $this->mRev->getId(); |
| 254 | + $rev = $this->rev->getId(); |
255 | 255 | $prev = $rev - 1; |
256 | 256 | if ( $action !== 'D' ) { |
257 | 257 | $link = $this->skin->makeExternalLink( |
— | — | @@ -274,7 +274,7 @@ |
275 | 275 | |
276 | 276 | protected function tagForm() { |
277 | 277 | global $wgUser; |
278 | | - $tags = $this->mRev->getTags(); |
| 278 | + $tags = $this->rev->getTags(); |
279 | 279 | $list = ''; |
280 | 280 | if ( count( $tags ) ) { |
281 | 281 | $list = implode( ", ", |
— | — | @@ -284,16 +284,16 @@ |
285 | 285 | ) . ' '; |
286 | 286 | } |
287 | 287 | if ( $wgUser->isAllowed( 'codereview-add-tag' ) ) { |
288 | | - $list .= $this->addTagForm( $this->mAddTags, $this->mRemoveTags ); |
| 288 | + $list .= $this->addTagForm( $this->addTags, $this->removeTags ); |
289 | 289 | } |
290 | 290 | return $list; |
291 | 291 | } |
292 | 292 | |
293 | 293 | protected function splitTags( $input ) { |
294 | | - if ( !$this->mRev ) return array(); |
| 294 | + if ( !$this->rev ) return array(); |
295 | 295 | $tags = array_map( 'trim', explode( ",", $input ) ); |
296 | 296 | foreach ( $tags as $key => $tag ) { |
297 | | - $normal = $this->mRev->normalizeTag( $tag ); |
| 297 | + $normal = $this->rev->normalizeTag( $tag ); |
298 | 298 | if ( $normal === false ) { |
299 | 299 | return null; |
300 | 300 | } |
— | — | @@ -313,10 +313,10 @@ |
314 | 314 | global $wgUser; |
315 | 315 | if ( $wgUser->isAllowed( 'codereview-set-status' ) ) { |
316 | 316 | return Xml::openElement( 'select', array( 'name' => 'wpStatus' ) ) . |
317 | | - self::buildStatusList( $this->mStatus, $this ) . |
| 317 | + self::buildStatusList( $this->status, $this ) . |
318 | 318 | xml::closeElement( 'select' ); |
319 | 319 | } else { |
320 | | - return htmlspecialchars( $this->statusDesc( $this->mRev->getStatus() ) ); |
| 320 | + return htmlspecialchars( $this->statusDesc( $this->rev->getStatus() ) ); |
321 | 321 | } |
322 | 322 | } |
323 | 323 | |
— | — | @@ -340,7 +340,7 @@ |
341 | 341 | } |
342 | 342 | |
343 | 343 | protected function formatTag( $tag ) { |
344 | | - $repo = $this->mRepo->getName(); |
| 344 | + $repo = $this->repo->getName(); |
345 | 345 | $special = SpecialPage::getTitleFor( 'Code', "$repo/tag/$tag" ); |
346 | 346 | return $this->skin->link( $special, htmlspecialchars( $tag ) ); |
347 | 347 | } |
— | — | @@ -352,7 +352,7 @@ |
353 | 353 | // And JS in the client, but tough shit eh? ;) |
354 | 354 | $deferDiffs = $wgEnableAPI; |
355 | 355 | |
356 | | - if ( $this->mSkipCache ) { |
| 356 | + if ( $this->skipCache ) { |
357 | 357 | // We're purging the cache on purpose, probably |
358 | 358 | // because the cached data was corrupt. |
359 | 359 | $cache = 'skipcache'; |
— | — | @@ -365,7 +365,7 @@ |
366 | 366 | } else { |
367 | 367 | $cache = ''; |
368 | 368 | } |
369 | | - $diff = $this->mRepo->getDiff( $this->mRev->getId(), $cache ); |
| 369 | + $diff = $this->repo->getDiff( $this->rev->getId(), $cache ); |
370 | 370 | if ( is_integer($diff) && $deferDiffs ) { |
371 | 371 | // We'll try loading it by AJAX... |
372 | 372 | return $this->stubDiffLoader(); |
— | — | @@ -381,7 +381,7 @@ |
382 | 382 | global $wgCodeReviewImgRegex; |
383 | 383 | // Get image diffs |
384 | 384 | $imgDiffs = $html = ''; |
385 | | - $modifiedPaths = $this->mRev->getModifiedPaths(); |
| 385 | + $modifiedPaths = $this->rev->getModifiedPaths(); |
386 | 386 | foreach ( $modifiedPaths as $row ) { |
387 | 387 | // Typical image file? |
388 | 388 | if ( preg_match( $wgCodeReviewImgRegex, $row->cp_path ) ) { |
— | — | @@ -391,13 +391,13 @@ |
392 | 392 | // What was done to it? |
393 | 393 | $action = $row->cp_action == 'D' ? 'code-rev-modified-d' : 'code-rev-modified-r'; |
394 | 394 | // Link to old image |
395 | | - $imgDiffs .= $this->formatImgCell( $row->cp_path, $this->mRev->getPrevious(), $action ); |
| 395 | + $imgDiffs .= $this->formatImgCell( $row->cp_path, $this->rev->getPrevious(), $action ); |
396 | 396 | } |
397 | 397 | if ( $row->cp_action !== 'D' ) { // new |
398 | 398 | // What was done to it? |
399 | 399 | $action = $row->cp_action == 'A' ? 'code-rev-modified-a' : 'code-rev-modified-m'; |
400 | 400 | // Link to new image |
401 | | - $imgDiffs .= $this->formatImgCell( $row->cp_path, $this->mRev->getId(), $action ); |
| 401 | + $imgDiffs .= $this->formatImgCell( $row->cp_path, $this->rev->getId(), $action ); |
402 | 402 | } |
403 | 403 | $imgDiffs .= "</tr></table>\n"; |
404 | 404 | } |
— | — | @@ -410,7 +410,7 @@ |
411 | 411 | } |
412 | 412 | |
413 | 413 | protected function formatImgCell( $path, $rev, $message ) { |
414 | | - $viewvc = $this->mRepo->getViewVcBase(); |
| 414 | + $viewvc = $this->repo->getViewVcBase(); |
415 | 415 | $safePath = wfUrlEncode( $path ); |
416 | 416 | $url = "{$viewvc}{$safePath}?&pathrev=$rev&revision=$rev"; |
417 | 417 | |
— | — | @@ -430,8 +430,8 @@ |
431 | 431 | |
432 | 432 | protected function stubDiffLoader() { |
433 | 433 | global $wgOut; |
434 | | - $encRepo = Xml::encodeJsVar( $this->mRepo->getName() ); |
435 | | - $encRev = Xml::encodeJsVar( $this->mRev->getId() ); |
| 434 | + $encRepo = Xml::encodeJsVar( $this->repo->getName() ); |
| 435 | + $encRev = Xml::encodeJsVar( $this->rev->getId() ); |
436 | 436 | $wgOut->addModules( 'ext.codereview.loaddiff' ); |
437 | 437 | $wgOut->addInlineScript( |
438 | 438 | "addOnloadHook( |
— | — | @@ -449,7 +449,7 @@ |
450 | 450 | */ |
451 | 451 | protected function formatSignoffs( $showButtons ) { |
452 | 452 | $signoffs = implode( "\n", |
453 | | - array_map( array( $this, 'formatSignoffInline' ), $this->mRev->getSignoffs() ) |
| 453 | + array_map( array( $this, 'formatSignoffInline' ), $this->rev->getSignoffs() ) |
454 | 454 | ); |
455 | 455 | $header = '<th></th>'; |
456 | 456 | $header .= '<th>' . wfMsgHtml( 'code-signoff-field-user' ) . '</th>'; |
— | — | @@ -461,9 +461,9 @@ |
462 | 462 | |
463 | 463 | protected function formatComments() { |
464 | 464 | $comments = implode( "\n", |
465 | | - array_map( array( $this, 'formatCommentInline' ), $this->mRev->getComments() ) |
| 465 | + array_map( array( $this, 'formatCommentInline' ), $this->rev->getComments() ) |
466 | 466 | ); |
467 | | - if ( !$this->mReplyTarget ) { |
| 467 | + if ( !$this->replyTarget ) { |
468 | 468 | $comments .= $this->postCommentForm(); |
469 | 469 | } |
470 | 470 | if ( !$comments ) { |
— | — | @@ -474,7 +474,7 @@ |
475 | 475 | |
476 | 476 | protected function formatPropChanges() { |
477 | 477 | $changes = implode( "\n", |
478 | | - array_map( array( $this, 'formatChangeInline' ), $this->mRev->getPropChanges() ) |
| 478 | + array_map( array( $this, 'formatChangeInline' ), $this->rev->getPropChanges() ) |
479 | 479 | ); |
480 | 480 | if ( !$changes ) { |
481 | 481 | return false; |
— | — | @@ -484,7 +484,7 @@ |
485 | 485 | |
486 | 486 | protected function formatReferences( $showButtons ) { |
487 | 487 | $refs = implode( "\n", |
488 | | - array_map( array( $this, 'formatReferenceInline' ), $this->mRev->getReferences() ) |
| 488 | + array_map( array( $this, 'formatReferenceInline' ), $this->rev->getReferences() ) |
489 | 489 | ); |
490 | 490 | $header = '<th></th>'; |
491 | 491 | $header .= '<th>' . wfMsgHtml( 'code-field-id' ) . '</th>'; |
— | — | @@ -522,7 +522,7 @@ |
523 | 523 | * @return string |
524 | 524 | */ |
525 | 525 | protected function formatCommentInline( $comment ) { |
526 | | - if ( $comment->id === $this->mReplyTarget ) { |
| 526 | + if ( $comment->id === $this->replyTarget ) { |
527 | 527 | return $this->formatComment( $comment, |
528 | 528 | $this->postCommentForm( $comment->id ) ); |
529 | 529 | } else { |
— | — | @@ -574,12 +574,12 @@ |
575 | 575 | protected function formatReferenceInline( $row ) { |
576 | 576 | global $wgLang; |
577 | 577 | $rev = intval( $row->cr_id ); |
578 | | - $repo = $this->mRepo->getName(); |
| 578 | + $repo = $this->repo->getName(); |
579 | 579 | // Borrow the code revision list css |
580 | 580 | $css = 'mw-codereview-status-' . htmlspecialchars( $row->cr_status ); |
581 | 581 | $date = $wgLang->timeanddate( $row->cr_timestamp, true ); |
582 | 582 | $title = SpecialPage::getTitleFor( 'Code', "$repo/$rev" ); |
583 | | - $revLink = $this->skin->link( $title, $this->mRev->getIdString( $rev ) ); |
| 583 | + $revLink = $this->skin->link( $title, $this->rev->getIdString( $rev ) ); |
584 | 584 | $summary = $this->messageFragment( $row->cr_message ); |
585 | 585 | $author = $this->authorLink( $row->cr_author ); |
586 | 586 | $checkbox = Html::input( 'wpReferences[]', $rev, 'checkbox' ); |
— | — | @@ -587,22 +587,22 @@ |
588 | 588 | } |
589 | 589 | |
590 | 590 | protected function commentLink( $commentId ) { |
591 | | - $repo = $this->mRepo->getName(); |
592 | | - $rev = $this->mRev->getId(); |
| 591 | + $repo = $this->repo->getName(); |
| 592 | + $rev = $this->rev->getId(); |
593 | 593 | $title = SpecialPage::getTitleFor( 'Code', "$repo/$rev" ); |
594 | 594 | $title->setFragment( "#c{$commentId}" ); |
595 | 595 | return $title; |
596 | 596 | } |
597 | 597 | |
598 | 598 | protected function revLink() { |
599 | | - $repo = $this->mRepo->getName(); |
600 | | - $rev = $this->mRev->getId(); |
| 599 | + $repo = $this->repo->getName(); |
| 600 | + $rev = $this->rev->getId(); |
601 | 601 | $title = SpecialPage::getTitleFor( 'Code', "$repo/$rev" ); |
602 | 602 | return $title; |
603 | 603 | } |
604 | 604 | |
605 | 605 | protected function previewComment( $text, $review = 0 ) { |
606 | | - $comment = $this->mRev->previewComment( $text, $review ); |
| 606 | + $comment = $this->rev->previewComment( $text, $review ); |
607 | 607 | return $this->formatComment( $comment ); |
608 | 608 | } |
609 | 609 | |
— | — | @@ -613,7 +613,7 @@ |
614 | 614 | */ |
615 | 615 | protected function formatComment( $comment, $replyForm = '' ) { |
616 | 616 | global $wgOut, $wgLang; |
617 | | - $linker = new CodeCommentLinkerWiki( $this->mRepo ); |
| 617 | + $linker = new CodeCommentLinkerWiki( $this->repo ); |
618 | 618 | |
619 | 619 | if ( $comment->id === 0 ) { |
620 | 620 | $linkId = 'cpreview'; |
— | — | @@ -653,8 +653,8 @@ |
654 | 654 | |
655 | 655 | protected function commentReplyLink( $id ) { |
656 | 656 | if ( !$this->canPostComments() ) return ''; |
657 | | - $repo = $this->mRepo->getName(); |
658 | | - $rev = $this->mRev->getId(); |
| 657 | + $repo = $this->repo->getName(); |
| 658 | + $rev = $this->rev->getId(); |
659 | 659 | $self = SpecialPage::getTitleFor( 'Code', "$repo/$rev/reply/$id" ); |
660 | 660 | $self->setFragment( "#c$id" ); |
661 | 661 | return '[' . $this->skin->link( $self, wfMsg( 'codereview-reply-link' ) ) . ']'; |
— | — | @@ -662,9 +662,9 @@ |
663 | 663 | |
664 | 664 | protected function postCommentForm( $parent = null ) { |
665 | 665 | global $wgUser; |
666 | | - if ( $this->mPreviewText !== false && $parent === $this->mReplyTarget ) { |
667 | | - $preview = $this->previewComment( $this->mPreviewText ); |
668 | | - $text = htmlspecialchars( $this->mPreviewText ); |
| 666 | + if ( $this->previewText !== false && $parent === $this->replyTarget ) { |
| 667 | + $preview = $this->previewComment( $this->previewText ); |
| 668 | + $text = htmlspecialchars( $this->previewText ); |
669 | 669 | } else { |
670 | 670 | $preview = ''; |
671 | 671 | $text = $this->text; |
— | — | @@ -676,7 +676,7 @@ |
677 | 677 | return '<div class="mw-codereview-post-comment">' . |
678 | 678 | $preview . |
679 | 679 | Html::hidden( 'wpEditToken', $wgUser->editToken() ) . |
680 | | - Html::hidden( 'path', $this->mPath ) . |
| 680 | + Html::hidden( 'path', $this->path ) . |
681 | 681 | ( $parent ? Html::hidden( 'wpParent', $parent ) : '' ) . |
682 | 682 | '<div>' . |
683 | 683 | Xml::openElement( 'textarea', array( |
Index: trunk/extensions/CodeReview/ui/CodeReleaseNotes.php |
— | — | @@ -4,18 +4,18 @@ |
5 | 5 | function __construct( $repoName ) { |
6 | 6 | global $wgRequest, $IP; |
7 | 7 | parent::__construct( $repoName ); |
8 | | - $this->mRepo = CodeRepository::newFromName( $repoName ); |
9 | | - $this->mPath = htmlspecialchars( trim( $wgRequest->getVal( 'path' ) ) ); |
10 | | - if ( strlen( $this->mPath ) && $this->mPath[0] !== '/' ) { |
11 | | - $this->mPath = "/{$this->mPath}"; // make sure this is a valid path |
| 8 | + $this->repo = CodeRepository::newFromName( $repoName ); |
| 9 | + $this->path = htmlspecialchars( trim( $wgRequest->getVal( 'path' ) ) ); |
| 10 | + if ( strlen( $this->path ) && $this->path[0] !== '/' ) { |
| 11 | + $this->path = "/{$this->path}"; // make sure this is a valid path |
12 | 12 | } |
13 | | - $this->mPath = preg_replace( '/\/$/', '', $this->mPath ); // kill last slash |
14 | | - $this->mStartRev = $wgRequest->getIntOrNull( 'startrev' ); |
15 | | - $this->mEndRev = $wgRequest->getIntOrNull( 'endrev' ); |
| 13 | + $this->path = preg_replace( '/\/$/', '', $this->path ); // kill last slash |
| 14 | + $this->startRev = $wgRequest->getIntOrNull( 'startrev' ); |
| 15 | + $this->endRev = $wgRequest->getIntOrNull( 'endrev' ); |
16 | 16 | } |
17 | 17 | |
18 | 18 | function execute() { |
19 | | - if ( !$this->mRepo ) { |
| 19 | + if ( !$this->repo ) { |
20 | 20 | $view = new CodeRepoListView(); |
21 | 21 | $view->execute(); |
22 | 22 | return; |
— | — | @@ -23,23 +23,23 @@ |
24 | 24 | $this->showForm(); |
25 | 25 | |
26 | 26 | # Show notes if we have at least a starting revision |
27 | | - if ( $this->mStartRev ) { |
| 27 | + if ( $this->startRev ) { |
28 | 28 | $this->showReleaseNotes(); |
29 | 29 | } |
30 | 30 | } |
31 | 31 | |
32 | 32 | protected function showForm() { |
33 | 33 | global $wgOut, $wgScript; |
34 | | - $special = SpecialPage::getTitleFor( 'Code', $this->mRepo->getName() . '/releasenotes' ); |
| 34 | + $special = SpecialPage::getTitleFor( 'Code', $this->repo->getName() . '/releasenotes' ); |
35 | 35 | $wgOut->addHTML( |
36 | 36 | Xml::openElement( 'form', array( 'action' => $wgScript, 'method' => 'get' ) ) . |
37 | 37 | "<fieldset><legend>" . wfMsgHtml( 'code-release-legend' ) . "</legend>" . |
38 | 38 | Html::hidden( 'title', $special->getPrefixedDBKey() ) . '<b>' . |
39 | | - Xml::inputlabel( wfMsg( "code-release-startrev" ), 'startrev', 'startrev', 10, $this->mStartRev ) . |
| 39 | + Xml::inputlabel( wfMsg( "code-release-startrev" ), 'startrev', 'startrev', 10, $this->startRev ) . |
40 | 40 | '</b> ' . |
41 | | - Xml::inputlabel( wfMsg( "code-release-endrev" ), 'endrev', 'endrev', 10, $this->mEndRev ) . |
| 41 | + Xml::inputlabel( wfMsg( "code-release-endrev" ), 'endrev', 'endrev', 10, $this->endRev ) . |
42 | 42 | ' ' . |
43 | | - Xml::inputlabel( wfMsg( "code-pathsearch-path" ), 'path', 'path', 45, $this->mPath ) . |
| 43 | + Xml::inputlabel( wfMsg( "code-pathsearch-path" ), 'path', 'path', 45, $this->path ) . |
44 | 44 | ' ' . |
45 | 45 | Xml::submitButton( wfMsg( 'allpagessubmit' ) ) . "\n" . |
46 | 46 | "</fieldset>" . Xml::closeElement( 'form' ) |
— | — | @@ -48,22 +48,22 @@ |
49 | 49 | |
50 | 50 | protected function showReleaseNotes() { |
51 | 51 | global $wgOut; |
52 | | - $linker = new CodeCommentLinkerHtml( $this->mRepo ); |
| 52 | + $linker = new CodeCommentLinkerHtml( $this->repo ); |
53 | 53 | $dbr = wfGetDB( DB_SLAVE ); |
54 | 54 | $where = array(); |
55 | | - if ( $this->mEndRev ) { |
56 | | - $where[] = 'cr_id BETWEEN ' . intval( $this->mStartRev ) . ' AND ' . intval( $this->mEndRev ); |
| 55 | + if ( $this->endRev ) { |
| 56 | + $where[] = 'cr_id BETWEEN ' . intval( $this->startRev ) . ' AND ' . intval( $this->endRev ); |
57 | 57 | } else { |
58 | | - $where[] = 'cr_id >= ' . intval( $this->mStartRev ); |
| 58 | + $where[] = 'cr_id >= ' . intval( $this->startRev ); |
59 | 59 | } |
60 | | - if ( $this->mPath ) { |
61 | | - $where['cr_path'] = $this->mPath; |
| 60 | + if ( $this->path ) { |
| 61 | + $where['cr_path'] = $this->path; |
62 | 62 | } |
63 | 63 | # Select commits within this range... |
64 | 64 | $res = $dbr->select( array( 'code_rev', 'code_tags' ), |
65 | 65 | array( 'cr_message', 'cr_author', 'cr_id', 'ct_tag AS rnotes' ), |
66 | 66 | array_merge( array( |
67 | | - 'cr_repo_id' => $this->mRepo->getId(), // this repo |
| 67 | + 'cr_repo_id' => $this->repo->getId(), // this repo |
68 | 68 | "cr_status NOT IN('reverted','deferred','fixme')", // not reverted/deferred/fixme |
69 | 69 | "cr_message != ''", |
70 | 70 | ), $where ), |
Index: trunk/extensions/CodeReview/ui/CodeAuthorListView.php |
— | — | @@ -4,15 +4,15 @@ |
5 | 5 | class CodeAuthorListView extends CodeView { |
6 | 6 | function __construct( $repoName ) { |
7 | 7 | parent::__construct(); |
8 | | - $this->mRepo = CodeRepository::newFromName( $repoName ); |
| 8 | + $this->repo = CodeRepository::newFromName( $repoName ); |
9 | 9 | } |
10 | 10 | |
11 | 11 | function execute() { |
12 | 12 | global $wgOut, $wgLang; |
13 | | - $authors = $this->mRepo->getAuthorList(); |
14 | | - $repo = $this->mRepo->getName(); |
| 13 | + $authors = $this->repo->getAuthorList(); |
| 14 | + $repo = $this->repo->getName(); |
15 | 15 | $text = wfMsg( 'code-authors-text' ) . "\n\n"; |
16 | | - $text .= '<strong>' . wfMsg( 'code-author-total', $wgLang->formatNum( $this->mRepo->getAuthorCount() ) ) . "</strong>\n"; |
| 16 | + $text .= '<strong>' . wfMsg( 'code-author-total', $wgLang->formatNum( $this->repo->getAuthorCount() ) ) . "</strong>\n"; |
17 | 17 | |
18 | 18 | $wgOut->addWikiText( $text ); |
19 | 19 | |
— | — | @@ -25,7 +25,7 @@ |
26 | 26 | $wgOut->addHTML( "<tr><td>" ); |
27 | 27 | $author = $committer["author"]; |
28 | 28 | $text = "[[Special:Code/$repo/author/$author|$author]]"; |
29 | | - $user = $this->mRepo->authorWikiUser( $author ); |
| 29 | + $user = $this->repo->authorWikiUser( $author ); |
30 | 30 | if ( $user ) { |
31 | 31 | $title = htmlspecialchars( $user->getUserPage()->getPrefixedText() ); |
32 | 32 | $name = htmlspecialchars( $user->getName() ); |
Index: trunk/extensions/CodeReview/ui/CodeRevisionStatusView.php |
— | — | @@ -3,29 +3,29 @@ |
4 | 4 | class CodeRevisionStatusView extends CodeRevisionListView { |
5 | 5 | function __construct( $repoName, $status ) { |
6 | 6 | parent::__construct( $repoName ); |
7 | | - $this->mStatus = $status; |
8 | | - $this->mAppliedFilter = wfMsg( 'code-revfilter-cr_status', $status ); |
| 7 | + $this->status = $status; |
| 8 | + $this->appliedFilter = wfMsg( 'code-revfilter-cr_status', $status ); |
9 | 9 | } |
10 | 10 | |
11 | 11 | function getPager() { |
12 | | - return new SvnRevStatusTablePager( $this, $this->mStatus ); |
| 12 | + return new SvnRevStatusTablePager( $this, $this->status ); |
13 | 13 | } |
14 | 14 | } |
15 | 15 | |
16 | 16 | class SvnRevStatusTablePager extends SvnRevTablePager { |
17 | 17 | function __construct( $view, $status ) { |
18 | 18 | parent::__construct( $view ); |
19 | | - $this->mStatus = $status; |
| 19 | + $this->status = $status; |
20 | 20 | } |
21 | 21 | |
22 | 22 | function getQueryInfo() { |
23 | 23 | $info = parent::getQueryInfo(); |
24 | | - $info['conds']['cr_status'] = $this->mStatus; // FIXME: normalize input? |
| 24 | + $info['conds']['cr_status'] = $this->status; // FIXME: normalize input? |
25 | 25 | return $info; |
26 | 26 | } |
27 | 27 | |
28 | 28 | function getTitle() { |
29 | | - $repo = $this->mRepo->getName(); |
30 | | - return SpecialPage::getTitleFor( 'Code', "$repo/status/$this->mStatus" ); |
| 29 | + $repo = $this->repo->getName(); |
| 30 | + return SpecialPage::getTitleFor( 'Code', "$repo/status/$this->status" ); |
31 | 31 | } |
32 | 32 | } |