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

Collapse All | Expand All

(-)a/classes/paper/Paper.inc.php (+1 lines)
 Lines 41-46   define('SUBMISSION_FIELD_AUTHOR', 1); Link Here 
41
define('SUBMISSION_FIELD_DIRECTOR', 2);
41
define('SUBMISSION_FIELD_DIRECTOR', 2);
42
define('SUBMISSION_FIELD_TITLE', 3);
42
define('SUBMISSION_FIELD_TITLE', 3);
43
define('SUBMISSION_FIELD_REVIEWER', 4);
43
define('SUBMISSION_FIELD_REVIEWER', 4);
44
define('SUBMISSION_FIELD_ID', 8);
44
45
45
define('SUBMISSION_FIELD_DATE_SUBMITTED', 5);
46
define('SUBMISSION_FIELD_DATE_SUBMITTED', 5);
46
47
(-)a/classes/submission/director/DirectorSubmissionDAO.inc.php (+4 lines)
 Lines 197-202   class DirectorSubmissionDAO extends DAO { Link Here 
197
		$searchSql = '';
197
		$searchSql = '';
198
198
199
		if (!empty($search)) switch ($searchField) {
199
		if (!empty($search)) switch ($searchField) {
200
			case SUBMISSION_FIELD_ID:
201
				$params[] = (int) $search;
202
				$searchSql = ' AND p.paper_id = ?';
203
				break;
200
			case SUBMISSION_FIELD_TITLE:
204
			case SUBMISSION_FIELD_TITLE:
201
				if ($searchMatch === 'is') {
205
				if ($searchMatch === 'is') {
202
					$searchSql = ' AND LOWER(ptl.setting_value) = LOWER(?)';
206
					$searchSql = ' AND LOWER(ptl.setting_value) = LOWER(?)';
(-)a/classes/submission/trackDirector/TrackDirectorSubmissionDAO.inc.php (+4 lines)
 Lines 296-301   class TrackDirectorSubmissionDAO extends DAO { Link Here 
296
		$searchSql = '';
296
		$searchSql = '';
297
297
298
		if (!empty($search)) switch ($searchField) {
298
		if (!empty($search)) switch ($searchField) {
299
			case SUBMISSION_FIELD_ID:
300
				$params[] = (int) $search;
301
				$searchSql = ' AND p.paper_id = ?';
302
				break;
299
			case SUBMISSION_FIELD_TITLE:
303
			case SUBMISSION_FIELD_TITLE:
300
				if ($searchMatch === 'is') {
304
				if ($searchMatch === 'is') {
301
					$searchSql = ' AND LOWER(ptl.setting_value) = LOWER(?)';
305
					$searchSql = ' AND LOWER(ptl.setting_value) = LOWER(?)';
(-)a/pages/director/DirectorHandler.inc.php (+7 lines)
 Lines 177-182   class DirectorHandler extends TrackDirectorHandler { Link Here 
177
			$submissions =& ArrayItemIterator::fromRangeInfo($submissionsArray, $rangeInfo);
177
			$submissions =& ArrayItemIterator::fromRangeInfo($submissionsArray, $rangeInfo);
178
		}
178
		}
179
179
180
		// If only result is returned from a search, fast-forward to it
181
		if ($search && $submissions && $submissions->getCount() == 1) {
182
			$submission =& $submissions->next();
183
			$request->redirect(null, null, null, 'submission', array($submission->getId()));
184
		}
185
180
		$templateMgr =& TemplateManager::getManager();
186
		$templateMgr =& TemplateManager::getManager();
181
		$templateMgr->assign('pageToDisplay', $page);
187
		$templateMgr->assign('pageToDisplay', $page);
182
		$templateMgr->assign('director', $user->getFullName());
188
		$templateMgr->assign('director', $user->getFullName());
 Lines 202-207   class DirectorHandler extends TrackDirectorHandler { Link Here 
202
208
203
		$templateMgr->assign('fieldOptions', Array(
209
		$templateMgr->assign('fieldOptions', Array(
204
			SUBMISSION_FIELD_TITLE => 'paper.title',
210
			SUBMISSION_FIELD_TITLE => 'paper.title',
211
			SUBMISSION_FIELD_ID => 'paper.submissionId',
205
			SUBMISSION_FIELD_AUTHOR => 'user.role.author',
212
			SUBMISSION_FIELD_AUTHOR => 'user.role.author',
206
			SUBMISSION_FIELD_DIRECTOR => 'user.role.director',
213
			SUBMISSION_FIELD_DIRECTOR => 'user.role.director',
207
			SUBMISSION_FIELD_REVIEWER => 'user.role.reviewer'
214
			SUBMISSION_FIELD_REVIEWER => 'user.role.reviewer'
(-)a/pages/trackDirector/TrackDirectorHandler.inc.php (-1 / +8 lines)
 Lines 116-122   class TrackDirectorHandler extends Handler { Link Here 
116
			$rangeInfo =& $submissions->getLastPageRangeInfo();
116
			$rangeInfo =& $submissions->getLastPageRangeInfo();
117
			unset($submissions);
117
			unset($submissions);
118
		}
118
		}
119
		
119
120
		if ($sort == 'status') {
120
		if ($sort == 'status') {
121
			// Sort all submissions by status, which is too complex to do in the DB
121
			// Sort all submissions by status, which is too complex to do in the DB
122
			$submissionsArray = $submissions->toArray();
122
			$submissionsArray = $submissions->toArray();
 Lines 130-135   class TrackDirectorHandler extends Handler { Link Here 
130
			$submissions =& ArrayItemIterator::fromRangeInfo($submissionsArray, $rangeInfo);
130
			$submissions =& ArrayItemIterator::fromRangeInfo($submissionsArray, $rangeInfo);
131
		}
131
		}
132
132
133
		// If only result is returned from a search, fast-forward to it
134
		if ($search && $submissions && $submissions->getCount() == 1) {
135
			$submission =& $submissions->next();
136
			$request->redirect(null, null, null, 'submission', array($submission->getId()));
137
		}
138
133
		$templateMgr =& TemplateManager::getManager();
139
		$templateMgr =& TemplateManager::getManager();
134
		$templateMgr->assign('helpTopicId', $helpTopicId);
140
		$templateMgr->assign('helpTopicId', $helpTopicId);
135
		$templateMgr->assign('trackOptions', $filterTrackOptions);
141
		$templateMgr->assign('trackOptions', $filterTrackOptions);
 Lines 156-161   class TrackDirectorHandler extends Handler { Link Here 
156
162
157
		$templateMgr->assign('fieldOptions', Array(
163
		$templateMgr->assign('fieldOptions', Array(
158
			SUBMISSION_FIELD_TITLE => 'paper.title',
164
			SUBMISSION_FIELD_TITLE => 'paper.title',
165
			SUBMISSION_FIELD_ID => 'paper.submissionId',
159
			SUBMISSION_FIELD_AUTHOR => 'user.role.author',
166
			SUBMISSION_FIELD_AUTHOR => 'user.role.author',
160
			SUBMISSION_FIELD_DIRECTOR => 'user.role.director'
167
			SUBMISSION_FIELD_DIRECTOR => 'user.role.director'
161
		));
168
		));

Return to bug 6407