We are moving to Git Issues for bug tracking in future releases. During transition, content will be in both tools. If you'd like to file a new bug, please create an issue.

View | Details | Raw Unified | Return to bug 6068 | Differences between
and this patch

Collapse All | Expand All

(-)a/classes/security/RoleDAO.inc.php (-4 / +4 lines)
 Lines 146-152   class RoleDAO extends DAO { Link Here 
146
	function &getUsersByRoleId($roleId = null, $journalId = null, $searchType = null, $search = null, $searchMatch = null, $dbResultRange = null, $sortBy = null, $sortDirection = SORT_DIRECTION_ASC) {
146
	function &getUsersByRoleId($roleId = null, $journalId = null, $searchType = null, $search = null, $searchMatch = null, $dbResultRange = null, $sortBy = null, $sortDirection = SORT_DIRECTION_ASC) {
147
		$users = array();
147
		$users = array();
148
148
149
		$paramArray = array('interest');
149
		$paramArray = array(ASSOC_TYPE_USER, 'interest');
150
		if (isset($roleId)) $paramArray[] = (int) $roleId;
150
		if (isset($roleId)) $paramArray[] = (int) $roleId;
151
		if (isset($journalId)) $paramArray[] = (int) $journalId;
151
		if (isset($journalId)) $paramArray[] = (int) $journalId;
152
152
 Lines 194-200   class RoleDAO extends DAO { Link Here 
194
		$searchSql .= ($sortBy?(' ORDER BY ' . $this->getSortMapping($sortBy) . ' ' . $this->getDirectionMapping($sortDirection)) : '');
194
		$searchSql .= ($sortBy?(' ORDER BY ' . $this->getSortMapping($sortBy) . ' ' . $this->getDirectionMapping($sortDirection)) : '');
195
195
196
		$result =& $this->retrieveRange(
196
		$result =& $this->retrieveRange(
197
			'SELECT DISTINCT u.* FROM users AS u LEFT JOIN controlled_vocabs cv ON (cv.assoc_id = u.user_id AND cv.symbolic = ?)
197
			'SELECT DISTINCT u.* FROM users AS u LEFT JOIN controlled_vocabs cv ON (cv.assoc_type = ? AND cv.assoc_id = u.user_id AND cv.symbolic = ?)
198
				LEFT JOIN controlled_vocab_entries cve ON (cve.controlled_vocab_id = cv.controlled_vocab_id)
198
				LEFT JOIN controlled_vocab_entries cve ON (cve.controlled_vocab_id = cv.controlled_vocab_id)
199
				LEFT JOIN controlled_vocab_entry_settings cves ON (cves.controlled_vocab_entry_id = cve.controlled_vocab_entry_id),
199
				LEFT JOIN controlled_vocab_entry_settings cves ON (cves.controlled_vocab_entry_id = cve.controlled_vocab_entry_id),
200
				roles AS r WHERE u.user_id = r.user_id ' . (isset($roleId)?'AND r.role_id = ?':'') . (isset($journalId) ? ' AND r.journal_id = ?' : '') . ' ' . $searchSql,
200
				roles AS r WHERE u.user_id = r.user_id ' . (isset($roleId)?'AND r.role_id = ?':'') . (isset($journalId) ? ' AND r.journal_id = ?' : '') . ' ' . $searchSql,
 Lines 218-224   class RoleDAO extends DAO { Link Here 
218
	function &getUsersByJournalId($journalId, $searchType = null, $search = null, $searchMatch = null, $dbResultRange = null, $sortBy = null, $sortDirection = SORT_DIRECTION_ASC) {
218
	function &getUsersByJournalId($journalId, $searchType = null, $search = null, $searchMatch = null, $dbResultRange = null, $sortBy = null, $sortDirection = SORT_DIRECTION_ASC) {
219
		$users = array();
219
		$users = array();
220
220
221
		$paramArray = array('interest', (int) $journalId);
221
		$paramArray = array(ASSOC_TYPE_USER, 'interest', (int) $journalId);
222
		$searchSql = '';
222
		$searchSql = '';
223
223
224
		$searchTypeMap = array(
224
		$searchTypeMap = array(
 Lines 260-266   class RoleDAO extends DAO { Link Here 
260
260
261
		$result =& $this->retrieveRange(
261
		$result =& $this->retrieveRange(
262
262
263
			'SELECT DISTINCT u.* FROM users AS u LEFT JOIN controlled_vocabs cv ON (cv.assoc_id = u.user_id AND cv.symbolic = ?)
263
			'SELECT DISTINCT u.* FROM users AS u LEFT JOIN controlled_vocabs cv ON (cv.assoc_type = ? AND cv.assoc_id = u.user_id AND cv.symbolic = ?)
264
				LEFT JOIN controlled_vocab_entries cve ON (cve.controlled_vocab_id = cv.controlled_vocab_id)
264
				LEFT JOIN controlled_vocab_entries cve ON (cve.controlled_vocab_id = cv.controlled_vocab_id)
265
				LEFT JOIN controlled_vocab_entry_settings cves ON (cves.controlled_vocab_entry_id = cve.controlled_vocab_entry_id),
265
				LEFT JOIN controlled_vocab_entry_settings cves ON (cves.controlled_vocab_entry_id = cve.controlled_vocab_entry_id),
266
				roles AS r WHERE u.user_id = r.user_id AND r.journal_id = ? ' . $searchSql,
266
				roles AS r WHERE u.user_id = r.user_id AND r.journal_id = ? ' . $searchSql,
(-)a/classes/submission/editor/EditorSubmissionDAO.inc.php (-2 / +2 lines)
 Lines 610-616   class EditorSubmissionDAO extends DAO { Link Here 
610
	function &getUsersNotAssignedToArticle($journalId, $articleId, $roleId, $searchType=null, $search=null, $searchMatch=null, $rangeInfo = null) {
610
	function &getUsersNotAssignedToArticle($journalId, $articleId, $roleId, $searchType=null, $search=null, $searchMatch=null, $rangeInfo = null) {
611
		$users = array();
611
		$users = array();
612
612
613
		$paramArray = array('interest', $articleId, $journalId, $roleId);
613
		$paramArray = array(ASSOC_TYPE_USER, 'interest', $articleId, $journalId, $roleId);
614
		$searchSql = '';
614
		$searchSql = '';
615
615
616
		$searchTypeMap = array(
616
		$searchTypeMap = array(
 Lines 653-659   class EditorSubmissionDAO extends DAO { Link Here 
653
			'SELECT DISTINCT
653
			'SELECT DISTINCT
654
				u.*
654
				u.*
655
			FROM	users u
655
			FROM	users u
656
				LEFT JOIN controlled_vocabs cv ON (cv.assoc_id = u.user_id AND cv.symbolic = ?)
656
				LEFT JOIN controlled_vocabs cv ON (cv.assoc_type = ? AND cv.assoc_id = u.user_id AND cv.symbolic = ?)
657
				LEFT JOIN controlled_vocab_entries cve ON (cve.controlled_vocab_id = cv.controlled_vocab_id)
657
				LEFT JOIN controlled_vocab_entries cve ON (cve.controlled_vocab_id = cv.controlled_vocab_id)
658
				LEFT JOIN controlled_vocab_entry_settings cves ON (cves.controlled_vocab_entry_id = cve.controlled_vocab_entry_id)
658
				LEFT JOIN controlled_vocab_entry_settings cves ON (cves.controlled_vocab_entry_id = cve.controlled_vocab_entry_id)
659
				LEFT JOIN roles r ON (r.user_id = u.user_id)
659
				LEFT JOIN roles r ON (r.user_id = u.user_id)
(-)a/classes/submission/sectionEditor/SectionEditorSubmissionDAO.inc.php (-4 / +4 lines)
 Lines 738-744   class SectionEditorSubmissionDAO extends DAO { Link Here 
738
	 * @return DAOResultFactory containing matching Users
738
	 * @return DAOResultFactory containing matching Users
739
	 */
739
	 */
740
	function &getReviewersForArticle($journalId, $articleId, $round, $searchType = null, $search = null, $searchMatch = null, $rangeInfo = null, $sortBy = null, $sortDirection = SORT_DIRECTION_ASC) {
740
	function &getReviewersForArticle($journalId, $articleId, $round, $searchType = null, $search = null, $searchMatch = null, $rangeInfo = null, $sortBy = null, $sortDirection = SORT_DIRECTION_ASC) {
741
		$paramArray = array($articleId, $round, 'interest', $journalId, RoleDAO::getRoleIdFromPath('reviewer'));
741
		$paramArray = array($articleId, $round, ASSOC_TYPE_USER, 'interest', $journalId, RoleDAO::getRoleIdFromPath('reviewer'));
742
		$searchSql = '';
742
		$searchSql = '';
743
743
744
		$searchTypeMap = array(
744
		$searchTypeMap = array(
 Lines 794-800   class SectionEditorSubmissionDAO extends DAO { Link Here 
794
				LEFT JOIN review_assignments ar ON (ar.reviewer_id = u.user_id AND ar.cancelled = 0 AND ar.submission_id = ? AND ar.round = ?)
794
				LEFT JOIN review_assignments ar ON (ar.reviewer_id = u.user_id AND ar.cancelled = 0 AND ar.submission_id = ? AND ar.round = ?)
795
				LEFT JOIN roles r ON (r.user_id = u.user_id)
795
				LEFT JOIN roles r ON (r.user_id = u.user_id)
796
				LEFT JOIN articles a ON (ra.submission_id = a.article_id)
796
				LEFT JOIN articles a ON (ra.submission_id = a.article_id)
797
				LEFT JOIN controlled_vocabs cv ON (cv.assoc_id = u.user_id AND cv.symbolic = ?)
797
				LEFT JOIN controlled_vocabs cv ON (cv.assoc_type = ? AND cv.assoc_id = u.user_id AND cv.symbolic = ?)
798
				LEFT JOIN controlled_vocab_entries cve ON (cve.controlled_vocab_id = cv.controlled_vocab_id)
798
				LEFT JOIN controlled_vocab_entries cve ON (cve.controlled_vocab_id = cv.controlled_vocab_id)
799
				LEFT JOIN controlled_vocab_entry_settings cves ON (cves.controlled_vocab_entry_id = cve.controlled_vocab_entry_id)
799
				LEFT JOIN controlled_vocab_entry_settings cves ON (cves.controlled_vocab_entry_id = cve.controlled_vocab_entry_id)
800
			WHERE u.user_id = r.user_id AND
800
			WHERE u.user_id = r.user_id AND
 Lines 871-877   class SectionEditorSubmissionDAO extends DAO { Link Here 
871
	function &getCopyeditorsNotAssignedToArticle($journalId, $articleId, $searchType = null, $search = null, $searchMatch = null) {
871
	function &getCopyeditorsNotAssignedToArticle($journalId, $articleId, $searchType = null, $search = null, $searchMatch = null) {
872
		$users = array();
872
		$users = array();
873
873
874
		$paramArray = array('interest', $articleId, ASSOC_TYPE_ARTICLE, 'SIGNOFF_COPYEDITING_INITIAL', $journalId, RoleDAO::getRoleIdFromPath('copyeditor'));
874
		$paramArray = array(ASSOC_TYPE_USER, 'interest', $articleId, ASSOC_TYPE_ARTICLE, 'SIGNOFF_COPYEDITING_INITIAL', $journalId, RoleDAO::getRoleIdFromPath('copyeditor'));
875
		$searchSql = '';
875
		$searchSql = '';
876
876
877
		$searchTypeMap = array(
877
		$searchTypeMap = array(
 Lines 913-919   class SectionEditorSubmissionDAO extends DAO { Link Here 
913
		$result =& $this->retrieve(
913
		$result =& $this->retrieve(
914
			'SELECT	u.*
914
			'SELECT	u.*
915
			FROM	users u
915
			FROM	users u
916
				LEFT JOIN controlled_vocabs cv ON (cv.assoc_id = u.user_id AND cv.symbolic = ?)
916
				LEFT JOIN controlled_vocabs cv ON (cv.assoc_type = ? AND cv.assoc_id = u.user_id AND cv.symbolic = ?)
917
				LEFT JOIN controlled_vocab_entries cve ON (cve.controlled_vocab_id = cv.controlled_vocab_id)
917
				LEFT JOIN controlled_vocab_entries cve ON (cve.controlled_vocab_id = cv.controlled_vocab_id)
918
				LEFT JOIN controlled_vocab_entry_settings cves ON (cves.controlled_vocab_entry_id = cve.controlled_vocab_entry_id)
918
				LEFT JOIN controlled_vocab_entry_settings cves ON (cves.controlled_vocab_entry_id = cve.controlled_vocab_entry_id)
919
				LEFT JOIN roles r ON (r.user_id = u.user_id)
919
				LEFT JOIN roles r ON (r.user_id = u.user_id)

Return to bug 6068