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 4718 | Differences between
and this patch

Collapse All | Expand All

(-)a/plugins/importexport/quickSubmit/QuickSubmitPlugin.inc.php (-8 / +8 lines)
 Lines 86-97   class QuickSubmitPlugin extends ImportExportPlugin { Link Here 
86
		$form->readInputData();
86
		$form->readInputData();
87
		$formLocale = $form->getFormLocale();
87
		$formLocale = $form->getFormLocale();
88
88
89
		if ($request->getUserVar('addAuthor')) {
89
		if (Request::getUserVar('addAuthor')) {
90
			$editData = true;
90
			$editData = true;
91
			$authors = $form->getData('authors');
91
			$authors = $form->getData('authors');
92
			$authors[] = array();
92
			$authors[] = array();
93
			$form->setData('authors', $authors);
93
			$form->setData('authors', $authors);
94
		} else if (($delAuthor = $request->getUserVar('delAuthor')) && count($delAuthor) == 1) {
94
		} else if (($delAuthor = Request::getUserVar('delAuthor')) && count($delAuthor) == 1) {
95
			$editData = true;
95
			$editData = true;
96
			list($delAuthor) = array_keys($delAuthor);
96
			list($delAuthor) = array_keys($delAuthor);
97
			$delAuthor = (int) $delAuthor;
97
			$delAuthor = (int) $delAuthor;
 Lines 107-117   class QuickSubmitPlugin extends ImportExportPlugin { Link Here 
107
			if ($form->getData('primaryContact') == $delAuthor) {
107
			if ($form->getData('primaryContact') == $delAuthor) {
108
				$form->setData('primaryContact', 0);
108
				$form->setData('primaryContact', 0);
109
			}
109
			}
110
		} else if ($request->getUserVar('moveAuthor')) {
110
		} else if (Request::getUserVar('moveAuthor')) {
111
			$editData = true;
111
			$editData = true;
112
			$moveAuthorDir = $request->getUserVar('moveAuthorDir');
112
			$moveAuthorDir = Request::getUserVar('moveAuthorDir');
113
			$moveAuthorDir = $moveAuthorDir == 'u' ? 'u' : 'd';
113
			$moveAuthorDir = $moveAuthorDir == 'u' ? 'u' : 'd';
114
			$moveAuthorIndex = (int) $request->getUserVar('moveAuthorIndex');
114
			$moveAuthorIndex = (int) Request::getUserVar('moveAuthorIndex');
115
			$authors = $form->getData('authors');
115
			$authors = $form->getData('authors');
116
116
117
			if (!(($moveAuthorDir == 'u' && $moveAuthorIndex <= 0) || ($moveAuthorDir == 'd' && $moveAuthorIndex >= count($authors) - 1))) {
117
			if (!(($moveAuthorDir == 'u' && $moveAuthorIndex <= 0) || ($moveAuthorDir == 'd' && $moveAuthorIndex >= count($authors) - 1))) {
 Lines 136-151   class QuickSubmitPlugin extends ImportExportPlugin { Link Here 
136
				}
136
				}
137
			}
137
			}
138
			$form->setData('authors', $authors);
138
			$form->setData('authors', $authors);
139
		} else if ($request->getUserVar('uploadSubmissionFile')) {
139
		} else if (Request::getUserVar('uploadSubmissionFile')) {
140
			$editData = true;
140
			$editData = true;
141
			$tempFileId = $form->getData('tempFileId');
141
			$tempFileId = $form->getData('tempFileId');
142
			$tempFileId[$formLocale] = $form->uploadSubmissionFile('submissionFile');
142
			$tempFileId[$formLocale] = $form->uploadSubmissionFile('submissionFile');
143
			$form->setData('tempFileId', $tempFileId);
143
			$form->setData('tempFileId', $tempFileId);
144
		}
144
		}
145
145
146
		if ($request->getUserVar('createAnother') && $form->validate()) {
146
		if (Request::getUserVar('createAnother') && $form->validate()) {
147
			$form->execute();
147
			$form->execute();
148
			$request->redirect(null, 'manager', 'importexport', array('plugin', $this->getName()));
148
			Request::redirect(null, 'manager', 'importexport', array('plugin', $this->getName()));
149
		} else if (!isset($editData) && $form->validate()) {
149
		} else if (!isset($editData) && $form->validate()) {
150
			$form->execute();
150
			$form->execute();
151
			$templateMgr->display($this->getTemplatePath() . 'submitSuccess.tpl');
151
			$templateMgr->display($this->getTemplatePath() . 'submitSuccess.tpl');

Return to bug 4718