Commit 6d466a31 authored by asmecher's avatar asmecher
Browse files

#4427# Changed Journal::getJournalId() to Journal::getId()

parent 98b4c5c8
......@@ -116,7 +116,7 @@ class JournalSiteSettingsForm extends Form {
$journal->setPath($this->getData('journalPath'));
$journal->setEnabled($this->getData('enabled'));
if ($journal->getJournalId() != null) {
if ($journal->getId() != null) {
$isNewJournal = false;
$journalDao->updateJournal($journal);
$section = null;
......@@ -169,7 +169,7 @@ class JournalSiteSettingsForm extends Form {
// Create a default "Articles" section
$sectionDao =& DAORegistry::getDAO('SectionDAO');
$section = new Section();
$section->setJournalId($journal->getJournalId());
$section->setJournalId($journal->getId());
$section->setTitle(Locale::translate('section.default.title'), $journal->getPrimaryLocale());
$section->setAbbrev(Locale::translate('section.default.abbrev'), $journal->getPrimaryLocale());
$section->setMetaIndexed(true);
......
......@@ -180,7 +180,7 @@ class ArticleHTMLGalley extends ArticleGalley {
$journal =& Request::getJournal();
import ('file.PublicFileManager');
$publicFileManager = new PublicFileManager();
$url = Request::getBaseUrl() . '/' . $publicFileManager->getJournalFilesPath($journal->getJournalId()) . '/' . implode('/', $urlParts) . ($anchor?'#' . $anchor:'');
$url = Request::getBaseUrl() . '/' . $publicFileManager->getJournalFilesPath($journal->getId()) . '/' . implode('/', $urlParts) . ($anchor?'#' . $anchor:'');
break;
}
return $matchArray[1] . $url . $matchArray[3];
......
......@@ -252,7 +252,7 @@ class PublishedArticle extends Article {
// Get the Journal object (optimized)
$journal =& Request::getJournal();
if (!$journal || $journal->getJournalId() != $journalId) {
if (!$journal || $journal->getId() != $journalId) {
unset($journal);
$journalDao =& DAORegistry::getDAO('JournalDAO');
$journal =& $journalDao->getJournal($journalId);
......@@ -265,7 +265,7 @@ class PublishedArticle extends Article {
$issueDao =& DAORegistry::getDAO('IssueDAO');
$issue =& $issueDao->getIssueByArticleId($this->getArticleId());
if (!$issue || !$journal || $journal->getJournalId() != $issue->getJournalId() ) return null;
if (!$issue || !$journal || $journal->getId() != $issue->getJournalId() ) return null;
switch ( $doiSuffixSetting ) {
case 'customIdentifier':
......
......@@ -71,7 +71,7 @@ class AuthorSubmitForm extends Form {
$journal =& Request::getJournal();
$settingsDao =& DAORegistry::getDAO('JournalSettingsDAO');
$templateMgr->assign_by_ref('journalSettings', $settingsDao->getJournalSettings($journal->getJournalId()));
$templateMgr->assign_by_ref('journalSettings', $settingsDao->getJournalSettings($journal->getId()));
parent::display();
}
......@@ -87,7 +87,7 @@ class AuthorSubmitForm extends Form {
$sectionEditorsDao =& DAORegistry::getDAO('SectionEditorsDAO');
$editAssignmentDao =& DAORegistry::getDAO('EditAssignmentDAO');
$sectionEditors =& $sectionEditorsDao->getEditorsBySectionId($journal->getJournalId(), $sectionId);
$sectionEditors =& $sectionEditorsDao->getEditorsBySectionId($journal->getId(), $sectionId);
foreach ($sectionEditors as $sectionEditorEntry) {
$editAssignment = new EditAssignment();
......
......@@ -29,7 +29,7 @@ class AuthorSubmitStep1Form extends AuthorSubmitForm {
// Validation checks for this form
$this->addCheck(new FormValidator($this, 'sectionId', 'required', 'author.submit.form.sectionRequired'));
$this->addCheck(new FormValidatorCustom($this, 'sectionId', 'required', 'author.submit.form.sectionRequired', array(DAORegistry::getDAO('SectionDAO'), 'sectionExists'), array($journal->getJournalId())));
$this->addCheck(new FormValidatorCustom($this, 'sectionId', 'required', 'author.submit.form.sectionRequired', array(DAORegistry::getDAO('SectionDAO'), 'sectionExists'), array($journal->getId())));
}
/**
......@@ -48,7 +48,7 @@ class AuthorSubmitStep1Form extends AuthorSubmitForm {
// to submit to sections flagged as "editor-only" for submissions.
// Otherwise, display only sections they are allowed to submit to.
$roleDao =& DAORegistry::getDAO('RoleDAO');
$isEditor = $roleDao->roleExists($journal->getJournalId(), $user->getId(), ROLE_ID_EDITOR) || $roleDao->roleExists($journal->getJournalId(), $user->getId(), ROLE_ID_SECTION_EDITOR);
$isEditor = $roleDao->roleExists($journal->getId(), $user->getId(), ROLE_ID_EDITOR) || $roleDao->roleExists($journal->getId(), $user->getId(), ROLE_ID_SECTION_EDITOR);
// Set up required Payment Related Information
import('payment.ojs.OJSPaymentManager');
......@@ -59,15 +59,15 @@ class AuthorSubmitStep1Form extends AuthorSubmitForm {
$articleId = $this->articleId;
if ( $paymentManager->submissionEnabled() ) {
$templateMgr->assign_by_ref('submissionPayment', $completedPaymentDAO->getSubmissionCompletedPayment ( $journal->getJournalId(), $articleId ));
$templateMgr->assign_by_ref('submissionPayment', $completedPaymentDAO->getSubmissionCompletedPayment ( $journal->getId(), $articleId ));
}
if ( $paymentManager->fastTrackEnabled() ) {
$templateMgr->assign_by_ref('fastTrackPayment', $completedPaymentDAO->getFastTrackCompletedPayment ( $journal->getJournalId(), $articleId ));
$templateMgr->assign_by_ref('fastTrackPayment', $completedPaymentDAO->getFastTrackCompletedPayment ( $journal->getId(), $articleId ));
}
}
$templateMgr->assign('sectionOptions', array('0' => Locale::translate('author.submit.selectSection')) + $sectionDao->getSectionTitles($journal->getJournalId(), !$isEditor));
$templateMgr->assign('sectionOptions', array('0' => Locale::translate('author.submit.selectSection')) + $sectionDao->getSectionTitles($journal->getId(), !$isEditor));
parent::display();
}
......@@ -114,7 +114,7 @@ class AuthorSubmitStep1Form extends AuthorSubmitForm {
$this->article = new Article();
$this->article->setUserId($user->getId());
$this->article->setJournalId($journal->getJournalId());
$this->article->setJournalId($journal->getId());
$this->article->setSectionId($this->getData('sectionId'));
$this->article->stampStatusModified();
$this->article->setSubmissionProgress($this->step + 1);
......
......@@ -60,12 +60,12 @@ class AuthorSubmitStep5Form extends AuthorSubmitForm {
$articleId = $this->articleId;
if ( $paymentManager->submissionEnabled() ) {
$templateMgr->assign_by_ref('submissionPayment', $completedPaymentDAO->getSubmissionCompletedPayment ( $journal->getJournalId(), $articleId ));
$templateMgr->assign_by_ref('submissionPayment', $completedPaymentDAO->getSubmissionCompletedPayment ( $journal->getId(), $articleId ));
$templateMgr->assign('manualPayment', $journal->getSetting('paymentMethodPluginName') == 'ManualPayment');
}
if ( $paymentManager->fastTrackEnabled() ) {
$templateMgr->assign_by_ref('fastTrackPayment', $completedPaymentDAO->getFastTrackCompletedPayment ( $journal->getJournalId(), $articleId ));
$templateMgr->assign_by_ref('fastTrackPayment', $completedPaymentDAO->getFastTrackCompletedPayment ( $journal->getId(), $articleId ));
}
}
......@@ -100,7 +100,7 @@ class AuthorSubmitStep5Form extends AuthorSubmitForm {
if ( !parent::validate() ) return false;
$journal =& Request::getJournal();
$journalId = $journal->getJournalId();
$journalId = $journal->getId();
$articleId = $this->articleId;
$user =& Request::getUser();
......
......@@ -37,7 +37,7 @@ class PageRouter extends PKPPageRouter {
if ($journal =& $this->getContext($request, 1)) {
// The user is in the journal context, see if they have one role only
$roles =& $roleDao->getRolesByUserId($userId, $journal->getJournalId());
$roles =& $roleDao->getRolesByUserId($userId, $journal->getId());
if(count($roles) == 1) {
$role = array_shift($roles);
if ($role->getRoleId() == ROLE_ID_READER) $request->redirect(null, 'index');
......
......@@ -34,7 +34,7 @@ class JournalFileManager extends FileManager {
* @param $journalId int
*/
function JournalFileManager(&$journal) {
$this->journalId = $journal->getJournalId();
$this->journalId = $journal->getId();
$this->journal =& $journal;
$this->filesDir = Config::getVar('files', 'files_dir') . '/journals/' . $this->journalId . '/';
}
......
......@@ -40,7 +40,7 @@ class HandlerValidatorRoles extends HandlerValidator {
*/
function isValid() {
$journal =& Request::getJournal();
$journalId = ($journal)?$journal->getJournalId():0;
$journalId = ($journal)?$journal->getId():0;
$user = Request::getUser();
if ( !$user ) return false;
......
......@@ -63,7 +63,7 @@ class Upgrade extends Installer {
$journals =& $journalDao->getJournals();
while ($journal =& $journals->next()) {
$articles =& $articleDao->getArticlesByJournalId($journal->getJournalId());
$articles =& $articleDao->getArticlesByJournalId($journal->getId());
while ($article =& $articles->next()) {
if (!$article->getReviewFileId() && $article->getSubmissionProgress() == 0) {
$authorSubmission =& $authorSubmissionDao->getAuthorSubmission($article->getArticleId());
......@@ -229,7 +229,7 @@ class Upgrade extends Installer {
// Get journal IDs for insertion, including 0 for site-level
$journalIds = array(0);
while ($journal =& $journals->next()) {
$journalIds[] = $journal->getJournalId();
$journalIds[] = $journal->getId();
unset($journal);
}
......
......@@ -54,7 +54,7 @@ class IssueAction {
function subscriptionRequired(&$issue) {
$currentJournal =& Request::getJournal();
if (!$issue) return false;
if (!$currentJournal || $currentJournal->getJournalId() !== $issue->getJournalId()) {
if (!$currentJournal || $currentJournal->getId() !== $issue->getJournalId()) {
$journalDao =& DAORegistry::getDAO('JournalDAO');
$journal =& $journalDao->getJournal($issue->getJournalId());
} else {
......@@ -81,7 +81,7 @@ class IssueAction {
$roleDao =& DAORegistry::getDAO('RoleDAO');
$user =& Request::getUser();
if ($user && $journal) {
$journalId = $journal->getJournalId();
$journalId = $journal->getId();
$userId = $user->getId();
$subscriptionAssumedRoles = array(
ROLE_ID_JOURNAL_MANAGER,
......@@ -123,7 +123,7 @@ class IssueAction {
if (IssueAction::allowedPrePublicationAccess($journal, $publishedArticle)) {
$result = true;
} else {
$result = $subscriptionDao->isValidIndividualSubscription($user->getId(), $journal->getJournalId());
$result = $subscriptionDao->isValidIndividualSubscription($user->getId(), $journal->getId());
}
// If no valid subscription, check if there is an expired subscription
......@@ -132,14 +132,14 @@ class IssueAction {
if (isset($articleId)) {
if (isset($publishedArticle)) {
import('subscription.SubscriptionDAO');
$result = $subscriptionDao->isValidIndividualSubscription($user->getId(), $journal->getJournalId(), SUBSCRIPTION_DATE_END, $publishedArticle->getDatePublished());
$result = $subscriptionDao->isValidIndividualSubscription($user->getId(), $journal->getId(), SUBSCRIPTION_DATE_END, $publishedArticle->getDatePublished());
}
} else if (isset($issueId)) {
$issueDao =& DAORegistry::getDAO('IssueDAO');
$issue =& $issueDao->getIssueById($issueId);
if (isset($issue) && $issue->getPublished()) {
import('subscription.SubscriptionDAO');
$result = $subscriptionDao->isValidIndividualSubscription($user->getId(), $journal->getJournalId(), SUBSCRIPTION_DATE_END, $issue->getDatePublished());
$result = $subscriptionDao->isValidIndividualSubscription($user->getId(), $journal->getId(), SUBSCRIPTION_DATE_END, $issue->getDatePublished());
}
}
}
......@@ -156,7 +156,7 @@ class IssueAction {
$subscriptionDao =& DAORegistry::getDAO('InstitutionalSubscriptionDAO');
$result = false;
if (isset($journal)) {
$result = $subscriptionDao->isValidInstitutionalSubscription(Request::getRemoteDomain(), Request::getRemoteAddr(), $journal->getJournalId());
$result = $subscriptionDao->isValidInstitutionalSubscription(Request::getRemoteDomain(), Request::getRemoteAddr(), $journal->getId());
// If no valid subscription, check if there is an expired subscription
// that was valid during publication date of requested content
......@@ -166,14 +166,14 @@ class IssueAction {
$publishedArticle =& $publishedArticleDao->getPublishedArticleByArticleId($articleId);
if (isset($publishedArticle)) {
import('subscription.SubscriptionDAO');
$result = $subscriptionDao->isValidInstitutionalSubscription(Request::getRemoteDomain(), Request::getRemoteAddr(), $journal->getJournalId(), SUBSCRIPTION_DATE_END, $publishedArticle->getDatePublished());
$result = $subscriptionDao->isValidInstitutionalSubscription(Request::getRemoteDomain(), Request::getRemoteAddr(), $journal->getId(), SUBSCRIPTION_DATE_END, $publishedArticle->getDatePublished());
}
} else if (isset($issueId)) {
$issueDao =& DAORegistry::getDAO('IssueDAO');
$issue =& $issueDao->getIssueById($issueId);
if (isset($issue) && $issue->getPublished()) {
import('subscription.SubscriptionDAO');
$result = $subscriptionDao->isValidInstitutionalSubscription(Request::getRemoteDomain(), Request::getRemoteAddr(), $journal->getJournalId(), SUBSCRIPTION_DATE_END, $issue->getDatePublished());
$result = $subscriptionDao->isValidInstitutionalSubscription(Request::getRemoteDomain(), Request::getRemoteAddr(), $journal->getId(), SUBSCRIPTION_DATE_END, $issue->getDatePublished());
}
}
}
......@@ -191,7 +191,7 @@ class IssueAction {
$issueOptions = array();
$journal =& Request::getJournal();
$journalId = $journal->getJournalId();
$journalId = $journal->getId();
$issueDao =& DAORegistry::getDAO('IssueDAO');
......
......@@ -87,7 +87,7 @@ class IssueForm extends Form {
$issueDao =& DAORegistry::getDAO('IssueDAO');
$publicIssueId = $this->getData('publicIssueId');
if ($publicIssueId && $issueDao->publicIssueIdExists($publicIssueId, $issueId, $journal->getJournalId())) {
if ($publicIssueId && $issueDao->publicIssueIdExists($publicIssueId, $issueId, $journal->getId())) {
$this->addError('publicIssueId', Locale::translate('editor.issues.issuePublicIdentificationExists'));
$this->addErrorField('publicIssueId');
}
......@@ -166,7 +166,7 @@ class IssueForm extends Form {
// set up the default values for volume, number and year
$issueDao =& DAORegistry::getDAO('IssueDAO');
$issue = $issueDao->getLastCreatedIssue($journal->getJournalId());
$issue = $issueDao->getLastCreatedIssue($journal->getId());
if (isset($issue)) {
$volumePerYear = $journal->getSetting('volumePerYear');
......@@ -292,7 +292,7 @@ class IssueForm extends Form {
$showYear = $this->getData('showYear');
$showTitle = $this->getData('showTitle');
$issue->setJournalId($journal->getJournalId());
$issue->setJournalId($journal->getId());
$issue->setTitle($this->getData('title'), null); // Localized
$issue->setVolume(empty($volume) ? 0 : $volume);
$issue->setNumber(empty($number) ? 0 : $number);
......@@ -354,12 +354,12 @@ class IssueForm extends Form {
$journal = Request::getJournal();
$originalFileName = $publicFileManager->getUploadedFileName('coverPage');
$newFileName = 'cover_issue_' . $issueId . '_' . $this->getFormLocale() . '.' . $publicFileManager->getExtension($originalFileName);
$publicFileManager->uploadJournalFile($journal->getJournalId(), 'coverPage', $newFileName);
$publicFileManager->uploadJournalFile($journal->getId(), 'coverPage', $newFileName);
$issue->setOriginalFileName($publicFileManager->truncateFileName($originalFileName, 127), $this->getFormLocale());
$issue->setFileName($newFileName, $this->getFormLocale());
// Store the image dimensions.
list($width, $height) = getimagesize($publicFileManager->getJournalFilesPath($journal->getJournalId()) . '/' . $newFileName);
list($width, $height) = getimagesize($publicFileManager->getJournalFilesPath($journal->getId()) . '/' . $newFileName);
$issue->setWidth($width, $this->getFormLocale());
$issue->setHeight($height, $this->getFormLocale());
......@@ -370,7 +370,7 @@ class IssueForm extends Form {
$journal = Request::getJournal();
$originalFileName = $publicFileManager->getUploadedFileName('styleFile');
$newFileName = 'style_' . $issueId . '.css';
$publicFileManager->uploadJournalFile($journal->getJournalId(), 'styleFile', $newFileName);
$publicFileManager->uploadJournalFile($journal->getId(), 'styleFile', $newFileName);
$issue->setStyleFileName($newFileName);
$issue->setOriginalStyleFileName($publicFileManager->truncateFileName($originalFileName, 127));
$issueDao->updateIssue($issue);
......
......@@ -234,15 +234,8 @@ class Journal extends DataObject {
* @return int
*/
function getJournalId() {
return $this->getData('journalId');
}
/**
* Get ID of journal (for generic calls in PKP WAL).
* @return int
*/
function getId() {
return $this->getData('journalId');
if (Config::getVar('debug', 'deprecation_warnings')) trigger_error('Deprecated function.');
return $this->getId();
}
/**
......@@ -250,7 +243,8 @@ class Journal extends DataObject {
* @param $journalId int
*/
function setJournalId($journalId) {
return $this->setData('journalId', $journalId);
if (Config::getVar('debug', 'deprecation_warnings')) trigger_error('Deprecated function.');
return $this->setId($journalId);
}
/**
......
......@@ -94,7 +94,7 @@ class JournalDAO extends DAO {
);
$journal->setJournalId($this->getInsertJournalId());
return $journal->getJournalId();
return $journal->getId();
}
/**
......@@ -115,7 +115,7 @@ class JournalDAO extends DAO {
$journal->getSequence(),
$journal->getEnabled() ? 1 : 0,
$journal->getPrimaryLocale(),
$journal->getJournalId()
$journal->getId()
)
);
}
......@@ -125,7 +125,7 @@ class JournalDAO extends DAO {
* @param $journal Journal
*/
function deleteJournal(&$journal) {
return $this->deleteJournalById($journal->getJournalId());
return $this->deleteJournalById($journal->getId());
}
/**
......@@ -218,7 +218,7 @@ class JournalDAO extends DAO {
$journalIterator =& $this->getJournals();
while ($journal =& $journalIterator->next()) {
$journals[$journal->getJournalId()] = $journal->getLocalizedTitle();
$journals[$journal->getId()] = $journal->getLocalizedTitle();
unset($journal);
}
unset($journalIterator);
......@@ -235,7 +235,7 @@ class JournalDAO extends DAO {
$journalIterator =& $this->getEnabledJournals();
while ($journal =& $journalIterator->next()) {
$journals[$journal->getJournalId()] = $journal->getLocalizedTitle();
$journals[$journal->getId()] = $journal->getLocalizedTitle();
unset($journal);
}
unset($journalIterator);
......
......@@ -37,7 +37,7 @@ class MailTemplate extends PKPMailTemplate {
if (isset($this->emailKey)) {
$emailTemplateDao =& DAORegistry::getDAO('EmailTemplateDAO');
$emailTemplate =& $emailTemplateDao->getEmailTemplate($this->emailKey, $this->locale, $journal == null ? 0 : $journal->getJournalId());
$emailTemplate =& $emailTemplateDao->getEmailTemplate($this->emailKey, $this->locale, $journal == null ? 0 : $journal->getId());
}
$userSig = '';
......
......@@ -30,7 +30,7 @@ class AnnouncementForm extends PKPAnnouncementForm {
$journal =& Request::getJournal();
// If provided, announcement type is valid
$this->addCheck(new FormValidatorCustom($this, 'typeId', 'optional', 'manager.announcements.form.typeIdValid', create_function('$typeId, $journalId', '$announcementTypeDao =& DAORegistry::getDAO(\'AnnouncementTypeDAO\'); return $announcementTypeDao->announcementTypeExistsByTypeId($typeId, ASSOC_TYPE_JOURNAL, $journalId);'), array($journal->getJournalId())));
$this->addCheck(new FormValidatorCustom($this, 'typeId', 'optional', 'manager.announcements.form.typeIdValid', create_function('$typeId, $journalId', '$announcementTypeDao =& DAORegistry::getDAO(\'AnnouncementTypeDAO\'); return $announcementTypeDao->announcementTypeExistsByTypeId($typeId, ASSOC_TYPE_JOURNAL, $journalId);'), array($journal->getId())));
}
/**
......@@ -44,7 +44,7 @@ class AnnouncementForm extends PKPAnnouncementForm {
function _getAnnouncementTypesAssocId() {
$journal =& Request::getJournal();
return array(ASSOC_TYPE_JOURNAL, $journal->getJournalId());
return array(ASSOC_TYPE_JOURNAL, $journal->getId());
}
/**
......@@ -54,7 +54,7 @@ class AnnouncementForm extends PKPAnnouncementForm {
function _setAnnouncementAssocId(&$announcement) {
$journal =& Request::getJournal();
$announcement->setAssocType(ASSOC_TYPE_JOURNAL);
$announcement->setAssocId($journal->getJournalId());
$announcement->setAssocId($journal->getId());
}
/**
......@@ -63,7 +63,7 @@ class AnnouncementForm extends PKPAnnouncementForm {
function execute() {
parent::execute();
$journal =& Request::getJournal();
$journalId = $journal->getJournalId();
$journalId = $journal->getId();
// Send a notification to associated users
import('notification.Notification');
......
......@@ -43,7 +43,7 @@ class AnnouncementTypeForm extends PKPAnnouncementTypeForm {
function _setAnnouncementTypeAssocId(&$announcementType) {
$journal =& Request::getJournal();
$announcementType->setAssocType(ASSOC_TYPE_JOURNAL);
$announcementType->setAssocId($journal->getJournalId());
$announcementType->setAssocId($journal->getId());
}
}
......
......@@ -51,7 +51,7 @@ class EmailTemplateForm extends Form {
$journal =& Request::getJournal();
$emailTemplateDao =& DAORegistry::getDAO('EmailTemplateDAO');
$emailTemplate =& $emailTemplateDao->getBaseEmailTemplate($this->emailKey, $journal->getJournalId());
$emailTemplate =& $emailTemplateDao->getBaseEmailTemplate($this->emailKey, $journal->getId());
$templateMgr->assign('canDisable', $emailTemplate?$emailTemplate->getCanDisable():false);
$templateMgr->assign('supportedLocales', $journal->getSupportedLocaleNames());
$templateMgr->assign('helpTopicId','journal.managementPages.emails');
......@@ -64,7 +64,7 @@ class EmailTemplateForm extends Form {
function initData() {
$journal =& Request::getJournal();
$emailTemplateDao =& DAORegistry::getDAO('EmailTemplateDAO');
$emailTemplate =& $emailTemplateDao->getLocaleEmailTemplate($this->emailKey, $journal->getJournalId());
$emailTemplate =& $emailTemplateDao->getLocaleEmailTemplate($this->emailKey, $journal->getId());
$thisLocale = Locale::getLocale();
if ($emailTemplate) {
......@@ -111,7 +111,7 @@ class EmailTemplateForm extends Form {
$journal =& Request::getJournal();
$emailTemplateDao =& DAORegistry::getDAO('EmailTemplateDAO');
$emailTemplate =& $emailTemplateDao->getLocaleEmailTemplate($this->emailKey, $journal->getJournalId());
$emailTemplate =& $emailTemplateDao->getLocaleEmailTemplate($this->emailKey, $journal->getId());
if (!$emailTemplate) {
$emailTemplate = new LocaleEmailTemplate();
......@@ -128,7 +128,7 @@ class EmailTemplateForm extends Form {
}
$emailTemplate->setAssocType(ASSOC_TYPE_JOURNAL);
$emailTemplate->setAssocId($journal->getJournalId());
$emailTemplate->setAssocId($journal->getId());
$supportedLocales = $journal->getSupportedLocaleNames();
if (!empty($supportedLocales)) {
......
......@@ -98,7 +98,7 @@ class GroupForm extends Form {
}
$this->group->setAssocType(ASSOC_TYPE_JOURNAL);
$this->group->setAssocId($journal->getJournalId());
$this->group->setAssocId($journal->getId());
$this->group->setTitle($this->getData('title'), null); // Localized
$this->group->setContext($this->getData('context'));
......
......@@ -124,7 +124,7 @@ class LanguageSettingsForm extends Form {
foreach ($this->_data as $name => $value) {
if (!in_array($name, array_keys($this->settings))) continue;
$settingsDao->updateSetting(
$journal->getJournalId(),
$journal->getId(),
$name,
$value,
$this->settings[$name]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment