RFC #7435: Docheaders: Module User Tools > Workspace: No docheader
[Packages/TYPO3.CMS.git] / typo3 / mod / user / ws / workspaceforms.php
1 <?php
2 /***************************************************************
3 * Copyright notice
4 *
5 * (c) 1999-2006 Kasper Skaarhoj (kasperYYYY@typo3.com)
6 * All rights reserved
7 *
8 * This script is part of the TYPO3 project. The TYPO3 project is
9 * free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * The GNU General Public License can be found at
15 * http://www.gnu.org/copyleft/gpl.html.
16 * A copy is found in the textfile GPL.txt and important notices to the license
17 * from the author is found in LICENSE.txt distributed with these scripts.
18 *
19 *
20 * This script is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
24 *
25 * This copyright notice MUST APPEAR in all copies of the script!
26 ***************************************************************/
27 /**
28 * Module: Workspace manager
29 *
30 * $Id$
31 *
32 * @author Dmitry Dulepov <typo3@accio.lv>
33 */
34 /**
35 * [CLASS/FUNCTION INDEX of SCRIPT]
36 *
37 *
38 *
39 * 93: class SC_mod_user_ws_workspaceForms extends t3lib_SCbase
40 *
41 * SECTION: PUBLIC MODULE METHODS
42 * 123: function init()
43 * 158: function main()
44 * 233: function printContent()
45 *
46 * SECTION: PRIVATE FUNCTIONS
47 * 257: function initTCEForms()
48 * 284: function getModuleParameters()
49 * 302: function getTitle()
50 * 321: function buildForm()
51 * 330: function buildEditForm()
52 * 395: function buildNewForm()
53 * 458: function createButtons()
54 * 484: function getOwnerUser($uid)
55 * 510: function processData()
56 * 554: function fixVariousTCAFields()
57 * 566: function fixTCAUserField($fieldName)
58 * 593: function checkWorkspaceAccess()
59 *
60 *
61 * 606: class user_SC_mod_user_ws_workspaceForms
62 * 615: function processUserAndGroups($conf, $tceforms)
63 *
64 * TOTAL FUNCTIONS: 16
65 * (This index is automatically created/updated by the extension "extdeveval")
66 *
67 */
68
69
70 // Initialize module:
71 unset($MCONF);
72 require('conf.php');
73 require($BACK_PATH.'init.php');
74 require($BACK_PATH.'template.php');
75 $BE_USER->modAccess($MCONF,1);
76
77 // Include libraries of various kinds used inside:
78 $LANG->includeLLFile('EXT:lang/locallang_mod_user_ws.xml');
79 require_once(PATH_t3lib.'class.t3lib_scbase.php');
80 //require_once(PATH_typo3.'mod/user/ws/class.wslib.php');
81 require_once(PATH_t3lib.'class.t3lib_tcemain.php');
82 require_once(PATH_t3lib.'class.t3lib_tceforms.php');
83 require_once (PATH_t3lib.'class.t3lib_transferdata.php');
84 require_once (PATH_t3lib.'class.t3lib_loaddbgroup.php');
85
86 /**
87 * Module: Workspace forms for editing/creating workspaces.
88 *
89 * @author Dmitry Dulepov <typo3@fm-world.ru>
90 * @package TYPO3
91 * @subpackage core
92 */
93 class SC_mod_user_ws_workspaceForms extends t3lib_SCbase {
94
95 // Default variables for backend modules
96 var $MCONF = array(); // Module configuration
97 var $MOD_MENU = array(); // Module menu items
98 var $MOD_SETTINGS = array(); // Module session settings
99
100 /**
101 * Document Template Object
102 *
103 * @var mediumDoc
104 */
105 var $doc;
106 var $content; // Accumulated content
107
108 // internal variables
109 var $isEditAction = false; // true if about to edit workspace
110 var $workspaceId; // ID of the workspace that we will edit. Set only if $isEditAction is true.
111
112 /**
113 * An instance of t3lib_TCEForms
114 *
115 * @var t3lib_TCEforms
116 */
117 var $tceforms;
118
119
120
121
122
123
124 /*************************
125 *
126 * PUBLIC MODULE METHODS
127 *
128 *************************/
129
130 /**
131 * Initializes the module. See <code>t3lib_SCbase::init()</code> for more information.
132 *
133 * @return void
134 */
135 function init() {
136 // Setting module configuration:
137 $this->MCONF = $GLOBALS['MCONF'];
138
139 // Initialize Document Template object:
140 $this->doc = t3lib_div::makeInstance('template');
141 $this->doc->backPath = $GLOBALS['BACK_PATH'];
142 $this->doc->setModuleTemplate('templates/ws_forms.html');
143 $this->doc->docType = 'xhtml_trans';
144 $this->doc->form = '<form action="' . t3lib_div::getIndpEnv('SCRIPT_NAME').'" method="post" enctype="'.$GLOBALS['TYPO3_CONF_VARS']['SYS']['form_enctype'].'" name="editform" onsubmit="return TBE_EDITOR.checkSubmit(1);">';
145
146 $this->doc->getContextMenuCode();
147 $this->doc->JScode.= $this->doc->getDynTabMenuJScode();
148
149 // Parent initialization:
150 t3lib_SCbase::init();
151 }
152
153
154
155
156
157
158
159
160
161
162
163 /**
164 * Creates module content.
165 *
166 * @return void
167 */
168 function main() {
169 global $LANG;
170
171 // see what we have to do and get parameters (call before processing data!!!)
172 $this->getModuleParameters();
173
174 $hasAccess = (
175 $GLOBALS['BE_USER']->isAdmin() ||
176 0 != ($GLOBALS['BE_USER']->groupData['workspace_perms'] & 4) ||
177 ($this->isEditAction && $this->checkWorkspaceAccess())
178 );
179
180 if (!$hasAccess) {
181 $title = $this->getTitle();
182 $this->content .= $this->doc->startPage($title);
183 $this->content .= $this->doc->header($title);
184 $this->content .= $this->doc->spacer(5);
185 $this->content .= $LANG->getLL($this->isEditAction ? 'edit_workspace_no_permission' : 'create_workspace_no_permission');
186 $this->content .= $this->doc->spacer(5);
187 $goBack = $GLOBALS['LANG']->getLL('edit_workspace_go_back');
188 $this->content .= '<img ' . t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], 'gfx/goback.gif', 'width="14" height="14"') . ' alt="' . $goBack . '" align="middle" hspace="2" />' .
189 '<a href="javascript:history.back()">' .
190 $goBack .
191 '</a>';
192 $this->content .= $this->doc->endPage();
193 return;
194 }
195
196 // process submission (this may override action and workspace ID!)
197 if (t3lib_div::_GP('workspace_form_submited')) {
198 $this->processData();
199 // if 'Save&Close' was pressed, redirect to main module script
200 if (t3lib_div::_GP('_saveandclosedok_x')) {
201 // `n` below is to prevent caching
202 header('Location: ' . t3lib_div::locationHeaderUrl('index.php?n=' . uniqid('')));
203 exit();
204 }
205 }
206
207 $this->initTCEForms();
208
209 //
210 // start page
211 //
212 $this->content .= $this->doc->header($this->getTitle());
213 $this->content .= $this->doc->spacer(5);
214
215 //
216 // page content
217 //
218 $this->content .= $this->tceforms->printNeededJSFunctions_top();
219 $this->content .= $this->buildForm();
220 $this->content .= $this->tceforms->printNeededJSFunctions();
221
222 // Setting up the buttons and markers for docheader
223 $docHeaderButtons = $this->getButtons();
224 // $markers['CSH'] = $docHeaderButtons['csh'];
225 $markers['CONTENT'] = $this->content;
226
227 // Build the <body> for the module
228 $this->content = $this->doc->startPage($this->getTitle());
229 $this->content.= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
230 $this->content.= $this->doc->endPage();
231 $this->content = $this->doc->insertStylesAndJS($this->content);
232 }
233
234 /**
235 * Outputs module content to the browser.
236 *
237 * @return void
238 */
239 function printContent() {
240 echo $this->content;
241 }
242
243 /**
244 * Create the panel of buttons for submitting the form or otherwise perform operations.
245 *
246 * @return array all available buttons as an assoc. array
247 */
248 private function getButtons() {
249 global $LANG;
250
251 $buttons = array(
252 'close' => '',
253 'save' => '',
254 'save_close' => ''
255 );
256
257 // Close, `n` below is simply to prevent caching
258 $buttons['close'] = '<a href="index.php?n=' . uniqid('wksp') . '"><img' . t3lib_iconWorks::skinImg($this->doc->backPath, 'gfx/closedok.gif') . ' class="c-inputButton" title="' . $LANG->sL('LLL:EXT:lang/locallang_core.php:rm.closeDoc', 1) . '" alt="" /></a>';
259 // Save
260 $buttons['save'] = '<input type="image" class="c-inputButton" name="_savedok"' . t3lib_iconWorks::skinImg($this->doc->backPath, 'gfx/savedok.gif') . ' title="' . $LANG->sL('LLL:EXT:lang/locallang_core.php:rm.saveDoc', 1) . '" value="_savedok" />';
261 // Save & Close
262 $buttons['save_close'] = '<input type="image" class="c-inputButton" name="_saveandclosedok"' . t3lib_iconWorks::skinImg($this->doc->backPath, 'gfx/saveandclosedok.gif') . ' title="' . $LANG->sL('LLL:EXT:lang/locallang_core.php:rm.saveCloseDoc', 1) . '" value="_saveandclosedok" />';
263
264 return $buttons;
265 }
266
267
268
269
270
271
272
273
274 /*************************
275 *
276 * PRIVATE FUNCTIONS
277 *
278 *************************/
279
280 /**
281 * Initializes <code>t3lib_TCEform</code> class for use in this module.
282 *
283 * @return void
284 */
285 function initTCEForms() {
286 $this->tceforms = t3lib_div::makeInstance('t3lib_TCEforms');
287 $this->tceforms->initDefaultBEMode();
288 $this->tceforms->backPath = $GLOBALS['BACK_PATH'];
289 $this->tceforms->doSaveFieldName = 'doSave';
290 $this->tceforms->localizationMode = t3lib_div::inList('text,media',$this->localizationMode) ? $this->localizationMode : ''; // text,media is keywords defined in TYPO3 Core API..., see "l10n_cat"
291 $this->tceforms->returnUrl = $this->R_URI;
292 $this->tceforms->palettesCollapsed = !$this->MOD_SETTINGS['showPalettes'];
293 $this->tceforms->disableRTE = $this->MOD_SETTINGS['disableRTE'];
294 $this->tceforms->enableClickMenu = true;
295 $this->tceforms->enableTabMenu = true;
296
297 // Setting external variables:
298 if ($GLOBALS['BE_USER']->uc['edit_showFieldHelp']!='text' && $this->MOD_SETTINGS['showDescriptions']) $this->tceforms->edit_showFieldHelp='text';
299 }
300
301
302
303
304
305
306
307 /**
308 * Retrieves module parameters from the <code>t3lib_div::_GP</code>. The following arguments are retrieved: <ul><li>action</li><li>workspace id (if action == 'edit')</li></ul>
309 *
310 * @return void
311 */
312 function getModuleParameters(){
313 $this->isEditAction = (t3lib_div::_GP('action') == 'edit');
314 if ($this->isEditAction) {
315 $this->workspaceId = intval(t3lib_div::_GP('wkspId'));
316 }
317 }
318
319
320
321
322
323
324
325 /**
326 * Retrieves a title of the module according to action.
327 *
328 * @return string A title for the module
329 */
330 function getTitle() {
331 $label = ($this->isEditAction ? 'edit_workspace_title_edit' : 'edit_workspace_title_new');
332 return $GLOBALS['LANG']->getLL($label);
333 }
334
335
336
337
338
339
340
341
342
343
344 /**
345 * Creates form for workspace. This function is a wrapper around <code>buildEditForm()</code> and <code>buildNewForm()</code>.
346 *
347 * @return string Generated form
348 */
349 function buildForm() {
350 return $this->isEditAction ? $this->buildEditForm() : $this->buildNewForm();
351 }
352
353 /**
354 * Creates a form for editing workspace. Parts were adopted from <code>alt_doc.php</code>.
355 *
356 * @return string Generated form
357 */
358 function buildEditForm() {
359 $content = '';
360 $table = 'sys_workspace';
361 $prevPageID = '';
362 $trData = t3lib_div::makeInstance('t3lib_transferData');
363 $trData->addRawData = TRUE;
364 $trData->defVals = $this->defVals;
365 $trData->lockRecords=1;
366 $trData->disableRTE = $this->MOD_SETTINGS['disableRTE'];
367 $trData->prevPageID = $prevPageID;
368 $trData->fetchRecord($table, $this->workspaceId, '');
369 reset($trData->regTableItems_data);
370 $rec = current($trData->regTableItems_data);
371
372 // Setting variables in TCEforms object:
373 $this->tceforms->hiddenFieldList = '';
374 // Register default language labels, if any:
375 $this->tceforms->registerDefaultLanguageData($table,$rec);
376
377 $this->fixVariousTCAFields();
378 if (!$GLOBALS['BE_USER']->isAdmin()) {
379 // Non-admins cannot select users from the root. We "fix" it for them.
380 $this->fixTCAUserField('adminusers');
381 $this->fixTCAUserField('members');
382 $this->fixTCAUserField('reviewers');
383 }
384
385 // Create form for the record (either specific list of fields or the whole record):
386 $form = '';
387 $form .= $this->tceforms->getMainFields($table,$rec);
388 $form .= '<input type="hidden" name="data['.$table.']['.$rec['uid'].'][pid]" value="'.$rec['pid'].'" />';
389 $form .= '<input type="hidden" name="workspace_form_submited" value="1" />';
390 $form .= '<input type="hidden" name="returnUrl" value="index.php" />';
391 $form .= '<input type="hidden" name="action" value="edit" />';
392 $form .= '<input type="hidden" name="closeDoc" value="0" />';
393 $form .= '<input type="hidden" name="doSave" value="0" />';
394 $form .= '<input type="hidden" name="_serialNumber" value="'.md5(microtime()).'" />';
395 $form .= '<input type="hidden" name="_disableRTE" value="'.$this->tceforms->disableRTE.'" />';
396 $form .= '<input type="hidden" name="wkspId" value="' . htmlspecialchars($this->workspaceId) . '" />';
397 $form = $this->tceforms->wrapTotal($form, $rec, $table);
398
399 // Combine it all:
400 $content .= $form;
401 return $content;
402 }
403
404
405
406
407
408
409
410
411
412
413
414
415 /**
416 * Creates a form for new workspace. Parts are adopted from <code>alt_doc.php</code>.
417 *
418 * @return string Generated form
419 */
420 function buildNewForm() {
421 $content = '';
422 $table = 'sys_workspace';
423 $prevPageID = '';
424 $trData = t3lib_div::makeInstance('t3lib_transferData');
425 $trData->addRawData = TRUE;
426 $trData->defVals = $this->defVals;
427 $trData->lockRecords=1;
428 $trData->disableRTE = $this->MOD_SETTINGS['disableRTE'];
429 $trData->prevPageID = $prevPageID;
430 $trData->fetchRecord($table, 0, 'new');
431 reset($trData->regTableItems_data);
432 $rec = current($trData->regTableItems_data);
433 $rec['uid'] = uniqid('NEW');
434 $rec['pid'] = 0;
435 $rec['adminusers'] = $this->getOwnerUser($rec['uid']);
436
437 // Setting variables in TCEforms object:
438 $this->tceforms->hiddenFieldList = '';
439 // Register default language labels, if any:
440 $this->tceforms->registerDefaultLanguageData($table,$rec);
441
442 $this->fixVariousTCAFields();
443 if (!$GLOBALS['BE_USER']->isAdmin()) {
444 // Non-admins cannot select users from the root. We "fix" it for them.
445 $this->fixTCAUserField('adminusers');
446 $this->fixTCAUserField('members');
447 $this->fixTCAUserField('reviewers');
448 }
449
450
451 // Create form for the record (either specific list of fields or the whole record):
452 $form = '';
453 $form .= $this->doc->spacer(5);
454 $form .= $this->tceforms->getMainFields($table,$rec);
455
456 $form .= '<input type="hidden" name="workspace_form_submited" value="1" />';
457 $form .= '<input type="hidden" name="data['.$table.']['.$rec['uid'].'][pid]" value="'.$rec['pid'].'" />';
458 $form .= '<input type="hidden" name="returnUrl" value="index.php" />';
459 $form .= '<input type="hidden" name="action" value="new" />';
460 $form .= '<input type="hidden" name="closeDoc" value="0" />';
461 $form .= '<input type="hidden" name="doSave" value="0" />';
462 $form .= '<input type="hidden" name="_serialNumber" value="'.md5(microtime()).'" />';
463 $form .= '<input type="hidden" name="_disableRTE" value="'.$this->tceforms->disableRTE.'" />';
464 $form = $this->tceforms->wrapTotal($form, $rec, $table);
465
466 // Combine it all:
467 $content .= $form;
468 return $content;
469 }
470
471
472
473
474
475
476
477
478
479
480
481
482 /**
483 * Returns owner user (i.e. current BE user) in the format suitable for TCE forms. This function uses <code>t3lib_loadDBGroup</code> to create value. Code is adopted from <code>t3lib_transferdata::renderRecord_groupProc()</code>.
484 *
485 * @param string $uid UID of the record (as <code>NEW...</code>)
486 * @return string User record formatted for TCEForms
487 */
488 function getOwnerUser($uid) {
489 $loadDB = t3lib_div::makeInstance('t3lib_loadDBGroup');
490 // Make sure that `sys_workspace` is in $TCA
491 t3lib_div::loadTCA('sys_workspace');
492 // shortcut to `config` of `adminusers` field -- shorter code and better PHP performance
493 $config = &$GLOBALS['TCA']['sys_workspace']['columns']['adminusers']['config'];
494 // Notice: $config['MM'] is not set in the current version of $TCA but
495 // we still pass it to ensure compatibility with feature versions!
496 $loadDB->start($GLOBALS['BE_USER']->user['uid'], $config['allowed'], $config['MM'], $uid, 'sys_workspace', $config);
497 $loadDB->getFromDB();
498 return $loadDB->readyForInterface();
499 }
500
501
502
503
504
505
506
507
508
509 /**
510 * Processes submitted data. This function uses <code>t3lib_TCEmain::process_datamap()</code> to create/update records in the <code>sys_workspace</code> table. It will print error messages just like any other Typo3 module with similar functionality. Function also changes workspace ID and module mode to 'edit' if new record was just created.
511 *
512 * @return void
513 */
514 function processData() {
515 $tce = t3lib_div::makeInstance('t3lib_TCEmain');
516 $tce->stripslashes_values = 0;
517
518 $TCAdefaultOverride = $GLOBALS['BE_USER']->getTSConfigProp('TCAdefaults');
519 if (is_array($TCAdefaultOverride)) {
520 $tce->setDefaultsFromUserTS($TCAdefaultOverride);
521 }
522 $tce->stripslashes_values = 0;
523
524 // The following is a security precaution; It makes sure that the input data array can ONLY contain data for the sys_workspace table and ONLY one record.
525 // If this is not present it could be mis-used for nasty XSS attacks which can escalate rights to admin for even non-admin users.
526 $inputData_tmp = t3lib_div::_GP('data');
527 $inputData = array();
528 if (is_array($inputData_tmp['sys_workspace'])) {
529 reset($inputData_tmp['sys_workspace']);
530 $inputData['sys_workspace'][key($inputData_tmp['sys_workspace'])] = current($inputData_tmp['sys_workspace']);
531 }
532
533 $tce->start($inputData, array(), $GLOBALS['BE_USER']);
534 $tce->admin = 1; // Bypass table restrictions
535 $tce->bypassWorkspaceRestrictions = true;
536 $tce->process_datamap();
537
538 // print error messages (if any)
539 $script = t3lib_div::getIndpEnv('TYPO3_REQUEST_SCRIPT');
540 $tce->printLogErrorMessages($script . '?' .
541 ($this->isEditAction ? 'action=edit&wkspId=' . $this->workspaceId : 'action=new'));
542
543 // If there was saved any new items, load them and update mode and workspace id
544 if (count($tce->substNEWwithIDs_table)) {
545 reset($tce->substNEWwithIDs_table); // not really necessary but better be safe...
546 $this->workspaceId = current($tce->substNEWwithIDs);
547 $this->isEditAction = true;
548 }
549 }
550
551
552
553 /**
554 * Fixes various <code>$TCA</code> fields for better visual representation of workspace editor.
555 *
556 * @return void
557 */
558 function fixVariousTCAFields() {
559 // enable tabs
560 $GLOBALS['TCA']['sys_workspace']['ctrl']['dividers2tabs'] = true;
561 }
562
563
564 /**
565 * "Fixes" <code>$TCA</code> to enable blinding for users/groups for non-admin users only.
566 *
567 * @param string $fieldName Name of the field to change
568 * @return void
569 */
570 function fixTCAUserField($fieldName) {
571 // fix fields for non-admin
572 if (!$GLOBALS['BE_USER']->isAdmin()) {
573 // make a shortcut to field
574 t3lib_div::loadTCA('sys_workspace');
575 $field = &$GLOBALS['TCA']['sys_workspace']['columns'][$fieldName];
576 $newField = array (
577 'label' => $field['label'],
578 'config' => Array (
579 'type' => 'select',
580 'itemsProcFunc' => 'user_SC_mod_user_ws_workspaceForms->processUserAndGroups',
581 //'iconsInOptionTags' => true,
582 'size' => 10,
583 'maxitems' => $field['config']['maxitems'],
584 'autoSizeMax' => $field['config']['autoSizeMax'],
585 'mod_ws_allowed' => $field['config']['allowed'] // let us know what we can use in itemProcFunc
586 )
587 );
588 $field = $newField;
589 }
590 }
591
592 /**
593 * Checks if use has editing access to the workspace.
594 *
595 * @return boolean Returns true if user can edit workspace
596 */
597 function checkWorkspaceAccess() {
598 $workspaces = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('uid,title,adminusers,members,reviewers','sys_workspace','uid=' . intval($this->workspaceId) . ' AND pid=0'.t3lib_BEfunc::deleteClause('sys_workspace'));
599 if (is_array($workspaces) && count($workspaces) != 0 && false !== ($rec = $GLOBALS['BE_USER']->checkWorkspace($workspaces[0]))) {
600 return ($rec['_ACCESS'] == 'owner' || $rec['_ACCESS'] == 'admin');
601 }
602 return false;
603 }
604 }
605
606 /**
607 * This class contains Typo3 callback functions. Class name must start from <code>user_</code> thus we use a separate class.
608 *
609 */
610 class user_SC_mod_user_ws_workspaceForms {
611
612 /**
613 * Callback function to blind user and group accounts. Used as <code>itemsProcFunc</code> in <code>$TCA</code>.
614 *
615 * @param array $conf Configuration array. The following elements are set:<ul><li>items - initial set of items (empty in our case)</li><li>config - field config from <code>$TCA</code></li><li>TSconfig - this function name</li><li>table - table name</li><li>row - record row (???)</li><li>field - field name</li></ul>
616 * @param object $tceforms <code>t3lib_div::TCEforms</code> object
617 * @return void
618 */
619 function processUserAndGroups($conf, $tceforms) {
620 // Get usernames and groupnames
621 $be_group_Array = t3lib_BEfunc::getListGroupNames('title,uid');
622 $groupArray = array_keys($be_group_Array);
623
624 $be_user_Array = t3lib_BEfunc::getUserNames();
625 $be_user_Array = t3lib_BEfunc::blindUserNames($be_user_Array,$groupArray,1);
626
627 // users
628 $title = $GLOBALS['LANG']->sL($GLOBALS['TCA']['be_users']['ctrl']['title']);
629 foreach ($be_user_Array as $uid => $user) {
630 $conf['items'][] = array(
631 $user['username'] . ' (' . $title . ')',
632 'be_users_' . $user['uid'],
633 t3lib_iconWorks::getIcon('be_users', $user)
634 );
635 }
636
637 // Process groups only if necessary -- save time!
638 if (strstr($conf['config']['mod_ws_allowed'], 'be_groups')) {
639 // groups
640
641 $be_group_Array = $be_group_Array_o = t3lib_BEfunc::getGroupNames();
642 $be_group_Array = t3lib_BEfunc::blindGroupNames($be_group_Array_o,$groupArray,1);
643
644 $title = $GLOBALS['LANG']->sL($GLOBALS['TCA']['be_groups']['ctrl']['title']);
645 foreach ($be_group_Array as $uid => $group) {
646 $conf['items'][] = array(
647 $group['title'] . ' (' . $title . ')',
648 'be_groups_' . $group['uid'],
649 t3lib_iconWorks::getIcon('be_groups', $user)
650 );
651 }
652 }
653 }
654 }
655
656 // Include extension?
657 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/mod/user/ws/workspaceforms.php']) {
658 include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/mod/user/ws/workspaceforms.php']);
659 }
660
661 // Make instance:
662 $SOBE = t3lib_div::makeInstance('SC_mod_user_ws_workspaceForms');
663 $SOBE->init();
664 $SOBE->main();
665 $SOBE->printContent();
666 ?>