';
}
}
?>
addTile(new \OC\Pictures\TileSingle($root.$images[$i]));
continue;
}
if (strcmp($prev_dir_arr[0], $dir_arr[0])!=0) {
$tl->addTile(new \OC\Pictures\TileStack($arr, $prev_dir_arr[0]));
$arr = array();
}
$arr[] = $root.$images[$i];
$previous_element = $images[$i];
}
$dir_arr = explode('/', $previous_element);
if (count($images)>1) {
if (count($dir_arr)==0) {
$tl->addTile(new \OC\Pictures\TileSingle($previous_element));
} else if (count($dir_arr) && $ts->getCount() == 0){
$ts = new \OC\Pictures\TileStack(array($root.$previous_element), $dir_arr[0]);
} else {
$arr[] = $previous_element;
$ts->addTile($arr);
}
}
if ($ts->getCount() != 0) {
$tl->addTile($ts);
}
echo $tl->get();
?>