Changeset 25547


Ignore:
Timestamp:
Nov 18, 2013, 9:53:24 AM (10 years ago)
Author:
mistic100
Message:

feature 2963 & feature 2985 : more flexibility for FileCombiner (keep API compatibility)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/template.class.php

    r25544 r25547  
    13671367  private $combinables;
    13681368
    1369   function FileCombiner($type, $combinables)
     1369  function FileCombiner($type, $combinables=array())
    13701370  {
    13711371    $this->type = $type;
     
    13871387  function add($combinables)
    13881388  {
    1389     foreach($combinables as $combinable)
    1390       $this->combinables[] = $combinable;
     1389    if ($combinables instanceof Combinable)
     1390    {
     1391      $this->combinables[] = $combinables;
     1392    }
     1393    else
     1394    {
     1395      foreach($combinables as $combinable)
     1396        $this->combinables[] = $combinable;
     1397    }
    13911398  }
    13921399
Note: See TracChangeset for help on using the changeset viewer.