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
a85cffc1
Commit
a85cffc1
authored
Jan 26, 2010
by
asmecher
Browse files
#4427# Changed Article::[gs]etArticleId to Article::[gs]etId
parent
6d466a31
Changes
69
Hide whitespace changes
Inline
Side-by-side
classes/article/Article.inc.php
View file @
a85cffc1
...
...
@@ -59,7 +59,7 @@ class Article extends Submission {
*/
function
addAuthor
(
$author
)
{
if
(
$author
->
getArticleId
()
==
null
)
{
$author
->
setArticleId
(
$this
->
get
Article
Id
());
$author
->
setArticleId
(
$this
->
getId
());
}
parent
::
addAuthor
(
$author
);
}
...
...
@@ -93,7 +93,8 @@ class Article extends Submission {
* @return int
*/
function
getArticleId
()
{
return
$this
->
getData
(
'articleId'
);
if
(
Config
::
getVar
(
'debug'
,
'deprecation_warnings'
))
trigger_error
(
'Deprecated function.'
);
return
$this
->
getId
();
}
/**
...
...
@@ -101,7 +102,8 @@ class Article extends Submission {
* @param $articleId int
*/
function
setArticleId
(
$articleId
)
{
return
$this
->
setData
(
'articleId'
,
$articleId
);
if
(
Config
::
getVar
(
'debug'
,
'deprecation_warnings'
))
trigger_error
(
'Deprecated function.'
);
return
$this
->
setId
(
$articleId
);
}
/**
...
...
@@ -451,7 +453,7 @@ class Article extends Submission {
* @return array User IDs
*/
function
getAssociatedUserIds
(
$authors
=
true
,
$reviewers
=
true
,
$editors
=
true
,
$proofreader
=
true
,
$copyeditor
=
true
,
$layoutEditor
=
true
)
{
$articleId
=
$this
->
get
Article
Id
();
$articleId
=
$this
->
getId
();
$signoffDao
=&
DAORegistry
::
getDAO
(
'SignoffDAO'
);
$userIds
=
array
();
...
...
@@ -509,7 +511,7 @@ class Article extends Submission {
*/
function
getSignoff
(
$signoffType
)
{
$signoffDao
=&
DAORegistry
::
getDAO
(
'SignoffDAO'
);
return
$signoffDao
->
getBySymbolic
(
$signoffType
,
ASSOC_TYPE_ARTICLE
,
$this
->
get
Article
Id
());
return
$signoffDao
->
getBySymbolic
(
$signoffType
,
ASSOC_TYPE_ARTICLE
,
$this
->
getId
());
}
/**
...
...
@@ -522,7 +524,7 @@ class Article extends Submission {
$articleFileDao
=&
DAORegistry
::
getDAO
(
'ArticleFileDAO'
);
$signoffDao
=&
DAORegistry
::
getDAO
(
'SignoffDAO'
);
$signoff
=
$signoffDao
->
getBySymbolic
(
$signoffType
,
ASSOC_TYPE_ARTICLE
,
$this
->
get
Article
Id
());
$signoff
=
$signoffDao
->
getBySymbolic
(
$signoffType
,
ASSOC_TYPE_ARTICLE
,
$this
->
getId
());
if
(
!
$signoff
)
return
false
;
if
(
$idOnly
)
return
$signoff
->
getFileId
();
...
...
@@ -540,7 +542,7 @@ class Article extends Submission {
$signoffDao
=&
DAORegistry
::
getDAO
(
'SignoffDAO'
);
$userDao
=&
DAORegistry
::
getDAO
(
'UserDAO'
);
$signoff
=
$signoffDao
->
getBySymbolic
(
$signoffType
,
ASSOC_TYPE_ARTICLE
,
$this
->
get
Article
Id
());
$signoff
=
$signoffDao
->
getBySymbolic
(
$signoffType
,
ASSOC_TYPE_ARTICLE
,
$this
->
getId
());
if
(
!
$signoff
)
return
false
;
$user
=&
$userDao
->
getUser
(
$signoff
->
getUserId
());
...
...
@@ -555,7 +557,7 @@ class Article extends Submission {
function
getUserIdBySignoffType
(
$signoffType
)
{
$signoffDao
=&
DAORegistry
::
getDAO
(
'SignoffDAO'
);
$signoff
=
$signoffDao
->
getBySymbolic
(
$signoffType
,
ASSOC_TYPE_ARTICLE
,
$this
->
get
Article
Id
());
$signoff
=
$signoffDao
->
getBySymbolic
(
$signoffType
,
ASSOC_TYPE_ARTICLE
,
$this
->
getId
());
if
(
!
$signoff
)
return
false
;
return
$signoff
->
getUserId
();
...
...
classes/article/ArticleDAO.inc.php
View file @
a85cffc1
...
...
@@ -46,7 +46,7 @@ class ArticleDAO extends DAO {
*/
function
updateLocaleFields
(
&
$article
)
{
$this
->
updateDataObjectSettings
(
'article_settings'
,
$article
,
array
(
'article_id'
=>
$article
->
get
Article
Id
()
'article_id'
=>
$article
->
getId
()
));
}
...
...
@@ -115,7 +115,7 @@ class ArticleDAO extends DAO {
* @param $row array input row
*/
function
_articleFromRow
(
&
$article
,
&
$row
)
{
$article
->
set
Article
Id
(
$row
[
'article_id'
]);
$article
->
setId
(
$row
[
'article_id'
]);
$article
->
setUserId
(
$row
[
'user_id'
]);
$article
->
setJournalId
(
$row
[
'journal_id'
]);
$article
->
setSectionId
(
$row
[
'section_id'
]);
...
...
@@ -181,17 +181,17 @@ class ArticleDAO extends DAO {
)
);
$article
->
set
Article
Id
(
$this
->
getInsertArticleId
());
$article
->
setId
(
$this
->
getInsertArticleId
());
$this
->
updateLocaleFields
(
$article
);
// Insert authors for this article
$authors
=&
$article
->
getAuthors
();
for
(
$i
=
0
,
$count
=
count
(
$authors
);
$i
<
$count
;
$i
++
)
{
$authors
[
$i
]
->
setArticleId
(
$article
->
get
Article
Id
());
$authors
[
$i
]
->
setArticleId
(
$article
->
getId
());
$this
->
authorDao
->
insertAuthor
(
$authors
[
$i
]);
}
return
$article
->
get
Article
Id
();
return
$article
->
getId
();
}
/**
...
...
@@ -241,7 +241,7 @@ class ArticleDAO extends DAO {
$article
->
getFastTracked
(),
$article
->
getHideAuthor
(),
$article
->
getCommentsStatus
(),
$article
->
get
Article
Id
()
$article
->
getId
()
)
);
...
...
@@ -260,11 +260,11 @@ class ArticleDAO extends DAO {
// Remove deleted authors
$removedAuthors
=
$article
->
getRemovedAuthors
();
for
(
$i
=
0
,
$count
=
count
(
$removedAuthors
);
$i
<
$count
;
$i
++
)
{
$this
->
authorDao
->
deleteAuthorById
(
$removedAuthors
[
$i
],
$article
->
get
Article
Id
());
$this
->
authorDao
->
deleteAuthorById
(
$removedAuthors
[
$i
],
$article
->
getId
());
}
// Update author sequence numbers
$this
->
authorDao
->
resequenceAuthors
(
$article
->
get
Article
Id
());
$this
->
authorDao
->
resequenceAuthors
(
$article
->
getId
());
}
/**
...
...
@@ -272,7 +272,7 @@ class ArticleDAO extends DAO {
* @param $article Article
*/
function
deleteArticle
(
&
$article
)
{
return
$this
->
deleteArticleById
(
$article
->
get
Article
Id
());
return
$this
->
deleteArticleById
(
$article
->
getId
());
}
/**
...
...
@@ -401,7 +401,7 @@ class ArticleDAO extends DAO {
while
(
!
$articles
->
eof
())
{
$article
=&
$articles
->
next
();
$this
->
deleteArticleById
(
$article
->
get
Article
Id
());
$this
->
deleteArticleById
(
$article
->
getId
());
}
}
...
...
classes/article/PublishedArticleDAO.inc.php
View file @
a85cffc1
...
...
@@ -562,7 +562,7 @@ class PublishedArticleDAO extends DAO {
(?, ?, %s, ?, ?, ?)'
,
$this
->
datetimeToDB
(
$publishedArticle
->
getDatePublished
())),
array
(
$publishedArticle
->
get
Article
Id
(),
$publishedArticle
->
getId
(),
$publishedArticle
->
getIssueId
(),
$publishedArticle
->
getSeq
(),
$publishedArticle
->
getAccessStatus
(),
...
...
@@ -650,7 +650,7 @@ class PublishedArticleDAO extends DAO {
WHERE pub_id = ?'
,
$this
->
datetimeToDB
(
$publishedArticle
->
getDatePublished
())),
array
(
$publishedArticle
->
get
Article
Id
(),
$publishedArticle
->
getId
(),
$publishedArticle
->
getIssueId
(),
$publishedArticle
->
getSeq
(),
$publishedArticle
->
getAccessStatus
(),
...
...
classes/author/form/submit/AuthorSubmitForm.inc.php
View file @
a85cffc1
...
...
@@ -42,7 +42,7 @@ class AuthorSubmitForm extends Form {
$this
->
addCheck
(
new
FormValidatorPost
(
$this
));
$this
->
step
=
(
int
)
$step
;
$this
->
article
=
$article
;
$this
->
articleId
=
$article
?
$article
->
get
Article
Id
()
:
null
;
$this
->
articleId
=
$article
?
$article
->
getId
()
:
null
;
}
/**
...
...
@@ -91,7 +91,7 @@ class AuthorSubmitForm extends Form {
foreach
(
$sectionEditors
as
$sectionEditorEntry
)
{
$editAssignment
=
new
EditAssignment
();
$editAssignment
->
setArticleId
(
$article
->
get
Article
Id
());
$editAssignment
->
setArticleId
(
$article
->
getId
());
$editAssignment
->
setEditorId
(
$sectionEditorEntry
[
'user'
]
->
getId
());
$editAssignment
->
setCanReview
(
$sectionEditorEntry
[
'canReview'
]);
$editAssignment
->
setCanEdit
(
$sectionEditorEntry
[
'canEdit'
]);
...
...
classes/author/form/submit/AuthorSubmitStep3Form.inc.php
View file @
a85cffc1
...
...
@@ -194,7 +194,7 @@ class AuthorSubmitStep3Form extends AuthorSubmitForm {
}
if
(
$author
!=
null
)
{
$author
->
setArticleId
(
$article
->
get
Article
Id
());
$author
->
setArticleId
(
$article
->
getId
());
$author
->
setFirstName
(
$authors
[
$i
][
'firstName'
]);
$author
->
setMiddleName
(
$authors
[
$i
][
'middleName'
]);
$author
->
setLastName
(
$authors
[
$i
][
'lastName'
]);
...
...
classes/author/form/submit/AuthorSubmitStep5Form.inc.php
View file @
a85cffc1
...
...
@@ -147,13 +147,13 @@ class AuthorSubmitStep5Form extends AuthorSubmitForm {
// Designate this as the review version by default.
$authorSubmissionDao
=&
DAORegistry
::
getDAO
(
'AuthorSubmissionDAO'
);
$authorSubmission
=&
$authorSubmissionDao
->
getAuthorSubmission
(
$article
->
get
Article
Id
());
$authorSubmission
=&
$authorSubmissionDao
->
getAuthorSubmission
(
$article
->
getId
());
AuthorAction
::
designateReviewVersion
(
$authorSubmission
,
true
);
unset
(
$authorSubmission
);
$copyeditInitialSignoff
=
$signoffDao
->
build
(
'SIGNOFF_COPYEDITING_INITIAL'
,
ASSOC_TYPE_ARTICLE
,
$article
->
get
Article
Id
());
$copyeditAuthorSignoff
=
$signoffDao
->
build
(
'SIGNOFF_COPYEDITING_AUTHOR'
,
ASSOC_TYPE_ARTICLE
,
$article
->
get
Article
Id
());
$copyeditFinalSignoff
=
$signoffDao
->
build
(
'SIGNOFF_COPYEDITING_FINAL'
,
ASSOC_TYPE_ARTICLE
,
$article
->
get
Article
Id
());
$copyeditInitialSignoff
=
$signoffDao
->
build
(
'SIGNOFF_COPYEDITING_INITIAL'
,
ASSOC_TYPE_ARTICLE
,
$article
->
getId
());
$copyeditAuthorSignoff
=
$signoffDao
->
build
(
'SIGNOFF_COPYEDITING_AUTHOR'
,
ASSOC_TYPE_ARTICLE
,
$article
->
getId
());
$copyeditFinalSignoff
=
$signoffDao
->
build
(
'SIGNOFF_COPYEDITING_FINAL'
,
ASSOC_TYPE_ARTICLE
,
$article
->
getId
());
$copyeditInitialSignoff
->
setUserId
(
0
);
$copyeditAuthorSignoff
->
setUserId
(
$user
->
getId
());
$copyeditFinalSignoff
->
setUserId
(
0
);
...
...
@@ -161,13 +161,13 @@ class AuthorSubmitStep5Form extends AuthorSubmitForm {
$signoffDao
->
updateObject
(
$copyeditAuthorSignoff
);
$signoffDao
->
updateObject
(
$copyeditFinalSignoff
);
$layoutSignoff
=
$signoffDao
->
build
(
'SIGNOFF_LAYOUT'
,
ASSOC_TYPE_ARTICLE
,
$article
->
get
Article
Id
());
$layoutSignoff
=
$signoffDao
->
build
(
'SIGNOFF_LAYOUT'
,
ASSOC_TYPE_ARTICLE
,
$article
->
getId
());
$layoutSignoff
->
setUserId
(
0
);
$signoffDao
->
updateObject
(
$layoutSignoff
);
$proofAuthorSignoff
=
$signoffDao
->
build
(
'SIGNOFF_PROOFREADING_AUTHOR'
,
ASSOC_TYPE_ARTICLE
,
$article
->
get
Article
Id
());
$proofProofreaderSignoff
=
$signoffDao
->
build
(
'SIGNOFF_PROOFREADING_PROOFREADER'
,
ASSOC_TYPE_ARTICLE
,
$article
->
get
Article
Id
());
$proofLayoutEditorSignoff
=
$signoffDao
->
build
(
'SIGNOFF_PROOFREADING_LAYOUT'
,
ASSOC_TYPE_ARTICLE
,
$article
->
get
Article
Id
());
$proofAuthorSignoff
=
$signoffDao
->
build
(
'SIGNOFF_PROOFREADING_AUTHOR'
,
ASSOC_TYPE_ARTICLE
,
$article
->
getId
());
$proofProofreaderSignoff
=
$signoffDao
->
build
(
'SIGNOFF_PROOFREADING_PROOFREADER'
,
ASSOC_TYPE_ARTICLE
,
$article
->
getId
());
$proofLayoutEditorSignoff
=
$signoffDao
->
build
(
'SIGNOFF_PROOFREADING_LAYOUT'
,
ASSOC_TYPE_ARTICLE
,
$article
->
getId
());
$proofAuthorSignoff
->
setUserId
(
$user
->
getId
());
$proofProofreaderSignoff
->
setUserId
(
0
);
$proofLayoutEditorSignoff
->
setUserId
(
0
);
...
...
@@ -213,14 +213,14 @@ class AuthorSubmitStep5Form extends AuthorSubmitForm {
'authorName'
=>
$user
->
getFullName
(),
'authorUsername'
=>
$user
->
getUsername
(),
'editorialContactSignature'
=>
$journal
->
getSetting
(
'contactName'
)
.
"
\n
"
.
$journal
->
getLocalizedTitle
(),
'submissionUrl'
=>
Request
::
url
(
null
,
'author'
,
'submission'
,
$article
->
get
Article
Id
())
'submissionUrl'
=>
Request
::
url
(
null
,
'author'
,
'submission'
,
$article
->
getId
())
));
$mail
->
send
();
}
import
(
'article.log.ArticleLog'
);
import
(
'article.log.ArticleEventLogEntry'
);
ArticleLog
::
logEvent
(
$this
->
articleId
,
ARTICLE_LOG_ARTICLE_SUBMIT
,
ARTICLE_LOG_TYPE_AUTHOR
,
$user
->
getId
(),
'log.author.submitted'
,
array
(
'submissionId'
=>
$article
->
get
Article
Id
(),
'authorName'
=>
$user
->
getFullName
()));
ArticleLog
::
logEvent
(
$this
->
articleId
,
ARTICLE_LOG_ARTICLE_SUBMIT
,
ARTICLE_LOG_TYPE_AUTHOR
,
$user
->
getId
(),
'log.author.submitted'
,
array
(
'submissionId'
=>
$article
->
getId
(),
'authorName'
=>
$user
->
getFullName
()));
return
$this
->
articleId
;
}
...
...
classes/author/form/submit/AuthorSubmitSuppFileForm.inc.php
View file @
a85cffc1
...
...
@@ -37,11 +37,11 @@ class AuthorSubmitSuppFileForm extends Form {
*/
function
AuthorSubmitSuppFileForm
(
$article
,
$suppFileId
=
null
)
{
parent
::
Form
(
'author/submit/suppFile.tpl'
);
$this
->
articleId
=
$article
->
get
Article
Id
();
$this
->
articleId
=
$article
->
getId
();
if
(
isset
(
$suppFileId
)
&&
!
empty
(
$suppFileId
))
{
$suppFileDao
=&
DAORegistry
::
getDAO
(
'SuppFileDAO'
);
$this
->
suppFile
=&
$suppFileDao
->
getSuppFile
(
$suppFileId
,
$article
->
get
Article
Id
());
$this
->
suppFile
=&
$suppFileDao
->
getSuppFile
(
$suppFileId
,
$article
->
getId
());
if
(
isset
(
$this
->
suppFile
))
{
$this
->
suppFileId
=
$suppFileId
;
}
...
...
classes/file/ArticleFileManager.inc.php
View file @
a85cffc1
...
...
@@ -435,7 +435,7 @@ class ArticleFileManager extends FileManager {
function
&
generateDummyFile
(
&
$article
)
{
$articleFileDao
=&
DAORegistry
::
getDAO
(
'ArticleFileDAO'
);
$articleFile
=
new
ArticleFile
();
$articleFile
->
setArticleId
(
$article
->
get
Article
Id
());
$articleFile
->
setArticleId
(
$article
->
getId
());
$articleFile
->
setFileName
(
'temp'
);
$articleFile
->
setOriginalFileName
(
'temp'
);
$articleFile
->
setFileType
(
'temp'
);
...
...
classes/install/Upgrade.inc.php
View file @
a85cffc1
...
...
@@ -66,7 +66,7 @@ class Upgrade extends Installer {
$articles
=&
$articleDao
->
getArticlesByJournalId
(
$journal
->
getId
());
while
(
$article
=&
$articles
->
next
())
{
if
(
!
$article
->
getReviewFileId
()
&&
$article
->
getSubmissionProgress
()
==
0
)
{
$authorSubmission
=&
$authorSubmissionDao
->
getAuthorSubmission
(
$article
->
get
Article
Id
());
$authorSubmission
=&
$authorSubmissionDao
->
getAuthorSubmission
(
$article
->
getId
());
AuthorAction
::
designateReviewVersion
(
$authorSubmission
,
true
);
}
unset
(
$article
);
...
...
classes/issue/IssueAction.inc.php
View file @
a85cffc1
...
...
@@ -101,7 +101,7 @@ class IssueAction {
if
(
Validation
::
isAuthor
(
$journalId
))
{
if
(
$article
&&
$article
->
getUserId
()
==
$userId
)
return
true
;
$publishedArticleDao
=&
DAORegistry
::
getDAO
(
'PublishedArticleDAO'
);
if
(
$article
)
$publishedArticle
=&
$publishedArticleDao
->
getPublishedArticleByArticleId
(
$article
->
get
Article
Id
());
if
(
$article
)
$publishedArticle
=&
$publishedArticleDao
->
getPublishedArticleByArticleId
(
$article
->
getId
());
if
(
isset
(
$publishedArticle
)
&&
$publishedArticle
&&
$publishedArticle
->
getUserId
()
==
$userId
)
return
true
;
}
}
...
...
classes/mail/ArticleMailTemplate.inc.php
View file @
a85cffc1
...
...
@@ -57,7 +57,7 @@ class ArticleMailTemplate extends MailTemplate {
$journal
=
isset
(
$this
->
journal
)
?
$this
->
journal
:
Request
::
getJournal
();
$paramArray
[
'articleTitle'
]
=
strip_tags
(
$article
->
getLocalizedTitle
());
$paramArray
[
'articleId'
]
=
$article
->
get
Article
Id
();
$paramArray
[
'articleId'
]
=
$article
->
getId
();
$paramArray
[
'journalName'
]
=
strip_tags
(
$journal
->
getLocalizedTitle
());
$paramArray
[
'sectionName'
]
=
strip_tags
(
$article
->
getSectionTitle
());
$paramArray
[
'articleAbstract'
]
=
strip_tags
(
$article
->
getLocalizedAbstract
());
...
...
@@ -141,11 +141,11 @@ class ArticleMailTemplate extends MailTemplate {
$entry
->
setBccs
(
$this
->
getBccString
());
// Add log entry
$logEntryId
=
ArticleLog
::
logEmailEntry
(
$article
->
get
Article
Id
(),
$entry
);
$logEntryId
=
ArticleLog
::
logEmailEntry
(
$article
->
getId
(),
$entry
);
// Add attachments
import
(
'file.ArticleFileManager'
);
$articleFileManager
=
new
ArticleFileManager
(
$article
->
get
Article
Id
());
$articleFileManager
=
new
ArticleFileManager
(
$article
->
getId
());
foreach
(
$this
->
getAttachmentFiles
()
as
$attachment
)
{
$articleFileManager
->
temporaryFileToArticleFile
(
$attachment
,
...
...
classes/search/ArticleSearchIndex.inc.php
View file @
a85cffc1
...
...
@@ -170,7 +170,7 @@ class ArticleSearchIndex {
}
// Update search index
$articleId
=
$article
->
get
Article
Id
();
$articleId
=
$article
->
getId
();
ArticleSearchIndex
::
updateTextIndex
(
$articleId
,
ARTICLE_SEARCH_AUTHOR
,
$authorText
);
ArticleSearchIndex
::
updateTextIndex
(
$articleId
,
ARTICLE_SEARCH_TITLE
,
$article
->
getTitle
(
null
));
ArticleSearchIndex
::
updateTextIndex
(
$articleId
,
ARTICLE_SEARCH_ABSTRACT
,
$article
->
getAbstract
(
null
));
...
...
@@ -211,10 +211,10 @@ class ArticleSearchIndex {
function
indexArticleFiles
(
&
$article
)
{
// Index supplementary files
$fileDao
=&
DAORegistry
::
getDAO
(
'SuppFileDAO'
);
$files
=&
$fileDao
->
getSuppFilesByArticle
(
$article
->
get
Article
Id
());
$files
=&
$fileDao
->
getSuppFilesByArticle
(
$article
->
getId
());
foreach
(
$files
as
$file
)
{
if
(
$file
->
getFileId
())
{
ArticleSearchIndex
::
updateFileIndex
(
$article
->
get
Article
Id
(),
ARTICLE_SEARCH_SUPPLEMENTARY_FILE
,
$file
->
getFileId
());
ArticleSearchIndex
::
updateFileIndex
(
$article
->
getId
(),
ARTICLE_SEARCH_SUPPLEMENTARY_FILE
,
$file
->
getFileId
());
}
ArticleSearchIndex
::
indexSuppFileMetadata
(
$file
);
}
...
...
@@ -222,10 +222,10 @@ class ArticleSearchIndex {
// Index galley files
$fileDao
=&
DAORegistry
::
getDAO
(
'ArticleGalleyDAO'
);
$files
=&
$fileDao
->
getGalleysByArticle
(
$article
->
get
Article
Id
());
$files
=&
$fileDao
->
getGalleysByArticle
(
$article
->
getId
());
foreach
(
$files
as
$file
)
{
if
(
$file
->
getFileId
())
{
ArticleSearchIndex
::
updateFileIndex
(
$article
->
get
Article
Id
(),
ARTICLE_SEARCH_GALLEY_FILE
,
$file
->
getFileId
());
ArticleSearchIndex
::
updateFileIndex
(
$article
->
getId
(),
ARTICLE_SEARCH_GALLEY_FILE
,
$file
->
getFileId
());
}
}
}
...
...
classes/submission/author/AuthorAction.inc.php
View file @
a85cffc1
...
...
@@ -64,12 +64,12 @@ class AuthorAction extends Action {
function
deleteArticleFile
(
$article
,
$fileId
,
$revisionId
)
{
import
(
'file.ArticleFileManager'
);
$articleFileManager
=
new
ArticleFileManager
(
$article
->
get
Article
Id
());
$articleFileManager
=
new
ArticleFileManager
(
$article
->
getId
());
$articleFileDao
=&
DAORegistry
::
getDAO
(
'ArticleFileDAO'
);
$authorSubmissionDao
=&
DAORegistry
::
getDAO
(
'AuthorSubmissionDAO'
);
$articleFile
=&
$articleFileDao
->
getArticleFile
(
$fileId
,
$revisionId
,
$article
->
get
Article
Id
());
$authorSubmission
=
$authorSubmissionDao
->
getAuthorSubmission
(
$article
->
get
Article
Id
());
$articleFile
=&
$articleFileDao
->
getArticleFile
(
$fileId
,
$revisionId
,
$article
->
getId
());
$authorSubmission
=
$authorSubmissionDao
->
getAuthorSubmission
(
$article
->
getId
());
$authorRevisions
=
$authorSubmission
->
getAuthorFileRevisions
();
// Ensure that this is actually an author file.
...
...
@@ -290,7 +290,7 @@ class AuthorAction extends Action {
import
(
'notification.Notification'
);
$notificationUsers
=
$article
->
getAssociatedUserIds
(
true
,
false
);
foreach
(
$notificationUsers
as
$userRole
)
{
$url
=
Request
::
url
(
null
,
$userRole
[
'role'
],
'submissionEditing'
,
$article
->
get
Article
Id
(),
null
,
'layout'
);
$url
=
Request
::
url
(
null
,
$userRole
[
'role'
],
'submissionEditing'
,
$article
->
getId
(),
null
,
'layout'
);
Notification
::
createNotification
(
$userRole
[
'id'
],
"notification.type.layoutComment"
,
$article
->
getLocalizedTitle
(),
$url
,
1
,
NOTIFICATION_TYPE_LAYOUT_COMMENT
);
}
...
...
@@ -408,7 +408,7 @@ class AuthorAction extends Action {
import
(
'notification.Notification'
);
$notificationUsers
=
$article
->
getAssociatedUserIds
(
true
,
false
);
foreach
(
$notificationUsers
as
$userRole
)
{
$url
=
Request
::
url
(
null
,
$userRole
[
'role'
],
'submissionEditing'
,
$article
->
get
Article
Id
(),
null
,
'copyedit'
);
$url
=
Request
::
url
(
null
,
$userRole
[
'role'
],
'submissionEditing'
,
$article
->
getId
(),
null
,
'copyedit'
);
Notification
::
createNotification
(
$userRole
[
'id'
],
"notification.type.copyeditComment"
,
$article
->
getLocalizedTitle
(),
$url
,
1
,
NOTIFICATION_TYPE_COPYEDIT_COMMENT
);
}
...
...
@@ -458,7 +458,7 @@ class AuthorAction extends Action {
import
(
'notification.Notification'
);
$notificationUsers
=
$article
->
getAssociatedUserIds
(
true
,
false
);
foreach
(
$notificationUsers
as
$userRole
)
{
$url
=
Request
::
url
(
null
,
$userRole
[
'role'
],
'submissionEditing'
,
$article
->
get
Article
Id
(),
null
,
'proofread'
);
$url
=
Request
::
url
(
null
,
$userRole
[
'role'
],
'submissionEditing'
,
$article
->
getId
(),
null
,
'proofread'
);
Notification
::
createNotification
(
$userRole
[
'id'
],
"notification.type.proofreadComment"
,
$article
->
getLocalizedTitle
(),
$url
,
1
,
NOTIFICATION_TYPE_PROOFREAD_COMMENT
);
}
...
...
@@ -491,7 +491,7 @@ class AuthorAction extends Action {
$signoffDao
=&
DAORegistry
::
getDAO
(
'SignoffDAO'
);
$authorSubmissionDao
=&
DAORegistry
::
getDAO
(
'AuthorSubmissionDAO'
);
$authorSubmission
=&
$authorSubmissionDao
->
getAuthorSubmission
(
$article
->
get
Article
Id
());
$authorSubmission
=&
$authorSubmissionDao
->
getAuthorSubmission
(
$article
->
getId
());
$layoutSignoff
=
$signoffDao
->
getBySymbolic
(
'SIGNOFF_LAYOUT'
,
ASSOC_TYPE_ARTICLE
,
$authorSubmission
->
getArticleId
());
$canDownload
=
false
;
...
...
@@ -560,7 +560,7 @@ class AuthorAction extends Action {
// Check current review version
$reviewAssignmentDao
=&
DAORegistry
::
getDAO
(
'ReviewAssignmentDAO'
);
$reviewFilesByRound
=&
$reviewAssignmentDao
->
getReviewFilesByRound
(
$article
->
get
Article
Id
());
$reviewFilesByRound
=&
$reviewAssignmentDao
->
getReviewFilesByRound
(
$article
->
getId
());
$reviewFile
=
@
$reviewFilesByRound
[
$article
->
getCurrentRound
()];
if
(
$reviewFile
&&
$fileId
==
$reviewFile
->
getFileId
())
{
$canDownload
=
true
;
...
...
@@ -578,7 +578,7 @@ class AuthorAction extends Action {
$result
=
false
;
if
(
!
HookRegistry
::
call
(
'AuthorAction::downloadAuthorFile'
,
array
(
&
$article
,
&
$fileId
,
&
$revision
,
&
$canDownload
,
&
$result
)))
{
if
(
$canDownload
)
{
return
Action
::
downloadFile
(
$article
->
get
Article
Id
(),
$fileId
,
$revision
);
return
Action
::
downloadFile
(
$article
->
getId
(),
$fileId
,
$revision
);
}
else
{
return
false
;
}
...
...
classes/submission/common/Action.inc.php
View file @
a85cffc1
...
...
@@ -151,7 +151,7 @@ class Action {
import
(
'notification.Notification'
);
$notificationUsers
=
$article
->
getAssociatedUserIds
();
foreach
(
$notificationUsers
as
$userRole
)
{
$url
=
Request
::
url
(
null
,
$userRole
[
'role'
],
'submission'
,
$article
->
get
Article
Id
(),
null
,
'metadata'
);
$url
=
Request
::
url
(
null
,
$userRole
[
'role'
],
'submission'
,
$article
->
getId
(),
null
,
'metadata'
);
Notification
::
createNotification
(
$userRole
[
'id'
],
"notification.type.metadataModified"
,
$article
->
getLocalizedTitle
(),
$url
,
1
,
NOTIFICATION_TYPE_METADATA_MODIFIED
);
}
...
...
@@ -160,7 +160,7 @@ class Action {
$user
=&
Request
::
getUser
();
import
(
'article.log.ArticleLog'
);
import
(
'article.log.ArticleEventLogEntry'
);
ArticleLog
::
logEvent
(
$article
->
get
Article
Id
(),
ARTICLE_LOG_METADATA_UPDATE
,
ARTICLE_LOG_TYPE_DEFAULT
,
0
,
'log.editor.metadataModified'
,
Array
(
'editorName'
=>
$user
->
getFullName
()));
ArticleLog
::
logEvent
(
$article
->
getId
(),
ARTICLE_LOG_METADATA_UPDATE
,
ARTICLE_LOG_TYPE_DEFAULT
,
0
,
'log.editor.metadataModified'
,
Array
(
'editorName'
=>
$user
->
getFullName
()));
return
true
;
}
...
...
@@ -266,7 +266,7 @@ class Action {
import
(
'notification.Notification'
);
$notificationUsers
=
$article
->
getAssociatedUserIds
(
true
,
false
);
foreach
(
$notificationUsers
as
$userRole
)
{
$url
=
Request
::
url
(
null
,
$userRole
[
'role'
],
'submissionReview'
,
$article
->
get
Article
Id
(),
null
,
'editorDecision'
);
$url
=
Request
::
url
(
null
,
$userRole
[
'role'
],
'submissionReview'
,
$article
->
getId
(),
null
,
'editorDecision'
);
Notification
::
createNotification
(
$userRole
[
'id'
],
"notification.type.submissionComment"
,
$article
->
getLocalizedTitle
(),
$url
,
1
,
NOTIFICATION_TYPE_SUBMISSION_COMMENT
);
}
...
...
classes/submission/copyeditor/CopyeditorAction.inc.php
View file @
a85cffc1
...
...
@@ -303,7 +303,7 @@ class CopyeditorAction extends Action {
import
(
'notification.Notification'
);
$notificationUsers
=
$article
->
getAssociatedUserIds
(
true
,
false
);
foreach
(
$notificationUsers
as
$userRole
)
{
$url
=
Request
::
url
(
null
,
$userRole
[
'role'
],
'submissionEditing'
,
$article
->
get
Article
Id
(),
null
,
'layout'
);
$url
=
Request
::
url
(
null
,
$userRole
[
'role'
],
'submissionEditing'
,
$article
->
getId
(),
null
,
'layout'
);
Notification
::
createNotification
(
$userRole
[
'id'
],
"notification.type.layoutComment"
,
$article
->
getLocalizedTitle
(),
$url
,
1
,
NOTIFICATION_TYPE_LAYOUT_COMMENT
);
}
...
...
@@ -352,7 +352,7 @@ class CopyeditorAction extends Action {
import
(
'notification.Notification'
);
$notificationUsers
=
$article
->
getAssociatedUserIds
(
true
,
false
);
foreach
(
$notificationUsers
as
$userRole
)
{
$url
=
Request
::
url
(
null
,
$userRole
[
'role'
],
'submissionEditing'
,
$article
->
get
Article
Id
(),
null
,
'coypedit'
);
$url
=
Request
::
url
(
null
,
$userRole
[
'role'
],
'submissionEditing'
,
$article
->
getId
(),
null
,
'coypedit'
);
Notification
::
createNotification
(
$userRole
[
'id'
],
"notification.type.copyeditComment"
,
$article
->
getLocalizedTitle
(),
$url
,
1
,
NOTIFICATION_TYPE_COPYEDIT_COMMENT
);
}
...
...
classes/submission/editor/EditorAction.inc.php
View file @
a85cffc1
...
...
@@ -100,24 +100,24 @@ class EditorAction extends SectionEditorAction {
import
(
'submission.proofreader.ProofreaderAction'
);
$sectionEditorSubmissionDao
=&
DAORegistry
::
getDAO
(
'SectionEditorSubmissionDAO'
);
$sectionEditorSubmission
=&
$sectionEditorSubmissionDao
->
getSectionEditorSubmission
(
$article
->
get
Article
Id
());
$sectionEditorSubmission
=&
$sectionEditorSubmissionDao
->
getSectionEditorSubmission
(
$article
->
getId
());
$submissionFile
=
$sectionEditorSubmission
->
getSubmissionFile
();
// Add a long entry before doing anything.
import
(
'article.log.ArticleLog'
);
import
(
'article.log.ArticleEventLogEntry'
);
ArticleLog
::
logEvent
(
$article
->
get
Article
Id
(),
ARTICLE_LOG_EDITOR_EXPEDITE
,
ARTICLE_LOG_TYPE_EDITOR
,
$user
->
getId
(),
'log.editor.submissionExpedited'
,
array
(
'editorName'
=>
$user
->
getFullName
(),
'articleId'
=>
$article
->
get
Article
Id
()));
ArticleLog
::
logEvent
(
$article
->
getId
(),
ARTICLE_LOG_EDITOR_EXPEDITE
,
ARTICLE_LOG_TYPE_EDITOR
,
$user
->
getId
(),
'log.editor.submissionExpedited'
,
array
(
'editorName'
=>
$user
->
getFullName
(),
'articleId'
=>
$article
->
getId
()));
// 1. Ensure that an editor is assigned.
$editAssignments
=&
$sectionEditorSubmission
->
getEditAssignments
();
if
(
empty
(
$editAssignments
))
{
// No editors are currently assigned; assign self.
EditorAction
::
assignEditor
(
$article
->
get
Article
Id
(),
$user
->
getId
(),
true
);
EditorAction
::
assignEditor
(
$article
->
getId
(),
$user
->
getId
(),
true
);
}
// 2. Accept the submission and send to copyediting.
$sectionEditorSubmission
=&
$sectionEditorSubmissionDao
->
getSectionEditorSubmission
(
$article
->
get
Article
Id
());
$sectionEditorSubmission
=&
$sectionEditorSubmissionDao
->
getSectionEditorSubmission
(
$article
->
getId
());
if
(
!
$sectionEditorSubmission
->
getFileBySignoffType
(
'SIGNOFF_COPYEDITING_INITIAL'
,
true
))
{
SectionEditorAction
::
recordDecision
(
$sectionEditorSubmission
,
SUBMISSION_EDITOR_DECISION_ACCEPT
);
$reviewFile
=
$sectionEditorSubmission
->
getReviewFile
();
...
...
@@ -125,14 +125,14 @@ class EditorAction extends SectionEditorAction {
}
// 3. Add a galley.
$sectionEditorSubmission
=&
$sectionEditorSubmissionDao
->
getSectionEditorSubmission
(
$article
->
get
Article
Id
());
$sectionEditorSubmission
=&
$sectionEditorSubmissionDao
->
getSectionEditorSubmission
(
$article
->
getId
());
$galleys
=&
$sectionEditorSubmission
->
getGalleys
();
if
(
empty
(
$galleys
))
{
// No galley present -- use copyediting file.
import
(
'file.ArticleFileManager'
);
$copyeditFile
=&
$sectionEditorSubmission
->
getFileBySignoffType
(
'SIGNOFF_COPYEDITING_INITIAL'
);
$fileType
=
$copyeditFile
->
getFileType
();
$articleFileManager
=
new
ArticleFileManager
(
$article
->
get
Article
Id
());
$articleFileManager
=
new
ArticleFileManager
(
$article
->
getId
());
$fileId
=
$articleFileManager
->
copyPublicFile
(
$copyeditFile
->
getFilePath
(),
$fileType
);
if
(
strstr
(
$fileType
,
'html'
))
{
...
...
@@ -140,7 +140,7 @@ class EditorAction extends SectionEditorAction {
}
else
{
$galley
=
new
ArticleGalley
();
}
$galley
->
setArticleId
(
$article
->
get
Article
Id
());
$galley
->
setArticleId
(
$article
->
getId
());
$galley
->
setFileId
(
$fileId
);
$galley
->
setLocale
(
Locale
::
getLocale
());
...
...
classes/submission/form/MetadataForm.inc.php
View file @
a85cffc1
...
...
@@ -48,7 +48,7 @@ class MetadataForm extends Form {
$this
->
isEditor
=
true
;
}
$copyeditInitialSignoff
=
$signoffDao
->
getBySymbolic
(
'SIGNOFF_COPYEDITING_INITIAL'
,
ASSOC_TYPE_ARTICLE
,
$article
->
get
Article
Id
());
$copyeditInitialSignoff
=
$signoffDao
->
getBySymbolic
(
'SIGNOFF_COPYEDITING_INITIAL'
,
ASSOC_TYPE_ARTICLE
,
$article
->
getId
());
// If the user is an author and the article hasn't passed the Copyediting stage, make the form editable.
if
(
$roleId
==
ROLE_ID_AUTHOR
)
{
if
(
$article
->
getStatus
()
!=
STATUS_PUBLISHED
&&
(
$copyeditInitialSignoff
==
null
||
$copyeditInitialSignoff
->
getDateCompleted
()
==
null
))
{
...
...
@@ -59,7 +59,7 @@ class MetadataForm extends Form {
// Copy editors are also allowed to edit metadata, but only if they have
// a current assignment to the article.
if
(
$roleId
!=
null
&&
(
$roleId
==
ROLE_ID_COPYEDITOR
))
{
$copyeditFinalSignoff
=
$signoffDao
->
build
(
'SIGNOFF_COPYEDITING_FINAL'
,
ASSOC_TYPE_ARTICLE
,
$article
->
get
Article
Id
());
$copyeditFinalSignoff
=
$signoffDao
->
build
(
'SIGNOFF_COPYEDITING_FINAL'
,
ASSOC_TYPE_ARTICLE
,
$article
->
getId
());
if
(
$copyeditFinalSignoff
!=
null
&&
$article
->
getStatus
()
!=
STATUS_PUBLISHED
)
{
if
(
$copyeditInitialSignoff
->
getDateNotified
()
!=
null
&&
$copyeditFinalSignoff
->
getDateCompleted
()
==
null
)
{
$this
->
canEdit
=
true
;
...
...
@@ -357,7 +357,7 @@ class MetadataForm extends Form {
import
(
'search.ArticleSearchIndex'
);
ArticleSearchIndex
::
indexArticleMetadata
(
$article
);
return
$article
->
get
Article
Id
();
return
$article
->
getId
();
}
/**
...
...
classes/submission/form/SuppFileForm.inc.php
View file @
a85cffc1
...
...
@@ -39,7 +39,7 @@ class SuppFileForm extends Form {
if
(
isset
(
$suppFileId
)
&&
!
empty
(
$suppFileId
))
{
$suppFileDao
=&
DAORegistry
::
getDAO
(
'SuppFileDAO'
);
$this
->
suppFile
=&
$suppFileDao
->
getSuppFile
(
$suppFileId
,
$article
->
get
Article
Id
());
$this
->
suppFile
=&
$suppFileDao
->
getSuppFile
(
$suppFileId
,
$article
->
getId
());
if
(
isset
(
$this
->
suppFile
))
{
$this
->
suppFileId
=
$suppFileId
;
}
...
...
classes/submission/form/comment/CommentForm.inc.php
View file @
a85cffc1
...
...
@@ -51,7 +51,7 @@ class CommentForm extends Form {
$this
->
article
=
$article
;
$this
->
commentType
=
$commentType
;
$this
->
roleId
=
$roleId
;
$this
->
assocId
=
$assocId
==
null
?
$article
->
get
Article
Id
()
:
$assocId
;
$this
->
assocId
=
$assocId
==
null
?
$article
->
getId
()
:
$assocId
;
$this
->
user
=&
Request
::
getUser
();
...
...
@@ -74,10 +74,10 @@ class CommentForm extends Form {
$article
=
$this
->
article
;
$articleCommentDao
=&
DAORegistry
::
getDAO
(
'ArticleCommentDAO'
);
$articleComments
=&
$articleCommentDao
->
getArticleComments
(
$article
->
get
Article
Id
(),
$this
->
commentType
,
$this
->
assocId
);
$articleComments
=&
$articleCommentDao
->
getArticleComments
(
$article
->
getId
(),
$this
->
commentType
,
$this
->
assocId
);
$templateMgr
=&
TemplateManager
::
getManager
();
$templateMgr
->
assign
(
'articleId'
,
$article
->
get
Article
Id
());
$templateMgr
->
assign
(
'articleId'
,
$article
->
getId
());
$templateMgr
->
assign
(
'commentTitle'
,
strip_tags
(
$article
->
getLocalizedTitle
()));
$user
=&
$this
->
user
;
$templateMgr
->
assign
(
'userId'
,
$user
->
getId
());
...
...
@@ -110,7 +110,7 @@ class CommentForm extends Form {
$comment
=
new
ArticleComment
();
$comment
->
setCommentType
(
$this
->
commentType
);
$comment
->
setRoleId
(
$this
->
roleId
);
$comment
->
setArticleId
(
$article
->
get
Article
Id
());