// Check if a special listview was chosen if ($listViewExtensionId == '') { $listViewExtensionId = 0; } if ($listViewExtensionId == 0) { // Find default extension foreach ($listviewExtensions as $listviewExtension) { if ($listviewExtension['CODE'] == 'defaultCblockListView') { $listViewExtensionId = $listviewExtension['ID']; $isDefaultExtension = true; } } } if ($listViewExtensionId) { // Get entries for special from chosen extension $objectInfo = $extensionMgr->get($listViewExtensionId); if ($objectInfo["CODE"]) { $extension = $extensionMgr->getExtension($objectInfo["CODE"]); if ($extension && $objectInfo["INSTALLED"]) { $extensionProperties = $extension->properties; $listColumns = $extension->getListColumns(); if (strtoupper($this->page) == 'CONTENTBLOCK_LISTITEM') { $filterArray = array(array('CBID' => $coId)); } else { // Get additional information about contentblock $cb = sCblockMgr()->getCblock($coFolderID); $coInfo = $cb->get(); $coListCount = $extension->getCblockListCount($coFolderID, "SUBNODES", $coInfo['LEVEL'] + 1, 0, array()); // for paging $pageDirInfo = calcPageDir($coListCount, '0', 'ASC'); //$pageDirOrderBy = $pageDirInfo['pageDirOrderBy'];
$output = $cos; } } } elseif (substr($objectType, 0, 3) == 'ext') { // extension mode $extensionMgr = new ExtensionMgr(); $filetypeMgr = new Filetypes(); $loop = 0; foreach ($data as $item) { $coid = $item[0]; $contentarea = $item[1]; $contentarea_id = $item[2]; $colnkid = $item[3]; $extension_id = explode('-', $item[3]); $extension_id = $extension_id[1]; $ex = $extensioninfo = $extensionMgr->get($extension_id); $extension = $extensionMgr->getExtension($ex["CODE"], $pageID, $pageInfo['VERSION'], $siteID); if ($extension) { $props = $extension->properties->getList('LISTORDER'); foreach ($props as $prop_idx => $prop) { $props[$prop_idx]['VALUE'] = $extension->properties->getValueInternal($prop['IDENTIFIER']); if ($props[$prop_idx]['TYPE'] == 'LIST') { $props[$prop_idx]['LIST_VALUES'] = $extension->propertySettings->getListValues($prop['IDENTIFIER']); } if ($props[$prop_idx]['TYPE'] == 'FILE') { if (strlen(trim($props[$prop_idx]['VALUE'])) > 0) { $file = sFileMgr()->getFile($props[$prop_idx]['VALUE']); if ($file) { $fileInfo = $file->get(); $props[$prop_idx]['COLOR'] = $fileInfo['COLOR']; $props[$prop_idx]['TYPECODE'] = $fileInfo['CODE'];
$cblocks = sCblockMgr()->getList(); $cblockID = $cblocks[0]['ID']; } // Check if copying a template cblock is requested (or creating a new one) $copyCBlock = false; if ($mode == 'list') { if ($coListExtensionId == 0) { $listviewExtensions = $extensionMgr->getList(EXTENSION_CBLOCKLISTVIEW, true); // Find default extension foreach ($listviewExtensions as $listviewExtension) { if ($listviewExtension['CODE'] == 'defaultCblockListView') { $coListExtensionId = $listviewExtension['ID']; } } } $extensionInfo = $extensionMgr->get($coListExtensionId); if ($extensionInfo['CODE']) { $extension = $extensionMgr->getExtension($extensionInfo['CODE']); if ($extension && $extensionInfo['INSTALLED']) { $defaultCo = $extension->extensionProperties->getValueInternal('DEFAULT_CO'); $defaultcb = sCblockMgr()->getCblock($defaultCo); if ($defaultCo) { $copyCBlock = true; } } } } if ($copyCBlock) { // Copy template cblock $new_id = sCblockMgr()->add($cblockID); $newcb = sCblockMgr()->getCblock($new_id);
<?php $extensionMgr = new ExtensionMgr(); $extensionId = $this->request->parameters['extensionId']; $fileName = $this->request->parameters['fileName']; $mimeType = $this->request->parameters['mimeType']; $extensionInfo = $extensionMgr->get($extensionId); if ($extensionInfo['CODE']) { $extension = $extensionMgr->getExtension($extensionInfo['CODE']); if ($extension) { $extension->fetchFile($fileName, $mimeType, $this->approot . $this->extensiondir); } }
$target_type = 'PAGE'; $history[$i]['NEWVALUE'] = '<div class="iconpage"></div>' . $linkInfo['NAME']; break; case 'file': $target_type = 'FILE'; $history[$i]['NEWVALUE'] = '<span onmouseover="$K.yg_hoverFileHint(\'' . $linkInfo['INFO']['FILE_ID'] . '\', event);"><span style="display:inline-block;" class="filetype ' . $linkInfo['INFO']['COLOR'] . '">' . $linkInfo['INFO']['CODE'] . '</span> ' . "<a onclick=\"\$K.yg_openObjectDetails('" . $linkInfo['INFO']['FILE_ID'] . "', 'file', '" . $linkInfo['NAME'] . "', {color:'" . $linkInfo['INFO']['COLOR'] . "',typecode:'" . $linkInfo['INFO']['CODE'] . "'});\">" . $linkInfo['NAME'] . "</a></span>"; break; } } } } } // For Extension-Logging if ($history[$i]['TEXT'] == 'TXT_EXTENSION_H_LOGENTRY') { $extensionManager = new ExtensionMgr(); $extensionInfo = $extensionManager->get($history[$i]['OLDVALUE']); $history[$i]['NEWVALUE'] = '<div class="modified">' . $extensionInfo['NAME'] . ' <em>' . $history[$i]['NEWVALUE'] . '</em></div>'; } $lastuserid = $history[$i]["UID"]; $tKey = $history[$i]['TEXT']; $pKey = $history[$i]['TAB']; $dKey = $history[$i]['DATETIME']; // Only get history entries for Yeager if (strpos($tKey, 'TXT_') === 0) { $show_entry = false; if ($filterAction == 'ONLY_VERSIONS') { if ($pKey == 'P_VERSIONS') { $show_entry = true; } else { $show_entry = false; }
$pageID = $this->params['page']; $siteID = $this->params['site']; if ($pageID && $siteID && is_numeric($siteID)) { $PageMgr = new PageMgr($siteID); $page = $PageMgr->getPage($pageID); $pageInfo = $page->get(); } $jsQueue = new JSQueue(NULL); $extensionMgr = new ExtensionMgr(); switch ($action) { case 'extensionExportData': $extensionid = $this->params['extensionId']; $uploadwinid = $this->params['uploadWinId']; $openerwinid = $this->params['openerWinId']; $extensioninfo = $extensionMgr->get($extensionid); if ($extensioninfo['CODE']) { $extension = $extensionMgr->getExtension($extensioninfo['CODE']); if ($extension) { $filelist = array(); $extension->export($filelist); $koala->callJSFunction('Koala.windows[\'wid_' . $uploadwinid . '\'].setCaption', $itext['TXT_EXPORT_FILES'], 'extensionexport'); $koala->queueScript('Koala.windows[\'' . $openerwinid . '\'].tabs.select(0, Koala.windows[\'' . $openerwinid . '\'].tabs.params);'); $fileIdx = 1; foreach ($filelist as $file) { $koala->callJSFunction('Koala.yg_addExtensionExportFile', $uploadwinid, $extensionid, $fileIdx, $file['FILENAME'], $file['MIME']); $fileIdx++; } // Clear all properties after export $properties = $extension->exportProperties->getList(); foreach ($properties as $property) {
$smarty->assign('mobile', $mobile); $smarty->assign('website', $website); $smarty->assign('password', $password); } break; case 'usergroup': $no_traceline = true; $autosave = true; $object_permissions['RWRITE'] = sUsergroups()->usergroupPermissions->checkInternal(sUserMgr()->getCurrentUserID(), $object, 'RWRITE'); $objectInfo = sUsergroups()->get($object); $objectdynprops = array(0 => array(0 => 'Name', 'NAME' => 'Name', 1 => 1, 'ID' => 1, 2 => 'NAME', 'IDENTIFIER' => 'NAME', 3 => 1, 'VISIBLE' => 1, 4 => 'TEXT', 'TYPE' => 'TEXT', 5 => $objectInfo['NAME'], 'VALUE' => $objectInfo['NAME'])); break; case 'extension': $extensionMgr = new ExtensionMgr(); $autosave = false; $objectInfo = $extensionMgr->get($object); if ($objectInfo["CODE"]) { $extension = $extensionMgr->getExtension($objectInfo["CODE"]); if ($extension && $objectInfo["INSTALLED"]) { switch ($siteID) { case 'extpage': if ($siteID == 'extpage') { $object_permissions['RWRITE'] = $user->checkPermission("REXTENSIONS_PAGE"); } case 'extcblock': if ($siteID == 'extcblock') { $object_permissions['RWRITE'] = $user->checkPermission("REXTENSIONS_CBLOCK"); } case 'extfile': if ($siteID == 'extfile') { $object_permissions['RWRITE'] = $user->checkPermission("REXTENSIONS_FILE");
} } } } } } } } //$mailing->setStatus('UNSENT'); $jsQueue->add($object, HISTORYTYPE_MAILING, 'HIGHLIGHT_MAILING', sGuiUS(), 'name'); } break; case 'extension': $extensionMgr = new ExtensionMgr(); $value = str_replace("\r", '', str_replace("\n", '\\n', $this->reponsedata[$property]->value)); $extensionInfo = $extensionMgr->get((int) $data[0]); $extension = $extensionMgr->getExtension($extensionInfo["CODE"]); if ($extension) { switch ($data[1]) { default: case 'extensions': $properties = $extension->extensionProperties; break; case 'data': switch ($extensionInfo['TYPE']) { case EXTENSION_IMPORT: // Import $properties = $extension->importProperties; break; case EXTENSION_EXPORT: // Export