function render($mode, &$renderer, $data) { global $conf; $printer = $this->_selectPrinter($mode, $renderer, $data); if (!$this->_isNamespaceUsable($data)) { $printer->printUnusableNamespace($data['wantedNS']); return TRUE; } $fileHelper = new fileHelper($data); $pages = $fileHelper->getPages(); $subnamespaces = $fileHelper->getSubnamespaces(); if ($this->_shouldPrintPagesAmongNamespaces($data)) { $subnamespaces = array_merge($subnamespaces, $pages); } $this->_print($printer, $data, $subnamespaces, $pages); $printer->printEnd(); return TRUE; }
function render($mode, &$renderer, $data) { global $conf; $this->_deactivateTheCacheIfNeeded($renderer); if ($data['useLegacySyntax']) { action_plugin_nspages::logUseLegacySyntax(); } //Load lang now rather than at handle-time, otherwise it doesn't //behave well with the translation plugin (it seems like we cache strings //even if the lang doesn't match) $this->_denullifyLangOptions($data); $printer = $this->_selectPrinter($mode, $renderer, $data); if (!$this->_isNamespaceUsable($data)) { $printer->printUnusableNamespace($data['wantedNS']); return TRUE; } $fileHelper = new fileHelper($data); $pages = $fileHelper->getPages(); $subnamespaces = $fileHelper->getSubnamespaces(); if ($this->_shouldPrintPagesAmongNamespaces($data)) { $subnamespaces = array_merge($subnamespaces, $pages); } $printer->printBeginning(); $this->_print($printer, $data, $subnamespaces, $pages); $printer->printEnd(); return TRUE; }
<?php if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) { die; } foreach ($arResult['TASK']['PROPS']['FILES']['VALUE'] as &$file) { $f = new fileHelper($file); $file['icon'] = $f->getFileIcon(); $file['class'] = $f->getFileClass(); $file['TRUNCATED_NAME'] = TruncateText($file['ORIGINAL_NAME'], 20); $file["FILE_SIZE"] = formatBytes($file["FILE_SIZE"]); } foreach ($arResult['COMMENTS'] as &$comment) { foreach ($comment['FILES'] as &$file) { $f = new fileHelper($file); $file['icon'] = $f->getFileIcon(); $file['class'] = $f->getFileClass(); $file['TRUNCATED_NAME'] = TruncateText($file['ORIGINAL_NAME'], 20); $file["FILE_SIZE"] = formatBytes($file["FILE_SIZE"]); } }