Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
intranet-invoices
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-invoices
Commits
aad0937e
Commit
aad0937e
authored
Nov 20, 2015
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Fixed ns_log NOTICE
parent
5b3f7efd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
intranet-invoices-procs.tcl
tcl/intranet-invoices-procs.tcl
+1
-1
view.tcl
www/view.tcl
+8
-8
No files found.
tcl/intranet-invoices-procs.tcl
View file @
aad0937e
...
...
@@ -152,7 +152,7 @@ ad_proc -public im_next_invoice_nr {
# Check for a custom project_nr generator
set invoice_nr_generator
[
parameter::get -package_id
[
im_package_invoices_id
]
-parameter
"CustomInvoiceNrGenerator"
-default
""
]
ns_log N
OTICE
"intranet-invoices-procs::im_next_invoice_nr: call invoice_nr_generator: cost_type_id
$cost
_type_id cost_center_id
$cost
_center_id date_format
$date
_format par_im_next_invoice_nr
$par
_im_next_invoice_nr"
ns_log N
otice
"intranet-invoices-procs::im_next_invoice_nr: call invoice_nr_generator: cost_type_id
$cost
_type_id cost_center_id
$cost
_center_id date_format
$date
_format par_im_next_invoice_nr
$par
_im_next_invoice_nr"
if
{
""
!=
$invoice
_nr_generator
}
{
if
{
""
==
$par
_im_next_invoice_nr
}
{
...
...
www/view.tcl
View file @
aad0937e
...
...
@@ -903,7 +903,7 @@ if { 0 == $item_list_type } {
# Insert a new XML table row into OpenOffice document
if
{
"odt"
==
$template
_type
}
{
ns_log N
OTICE
"intranet-invoices-www-view:: Now escaping vars for rows newly added. Row#
$ctr
"
ns_log N
otice
"intranet-invoices-www-view:: Now escaping vars for rows newly added. Row#
$ctr
"
set lines
[
split
$odt
_row_template_xml
\n
]
foreach line
$lines
{
set var_to_be_escaped
""
...
...
@@ -914,9 +914,9 @@ if { 0 == $item_list_type } {
if
{
""
!=
$var
_to_be_escaped
}
{
set value
[
eval
"set value
\"
$
$var
_to_be_escaped
\"
"
]
set value
[
string
map
{
\[
"
\\
[
"
\]
"
\\
]
"
}
$value
]
ns_log N
OTICE
"intranet-invoices-www-view:: Escape vars for rows added - Value:
$value
"
ns_log N
otice
"intranet-invoices-www-view:: Escape vars for rows added - Value:
$value
"
set cmd
"set
$var
_to_be_escaped {
[
encodeXmlValue
$value
]
}"
ns_log N
OTICE
"intranet-invoices-www-view:: Escape vars for rows added - cmd:
$cmd
"
ns_log N
otice
"intranet-invoices-www-view:: Escape vars for rows added - cmd:
$cmd
"
eval
$cmd
}
}
...
...
@@ -1607,26 +1607,26 @@ if {0 != $render_template_id || "" != $send_to_user_as} {
set odt_template_content
[
$root
asXML -indent 1
]
# Escaping other vars used, skip vars already escaped for multiple lines
ns_log N
OTICE
"intranet-invoices-www-view:: Now escaping all other vars used in template"
ns_log N
otice
"intranet-invoices-www-view:: Now escaping all other vars used in template"
set lines
[
split
$odt
_template_content
\n
]
foreach line
$lines
{
ns_log N
OTICE
"intranet-invoices-www-view:: Line:
$line
"
ns_log N
otice
"intranet-invoices-www-view:: Line:
$line
"
set var_to_be_escaped
""
regexp -nocase
{
@
(
.*?
)
@
}
$line
var_to_be_escaped
regsub -all
"@"
$var
_to_be_escaped
""
var_to_be_escaped
regsub -all
";noquote"
$var
_to_be_escaped
""
var_to_be_escaped
ns_log N
OTICE
"intranet-invoices-www-view:: var_to_be_escaped:
$var
_to_be_escaped"
ns_log N
otice
"intranet-invoices-www-view:: var_to_be_escaped:
$var
_to_be_escaped"
if
{
-1 ==
[
lsearch
$vars
_escaped
$var
_to_be_escaped
]
}
{
if
{
""
!=
$var
_to_be_escaped
}
{
if
{
[
info
exists
$var
_to_be_escaped
]
}
{
set value
[
eval
"set value
\"
$
$var
_to_be_escaped
\"
"
]
ns_log N
OTICE
"intranet-invoices-www-view:: Other vars - Value:
$value
"
ns_log N
otice
"intranet-invoices-www-view:: Other vars - Value:
$value
"
set cmd
"set
$var
_to_be_escaped
\"
[
encodeXmlValue
$value
]
\"
"
eval
$cmd
}
}
}
else
{
ns_log N
OTICE
"intranet-invoices-www-view:: Other vars: Skipping
$var
_to_be_escaped "
ns_log N
otice
"intranet-invoices-www-view:: Other vars: Skipping
$var
_to_be_escaped "
}
}
...
...
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