652 lines
23 KiB
PHP
652 lines
23 KiB
PHP
<?php
|
|
namespace App\Services\SyS;
|
|
|
|
use Carbon;
|
|
use Request;
|
|
use App\Models\IQContentTree;
|
|
use App\Models\IQContentTreeNode;
|
|
|
|
class Import
|
|
{
|
|
//tree
|
|
public function tree()
|
|
{
|
|
$text = "";
|
|
$val = [];
|
|
$trees = IQContentTree::all();
|
|
foreach ($trees as $tree){
|
|
foreach ($tree->iq_content_tree_nodes as $tree_node){
|
|
|
|
$text .= $tree_node->id." -- ".$tree_node->title."\n";
|
|
foreach ($tree_node->iq_content_sites as $site){
|
|
if($site->travel_guide && $site->identifier === null){
|
|
$identifier = $site->travel_guide->scope === 1 ? 'long' : 'short';
|
|
//$site->identifier = $site->travel_guide->scope === 1 ? 'long' : 'short';
|
|
$text .= "-- ".$site->id." -- ".$identifier."\n";
|
|
}
|
|
}
|
|
}
|
|
}
|
|
$data = [
|
|
'text' => $text,
|
|
'values' => $val,
|
|
];
|
|
return view('sys.tools.trees', $data);
|
|
}
|
|
|
|
public function treeStore()
|
|
{
|
|
$trees = IQContentTree::all();
|
|
foreach ($trees as $tree){
|
|
foreach ($tree->iq_content_tree_nodes as $tree_node){
|
|
|
|
foreach ($tree_node->iq_content_sites as $site){
|
|
if($site->travel_guide){
|
|
$site->identifier = $site->travel_guide->scope === 1 ? 'long' : 'short';
|
|
$site->save();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return redirect()->back();
|
|
}
|
|
|
|
|
|
//clean_tree_code
|
|
public function cleanTreeCode(){
|
|
$val = [];
|
|
$text = "";
|
|
|
|
$travelGuide = TravelGuide::find(166);
|
|
$text = $travelGuide->full_text;
|
|
|
|
$data = [
|
|
'new_text' => \App\Services\Util::cleanHTML($text),
|
|
'full_text' => $travelGuide->full_text,
|
|
'values' => $val,
|
|
];
|
|
return view('sys.tools.clean', $data);
|
|
}
|
|
|
|
public function cleanTreeCodeStore(){
|
|
$this->cleanTextTravelGuide();
|
|
return redirect()->back();
|
|
}
|
|
|
|
public function cleanTextTravelGuide()
|
|
{
|
|
$TravelGuides = TravelGuide::all();
|
|
foreach ($TravelGuides as $travelGuide){
|
|
$new_text = \App\Services\Util::cleanHTML($travelGuide->full_text);
|
|
if(strcmp($travelGuide->full_text, $new_text) != 0){
|
|
$travelGuide->full_text = $new_text;
|
|
$travelGuide->save();
|
|
var_dump($travelGuide->id);
|
|
echo "<br>";
|
|
}
|
|
}
|
|
die("done");
|
|
}
|
|
|
|
//media_insert
|
|
public function mediaInsert(){
|
|
$val = [];
|
|
$text = "";
|
|
$data = [
|
|
'text' => $text,
|
|
'values' => $val,
|
|
];
|
|
return view('sys.tools.insert', $data);
|
|
}
|
|
|
|
public function mediaInsertStore(){
|
|
$val = [];
|
|
|
|
$data = Request::all();
|
|
$text = $data['text'];
|
|
|
|
if($data['action'] === 'insert'){
|
|
$lines = explode(PHP_EOL, $text);
|
|
$FolderC = new FolderController();
|
|
$FileC = new FileController();
|
|
|
|
foreach ($lines as $line){
|
|
$sep = explode(';', $line);
|
|
if(isset($sep[0]) && isset($sep[1]) && isset($sep[2])){
|
|
//youtube //main dir
|
|
$working_dir = "/shares/youtube/".$sep[0];
|
|
$folder_name = $sep[1];
|
|
|
|
$folder = $FolderC->makeFolder($working_dir, $folder_name);
|
|
$working_dir = $working_dir."/".$folder_name;
|
|
$file = $FileC->makeYoutube($working_dir, $sep[2]);
|
|
$val[] = $file.' - '.$sep[2]." | ".$working_dir;
|
|
}
|
|
}
|
|
}
|
|
if($data['action'] === 'youtube_ids'){
|
|
$TravelGuides = TravelGuide::all();
|
|
foreach ($TravelGuides as $travelGuide){
|
|
$this->findYoutubeLinks($val, $travelGuide);
|
|
|
|
/* <iframe allowfullscreen="" frameborder="0" height="500" src="https://www.youtube-nocookie.com/embed/9zs9RKOFCIs?rel=0" width="100%"></iframe> */
|
|
}
|
|
}
|
|
if($data['action'] === 'replace_youtube_links') {
|
|
$TravelGuides = TravelGuide::all();
|
|
foreach ($TravelGuides as $travelGuide){
|
|
$this->replaceYoutubeLinks($val, $travelGuide);
|
|
|
|
/* <iframe allowfullscreen="" frameborder="0" height="500" src="https://www.youtube-nocookie.com/embed/9zs9RKOFCIs?rel=0" width="100%"></iframe> */
|
|
}
|
|
}
|
|
|
|
if($data['action'] === 'replace_youtube_div') {
|
|
$this->replaceYoutubeDiv($val, TravelGuide::find(335));
|
|
$TravelGuides = TravelGuide::all();
|
|
foreach ($TravelGuides as $travelGuide){
|
|
$this->replaceYoutubeDiv($val, $travelGuide);
|
|
|
|
/* <iframe allowfullscreen="" frameborder="0" height="500" src="https://www.youtube-nocookie.com/embed/9zs9RKOFCIs?rel=0" width="100%"></iframe> */
|
|
}
|
|
}
|
|
|
|
|
|
$data = [
|
|
'text' => $text,
|
|
'values' => $val,
|
|
];
|
|
return view('sys.tools.insert', $data);
|
|
|
|
}
|
|
|
|
//import
|
|
public function import()
|
|
{
|
|
$text = "";
|
|
$val = [];
|
|
|
|
$data = [
|
|
'text' => $text,
|
|
'values' => $val,
|
|
];
|
|
return view('sys.tools.import', $data);
|
|
}
|
|
|
|
public function importStore()
|
|
{
|
|
|
|
$data = Request::all();
|
|
|
|
$lines = explode(PHP_EOL, $data['text']);
|
|
|
|
if($data['action'] === 'import_TN'){
|
|
foreach ($lines as $line){
|
|
$ex = explode(';', $line);
|
|
$t_n = TravelNationality::whereName(trim($ex[1]))->first();
|
|
if($t_n){
|
|
$t_n->nat = $ex[0];
|
|
$t_n->save();
|
|
}else{
|
|
TravelNationality::create([
|
|
'name' => trim($ex[1]),
|
|
'nat' => $ex[0],
|
|
'active' => false,
|
|
]
|
|
);
|
|
}
|
|
}
|
|
}
|
|
|
|
if($data['action'] === 'import_CT') {
|
|
foreach ($lines as $line){
|
|
$ex = explode(';', $line);
|
|
$t_c = TravelCountry::whereName(trim($ex[1]))->first();
|
|
if($t_c){
|
|
dump($t_c->name);
|
|
$t_c->destco = $ex[0];
|
|
$t_c->save();
|
|
|
|
$tc = \App\Models\Sym\TravelCountry::find($t_c->crm_id);
|
|
$tc->destco = $ex[0];
|
|
$tc->save();
|
|
}
|
|
}
|
|
dd("");
|
|
}
|
|
|
|
return redirect()->back();
|
|
}
|
|
|
|
|
|
private function replaceYoutubeDiv(&$val, $travelGuide)
|
|
{
|
|
$ret = [];
|
|
$dom = new \DOMDocument('1.0', 'utf-8');
|
|
@$dom->loadHTML(mb_convert_encoding($travelGuide->full_text, 'HTML-ENTITIES', 'UTF-8'));
|
|
$links = $dom->getElementsByTagName('iframe');
|
|
foreach ($links as $link) {
|
|
if($link->parentNode->parentNode->nodeName === 'div'){
|
|
if($link->parentNode->parentNode->getAttribute('itemprop') === 'video'){
|
|
if($link->parentNode->parentNode->getAttribute('class') === 'mediaA'){
|
|
if($link->parentNode->parentNode->parentNode->getAttribute('itemprop') === 'video'){
|
|
|
|
$need = $link->parentNode->parentNode;
|
|
$replace = $link->parentNode->parentNode->parentNode;
|
|
$replace->parentNode->insertBefore($dom->importNode($need, true), $replace->nextSibling);
|
|
$replace->parentNode->removeChild($replace);
|
|
$html = $dom->saveHTML();
|
|
|
|
$travelGuide->full_text = $html;
|
|
$travelGuide->save();
|
|
$val[] = 'replace - '.$travelGuide->id;
|
|
|
|
}else{
|
|
// dump("notfound itemprop over class mediaA".$travelGuide->id);
|
|
$val[] = 'notfound - itemprop over class mediaA - '.$travelGuide->id;
|
|
|
|
//in
|
|
|
|
foreach ($link->parentNode->parentNode->childNodes as $node){
|
|
if($node->nodeName === 'h2'){
|
|
|
|
if($node->firstChild->nodeName === '#text'){
|
|
|
|
$span = $dom->createElement('span', htmlspecialchars($node->nodeValue));
|
|
|
|
$span->setAttribute('itemprop', 'name');
|
|
$h2 = $dom->createElement('h2');
|
|
$h2->appendChild($span);
|
|
|
|
$node->parentNode->replaceChild($h2, $node);
|
|
$html = $dom->saveHTML();
|
|
|
|
$travelGuide->full_text = $html;
|
|
$travelGuide->save();
|
|
$val[] = 'replace h2 - '.$travelGuide->id;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|
|
//<span itemprop="name">
|
|
|
|
}
|
|
//dump("found M div ".$travelGuide->id);
|
|
}else{
|
|
// dump("notfound class mediaA".$travelGuide->id);
|
|
$val[] = 'notfound - class mediaA - '.$travelGuide->id;
|
|
}
|
|
}else{
|
|
// dump("notfound div ".$travelGuide->id);
|
|
$val[] = 'notfound - video - '.$travelGuide->id;
|
|
|
|
|
|
}
|
|
// dump($travelGuide->id);
|
|
}else{
|
|
//dump("notfound".$travelGuide->id);
|
|
$val[] = 'notfound - div - '.$travelGuide->id;
|
|
}
|
|
}
|
|
|
|
|
|
return $ret;
|
|
}
|
|
|
|
private function replaceYoutubeLinks(&$val, $travelGuide)
|
|
{
|
|
$ret = [];
|
|
$dom = new \DOMDocument('1.0', 'utf-8');
|
|
@$dom->loadHTML(mb_convert_encoding($travelGuide->full_text, 'HTML-ENTITIES', 'UTF-8'));
|
|
$links = $dom->getElementsByTagName('iframe');
|
|
foreach ($links as $link) {
|
|
|
|
$src = $link->getAttribute('src');
|
|
|
|
|
|
//
|
|
$replace = false;
|
|
$reLink = false;
|
|
if($link->parentNode->nodeName === 'div'){
|
|
if($link->parentNode->getAttribute('class') === 'video-container'){
|
|
if($link->parentNode->parentNode->getAttribute('class') === 'mediaA' && $link->parentNode->parentNode->getAttribute('itemprop') !== 'video'){
|
|
$replace = $link->parentNode->parentNode;
|
|
$reLink = $link->parentNode;
|
|
}else{
|
|
$val[] = 'found - manual - '.$travelGuide->id;
|
|
}
|
|
}else{
|
|
$val[] = 'first div - manual - '.$travelGuide->id;
|
|
|
|
}
|
|
|
|
}elseif ($link->parentNode->nodeName === 'p'){
|
|
if($link->parentNode->parentNode->nodeName === 'div'){
|
|
if($link->parentNode->parentNode->getAttribute('itemprop') === 'video'){
|
|
//replace div
|
|
$replace = $link->parentNode->parentNode;
|
|
$reLink = $link->parentNode;
|
|
}else{
|
|
//replace p
|
|
$replace = $link->parentNode;
|
|
$reLink = $link;
|
|
}
|
|
}else{
|
|
$replace = $link->parentNode;
|
|
$reLink = $link;
|
|
}
|
|
|
|
}else{
|
|
$val[] = 'else div - manual - '.$travelGuide->id;
|
|
}
|
|
if($replace){
|
|
|
|
$id = preg_replace('/http.*?embed\//i', '', $src);
|
|
$videoID = preg_replace('#[&\?].+$#', '', $id);
|
|
$identifier = Str::slug(pre_slug($videoID), '-');
|
|
$IQContentFile = IQContentFile::whereIdentifier($identifier)->first();
|
|
if($IQContentFile) {
|
|
|
|
$video = new \DOMDocument('1.0', 'utf-8');
|
|
$makeText = '<?xml encoding="utf-8" ?><div class="mediaA" itemprop="video" itemscope itemtype="http://schema.org/VideoObject">';
|
|
$makeText .= '<h2><span itemprop="name">' . $IQContentFile->content['title'] . '</span></h2>';
|
|
$makeText .= '<meta itemprop="duration" content="' . $IQContentFile->content['duration'] . '" />';
|
|
$makeText .= '<meta itemprop="uploadDate" content="' . $IQContentFile->content['uploadDate'] . '"/>';
|
|
$makeText .= '<meta itemprop="thumbnailURL" content="' . $IQContentFile->content['thumbnailURL'] . '" />';
|
|
$makeText .= '<meta itemprop="embedURL" content="https://youtube.googleapis.com/v/' . $IQContentFile->content['id'] . '" />';
|
|
$makeText .= '<div class="video-container"><iframe src="https://www.youtube.com/embed/' . $IQContentFile->content['id'] . '?rel=0&controls=0&showinfo=0" data-identifier="' . $IQContentFile->identifier . '" data-slug="' . $IQContentFile->slug . '" frameborder="0" allowfullscreen></iframe></div>';
|
|
$makeText .= '<div class="mediaInfo"><p class="infotext" itemprop="description">'.$IQContentFile->content['description'].'</p></div></div>';
|
|
$makeText = str_replace('&', '&', $makeText);
|
|
$video->loadHTML($makeText);
|
|
$replace->insertBefore($dom->importNode($video->documentElement, true), $reLink->nextSibling);
|
|
$replace->removeChild($reLink);
|
|
$html = $dom->saveHTML();
|
|
|
|
$travelGuide->full_text = $html;
|
|
$travelGuide->save();
|
|
|
|
$val[] = 'replace - '.$travelGuide->id;
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
return $ret;
|
|
}
|
|
|
|
private function findYoutubeLinks(&$val, $travelGuide)
|
|
{
|
|
$ret = [];
|
|
$dom = new \DOMDocument('1.0', 'utf-8');
|
|
@$dom->loadHTML(mb_convert_encoding($travelGuide->full_text, 'HTML-ENTITIES', 'UTF-8'));
|
|
|
|
$links = $dom->getElementsByTagName('iframe');
|
|
foreach ($links as $link) {
|
|
|
|
$src = $link->getAttribute('src');
|
|
|
|
$id = preg_replace('/http.*?embed\//i', '', $src);
|
|
$videoID = preg_replace('#[&\?].+$#', '', $id);
|
|
|
|
$identifier = Str::slug(pre_slug($videoID), '-');
|
|
$count = IQContentFile::whereIdentifier($identifier)->count();
|
|
|
|
if($count === 0){
|
|
$ret[$videoID] = $count;
|
|
$val[] = "weitere;Travel-Guide;".$videoID.";";
|
|
}
|
|
}
|
|
return $ret;
|
|
}
|
|
//private?
|
|
public function h1ToTitleTravelGuide()
|
|
{
|
|
$TravelGuides = TravelGuide::all();
|
|
foreach ($TravelGuides as $travelGuide){
|
|
if(strpos($travelGuide->full_text,'<html><body><h1>' )){
|
|
$dom = new \DOMDocument('1.0', 'utf-8');
|
|
@$dom->loadHTML(mb_convert_encoding($travelGuide->full_text, 'HTML-ENTITIES', 'UTF-8'));
|
|
$elements = $dom->getElementsByTagName('h1');
|
|
|
|
foreach ($elements as $element) {
|
|
if($element->nodeValue != ""){
|
|
var_dump($travelGuide->id);
|
|
var_dump($element->nodeValue);
|
|
echo "<br>";
|
|
var_dump($travelGuide->name);
|
|
echo "<br>";
|
|
echo "--";
|
|
echo "<br>";
|
|
|
|
$new_text = preg_replace('/<h1[^>]*>([\s\S]*?)<\/h1[^>]*>/', '', $travelGuide->full_text);
|
|
|
|
$travelGuide->name = $element->nodeValue;
|
|
$travelGuide->full_text = $new_text;
|
|
$travelGuide->save();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
die("done");
|
|
}
|
|
|
|
public function readNodeAndSaveToTree(){
|
|
$input = Request::all();
|
|
$ret = [];
|
|
if(isset($input['text'])){
|
|
$out = $this->ul_to_array($input['text']);
|
|
$this->array_to_nodes($out);
|
|
}
|
|
die("done");
|
|
$data = [
|
|
'text' => $input['text'],
|
|
'values' => $ret,
|
|
];
|
|
return view('iq.tools.links', $data);
|
|
}
|
|
|
|
public function array_to_nodes($array, $lvl = 1, $parent_id = 1, $pos=100){
|
|
|
|
|
|
if(is_array($array)){
|
|
foreach ($array as $node){
|
|
if(isset($node['slug'])){
|
|
|
|
$slug = substr($node['slug'], 0, 80);
|
|
// $slug = substr($node['slug'], 0, strrpos($slug, " "));
|
|
|
|
$name = substr($node['name'], 0, 255);
|
|
// $name = substr($node['name'], 0, strrpos($name, " "));
|
|
|
|
|
|
$data = [
|
|
'tree_id' => 1,
|
|
'parent_id' => $parent_id,
|
|
'lvl' => $lvl,
|
|
'name' => $name,
|
|
'identifier' => $slug,
|
|
'active' => false,
|
|
'pos' => $pos++,
|
|
];
|
|
$tree_node = IQContentTreeNode::create($data);
|
|
|
|
|
|
$travel_guides = TravelGuide::whereSlug($node['slug'])->get();
|
|
foreach ($travel_guides as $travel_guide){
|
|
if(IQContentSite::whereTreeNodeId($tree_node->id)->whereTravelGuideId($travel_guide->id)->count() == 0) {
|
|
IQContentSite::create(['tree_node_id' => $tree_node->id, 'travel_guide_id' => $travel_guide->id]);
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
if(isset($node['children']) && is_array($node['children'])){
|
|
$this->array_to_nodes($node['children'], $lvl + 1, $tree_node->id, $pos);
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
public function ul_to_array($ol){
|
|
if(is_string($ol)){
|
|
if(!$ol = simplexml_load_string($ol)) {
|
|
trigger_error("Syntax error in UL/LI structure");
|
|
return FALSE;
|
|
}
|
|
return $this->ul_to_array($ol);
|
|
} else if(is_object($ol)){
|
|
$output = array();
|
|
foreach($ol->li as $li){
|
|
|
|
$tmp = false;
|
|
if(isset($li->ol)){
|
|
$tmp = $this->ul_to_array($li->ol);
|
|
}
|
|
|
|
if($li->count()){
|
|
|
|
$str = (string) $li;
|
|
|
|
$a = new \SimpleXMLElement($li->children()->asXML());
|
|
$str = (string) $a[0]." ".$str;
|
|
$str = str_replace("\n", "", $str);
|
|
$str = str_replace("\r", "", $str);
|
|
$str = str_replace("\t", "", $str);
|
|
$str = preg_replace(array('/\s{2,}/', '/[\t\n]/'), ' ', $str);
|
|
|
|
if(trim($str) !== "" && $str !== null){
|
|
$slug = (string) $a['href'];
|
|
$link = explode("/", $slug);
|
|
|
|
$link1 = array_pop($link);
|
|
$link1 = str_replace('.htm', '',$link1);
|
|
$output[] = ['slug'=> $link1, 'name'=>$str, 'children'=>$tmp];
|
|
}
|
|
}else{
|
|
$str = (string) $li;
|
|
$str = str_replace("\n", "", $str);
|
|
$str = str_replace("\r", "", $str);
|
|
$str = str_replace("\t", "", $str);
|
|
if(trim($str) !== "" && $str !== null){
|
|
|
|
$output[] = ['slug'=>'', 'name'=>$str, 'children'=>$tmp];
|
|
}
|
|
}
|
|
|
|
}
|
|
return $output;
|
|
} else {
|
|
return FALSE;
|
|
}
|
|
}
|
|
|
|
public function rindex()
|
|
{
|
|
$data = [
|
|
'text' => "",
|
|
'values' => [],
|
|
];
|
|
return view('iq.content.tools.redirects', $data);
|
|
}
|
|
|
|
public function rstore()
|
|
{
|
|
|
|
$iqContentTree = IQContentTree::find(2);
|
|
$this->makeTree($iqContentTree);
|
|
$input = Request::all();
|
|
$ret = [];
|
|
|
|
if(isset($input['text'])){
|
|
|
|
|
|
$dom = new \DOMDocument('1.0', 'utf-8');
|
|
@$dom->loadHTML(mb_convert_encoding($input['text'], 'HTML-ENTITIES', 'UTF-8'));
|
|
|
|
$tags = ['ol'];
|
|
foreach ($tags as $tag){
|
|
$domElements = [];
|
|
$elements = $dom->getElementsByTagName($tag)->item(0);
|
|
|
|
foreach($elements as $node){
|
|
foreach($node->childNodes as $child) {
|
|
$ret[] = array($child->nodeName => $child->nodeValue);
|
|
}
|
|
}
|
|
}
|
|
|
|
/* $tags = ['a']; foreach ($tags as $tag){
|
|
$domElements = [];
|
|
$elements = $dom->getElementsByTagName($tag);
|
|
foreach ($elements as $element) {
|
|
$domElements[] = $element;
|
|
|
|
}
|
|
foreach ($domElements as $domElement) {
|
|
$r = "-----";
|
|
$href = $domElement->getAttribute('href');
|
|
$link = explode("/", $href);
|
|
|
|
$link1 = array_pop($link);
|
|
$link1 = str_replace('.html', '',$link1);
|
|
$link1 = str_replace('-', '',$link1);
|
|
if(isset($this->tree[$link1])){
|
|
$r = $this->tree[$link1];
|
|
}else{
|
|
$link1 = array_pop($link);
|
|
$link1 = str_replace('.html', '',$link1);
|
|
$link1 = str_replace('-', '',$link1);
|
|
if(isset($this->tree[$link1])){
|
|
$r = $this->tree[$link1];
|
|
}
|
|
}
|
|
|
|
$ret[] = "Redirect 301 /".$href." ".$r;
|
|
|
|
}
|
|
}*/
|
|
|
|
}
|
|
$data = [
|
|
'text' => $input['text'],
|
|
'values' => $ret,
|
|
];
|
|
|
|
return view('iq.content.tools.redirects', $data);
|
|
|
|
}
|
|
|
|
public function makeTree(IQContentTree $iq_content_tree, $lvl = 0, $parent_id = false, $url = "")
|
|
{
|
|
|
|
if ($parent_id) {
|
|
//where('active', true)
|
|
$tree_nodes = IQContentTreeNode::where('tree_id', $iq_content_tree->id)->where('lvl', $lvl)->where('active', true)->where('parent_id', $parent_id)->orderBy('pos', 'ASC')->get();
|
|
} else {
|
|
|
|
$url = "/" . $iq_content_tree->identifier . "/";
|
|
$tree_nodes = IQContentTreeNode::where('tree_id', $iq_content_tree->id)->where('lvl', $lvl)->where('active', true)->orderBy('pos', 'ASC')->get();
|
|
}
|
|
|
|
foreach ($tree_nodes as $node) {
|
|
$children = IQContentTreeNode::where('tree_id', $iq_content_tree->id)->where('lvl', $lvl + 1)->where('active', true)->where('parent_id', $node->id)->count();
|
|
$this->tree[str_replace('-', '', $node->identifier)] = url($url . $node->identifier);
|
|
|
|
if ($children) {
|
|
$this->makeTree($iq_content_tree, $lvl + 1, $node->id, $url . $node->identifier . "/");
|
|
|
|
}
|
|
}
|
|
return true;
|
|
}
|
|
}
|