Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
intranet-csv-import
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
project-open
intranet-csv-import
Commits
608982db
Commit
608982db
authored
Oct 13, 2020
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Now inserting users_contact for contact information for
users where it didn't exist
parent
c24fa003
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
import-person.tcl
www/import-person.tcl
+7
-0
No files found.
www/import-person.tcl
View file @
608982db
...
@@ -424,6 +424,9 @@ foreach csv_line_fields $values_list_of_lists {
...
@@ -424,6 +424,9 @@ foreach csv_line_fields $values_list_of_lists {
if {
$user
_write_p && (
$overwrite
_existing_user_attributes_p ||
$new
_user_p)} {
if {
$user
_write_p && (
$overwrite
_existing_user_attributes_p ||
$new
_user_p)} {
if {
$ns
_write_p} { ns_write "
<li>Going to update the user's contact data
\n
" }
if {
$ns
_write_p} { ns_write "
<li>Going to update the user's contact data
\n
" }
set users_contact_exists_p
[
db_string ucont
"select count(*) from users_contact where user_id = :user_id"
]
if {!
$users
_contact_exists_p} { db_dml ins_ucont "
insert into users_contact
(
user_id
)
values
(
:user_id
)
" }
if {
[
catch
{
if {
[
catch
{
# Updating contact data
# Updating contact data
set sql
"
set sql
"
...
@@ -450,6 +453,10 @@ foreach csv_line_fields $values_list_of_lists {
...
@@ -450,6 +453,10 @@ foreach csv_line_fields $values_list_of_lists {
note = :note
note = :note
where user_id = :user_id
where user_id = :user_id
"
"
# ad_return_complaint 1 "<pre>$sql</pre><br>wa_line1=$wa_line1<br>wa_line2=$wa_line2<br>wa_city=$wa_city<br>home_phone=$home_phone<br>work_phone=$work_phone"
db_dml sql
$sql
db_dml sql
$sql
if
{
$ns
_write_p
}
{
ns_write
"<li>Going to update the user's employee data
\n
"
}
if
{
$ns
_write_p
}
{
ns_write
"<li>Going to update the user's employee data
\n
"
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment