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