From 6214011910e31c274c77896e49f63e0eaab9021e Mon Sep 17 00:00:00 2001 From: David Anderson Date: Sat, 23 Aug 2003 01:18:27 +0000 Subject: [PATCH] Make_fake_tables generates flat files of fake users for testing migrate_tables. Migrate tables has had a few bugs fixed. svn path=/trunk/boinc/; revision=2189 --- html/ops/make_fake_tables.php | 41 +++++++++++++++++++++++++++++++++++ html/ops/migrate_tables.php | 13 +++++++---- 2 files changed, 50 insertions(+), 4 deletions(-) create mode 100755 html/ops/make_fake_tables.php diff --git a/html/ops/make_fake_tables.php b/html/ops/make_fake_tables.php new file mode 100755 index 0000000000..90722a98b8 --- /dev/null +++ b/html/ops/make_fake_tables.php @@ -0,0 +1,41 @@ +#!/usr/local/bin/php + Team $i! |\n"; + fwrite($fd, $line); +} + +fclose($fd); +?> \ No newline at end of file diff --git a/html/ops/migrate_tables.php b/html/ops/migrate_tables.php index c7efdade08..0ecf49eb08 100755 --- a/html/ops/migrate_tables.php +++ b/html/ops/migrate_tables.php @@ -5,8 +5,13 @@ // isn't stored in the SETI@Home database. Should we just set them all to // the date of migration? -define('SETI_IMAGE_PATH', '/disks/kosh/a/inet_services/www/share/htdocs/SetiAtHome/images/user_profile/'); -//define('BOINC_IMAGE_PATH', '/disks/koloth/a/inet_services/www/share/projects/AstroPulse_Beta/html_user/user_profile/images/'); +//define('SETI_IMAGE_PATH', '/disks/kosh/a/inet_services/www/share/htdocs/SetiAtHome/images/user_profile/'); +//define('BOINC_IMAGE_PATH','/disks/koloth/a/inet_services/www/share/projects/AstroPulse_Beta/html_user/user_profile/images/'); + +// NOTE: These are only test values! The commented values above are closer +// to the real thing. + +define('SETI_IMAGE_PATH', '/disks/kodos/a/inet_services/boinc_www/share/projects/tah/html_ops/'); define('BOINC_IMAGE_PATH', '/disks/kodos/a/inet_services/boinc_www/share/projects/tah/html_user/user_profile/images/'); define('USER_FILE', 'test_user_flat'); @@ -305,8 +310,8 @@ function move_user_pic($img_name, $userid) { $ext = strrchr($img_name, "."); if ($ext == '.jpg' || $ext == '.jpeg') { - shell_exec("mv $filename " . BOINC_IMAGE_PATH . $userid . ".jpg"); - shell_exec("mv $filename_sm " . BOINC_IMAGE_PATH . "$userid . "_sm.jpg"); + shell_exec("cp $filename " . BOINC_IMAGE_PATH . $userid . ".jpg"); + shell_exec("cp $filename_sm " . BOINC_IMAGE_PATH . $userid . "_sm.jpg"); return true; } else if ($ext == '.png' || $ext == '.gif') { shell_exec("convert $filename jpg:" . BOINC_IMAGE_PATH . $userid . ".jpg");