Skip to content

Commit

Permalink
feature 2963 & feature 2985 : more flexibility for FileCombiner (keep…
Browse files Browse the repository at this point in the history
… API compatibility)

git-svn-id: http://piwigo.org/svn/trunk@25547 68402e56-0260-453c-a942-63ccdbb3a9ee
  • Loading branch information
mistic100 committed Nov 18, 2013
1 parent 7726147 commit 5434357
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions include/template.class.php
Expand Up @@ -1366,7 +1366,7 @@ final class FileCombiner
private $is_css;
private $combinables;

function FileCombiner($type, $combinables)
function FileCombiner($type, $combinables=array())
{
$this->type = $type;
$this->is_css = $type=='css';
Expand All @@ -1386,8 +1386,15 @@ static function clear_combined_files()

function add($combinables)
{
foreach($combinables as $combinable)
$this->combinables[] = $combinable;
if ($combinables instanceof Combinable)
{
$this->combinables[] = $combinables;
}
else
{
foreach($combinables as $combinable)
$this->combinables[] = $combinable;
}
}

function combine()
Expand Down

0 comments on commit 5434357

Please sign in to comment.