|
|
| 121 |
* Initialize form data from current settings. |
121 |
* Initialize form data from current settings. |
| 122 |
*/ |
122 |
*/ |
| 123 |
function initData() { |
123 |
function initData() { |
|
|
124 |
$journal = &Request::getJournal(); |
| 125 |
$sectionEditorsDao =& DAORegistry::getDAO('SectionEditorsDAO'); |
| 124 |
if (isset($this->sectionId)) { |
126 |
if (isset($this->sectionId)) { |
| 125 |
$journal = &Request::getJournal(); |
127 |
$sectionDao =& DAORegistry::getDAO('SectionDAO'); |
| 126 |
$sectionDao = &DAORegistry::getDAO('SectionDAO'); |
128 |
$section =& $sectionDao->getSection($this->sectionId, $journal->getJournalId()); |
| 127 |
$section = &$sectionDao->getSection($this->sectionId, $journal->getJournalId()); |
|
|
| 128 |
|
129 |
|
| 129 |
if ($section == null) { |
130 |
if ($section == null) { |
| 130 |
unset($this->sectionId); |
131 |
unset($this->sectionId); |
| 131 |
} else { |
132 |
} else { |
| 132 |
$sectionEditorsDao =& DAORegistry::getDAO('SectionEditorsDAO'); |
|
|
| 133 |
$this->_data = array( |
133 |
$this->_data = array( |
| 134 |
'title' => $section->getTitle(null), // Localized |
134 |
'title' => $section->getTitle(null), // Localized |
| 135 |
'abbrev' => $section->getAbbrev(null), // Localized |
135 |
'abbrev' => $section->getAbbrev(null), // Localized |
|
|
| 148 |
'unassignedEditors' => $sectionEditorsDao->getEditorsNotInSection($journal->getJournalId(), $this->sectionId) |
148 |
'unassignedEditors' => $sectionEditorsDao->getEditorsNotInSection($journal->getJournalId(), $this->sectionId) |
| 149 |
); |
149 |
); |
| 150 |
} |
150 |
} |
|
|
151 |
} else { |
| 152 |
$this->_data = array( |
| 153 |
'unassignedEditors' => $sectionEditorsDao->getEditorsNotInSection($journal->getJournalId(), null) |
| 154 |
); |
| 151 |
} |
155 |
} |
| 152 |
} |
156 |
} |
| 153 |
|
157 |
|