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

Collapse All | Expand All

(-)a/classes/author/form/submit/AuthorSubmitStep1Form.inc.php (-1 / +1 lines)
 Lines 184-190   class AuthorSubmitStep1Form extends AuthorSubmitForm { Link Here 
184
			$author->setFirstName($user->getFirstName());
184
			$author->setFirstName($user->getFirstName());
185
			$author->setMiddleName($user->getMiddleName());
185
			$author->setMiddleName($user->getMiddleName());
186
			$author->setLastName($user->getLastName());
186
			$author->setLastName($user->getLastName());
187
			$author->setAffiliation($user->getAffiliation());
187
			$author->setAffiliation($user->getAffiliation(null), null);
188
			$author->setCountry($user->getCountry());
188
			$author->setCountry($user->getCountry());
189
			$author->setEmail($user->getEmail());
189
			$author->setEmail($user->getEmail());
190
			$author->setUrl($user->getUrl());
190
			$author->setUrl($user->getUrl());
(-)a/classes/author/form/submit/AuthorSubmitStep3Form.inc.php (-2 / +2 lines)
 Lines 78-84   class AuthorSubmitStep3Form extends AuthorSubmitForm { Link Here 
78
						'firstName' => $authors[$i]->getFirstName(),
78
						'firstName' => $authors[$i]->getFirstName(),
79
						'middleName' => $authors[$i]->getMiddleName(),
79
						'middleName' => $authors[$i]->getMiddleName(),
80
						'lastName' => $authors[$i]->getLastName(),
80
						'lastName' => $authors[$i]->getLastName(),
81
						'affiliation' => $authors[$i]->getAffiliation(),
81
						'affiliation' => $authors[$i]->getAffiliation(null),
82
						'country' => $authors[$i]->getCountry(),
82
						'country' => $authors[$i]->getCountry(),
83
						'email' => $authors[$i]->getEmail(),
83
						'email' => $authors[$i]->getEmail(),
84
						'url' => $authors[$i]->getUrl(),
84
						'url' => $authors[$i]->getUrl(),
 Lines 238-244   class AuthorSubmitStep3Form extends AuthorSubmitForm { Link Here 
238
				$author->setFirstName($authors[$i]['firstName']);
238
				$author->setFirstName($authors[$i]['firstName']);
239
				$author->setMiddleName($authors[$i]['middleName']);
239
				$author->setMiddleName($authors[$i]['middleName']);
240
				$author->setLastName($authors[$i]['lastName']);
240
				$author->setLastName($authors[$i]['lastName']);
241
				$author->setAffiliation($authors[$i]['affiliation']);
241
				$author->setAffiliation($authors[$i]['affiliation'], null); // Localized
242
				$author->setCountry($authors[$i]['country']);
242
				$author->setCountry($authors[$i]['country']);
243
				$author->setEmail($authors[$i]['email']);
243
				$author->setEmail($authors[$i]['email']);
244
				$author->setUrl($authors[$i]['url']);
244
				$author->setUrl($authors[$i]['url']);
(-)a/classes/manager/form/UserManagementForm.inc.php (-2 / +2 lines)
 Lines 132-138   class UserManagementForm extends Form { Link Here 
132
					'lastName' => $user->getLastName(),
132
					'lastName' => $user->getLastName(),
133
					'initials' => $user->getInitials(),
133
					'initials' => $user->getInitials(),
134
					'gender' => $user->getGender(),
134
					'gender' => $user->getGender(),
135
					'affiliation' => $user->getAffiliation(),
135
					'affiliation' => $user->getAffiliation(null), // Localized
136
					'email' => $user->getEmail(),
136
					'email' => $user->getEmail(),
137
					'userUrl' => $user->getUrl(),
137
					'userUrl' => $user->getUrl(),
138
					'phone' => $user->getPhone(),
138
					'phone' => $user->getPhone(),
 Lines 234-240   class UserManagementForm extends Form { Link Here 
234
		$user->setLastName($this->getData('lastName'));
234
		$user->setLastName($this->getData('lastName'));
235
		$user->setInitials($this->getData('initials'));
235
		$user->setInitials($this->getData('initials'));
236
		$user->setGender($this->getData('gender'));
236
		$user->setGender($this->getData('gender'));
237
		$user->setAffiliation($this->getData('affiliation'));
237
		$user->setAffiliation($this->getData('affiliation'), null); // Localized
238
		$user->setEmail($this->getData('email'));
238
		$user->setEmail($this->getData('email'));
239
		$user->setUrl($this->getData('userUrl'));
239
		$user->setUrl($this->getData('userUrl'));
240
		$user->setPhone($this->getData('phone'));
240
		$user->setPhone($this->getData('phone'));
(-)a/classes/paper/AuthorDAO.inc.php (-33 / +46 lines)
 Lines 29-35   class AuthorDAO extends PKPAuthorDAO { Link Here 
29
	}
29
	}
30
30
31
	/**
31
	/**
32
	 * Retrieve all authors for a paper.
32
	 * Retrieve all authors for a submission.
33
	 * @param $submissionId int
33
	 * @param $submissionId int
34
	 * @return array Authors ordered by sequence
34
	 * @return array Authors ordered by sequence
35
	 */
35
	 */
 Lines 53-59   class AuthorDAO extends PKPAuthorDAO { Link Here 
53
	}
53
	}
54
54
55
	/**
55
	/**
56
	 * Retrieve all published papers associated with authors with
56
	 * Retrieve all published submissions associated with authors with
57
	 * the given first name, middle name, last name, affiliation, and country.
57
	 * the given first name, middle name, last name, affiliation, and country.
58
	 * @param $schedConfId int (null if no restriction desired)
58
	 * @param $schedConfId int (null if no restriction desired)
59
	 * @param $firstName string
59
	 * @param $firstName string
 Lines 65-84   class AuthorDAO extends PKPAuthorDAO { Link Here 
65
	function &getPublishedPapersForAuthor($schedConfId, $firstName, $middleName, $lastName, $affiliation, $country) {
65
	function &getPublishedPapersForAuthor($schedConfId, $firstName, $middleName, $lastName, $affiliation, $country) {
66
		$publishedPapers = array();
66
		$publishedPapers = array();
67
		$publishedPaperDao =& DAORegistry::getDAO('PublishedPaperDAO');
67
		$publishedPaperDao =& DAORegistry::getDAO('PublishedPaperDAO');
68
		$params = array($firstName, $middleName, $lastName, $affiliation, $country);
68
		$params = array(
69
		if ($schedConfId !== null) $params[] = $schedConfId;
69
			'affiliation',
70
			$firstName, $middleName, $lastName,
71
			$affiliation, $country
72
		);
73
		if ($schedConfId !== null) $params[] = (int) $schedConfId;
70
74
71
		$result =& $this->retrieve(
75
		$result =& $this->retrieve(
72
			'SELECT DISTINCT
76
			'SELECT DISTINCT
73
				aa.submission_id
77
				aa.submission_id
74
			FROM	authors aa
78
			FROM	authors aa
75
				LEFT JOIN papers a ON (aa.submission_id = a.paper_id)
79
				LEFT JOIN papers a ON (aa.submission_id = a.paper_id)
76
			WHERE	aa.first_name = ? AND
80
				LEFT JOIN author_settings asl ON (asl.author_id = aa.author_id AND asl.setting_name = ?)
77
				a.status = ' . STATUS_PUBLISHED . ' AND
81
			WHERE	aa.first_name = ?
78
				(aa.middle_name = ?' . (empty($middleName)?' OR aa.middle_name IS NULL':'') .  ') AND
82
				AND a.status = ' . STATUS_PUBLISHED . '
79
				aa.last_name = ? AND
83
				AND (aa.middle_name = ?' . (empty($middleName)?' OR aa.middle_name IS NULL':'') . ')
80
				(aa.affiliation = ?' . (empty($affiliation)?' OR aa.affiliation IS NULL':'') . ') AND
84
				AND aa.last_name = ?
81
				(aa.country = ?' . (empty($country)?' OR aa.country IS NULL':'') . ')' .
85
				AND (asl.setting_value = ?' . (empty($affiliation)?' OR asl.setting_value IS NULL':'') . ')
86
				AND (aa.country = ?' . (empty($country)?' OR aa.country IS NULL':'') . ') ' .
82
				($schedConfId!==null?(' AND a.sched_conf_id = ?'):''),
87
				($schedConfId!==null?(' AND a.sched_conf_id = ?'):''),
83
			$params
88
			$params
84
		);
89
		);
 Lines 100-116   class AuthorDAO extends PKPAuthorDAO { Link Here 
100
	}
105
	}
101
106
102
	/**
107
	/**
103
	 * Retrieve all published authors for a scheduled conference.
108
	 * Retrieve all published authors for a scheduled conference in an associative array by
104
	 * Note that if schedConfId is null, alphabetized authors for all
109
	 * the first letter of the last name, for example:
105
	 * scheduled conferences are returned.
110
	 * $returnedArray['S'] gives array($misterSmithObject, $misterSmytheObject, ...)
111
	 * Keys will appear in sorted order. Note that if schedConfId is null,
112
	 * alphabetized authors for all scheduled conferences are returned.
106
	 * @param $schedConfId int
113
	 * @param $schedConfId int
107
	 * @param $initial An initial the last names must begin with
114
	 * @param $initial An initial the last names must begin with
108
	 * @param $rangeInfo Range information
115
	 * @param $rangeInfo Range information
109
	 * @param $includeEmail Whether or not to include the email in the select distinct
116
	 * @param $includeEmail Whether or not to include the email in the select distinct
110
	 * @return object ItemIterator Authors ordered by sequence
117
	 * @return array Authors ordered by sequence
111
	 */
118
	 */
112
	function &getAuthorsAlphabetizedBySchedConf($schedConfId = null, $initial = null, $rangeInfo = null, $includeEmail = false) {
119
	function &getAuthorsAlphabetizedBySchedConf($schedConfId = null, $initial = null, $rangeInfo = null, $includeEmail = false) {
113
		$params = array();
120
		$authors = array();
121
		$params = array(
122
			'affiliation', Locale::getPrimaryLocale(),
123
			'affiliation', Locale::getLocale()
124
		);
114
125
115
		if (isset($schedConfId)) $params[] = $schedConfId;
126
		if (isset($schedConfId)) $params[] = $schedConfId;
116
		if (isset($initial)) {
127
		if (isset($initial)) {
 Lines 121-142   class AuthorDAO extends PKPAuthorDAO { Link Here 
121
		}
132
		}
122
133
123
		$result =& $this->retrieveRange(
134
		$result =& $this->retrieveRange(
124
			'SELECT	DISTINCT CAST(\'\' AS CHAR) AS url,
135
			'SELECT DISTINCT
136
				CAST(\'\' AS CHAR) AS url,
125
				0 AS author_id,
137
				0 AS author_id,
126
				0 AS submission_id,
138
				0 AS submission_id,
127
				' . ($includeEmail?'aa.email AS email,':'CAST(\'\' AS CHAR) AS email,') . '
139
				' . ($includeEmail?'aa.email AS email,':'CAST(\'\' AS CHAR) AS email,') . '
128
				CAST(\'\' AS CHAR) AS biography,
129
				0 AS primary_contact,
140
				0 AS primary_contact,
130
				0 AS seq,
141
				0 AS seq,
131
				aa.first_name AS first_name,
142
				aa.first_name,
132
				aa.middle_name AS middle_name,
143
				aa.middle_name,
133
				aa.last_name AS last_name,
144
				aa.last_name,
134
				aa.affiliation AS affiliation,
145
				asl.setting_value AS affiliation_l,
146
				asl.locale,
147
				aspl.setting_value AS affiliation_pl,
148
				aspl.locale AS primary_locale,
135
				aa.country
149
				aa.country
136
			FROM	authors aa,
150
			FROM	authors aa
137
				papers a,
151
				LEFT JOIN author_settings aspl ON (aa.author_id = aspl.author_id AND aspl.setting_name = ? AND aspl.locale = ?)
138
				published_papers pa,
152
				LEFT JOIN author_settings asl ON (aa.author_id = asl.author_id AND asl.setting_name = ? AND asl.locale = ?)
139
				sched_confs e
153
				LEFT JOIN papers a ON (a.paper_id = aa.submission_id)
154
				LEFT JOIN published_papers pa ON (pa.paper_id = a.paper_id)
155
				LEFT JOIN sched_confs e ON (a.sched_conf_id = e.sched_conf_id)
140
			WHERE	e.sched_conf_id = pa.sched_conf_id
156
			WHERE	e.sched_conf_id = pa.sched_conf_id
141
				AND aa.submission_id = a.paper_id
157
				AND aa.submission_id = a.paper_id
142
				' . (isset($schedConfId)?'AND a.sched_conf_id = ? ':'') . '
158
				' . (isset($schedConfId)?'AND a.sched_conf_id = ? ':'') . '
 Lines 144-154   class AuthorDAO extends PKPAuthorDAO { Link Here 
144
				AND a.status = ' . STATUS_PUBLISHED . '
160
				AND a.status = ' . STATUS_PUBLISHED . '
145
				AND (aa.last_name IS NOT NULL
161
				AND (aa.last_name IS NOT NULL
146
				AND aa.last_name <> \'\')' . $initialSql . ' ORDER BY aa.last_name, aa.first_name',
162
				AND aa.last_name <> \'\')' . $initialSql . ' ORDER BY aa.last_name, aa.first_name',
147
			empty($params)?false:$params,
163
			$params,
148
			$rangeInfo
164
			$rangeInfo
149
		);
165
		);
150
166
151
		$returner = new DAOResultFactory($result, $this, '_returnAuthorFromRow');
167
		$returner = new DAOResultFactory($result, $this, '_returnSimpleAuthorFromRow');
152
		return $returner;
168
		return $returner;
153
	}
169
	}
154
170
 Lines 163-181   class AuthorDAO extends PKPAuthorDAO { Link Here 
163
	/**
179
	/**
164
	 * Insert a new Author.
180
	 * Insert a new Author.
165
	 * @param $author Author
181
	 * @param $author Author
166
	 */	
182
	 */
167
	function insertAuthor(&$author) {
183
	function insertAuthor(&$author) {
168
		$this->update(
184
		$this->update(
169
			'INSERT INTO authors
185
			'INSERT INTO authors
170
				(submission_id, first_name, middle_name, last_name, affiliation, country, email, url, primary_contact, seq)
186
				(submission_id, first_name, middle_name, last_name, country, email, url, primary_contact, seq)
171
				VALUES
187
				VALUES
172
				(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)',
188
				(?, ?, ?, ?, ?, ?, ?, ?, ?)',
173
			array(
189
			array(
174
				$author->getSubmissionId(),
190
				$author->getSubmissionId(),
175
				$author->getFirstName(),
191
				$author->getFirstName(),
176
				$author->getMiddleName() . '', // make non-null
192
				$author->getMiddleName() . '', // make non-null
177
				$author->getLastName(),
193
				$author->getLastName(),
178
				$author->getAffiliation() . '', // make non-null
179
				$author->getCountry(),
194
				$author->getCountry(),
180
				$author->getEmail(),
195
				$author->getEmail(),
181
				$author->getUrl(),
196
				$author->getUrl(),
 Lines 200-206   class AuthorDAO extends PKPAuthorDAO { Link Here 
200
			SET	first_name = ?,
215
			SET	first_name = ?,
201
				middle_name = ?,
216
				middle_name = ?,
202
				last_name = ?,
217
				last_name = ?,
203
				affiliation = ?,
204
				country = ?,
218
				country = ?,
205
				email = ?,
219
				email = ?,
206
				url = ?,
220
				url = ?,
 Lines 211-217   class AuthorDAO extends PKPAuthorDAO { Link Here 
211
				$author->getFirstName(),
225
				$author->getFirstName(),
212
				$author->getMiddleName() . '', // make non-null
226
				$author->getMiddleName() . '', // make non-null
213
				$author->getLastName(),
227
				$author->getLastName(),
214
				$author->getAffiliation() . '', // make non-null
215
				$author->getCountry(),
228
				$author->getCountry(),
216
				$author->getEmail(),
229
				$author->getEmail(),
217
				$author->getUrl(),
230
				$author->getUrl(),
(-)a/classes/paper/PublishedPaperDAO.inc.php (-8 / +18 lines)
 Lines 715-729   class PublishedPaperDAO extends DAO { Link Here 
715
	 * @return $authors array Author Objects
715
	 * @return $authors array Author Objects
716
	 */
716
	 */
717
	function getPublishedPaperAuthors($schedConfId) {
717
	function getPublishedPaperAuthors($schedConfId) {
718
		$primaryLocale = Locale::getPrimaryLocale();
719
		$locale = Locale::getLocale();
720
718
		$authors = array();
721
		$authors = array();
719
		$result =& $this->retrieve(
722
		$result =& $this->retrieve(
720
			'SELECT aa.*
723
			'SELECT	aa.*,
721
			FROM	authors aa,
724
				aspl.setting_value AS affiliation_pl,
722
				published_papers pa
725
				asl.setting_value AS affiliation_l
723
			WHERE	aa.submission_id = pa.paper_id AND
726
			FROM	authors aa
724
				pa.sched_conf_id = ?
727
				LEFT JOIN published_papers pa ON (pa.paper_id = aa.submission_id)
725
			ORDER BY pa.sched_conf_id',
728
				LEFT JOIN author_settings aspl ON (aspl.author_id = aa.author_id AND aspl.setting_name = ? AND aspl.locale = ?)
726
			(int) $schedConfId
729
				LEFT JOIN author_settings asl ON (asl.author_id = aa.author_id AND asl.setting_name = ? AND asl.locale = ?)
730
			WHERE	pa.sched_conf_id = ?',
731
			array(
732
				'affiliation', $primaryLocale,
733
				'affiliation', $locale,
734
				(int) $schedConfId
735
			)
727
		);
736
		);
728
737
729
		while (!$result->EOF) {
738
		while (!$result->EOF) {
 Lines 734-740   class PublishedPaperDAO extends DAO { Link Here 
734
			$author->setFirstName($row['first_name']);
743
			$author->setFirstName($row['first_name']);
735
			$author->setMiddleName($row['middle_name']);
744
			$author->setMiddleName($row['middle_name']);
736
			$author->setLastName($row['last_name']);
745
			$author->setLastName($row['last_name']);
737
			$author->setAffiliation($row['affiliation']);
746
			$author->setAffiliation($row['affiliation_pl'], $primaryLocale);
747
			$author->setAffiliation($row['affiliation_l'], $locale);
738
			$author->setEmail($row['email']);
748
			$author->setEmail($row['email']);
739
			$author->setBiography($row['biography']);
749
			$author->setBiography($row['biography']);
740
			$author->setPrimaryContact($row['primary_contact']);
750
			$author->setPrimaryContact($row['primary_contact']);
(-)a/classes/registration/form/UserRegistrationForm.inc.php (-1 / +1 lines)
 Lines 193-199   class UserRegistrationForm extends Form { Link Here 
193
			$user->setMiddleName($this->getData('middleName'));
193
			$user->setMiddleName($this->getData('middleName'));
194
			$user->setInitials($this->getData('initials'));
194
			$user->setInitials($this->getData('initials'));
195
			$user->setLastName($this->getData('lastName'));
195
			$user->setLastName($this->getData('lastName'));
196
			$user->setAffiliation($this->getData('affiliation'));
196
			$user->setAffiliation($this->getData('affiliation'), null); // Localized
197
			$user->setSignature($this->getData('signature'), null); // Localized
197
			$user->setSignature($this->getData('signature'), null); // Localized
198
			$user->setEmail($this->getData('email'));
198
			$user->setEmail($this->getData('email'));
199
			$user->setUrl($this->getData('userUrl'));
199
			$user->setUrl($this->getData('userUrl'));
(-)a/classes/search/PaperSearchIndex.inc.php (-1 / +4 lines)
 Lines 161-167   class PaperSearchIndex { Link Here 
161
			array_push($authorText, $author->getFirstName());
161
			array_push($authorText, $author->getFirstName());
162
			array_push($authorText, $author->getMiddleName());
162
			array_push($authorText, $author->getMiddleName());
163
			array_push($authorText, $author->getLastName());
163
			array_push($authorText, $author->getLastName());
164
			array_push($authorText, $author->getAffiliation());
164
			$affiliations = $author->getAffiliation(null);
165
			if (is_array($affiliations)) foreach ($affiliations as $affiliation) { // Localized
166
				array_push($authorText, $affiliation);
167
			}
165
			$bios = $author->getBiography(null);
168
			$bios = $author->getBiography(null);
166
			if (is_array($bios)) foreach ($bios as $bio) { // Localized
169
			if (is_array($bios)) foreach ($bios as $bio) { // Localized
167
				array_push($authorText, strip_tags($bio));
170
				array_push($authorText, strip_tags($bio));
(-)a/classes/site/ImportOCS1.inc.php (-2 / +2 lines)
 Lines 635-641   class ImportOCS1 { Link Here 
635
				$user->setUsername(Core::cleanVar($row['login']));
635
				$user->setUsername(Core::cleanVar($row['login']));
636
				$user->setFirstName(Core::cleanVar($row['first_name']));
636
				$user->setFirstName(Core::cleanVar($row['first_name']));
637
				$user->setLastName(Core::cleanVar($row['surname']));
637
				$user->setLastName(Core::cleanVar($row['surname']));
638
				$user->setAffiliation(Core::cleanVar($row['affiliation']));
638
				$user->setAffiliation(Core::cleanVar($row['affiliation']), Locale::getLocale());
639
				$user->setEmail(Core::cleanVar($row['email']));
639
				$user->setEmail(Core::cleanVar($row['email']));
640
				$user->setUrl(Core::cleanVar($row['url']));
640
				$user->setUrl(Core::cleanVar($row['url']));
641
				$user->setBiography(Core::cleanVar($row['bio']), Locale::getLocale());
641
				$user->setBiography(Core::cleanVar($row['bio']), Locale::getLocale());
 Lines 739-745   class ImportOCS1 { Link Here 
739
				$author->setEmail($email);
739
				$author->setEmail($email);
740
				$author->setFirstName($firstNames[$key]);
740
				$author->setFirstName($firstNames[$key]);
741
				$author->setLastName($lastNames[$key]);
741
				$author->setLastName($lastNames[$key]);
742
				$author->setAffiliation($affiliations[$key]);
742
				$author->setAffiliation($affiliations[$key], Locale::getLocale());
743
				@$author->setUrl($urls[$key]); // Suppress warnings from inconsistent OCS 1.x data
743
				@$author->setUrl($urls[$key]); // Suppress warnings from inconsistent OCS 1.x data
744
				$author->setPrimaryContact($key == 0 ? 1 : 0);
744
				$author->setPrimaryContact($key == 0 ? 1 : 0);
745
745
(-)a/classes/submission/form/MetadataForm.inc.php (-2 / +2 lines)
 Lines 101-107   class MetadataForm extends Form { Link Here 
101
						'firstName' => $authors[$i]->getFirstName(),
101
						'firstName' => $authors[$i]->getFirstName(),
102
						'middleName' => $authors[$i]->getMiddleName(),
102
						'middleName' => $authors[$i]->getMiddleName(),
103
						'lastName' => $authors[$i]->getLastName(),
103
						'lastName' => $authors[$i]->getLastName(),
104
						'affiliation' => $authors[$i]->getAffiliation(),
104
						'affiliation' => $authors[$i]->getAffiliation(null), // Localized
105
						'country' => $authors[$i]->getCountry(),
105
						'country' => $authors[$i]->getCountry(),
106
						'countryLocalized' => $authors[$i]->getCountryLocalized(),
106
						'countryLocalized' => $authors[$i]->getCountryLocalized(),
107
						'email' => $authors[$i]->getEmail(),
107
						'email' => $authors[$i]->getEmail(),
 Lines 226-232   class MetadataForm extends Form { Link Here 
226
				$author->setFirstName($authors[$i]['firstName']);
226
				$author->setFirstName($authors[$i]['firstName']);
227
				$author->setMiddleName($authors[$i]['middleName']);
227
				$author->setMiddleName($authors[$i]['middleName']);
228
				$author->setLastName($authors[$i]['lastName']);
228
				$author->setLastName($authors[$i]['lastName']);
229
				$author->setAffiliation($authors[$i]['affiliation']);
229
				$author->setAffiliation($authors[$i]['affiliation'], null); // Localized
230
				$author->setCountry($authors[$i]['country']);
230
				$author->setCountry($authors[$i]['country']);
231
				$author->setEmail($authors[$i]['email']);
231
				$author->setEmail($authors[$i]['email']);
232
				$author->setUrl($authors[$i]['url']);
232
				$author->setUrl($authors[$i]['url']);
(-)a/classes/trackDirector/form/CreateReviewerForm.inc.php (-1 / +1 lines)
 Lines 131-137   class CreateReviewerForm extends Form { Link Here 
131
		$user->setLastName($this->getData('lastName'));
131
		$user->setLastName($this->getData('lastName'));
132
		$user->setGender($this->getData('gender'));
132
		$user->setGender($this->getData('gender'));
133
		$user->setInitials($this->getData('initials'));
133
		$user->setInitials($this->getData('initials'));
134
		$user->setAffiliation($this->getData('affiliation'));
134
		$user->setAffiliation($this->getData('affiliation'), null); // Localized
135
		$user->setEmail($this->getData('email'));
135
		$user->setEmail($this->getData('email'));
136
		$user->setUrl($this->getData('userUrl'));
136
		$user->setUrl($this->getData('userUrl'));
137
		$user->setPhone($this->getData('phone'));
137
		$user->setPhone($this->getData('phone'));
(-)a/classes/user/form/CreateAccountForm.inc.php (-1 / +1 lines)
 Lines 238-244   class CreateAccountForm extends Form { Link Here 
238
			$user->setInitials($this->getData('initials'));
238
			$user->setInitials($this->getData('initials'));
239
			$user->setLastName($this->getData('lastName'));
239
			$user->setLastName($this->getData('lastName'));
240
			$user->setGender($this->getData('gender'));
240
			$user->setGender($this->getData('gender'));
241
			$user->setAffiliation($this->getData('affiliation'));
241
			$user->setAffiliation($this->getData('affiliation'), null); // Localized
242
			$user->setSignature($this->getData('signature'), null); // Localized
242
			$user->setSignature($this->getData('signature'), null); // Localized
243
			$user->setEmail($this->getData('email'));
243
			$user->setEmail($this->getData('email'));
244
			$user->setUrl($this->getData('userUrl'));
244
			$user->setUrl($this->getData('userUrl'));
(-)a/classes/user/form/ProfileForm.inc.php (-2 / +2 lines)
 Lines 174-180   class ProfileForm extends Form { Link Here 
174
			'initials' => $user->getInitials(),
174
			'initials' => $user->getInitials(),
175
			'lastName' => $user->getLastName(),
175
			'lastName' => $user->getLastName(),
176
			'gender' => $user->getGender(),
176
			'gender' => $user->getGender(),
177
			'affiliation' => $user->getAffiliation(),
177
			'affiliation' => $user->getAffiliation(null), // Localized
178
			'signature' => $user->getSignature(null), // Localized
178
			'signature' => $user->getSignature(null), // Localized
179
			'email' => $user->getEmail(),
179
			'email' => $user->getEmail(),
180
			'userUrl' => $user->getUrl(),
180
			'userUrl' => $user->getUrl(),
 Lines 240-246   class ProfileForm extends Form { Link Here 
240
		$user->setLastName($this->getData('lastName'));
240
		$user->setLastName($this->getData('lastName'));
241
		$user->setGender($this->getData('gender'));
241
		$user->setGender($this->getData('gender'));
242
		$user->setInitials($this->getData('initials'));
242
		$user->setInitials($this->getData('initials'));
243
		$user->setAffiliation($this->getData('affiliation'));
243
		$user->setAffiliation($this->getData('affiliation'), null); // Localized
244
		$user->setSignature($this->getData('signature'), null); // Localized
244
		$user->setSignature($this->getData('signature'), null); // Localized
245
		$user->setEmail($this->getData('email'));
245
		$user->setEmail($this->getData('email'));
246
		$user->setUrl($this->getData('userUrl'));
246
		$user->setUrl($this->getData('userUrl'));
(-)a/dbscripts/xml/upgrade/2.3.2_preupdate.xml (+7 lines)
 Lines 42-45    Link Here 
42
		<rename table="paper_authors" to="authors" />
42
		<rename table="paper_authors" to="authors" />
43
		<rename table="authors" column="paper_id" to="submission_id" />
43
		<rename table="authors" column="paper_id" to="submission_id" />
44
	</sql>
44
	</sql>
45
	<!-- Bug #5550: make affiliations localized -->
46
	<sql>
47
		<query>
48
			INSERT INTO author_settings (author_id, setting_name, setting_type, setting_value, locale) SELECT aa.author_id, 'affiliation', 'string', aa.affiliation, c.primary_locale FROM authors aa, papers a, sched_confs sc, conferences c WHERE aa.submission_id = a.paper_id AND a.sched_conf_id = sc.sched_conf_id AND sc.conference_id = c.conference_id
49
		</query>
50
	</sql>
51
45
</data>
52
</data>
(-)a/lib/pkp (-1 / +1 lines)
Line 1    Link Here 
1
Subproject commit 1ea73bda2882b6fa3e5fb6a66f5eb40e3593c59b
1
Subproject commit dba6cc5cebc209f6f80bb93399445d1dd0d96cb3
(-)a/plugins/auth/ldap/LDAPAuthPlugin.inc.php (-3 / +3 lines)
 Lines 319-325   class LDAPAuthPlugin extends AuthPlugin { Link Here 
319
		if (isset($lastName))
319
		if (isset($lastName))
320
			$user->setLastName($lastName);
320
			$user->setLastName($lastName);
321
		if (isset($affiliation))
321
		if (isset($affiliation))
322
			$user->setAffiliation($affiliation);
322
			$user->setAffiliation($affiliation, Locale::getLocale());
323
		if (isset($email))
323
		if (isset($email))
324
			$user->setEmail($email);
324
			$user->setEmail($email);
325
		if (isset($phone))
325
		if (isset($phone))
 Lines 348-355   class LDAPAuthPlugin extends AuthPlugin { Link Here 
348
			$attr['givenName'] = $user->getFirstName();
348
			$attr['givenName'] = $user->getFirstName();
349
		if ($user->getLastName())
349
		if ($user->getLastName())
350
			$attr['sn'] = $user->getLastName();
350
			$attr['sn'] = $user->getLastName();
351
		if ($user->getAffiliation())
351
		if ($a = $user->getLocalizedAffiliation())
352
			$attr['organizationName'] = $user->getAffiliation();
352
			$attr['organizationName'] = $a;
353
		if ($user->getEmail())
353
		if ($user->getEmail())
354
			$attr['mail'] = $user->getEmail();
354
			$attr['mail'] = $user->getEmail();
355
		if ($user->getPhone())
355
		if ($user->getPhone())
(-)a/plugins/importexport/native/NativeExportDom.inc.php (-1 / +7 lines)
 Lines 189-195   class NativeExportDom { Link Here 
189
		XMLCustomWriter::createChildWithText($doc, $root, 'middlename', $author->getMiddleName(), false);
189
		XMLCustomWriter::createChildWithText($doc, $root, 'middlename', $author->getMiddleName(), false);
190
		XMLCustomWriter::createChildWithText($doc, $root, 'lastname', $author->getLastName());
190
		XMLCustomWriter::createChildWithText($doc, $root, 'lastname', $author->getLastName());
191
191
192
		XMLCustomWriter::createChildWithText($doc, $root, 'affiliation', $author->getAffiliation(), false);
192
		$affiliations = $author->getAffiliation(null);
193
		if (is_array($affiliations)) foreach ($affiliations as $locale => $affiliation) {
194
			$n =& XMLCustomWriter::createChildWithText($doc, $root, 'affiliation', $author->getAffiliation(), false);
195
			XMLCustomWriter::setAttribute($n, 'locale', $locale);
196
			unset($n);
197
		}
198
193
		XMLCustomWriter::createChildWithText($doc, $root, 'country', $author->getCountry(), false);
199
		XMLCustomWriter::createChildWithText($doc, $root, 'country', $author->getCountry(), false);
194
		XMLCustomWriter::createChildWithText($doc, $root, 'email', $author->getEmail(), false);
200
		XMLCustomWriter::createChildWithText($doc, $root, 'email', $author->getEmail(), false);
195
		XMLCustomWriter::createChildWithText($doc, $root, 'url', $author->getUrl(), false);
201
		XMLCustomWriter::createChildWithText($doc, $root, 'url', $author->getUrl(), false);
(-)a/plugins/importexport/native/NativeImportDom.inc.php (-1 / +10 lines)
 Lines 472-481   class NativeImportDom { Link Here 
472
		if (($node = $authorNode->getChildByName('firstname'))) $author->setFirstName($node->getValue());
472
		if (($node = $authorNode->getChildByName('firstname'))) $author->setFirstName($node->getValue());
473
		if (($node = $authorNode->getChildByName('middlename'))) $author->setMiddleName($node->getValue());
473
		if (($node = $authorNode->getChildByName('middlename'))) $author->setMiddleName($node->getValue());
474
		if (($node = $authorNode->getChildByName('lastname'))) $author->setLastName($node->getValue());
474
		if (($node = $authorNode->getChildByName('lastname'))) $author->setLastName($node->getValue());
475
		if (($node = $authorNode->getChildByName('affiliation'))) $author->setAffiliation($node->getValue());
476
		if (($node = $authorNode->getChildByName('country'))) $author->setCountry($node->getValue());
475
		if (($node = $authorNode->getChildByName('country'))) $author->setCountry($node->getValue());
477
		if (($node = $authorNode->getChildByName('email'))) $author->setEmail($node->getValue());
476
		if (($node = $authorNode->getChildByName('email'))) $author->setEmail($node->getValue());
478
		if (($node = $authorNode->getChildByName('url'))) $author->setUrl($node->getValue());
477
		if (($node = $authorNode->getChildByName('url'))) $author->setUrl($node->getValue());
478
		for ($index=0; ($node = $authorNode->getChildByName('affiliation', $index)); $index++) {
479
			$locale = $node->getAttribute('locale');
480
			if ($locale == '') {
481
				$locale = $conferencePrimaryLocale;
482
			} elseif (!in_array($locale, $conferenceSupportedLocales)) {
483
				$errors[] = array('plugins.importexport.native.import.error.paperAuthorAffiliationLocaleUnsupported', array('authorFullName' => $author->getFullName(), 'paperTitle' => $paper->getLocalizedTitle(), 'locale' => $locale));
484
				return false;
485
			} 
486
			$author->setAffiliation($node->getValue(), $locale);
487
		}
479
		for ($index=0; ($node = $authorNode->getChildByName('biography', $index)); $index++) {
488
		for ($index=0; ($node = $authorNode->getChildByName('biography', $index)); $index++) {
480
			$locale = $node->getAttribute('locale');
489
			$locale = $node->getAttribute('locale');
481
			if ($locale == '') {
490
			if ($locale == '') {
(-)a/plugins/importexport/native/locale/en_US/locale.xml (+1 lines)
 Lines 95-100   The following formats are accepted: Link Here 
95
95
96
	<message key="plugins.importexport.native.import.error.paperAuthorCompetingInterestsLocaleUnsupported">An author competing interest was provided for the author "{$authorFullName}" of the paper "{$paperTitle}" in a locale ("{$locale}") that this conference does not support.</message>
96
	<message key="plugins.importexport.native.import.error.paperAuthorCompetingInterestsLocaleUnsupported">An author competing interest was provided for the author "{$authorFullName}" of the paper "{$paperTitle}" in a locale ("{$locale}") that this conference does not support.</message>
97
	<message key="plugins.importexport.native.import.error.paperAuthorBiographyLocaleUnsupported">An author biography was provided for the author "{$authorFullName}" of the paper "{$paperTitle}" in a locale ("{$locale}") that this conference does not support.</message>
97
	<message key="plugins.importexport.native.import.error.paperAuthorBiographyLocaleUnsupported">An author biography was provided for the author "{$authorFullName}" of the paper "{$paperTitle}" in a locale ("{$locale}") that this conference does not support.</message>
98
	<message key="plugins.importexport.native.import.error.paperAuthorAffiliationLocaleUnsupported">An author affiliation was provided for the author "{$authorFullName}" of the paper "{$paperTitle}" in a locale ("{$locale}") that this conference does not support.</message>
98
99
99
	<message key="plugins.importexport.native.import.error.galleyLocaleUnsupported">A galley of the paper "{$paperTitle}" was provided in a locale ("{$locale}") that this conference does not support.</message>
100
	<message key="plugins.importexport.native.import.error.galleyLocaleUnsupported">A galley of the paper "{$paperTitle}" was provided in a locale ("{$locale}") that this conference does not support.</message>
100
101
(-)a/plugins/importexport/native/native.dtd (-1 / +5 lines)
 Lines 91-97    Link Here 
91
		public_id CDATA #IMPLIED
91
		public_id CDATA #IMPLIED
92
		language CDATA "en">
92
		language CDATA "en">
93
93
94
<!ELEMENT author (firstname, middlename?, lastname, affiliation?, country?, email, url?, biography*)>
94
<!ELEMENT author (firstname, middlename?, lastname, affiliation*, country?, email, url?, biography*)>
95
	<!-- One author should be designated as the primary contact for this
95
	<!-- One author should be designated as the primary contact for this
96
	     paper. If no author is designated, the first author with an
96
	     paper. If no author is designated, the first author with an
97
	     email address will be used; if multiple authors are designated, the
97
	     email address will be used; if multiple authors are designated, the
 Lines 103-109    Link Here 
103
<!ELEMENT firstname (#PCDATA)>
103
<!ELEMENT firstname (#PCDATA)>
104
<!ELEMENT middlename (#PCDATA)>
104
<!ELEMENT middlename (#PCDATA)>
105
<!ELEMENT lastname (#PCDATA)>
105
<!ELEMENT lastname (#PCDATA)>
106
106
<!ELEMENT affiliation (#PCDATA)>
107
<!ELEMENT affiliation (#PCDATA)>
108
	<!ATTLIST affiliation
109
		locale CDATA #IMPLIED>
110
107
<!ELEMENT country (#PCDATA)>
111
<!ELEMENT country (#PCDATA)>
108
<!ELEMENT email (#PCDATA)>
112
<!ELEMENT email (#PCDATA)>
109
<!ELEMENT url (#PCDATA)>
113
<!ELEMENT url (#PCDATA)>
(-)a/plugins/importexport/users/UserExportDom.inc.php (-1 / +9 lines)
 Lines 38-50   class UserExportDom { Link Here 
38
			XMLCustomWriter::createChildWithText($doc, $userNode, 'last_name', $user->getLastName());
38
			XMLCustomWriter::createChildWithText($doc, $userNode, 'last_name', $user->getLastName());
39
			XMLCustomWriter::createChildWithText($doc, $userNode, 'initials', $user->getInitials(), false);
39
			XMLCustomWriter::createChildWithText($doc, $userNode, 'initials', $user->getInitials(), false);
40
			XMLCustomWriter::createChildWithText($doc, $userNode, 'gender', $user->getGender(), false);
40
			XMLCustomWriter::createChildWithText($doc, $userNode, 'gender', $user->getGender(), false);
41
			XMLCustomWriter::createChildWithText($doc, $userNode, 'affiliation', $user->getAffiliation(), false);
42
			XMLCustomWriter::createChildWithText($doc, $userNode, 'email', $user->getEmail());
41
			XMLCustomWriter::createChildWithText($doc, $userNode, 'email', $user->getEmail());
43
			XMLCustomWriter::createChildWithText($doc, $userNode, 'url', $user->getUrl(), false);
42
			XMLCustomWriter::createChildWithText($doc, $userNode, 'url', $user->getUrl(), false);
44
			XMLCustomWriter::createChildWithText($doc, $userNode, 'phone', $user->getPhone(), false);
43
			XMLCustomWriter::createChildWithText($doc, $userNode, 'phone', $user->getPhone(), false);
45
			XMLCustomWriter::createChildWithText($doc, $userNode, 'fax', $user->getFax(), false);
44
			XMLCustomWriter::createChildWithText($doc, $userNode, 'fax', $user->getFax(), false);
46
			XMLCustomWriter::createChildWithText($doc, $userNode, 'mailing_address', $user->getMailingAddress(), false);
45
			XMLCustomWriter::createChildWithText($doc, $userNode, 'mailing_address', $user->getMailingAddress(), false);
47
			XMLCustomWriter::createChildWithText($doc, $userNode, 'country', $user->getCountry(), false);
46
			XMLCustomWriter::createChildWithText($doc, $userNode, 'country', $user->getCountry(), false);
47
			if (is_array($user->getAffiliation(null))) {
48
				foreach($user->getAffiliation(null) as $locale => $value) {
49
					$affiliationNode =& XMLCustomWriter::createChildWithText($doc, $userNode, 'affiliation', $value, false);
50
					if ($affiliationNode) {
51
						XMLCustomWriter::setAttribute($affiliationNode, 'locale', $locale);
52
					}
53
					unset($affiliationNode);
54
				}
55
			}
48
			if (is_array($user->getSignature(null))) {
56
			if (is_array($user->getSignature(null))) {
49
				foreach($user->getSignature(null) as $locale => $value) {
57
				foreach($user->getSignature(null) as $locale => $value) {
50
					$signatureNode =& XMLCustomWriter::createChildWithText($doc, $userNode, 'signature', $value, false);
58
					$signatureNode =& XMLCustomWriter::createChildWithText($doc, $userNode, 'signature', $value, false);
(-)a/plugins/importexport/users/UserImportExportPlugin.inc.php (-1 / +1 lines)
 Lines 132-138   class UserImportExportPlugin extends ImportExportPlugin { Link Here 
132
					$newUser->setFax(Request::getUserVar($i.'_fax'));
132
					$newUser->setFax(Request::getUserVar($i.'_fax'));
133
					$newUser->setPhone(Request::getUserVar($i.'_phone'));
133
					$newUser->setPhone(Request::getUserVar($i.'_phone'));
134
					$newUser->setUrl(Request::getUserVar($i.'_url'));
134
					$newUser->setUrl(Request::getUserVar($i.'_url'));
135
					$newUser->setAffiliation(Request::getUserVar($i.'_affiliation'));
135
					$newUser->setAffiliation(Request::getUserVar($i.'_affiliation'), null);
136
					$newUser->setGender(Request::getUserVar($i.'_gender'));
136
					$newUser->setGender(Request::getUserVar($i.'_gender'));
137
					$newUser->setInitials(Request::getUserVar($i.'_initials'));
137
					$newUser->setInitials(Request::getUserVar($i.'_initials'));
138
					$newUser->setSalutation(Request::getUserVar($i.'_salutation'));
138
					$newUser->setSalutation(Request::getUserVar($i.'_salutation'));
(-)a/plugins/importexport/users/UserXMLParser.inc.php (-1 / +3 lines)
 Lines 110-116   class UserXMLParser { Link Here 
110
								$newUser->setGender($attrib->getValue());
110
								$newUser->setGender($attrib->getValue());
111
								break;
111
								break;
112
							case 'affiliation':
112
							case 'affiliation':
113
								$newUser->setAffiliation($attrib->getValue());
113
								$locale = $attrib->getAttribute('locale');
114
								if (empty($locale)) $locale = $schedConfPrimaryLocale;
115
								$newUser->setAffiliation($attrib->getValue(), $locale);
114
								break;
116
								break;
115
							case 'email':
117
							case 'email':
116
								$newUser->setEmail($attrib->getValue());
118
								$newUser->setEmail($attrib->getValue());
(-)a/plugins/importexport/users/importUsersConfirm.tpl (-1 / +3 lines)
 Lines 66-77    Link Here 
66
			{foreach name=locales from=$user->getLocales() item=locale}
66
			{foreach name=locales from=$user->getLocales() item=locale}
67
				<input type="hidden" name="{$userKey|escape}_locales[]" value="{$locale|escape}" />
67
				<input type="hidden" name="{$userKey|escape}_locales[]" value="{$locale|escape}" />
68
			{/foreach}			
68
			{/foreach}			
69
			{foreach from=$user->getAffiliation(null) key=locale item=value}
70
				<input type="hidden" name="{$userKey|escape}_affiliation[{$locale|escape}]" value="{$value|escape}" />
71
			{/foreach}
69
			<input type="hidden" name="{$userKey|escape}_country" value="{$user->getCountry()|escape}" />
72
			<input type="hidden" name="{$userKey|escape}_country" value="{$user->getCountry()|escape}" />
70
			<input type="hidden" name="{$userKey|escape}_mailingAddress" value="{$user->getMailingAddress()|escape}" />
73
			<input type="hidden" name="{$userKey|escape}_mailingAddress" value="{$user->getMailingAddress()|escape}" />
71
			<input type="hidden" name="{$userKey|escape}_fax" value="{$user->getFax()|escape}" />
74
			<input type="hidden" name="{$userKey|escape}_fax" value="{$user->getFax()|escape}" />
72
			<input type="hidden" name="{$userKey|escape}_phone" value="{$user->getPhone()|escape}" />
75
			<input type="hidden" name="{$userKey|escape}_phone" value="{$user->getPhone()|escape}" />
73
			<input type="hidden" name="{$userKey|escape}_url" value="{$user->getUrl()|escape}" />
76
			<input type="hidden" name="{$userKey|escape}_url" value="{$user->getUrl()|escape}" />
74
			<input type="hidden" name="{$userKey|escape}_affiliation" value="{$user->getAffiliation()|escape}" />
75
			<input type="hidden" name="{$userKey|escape}_gender" value="{$user->getGender()|escape}" />
77
			<input type="hidden" name="{$userKey|escape}_gender" value="{$user->getGender()|escape}" />
76
			<input type="hidden" name="{$userKey|escape}_initials" value="{$user->getInitials()|escape}" />
78
			<input type="hidden" name="{$userKey|escape}_initials" value="{$user->getInitials()|escape}" />
77
			<input type="hidden" name="{$userKey|escape}_salutation" value="{$user->getSalutation()|escape}" />
79
			<input type="hidden" name="{$userKey|escape}_salutation" value="{$user->getSalutation()|escape}" />
(-)a/plugins/oaiMetadataFormats/dc/OAIMetadataFormat_DC.inc.php (-1 / +1 lines)
 Lines 41-47   class OAIMetadataFormat_DC extends OAIMetadataFormat { Link Here 
41
		$creator = array();
41
		$creator = array();
42
		foreach ($paper->getAuthors() as $author) {
42
		foreach ($paper->getAuthors() as $author) {
43
			$authorName = $author->getFullName(true);
43
			$authorName = $author->getFullName(true);
44
			$affiliation = $author->getAffiliation();
44
			$affiliation = $author->getLocalizedAffiliation();
45
			if (!empty($affiliation)) {
45
			if (!empty($affiliation)) {
46
				$authorName .= '; ' . $affiliation;
46
				$authorName .= '; ' . $affiliation;
47
			}
47
			}
(-)a/plugins/oaiMetadataFormats/marc/OAIMetadataFormat_MARC.inc.php (-1 / +1 lines)
 Lines 38-44   class OAIMetadataFormat_MARC extends OAIMetadataFormat { Link Here 
38
		$creators = array();
38
		$creators = array();
39
		foreach ($paper->getAuthors() as $author) {
39
		foreach ($paper->getAuthors() as $author) {
40
			$authorName = $author->getFullName(true);
40
			$authorName = $author->getFullName(true);
41
			$affiliation = $author->getAffiliation();
41
			$affiliation = $author->getLocalizedAffiliation();
42
			if (!empty($affiliation)) {
42
			if (!empty($affiliation)) {
43
				$authorName .= '; ' . $affiliation;
43
				$authorName .= '; ' . $affiliation;
44
			}
44
			}
(-)a/plugins/oaiMetadataFormats/marcxml/OAIMetadataFormat_MARC21.inc.php (-1 / +1 lines)
 Lines 37-43   class OAIMetadataFormat_MARC21 extends OAIMetadataFormat { Link Here 
37
		$creators = array();
37
		$creators = array();
38
		foreach ($paper->getAuthors() as $author) {
38
		foreach ($paper->getAuthors() as $author) {
39
			$authorName = $author->getFullName(true);
39
			$authorName = $author->getFullName(true);
40
			$affiliation = $author->getAffiliation();
40
			$affiliation = $author->getLocalizedAffiliation();
41
			if (!empty($affiliation)) {
41
			if (!empty($affiliation)) {
42
				$authorName .= '; ' . $affiliation;
42
				$authorName .= '; ' . $affiliation;
43
			}
43
			}
(-)a/plugins/oaiMetadataFormats/rfc1807/OAIMetadataFormat_RFC1807.inc.php (-1 / +1 lines)
 Lines 38-44   class OAIMetadataFormat_RFC1807 extends OAIMetadataFormat { Link Here 
38
		$creators = array();
38
		$creators = array();
39
		foreach ($paper->getAuthors() as $author) {
39
		foreach ($paper->getAuthors() as $author) {
40
			$authorName = $author->getFullName(true);
40
			$authorName = $author->getFullName(true);
41
			$affiliation = $author->getAffiliation();
41
			$affiliation = $author->getLocalizedAffiliation();
42
			if (!empty($affiliation)) {
42
			if (!empty($affiliation)) {
43
				$authorName .= '; ' . $affiliation;
43
				$authorName .= '; ' . $affiliation;
44
			}
44
			}
(-)a/plugins/reports/papers/PaperReportDAO.inc.php (-2 / +8 lines)
 Lines 108-121   class PaperReportDAO extends DAO { Link Here 
108
					pa.middle_name AS mname,
108
					pa.middle_name AS mname,
109
					pa.last_name AS lname,
109
					pa.last_name AS lname,
110
					pa.email AS email,
110
					pa.email AS email,
111
					pa.affiliation AS affiliation,
112
					pa.country AS country,
111
					pa.country AS country,
113
					pa.url AS url,
112
					pa.url AS url,
114
					COALESCE(pasl.setting_value, pas.setting_value) AS biography
113
					COALESCE(pasl.setting_value, pas.setting_value) AS biography,
114
					COALESCE(paasl.setting_value, paas.setting_value) AS affiliation
115
				FROM	authors pa
115
				FROM	authors pa
116
					LEFT JOIN papers p ON (pa.submission_id = p.paper_id)
116
					LEFT JOIN papers p ON (pa.submission_id = p.paper_id)
117
					LEFT JOIN author_settings pas ON (pa.author_id = pas.author_id AND pas.setting_name = ? AND pas.locale = ?)
117
					LEFT JOIN author_settings pas ON (pa.author_id = pas.author_id AND pas.setting_name = ? AND pas.locale = ?)
118
					LEFT JOIN author_settings pasl ON (pa.author_id = pasl.author_id AND pasl.setting_name = ? AND pasl.locale = ?)
118
					LEFT JOIN author_settings pasl ON (pa.author_id = pasl.author_id AND pasl.setting_name = ? AND pasl.locale = ?)
119
					LEFT JOIN author_settings paas ON (pa.author_id = paas.author_id AND paas.setting_name = ? AND paas.locale = ?)
120
					LEFT JOIN author_settings paasl ON (pa.author_id = paasl.author_id AND paasl.setting_name = ? AND paasl.locale = ?)
119
				WHERE	p.sched_conf_id = ? AND
121
				WHERE	p.sched_conf_id = ? AND
120
					p.paper_id = ?',
122
					p.paper_id = ?',
121
				array(
123
				array(
 Lines 123-128   class PaperReportDAO extends DAO { Link Here 
123
					$primaryLocale,
125
					$primaryLocale,
124
					'biography',
126
					'biography',
125
					$locale,
127
					$locale,
128
					'affiliation',
129
					$primaryLocale,
130
					'affiliation',
131
					$locale,
126
					$schedConfId,
132
					$schedConfId,
127
					$paper->getId()
133
					$paper->getId()
128
				)
134
				)
(-)a/templates/about/organizingTeam.tpl (-2 / +2 lines)
 Lines 22-28    Link Here 
22
22
23
	<ol class="organizingTeam">
23
	<ol class="organizingTeam">
24
		{foreach from=$directors item=director}
24
		{foreach from=$directors item=director}
25
			<li><a href="javascript:openRTWindow('{url op="organizingTeamBio" path=$director->getId()}')">{$director->getFullName()|escape}</a>{if $director->getAffiliation()}, {$director->getAffiliation()|escape}{/if}{if $director->getCountry()}{assign var=countryCode value=$director->getCountry()}{assign var=country value=$countries.$countryCode}, {$country|escape}{/if}</li>
25
			<li><a href="javascript:openRTWindow('{url op="organizingTeamBio" path=$director->getId()}')">{$director->getFullName()|escape}</a>{if $director->getLocalizedAffiliation()}, {$director->getLocalizedAffiliation()|escape}{/if}{if $director->getCountry()}{assign var=countryCode value=$director->getCountry()}{assign var=country value=$countries.$countryCode}, {$country|escape}{/if}</li>
26
		{/foreach}
26
		{/foreach}
27
	</ol>
27
	</ol>
28
{/if}
28
{/if}
 Lines 36-42    Link Here 
36
36
37
	<ol class="organizingTeam">
37
	<ol class="organizingTeam">
38
		{foreach from=$trackDirectors item=trackDirector}
38
		{foreach from=$trackDirectors item=trackDirector}
39
			<li><a href="javascript:openRTWindow('{url op="organizingTeamBio" path=$trackDirector->getId()}')">{$trackDirector->getFullName()|escape}</a>{if $trackDirector->getAffiliation()}, {$trackDirector->getAffiliation()|escape}{/if}{if $trackDirector->getCountry()}{assign var=countryCode value=$trackDirector->getCountry()}{assign var=country value=$countries.$countryCode}, {$country|escape}{/if}</li>
39
			<li><a href="javascript:openRTWindow('{url op="organizingTeamBio" path=$trackDirector->getId()}')">{$trackDirector->getFullName()|escape}</a>{if $trackDirector->getLocalizedAffiliation()}, {$trackDirector->getLocalizedAffiliation()|escape}{/if}{if $trackDirector->getCountry()}{assign var=countryCode value=$trackDirector->getCountry()}{assign var=country value=$countries.$countryCode}, {$country|escape}{/if}</li>
40
		{/foreach}
40
		{/foreach}
41
	</ol>
41
	</ol>
42
{/if}
42
{/if}
(-)a/templates/about/organizingTeamBio.tpl (-1 / +1 lines)
 Lines 76-82    Link Here 
76
<p>
76
<p>
77
	<em>{$user->getFullName()|escape}</em> {icon name="mail" url=$address}<br />
77
	<em>{$user->getFullName()|escape}</em> {icon name="mail" url=$address}<br />
78
	{if $user->getUrl()}<a href="{$user->getUrl()|escape:"quotes"}" target="_new">{$user->getUrl()|escape}</a><br/>{/if}
78
	{if $user->getUrl()}<a href="{$user->getUrl()|escape:"quotes"}" target="_new">{$user->getUrl()|escape}</a><br/>{/if}
79
	{if $user->getAffiliation()}{$user->getAffiliation()|escape}{assign var=needsComma value=1}{/if}{if $country}{if $needsComma}, {/if}{$country|escape}{/if}
79
	{if $user->getLocalizedAffiliation()}{$user->getLocalizedAffiliation()|escape}{assign var=needsComma value=1}{/if}{if $country}{if $needsComma}, {/if}{$country|escape}{/if}
80
</p>
80
</p>
81
81
82
<p>{$user->getLocalizedBiography()|nl2br|strip_unsafe_html}</p>
82
<p>{$user->getLocalizedBiography()|nl2br|strip_unsafe_html}</p>
(-)a/templates/about/organizingTeamBoard.tpl (-1 / +1 lines)
 Lines 21-27    Link Here 
21
	<ol class="organizingTeam">
21
	<ol class="organizingTeam">
22
		{foreach from=$members item=member}
22
		{foreach from=$members item=member}
23
			{assign var=user value=$member->getUser()}
23
			{assign var=user value=$member->getUser()}
24
			<li><a href="javascript:openRTWindow('{url op="organizingTeamBio" path=$user->getId()}')">{$user->getFullName()|escape}</a>{if $user->getAffiliation()}, {$user->getAffiliation()|escape}{/if}{if $user->getCountry()}{assign var=countryCode value=$user->getCountry()}{assign var=country value=$countries.$countryCode}, {$country|escape}{/if}</li>
24
			<li><a href="javascript:openRTWindow('{url op="organizingTeamBio" path=$user->getId()}')">{$user->getFullName()|escape}</a>{if $user->getLocalizedAffiliation()}, {$user->getLocalizedAffiliation()|escape}{/if}{if $user->getCountry()}{assign var=countryCode value=$user->getCountry()}{assign var=country value=$countries.$countryCode}, {$country|escape}{/if}</li>
25
		{/foreach}{* $members *}
25
		{/foreach}{* $members *}
26
	</ol>
26
	</ol>
27
{/foreach}{* $groups *}
27
{/foreach}{* $groups *}
(-)a/templates/author/submit/step3.tpl (-2 / +5 lines)
 Lines 48-53   function moveAuthor(dir, authorIndex) { Link Here 
48
				{foreach from=$author.biography key="thisLocale" item="thisBiography"}
48
				{foreach from=$author.biography key="thisLocale" item="thisBiography"}
49
					{if $thisLocale != $formLocale}<input type="hidden" name="authors[{$authorIndex|escape}][biography][{$thisLocale|escape}]" value="{$thisBiography|escape}" />{/if}
49
					{if $thisLocale != $formLocale}<input type="hidden" name="authors[{$authorIndex|escape}][biography][{$thisLocale|escape}]" value="{$thisBiography|escape}" />{/if}
50
				{/foreach}
50
				{/foreach}
51
				{foreach from=$author.affiliation key="thisLocale" item="thisAffiliation"}
52
					{if $thisLocale != $formLocale}<input type="hidden" name="authors[{$authorIndex|escape}][affiliation][{$thisLocale|escape}]" value="{$thisAffiliation|escape}" />{/if}
53
				{/foreach}
51
			{/foreach}
54
			{/foreach}
52
			{form_language_chooser form="submit" url=$submitFormUrl}
55
			{form_language_chooser form="submit" url=$submitFormUrl}
53
			<span class="instruct">{translate key="form.formLanguage.description"}</span>
56
			<span class="instruct">{translate key="form.formLanguage.description"}</span>
 Lines 96-102   function moveAuthor(dir, authorIndex) { Link Here 
96
<tr valign="top">
99
<tr valign="top">
97
	<td width="20%" class="label">{fieldLabel name="authors-$authorIndex-affiliation" key="user.affiliation"}</td>
100
	<td width="20%" class="label">{fieldLabel name="authors-$authorIndex-affiliation" key="user.affiliation"}</td>
98
	<td width="80%" class="value">
101
	<td width="80%" class="value">
99
		<textarea name="authors[{$authorIndex|escape}][affiliation]" class="textArea" id="authors-{$authorIndex|escape}-affiliation" rows="5" cols="40">{$author.affiliation|escape}</textarea><br/>
102
		<textarea name="authors[{$authorIndex|escape}][affiliation][{$formLocale|escape}]" class="textArea" id="authors-{$authorIndex|escape}-affiliation" rows="5" cols="40">{$author.affiliation[$formLocale]|escape}</textarea><br/>
100
		<span class="instruct">{translate key="user.affiliation.description"}</span>
103
		<span class="instruct">{translate key="user.affiliation.description"}</span>
101
	</td>
104
	</td>
102
</tr>
105
</tr>
 Lines 148-154   function moveAuthor(dir, authorIndex) { Link Here 
148
<tr valign="top">
151
<tr valign="top">
149
	<td width="20%" class="label">{fieldLabel name="authors-0-affiliation" key="user.affiliation"}</td>
152
	<td width="20%" class="label">{fieldLabel name="authors-0-affiliation" key="user.affiliation"}</td>
150
	<td width="80%" class="value">
153
	<td width="80%" class="value">
151
		<textarea class="textArea" name="authors[0][affiliation]" id="authors-0-affiliation" rows="5" cols="40"></textarea><br/>
154
		<textarea name="authors[0][affiliation][{$formLocale|escape}]" class="textArea" id="authors-0-affiliation" rows="5" cols="40"></textarea><br/>
152
		<span class="instruct">{translate key="user.affiliation.description"}</span>
155
		<span class="instruct">{translate key="user.affiliation.description"}</span>
153
	</td>
156
	</td>
154
</tr>
157
</tr>
(-)a/templates/manager/people/userProfile.tpl (-1 / +1 lines)
 Lines 42-48    Link Here 
42
	</tr>
42
	</tr>
43
	<tr valign="top">
43
	<tr valign="top">
44
		<td class="label">{translate key="user.affiliation"}</td>
44
		<td class="label">{translate key="user.affiliation"}</td>
45
		<td class="value">{$user->getAffiliation()|escape|nl2br|default:"&mdash;"}</td>
45
		<td class="value">{$user->getLocalizedAffiliation()|escape|nl2br|default:"&mdash;"}</td>
46
	</tr>
46
	</tr>
47
	<tr valign="top">
47
	<tr valign="top">
48
		<td class="label">{translate key="user.signature"}</td>
48
		<td class="label">{translate key="user.signature"}</td>
(-)a/templates/manager/people/userProfileForm.tpl (-1 / +1 lines)
 Lines 201-207    Link Here 
201
	<tr valign="top">
201
	<tr valign="top">
202
		<td class="label">{fieldLabel name="affiliation" key="user.affiliation"}</td>
202
		<td class="label">{fieldLabel name="affiliation" key="user.affiliation"}</td>
203
		<td class="value">
203
		<td class="value">
204
			<textarea name="affiliation" id="affiliation" rows="5" cols="40" class="textArea">{$affiliation|escape}</textarea><br/>
204
			<textarea name="affiliation[{$formLocale|escape}]" id="affiliation" rows="5" cols="40" class="textArea">{$affiliation[$formLocale]|escape}</textarea><br/>
205
			<span class="instruct">{translate key="user.affiliation.description"}</span>
205
			<span class="instruct">{translate key="user.affiliation.description"}</span>
206
		</td>
206
		</td>
207
	</tr>
207
	</tr>
(-)a/templates/rt/bio.tpl (-1 / +1 lines)
 Lines 21-27    Link Here 
21
<p>
21
<p>
22
	<em>{$author->getFullName()|escape}</em><br />
22
	<em>{$author->getFullName()|escape}</em><br />
23
	{if $author->getUrl()}<a href="{$author->getUrl()|escape:"quotes"}">{$author->getUrl()|escape}</a><br/>{/if}
23
	{if $author->getUrl()}<a href="{$author->getUrl()|escape:"quotes"}">{$author->getUrl()|escape}</a><br/>{/if}
24
	{if $author->getAffiliation()}{$author->getAffiliation()|escape|nl2br}{/if}
24
	{if $author->getLocalizedAffiliation()}{$author->getLocalizedAffiliation()|escape|nl2br}{/if}
25
	{if $author->getCountry()}<br/>{$author->getCountryLocalized()|escape}{/if}
25
	{if $author->getCountry()}<br/>{$author->getCountryLocalized()|escape}{/if}
26
</p>
26
</p>
27
27
(-)a/templates/rt/metadata.tpl (-1 / +1 lines)
 Lines 39-45    Link Here 
39
	<td width="25%">{translate key="rt.metadata.dublinCore.primaryAuthor"}</td>
39
	<td width="25%">{translate key="rt.metadata.dublinCore.primaryAuthor"}</td>
40
	<td>{translate key="rt.metadata.pkp.primaryAuthor"}</td>
40
	<td>{translate key="rt.metadata.pkp.primaryAuthor"}</td>
41
	<td>
41
	<td>
42
		{$author->getFullName()|escape}{if $author->getAffiliation()}; {$author->getAffiliation()|escape}{/if}{if $author->getCountry()}; {$author->getCountryLocalized()|escape}{/if}
42
		{$author->getFullName()|escape}{if $author->getLocalizedAffiliation()}; {$author->getLocalizedAffiliation()|escape}{/if}{if $author->getCountry()}; {$author->getCountryLocalized()|escape}{/if}
43
		</td>
43
		</td>
44
</tr>
44
</tr>
45
{/foreach}
45
{/foreach}
(-)a/templates/schedConf/trackPolicies.tpl (-1 / +1 lines)
 Lines 31-37    Link Here 
31
				{translate key="user.role.directors"}
31
				{translate key="user.role.directors"}
32
				<ul class="plain">
32
				<ul class="plain">
33
				{/if}
33
				{/if}
34
				<li>{$trackDirector->getFirstName()|escape} {$trackDirector->getLastName()|escape}{if strlen($trackDirector->getAffiliation()) > 0}, {$trackDirector->getAffiliation()|escape}{/if}</li>
34
				<li>{$trackDirector->getFirstName()|escape} {$trackDirector->getLastName()|escape}{if $trackDirector->getLocalizedAffiliation()}, {$trackDirector->getLocalizedAffiliation()|escape}{/if}</li>
35
			{/foreach}
35
			{/foreach}
36
		{/if}
36
		{/if}
37
	{/foreach}
37
	{/foreach}
(-)a/templates/search/authorIndex.tpl (-1 / +1 lines)
 Lines 29-35    Link Here 
29
	{assign var=lastAuthorName value=$authorName}
29
	{assign var=lastAuthorName value=$authorName}
30
	{assign var=lastAuthorCountry value=$authorCountry}
30
	{assign var=lastAuthorCountry value=$authorCountry}
31
31
32
	{assign var=authorAffiliation value=$author->getAffiliation()}
32
	{assign var=authorAffiliation value=$author->getLocalizedAffiliation()}
33
	{assign var=authorCountry value=$author->getCountry()}
33
	{assign var=authorCountry value=$author->getCountry()}
34
34
35
	{assign var=authorFirstName value=$author->getFirstName()}
35
	{assign var=authorFirstName value=$author->getFirstName()}
(-)a/templates/submission/metadata/metadata.tpl (-1 / +1 lines)
 Lines 36-42    Link Here 
36
	{/if}
36
	{/if}
37
	<tr valign="top">
37
	<tr valign="top">
38
		<td class="label">{translate key="user.affiliation"}</td>
38
		<td class="label">{translate key="user.affiliation"}</td>
39
		<td class="value">{$author->getAffiliation()|escape|nl2br|default:"&mdash;"}</td>
39
		<td class="value">{$author->getLocalizedAffiliation()|escape|nl2br|default:"&mdash;"}</td>
40
	</tr>
40
	</tr>
41
	<tr valign="top">
41
	<tr valign="top">
42
		<td class="label">{translate key="common.country"}</td>
42
		<td class="label">{translate key="common.country"}</td>
(-)a/templates/submission/metadata/metadataEdit.tpl (-2 / +5 lines)
 Lines 45-50   function moveAuthor(dir, authorIndex) { Link Here 
45
				{foreach from=$author.biography key="thisLocale" item="thisBiography"}
45
				{foreach from=$author.biography key="thisLocale" item="thisBiography"}
46
					{if $thisLocale != $formLocale}<input type="hidden" name="authors[{$authorIndex|escape}][biography][{$thisLocale|escape}]" value="{$thisBiography|escape}" />{/if}
46
					{if $thisLocale != $formLocale}<input type="hidden" name="authors[{$authorIndex|escape}][biography][{$thisLocale|escape}]" value="{$thisBiography|escape}" />{/if}
47
				{/foreach}
47
				{/foreach}
48
				{foreach from=$author.affiliation key="thisLocale" item="thisAffiliation"}
49
					{if $thisLocale != $formLocale}<input type="hidden" name="authors[{$authorIndex|escape}][affiliation][{$thisLocale|escape}]" value="{$thisAffiliation|escape}" />{/if}
50
				{/foreach}
48
			{/foreach}
51
			{/foreach}
49
			{form_language_chooser form="metadata" url=$formUrl}
52
			{form_language_chooser form="metadata" url=$formUrl}
50
			<span class="instruct">{translate key="form.formLanguage.description"}</span>
53
			<span class="instruct">{translate key="form.formLanguage.description"}</span>
 Lines 94-100   function moveAuthor(dir, authorIndex) { Link Here 
94
	<tr valign="top">
97
	<tr valign="top">
95
		<td class="label">{fieldLabel name="authors-$authorIndex-affiliation" key="user.affiliation"}</td>
98
		<td class="label">{fieldLabel name="authors-$authorIndex-affiliation" key="user.affiliation"}</td>
96
		<td class="value">
99
		<td class="value">
97
			<textarea name="authors[{$authorIndex|escape}][affiliation]" class="textArea" id="authors-{$authorIndex|escape}-affiliation" rows="5" cols="40">{$author.affiliation|escape}</textarea><br/>
100
			<textarea name="authors[{$authorIndex|escape}][affiliation][{$formLocale|escape}]" class="textArea" id="authors-{$authorIndex|escape}-affiliation" rows="5" cols="40">{$author.affiliation[$formLocale]|escape}</textarea><br/>
98
			<span class="instruct">{translate key="user.affiliation.description"}</span>
101
			<span class="instruct">{translate key="user.affiliation.description"}</span>
99
		</td>
102
		</td>
100
	</tr>
103
	</tr>
 Lines 151-157   function moveAuthor(dir, authorIndex) { Link Here 
151
	<tr valign="top">
154
	<tr valign="top">
152
		<td class="label">{fieldLabel name="authors-0-affiliation" key="user.affiliation"}</td>
155
		<td class="label">{fieldLabel name="authors-0-affiliation" key="user.affiliation"}</td>
153
		<td class="value">
156
		<td class="value">
154
			<textarea id="authors-0-affiliation" name="authors[0][affiliation]" rows="5" cols="40" class="textArea"></textarea><br/>
157
			<textarea name="authors[0][affiliation][{$formLocale|escape}]" class="textArea" id="authors-0-affiliation" rows="5" cols="40"></textarea><br/>
155
			<span class="instruct">{translate key="user.affiliation.description"}</span>
158
			<span class="instruct">{translate key="user.affiliation.description"}</span>
156
		</td>
159
		</td>
157
	</tr>
160
	</tr>
(-)a/templates/submission/metadata/metadataView.tpl (-1 / +1 lines)
 Lines 32-38    Link Here 
32
	</tr>
32
	</tr>
33
	<tr valign="top">
33
	<tr valign="top">
34
		<td class="label">{translate key="user.affiliation"}</td>
34
		<td class="label">{translate key="user.affiliation"}</td>
35
		<td class="value">{$author.affiliation|escape|nl2br|default:"&mdash;"}</td>
35
		<td class="value">{$author.affiliation.$formLocale|escape|nl2br|default:"&mdash;"}</td>
36
	</tr>
36
	</tr>
37
	<tr valign="top">
37
	<tr valign="top">
38
		<td class="label">{translate key="user.biography"}</td>
38
		<td class="label">{translate key="user.biography"}</td>
(-)a/templates/trackDirector/createReviewerForm.tpl (-1 / +1 lines)
 Lines 108-114    Link Here 
108
	<tr valign="top">
108
	<tr valign="top">
109
		<td class="label">{fieldLabel name="affiliation" key="user.affiliation"}</td>
109
		<td class="label">{fieldLabel name="affiliation" key="user.affiliation"}</td>
110
		<td class="value">
110
		<td class="value">
111
			<textarea name="affiliation" id="affiliation" rows="5" cols="40" class="textArea">{$affiliation|escape}</textarea><br/>
111
			<textarea name="affiliation[{$formLocale|escape}]" id="affiliation" rows="5" cols="40" class="textArea">{$affiliation[$formLocale]|escape}</textarea><br/>
112
			<span class="instruct">{translate key="user.affiliation.description"}</span>
112
			<span class="instruct">{translate key="user.affiliation.description"}</span>
113
		</td>
113
		</td>
114
	</tr>
114
	</tr>
(-)a/templates/trackDirector/userProfile.tpl (-1 / +1 lines)
 Lines 48-54    Link Here 
48
</tr>
48
</tr>
49
<tr valign="top">
49
<tr valign="top">
50
	<td class="label">{translate key="user.affiliation"}:</td>
50
	<td class="label">{translate key="user.affiliation"}:</td>
51
	<td class="value">{$user->getAffiliation()|escape|nl2br}</td>
51
	<td class="value">{$user->getLocalizedAffiliation()|escape|nl2br}</td>
52
</tr>
52
</tr>
53
<tr valign="top">
53
<tr valign="top">
54
	<td class="label">{translate key="user.signature"}:</td>
54
	<td class="label">{translate key="user.signature"}:</td>
(-)a/templates/user/createAccount.tpl (-1 / +1 lines)
 Lines 135-141    Link Here 
135
135
136
<tr valign="top">
136
<tr valign="top">
137
	<td class="label">{fieldLabel name="affiliation" key="user.affiliation" required="true"}</td>
137
	<td class="label">{fieldLabel name="affiliation" key="user.affiliation" required="true"}</td>
138
	<td class="value"><textarea name="affiliation" rows="5" cols="40" class="textArea">{$affiliation|escape}</textarea></td>
138
	<td class="value"><textarea name="affiliation[{$formLocale|escape}]" rows="5" cols="40" class="textArea">{$affiliation[$formLocale]|escape}</textarea></td>
139
</tr>
139
</tr>
140
140
141
<tr valign="top">
141
<tr valign="top">
(-)a/templates/user/profile.tpl (-1 / +1 lines)
 Lines 76-82    Link Here 
76
<tr valign="top">
76
<tr valign="top">
77
	<td class="label">{fieldLabel name="affiliation" key="user.affiliation" required="true"}</td>
77
	<td class="label">{fieldLabel name="affiliation" key="user.affiliation" required="true"}</td>
78
	<td class="value">
78
	<td class="value">
79
		<textarea name="affiliation" id="affiliation" rows="5" cols="40" class="textArea">{$affiliation|escape}</textarea><br/>
79
		<textarea name="affiliation[{$formLocale|escape}]" id="affiliation" rows="5" cols="40" class="textArea">{$affiliation[$formLocale]|escape}</textarea><br/>
80
		<span class="instruct">{translate key="user.affiliation.description"}</span>
80
		<span class="instruct">{translate key="user.affiliation.description"}</span>
81
	</td>
81
	</td>
82
</tr>
82
</tr>

Return to bug 5550