|
TYPO3 API
SVNRelease
|
00001 <?php 00002 /*************************************************************** 00003 * Copyright notice 00004 * 00005 * (c) 2010-2011 Georg Ringer <typo3@ringerge.org> 00006 * All rights reserved 00007 * 00008 * This script is part of the TYPO3 project. The TYPO3 project is 00009 * free software; you can redistribute it and/or modify 00010 * it under the terms of the GNU General Public License as published by 00011 * the Free Software Foundation; either version 2 of the License, or 00012 * (at your option) any later version. 00013 * 00014 * The GNU General Public License can be found at 00015 * http://www.gnu.org/copyleft/gpl.html. 00016 * 00017 * This script is distributed in the hope that it will be useful, 00018 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00019 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00020 * GNU General Public License for more details. 00021 * 00022 * This copyright notice MUST APPEAR in all copies of the script! 00023 ***************************************************************/ 00024 00025 00026 /** 00027 * Status of tasks 00028 * 00029 * @author Georg Ringer <typo3@ringerge.org> 00030 * @package TYPO3 00031 * @subpackage taskcenter 00032 * 00033 */ 00034 class tx_taskcenter_status { 00035 00036 /** 00037 * Saves the section toggle state of tasks in the backend user's uc 00038 * 00039 * @param array array of parameters from the AJAX interface, currently unused 00040 * @param TYPO3AJAX object of type TYPO3AJAX 00041 * @return void 00042 */ 00043 public function saveCollapseState(array $params, TYPO3AJAX $ajaxObj) { 00044 // remove 'el_' in the beginning which is needed for the saveSortingState() 00045 $item = substr(htmlspecialchars(t3lib_div::_POST('item')), 3); 00046 $state = (bool)t3lib_div::_POST('state'); 00047 00048 $GLOBALS['BE_USER']->uc['taskcenter']['states'][$item] = $state; 00049 $GLOBALS['BE_USER']->writeUC(); 00050 } 00051 00052 00053 /** 00054 * Saves the sorting order of tasks in the backend user's uc 00055 * 00056 * @param array array of parameters from the AJAX interface, currently unused 00057 * @param TYPO3AJAX object of type TYPO3AJAX 00058 * @return void 00059 */ 00060 public function saveSortingState(array $params, TYPO3AJAX $ajaxObj) { 00061 $sort = array(); 00062 $items = explode('&', t3lib_div::_POST('data')); 00063 foreach($items as $item) { 00064 $sort[] = substr($item, 12); 00065 } 00066 00067 $GLOBALS['BE_USER']->uc['taskcenter']['sorting'] = serialize($sort); 00068 $GLOBALS['BE_USER']->writeUC(); 00069 } 00070 } 00071 00072 if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/taskcenter/classes/class.tx_taskcenter_status.php'])) { 00073 include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/taskcenter/classes/class.tx_taskcenter_status.php']); 00074 } 00075 00076 ?>
1.8.0