Changeset 10355


Ignore:
Timestamp:
Apr 13, 2011, 3:18:42 PM (10 years ago)
Author:
patdenice
Message:

merge r10354 from trunk to branch 2.2
feature:2264
new trigger to add prefilter on batch manager

Location:
branches/2.2/admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2/admin/batch_manager.php

    r9912 r10355  
    5656  if (isset($_POST['filter_prefilter_use']))
    5757  {
    58     $prefilters = array('caddie', 'last import', 'with no album', 'with no tag', 'with no virtual album', 'duplicates', 'all photos');
    59     if (in_array($_POST['filter_prefilter'], $prefilters))
    60     {
    61       $_SESSION['bulk_manager_filter']['prefilter'] = $_POST['filter_prefilter'];
    62     }
     58    $_SESSION['bulk_manager_filter']['prefilter'] = $_POST['filter_prefilter'];
    6359  }
    6460
     
    254250      );
    255251  }
     252
     253  $filter_sets = trigger_event('bulk_manager_prefilter', $filter_sets, $_SESSION['bulk_manager_filter']['prefilter']);
    256254}
    257255
  • branches/2.2/admin/themes/default/template/batch_manager_global.tpl

    r10166 r10355  
    340340          <option value="duplicates" {if $filter.prefilter eq 'duplicates'}selected="selected"{/if}>{'duplicates'|@translate}</option>
    341341          <option value="all photos" {if $filter.prefilter eq 'all photos'}selected="selected"{/if}>{'All'|@translate}</option>
     342          {foreach from=$bulk_manager_plugins_prefilters item=plugin_prefilter}
     343          <option value="{$plugin_prefilter.ID}" {if $filter.prefilter eq $plugin_prefilter.ID}selected="selected"{/if}>{$plugin_prefilter.NAME}</option>
     344          {/foreach}
    342345        </select>
    343346      </li>
Note: See TracChangeset for help on using the changeset viewer.