(bugfix) Fixed Image Generation bug. Call in t3lib_div now uses the IM wrapper to...
[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('mediumDoc');
141 $this->doc->backPath = $GLOBALS['BACK_PATH'];
142 $this->doc->docType = 'xhtml_trans';
143 $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);">';
144
145 $CMparts = $this->doc->getContextMenuCode();
146 $this->doc->JScode.= $CMparts[0];
147 $this->doc->JScode.= $this->doc->getDynTabMenuJScode();
148 $this->doc->bodyTagAdditions = $CMparts[1];
149 $this->doc->postCode.= $CMparts[2];
150
151 // Parent initialization:
152 t3lib_SCbase::init();
153 }
154
155
156
157
158
159
160
161
162
163
164
165 /**
166 * Creates module content.
167 *
168 * @return void
169 */
170 function main() {
171 global $LANG;
172
173 // see what we have to do and get parameters (call before processing data!!!)
174 $this->getModuleParameters();
175
176 $hasAccess = (
177 $GLOBALS['BE_USER']->isAdmin() ||
178 0 != ($GLOBALS['BE_USER']->groupData['workspace_perms'] & 4) ||
179 ($this->isEditAction && $this->checkWorkspaceAccess())
180 );
181
182 if (!$hasAccess) {
183 $title = $this->getTitle();
184 $this->content .= $this->doc->startPage($title);
185 $this->content .= $this->doc->header($title);
186 $this->content .= $this->doc->spacer(5);
187 $this->content .= $LANG->getLL($this->isEditAction ? 'edit_workspace_no_permission' : 'create_workspace_no_permission');
188 $this->content .= $this->doc->spacer(5);
189 $goBack = $GLOBALS['LANG']->getLL('edit_workspace_go_back');
190 $this->content .= '<img ' . t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], 'gfx/goback.gif', 'width="14" height="14"') . ' alt="' . $goBack . '" align="middle" hspace="2" />' .
191 '<a href="javascript:history.back()">' .
192 $goBack .
193 '</a>';
194 $this->content .= $this->doc->endPage();
195 return;
196 }
197
198 // process submission (this may override action and workspace ID!)
199 if (t3lib_div::_GP('workspace_form_submited')) {
200 $this->processData();
201 // if 'Save&Close' was pressed, redirect to main module script
202 if (t3lib_div::_GP('_saveandclosedok_x')) {
203 // `n` below is to prevent caching
204 header('Location: ' . t3lib_div::locationHeaderUrl('index.php?n=' . uniqid('')));
205 exit();
206 }
207 }
208
209 $this->initTCEForms();
210
211 //
212 // start page
213 //
214 $title = $this->getTitle();
215 $this->content .= $this->doc->startPage($title);
216 $this->content .= $this->doc->header($title);
217 $this->content .= $this->doc->spacer(5);
218
219 //
220 // page content
221 //
222 $this->content .= $this->tceforms->printNeededJSFunctions_top();
223 $this->content .= $this->buildForm();
224 $this->content .= $this->tceforms->printNeededJSFunctions();
225
226 //
227 // end page
228 //
229 $this->content .= $this->doc->endPage();
230 }
231
232
233
234
235
236
237
238
239
240 /**
241 * Outputs module content to the browser.
242 *
243 * @return void
244 */
245 function printContent() {
246 echo $this->content;
247 }
248
249
250
251
252
253
254
255
256
257
258 /*************************
259 *
260 * PRIVATE FUNCTIONS
261 *
262 *************************/
263
264 /**
265 * Initializes <code>t3lib_TCEform</code> class for use in this module.
266 *
267 * @return void
268 */
269 function initTCEForms() {
270 $this->tceforms = t3lib_div::makeInstance('t3lib_TCEforms');
271 $this->tceforms->initDefaultBEMode();
272 $this->tceforms->backPath = $GLOBALS['BACK_PATH'];
273 $this->tceforms->doSaveFieldName = 'doSave';
274 $this->tceforms->localizationMode = t3lib_div::inList('text,media',$this->localizationMode) ? $this->localizationMode : ''; // text,media is keywords defined in TYPO3 Core API..., see "l10n_cat"
275 $this->tceforms->returnUrl = $this->R_URI;
276 $this->tceforms->palettesCollapsed = !$this->MOD_SETTINGS['showPalettes'];
277 $this->tceforms->disableRTE = $this->MOD_SETTINGS['disableRTE'];
278 $this->tceforms->enableClickMenu = true;
279 $this->tceforms->enableTabMenu = true;
280
281 // Setting external variables:
282 if ($GLOBALS['BE_USER']->uc['edit_showFieldHelp']!='text' && $this->MOD_SETTINGS['showDescriptions']) $this->tceforms->edit_showFieldHelp='text';
283 }
284
285
286
287
288
289
290
291 /**
292 * 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>
293 *
294 * @return void
295 */
296 function getModuleParameters(){
297 $this->isEditAction = (t3lib_div::_GP('action') == 'edit');
298 if ($this->isEditAction) {
299 $this->workspaceId = intval(t3lib_div::_GP('wkspId'));
300 }
301 }
302
303
304
305
306
307
308
309 /**
310 * Retrieves a title of the module according to action.
311 *
312 * @return string A title for the module
313 */
314 function getTitle() {
315 $label = ($this->isEditAction ? 'edit_workspace_title_edit' : 'edit_workspace_title_new');
316 return $GLOBALS['LANG']->getLL($label);
317 }
318
319
320
321
322
323
324
325
326
327
328 /**
329 * Creates form for workspace. This function is a wrapper around <code>buildEditForm()</code> and <code>buildNewForm()</code>.
330 *
331 * @return string Generated form
332 */
333 function buildForm() {
334 return $this->isEditAction ? $this->buildEditForm() : $this->buildNewForm();
335 }
336
337 /**
338 * Creates a form for editing workspace. Parts were adopted from <code>alt_doc.php</code>.
339 *
340 * @return string Generated form
341 */
342 function buildEditForm() {
343 $content = '';
344 $table = 'sys_workspace';
345 $prevPageID = '';
346 $trData = t3lib_div::makeInstance('t3lib_transferData');
347 $trData->addRawData = TRUE;
348 $trData->defVals = $this->defVals;
349 $trData->lockRecords=1;
350 $trData->disableRTE = $this->MOD_SETTINGS['disableRTE'];
351 $trData->prevPageID = $prevPageID;
352 $trData->fetchRecord($table, $this->workspaceId, '');
353 reset($trData->regTableItems_data);
354 $rec = current($trData->regTableItems_data);
355
356 // Setting variables in TCEforms object:
357 $this->tceforms->hiddenFieldList = '';
358 // Register default language labels, if any:
359 $this->tceforms->registerDefaultLanguageData($table,$rec);
360
361 $this->fixVariousTCAFields();
362 if (!$GLOBALS['BE_USER']->isAdmin()) {
363 // Non-admins cannot select users from the root. We "fix" it for them.
364 $this->fixTCAUserField('adminusers');
365 $this->fixTCAUserField('members');
366 $this->fixTCAUserField('reviewers');
367 }
368
369 // Create form for the record (either specific list of fields or the whole record):
370 $form = '';
371 $form .= $this->tceforms->getMainFields($table,$rec);
372 $form .= '<input type="hidden" name="data['.$table.']['.$rec['uid'].'][pid]" value="'.$rec['pid'].'" />';
373 $form .= '<input type="hidden" name="workspace_form_submited" value="1" />';
374 $form .= '<input type="hidden" name="returnUrl" value="index.php" />';
375 $form .= '<input type="hidden" name="action" value="edit" />';
376 $form .= '<input type="hidden" name="closeDoc" value="0" />';
377 $form .= '<input type="hidden" name="doSave" value="0" />';
378 $form .= '<input type="hidden" name="_serialNumber" value="'.md5(microtime()).'" />';
379 $form .= '<input type="hidden" name="_disableRTE" value="'.$this->tceforms->disableRTE.'" />';
380 $form .= '<input type="hidden" name="wkspId" value="' . htmlspecialchars($this->workspaceId) . '" />';
381 $form = $this->tceforms->wrapTotal($form, $rec, $table);
382
383 $buttons = $this->createButtons() . $this->doc->spacer(5);
384
385 // Combine it all:
386 $content .= $buttons . $form . $buttons;
387 return $content;
388 }
389
390
391
392
393
394
395
396
397
398
399
400
401 /**
402 * Creates a form for new workspace. Parts are adopted from <code>alt_doc.php</code>.
403 *
404 * @return string Generated form
405 */
406 function buildNewForm() {
407 $content = '';
408 $table = 'sys_workspace';
409 $prevPageID = '';
410 $trData = t3lib_div::makeInstance('t3lib_transferData');
411 $trData->addRawData = TRUE;
412 $trData->defVals = $this->defVals;
413 $trData->lockRecords=1;
414 $trData->disableRTE = $this->MOD_SETTINGS['disableRTE'];
415 $trData->prevPageID = $prevPageID;
416 $trData->fetchRecord($table, 0, 'new');
417 reset($trData->regTableItems_data);
418 $rec = current($trData->regTableItems_data);
419 $rec['uid'] = uniqid('NEW');
420 $rec['pid'] = 0;
421 $rec['adminusers'] = $this->getOwnerUser($rec['uid']);
422
423 // Setting variables in TCEforms object:
424 $this->tceforms->hiddenFieldList = '';
425 // Register default language labels, if any:
426 $this->tceforms->registerDefaultLanguageData($table,$rec);
427
428 $this->fixVariousTCAFields();
429 if (!$GLOBALS['BE_USER']->isAdmin()) {
430 // Non-admins cannot select users from the root. We "fix" it for them.
431 $this->fixTCAUserField('adminusers');
432 $this->fixTCAUserField('members');
433 $this->fixTCAUserField('reviewers');
434 }
435
436
437 // Create form for the record (either specific list of fields or the whole record):
438 $form = '';
439 $form .= $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.path', 1) . ': ' . $this->tceforms->getRecordPath($table,$rec);
440 $form .= $this->doc->spacer(5);
441 $form .= $this->tceforms->getMainFields($table,$rec);
442
443 $form .= '<input type="hidden" name="workspace_form_submited" value="1" />';
444 $form .= '<input type="hidden" name="data['.$table.']['.$rec['uid'].'][pid]" value="'.$rec['pid'].'" />';
445 $form .= '<input type="hidden" name="returnUrl" value="index.php" />';
446 $form .= '<input type="hidden" name="action" value="new" />';
447 $form .= '<input type="hidden" name="closeDoc" value="0" />';
448 $form .= '<input type="hidden" name="doSave" value="0" />';
449 $form .= '<input type="hidden" name="_serialNumber" value="'.md5(microtime()).'" />';
450 $form .= '<input type="hidden" name="_disableRTE" value="'.$this->tceforms->disableRTE.'" />';
451 $form = $this->tceforms->wrapTotal($form, $rec, $table);
452
453 $buttons = $this->createButtons() . $this->doc->spacer(5);
454
455 // Combine it all:
456 $content .= $buttons . $form . $buttons;
457 return $content;
458 }
459
460 /**
461 * Creates standard buttons for form. Adopted from <code>alt_doc.php</code>.
462 *
463 * @return string Generated buttons code
464 */
465 function createButtons() {
466 global $LANG;
467
468 $content = '';
469 $content .= '<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" />';
470 $content .= '<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" />';
471 // `n` below is simply to prevent caching
472 $content .= '<a href="index.php?n=' . uniqid('wksp') . '"><img'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/closedok.gif','width="21" height="16"').' class="c-inputButton" title="'.$LANG->sL('LLL:EXT:lang/locallang_core.php:rm.closeDoc',1).'" alt="" /></a>';
473 return $content;
474 }
475
476
477
478
479
480
481
482
483
484
485 /**
486 * 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>.
487 *
488 * @param string $uid UID of the record (as <code>NEW...</code>)
489 * @return string User record formatted for TCEForms
490 */
491 function getOwnerUser($uid) {
492 $loadDB = t3lib_div::makeInstance('t3lib_loadDBGroup');
493 // Make sure that `sys_workspace` is in $TCA
494 t3lib_div::loadTCA('sys_workspace');
495 // shortcut to `config` of `adminusers` field -- shorter code and better PHP performance
496 $config = &$GLOBALS['TCA']['sys_workspace']['columns']['adminusers']['config'];
497 // Notice: $config['MM'] is not set in the current version of $TCA but
498 // we still pass it to ensure compatibility with feature versions!
499 $loadDB->start($GLOBALS['BE_USER']->user['uid'], $config['allowed'], $config['MM'], $uid, 'sys_workspace', $config);
500 $loadDB->getFromDB();
501 return $loadDB->readyForInterface();
502 }
503
504
505
506
507
508
509
510
511
512 /**
513 * 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.
514 *
515 * @return void
516 */
517 function processData() {
518 $tce = t3lib_div::makeInstance('t3lib_TCEmain');
519 $tce->stripslashes_values = 0;
520
521 $TCAdefaultOverride = $GLOBALS['BE_USER']->getTSConfigProp('TCAdefaults');
522 if (is_array($TCAdefaultOverride)) {
523 $tce->setDefaultsFromUserTS($TCAdefaultOverride);
524 }
525 $tce->stripslashes_values = 0;
526
527 // 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.
528 // 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.
529 $inputData_tmp = t3lib_div::_GP('data');
530 $inputData = array();
531 if (is_array($inputData_tmp['sys_workspace'])) {
532 reset($inputData_tmp['sys_workspace']);
533 $inputData['sys_workspace'][key($inputData_tmp['sys_workspace'])] = current($inputData_tmp['sys_workspace']);
534 }
535
536 $tce->start($inputData, array(), $GLOBALS['BE_USER']);
537 $tce->admin = 1; // Bypass table restrictions
538 $tce->bypassWorkspaceRestrictions = true;
539 $tce->process_datamap();
540
541 // print error messages (if any)
542 $script = t3lib_div::getIndpEnv('TYPO3_REQUEST_SCRIPT');
543 $tce->printLogErrorMessages($script . '?' .
544 ($this->isEditAction ? 'action=edit&wkspId=' . $this->workspaceId : 'action=new'));
545
546 // If there was saved any new items, load them and update mode and workspace id
547 if (count($tce->substNEWwithIDs_table)) {
548 reset($tce->substNEWwithIDs_table); // not really necessary but better be safe...
549 $this->workspaceId = current($tce->substNEWwithIDs);
550 $this->isEditAction = true;
551 }
552 }
553
554
555
556 /**
557 * Fixes various <code>$TCA</code> fields for better visual representation of workspace editor.
558 *
559 * @return void
560 */
561 function fixVariousTCAFields() {
562 // enable tabs
563 $GLOBALS['TCA']['sys_workspace']['ctrl']['dividers2tabs'] = true;
564 }
565
566
567 /**
568 * "Fixes" <code>$TCA</code> to enable blinding for users/groups for non-admin users only.
569 *
570 * @param string $fieldName Name of the field to change
571 * @return void
572 */
573 function fixTCAUserField($fieldName) {
574 // fix fields for non-admin
575 if (!$GLOBALS['BE_USER']->isAdmin()) {
576 // make a shortcut to field
577 t3lib_div::loadTCA('sys_workspace');
578 $field = &$GLOBALS['TCA']['sys_workspace']['columns'][$fieldName];
579 $newField = array (
580 'label' => $field['label'],
581 'config' => Array (
582 'type' => 'select',
583 'itemsProcFunc' => 'user_SC_mod_user_ws_workspaceForms->processUserAndGroups',
584 //'iconsInOptionTags' => true,
585 'size' => 10,
586 'maxitems' => $field['config']['maxitems'],
587 'autoSizeMax' => $field['config']['autoSizeMax'],
588 'mod_ws_allowed' => $field['config']['allowed'] // let us know what we can use in itemProcFunc
589 )
590 );
591 $field = $newField;
592 }
593 }
594
595 /**
596 * Checks if use has editing access to the workspace.
597 *
598 * @return boolean Returns true if user can edit workspace
599 */
600 function checkWorkspaceAccess() {
601 $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'));
602 if (is_array($workspaces) && count($workspaces) != 0 && false !== ($rec = $GLOBALS['BE_USER']->checkWorkspace($workspaces[0]))) {
603 return ($rec['_ACCESS'] == 'owner' || $rec['_ACCESS'] == 'admin');
604 }
605 return false;
606 }
607 }
608
609 /**
610 * This class contains Typo3 callback functions. Class name must start from <code>user_</code> thus we use a separate class.
611 *
612 */
613 class user_SC_mod_user_ws_workspaceForms {
614
615 /**
616 * Callback function to blind user and group accounts. Used as <code>itemsProcFunc</code> in <code>$TCA</code>.
617 *
618 * @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>
619 * @param object $tceforms <code>t3lib_div::TCEforms</code> object
620 * @return void
621 */
622 function processUserAndGroups($conf, $tceforms) {
623 // Get usernames and groupnames
624 $be_group_Array = t3lib_BEfunc::getListGroupNames('title,uid');
625 $groupArray = array_keys($be_group_Array);
626
627 $be_user_Array = t3lib_BEfunc::getUserNames();
628 $be_user_Array = t3lib_BEfunc::blindUserNames($be_user_Array,$groupArray,1);
629
630 // users
631 $title = $GLOBALS['LANG']->sL($GLOBALS['TCA']['be_users']['ctrl']['title']);
632 foreach ($be_user_Array as $uid => $user) {
633 $conf['items'][] = array(
634 $user['username'] . ' (' . $title . ')',
635 'be_users_' . $user['uid'],
636 t3lib_iconWorks::getIcon('be_users', $user)
637 );
638 }
639
640 // Process groups only if necessary -- save time!
641 if (strstr($conf['config']['mod_ws_allowed'], 'be_groups')) {
642 // groups
643
644 $be_group_Array = $be_group_Array_o = t3lib_BEfunc::getGroupNames();
645 $be_group_Array = t3lib_BEfunc::blindGroupNames($be_group_Array_o,$groupArray,1);
646
647 $title = $GLOBALS['LANG']->sL($GLOBALS['TCA']['be_groups']['ctrl']['title']);
648 foreach ($be_group_Array as $uid => $group) {
649 $conf['items'][] = array(
650 $group['title'] . ' (' . $title . ')',
651 'be_groups_' . $group['uid'],
652 t3lib_iconWorks::getIcon('be_groups', $user)
653 );
654 }
655 }
656 }
657 }
658
659 // Include extension?
660 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/mod/user/ws/workspaceforms.php']) {
661 include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/mod/user/ws/workspaceforms.php']);
662 }
663
664 // Make instance:
665 $SOBE = t3lib_div::makeInstance('SC_mod_user_ws_workspaceForms');
666 $SOBE->init();
667 $SOBE->main();
668 $SOBE->printContent();
669 ?>