### Eclipse Workspace Patch 1.0
#P typo3_core_trunk
Index: typo3/sysext/lang/locallang_tca.xml
===================================================================
--- typo3/sysext/lang/locallang_tca.xml (revision 4439)
+++ typo3/sysext/lang/locallang_tca.xml (working copy)
@@ -79,6 +79,8 @@
+
+
Index: typo3/mod/user/ws/index.php
===================================================================
--- typo3/mod/user/ws/index.php (revision 4439)
+++ typo3/mod/user/ws/index.php (working copy)
@@ -737,7 +737,11 @@
// here only if obtaining mount points for custom workspaces
// Warning: all fields needed for t3lib_iconWorks::getIconImage()!
- $MPs = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*', 'pages', 'deleted=0 AND uid IN (' . $GLOBALS['TYPO3_DB']->cleanIntList($wksp['db_mountpoints']) . ')', '', 'title');
+ if($GLOBALS['BE_USER']->workspaceRec['use_user_db_mounts'] == 1) {
+ $MPs = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*', 'pages', 'deleted=0 AND uid IN (' . $GLOBALS['TYPO3_DB']->cleanIntList($GLOBALS['BE_USER']->groupData['webmounts']) . ')', '', 'title');
+ } else {
+ $MPs = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*', 'pages', 'deleted=0 AND uid IN (' . $GLOBALS['TYPO3_DB']->cleanIntList($wksp['db_mountpoints']) . ')', '', 'title');
+ }
$content_array = array();
if (count($MPs) > 0) {
$isAdmin = $GLOBALS['BE_USER']->isAdmin();
@@ -790,7 +794,12 @@
// Here if displaying information for custom workspace
// Warning: all fields needed for t3lib_iconWorks::getIconImage()!
- $MPs = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*', 'sys_filemounts', 'deleted=0 AND hidden=0 AND uid IN (' . $GLOBALS['TYPO3_DB']->cleanIntList($wksp['file_mountpoints']) . ')', '', 'title');
+ // Use the user/group mountpoints instead of workspace mountpoints if the checkbox in workspace configuration isset
+ if($GLOBALS['BE_USER']->workspaceRec['use_user_file_mounts'] == 1) {
+ $MPs = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*', 'sys_filemounts', 'deleted=0 AND hidden=0 AND uid IN (' . $GLOBALS['TYPO3_DB']->cleanIntList($GLOBALS['BE_USER']->dataLists['filemount_list']) . ')', '', 'title');
+ } else {
+ $MPs = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*', 'sys_filemounts', 'deleted=0 AND hidden=0 AND uid IN (' . $GLOBALS['TYPO3_DB']->cleanIntList($wksp['file_mountpoints']) . ')', '', 'title');
+ }
if (count($MPs) != 0) {
// Has mount points
$isAdmin = $GLOBALS['BE_USER']->isAdmin();
Index: t3lib/class.t3lib_userauthgroup.php
===================================================================
--- t3lib/class.t3lib_userauthgroup.php (revision 4439)
+++ t3lib/class.t3lib_userauthgroup.php (working copy)
@@ -1402,7 +1402,7 @@
$this->setWorkspace($this->user['workspace_id']);
// Setting up the db mount points of the (custom) workspace, if any:
- if ($this->workspace>0 && trim($this->workspaceRec['db_mountpoints'])!=='') {
+ if ($this->workspace>0 && trim($this->workspaceRec['db_mountpoints'])!=='' && ($this->workspaceRec['use_user_db_mounts']== 0)) {
// Initialize:
$newMounts = array();
@@ -1421,14 +1421,19 @@
}
// Setting up the file mount points of the (custom) workspace, if any:
- if ($this->workspace!==0) $this->groupData['filemounts'] = array();
- if ($this->workspace>0 && trim($this->workspaceRec['file_mountpoints'])!=='') {
+ if ($this->workspace!==0 && ($this->workspaceRec['use_user_file_mounts']== 0)) $this->groupData['filemounts'] = array();
+ if ($this->workspace>0 && trim($this->workspaceRec['file_mountpoints'])!=='' && ($this->workspaceRec['use_user_file_mounts']== 0)) {
// Processing filemounts
$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'sys_filemounts', 'deleted=0 AND hidden=0 AND pid=0 AND uid IN ('.$GLOBALS['TYPO3_DB']->cleanIntList($this->workspaceRec['file_mountpoints']).')');
while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
$this->addFileMount($row['title'], $row['path'], $row['path'], $row['base']?1:0, '');
}
+ } elseif($this->workspace>0 && trim($this->workspaceRec['file_mountpoints'])!=='' && ($this->workspaceRec['use_user_file_mounts']== 1)) {
+ // The configuration checkbox isset, so use the user/group filemounts to add
+ foreach ($this->groupData['filemounts'] as $key => $filemount) {
+ $this->addFileMount($filemount['name'], $filemount['path'], $filemount['path'], $filemount['type']?1:0, '');
+ }
}
}
Index: t3lib/stddb/tables.sql
===================================================================
--- t3lib/stddb/tables.sql (revision 4439)
+++ t3lib/stddb/tables.sql (working copy)
@@ -255,6 +255,8 @@
swap_modes tinyint(3) DEFAULT '0' NOT NULL,
publish_access tinyint(3) DEFAULT '0' NOT NULL,
stagechg_notification tinyint(3) DEFAULT '0' NOT NULL,
+ use_user_db_mounts tinyint(3) DEFAULT '0' NOT NULL,
+ use_user_file_mounts tinyint(3) DEFAULT '0' NOT NULL,
PRIMARY KEY (uid),
KEY parent (pid)
Index: t3lib/stddb/tbl_be.php
===================================================================
--- t3lib/stddb/tbl_be.php (revision 4439)
+++ t3lib/stddb/tbl_be.php (working copy)
@@ -891,11 +891,23 @@
),
)
),
+ 'use_user_db_mounts' => array (
+ 'label' => 'LLL:EXT:lang/locallang_tca.xml:sys_workspace.use_user_db_mounts',
+ 'config' => array (
+ 'type' => 'check',
+ )
+ ),
+ 'use_user_file_mounts' => array (
+ 'label' => 'LLL:EXT:lang/locallang_tca.xml:sys_workspace.use_user_file_mounts',
+ 'config' => array (
+ 'type' => 'check',
+ )
+ ),
),
'types' => array(
'0' => array('showitem' => 'title,description,
--div--;LLL:EXT:lang/locallang_tca.xml:sys_filemounts.tabs.users,adminusers,members,reviewers,stagechg_notification,
- --div--;LLL:EXT:lang/locallang_tca.xml:sys_filemounts.tabs.mountpoints,db_mountpoints,file_mountpoints,
+ --div--;LLL:EXT:lang/locallang_tca.xml:sys_filemounts.tabs.mountpoints,db_mountpoints,use_user_db_mounts,file_mountpoints,
--div--;LLL:EXT:lang/locallang_tca.xml:sys_filemounts.tabs.publishing,publish_time,unpublish_time,
--div--;LLL:EXT:lang/locallang_tca.xml:sys_filemounts.tabs.other,freeze,live_edit,review_stage_edit,disable_autocreate,swap_modes,vtypes,publish_access'
)
Index: typo3/sysext/lang/locallang_csh_sysws.xml
===================================================================
--- typo3/sysext/lang/locallang_csh_sysws.xml (revision 4439)
+++ typo3/sysext/lang/locallang_csh_sysws.xml (working copy)
@@ -23,10 +23,11 @@
"Notify all users on any change" : All users in workspace are notified regardless of change.
+
+
-
+ However, for specific projects this violation might be acceptable or necessary and therefore you can add a filemount. This will be forced upon any user in the workspace regardless of his filemounts inherited from his groups and user profile!
Index: typo3/sysext/beuser/mod/index.php
===================================================================
--- typo3/sysext/beuser/mod/index.php (revision 4439)
+++ typo3/sysext/beuser/mod/index.php (working copy)
@@ -1057,14 +1057,14 @@
}
// Add custom workspaces (selecting all, filtering by BE_USER check):
- $workspaces = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('uid,title,adminusers,members,reviewers,db_mountpoints','sys_workspace','pid=0'.t3lib_BEfunc::deleteClause('sys_workspace'),'','title');
+ $workspaces = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('uid,title,adminusers,members,reviewers,db_mountpoints,use_user_db_mounts','sys_workspace','pid=0'.t3lib_BEfunc::deleteClause('sys_workspace'),'','title');
if (count($workspaces)) {
foreach ($workspaces as $rec) {
if ($this->checkWorkspace($rec)) {
$options[$rec['uid']] = $rec['uid'].': '.$rec['title'];
// Check if all mount points are accessible, otherwise show error:
- if (trim($rec['db_mountpoints'])!=='') {
+ if (trim($rec['db_mountpoints'])!=='' && ($rec['use_user_db_mounts'] == 0)) {
$mountPoints = t3lib_div::intExplode(',',$this->workspaceRec['db_mountpoints'],1);
foreach ($mountPoints as $mpId) {
if (!$this->isInWebMount($mpId,'1=1')) {