[ Index ] |
|
Code source de eGroupWare 1.2.106-2 |
1 <?php 2 /**************************************************************************\ 3 * eGroupWare - Admin - delete ACL records of deleted accounts * 4 * http://www.egroupware.org * 5 * Written and (c) 2004 by Ralf Becker <RalfBecker@outdoor-training.de> * 6 * -------------------------------------------- * 7 * This program is free software; you can redistribute it and/or modify it * 8 * under the terms of the GNU General Public License as published by the * 9 * Free Software Foundation; either version 2 of the License, or (at your * 10 * option) any later version. * 11 \**************************************************************************/ 12 13 /* $Id: check_acl.php 20295 2006-02-15 12:31:25Z $ */ 14 15 /** 16 * delete ACL records of deleted accounts (can be called only via the URL) 17 * 18 * ACL records of deleted accounts have very irritating effects on the ACL (specialy calendar) 19 * 20 * @package admin 21 * @author RalfBecker@outdoor-training.de 22 * @license GPL 23 */ 24 25 $GLOBALS['egw_info'] = array( 26 'flags' => array( 27 'currentapp' => 'admin', 28 )); 29 include('../header.inc.php'); 30 31 if (!$GLOBALS['egw_info']['user']['apps']['admin']) 32 { 33 echo '<p align="center">'.lang('Permission denied')."</p>\n"; 34 } 35 else 36 { 37 $deleted = 0; 38 if (($all_accounts = $GLOBALS['egw']->accounts->search(array('type'=>'both')))) 39 { 40 $all_accounts = array_keys($all_accounts); 41 $GLOBALS['egw']->db->query("DELETE FROM egw_acl WHERE acl_account NOT IN (".implode(',',$all_accounts).") OR acl_appname='phpgw_group' AND acl_location NOT IN ('".implode("','",$all_accounts)."')",__LINE__,__FILE__); 42 $deleted = $GLOBALS['egw']->db->affected_rows(); 43 } 44 echo '<p align="center">'.lang('%1 ACL records of not (longer) existing accounts deleted.',$deleted)."</p>\n"; 45 } 46 $GLOBALS['egw']->common->egw_footer(); 47 $GLOBALS['egw']->common->egw_exit();
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sun Feb 25 17:20:01 2007 | par Balluche grâce à PHPXref 0.7 |