1: <?php
2:
3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14:
15:
16: defined('CON_FRAMEWORK') || die('Illegal call: Missing framework initialization - request aborted.');
17:
18: cInclude('includes', 'functions.con.php');
19: cInclude('includes', 'functions.upl.php');
20:
21: 22: 23: 24: 25: 26:
27: class cContentTypeLinkeditor extends cContentTypeAbstractTabbed {
28:
29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40:
41: function __construct($rawSettings, $id, array $contentTypes) {
42:
43:
44: $this->_type = 'CMS_LINKEDITOR';
45: $this->_prefix = 'linkeditor';
46: $this->_settingsType = self::SETTINGS_TYPE_XML;
47: $this->_formFields = array(
48: 'linkeditor_type',
49: 'linkeditor_externallink',
50: 'linkeditor_title',
51: 'linkeditor_newwindow',
52: 'linkeditor_idart',
53: 'linkeditor_filename'
54: );
55:
56:
57: $rawSettings = conHtmlEntityDecode($rawSettings);
58: $rawSettings = utf8_encode($rawSettings);
59:
60:
61: parent::__construct($rawSettings, $id, $contentTypes);
62:
63: $this->_settings['linkeditor_title'] = utf8_decode($this->_settings['linkeditor_title']);
64: $this->_settings['linkeditor_title'] = conHtmlentities($this->_settings['linkeditor_title']);
65:
66:
67:
68:
69: if (isset($_POST['linkeditor_action']) && $_POST['linkeditor_action'] === 'store' && isset($_POST['linkeditor_id']) && (int) $_POST['linkeditor_id'] == $this->_id) {
70:
71:
72: $_POST['linkeditor_title'] = conHtmlentities(conHtmlEntityDecode($_POST['linkeditor_title']));
73: $this->_storeSettings();
74: }
75: }
76:
77: 78: 79: 80: 81:
82: public function getLinkType() {
83: return $this->_settings['linkeditor_type'];
84: }
85:
86: 87: 88: 89: 90:
91: public function getTitle() {
92: return $this->_settings['linkeditor_title'];
93: }
94:
95: 96: 97: 98: 99:
100: public function getTarget() {
101: return ($this->_settings['linkeditor_newwindow'] === 'true') ? '_blank' : '';
102: }
103:
104: 105: 106: 107: 108:
109: public function getLink() {
110: return $this->_generateHref();
111: }
112:
113: 114: 115: 116: 117: 118: 119:
120: public function getConfiguredData() {
121: $data = array(
122: 'type' => $this->_settings['linkeditor_type'],
123: 'externallink' => $this->_settings['linkeditor_externallink'],
124: 'title' => $this->_settings['linkeditor_title'],
125: 'newwindow' => $this->_settings['linkeditor_newwindow'],
126: 'idart' => $this->_settings['linkeditor_idart'],
127: 'filename' => $this->_settings['linkeditor_filename'],
128: 'href' => $this->_generateHref()
129: );
130:
131: return $data;
132: }
133:
134: 135: 136: 137: 138: 139: 140:
141: public function generateViewCode() {
142:
143: $href = $this->_generateHref();
144: if (empty($href)) {
145: return '';
146: }
147: $linktext = $this->_settings['linkeditor_title'];
148:
149: if (empty($linktext)) {
150: $linktext = $href;
151: }
152: $target = ($this->_settings['linkeditor_newwindow'] === 'true') ? '_blank' : '';
153:
154: $link = new cHTMLLink($href);
155: $link->setClass('link_list');
156: $link->setTargetFrame($target);
157: $link->setContent($linktext);
158:
159: return $this->_encodeForOutput($link->render());
160: }
161:
162: 163: 164: 165: 166: 167:
168: protected function _generateHref() {
169: switch ($this->_settings['linkeditor_type']) {
170: case 'external':
171:
172: $link = $this->_settings['linkeditor_externallink'];
173: if (strpos($link, 'http://') !== 0 && strpos($link, 'www.') === 0) {
174: $link = 'http://' . $link;
175: }
176: return $link;
177: break;
178: case 'internal':
179: if ($this->_settings['linkeditor_idart'] != "") {
180:
181: $oUri = cUri::getInstance();
182: $uriBuilder = $oUri->getUriBuilder();
183: $uriParams = array(
184: 'idart' => $this->_settings['linkeditor_idart']
185: );
186: $uriBuilder->buildUrl($uriParams, true);
187:
188: return $uriBuilder->getUrl();
189:
190: }
191: break;
192: case 'file':
193: return $this->_cfgClient[$this->_client]['upl']['htmlpath'] . $this->_settings['linkeditor_filename'];
194: break;
195: default:
196:
197: return '';
198: }
199: }
200:
201: 202: 203: 204: 205: 206:
207: public function generateEditCode() {
208: $template = new cTemplate();
209: $template->set('s', 'ID', $this->_id);
210: $template->set('s', 'IDARTLANG', $this->_idArtLang);
211: $template->set('s', 'FIELDS', "'" . implode("','", $this->_formFields) . "'");
212:
213: $templateTabs = new cTemplate();
214: $templateTabs->set('s', 'PREFIX', $this->_prefix);
215:
216:
217: $templateTabs->set('d', 'TAB_ID', 'external');
218: $templateTabs->set('d', 'TAB_CLASS', 'external');
219: $templateTabs->set('d', 'TAB_CONTENT', $this->_generateTabExternal());
220: $templateTabs->next();
221:
222:
223: $templateTabs->set('d', 'TAB_ID', 'internal');
224: $templateTabs->set('d', 'TAB_CLASS', 'internal');
225: $templateTabs->set('d', 'TAB_CONTENT', $this->_generateTabInternal());
226: $templateTabs->next();
227:
228:
229: $templateTabs->set('d', 'TAB_ID', 'file');
230: $templateTabs->set('d', 'TAB_CLASS', 'file');
231: $templateTabs->set('d', 'TAB_CONTENT', $this->_generateTabFile());
232: $templateTabs->next();
233:
234:
235:
236: $templateTabs->set('d', 'TAB_ID', 'basic-settings');
237: $templateTabs->set('d', 'TAB_CLASS', 'basic-settings');
238: $templateTabs->set('d', 'TAB_CONTENT', $this->_generateBasicSettings());
239: $templateTabs->next();
240:
241: $codeTabs = $templateTabs->generate($this->_cfg['path']['contenido'] . 'templates/standard/template.cms_abstract_tabbed_edit_tabs.html', true);
242:
243:
244: $templateTop = new cTemplate();
245: $templateTop->set('s', 'ICON', 'images/but_editlink.gif');
246: $templateTop->set('s', 'ID', $this->_id);
247: $templateTop->set('s', 'PREFIX', $this->_prefix);
248: $templateTop->set('s', 'HEADLINE', i18n('Link settings'));
249: $codeTop = $templateTop->generate($this->_cfg['path']['contenido'] . 'templates/standard/template.cms_abstract_tabbed_edit_top.html', true);
250:
251:
252: $tabMenu = array(
253: 'external' => i18n('External link'),
254: 'internal' => i18n('Internal link'),
255: 'file' => i18n('Link to a file')
256: );
257:
258:
259: $templateBottom = new cTemplate();
260: $templateBottom->set('s', 'PATH_FRONTEND', $this->_cfgClient[$this->_client]['path']['htmlpath']);
261: $templateBottom->set('s', 'ID', $this->_id);
262: $templateBottom->set('s', 'PREFIX', $this->_prefix);
263: $templateBottom->set('s', 'IDARTLANG', $this->_idArtLang);
264: $templateBottom->set('s', 'FIELDS', "'" . implode("','", $this->_formFields) . "'");
265: $templateBottom->set('s', 'SETTINGS', json_encode($this->_settings));
266: $templateBottom->set('s', 'JS_CLASS_SCRIPT', $this->_cfg['path']['contenido_fullhtml'] . 'scripts/content_types/cmsLinkeditor.js');
267: $templateBottom->set('s', 'JS_CLASS_NAME', 'Con.cContentTypeLinkeditor');
268: $codeBottom = $templateBottom->generate($this->_cfg['path']['contenido'] . 'templates/standard/template.cms_abstract_tabbed_edit_bottom.html', true);
269:
270:
271: $code = $this->generateViewCode();
272: $code .= $this->_encodeForOutput($codeTop);
273: $code .= $this->_generateTabMenuCode($tabMenu);
274: $code .= $this->_encodeForOutput($codeTabs);
275: $code .= $this->_generateActionCode();
276: $code .= $this->_encodeForOutput($codeBottom);
277:
278: return $code;
279: }
280:
281: 282: 283: 284: 285: 286: 287:
288: private function _generateTabExternal() {
289:
290: $wrapper = new cHTMLDiv();
291: $wrapperContent = array();
292:
293: $wrapperContent[] = new cHTMLLabel(i18n('Href'), 'linkeditor_externallink_' . $this->_id);
294: $wrapperContent[] = new cHTMLTextbox('linkeditor_externallink_' . $this->_id, $this->_settings['linkeditor_externallink'], '', '', 'linkeditor_externallink_' . $this->_id);
295:
296: $wrapper->setContent($wrapperContent);
297:
298: return $wrapper->render();
299: }
300:
301: 302: 303: 304: 305: 306: 307: 308: 309:
310: private function _generateBasicSettings() {
311:
312:
313: $wrapper = new cHTMLDiv();
314: $wrapperContent = array();
315:
316: $wrapperContent[] = new cHTMLLabel(i18n('Title'), 'linkeditor_title_' . $this->_id);
317: $title = conHtmlEntityDecode($this->_settings['linkeditor_title']);
318: $wrapperContent[] = new cHTMLTextbox('linkeditor_title_' . $this->_id, $title, '', '', 'linkeditor_title_' . $this->_id);
319: $wrapperContent[] = new cHTMLCheckbox('linkeditor_newwindow_' . $this->_id, '', 'linkeditor_newwindow_' . $this->_id, ($this->_settings['linkeditor_newwindow'] === 'true'));
320: $wrapperContent[] = new cHTMLLabel(i18n('Open in a new window'), 'linkeditor_newwindow_' . $this->_id);
321:
322: $wrapper->setContent($wrapperContent);
323:
324: return $wrapper->render();
325: }
326:
327: 328: 329: 330: 331: 332: 333:
334: private function _generateTabInternal() {
335:
336: $wrapper = new cHTMLDiv();
337: $wrapperContent = array();
338:
339: $directoryList = new cHTMLDiv('', 'directoryList', 'directoryList' . '_' . $this->_id);
340: $liRoot = new cHTMLListItem('root', 'last');
341: $aUpload = new cHTMLLink('#');
342: $aUpload->setClass('on');
343: $aUpload->setAttribute('title', '0');
344: $aUpload->setContent('Root');
345: $directoryListCode = $this->getCategoryList($this->buildCategoryArray());
346: $div = new cHTMLDiv(array(
347: '<em><a href="#"></a></em>',
348: $aUpload
349: ));
350: $liRoot->setContent(array(
351: $div,
352: $directoryListCode
353: ));
354: $conStrTree = new cHTMLList('ul', 'con_str_tree', 'con_str_tree', $liRoot);
355: $directoryList->setContent($conStrTree);
356: $wrapperContent[] = $directoryList;
357:
358: $activeIdcats = $this->_getActiveIdcats();
359: $wrapperContent[] = new cHTMLDiv($this->generateArticleSelect($activeIdcats[0]), 'directoryFile', 'directoryFile' . '_' . $this->_id);
360:
361: $wrapper->setContent($wrapperContent);
362:
363: return $wrapper->render();
364: }
365:
366: 367: 368: 369: 370: 371: 372: 373:
374: public function buildCategoryArray($level = 0, $parentid = 0) {
375: $db = cRegistry::getDb();
376: $directories = array();
377: $sql = 'SELECT distinct
378: *
379: FROM
380: ' . $this->_cfg['tab']['cat_tree'] . ' AS a,
381: ' . $this->_cfg['tab']['cat'] . ' AS c,
382: ' . $this->_cfg['tab']['cat_lang'] . ' AS d
383: WHERE
384: a.level = ' . $level . ' AND
385: c.parentid = ' . $parentid . ' AND
386: a.idcat = d.idcat AND
387: c.idcat = a.idcat AND
388: d.idlang = ' . cSecurity::toInteger($this->_lang) . ' AND
389: c.idclient = ' . cSecurity::toInteger($this->_client) . '
390: ORDER BY
391: a.idtree';
392:
393: $db->query($sql);
394: while ($db->nextRecord()) {
395: $directory = array();
396: $directory['idcat'] = $db->f('idcat');
397: $directory['name'] = $db->f('name');
398: $directory['sub'] = $this->buildCategoryArray($level + 1, $directory['idcat']);
399: $directories[] = $directory;
400: }
401:
402: return $directories;
403: }
404:
405: 406: 407: 408: 409: 410: 411: 412: 413:
414: public function getCategoryList(array $categories) {
415: $template = new cTemplate();
416: $i = 1;
417:
418: foreach ($categories as $category) {
419: $activeIdcats = $this->_getActiveIdcats();
420:
421: $divClass = (isset($activeIdcats[0]) && $category['idcat'] == $activeIdcats[0]) ? 'active' : '';
422: $template->set('d', 'DIVCLASS', $divClass);
423:
424: $template->set('d', 'TITLE', $category['idcat']);
425: $template->set('d', 'DIRNAME', $category['name']);
426:
427: $liClasses = array();
428:
429: if (in_array($category['idcat'], $activeIdcats) && $category['sub'] != '') {
430: $template->set('d', 'SUBDIRLIST', $this->getCategoryList($category['sub']));
431: } else if ($category['sub'] != '' && count($category['sub']) > 0) {
432: $liClasses[] = 'collapsed';
433: $template->set('d', 'SUBDIRLIST', '');
434: } else {
435: $template->set('d', 'SUBDIRLIST', '');
436: }
437:
438: if ($i === count($categories)) {
439: $liClasses[] = 'last';
440: }
441:
442: $template->set('d', 'LICLASS', implode(' ', $liClasses));
443:
444: $i++;
445: $template->next();
446: }
447:
448: return $template->generate($this->_cfg['path']['contenido'] . 'templates/standard/template.cms_filelist_dirlistitem.html', true);
449: }
450:
451: 452: 453: 454: 455: 456:
457: private function _getActiveIdcats() {
458: $activeIdcats = array();
459: if ($this->_settings['linkeditor_type'] === 'internal') {
460: $sql = 'SELECT distinct
461: *
462: FROM
463: ' . $this->_cfg['tab']['cat_tree'] . ' AS a,
464: ' . $this->_cfg['tab']['cat_art'] . ' AS b,
465: ' . $this->_cfg['tab']['cat'] . ' AS c,
466: ' . $this->_cfg['tab']['cat_lang'] . ' AS d
467: WHERE
468: b.idart = ' . cSecurity::toInteger($this->_settings['linkeditor_idart']) . ' AND
469: a.idcat = d.idcat AND
470: b.idcat = c.idcat AND
471: c.idcat = a.idcat AND
472: d.idlang = ' . cSecurity::toInteger($this->_lang) . ' AND
473: c.idclient = ' . cSecurity::toInteger($this->_client) . '
474: ORDER BY
475: a.idtree';
476: $db = cRegistry::getDb();
477: $db->query($sql);
478: while ($db->nextRecord()) {
479: $activeIdcats = $this->_getParentIdcats($db->f('idcat'));
480: }
481: }
482:
483: return $activeIdcats;
484: }
485:
486: 487: 488: 489: 490: 491: 492: 493: 494: 495:
496: private function _getParentIdcats($idcat, array $idcats = array()) {
497:
498: $idcats[] = $idcat;
499:
500:
501: $category = new cApiCategory($idcat);
502: $parentId = $category->get('parentid');
503: if ($parentId != 0) {
504: $idcats = $this->_getParentIdcats($parentId, $idcats);
505: }
506:
507: return $idcats;
508: }
509:
510: 511: 512: 513: 514: 515: 516: 517:
518: public function generateArticleSelect($idCat = 0) {
519: $htmlSelect = new cHTMLSelectElement('linkeditor_idart', '', 'linkeditor_idart_' . $this->_id);
520: $htmlSelect->setSize(16);
521: $htmlSelectOption = new cHTMLOptionElement('Kein', '', false);
522: $htmlSelect->appendOptionElement($htmlSelectOption);
523:
524: if (empty($idCat)) {
525: return $htmlSelect->render();
526: }
527:
528:
529:
530: $sql = 'SELECT distinct
531: e.*
532: FROM
533: ' . $this->_cfg['tab']['cat_tree'] . ' AS a,
534: ' . $this->_cfg['tab']['cat_art'] . ' AS b,
535: ' . $this->_cfg['tab']['cat'] . ' AS c,
536: ' . $this->_cfg['tab']['cat_lang'] . ' AS d,
537: ' . $this->_cfg['tab']['art_lang'] . ' AS e
538: WHERE
539: c.idcat = ' . $idCat . ' AND
540: e.online = 1 AND
541: a.idcat = b.idcat AND
542: b.idcat = d.idcat AND
543: d.idlang = ' . cSecurity::toInteger($this->_lang) . ' AND
544: b.idart = e.idart AND
545: c.idcat = a.idcat AND
546: c.idclient = ' . cSecurity::toInteger($this->_client) . ' AND
547: e.idlang = ' . cSecurity::toInteger($this->_lang) . '
548: ORDER BY
549: e.title';
550: $db = cRegistry::getDb();
551: $db->query($sql);
552: while ($db->nextRecord()) {
553: $htmlSelectOption = new cHTMLOptionElement($db->f('title'), $db->f('idart'), ($db->f('idart') == $this->_settings['linkeditor_idart']));
554: $htmlSelect->appendOptionElement($htmlSelectOption);
555: }
556:
557: return $htmlSelect->render();
558: }
559:
560: 561: 562: 563: 564: 565: 566:
567: private function _generateTabFile() {
568:
569: $wrapper = new cHTMLDiv();
570: $wrapperContent = array();
571:
572:
573: $newDirForm = new cHTMLForm();
574: $newDirForm->setAttribute('name', 'newdir');
575: $newDirForm->setAttribute('method', 'post');
576: $newDirForm->setAttribute('action', $this->_cfg['path']['contenido_fullhtml'] . 'main.php');
577: $caption1Span = new cHTMLSpan();
578: $caption1Span->setID('caption1');
579: $newDirHead = new cHTMLDiv(array(
580: '<b>' . i18n('Create a directory in') . '</b>',
581: $caption1Span
582: ));
583: $area = new cHTMLHiddenField('area', 'upl');
584: $action = new cHTMLHiddenField('action', 'upl_mkdir');
585: $frame = new cHTMLHiddenField('frame', '2');
586: $appendparameters = new cHTMLHiddenField('appendparameters');
587: $contenido = new cHTMLHiddenField('contenido', $_REQUEST['contenido']);
588: $path = new cHTMLHiddenField('path');
589: $foldername = new cHTMLTextbox('foldername');
590: $button = new cHTMLButton('', '', '', false, NULL, '', 'image');
591: $button->setAttribute('src', $this->_cfg['path']['contenido_fullhtml'] . 'images/submit.gif');
592: $newDirContent = new cHTMLDiv(array(
593: $area,
594: $action,
595: $frame,
596: $appendparameters,
597: $contenido,
598: $path,
599: $foldername,
600: $button
601: ));
602: $newDirForm->setContent(array(
603: $newDirHead,
604: $newDirContent
605: ));
606: $wrapperContent[] = $newDirForm;
607:
608:
609: $propertiesForm = new cHTMLForm();
610: $propertiesForm->setID('properties' . $this->_id);
611: $propertiesForm->setAttribute('name', 'properties');
612: $propertiesForm->setAttribute('method', 'post');
613: $propertiesForm->setAttribute('action', $this->_cfg['path']['contenido_fullhtml'] . 'main.php');
614: $propertiesForm->setAttribute('enctype', 'multipart/form-data');
615: $frame = new cHTMLHiddenField('frame', '4');
616: $area = new cHTMLHiddenField('area', 'upl');
617: $path = new cHTMLHiddenField('path');
618: $file = new cHTMLHiddenField('file');
619: $action = new cHTMLHiddenField('action', 'upl_upload');
620: $appendparameters = new cHTMLHiddenField('appendparameters');
621: $contenido = new cHTMLHiddenField('contenido', $_REQUEST['contenido']);
622: $caption2Span = new cHTMLSpan();
623: $caption2Span->setID('caption2');
624: $propertiesHead = new cHTMLDiv(array(
625: '<b>' . i18n('Path') . '</b>',
626: $caption2Span
627: ));
628: $imageUpload = new cHTMLUpload('file[]', '', '', 'cms_image_m' . $this->_id, false, '', '', 'file');
629: $imageUpload->setClass('jqueryAjaxUpload');
630: $propertiesForm->setContent(array(
631: $frame,
632: $area,
633: $path,
634: $file,
635: $action,
636: $appendparameters,
637: $contenido,
638: $propertiesHead,
639: $imageUpload
640: ));
641: $wrapperContent[] = $propertiesForm;
642:
643: $wrapperContent[] = new cHTMLImage($this->_cfg['path']['contenido_fullhtml'] . 'images/ajax-loader.gif', 'loading');
644:
645:
646: $directoryList = new cHTMLDiv('', 'directoryList', 'directoryList_' . $this->_id);
647: $liRoot = new cHTMLListItem('root', 'last');
648: $aUpload = new cHTMLLink('#');
649: $aUpload->setClass('on');
650: $aUpload->setAttribute('title', 'upload');
651: $aUpload->setContent('Uploads');
652: $directoryListCode = $this->generateDirectoryList($this->buildDirectoryList());
653: $div = new cHTMLDiv(array(
654: '<em><a href="#"></a></em>',
655: $aUpload
656: ));
657:
658: if (dirname($this->_settings['linkeditor_filename']) === '\\') {
659: $div->setClass('active');
660: }
661: $liRoot->setContent(array(
662: $div,
663: $directoryListCode
664: ));
665: $conStrTree = new cHTMLList('ul', 'con_str_tree', 'con_str_tree', $liRoot);
666: $directoryList->setContent($conStrTree);
667: $wrapperContent[] = $directoryList;
668:
669: $wrapperContent[] = new cHTMLDiv($this->getUploadFileSelect(dirname($this->_settings['linkeditor_filename'])), 'directoryFile', 'directoryFile' . '_' . $this->_id);
670:
671: $wrapper->setContent($wrapperContent);
672:
673: return $wrapper->render();
674: }
675:
676: 677: 678: 679: 680: 681: 682: 683:
684: public function getUploadFileSelect($directoryPath = '') {
685:
686: $directoryPath = str_replace('\\', '/', $directoryPath);
687:
688:
689: if ($directoryPath === '/') {
690: $directoryPath = '';
691: }
692:
693: if ($directoryPath !== '' && substr($directoryPath, -1) != '/') {
694: $directoryPath .= '/';
695: }
696:
697: $htmlSelect = new cHTMLSelectElement('linkeditor_filename', '', 'linkeditor_filename_' . $this->_id);
698: $htmlSelect->setSize(16);
699: $htmlSelectOption = new cHTMLOptionElement('Kein', '', false);
700: $htmlSelect->addOptionElement(0, $htmlSelectOption);
701:
702: $files = array();
703: if (is_dir($this->_uploadPath . $directoryPath)) {
704:
705: if (false !== ($handle = cDirHandler::read($this->_uploadPath . $directoryPath, false, false, true))) {
706: foreach ($handle as $entry) {
707: if (cFileHandler::fileNameBeginsWithDot($entry) === false) {
708: $file = array();
709: $file["name"] = $entry;
710: $file["path"] = $directoryPath . $entry;
711: $files[] = $file;
712: }
713: }
714: }
715: }
716:
717: usort($files, function($a, $b) {
718: $a = mb_strtolower($a["name"]);
719: $b = mb_strtolower($b["name"]);
720: if($a < $b) {
721: return -1;
722: } else if($a > $b) {
723: return 1;
724: } else {
725: return 0;
726: }
727: });
728:
729: $i = 1;
730: foreach($files as $file) {
731: $htmlSelectOption = new cHTMLOptionElement($file["name"], $file["path"]);
732: $htmlSelect->addOptionElement($i, $htmlSelectOption);
733: $i++;
734: }
735:
736:
737:
738: if ($this->_settings['linkeditor_type'] === 'file') {
739: $htmlSelect->setDefault($this->_settings['linkeditor_filename']);
740: }
741:
742: return $htmlSelect->render();
743: }
744:
745: 746: 747: 748: 749: 750: 751: 752: 753: 754: 755:
756: protected function _isActiveDirectory(array $dirData) {
757: return $dirData['path'] . $dirData['name'] === dirname($this->_settings['linkeditor_filename']);
758: }
759:
760: 761: 762: 763: 764: 765: 766: 767: 768: 769: 770:
771: protected function _shouldDirectoryBeExpanded(array $dirData) {
772: return $this->_isSubdirectory($dirData['path'] . $dirData['name'], $this->_dirname);
773: }
774:
775: }
776: