[ Index ] |
|
Code source de eGroupWare 1.2.106-2 |
1 <?php 2 /**************************************************************************\ 3 * eGroupWare - TimeSheet - time tracking for ProjectManager * 4 * http://www.egroupware.org * 5 * Written and (c) 2005 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: index.php 20159 2005-12-19 04:23:14Z ralfbecker $ */ 14 15 $GLOBALS['egw_info'] = array( 16 'flags' => array( 17 'currentapp' => 'admin', 18 )); 19 include('../header.inc.php'); 20 21 require_once (EGW_INCLUDE_ROOT.'/timesheet/inc/class.botimesheet.inc.php'); 22 23 $bots =& new botimesheet(); 24 $so_sql =& new so_sql('timesheet',$bots->table_name); 25 26 // search timesheet which have a project-field identical to an exiting PM project, but no link to it 27 $rows = $so_sql->search(false,'ts_id,ts_project,ts_title','','pm_id,link_id','',false,'AND',false,array('link_id IS NULL'), 28 ' JOIN egw_pm_projects ON ts_project='.$so_sql->db->concat('pm_number',"': '",'pm_title'). 29 " LEFT JOIN egw_links ON (link_app1='timesheet' AND link_id1=ts_id AND link_app2='projectmanager' AND link_id2=pm_id". 30 " OR link_app1='projectmanager' AND link_id1=pm_id AND link_app2='timesheet' and link_id2=ts_id)"); 31 32 echo "<h1>Fixing links to ProjectManager lost by the bug in the links-class</h1>\n"; 33 34 if ($rows) 35 { 36 foreach($rows as $row) 37 { 38 if ($bots->link->link('timesheet',$row['ts_id'],'projectmanager',$row['pm_id'])) 39 { 40 echo "<p>relinked timesheet '$row[ts_title]' with project '$row[ts_project]'</p>\n"; 41 } 42 } 43 } 44 echo "<h3>".(is_array($rows) ? count($rows) : 0)." missing links found.</h3>\n";
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 |