Go to the source code of this file.
Namespaces | |
| namespace | TYPO3 |
Classes | |
| class | SC_wizard_add |
Functions | |
| main () | |
| Main function Will issue a location-header, redirecting either BACK or to a new alt_doc.php instance... | |
Variables | |
| $BACK_PATH = '' | |
| [CLASS/FUNCTION INDEX of SCRIPT] | |
| $SOBE = t3lib_div::makeInstance('SC_wizard_add') | |
|
|
Main function Will issue a location-header, redirecting either BACK or to a new alt_doc.php instance...
Definition at line 157 of file wizard_add.php. References header(), and table(). Referenced by t3lib_extMgm::addModule(), t3lib_SCbase::extObjContent(), SC_mod_tools_em_index::getRepositoryUploadForm(), and tslib_imgmenu::makeImageMap(). 00157 {
00158
00159 if ($this->returnEditConf) {
00160 if ($this->processDataFlag) {
00161
00162 // Preparing the data of the parent record...:
00163 $trData = t3lib_div::makeInstance('t3lib_transferData');
00164 $trData->fetchRecord($this->P['table'],$this->P['uid'],''); // 'new'
00165 reset($trData->regTableItems_data);
00166 $current = current($trData->regTableItems_data);
00167
00168 // If that record was found (should absolutely be...), then init TCEmain and set, prepend or append the record
00169 if (is_array($current)) {
00170 $tce = t3lib_div::makeInstance('t3lib_TCEmain');
00171 $tce->stripslashes_values=0;
00172 $data=array();
00173 $addEl = $this->table.'_'.$this->id;
00174 switch((string)$this->P['params']['setValue']) {
00175 case 'set':
00176 $data[$this->P['table']][$this->P['uid']][$this->P['field']] = $addEl;
00177 break;
00178 case 'prepend':
00179 $data[$this->P['table']][$this->P['uid']][$this->P['field']] = $current[$this->P['field']].','.$addEl;
00180 break;
00181 case 'append':
00182 $data[$this->P['table']][$this->P['uid']][$this->P['field']] = $addEl.','.$current[$this->P['field']];
00183 break;
00184 }
00185
00186 // Setting the new field data:
00187 $data[$this->P['table']][$this->P['uid']][$this->P['field']] = implode(',',t3lib_div::trimExplode(',',$data[$this->P['table']][$this->P['uid']][$this->P['field']],1));
00188
00189 // Submit the data:
00190 $tce->start($data,array());
00191 $tce->process_datamap();
00192 }
00193 }
00194 // Return to the parent alt_doc.php record editing session:
00195 header('Location: '.t3lib_div::locationHeaderUrl($this->P['returnUrl']));
00196 } else {
00197 // Redirecting to alt_doc.php with instructions to create a new record AND when closing to return back with information about that records ID etc.
00198 header('Location: '.t3lib_div::locationHeaderUrl('alt_doc.php?returnUrl='.rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI')).'&returnEditConf=1&edit['.$this->P['params']['table'].']['.$this->pid.']=new'));
00199 }
00200 }
|
|
|
[CLASS/FUNCTION INDEX of SCRIPT] 75: class SC_wizard_add 104: function init() 157: function main() TOTAL FUNCTIONS: 2 (This index is automatically created/updated by the extension "extdeveval") Definition at line 50 of file wizard_add.php. |
|
|
Definition at line 220 of file wizard_add.php. |
1.3.8-20040913