Bug #24851 » 0017355_v2_core.patch
t3lib/class.t3lib_page.php (Arbeitskopie) | ||
---|---|---|
* @return boolean <code>true</code> if has access
|
||
*/
|
||
function checkWorkspaceAccess($wsid) {
|
||
if (!$GLOBALS['BE_USER']) {
|
||
if (!$GLOBALS['BE_USER'] || !t3lib_extMgm::isLoaded('workspaces')) {
|
||
return FALSE;
|
||
}
|
||
if (isset($this->workspaceCache[$wsid])) {
|
t3lib/class.t3lib_userauthgroup.php (Arbeitskopie) | ||
---|---|---|
return TRUE;
|
||
}
|
||
if ($this->workspace > 0) {
|
||
if ($this->workspace > 0 && t3lib_extMgm::isLoaded('workspaces')) {
|
||
$stat = $this->checkWorkspaceCurrent();
|
||
// Check if custom staging is activated
|
||
... | ... | |
$wsRec = array('uid' => $wsRec);
|
||
break;
|
||
default:
|
||
$wsRec = $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow(
|
||
$fields,
|
||
'sys_workspace',
|
||
'pid=0 AND uid=' . intval($wsRec) .
|
||
t3lib_BEfunc::deleteClause('sys_workspace'),
|
||
'',
|
||
'title'
|
||
);
|
||
if (t3lib_extMgm::isLoaded('workspaces')) {
|
||
$wsRec = $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow(
|
||
$fields,
|
||
'sys_workspace',
|
||
'pid=0 AND uid=' . intval($wsRec) .
|
||
t3lib_BEfunc::deleteClause('sys_workspace'),
|
||
'',
|
||
'title'
|
||
);
|
||
}
|
||
break;
|
||
}
|
||
}
|
||
... | ... | |
return 0;
|
||
} elseif ($this->checkWorkspace(-1)) { // Check offline
|
||
return -1;
|
||
} else { // Traverse custom workspaces:
|
||
} elseif (t3lib_extMgm::isLoaded('workspaces')) { // Traverse custom workspaces:
|
||
$workspaces = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('uid,title,adminusers,members,reviewers', 'sys_workspace', 'pid=0' . t3lib_BEfunc::deleteClause('sys_workspace'), '', 'title');
|
||
foreach ($workspaces as $rec) {
|
||
if ($this->checkWorkspace($rec)) {
|
typo3/alt_shortcut.php (Arbeitskopie) | ||
---|---|---|
}
|
||
// Add custom workspaces (selecting all, filtering by BE_USER check):
|
||
$workspaces = $TYPO3_DB->exec_SELECTgetRows('uid,title,adminusers,members,reviewers','sys_workspace','pid=0'.t3lib_BEfunc::deleteClause('sys_workspace'),'','title');
|
||
if (count($workspaces)) {
|
||
foreach ($workspaces as $rec) {
|
||
if ($BE_USER->checkWorkspace($rec)) {
|
||
$options[$rec['uid']] = $rec['uid'].': '.$rec['title'];
|
||
if (t3lib_extMgm::isLoaded('workspaces')) {
|
||
$workspaces = $TYPO3_DB->exec_SELECTgetRows('uid,title,adminusers,members,reviewers','sys_workspace','pid=0'.t3lib_BEfunc::deleteClause('sys_workspace'),'','title');
|
||
if (count($workspaces)) {
|
||
foreach ($workspaces as $rec) {
|
||
if ($BE_USER->checkWorkspace($rec)) {
|
||
$options[$rec['uid']] = $rec['uid'].': '.$rec['title'];
|
||
}
|
||
}
|
||
}
|
||
}
|
typo3/sysext/beuser/mod/index.php (Arbeitskopie) | ||
---|---|---|
}
|
||
// 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');
|
||
if (count($workspaces)) {
|
||
foreach ($workspaces as $rec) {
|
||
if ($this->checkWorkspace($rec)) {
|
||
$options[$rec['uid']] = $rec['uid'].': '.$rec['title'];
|
||
if (t3lib_extMgm::isLoaded('workspaces')) {
|
||
$workspaces = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('uid,title,adminusers,members,reviewers,db_mountpoints','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'])!=='') {
|
||
$mountPoints = t3lib_div::intExplode(',',$this->workspaceRec['db_mountpoints'],1);
|
||
foreach ($mountPoints as $mpId) {
|
||
if (!$this->isInWebMount($mpId,'1=1')) {
|
||
$options[$rec['uid']].= '<br> \- ' . $GLOBALS['LANG']->getLL('notAccessible', true) . ' ' . $mpId;
|
||
// Check if all mount points are accessible, otherwise show error:
|
||
if (trim($rec['db_mountpoints'])!=='') {
|
||
$mountPoints = t3lib_div::intExplode(',',$this->workspaceRec['db_mountpoints'],1);
|
||
foreach ($mountPoints as $mpId) {
|
||
if (!$this->isInWebMount($mpId,'1=1')) {
|
||
$options[$rec['uid']].= '<br> \- ' . $GLOBALS['LANG']->getLL('notAccessible', true) . ' ' . $mpId;
|
||
}
|
||
}
|
||
}
|
||
}
|
typo3/sysext/belog/mod/index.php (Arbeitskopie) | ||
---|---|---|
);
|
||
// Add custom workspaces (selecting all, filtering by BE_USER check):
|
||
$workspaces = $TYPO3_DB->exec_SELECTgetRows('uid,title','sys_workspace','pid=0'.t3lib_BEfunc::deleteClause('sys_workspace'),'','title');
|
||
if (count($workspaces)) {
|
||
foreach ($workspaces as $rec) {
|
||
$this->MOD_MENU['workspaces'][$rec['uid']] = $rec['uid'].': '.$rec['title'];
|
||
if (t3lib_extMgm::isLoaded('workspaces')) {
|
||
$workspaces = $TYPO3_DB->exec_SELECTgetRows('uid,title','sys_workspace','pid=0'.t3lib_BEfunc::deleteClause('sys_workspace'),'','title');
|
||
if (count($workspaces)) {
|
||
foreach ($workspaces as $rec) {
|
||
$this->MOD_MENU['workspaces'][$rec['uid']] = $rec['uid'].': '.$rec['title'];
|
||
}
|
||
}
|
||
}
|
||
typo3/sysext/lowlevel/class.tx_lowlevel_cleaner_core.php (Arbeitskopie) | ||
---|---|---|
var $performanceStatistics = array();
|
||
protected $workspaceIndex = array();
|
||
/**
|
||
* Constructor
|
||
*
|
||
... | ... | |
$pt = t3lib_div::milliseconds();$this->performanceStatistics['genTree()']='';
|
||
// Initialize:
|
||
$this->workspaceIndex = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('uid,title','sys_workspace','1=1'.t3lib_BEfunc::deleteClause('sys_workspace'),'','','','uid');
|
||
if (t3lib_extMgm::isLoaded('workspaces')) {
|
||
$this->workspaceIndex = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('uid,title','sys_workspace','1=1'.t3lib_BEfunc::deleteClause('sys_workspace'),'','','','uid');
|
||
}
|
||
$this->workspaceIndex[-1] = TRUE;
|
||
$this->workspaceIndex[0] = TRUE;
|
||
typo3/sysext/cms/tslib/class.tslib_fe.php (Arbeitskopie) | ||
---|---|---|
if ($returnTitle) {
|
||
if ($ws===-1) {
|
||
return 'Default Draft Workspace';
|
||
} else {
|
||
} elseif (t3lib_extMgm::isLoaded('workspaces')) {
|
||
$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('title', 'sys_workspace', 'uid='.intval($ws));
|
||
if ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
|
||
return $row['title'];
|