]> src.bluestatic.org Git - bugdar.git/blob - docs/update_bug_names.php
r1406: Moving the rest of the email body texts (from class_notification.php) to templates
[bugdar.git] / docs / update_bug_names.php
1 <?php
2
3 // SVN $Id$
4
5 chdir('./../');
6 require_once('./global.php');
7
8 $userlist = array();
9 $users = $db->query("SELECT userid, displayname FROM " . TABLE_PREFIX . "user");
10 while ($user = $db->fetch_array($users))
11 {
12 $userlist["$user[userid]"] = $user['displayname'];
13 }
14
15 $bugs = $db->query("SELECT * FROM " . TABLE_PREFIX . "bug");
16 while ($bug = $db->fetch_array($bugs))
17 {
18 $db->query("
19 UPDATE " . TABLE_PREFIX . "bug
20 SET username = '" . $db->escape_string($userlist["$bug[userid]"]) . "',
21 lastpostbyname = '" . $db->escape_string($userlist["$bug[lastpostby]"]) . "',
22 hiddenlastpostbyname = '" . $db->escape_string($userlist["$bug[hiddenlastpostby]"]) . "'
23 WHERE bugid = $bug[bugid]
24 ");
25 }
26
27 ?>