| <?php |
| error_reporting(E_ALL); |
| ini_set('display_errors', 1); |
| |
| require_once("/localsite/eclipse.org-common/system/app.class.php"); |
| require_once("/localsite/eclipse.org-common/classes/friends/friend.class.php"); |
| require_once("/home/data/httpd/eclipse-php-classes/system/ldapconnection.class.php"); |
| |
| $App = new App(); |
| $Friend = new Friend(); |
| $LDAP = new LDAPConnection(); |
| //$result = $App->sql('select bugzilla_id from friends where bugzilla_id <> 0 and uid = ""', 'eclipse'); |
| //$result = $App->sql('select bugzilla_id from friends where bugzilla_id <> 0', 'eclipse'); |
| $result = $App->sql('select bugzilla_id from tshirts where bugzilla_id IS NOT NULL', 'eclipse'); |
| echo mysql_num_rows($result) . '<br />'; |
| |
| while ($myrow = mysql_fetch_assoc($result)) { |
| return; |
| $res = $App->sql('select login_name from profiles where userid = ' . $myrow['bugzilla_id'], 'bugzilla'); |
| $user = mysql_fetch_assoc($res); |
| $uid = $LDAP->getUIDFromMail($user['login_name']); |
| echo $myrow['bugzilla_id'] . " - $uid<br />"; |
| //$update = $App->sql('update friends set uid = "' . $uid . '" where bugzilla_id = ' . $myrow['bugzilla_id'], 'eclipse'); |
| $update = $App->sql('update tshirts set uid = "' . $uid . '" where bugzilla_id = ' . $myrow['bugzilla_id'], 'eclipse'); |
| } |
| |
| |
| ?> |