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
3995cf12
Commit
3995cf12
authored
Feb 28, 2012
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- CSV Import:
Added return_url logic for undefined return_url
parent
d433e0ea
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
1 deletion
+16
-1
intranet-csv-import-procs.tcl
tcl/intranet-csv-import-procs.tcl
+1
-1
import-2.tcl
www/import-2.tcl
+12
-0
import-im_project.tcl
www/import-im_project.tcl
+3
-0
No files found.
tcl/intranet-csv-import-procs.tcl
View file @
3995cf12
...
...
@@ -271,7 +271,7 @@ ad_proc -public im_csv_import_guess_parser {
# Date parsers
#
# Abort if there are not enough values
if
{[
llength
$sample
_values
]
> 1
}
{
if
{[
llength
$sample
_values
]
>
=
1
}
{
set date_european_p 1
set date_american_p 1
...
...
www/import-2.tcl
View file @
3995cf12
...
...
@@ -35,6 +35,18 @@ if { $max_n_bytes && ([file size $tmp_filename] > $max_n_bytes) } {
ad_script_abort
}
# Empty return_url?
# Choose depending on the object type...
if
{
""
==
$return
_url
}
{
switch
$object
_type
{
im_project
{
set return_url
"/intranet/projects/index"
}
im_company
{
set return_url
"/intranet/companies/index"
}
default
{
set return_url
"/intranet"
}
}
}
# strip off the C:\directories... crud and just get the file name
if
!
[
regexp
{([
^//
\\
]
+
)
$
}
$upload
_file match filename
]
{
# couldn't find a match
...
...
www/import-im_project.tcl
View file @
3995cf12
...
...
@@ -290,6 +290,9 @@ foreach csv_line_fields $values_list_of_lists {
if
{
""
==
$customer
_id
}
{
set customer_id
[
db_string cust
"select company_id from im_companies where lower(company_path) = trim(lower(:customer_name))"
-default
""
]
}
# For compatibility
set company_id
$customer
_id
if
{
""
==
$customer
_id
}
{
if
{
$ns
_write_p
}
{
ns_write
"<li><font color=red>Error: Didn't find customer for '
$customer
_name'.<br>
...
...
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