Changeset 29246


Ignore:
Timestamp:
Aug 22, 2014, 3:25:58 PM (10 years ago)
Author:
plg
Message:

feature 2790: add prefilters no_title and no_date_creation

Location:
extensions/batch_manager_prefilters
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • extensions/batch_manager_prefilters/language/en_UK/plugin.lang.php

    r22278 r29246  
    33$lang['with author'] = 'with author';
    44$lang['without author'] = 'without author';
     5$lang['With no title'] = 'With no title';
     6$lang['With no creation date'] = 'With no creation date';
    57?>
  • extensions/batch_manager_prefilters/language/fr_FR/plugin.lang.php

    r22278 r29246  
    11<?php
    2 $lang['with tags'] = 'avec tags';
    3 $lang['with author'] = 'avec auteur';
    4 $lang['without author'] = 'sans auteur';
     2$lang['with tags'] = 'Avec tags';
     3$lang['with author'] = 'Avec auteur';
     4$lang['without author'] = 'Sans auteur';
     5$lang['With no title'] = 'Sans titre';
     6$lang['With no creation date'] = 'Sans date de création';
    57?>
  • extensions/batch_manager_prefilters/main.inc.php

    r22278 r29246  
    1919  load_language('plugin.lang', dirname(__FILE__).'/');
    2020
    21   array_push($prefilters,
     21  array_push(
     22    $prefilters,
    2223    array('ID' => 'with tags', 'NAME' => l10n('with tags')),
    2324    array('ID' => 'with author', 'NAME' => l10n('with author')),
    24     array('ID' => 'without author', 'NAME' => l10n('without author'))
     25    array('ID' => 'without author', 'NAME' => l10n('without author')),
     26    array('ID' => 'no_title', 'NAME' => l10n('With no title')),
     27    array('ID' => 'no_date_creation', 'NAME' => l10n('With no creation date'))
    2528  );
    2629
     
    4851  }
    4952
     53  if ('no_title' == $prefilter)
     54  {
     55    $query = 'SELECT id FROM '.IMAGES_TABLE.' WHERE name IS NULL OR name = \'\';';
     56    array_push($filter_sets, array_from_query($query, 'id'));
     57  }
     58
     59  if ('no_date_creation' == $prefilter)
     60  {
     61    $query = 'SELECT id FROM '.IMAGES_TABLE.' WHERE date_creation IS NULL;';
     62    array_push($filter_sets, array_from_query($query, 'id'));
     63  }
     64 
    5065  return $filter_sets;
    5166}
Note: See TracChangeset for help on using the changeset viewer.