PageRenderTime 49ms CodeModel.GetById 19ms RepoModel.GetById 1ms app.codeStats 0ms

/typo3/mod/user/ws/workspaceforms.php

https://github.com/foxsoft/typo3v4core
PHP | 660 lines | 284 code | 143 blank | 233 comment | 25 complexity | b54314f1310d4fae42f273ab0855b8d6 MD5 | raw file
Possible License(s): Apache-2.0
  1. <?php
  2. /***************************************************************
  3. * Copyright notice
  4. *
  5. * (c) 1999-2010 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. // Initialize module:
  69. unset($MCONF);
  70. require('conf.php');
  71. require($BACK_PATH.'init.php');
  72. require($BACK_PATH.'template.php');
  73. $BE_USER->modAccess($MCONF,1);
  74. // Include libraries of various kinds used inside:
  75. $LANG->includeLLFile('EXT:lang/locallang_mod_user_ws.xml');
  76. //require_once(PATH_typo3.'mod/user/ws/class.wslib.php');
  77. /**
  78. * Module: Workspace forms for editing/creating workspaces.
  79. *
  80. * @author Dmitry Dulepov <typo3@fm-world.ru>
  81. * @package TYPO3
  82. * @subpackage core
  83. */
  84. class SC_mod_user_ws_workspaceForms extends t3lib_SCbase {
  85. // Default variables for backend modules
  86. var $MCONF = array(); // Module configuration
  87. var $MOD_MENU = array(); // Module menu items
  88. var $MOD_SETTINGS = array(); // Module session settings
  89. /**
  90. * Document Template Object
  91. *
  92. * @var mediumDoc
  93. */
  94. var $doc;
  95. var $content; // Accumulated content
  96. // internal variables
  97. var $isEditAction = false; // true if about to edit workspace
  98. var $workspaceId; // ID of the workspace that we will edit. Set only if $isEditAction is true.
  99. /**
  100. * An instance of t3lib_TCEForms
  101. *
  102. * @var t3lib_TCEforms
  103. */
  104. var $tceforms;
  105. /*************************
  106. *
  107. * PUBLIC MODULE METHODS
  108. *
  109. *************************/
  110. /**
  111. * Initializes the module. See <code>t3lib_SCbase::init()</code> for more information.
  112. *
  113. * @return void
  114. */
  115. function init() {
  116. // Setting module configuration:
  117. $this->MCONF = $GLOBALS['MCONF'];
  118. // Initialize Document Template object:
  119. $this->doc = t3lib_div::makeInstance('template');
  120. $this->doc->backPath = $GLOBALS['BACK_PATH'];
  121. $this->doc->setModuleTemplate('templates/ws_forms.html');
  122. $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);">';
  123. $this->doc->getContextMenuCode();
  124. $this->doc->JScode.= $this->doc->getDynTabMenuJScode();
  125. // Parent initialization:
  126. t3lib_SCbase::init();
  127. }
  128. /**
  129. * Creates module content.
  130. *
  131. * @return void
  132. */
  133. function main() {
  134. global $LANG;
  135. // see what we have to do and get parameters (call before processing data!!!)
  136. $this->getModuleParameters();
  137. $hasAccess = (
  138. $GLOBALS['BE_USER']->isAdmin() ||
  139. 0 != ($GLOBALS['BE_USER']->groupData['workspace_perms'] & 4) ||
  140. ($this->isEditAction && $this->checkWorkspaceAccess())
  141. );
  142. if (!$hasAccess) {
  143. $title = $this->getTitle();
  144. $this->content .= $this->doc->startPage($title);
  145. $this->content .= $this->doc->header($title);
  146. $this->content .= $this->doc->spacer(5);
  147. $this->content .= $LANG->getLL($this->isEditAction ? 'edit_workspace_no_permission' : 'create_workspace_no_permission');
  148. $this->content .= $this->doc->spacer(5);
  149. $goBack = $GLOBALS['LANG']->getLL('edit_workspace_go_back');
  150. $this->content .= t3lib_iconWorks::getSpriteIcon('actions-view-go-back') .
  151. '<a href="javascript:history.back()" title="'. $goBack . '">' .
  152. $goBack .
  153. '</a>';
  154. $this->content .= $this->doc->endPage();
  155. return;
  156. }
  157. // process submission (this may override action and workspace ID!)
  158. if (t3lib_div::_GP('workspace_form_submited')) {
  159. $this->processData();
  160. // if 'Save&Close' was pressed, redirect to main module script
  161. if (t3lib_div::_GP('_saveandclosedok_x')) {
  162. // `n` below is to prevent caching
  163. t3lib_utility_Http::redirect('index.php?n=' . uniqid(''));
  164. }
  165. }
  166. $this->initTCEForms();
  167. //
  168. // start page
  169. //
  170. $this->content .= $this->doc->header($this->getTitle());
  171. $this->content .= $this->doc->spacer(5);
  172. //
  173. // page content
  174. //
  175. $this->content .= $this->tceforms->printNeededJSFunctions_top();
  176. $this->content .= $this->buildForm();
  177. $this->content .= $this->tceforms->printNeededJSFunctions();
  178. // Setting up the buttons and markers for docheader
  179. $docHeaderButtons = $this->getButtons();
  180. // $markers['CSH'] = $docHeaderButtons['csh'];
  181. $markers['CONTENT'] = $this->content;
  182. // Build the <body> for the module
  183. $this->content = $this->doc->startPage($this->getTitle());
  184. $this->content.= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
  185. $this->content.= $this->doc->endPage();
  186. $this->content = $this->doc->insertStylesAndJS($this->content);
  187. }
  188. /**
  189. * Outputs module content to the browser.
  190. *
  191. * @return void
  192. */
  193. function printContent() {
  194. echo $this->content;
  195. }
  196. /**
  197. * Create the panel of buttons for submitting the form or otherwise perform operations.
  198. *
  199. * @return array all available buttons as an assoc. array
  200. */
  201. protected function getButtons() {
  202. global $LANG;
  203. $buttons = array(
  204. 'close' => '',
  205. 'save' => '',
  206. 'save_close' => ''
  207. );
  208. // Close, `n` below is simply to prevent caching
  209. $buttons['close'] = '<a href="index.php?n=' . uniqid('wksp') . '" title="' . $LANG->sL('LLL:EXT:lang/locallang_core.php:rm.closeDoc', 1) . '">' . t3lib_iconWorks::getSpriteIcon('actions-document-close') . '</a>';
  210. // Save
  211. $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" />';
  212. // Save & Close
  213. $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" />';
  214. return $buttons;
  215. }
  216. /*************************
  217. *
  218. * PRIVATE FUNCTIONS
  219. *
  220. *************************/
  221. /**
  222. * Initializes <code>t3lib_TCEform</code> class for use in this module.
  223. *
  224. * @return void
  225. */
  226. function initTCEForms() {
  227. $this->tceforms = t3lib_div::makeInstance('t3lib_TCEforms');
  228. $this->tceforms->initDefaultBEMode();
  229. $this->tceforms->backPath = $GLOBALS['BACK_PATH'];
  230. $this->tceforms->doSaveFieldName = 'doSave';
  231. $this->tceforms->localizationMode = t3lib_div::inList('text,media',$this->localizationMode) ? $this->localizationMode : ''; // text,media is keywords defined in TYPO3 Core API..., see "l10n_cat"
  232. $this->tceforms->returnUrl = $this->R_URI;
  233. $this->tceforms->palettesCollapsed = !$this->MOD_SETTINGS['showPalettes'];
  234. $this->tceforms->disableRTE = $this->MOD_SETTINGS['disableRTE'];
  235. $this->tceforms->enableClickMenu = true;
  236. $this->tceforms->enableTabMenu = true;
  237. // Setting external variables:
  238. if ($GLOBALS['BE_USER']->uc['edit_showFieldHelp']!='text' && $this->MOD_SETTINGS['showDescriptions']) $this->tceforms->edit_showFieldHelp='text';
  239. }
  240. /**
  241. * 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>
  242. *
  243. * @return void
  244. */
  245. function getModuleParameters(){
  246. $this->isEditAction = (t3lib_div::_GP('action') == 'edit');
  247. if ($this->isEditAction) {
  248. $this->workspaceId = intval(t3lib_div::_GP('wkspId'));
  249. }
  250. }
  251. /**
  252. * Retrieves a title of the module according to action.
  253. *
  254. * @return string A title for the module
  255. */
  256. function getTitle() {
  257. $label = ($this->isEditAction ? 'edit_workspace_title_edit' : 'edit_workspace_title_new');
  258. return $GLOBALS['LANG']->getLL($label);
  259. }
  260. /**
  261. * Creates form for workspace. This function is a wrapper around <code>buildEditForm()</code> and <code>buildNewForm()</code>.
  262. *
  263. * @return string Generated form
  264. */
  265. function buildForm() {
  266. return $this->isEditAction ? $this->buildEditForm() : $this->buildNewForm();
  267. }
  268. /**
  269. * Creates a form for editing workspace. Parts were adopted from <code>alt_doc.php</code>.
  270. *
  271. * @return string Generated form
  272. */
  273. function buildEditForm() {
  274. $content = '';
  275. $table = 'sys_workspace';
  276. $prevPageID = '';
  277. $trData = t3lib_div::makeInstance('t3lib_transferData');
  278. $trData->addRawData = TRUE;
  279. $trData->defVals = $this->defVals;
  280. $trData->lockRecords=1;
  281. $trData->disableRTE = $this->MOD_SETTINGS['disableRTE'];
  282. $trData->prevPageID = $prevPageID;
  283. $trData->fetchRecord($table, $this->workspaceId, '');
  284. reset($trData->regTableItems_data);
  285. $rec = current($trData->regTableItems_data);
  286. // Setting variables in TCEforms object:
  287. $this->tceforms->hiddenFieldList = '';
  288. // Register default language labels, if any:
  289. $this->tceforms->registerDefaultLanguageData($table,$rec);
  290. $this->fixVariousTCAFields();
  291. if (!$GLOBALS['BE_USER']->isAdmin()) {
  292. // Non-admins cannot select users from the root. We "fix" it for them.
  293. $this->fixTCAUserField('adminusers');
  294. $this->fixTCAUserField('members');
  295. $this->fixTCAUserField('reviewers');
  296. }
  297. // Create form for the record (either specific list of fields or the whole record):
  298. $form = '';
  299. $form .= $this->tceforms->getMainFields($table,$rec);
  300. $form .= '<input type="hidden" name="data['.$table.']['.$rec['uid'].'][pid]" value="'.$rec['pid'].'" />';
  301. $form .= '<input type="hidden" name="workspace_form_submited" value="1" />';
  302. $form .= '<input type="hidden" name="returnUrl" value="index.php" />';
  303. $form .= '<input type="hidden" name="action" value="edit" />';
  304. $form .= '<input type="hidden" name="closeDoc" value="0" />';
  305. $form .= '<input type="hidden" name="doSave" value="0" />';
  306. $form .= '<input type="hidden" name="_serialNumber" value="'.md5(microtime()).'" />';
  307. $form .= '<input type="hidden" name="_disableRTE" value="'.$this->tceforms->disableRTE.'" />';
  308. $form .= '<input type="hidden" name="wkspId" value="' . htmlspecialchars($this->workspaceId) . '" />';
  309. $form = $this->tceforms->wrapTotal($form, $rec, $table);
  310. // Combine it all:
  311. $content .= $form;
  312. return $content;
  313. }
  314. /**
  315. * Creates a form for new workspace. Parts are adopted from <code>alt_doc.php</code>.
  316. *
  317. * @return string Generated form
  318. */
  319. function buildNewForm() {
  320. $content = '';
  321. $table = 'sys_workspace';
  322. $prevPageID = '';
  323. $trData = t3lib_div::makeInstance('t3lib_transferData');
  324. $trData->addRawData = TRUE;
  325. $trData->defVals = $this->defVals;
  326. $trData->lockRecords=1;
  327. $trData->disableRTE = $this->MOD_SETTINGS['disableRTE'];
  328. $trData->prevPageID = $prevPageID;
  329. $trData->fetchRecord($table, 0, 'new');
  330. reset($trData->regTableItems_data);
  331. $rec = current($trData->regTableItems_data);
  332. $rec['uid'] = uniqid('NEW');
  333. $rec['pid'] = 0;
  334. $rec['adminusers'] = $this->getOwnerUser($rec['uid']);
  335. // Setting variables in TCEforms object:
  336. $this->tceforms->hiddenFieldList = '';
  337. // Register default language labels, if any:
  338. $this->tceforms->registerDefaultLanguageData($table,$rec);
  339. $this->fixVariousTCAFields();
  340. if (!$GLOBALS['BE_USER']->isAdmin()) {
  341. // Non-admins cannot select users from the root. We "fix" it for them.
  342. $this->fixTCAUserField('adminusers');
  343. $this->fixTCAUserField('members');
  344. $this->fixTCAUserField('reviewers');
  345. }
  346. // Create form for the record (either specific list of fields or the whole record):
  347. $form = '';
  348. $form .= $this->doc->spacer(5);
  349. $form .= $this->tceforms->getMainFields($table,$rec);
  350. $form .= '<input type="hidden" name="workspace_form_submited" value="1" />';
  351. $form .= '<input type="hidden" name="data['.$table.']['.$rec['uid'].'][pid]" value="'.$rec['pid'].'" />';
  352. $form .= '<input type="hidden" name="returnUrl" value="index.php" />';
  353. $form .= '<input type="hidden" name="action" value="new" />';
  354. $form .= '<input type="hidden" name="closeDoc" value="0" />';
  355. $form .= '<input type="hidden" name="doSave" value="0" />';
  356. $form .= '<input type="hidden" name="_serialNumber" value="'.md5(microtime()).'" />';
  357. $form .= '<input type="hidden" name="_disableRTE" value="'.$this->tceforms->disableRTE.'" />';
  358. $form = $this->tceforms->wrapTotal($form, $rec, $table);
  359. // Combine it all:
  360. $content .= $form;
  361. return $content;
  362. }
  363. /**
  364. * 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>.
  365. *
  366. * @param string $uid UID of the record (as <code>NEW...</code>)
  367. * @return string User record formatted for TCEForms
  368. */
  369. function getOwnerUser($uid) {
  370. $loadDB = t3lib_div::makeInstance('t3lib_loadDBGroup');
  371. // Make sure that `sys_workspace` is in $TCA
  372. t3lib_div::loadTCA('sys_workspace');
  373. // shortcut to `config` of `adminusers` field -- shorter code and better PHP performance
  374. $config = &$GLOBALS['TCA']['sys_workspace']['columns']['adminusers']['config'];
  375. // Notice: $config['MM'] is not set in the current version of $TCA but
  376. // we still pass it to ensure compatibility with feature versions!
  377. $loadDB->start($GLOBALS['BE_USER']->user['uid'], $config['allowed'], $config['MM'], $uid, 'sys_workspace', $config);
  378. $loadDB->getFromDB();
  379. return $loadDB->readyForInterface();
  380. }
  381. /**
  382. * 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.
  383. *
  384. * @return void
  385. */
  386. function processData() {
  387. $tce = t3lib_div::makeInstance('t3lib_TCEmain');
  388. $tce->stripslashes_values = 0;
  389. $TCAdefaultOverride = $GLOBALS['BE_USER']->getTSConfigProp('TCAdefaults');
  390. if (is_array($TCAdefaultOverride)) {
  391. $tce->setDefaultsFromUserTS($TCAdefaultOverride);
  392. }
  393. $tce->stripslashes_values = 0;
  394. // 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.
  395. // 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.
  396. $inputData_tmp = t3lib_div::_GP('data');
  397. $inputData = array();
  398. if (is_array($inputData_tmp['sys_workspace'])) {
  399. reset($inputData_tmp['sys_workspace']);
  400. $inputData['sys_workspace'][key($inputData_tmp['sys_workspace'])] = current($inputData_tmp['sys_workspace']);
  401. }
  402. $tce->start($inputData, array(), $GLOBALS['BE_USER']);
  403. $tce->admin = 1; // Bypass table restrictions
  404. $tce->bypassWorkspaceRestrictions = true;
  405. $tce->process_datamap();
  406. // print error messages (if any)
  407. $script = t3lib_div::getIndpEnv('TYPO3_REQUEST_SCRIPT');
  408. $tce->printLogErrorMessages($script . '?' .
  409. ($this->isEditAction ? 'action=edit&wkspId=' . $this->workspaceId : 'action=new'));
  410. // If there was saved any new items, load them and update mode and workspace id
  411. if (count($tce->substNEWwithIDs_table)) {
  412. reset($tce->substNEWwithIDs_table); // not really necessary but better be safe...
  413. $this->workspaceId = current($tce->substNEWwithIDs);
  414. $this->isEditAction = true;
  415. }
  416. }
  417. /**
  418. * Fixes various <code>$TCA</code> fields for better visual representation of workspace editor.
  419. *
  420. * @return void
  421. */
  422. function fixVariousTCAFields() {
  423. // enable tabs
  424. $GLOBALS['TCA']['sys_workspace']['ctrl']['dividers2tabs'] = true;
  425. }
  426. /**
  427. * "Fixes" <code>$TCA</code> to enable blinding for users/groups for non-admin users only.
  428. *
  429. * @param string $fieldName Name of the field to change
  430. * @return void
  431. */
  432. function fixTCAUserField($fieldName) {
  433. // fix fields for non-admin
  434. if (!$GLOBALS['BE_USER']->isAdmin()) {
  435. // make a shortcut to field
  436. t3lib_div::loadTCA('sys_workspace');
  437. $field = &$GLOBALS['TCA']['sys_workspace']['columns'][$fieldName];
  438. $newField = array (
  439. 'label' => $field['label'],
  440. 'config' => Array (
  441. 'type' => 'select',
  442. 'itemsProcFunc' => 'user_SC_mod_user_ws_workspaceForms->processUserAndGroups',
  443. //'iconsInOptionTags' => true,
  444. 'size' => 10,
  445. 'maxitems' => $field['config']['maxitems'],
  446. 'autoSizeMax' => $field['config']['autoSizeMax'],
  447. 'mod_ws_allowed' => $field['config']['allowed'] // let us know what we can use in itemProcFunc
  448. )
  449. );
  450. $field = $newField;
  451. }
  452. }
  453. /**
  454. * Checks if use has editing access to the workspace.
  455. *
  456. * @return boolean Returns true if user can edit workspace
  457. */
  458. function checkWorkspaceAccess() {
  459. $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'));
  460. if (is_array($workspaces) && count($workspaces) != 0 && false !== ($rec = $GLOBALS['BE_USER']->checkWorkspace($workspaces[0]))) {
  461. return ($rec['_ACCESS'] == 'owner' || $rec['_ACCESS'] == 'admin');
  462. }
  463. return false;
  464. }
  465. }
  466. /**
  467. * This class contains Typo3 callback functions. Class name must start from <code>user_</code> thus we use a separate class.
  468. *
  469. */
  470. class user_SC_mod_user_ws_workspaceForms {
  471. /**
  472. * Callback function to blind user and group accounts. Used as <code>itemsProcFunc</code> in <code>$TCA</code>.
  473. *
  474. * @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>
  475. * @param object $tceforms <code>t3lib_div::TCEforms</code> object
  476. * @return void
  477. */
  478. function processUserAndGroups($conf, $tceforms) {
  479. // Get usernames and groupnames
  480. $be_group_Array = t3lib_BEfunc::getListGroupNames('title,uid');
  481. $groupArray = array_keys($be_group_Array);
  482. $be_user_Array = t3lib_BEfunc::getUserNames();
  483. $be_user_Array = t3lib_BEfunc::blindUserNames($be_user_Array,$groupArray,1);
  484. // users
  485. $title = $GLOBALS['LANG']->sL($GLOBALS['TCA']['be_users']['ctrl']['title']);
  486. foreach ($be_user_Array as $uid => $user) {
  487. $conf['items'][] = array(
  488. $user['username'] . ' (' . $title . ')',
  489. 'be_users_' . $user['uid'],
  490. t3lib_iconWorks::getIcon('be_users', $user)
  491. );
  492. }
  493. // Process groups only if necessary -- save time!
  494. if (strstr($conf['config']['mod_ws_allowed'], 'be_groups')) {
  495. // groups
  496. $be_group_Array = $be_group_Array_o = t3lib_BEfunc::getGroupNames();
  497. $be_group_Array = t3lib_BEfunc::blindGroupNames($be_group_Array_o,$groupArray,1);
  498. $title = $GLOBALS['LANG']->sL($GLOBALS['TCA']['be_groups']['ctrl']['title']);
  499. foreach ($be_group_Array as $uid => $group) {
  500. $conf['items'][] = array(
  501. $group['title'] . ' (' . $title . ')',
  502. 'be_groups_' . $group['uid'],
  503. t3lib_iconWorks::getIcon('be_groups', $user)
  504. );
  505. }
  506. }
  507. }
  508. }
  509. if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/mod/user/ws/workspaceforms.php']) {
  510. include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/mod/user/ws/workspaceforms.php']);
  511. }
  512. // Make instance:
  513. $SOBE = t3lib_div::makeInstance('SC_mod_user_ws_workspaceForms');
  514. $SOBE->init();
  515. $SOBE->main();
  516. $SOBE->printContent();
  517. ?>