mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-03-28 17:42:57 +01:00
feature 2963 & feature 2985 : more flexibility for FileCombiner (keep API compatibility)
git-svn-id: http://piwigo.org/svn/trunk@25547 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -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';
|
||||
@@ -1386,8 +1386,15 @@ final class FileCombiner
|
||||
|
||||
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()
|
||||
|
||||
Reference in New Issue
Block a user