Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Edvin Erdtman
ojs-kopia
Commits
6d466a31
Commit
6d466a31
authored
Jan 26, 2010
by
asmecher
Browse files
#4427# Changed Journal::getJournalId() to Journal::getId()
parent
98b4c5c8
Changes
175
Hide whitespace changes
Inline
Side-by-side
classes/admin/form/JournalSiteSettingsForm.inc.php
View file @
6d466a31
...
...
@@ -116,7 +116,7 @@ class JournalSiteSettingsForm extends Form {
$journal
->
setPath
(
$this
->
getData
(
'journalPath'
));
$journal
->
setEnabled
(
$this
->
getData
(
'enabled'
));
if
(
$journal
->
get
Journal
Id
()
!=
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
->
get
Journal
Id
());
$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
);
...
...
classes/article/ArticleHTMLGalley.inc.php
View file @
6d466a31
...
...
@@ -180,7 +180,7 @@ class ArticleHTMLGalley extends ArticleGalley {
$journal
=&
Request
::
getJournal
();
import
(
'file.PublicFileManager'
);
$publicFileManager
=
new
PublicFileManager
();
$url
=
Request
::
getBaseUrl
()
.
'/'
.
$publicFileManager
->
getJournalFilesPath
(
$journal
->
get
Journal
Id
())
.
'/'
.
implode
(
'/'
,
$urlParts
)
.
(
$anchor
?
'#'
.
$anchor
:
''
);
$url
=
Request
::
getBaseUrl
()
.
'/'
.
$publicFileManager
->
getJournalFilesPath
(
$journal
->
getId
())
.
'/'
.
implode
(
'/'
,
$urlParts
)
.
(
$anchor
?
'#'
.
$anchor
:
''
);
break
;
}
return
$matchArray
[
1
]
.
$url
.
$matchArray
[
3
];
...
...
classes/article/PublishedArticle.inc.php
View file @
6d466a31
...
...
@@ -252,7 +252,7 @@ class PublishedArticle extends Article {
// Get the Journal object (optimized)
$journal
=&
Request
::
getJournal
();
if
(
!
$journal
||
$journal
->
get
Journal
Id
()
!=
$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
->
get
Journal
Id
()
!=
$issue
->
getJournalId
()
)
return
null
;
if
(
!
$issue
||
!
$journal
||
$journal
->
getId
()
!=
$issue
->
getJournalId
()
)
return
null
;
switch
(
$doiSuffixSetting
)
{
case
'customIdentifier'
:
...
...
classes/author/form/submit/AuthorSubmitForm.inc.php
View file @
6d466a31
...
...
@@ -71,7 +71,7 @@ class AuthorSubmitForm extends Form {
$journal
=&
Request
::
getJournal
();
$settingsDao
=&
DAORegistry
::
getDAO
(
'JournalSettingsDAO'
);
$templateMgr
->
assign_by_ref
(
'journalSettings'
,
$settingsDao
->
getJournalSettings
(
$journal
->
get
Journal
Id
()));
$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
->
get
Journal
Id
(),
$sectionId
);
$sectionEditors
=&
$sectionEditorsDao
->
getEditorsBySectionId
(
$journal
->
getId
(),
$sectionId
);
foreach
(
$sectionEditors
as
$sectionEditorEntry
)
{
$editAssignment
=
new
EditAssignment
();
...
...
classes/author/form/submit/AuthorSubmitStep1Form.inc.php
View file @
6d466a31
...
...
@@ -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
->
get
Journal
Id
())));
$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
->
get
Journal
Id
(),
$user
->
getId
(),
ROLE_ID_EDITOR
)
||
$roleDao
->
roleExists
(
$journal
->
get
Journal
Id
(),
$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
->
get
Journal
Id
(),
$articleId
));
$templateMgr
->
assign_by_ref
(
'submissionPayment'
,
$completedPaymentDAO
->
getSubmissionCompletedPayment
(
$journal
->
getId
(),
$articleId
));
}
if
(
$paymentManager
->
fastTrackEnabled
()
)
{
$templateMgr
->
assign_by_ref
(
'fastTrackPayment'
,
$completedPaymentDAO
->
getFastTrackCompletedPayment
(
$journal
->
get
Journal
Id
(),
$articleId
));
$templateMgr
->
assign_by_ref
(
'fastTrackPayment'
,
$completedPaymentDAO
->
getFastTrackCompletedPayment
(
$journal
->
getId
(),
$articleId
));
}
}
$templateMgr
->
assign
(
'sectionOptions'
,
array
(
'0'
=>
Locale
::
translate
(
'author.submit.selectSection'
))
+
$sectionDao
->
getSectionTitles
(
$journal
->
get
Journal
Id
(),
!
$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
->
get
Journal
Id
());
$this
->
article
->
setJournalId
(
$journal
->
getId
());
$this
->
article
->
setSectionId
(
$this
->
getData
(
'sectionId'
));
$this
->
article
->
stampStatusModified
();
$this
->
article
->
setSubmissionProgress
(
$this
->
step
+
1
);
...
...
classes/author/form/submit/AuthorSubmitStep5Form.inc.php
View file @
6d466a31
...
...
@@ -60,12 +60,12 @@ class AuthorSubmitStep5Form extends AuthorSubmitForm {
$articleId
=
$this
->
articleId
;
if
(
$paymentManager
->
submissionEnabled
()
)
{
$templateMgr
->
assign_by_ref
(
'submissionPayment'
,
$completedPaymentDAO
->
getSubmissionCompletedPayment
(
$journal
->
get
Journal
Id
(),
$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
->
get
Journal
Id
(),
$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
->
get
Journal
Id
();
$journalId
=
$journal
->
getId
();
$articleId
=
$this
->
articleId
;
$user
=&
Request
::
getUser
();
...
...
classes/core/PageRouter.inc.php
View file @
6d466a31
...
...
@@ -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
->
get
Journal
Id
());
$roles
=&
$roleDao
->
getRolesByUserId
(
$userId
,
$journal
->
getId
());
if
(
count
(
$roles
)
==
1
)
{
$role
=
array_shift
(
$roles
);
if
(
$role
->
getRoleId
()
==
ROLE_ID_READER
)
$request
->
redirect
(
null
,
'index'
);
...
...
classes/file/JournalFileManager.inc.php
View file @
6d466a31
...
...
@@ -34,7 +34,7 @@ class JournalFileManager extends FileManager {
* @param $journalId int
*/
function
JournalFileManager
(
&
$journal
)
{
$this
->
journalId
=
$journal
->
get
Journal
Id
();
$this
->
journalId
=
$journal
->
getId
();
$this
->
journal
=&
$journal
;
$this
->
filesDir
=
Config
::
getVar
(
'files'
,
'files_dir'
)
.
'/journals/'
.
$this
->
journalId
.
'/'
;
}
...
...
classes/handler/validation/HandlerValidatorRoles.inc.php
View file @
6d466a31
...
...
@@ -40,7 +40,7 @@ class HandlerValidatorRoles extends HandlerValidator {
*/
function
isValid
()
{
$journal
=&
Request
::
getJournal
();
$journalId
=
(
$journal
)
?
$journal
->
get
Journal
Id
()
:
0
;
$journalId
=
(
$journal
)
?
$journal
->
getId
()
:
0
;
$user
=
Request
::
getUser
();
if
(
!
$user
)
return
false
;
...
...
classes/install/Upgrade.inc.php
View file @
6d466a31
...
...
@@ -63,7 +63,7 @@ class Upgrade extends Installer {
$journals
=&
$journalDao
->
getJournals
();
while
(
$journal
=&
$journals
->
next
())
{
$articles
=&
$articleDao
->
getArticlesByJournalId
(
$journal
->
get
Journal
Id
());
$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
->
get
Journal
Id
();
$journalIds
[]
=
$journal
->
getId
();
unset
(
$journal
);
}
...
...
classes/issue/IssueAction.inc.php
View file @
6d466a31
...
...
@@ -54,7 +54,7 @@ class IssueAction {
function
subscriptionRequired
(
&
$issue
)
{
$currentJournal
=&
Request
::
getJournal
();
if
(
!
$issue
)
return
false
;
if
(
!
$currentJournal
||
$currentJournal
->
get
Journal
Id
()
!==
$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
->
get
Journal
Id
();
$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
->
get
Journal
Id
());
$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
->
get
Journal
Id
(),
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
->
get
Journal
Id
(),
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
->
get
Journal
Id
());
$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
->
get
Journal
Id
(),
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
->
get
Journal
Id
(),
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
->
get
Journal
Id
();
$journalId
=
$journal
->
getId
();
$issueDao
=&
DAORegistry
::
getDAO
(
'IssueDAO'
);
...
...
classes/issue/form/IssueForm.inc.php
View file @
6d466a31
...
...
@@ -87,7 +87,7 @@ class IssueForm extends Form {
$issueDao
=&
DAORegistry
::
getDAO
(
'IssueDAO'
);
$publicIssueId
=
$this
->
getData
(
'publicIssueId'
);
if
(
$publicIssueId
&&
$issueDao
->
publicIssueIdExists
(
$publicIssueId
,
$issueId
,
$journal
->
get
Journal
Id
()))
{
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
->
get
Journal
Id
());
$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
->
get
Journal
Id
());
$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
->
get
Journal
Id
(),
'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
->
get
Journal
Id
())
.
'/'
.
$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
->
get
Journal
Id
(),
'styleFile'
,
$newFileName
);
$publicFileManager
->
uploadJournalFile
(
$journal
->
getId
(),
'styleFile'
,
$newFileName
);
$issue
->
setStyleFileName
(
$newFileName
);
$issue
->
setOriginalStyleFileName
(
$publicFileManager
->
truncateFileName
(
$originalFileName
,
127
));
$issueDao
->
updateIssue
(
$issue
);
...
...
classes/journal/Journal.inc.php
View file @
6d466a31
...
...
@@ -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
);
}
/**
...
...
classes/journal/JournalDAO.inc.php
View file @
6d466a31
...
...
@@ -94,7 +94,7 @@ class JournalDAO extends DAO {
);
$journal
->
setJournalId
(
$this
->
getInsertJournalId
());
return
$journal
->
get
Journal
Id
();
return
$journal
->
getId
();
}
/**
...
...
@@ -115,7 +115,7 @@ class JournalDAO extends DAO {
$journal
->
getSequence
(),
$journal
->
getEnabled
()
?
1
:
0
,
$journal
->
getPrimaryLocale
(),
$journal
->
get
Journal
Id
()
$journal
->
getId
()
)
);
}
...
...
@@ -125,7 +125,7 @@ class JournalDAO extends DAO {
* @param $journal Journal
*/
function
deleteJournal
(
&
$journal
)
{
return
$this
->
deleteJournalById
(
$journal
->
get
Journal
Id
());
return
$this
->
deleteJournalById
(
$journal
->
getId
());
}
/**
...
...
@@ -218,7 +218,7 @@ class JournalDAO extends DAO {
$journalIterator
=&
$this
->
getJournals
();
while
(
$journal
=&
$journalIterator
->
next
())
{
$journals
[
$journal
->
get
Journal
Id
()]
=
$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
->
get
Journal
Id
()]
=
$journal
->
getLocalizedTitle
();
$journals
[
$journal
->
getId
()]
=
$journal
->
getLocalizedTitle
();
unset
(
$journal
);
}
unset
(
$journalIterator
);
...
...
classes/mail/MailTemplate.inc.php
View file @
6d466a31
...
...
@@ -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
->
get
Journal
Id
());
$emailTemplate
=&
$emailTemplateDao
->
getEmailTemplate
(
$this
->
emailKey
,
$this
->
locale
,
$journal
==
null
?
0
:
$journal
->
getId
());
}
$userSig
=
''
;
...
...
classes/manager/form/AnnouncementForm.inc.php
View file @
6d466a31
...
...
@@ -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
->
get
Journal
Id
())));
$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
->
get
Journal
Id
());
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
->
get
Journal
Id
());
$announcement
->
setAssocId
(
$journal
->
getId
());
}
/**
...
...
@@ -63,7 +63,7 @@ class AnnouncementForm extends PKPAnnouncementForm {
function
execute
()
{
parent
::
execute
();
$journal
=&
Request
::
getJournal
();
$journalId
=
$journal
->
get
Journal
Id
();
$journalId
=
$journal
->
getId
();
// Send a notification to associated users
import
(
'notification.Notification'
);
...
...
classes/manager/form/AnnouncementTypeForm.inc.php
View file @
6d466a31
...
...
@@ -43,7 +43,7 @@ class AnnouncementTypeForm extends PKPAnnouncementTypeForm {
function
_setAnnouncementTypeAssocId
(
&
$announcementType
)
{
$journal
=&
Request
::
getJournal
();
$announcementType
->
setAssocType
(
ASSOC_TYPE_JOURNAL
);
$announcementType
->
setAssocId
(
$journal
->
get
Journal
Id
());
$announcementType
->
setAssocId
(
$journal
->
getId
());
}
}
...
...
classes/manager/form/EmailTemplateForm.inc.php
View file @
6d466a31
...
...
@@ -51,7 +51,7 @@ class EmailTemplateForm extends Form {
$journal
=&
Request
::
getJournal
();
$emailTemplateDao
=&
DAORegistry
::
getDAO
(
'EmailTemplateDAO'
);
$emailTemplate
=&
$emailTemplateDao
->
getBaseEmailTemplate
(
$this
->
emailKey
,
$journal
->
get
Journal
Id
());
$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
->
get
Journal
Id
());
$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
->
get
Journal
Id
());
$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
->
get
Journal
Id
());
$emailTemplate
->
setAssocId
(
$journal
->
getId
());
$supportedLocales
=
$journal
->
getSupportedLocaleNames
();
if
(
!
empty
(
$supportedLocales
))
{
...
...
classes/manager/form/GroupForm.inc.php
View file @
6d466a31
...
...
@@ -98,7 +98,7 @@ class GroupForm extends Form {
}
$this
->
group
->
setAssocType
(
ASSOC_TYPE_JOURNAL
);
$this
->
group
->
setAssocId
(
$journal
->
get
Journal
Id
());
$this
->
group
->
setAssocId
(
$journal
->
getId
());
$this
->
group
->
setTitle
(
$this
->
getData
(
'title'
),
null
);
// Localized
$this
->
group
->
setContext
(
$this
->
getData
(
'context'
));
...
...
classes/manager/form/LanguageSettingsForm.inc.php
View file @
6d466a31
...
...
@@ -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
->
get
Journal
Id
(),
$journal
->
getId
(),
$name
,
$value
,
$this
->
settings
[
$name
]
...
...
Prev
1
2
3
4
5
…
9
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment