25 $this->installFileDirs = array(
52 $section = new \Section();
53 $section->setTitle(__(
'section.default.title'), $context->getPrimaryLocale());
54 $section->setAbbrev(__(
'section.default.abbrev'), $context->getPrimaryLocale());
55 $section->setPath(__(
'section.default.path'), $context->getPrimaryLocale());
56 $section->setMetaIndexed(
true);
57 $section->setMetaReviewed(
true);
58 $section->setPolicy(__(
'section.default.policy'), $context->getPrimaryLocale());
59 $section->setEditorRestricted(
false);
60 $section->setHideTitle(
false);
77 $newContext = $args[0];
82 if (!empty($params[
'serverThumbnail'])) {
83 $supportedLocales = $newContext->getSupportedFormLocales();
84 foreach ($supportedLocales as $localeKey) {
85 if (!array_key_exists($localeKey, $params[
'serverThumbnail'])) {
90 $params[
'serverThumbnail'][$localeKey],
92 $request->getUser()->getId(),
96 $newContext->setData(
'serverThumbnail', $localeValue, $localeKey);
114 $sectionDao->deleteByJournalId($context->getId());
117 $submissionDao->deleteByContextId($context->getId());
119 import(
'classes.file.PublicFileManager');
120 $publicFileManager = new \PublicFileManager();
121 $publicFileManager->rmtree($publicFileManager->getContextFilesPath($context->getId()));
136 $allowedLocales = $args[3];
138 if (!isset($props[
'serverThumbnail'])) {
145 $userId = $user ? $user->getId() :
null;
146 import(
'lib.pkp.classes.file.TemporaryFileManager');
147 $temporaryFileManager = new \TemporaryFileManager();
148 if (isset($props[
'serverThumbnail']) && empty($errors[
'serverThumbnail'])) {
149 foreach ($allowedLocales as $localeKey) {
150 if (empty($props[
'serverThumbnail'][$localeKey]) || empty($props[
'serverThumbnail'][$localeKey][
'temporaryFileId'])) {
153 if (!$temporaryFileManager->getFile($props[
'serverThumbnail'][$localeKey][
'temporaryFileId'], $userId)) {
154 if (!is_array($errors[
'serverThumbnail'])) {
155 $errors[
'serverThumbnail'] = [];
157 $errors[
'serverThumbnail'][$localeKey] = [__(
'common.noTemporaryFile')];