Index: trunk/extensions/SelectionSifter/models/Rating.php |
— | — | @@ -152,18 +152,4 @@ |
153 | 153 | ); |
154 | 154 | // Article moves not logged - yet |
155 | 155 | } |
156 | | - |
157 | | - private static function checkArticle( $article, $category_filters ) { |
158 | | - // Check category |
159 | | - if( count( $category_filters ) == 0 || ( count($category_filters) == 1 && empty( $category_filters[0] ) ) ) { |
160 | | - return true; |
161 | | - } |
162 | | - |
163 | | - foreach( $category_filters as $category ) { |
164 | | - if( in_array( $category, $article['categories'] ) ) { |
165 | | - return true; |
166 | | - } |
167 | | - } |
168 | | - return false; |
169 | | - } |
170 | 156 | } |
Index: trunk/extensions/SelectionSifter/models/Statistics.php |
— | — | @@ -19,7 +19,7 @@ |
20 | 20 | } |
21 | 21 | |
22 | 22 | public static function updateAggregateStats( $rating, $is_new_rating, $update_global = true ) { |
23 | | - if(! $is_new_rating && empty($rating->old_importance) && empty($rating->old_quality) ) { |
| 23 | + if(! $is_new_rating && !isset($rating->old_importance) && !isset($rating->old_quality) ) { |
24 | 24 | return; |
25 | 25 | } |
26 | 26 | $dbw = wfGetDB( DB_MASTER ); |
— | — | @@ -46,12 +46,12 @@ |
47 | 47 | |
48 | 48 | if(! $is_new_rating ) { |
49 | 49 | // Is not a new rating, and atleast one of quality or importance has changed |
50 | | - if(! empty( $rating->old_quality ) ) { |
| 50 | + if( isset( $rating->old_quality ) ) { |
51 | 51 | $q_value = $rating->old_quality; |
52 | 52 | } else { |
53 | 53 | $q_value = $rating->quality; |
54 | 54 | } |
55 | | - if(! empty( $rating->old_importance) ) { |
| 55 | + if( isset( $rating->old_importance) ) { |
56 | 56 | $i_column = Statistics::getImportanceColumn( $rating->old_importance ); |
57 | 57 | } else { |
58 | 58 | $i_column = Statistics::getImportanceColumn( $rating->importance ); |
Index: trunk/extensions/SelectionSifter/SelectionSifter.hooks.php |
— | — | @@ -34,7 +34,7 @@ |
35 | 35 | $rating->saveAll(); |
36 | 36 | |
37 | 37 | $timestamp = wfTimestamp( TS_MW ); |
38 | | - if( !empty( $assessment['quality'] ) ) { |
| 38 | + if( isset( $assessment['quality'] ) ) { |
39 | 39 | AssessmentChangeLog::makeEntry( |
40 | 40 | $project, |
41 | 41 | $main_title->getNamespace(), |
— | — | @@ -45,7 +45,7 @@ |
46 | 46 | $assessment['quality'] |
47 | 47 | ); |
48 | 48 | } |
49 | | - if( !empty( $assessment['importance'] ) ) { |
| 49 | + if( isset( $assessment['importance'] ) ) { |
50 | 50 | AssessmentChangeLog::makeEntry( |
51 | 51 | $project, |
52 | 52 | $main_title->getNamespace(), |