14 SpecialPrefixIndexGetFormFiltersHook,
15 SpecialPrefixIndexQueryHook,
19 public function onSpecialPrefixIndexGetFormFilters( IContextSource $contextSource, array &$filters ) {
20 $filters[
'translate-hidetranslations' ] = [
21 'class' => HTMLCheckField::class,
22 'name' =>
'translate-hidetranslations',
23 'label-message' =>
'translate-hidetranslations',
27 public function onSpecialPrefixIndexQuery( array $fieldData, SelectQueryBuilder $queryBuilder ) {
28 if ( $fieldData[
'translate-hidetranslations' ] ===
true ) {
29 $queryBuilder->leftJoin(
33 'translate_pp.pp_page=page_id',
34 'translate_pp.pp_propname' =>
'translate-is-translation'
36 )->andWhere( [
'translate_pp.pp_value' =>
null ] );
40 public function onLonelyPagesQuery( &$tables, &$conds, &$joinConds ) {
41 $tables[
'translate_pp' ] =
'page_props';
42 $joinConds[
'translate_pp'] = [
44 'translate_pp.pp_page=page_id',
45 'translate_pp.pp_propname' =>
'translate-is-translation'
48 $conds[
'translate_pp.pp_value'] =
null;