Index: trunk/extensions/MoodBar/SpecialFeedbackDashboard.php |
— | — | @@ -111,8 +111,8 @@ |
112 | 112 | $myResponseCheckbox = Xml::check( 'myresponse', $wgRequest->getCheck( 'myresponse' ), |
113 | 113 | array( 'id' => 'fbd-filters-my-response', 'value' => '1', 'class' => 'fbd-filters-check' ) ); |
114 | 114 | |
115 | | - $myResponseFilter = '<label for="fbd-filters-my-response" id="fbd-filters-type-my-response-label" class="fbd-filters-label">' . |
116 | | - $myResponseCheckbox . $myResponseMsg . '</label>'; |
| 115 | + $myResponseFilter = $myResponseCheckbox. '<label for="fbd-filters-my-response" id="fbd-filters-type-my-response-label" class="fbd-filters-label">' . |
| 116 | + $myResponseMsg . '</label>'; |
117 | 117 | } |
118 | 118 | |
119 | 119 | // Show unanswered filter |
— | — | @@ -120,8 +120,8 @@ |
121 | 121 | $showUnansweredCheckbox = Xml::check( 'showunanswered', $wgRequest->getCheck( 'showunanswered' ), |
122 | 122 | array( 'id' => 'fbd-filters-show-unanswered', 'value' => '1', 'class' => 'fbd-filters-check' ) ); |
123 | 123 | |
124 | | - $showUnansweredFilter = '<label for="fbd-filters-show-unanswered" id="fbd-filters-type-show-unanswered-label" class="fbd-filters-label">' . |
125 | | - $showUnansweredCheckbox . $showUnansweredMsg . '</label>'; |
| 124 | + $showUnansweredFilter = $showUnansweredCheckbox . '<label for="fbd-filters-show-unanswered" id="fbd-filters-type-show-unanswered-label" class="fbd-filters-label">' . |
| 125 | + $showUnansweredMsg . '</label>'; |
126 | 126 | |
127 | 127 | $leaderBoardElement = self::buildLeaderBoardElement(); |
128 | 128 | |
— | — | @@ -599,7 +599,7 @@ |
600 | 600 | // Do the actual query |
601 | 601 | $desc = $backwards ? '' : ' DESC'; |
602 | 602 | |
603 | | - $table = array( 'moodbar_feedback', 'user' ); |
| 603 | + $table = array( ); |
604 | 604 | $option = array( 'LIMIT' => $limit + 2, 'ORDER BY' => "mbf_timestamp$desc, mbf_id$desc" ); |
605 | 605 | $tableJoin = array( 'user' => array( 'LEFT JOIN', 'user_id=mbf_user_id' ) ); |
606 | 606 | |
— | — | @@ -611,7 +611,7 @@ |
612 | 612 | if ( !$wgUser->isAnon() ) { |
613 | 613 | $table[] = 'moodbar_feedback_response'; |
614 | 614 | $option['GROUP BY'] = 'mbf_id'; |
615 | | - $tableJoin['moodbar_feedback_response'] = array( 'INNER JOIN', 'mbf_id=mbfr_mbf_id' ); |
| 615 | + $conds[] = 'mbf_id=mbfr_mbf_id'; |
616 | 616 | $conds['mbfr_user_id'] = $wgUser->getId(); |
617 | 617 | } |
618 | 618 | break; |
— | — | @@ -624,6 +624,9 @@ |
625 | 625 | } |
626 | 626 | } |
627 | 627 | |
| 628 | + $table[] = 'moodbar_feedback'; |
| 629 | + $table[] = 'user'; |
| 630 | + |
628 | 631 | $res = $dbr->select( $table, array( |
629 | 632 | 'user_name', 'mbf_id', 'mbf_type', |
630 | 633 | 'mbf_timestamp', 'mbf_user_id', 'mbf_user_ip', 'mbf_comment', |
Index: trunk/extensions/MoodBar/ApiQueryMoodBarComments.php |
— | — | @@ -11,7 +11,6 @@ |
12 | 12 | $prop = array_flip( $params['prop'] ); |
13 | 13 | |
14 | 14 | // Build the query |
15 | | - $this->addTables( array( 'moodbar_feedback', 'user' ) ); |
16 | 15 | $this->addJoinConds( array( 'user' => array( 'LEFT JOIN', 'user_id=mbf_user_id' ) ) ); |
17 | 16 | $this->addFields( array( 'user_name', 'mbf_id', 'mbf_type', 'mbf_timestamp', 'mbf_user_id', 'mbf_user_ip', |
18 | 17 | 'mbf_comment', 'mbf_hidden_state' ) ); |
— | — | @@ -42,7 +41,7 @@ |
43 | 42 | if ( isset( $params['myresponse'] ) ) { |
44 | 43 | if ( !$wgUser->isAnon() ) { |
45 | 44 | $this->addTables( array( 'moodbar_feedback_response' ) ); |
46 | | - $this->addJoinConds( array( 'moodbar_feedback_response' => array( 'INNER JOIN', 'mbf_id=mbfr_mbf_id' ) ) ); |
| 45 | + $this->addWhere( 'mbf_id=mbfr_mbf_id' ); |
47 | 46 | $this->addWhereFld( 'mbfr_user_id', $wgUser->getId() ); |
48 | 47 | $this->addOption( 'GROUP BY', 'mbf_id' ); |
49 | 48 | } |
— | — | @@ -52,6 +51,8 @@ |
53 | 52 | $this->addWhere( array( 'mbfr_id' => null ) ); |
54 | 53 | } |
55 | 54 | |
| 55 | + $this->addTables( array( 'moodbar_feedback', 'user' ) ); |
| 56 | + |
56 | 57 | if ( ! $wgUser->isAllowed( 'moodbar-admin' ) ) { |
57 | 58 | $this->addWhereFld( 'mbf_hidden_state', 0 ); |
58 | 59 | } |
Index: trunk/extensions/MoodBar/modules/ext.moodBar.dashboard/ext.moodBar.dashboard.css |
— | — | @@ -37,7 +37,7 @@ |
38 | 38 | } |
39 | 39 | |
40 | 40 | .fbd-filters-label { |
41 | | - display: block; |
| 41 | + display: inline; |
42 | 42 | margin: 0.5em 0 0 0; |
43 | 43 | padding: 0; |
44 | 44 | font-weight: bold; |