Project

General

Profile

Bug #15401 » class.tx_sysaction.patch

Administrator Admin, 2006-01-13 02:36

View differences:

typo3/sysext/sys_action/class.tx_sysaction.php 2006-01-13 02:21:39.000000000 +0100
// Types of actions:
switch($actionRow["type"]) {
case 1:
case 1: // new BE user
$actionContent="";
$beRec = t3lib_BEfunc::getRecord("be_users",intval($actionRow["t1_copy_of_user"]));
if (is_array($beRec)) {
......
$newFlag=1;
}
// List of users...
$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'be_users', 'pid=0 AND cruser_id='.intval($this->BE_USER->user['uid']).' AND createdByAction='.intval($actionRow['uid']).t3lib_BEfunc::deleteClause('be_users'), '', 'username');
$lines = array();
......
$theCode.= $this->pObj->doc->section($LANG->getLL("action_error"),'<span class="typo3-red">'.$LANG->getLL("action_notReady").'</span>',0,1);
}
break;
case 2:
case 2: //SQL query
if (t3lib_extMgm::isLoaded("lowlevel")) {
$sql_query = unserialize($actionRow["t2_data"]);
if (is_array($sql_query) && strtoupper(substr(trim($sql_query["qSelect"]),0,6))=="SELECT") {
......
$theCode.= $this->pObj->doc->section($LANG->getLL("action_error"),'<span class="typo3-red">The extension "lowlevel" must be installed in order to create a quiry</span>',0,1);
}
break;
case 3:
Header("Location: ".t3lib_div::locationHeaderUrl($this->backPath."db_list.php?id=".intval($actionRow["t3_listPid"])."&table=".$actionRow["t3_tables"]));
exit;
case 3: //list records
return htmlspecialchars($this->headLInk('tx_taskcenterrootlist', 1)). '<br />'. $this->urlInIframe($this->backPath."db_list.php?id=".intval($actionRow["t3_listPid"])."&table=".$actionRow["t3_tables"],1);
break;
case 4:
case 4: //edit records
$dbAnalysis = t3lib_div::makeInstance("t3lib_loadDBGroup");
$dbAnalysis->fromTC=0;
$dbAnalysis->start($actionRow["t4_recordsToEdit"],"*");
......
$actionContent = '<table border=0 cellpadding=0 cellspacing=2>'.implode("",$lines).'</table>';
$theCode.= $this->pObj->doc->section($LANG->getLL("action_t4_edit"),$actionContent,0,1);
break;
case 5:
Header('Location: '.t3lib_div::locationHeaderUrl($this->backPath.'alt_doc.php?returnUrl='.rawurlencode('db_list.php?id='.intval($actionRow['t3_listPid']).'&table='.$actionRow['t3_tables']).'&edit['.$actionRow['t3_tables'].']['.intval($actionRow['t3_listPid']).']=new'));
exit;
case 5: //new record
return htmlspecialchars($this->headLInk('tx_taskcenterrootlist', 1)). '<br />'. $this->urlInIframe($this->backPath.'alt_doc.php?returnUrl='.rawurlencode('db_list.php?id='.intval($actionRow['t3_listPid']).'&table='.$actionRow['t3_tables']).'&edit['.$actionRow['t3_tables'].']['.intval($actionRow['t3_listPid']).']=new',1);
break;
default:
$theCode.= $this->pObj->doc->section($LANG->getLL("action_error"),'<span class="typo3-red">'.$LANG->getLL("action_noType").'</span>',0,1);
......
$wQ='';
if (intval($uid)>0) $wQ.=' AND sys_action.uid='.intval($uid);
$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'sys_action', 'sys_action.pid=0'.$wQ, '', 'sys_action.title');
$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'sys_action', 'sys_action.pid=0'.$wQ, '', 'sys_action.sorting');
} else {
$wQ = 'be_groups.uid IN ('.($this->BE_USER->groupList?$this->BE_USER->groupList:0).')';
$hQ = 'AND sys_action.hidden=0 ';
......
'be_groups',
' AND '.$wQ.' AND sys_action.pid=0 '.$hQ,
'sys_action.uid',
'sys_action.title'
'sys_action.sorting'
);
}
(1-1/3)