Commit f2c3e304 authored by Frank Bergmann's avatar Frank Bergmann

- Gustaf changes

parent df239dde
......@@ -35,10 +35,10 @@ ad_proc -public im_import_forum_topics { filename } {
set csv_version [lindex $csv_version_fields 1]
set csv_table [lindex $csv_version_fields 2]
set err_msg [im_backup_accepted_version_nr $csv_version]
if {![string equal $csv_system "po"]} {
if {$csv_system ne "po" } {
append err_msg "'$csv_system' invalid backup dump<br>"
}
if {![string equal $csv_table "im_forum_topics"]} {
if {$csv_table ne "im_forum_topics" } {
append err_msg "Invalid backup table: '$csv_table'<br>"
}
if {"" != $err_msg} {
......@@ -72,7 +72,7 @@ ad_proc -public im_import_forum_topics { filename } {
set var_value [string trim [lindex $csv_line_fields $j]]
# Skip empty columns caused by double quote separation
if {"" == $var_name || [string equal $var_name ";"]} {
if {"" == $var_name || $var_name eq ";"} {
continue
}
......
......@@ -78,9 +78,9 @@ ad_proc -public im_forum_notification_select {name {default ""}} {
set checked_major ""
set checked_all ""
set checked_none ""
if {[string equal $default "major"]} { set checked_major "checked" }
if {[string equal $default "all"]} { set checked_all "checked" }
if {[string equal $default "none"]} { set checked_none "checked" }
if {$default eq "major"} { set checked_major "checked" }
if {$default eq "all"} { set checked_all "checked" }
if {$default eq "none"} { set checked_none "checked" }
return "
<input type=radio name=$name value=major $checked_major>[lang::message::lookup "" intranet-forum.Important_Updates "Important Updates"]
......@@ -541,15 +541,15 @@ ad_proc -public im_forum_render_tind {
set ctr 1
set tind_html "
<tr $bgcolor([expr $ctr % 2])>
<tr $bgcolor([expr {$ctr % 2}])>
<td>[_ intranet-forum.Subject]:</td>
<td>
[im_gif -translate_p 1 $topic_type_id "$topic_type"]
$subject"
append tind_html " (<A href=/intranet-forum/new?parent_id=$topic_id&[export_vars -url {return_url}]>[_ intranet-forum.Reply]</A>)"
append tind_html " (<A href=/intranet-forum/new?parent_id=$topic_id&[export_vars {return_url}]>[_ intranet-forum.Reply]</A>)"
if {$object_admin || $user_id==$owner_id} {
append tind_html " (<A href=/intranet-forum/new?[export_vars -url {topic_id return_url}]>[_ intranet-forum.Edit]</A>)"
append tind_html " (<A href=/intranet-forum/[export_vars -base new {topic_id return_url}]>[_ intranet-forum.Edit]</A>)"
}
append tind_html "
......@@ -560,7 +560,7 @@ ad_proc -public im_forum_render_tind {
if {$topic_type_id != [im_topic_type_id_reply]} {
append tind_html "
<tr $bgcolor([expr $ctr % 2])>
<tr $bgcolor([expr {$ctr % 2}])>
<td>[_ intranet-forum.Posted_in]</td>
<td><A href=[im_biz_object_url $object_id]>$object_name</A></td>
</tr>\n"
......@@ -570,7 +570,7 @@ ad_proc -public im_forum_render_tind {
if {0 != $parent_id && "" != $parent_id} {
set parent_subject [db_string parent_subject "select subject from im_forum_topics where topic_id=:parent_id" -default ""]
append tind_html "
<tr $bgcolor([expr $ctr % 2])>
<tr $bgcolor([expr {$ctr % 2}])>
<td>[_ intranet-forum.Parent_posting]:</td>
<td><A href=/intranet-forum/view?topic_id=$parent_id>$parent_subject</A></td>
</tr>\n"
......@@ -579,7 +579,7 @@ ad_proc -public im_forum_render_tind {
append tind_html "
<tr $bgcolor([expr $ctr % 2])>
<tr $bgcolor([expr {$ctr % 2}])>
<td>[_ intranet-forum.Posted_by]:</td>
<td>[im_render_user_id $owner_id $owner_name "" 0]</td>
</tr>\n"
......@@ -595,7 +595,7 @@ ad_proc -public im_forum_render_tind {
append topic_status_msg " : <font color=red>[_ intranet-forum.lt_Please_Accept_or_Reje]</font>"
}
append tind_html "
<tr $bgcolor([expr $ctr % 2])>
<tr $bgcolor([expr {$ctr % 2}])>
<td>[_ intranet-forum.Status]:</td>
<td>$topic_status_msg</td>
</tr>\n"
......@@ -604,7 +604,7 @@ ad_proc -public im_forum_render_tind {
append tind_html "
<tr $bgcolor([expr $ctr % 2])>
<tr $bgcolor([expr {$ctr % 2}])>
<td>[_ intranet-forum.Posting_Date]:</td>
<td>$posting_date</td>
</tr>\n"
......@@ -613,7 +613,7 @@ ad_proc -public im_forum_render_tind {
# Only tasks and incidents have a priority, assignee and due date.
if {$task_or_incident_p} {
append tind_html "
<tr $bgcolor([expr $ctr % 2])>
<tr $bgcolor([expr {$ctr % 2}])>
<td>[_ intranet-forum.Priority]:</td>
<td>$priority</td>
</tr>\n"
......@@ -625,7 +625,7 @@ ad_proc -public im_forum_render_tind {
if {"" != $asignee_html} {
append tind_html "
<tr $bgcolor([expr $ctr % 2])>
<tr $bgcolor([expr {$ctr % 2}])>
<td>[_ intranet-forum.Assigned_to]:</td>
<td>\n"
if {"" == $asignee_name} {
......@@ -637,7 +637,7 @@ ad_proc -public im_forum_render_tind {
if {$object_admin || $user_id==$owner_id} {
# append tind_html " (<A href=/intranet-forum/assign?[export_vars -url {topic_id return_url}]>[_ intranet-forum.Assign]</A>)"
# append tind_html " (<A href=/intranet-forum/[export_vars -base assign {topic_id return_url}]>[_ intranet-forum.Assign]</A>)"
}
append tind_html "
......@@ -646,9 +646,9 @@ ad_proc -public im_forum_render_tind {
incr ctr
if {$due_date != ""} {
if {$due_date ne ""} {
append tind_html "
<tr $bgcolor([expr $ctr % 2])>
<tr $bgcolor([expr {$ctr % 2}])>
<td>[_ intranet-forum.Due_Date]:</td>
<td>$due_date</td>
</tr>\n"
......@@ -660,7 +660,7 @@ ad_proc -public im_forum_render_tind {
# (not necessary because it is governed by the thread parent)
if {$topic_type_id != [im_topic_type_id_reply]} {
append tind_html "
<tr $bgcolor([expr $ctr % 2])>
<tr $bgcolor([expr {$ctr % 2}])>
<td>[_ intranet-forum.Visible_for]</td>
<td>[im_forum_scope_html $scope]
</td>
......@@ -669,7 +669,7 @@ ad_proc -public im_forum_render_tind {
# Show whether the user has subscribed to updates
append tind_html "
<tr $bgcolor([expr $ctr % 2])>
<tr $bgcolor([expr {$ctr % 2}])>
<td>[_ intranet-forum.Receive_updates]</td>
<td>$receive_updates
</td>
......@@ -888,11 +888,11 @@ ad_proc -public im_forum_component {
set user_id [ad_conn user_id]
if {0 == $max_entries_per_page && [string equal "home" $forum_type]} {
if {0 == $max_entries_per_page && "home" eq $forum_type} {
set max_entries_per_page [im_parameter -package_id [im_package_forum_id] "ForumItemsPerHomePage" "" 10]
}
if {0 == $max_entries_per_page && [string equal "forum" $forum_type]} {
if {0 == $max_entries_per_page && "forum" eq $forum_type} {
set max_entries_per_page [im_parameter -package_id [im_package_forum_id] "ForumItemsPerForumPage" "" 50]
}
......@@ -901,7 +901,7 @@ ad_proc -public im_forum_component {
set max_entries_per_page [im_parameter -package_id [im_package_forum_id] ForumItemsPerPage "" 10]
}
set end_idx [expr $start_idx + $max_entries_per_page - 1]
set end_idx [expr {$start_idx + $max_entries_per_page - 1}]
set user_is_employee_p [im_user_is_employee_p $user_id]
set user_is_customer_p [im_user_is_customer_p $user_id]
......@@ -980,7 +980,7 @@ ad_proc -public im_forum_component {
} else {
set value [ns_set get $form_vars $var]
if {![string equal "" $value]} {
if {$value ne ""} {
ns_set put $bind_vars $var $value
if {$debug} { ns_log Notice "im_forum_component: $var <- $value" }
}
......@@ -996,7 +996,7 @@ ad_proc -public im_forum_component {
for {set i 0} {$i < $len} {incr i} {
set key [ns_set key $bind_vars $i]
set value [ns_set value $bind_vars $i]
if {![string equal $value ""]} {
if {$value ne "" } {
lappend params "$key=[ns_urlencode $value]"
}
}
......@@ -1007,7 +1007,7 @@ ad_proc -public im_forum_component {
# ---------------------- Format Header ----------------------------------
# Set up colspan to be the number of headers + 1 for the # column
set colspan [expr [llength $column_headers] + 1]
set colspan [expr {[llength $column_headers] + 1}]
# Format the header names with links that modify the
# sort order of the SQL query.
......@@ -1033,7 +1033,7 @@ ad_proc -public im_forum_component {
set col_tr [lang::message::lookup "" intranet-forum.[lang::util::suggest_key $cmd_eval] $cmd_eval]
}
if { [string compare $forum_order_by $cmd_eval] == 0 } {
if { $forum_order_by eq $cmd_eval } {
append table_header_html " <td class=rowtitle>$col_tr</td>\n"
} else {
append table_header_html " <td class=rowtitle>
......@@ -1113,7 +1113,7 @@ ad_proc -public im_forum_component {
if {0 != $forum_object_id} {
lappend restrictions "t.object_id=:forum_object_id"
}
if {[string equal "t" $restrict_to_mine_p]} {
if {"t" eq $restrict_to_mine_p} {
lappend restrictions "(owner_id=:user_id or asignee_id=:user_id)"
}
......@@ -1232,13 +1232,13 @@ ad_proc -public im_forum_component {
# sort inside the table on the page for only those rows in the query
# results
set limited_query [im_select_row_range $forum_sql $start_idx [expr $start_idx + $max_entries_per_page]]
set limited_query [im_select_row_range $forum_sql $start_idx [expr {$start_idx + $max_entries_per_page}]]
set total_in_limited_sql "select count(*) from ($forum_sql) f"
set total_in_limited [db_string total_limited $total_in_limited_sql]
set selection "select z.* from ($limited_query) z $order_by_clause_ext"
# How many items remain unseen?
set remaining_items [expr $total_in_limited - $start_idx - $max_entries_per_page]
set remaining_items [expr {$total_in_limited - $start_idx - $max_entries_per_page}]
if {$debug} { ns_log Notice "im_forum_component: total_in_limited=$total_in_limited, remaining_items=$remaining_items" }
# ---------------------- Format the body -------------------------------
......@@ -1263,7 +1263,7 @@ ad_proc -public im_forum_component {
} else {
set read [lang::message::lookup "" intranet-forum.Topic_unread "unread"]
}
if {$folder_id == ""} {set folder_name Inbox }
if {$folder_id eq ""} {set folder_name Inbox }
regsub -all " " $folder_name "_" folder_name_subs
set folder_name [lang::message::lookup "" intranet-forum.$folder_name_subs $folder_name]
......@@ -1277,7 +1277,7 @@ ad_proc -public im_forum_component {
set owner_initials [im_name_from_user_id $owner_id]
# insert intermediate headers for every project
if {[string equal "Project" $forum_order_by]} {
if {"Project" eq $forum_order_by} {
if {$old_object_id != $object_id} {
append table_body_html "
<tr><td colspan=$colspan>&nbsp;</td></tr>
......@@ -1290,7 +1290,7 @@ ad_proc -public im_forum_component {
}
}
append table_body_html "<tr$bgcolor([expr $ctr % 2])>\n"
append table_body_html "<tr$bgcolor([expr {$ctr % 2}])>\n"
foreach column_var $column_vars {
append table_body_html "\t<td valign=top>"
set cmd "append table_body_html $column_var"
......@@ -1305,19 +1305,19 @@ ad_proc -public im_forum_component {
}
}
# Show a reasonable message when there are no result rows:
if { [empty_string_p $table_body_html] } {
if { $table_body_html eq "" } {
set table_body_html "
<tr><td colspan=$colspan align=center><b>
[_ intranet-forum.lt_There_are_no_active_i]
</b></td></tr>"
}
if { $ctr == $max_entries_per_page && $end_idx < [expr $total_in_limited - 1] } {
if { $ctr == $max_entries_per_page && $end_idx < [expr {$total_in_limited - 1}] } {
# This means that there are rows that we decided not to return
# Include a link to go to the next page
set next_start_idx [expr $end_idx + 1]
set next_start_idx [expr {$end_idx + 1}]
set forum_max_entries_per_page $max_entries_per_page
set next_page_url "$current_page_url?[export_vars -url {forum_object_id forum_max_entries_per_page forum_order_by}]&forum_start_idx=$next_start_idx&$pass_through_vars_html"
set next_page_url "[export_vars -base $current_page_url {forum_object_id forum_max_entries_per_page forum_order_by}]&forum_start_idx=$next_start_idx&$pass_through_vars_html"
set next_page_html "($remaining_items more) <A href=\"$next_page_url\">&gt;&gt;</a>"
} else {
set next_page_html ""
......@@ -1326,7 +1326,7 @@ ad_proc -public im_forum_component {
if { $start_idx > 0 } {
# This means we didn't start with the first row - there is
# at least 1 previous row. add a previous page link
set previous_start_idx [expr $start_idx - $max_entries_per_page]
set previous_start_idx [expr {$start_idx - $max_entries_per_page}]
if { $previous_start_idx < 0 } { set previous_start_idx 0 }
set previous_page_html "<A href=$current_page_url?$pass_through_vars_html&forum_order_by=$forum_order_by&forum_start_idx=$previous_start_idx>&lt;&lt;</a>"
} else {
......@@ -1342,7 +1342,7 @@ ad_proc -public im_forum_component {
set previous_page_html ""
set ctr 0
}
# end else user_id != "0"
# end else user_id != 0
......@@ -1350,7 +1350,7 @@ ad_proc -public im_forum_component {
set table_footer "
<tr>
<td $bgcolor([expr $ctr % 2]) colspan=$colspan align=right>
<td $bgcolor([expr {$ctr % 2}]) colspan=$colspan align=right>
$previous_page_html
$next_page_html
<select name=action>
......@@ -1436,7 +1436,7 @@ ad_proc -public im_forum_full_screen_component {
t.topic_id = :topic_id
"
db_1row get_topic $topic_sql
if {$due_date == ""} { set due_date $todays_date }
if {$due_date eq ""} { set due_date $todays_date }
set old_asignee_id $asignee_id
......@@ -1461,12 +1461,12 @@ ad_proc -public im_forum_full_screen_component {
# Allow to mark task as "closed" only after accepted
# 061114 fraber: Not anymore - really a hassle
if {![string equal $topic_status_id [im_topic_status_id_closed]]} {
if {$topic_status_id ne [im_topic_status_id_closed] } {
append actions "<option value=close>[_ intranet-forum.Close_topic_type]</option>\n"
}
# Always allow to ask for clarification from owner if not already in clarify
if {![string equal $topic_status_id [im_topic_status_id_needs_clarify]] && ![string equal $topic_status_id [im_topic_status_id_closed]]} {
if {$topic_status_id ne [im_topic_status_id_needs_clarify] && $topic_status_id ne [im_topic_status_id_closed] } {
append actions "<option value=clarify>[_ intranet-forum.lt_topic_type_needs_clar]</option>\n"
}
}
......@@ -1483,14 +1483,14 @@ ad_proc -public im_forum_full_screen_component {
set assign_hidden "<input type=hidden name=asignee_id value=$asignee_id>"
}
# owner can also close topic
if {$user_id != $asignee_id && ![string equal $topic_status_id [im_topic_status_id_closed]]} {
if {$user_id != $asignee_id && $topic_status_id ne [im_topic_status_id_closed] } {
append actions "<option value=close>[_ intranet-forum.Close_topic_type]</option>\n"
}
}
if {!$read_only_p} {
append table_body "
<tr $bgcolor([expr $ctr % 2])>
<tr $bgcolor([expr {$ctr % 2}])>
<td>[_ intranet-forum.Actions]</td>
<td>
<select name=actions>
......@@ -1524,7 +1524,7 @@ ad_proc -public im_forum_full_screen_component {
# Forum Navigation Bar
# ----------------------------------------------------------------------
# <A HREF=/intranet-forum/index?[export_vars -url {object_id return_url}]>
# <A HREF=/intranet-forum/[export_vars -base index {object_id return_url}]>
ad_proc -public im_forum_create_bar { title_text object_id {return_url ""} } {
Returns rendered HTML table with icons for creating new
......@@ -1534,32 +1534,32 @@ ad_proc -public im_forum_create_bar { title_text object_id {return_url ""} } {
<table cellpadding=0 cellspacing=0 border=0 class='forumBar'>
<tr>
<td>
<A HREF=/intranet-forum/index?[export_vars -url {object_id return_url}]>
<A HREF=/intranet-forum/[export_vars -base index {object_id return_url}]>
$title_text
</A>
</td>
<td>
<A href='/intranet-forum/new?topic_type_id=1102&[export_vars -url {object_id return_url}]'>
<A href='/intranet-forum/new?topic_type_id=1102&[export_vars {object_id return_url}]'>
[im_gif -translate_p 1 "incident_add" "Create new Incident"]
</A>
</td>
<td>
<A href='/intranet-forum/new?topic_type_id=1104&[export_vars -url {object_id return_url}]'>
<A href='/intranet-forum/new?topic_type_id=1104&[export_vars {object_id return_url}]'>
[im_gif -translate_p 1 "task_add" "Create new Task"]
</A>
</td>
<td>
<A href='/intranet-forum/new?topic_type_id=1106&[export_vars -url {object_id return_url}]'>
<A href='/intranet-forum/new?topic_type_id=1106&[export_vars {object_id return_url}]'>
[im_gif -translate_p 1 "discussion_add" "Create a new Discussion"]
</A>
</td>
<td>
<A href='/intranet-forum/new?topic_type_id=1100&[export_vars -url {object_id return_url}]'>
<A href='/intranet-forum/new?topic_type_id=1100&[export_vars {object_id return_url}]'>
[im_gif -translate_p 1 "news_add" "Create new News Item"]
</A>
</td>
<td>
<A href='/intranet-forum/new?topic_type_id=1108&[export_vars -url {object_id return_url}]'>
<A href='/intranet-forum/new?topic_type_id=1108&[export_vars {object_id return_url}]'>
[im_gif -translate_p 1 "note_add" "Create new Note"]
</A>
</td>
......
......@@ -3,7 +3,7 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<master src="../../intranet-core/www/master">
<property name="title"></property>
<property name="doc(title)"></property>
<property name="context"></property>
<property name="main_navbar_label">forum</property>
......
......@@ -18,7 +18,7 @@ ad_page_contract {
# Default
# ------------------------------------------------------------------
set user_id [ad_maybe_redirect_for_registration]
set user_id [auth::require_login]
set bgcolor(0) " class=roweven"
set bgcolor(1) " class=rowodd"
......@@ -104,7 +104,7 @@ set asignee_list [im_forum_potential_asignees $user_id $object_id]
# Build a select box to let the user chose
append table_body "
<tr $bgcolor([expr $ctr % 2])>
<tr $bgcolor([expr {$ctr % 2}])>
<td>[_ intranet-forum.Assign_to]:</td>
<td>
[im_select -translate_p 0 asignee_id $asignee_list $asignee_id]
......@@ -113,7 +113,7 @@ append table_body "
incr ctr
append table_body "
<tr $bgcolor([expr $ctr % 2])>
<tr $bgcolor([expr {$ctr % 2}])>
<td></td>
<td>
<input type=submit value=\"[_ intranet-forum.Assign]\">
......
......@@ -21,10 +21,10 @@ ad_page_contract {
{return_url ""}
}
set user_id [ad_maybe_redirect_for_registration]
set user_id [auth::require_login]
set page_body "<PRE>\n"
if {$return_url == ""} {
if {$return_url eq ""} {
set return_url "/intranet-forum/"
}
......
......@@ -2,10 +2,10 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<master src="../../intranet-core/www/master">
<property name="title">@page_title@</property>
<property name="context">@context_bar@</property>
<property name="doc(title)">@page_title;literal@</property>
<property name="context">@context_bar;literal@</property>
<property name="main_navbar_label">forum</property>
<property name="sub_navbar">@sub_navbar;noquote@</property>
<property name="left_navbar">@left_navbar_html;noquote@</property>
<property name="sub_navbar">@sub_navbar;literal@</property>
<property name="left_navbar">@left_navbar_html;literal@</property>
<%= [im_table_with_title "Forum" $forum_content] %>
......@@ -43,7 +43,7 @@ ad_page_contract {
# ---------------------------------------------------------------
# User id already verified by filters
set user_id [ad_maybe_redirect_for_registration]
set user_id [auth::require_login]
set current_user_id $user_id
set view_types [list "t" [lang::message::lookup "" intranet-core.Object_Mine "Mine"] "f" [lang::message::lookup "" intranet-core.Object_All "All"]]
set page_title "[_ intranet-forum.Forum]"
......@@ -54,13 +54,13 @@ set user_admin_p [im_is_user_site_wide_or_intranet_admin $current_user_id]
set return_url [im_url_with_query]
set current_url [ns_conn url]
if { [empty_string_p $forum_how_many] || $forum_how_many < 1 } {
if { $forum_how_many eq "" || $forum_how_many < 1 } {
set forum_how_many [im_parameter -package_id [im_package_core_id] NumberResultsPerPage "" 50]
}
set end_idx [expr $forum_start_idx + $forum_how_many - 1]
set end_idx [expr {$forum_start_idx + $forum_how_many - 1}]
if {[string equal $forum_view_name "forum_list_tasks"]} {
if {$forum_view_name eq "forum_list_tasks"} {
set forum_view_name "forum_list_forum"
# Preselect "Tasks & Incidents"
set forum_topic_type_id 1
......
<!-- packages/intranet-forum/www/new-2.adp -->
<master src="../../intranet-core/www/master">
<property name="title">@page_title@</property>
<property name="context">@context_bar@</property>
<property name="doc(title)">@page_title;literal@</property>
<property name="context">@context_bar;literal@</property>
<property name="main_navbar_label">forum</property>
......@@ -37,15 +37,15 @@
<a href="/intranet/users/view?user_id=@stakeholders.user_id@">@stakeholders.name@</a>
</td>
<td class="list-narrow">
<input type=checkbox name=notifyee_id value="@stakeholders.user_id@" id="alerts,@user_id@" @stakeholders.checked@>
<input type="checkbox" name="notifyee_id" value="@stakeholders.user_id@" id="alerts,@user_id@" @stakeholders.checked@>
</td>
</tr>
</multiple>
<tr>
<td colspan=3 align=right>
<input type=submit value="<%= [lang::message::lookup "" intranet-forum.Send_Email "Send Email"] %>">
<input type=submit value="<%= [lang::message::lookup "" intranet-forum.Cancel "Cancel"] %>" name="cancel">
<td colspan="3" align="right">
<input type="submit" value="<%= [lang::message::lookup "" intranet-forum.Send_Email "Send Email"] %>">
<input type="submit" value="<%= [lang::message::lookup "" intranet-forum.Cancel "Cancel"] %>" name="cancel">
</td>
</tr>
</table>
......
......@@ -41,7 +41,7 @@ ad_page_contract {
# Security, Parameters & Default
# ------------------------------------------------------------------
set user_id [ad_maybe_redirect_for_registration]
set user_id [auth::require_login]
set topic_type [db_string topic_type "select im_category_from_id(:topic_type_id)" -default ""]
set object_type [db_string acs_object_type "select object_type from acs_objects where object_id = :object_id" -default ""]
......@@ -106,9 +106,9 @@ if {!$forum_folder_count} {
# ---------------------------------------------------------------------
# Forward to create a new reply topic...
if {[string equal $actions "reply"]} {
if {$actions eq "reply"} {
set parent_id $topic_id
ad_returnredirect "/intranet-forum/new?[export_vars -url {parent_id return_url}]"
ad_returnredirect [export_vars -base /intranet-forum/new {parent_id return_url}]
return
}
......@@ -118,8 +118,8 @@ if {[string equal $actions "reply"]} {
# ---------------------------------------------------------------------
# Forward to "new"
if {[string equal $actions "edit"]} {
ad_returnredirect "/intranet-forum/new?&[export_vars -url {topic_id return_url}]"
if {$actions eq "edit"} {
ad_returnredirect "/intranet-forum/new?&[export_vars {topic_id return_url}]"
return
}
......@@ -127,7 +127,7 @@ if {[string equal $actions "edit"]} {
# Save the im_forum_topics record
# ------------------------------------------------------------------
if {[string equal $actions "save"]} {
if {$actions eq "save"} {
# expect commands such as: "im_project_permissions" ...
#
......@@ -146,7 +146,7 @@ if {[string equal $actions "save"]} {
}
}
if { ![info exists subject] || $subject == "" } {
if { ![info exists subject] || $subject eq "" } {
ad_return_complaint 1 "<li>You must enter a subject line"
return
}
......@@ -254,7 +254,7 @@ if {[string equal $actions "save"]} {
# Only if we are creating a new message...
ns_log Notice "/intranet-forum/new-2: action_type=$action_type"
if {[string equal $action_type "new_message"]} {
if {$action_type eq "new_message"} {
# .. and only if the parameter is enabled...
if {[im_parameter -package_id [im_package_forum_id] SubscribeAllMembersToNewItemsP "" "0"]} {
......@@ -344,7 +344,7 @@ if {[string equal $action_type "new_message"]} {
# Assign the ticket to a new user
# ---------------------------------------------------------------------
if {[string equal $actions "assign"]} {
if {$actions eq "assign"} {
set topic_status_id [im_topic_status_id_assigned]
......@@ -368,7 +368,7 @@ where topic_id=:topic_id"
# Close the ticket
# ---------------------------------------------------------------------
if {[string equal $actions "close"]} {
if {$actions eq "close"} {
# ToDo: Security Check
# Close the existing ticket.
......@@ -389,7 +389,7 @@ where topic_id=:topic_id"
# "Clarify" the ticket
# ---------------------------------------------------------------------
if {[string equal $actions "clarify"]} {
if {$actions eq "clarify"} {
# ToDo: Security Check
# Close the existing ticket.
......@@ -410,7 +410,7 @@ where topic_id=:topic_id"
# Reject the ticket
# ---------------------------------------------------------------------
if {[string equal $actions "reject"]} {
if {$actions eq "reject"} {
# ToDo: Security Check
# Mark ticket as rejected
......@@ -432,7 +432,7 @@ where topic_id=:topic_id"
# Accept the ticket
# ---------------------------------------------------------------------
if {[string equal $actions "accept"]} {
if {$actions eq "accept"} {
# ToDo: Security Check
# Set the status to "accepted"
......
......@@ -3,8 +3,8 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<master src="../../intranet-core/www/master">
<property name="title">@page_title@</property>
<property name="context">@context_bar@</property>
<property name="doc(title)">@page_title;literal@</property>
<property name="context">@context_bar;literal@</property>
<property name="main_navbar_label">forum</property>
@page_body;noquote@
\ No newline at end of file
......@@ -31,7 +31,7 @@ ad_page_contract {
# Security, Parameters & Default
# ------------------------------------------------------------------
set user_id [ad_maybe_redirect_for_registration]
set user_id [auth::require_login]
set user_is_employee_p [im_user_is_employee_p $user_id]
set user_is_customer_p [im_user_is_customer_p $user_id]
......@@ -174,7 +174,7 @@ db_foreach update_stakeholders $stakeholder_sql {
-subject $subject \
-body "$msg_url\n\n$message"
} errmsg]} {
# ad_return_error $subject "<p>Error sending out mail:</p><div><code>[ad_quotehtml $errmsg]</code></div>"
# ad_return_error $subject "<p>Error sending out mail:</p><div><code>[ns_quotehtml $errmsg]</code></div>"
# ad_script_abort
}
}
......
<master src="../../intranet-core/www/master">
<property name="title">@title@</property>
<property name="doc(title)">@title;literal@</property>
<H1>#intranet-forum.Incident_Received#</H1>
......@@ -8,14 +8,14 @@
</p>
<table border=0 cellspacing=1 cellpadding=1>
<tr valign=top>
<td valign=top>
<table border="0" cellspacing="1" cellpadding="1">
<tr valign="top">
<td valign="top">
<table border=0 cellspacing=2 cellpadding=2 width="100%">
<table border="0" cellspacing="2" cellpadding="2" width="100%">
<tr class=rowtitle>
<td class=rowtitle align=center colspan=2>
<td class=rowtitle align="center" colspan="2">
#intranet-forum.Incident_Information#
</td>
</tr>
......@@ -55,16 +55,16 @@ to check the status of your issue requests.
</td></tr>
<tr>
<td valign=top>
<td valign="top">
<table border=0 cellspacing=2 cellpadding=2 width="100%">
<table border="0" cellspacing="2" cellpadding="2" width="100%">
<tr class=rowtitle>
<td class=rowtitle align=center colspan=2>
<td class=rowtitle align="center" colspan="2">
#acs-kernel.common_Login#
</td>
</tr>
<tr>
<td colspan=2>
<td colspan="2">
<include src="/packages/acs-subsite/lib/login" return_url="@return_url;noquote@" no_frame_p="1" authority_id="@authority_id@" username="@username;noquote@" email="@error_user_email;noquote@" &="__adp_properties">
</td>
</tr>
......@@ -82,9 +82,9 @@ Please use the navigation tabs above to explore the system.
<if @resolved_p@>
<table border=0 cellspacing=1 cellpadding=1>
<table border="0" cellspacing="1" cellpadding="1">
<tr class=rowtitle>
<td class=rowtitle align=center colspan=2>
<td class=rowtitle align="center" colspan="2">
Bug Resolution
</td>
</tr>
......
......@@ -194,7 +194,7 @@ set error_url_parts [split $error_url "/"]
set error_package [lindex $error_url_parts 1]
# The one and only exception: intranet-core is mounted on /intranet/:
if {$error_package == "intranet"} { set error_package "intranet-core" }
if {$error_package eq "intranet"} { set error_package "intranet-core" }
# Check for strange names and set to "core"
if {![regexp {^[a-z0-9\-]+$} $error_package match]} { set error_package "intranet-core" }
......
......@@ -3,15 +3,15 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<master src="../../intranet-core/www/master">
<property name="title">@page_title@</property>
<property name="context">@context_bar@</property>
<property name="doc(title)">@page_title;literal@</property>
<property name="context">@context_bar;literal@</property>
<property name="main_navbar_label">forum</property>
<form action=new-2 method=POST>
<%= [export_vars -form $export_var_list] %>
<table cellspacing=1 border=0 cellpadding=1>
<table cellspacing="1" border="0" cellpadding="1">
@table_body;noquote@
</table>
</form>
......
......@@ -36,7 +36,7 @@ ad_page_contract {
# Default
# ------------------------------------------------------------------
set user_id [ad_maybe_redirect_for_registration]
set user_id [auth::require_login]
set object_name ""
set todays_date [lindex [split [ns_localsqltimestamp] " "] 0]
......@@ -209,7 +209,7 @@ where
"
db_1row get_topic $topic_sql
if {$due_date == ""} { set due_date $todays_date }
if {$due_date eq ""} { set due_date $todays_date }
set submit_action "[_ intranet-forum.Save_Changes]"
set page_title "[_ intranet-forum.Edit_Topic]"
set context_bar [im_context_bar [list /intranet-forum/ "[_ intranet-forum.Forum]"] $page_title]
......@@ -257,7 +257,7 @@ set export_var_list [list owner_id old_asignee_id parent_id topic_id return_url
if {!$topic_type_id} {
append table_body "
<tr $bgcolor([expr $ctr % 2])>
<tr $bgcolor([expr {$ctr % 2}])>
<td>[_ intranet-forum.Topic_Type]</td>
<td>
[im_forum_topic_type_select topic_type_id]
......@@ -266,7 +266,7 @@ if {!$topic_type_id} {
} else {
lappend export_var_list "topic_type_id"
append table_body "
<tr $bgcolor([expr $ctr % 2])>
<tr $bgcolor([expr {$ctr % 2}])>
<td>[_ intranet-forum.Topic_Type]</td>
<td valign=center>
[im_gif -translate_p 0 $topic_type_id "$topic_type"]
......@@ -283,7 +283,7 @@ incr ctr
# and for the owner (to make changes to his text).
#
append table_body "
<tr $bgcolor([expr $ctr % 2])>
<tr $bgcolor([expr {$ctr % 2}])>
<td>[_ intranet-forum.topic_type_Subject]</td>
<td>
<input type=text size=50 name=subject value=\"$subject\">
......@@ -300,14 +300,14 @@ incr ctr
if {$object_id == 0} {
append table_body "
<tr $bgcolor([expr $ctr % 2])>
<tr $bgcolor([expr {$ctr % 2}])>
<td>[_ intranet-forum.In_Project]</td>
<td>[im_project_select -exclude_subprojects_p 0 object_id $object_id]</td>
</tr>\n"
incr ctr
} else {
append table_body "
<tr $bgcolor([expr $ctr % 2])>
<tr $bgcolor([expr {$ctr % 2}])>
<td>[_ intranet-forum.Posted_in]</td>
<td><A href=[im_biz_object_url $object_id]>$object_name</td>
</tr>\n"
......@@ -322,7 +322,7 @@ if {$object_id == 0} {
if {$task_or_incident_p} {
append table_body "
<tr $bgcolor([expr $ctr % 2])>
<tr $bgcolor([expr {$ctr % 2}])>
<td>[_ intranet-forum.Priority]</td>
<td>
<select name=priority>
......@@ -357,7 +357,7 @@ if {$task_or_incident_p} {
lappend export_var_list "asignee_id"
append table_body "
<tr $bgcolor([expr $ctr % 2])>
<tr $bgcolor([expr {$ctr % 2}])>
<td>[_ intranet-forum.Assign_to]</td>
<td>[lindex $asignee_list 1]</td>
</tr>\n"
......@@ -366,7 +366,7 @@ if {$task_or_incident_p} {
} else {
# Build a select box to let the user chose
append table_body "
<tr $bgcolor([expr $ctr % 2])>
<tr $bgcolor([expr {$ctr % 2}])>
<td>[_ intranet-forum.Assign_to]</td>
<td>
[im_select -translate_p 0 asignee_id $asignee_list $asignee_id]
......@@ -383,7 +383,7 @@ if {$task_or_incident_p} {
if {$task_or_incident_p} {
append table_body "
<tr $bgcolor([expr $ctr % 2])>
<tr $bgcolor([expr {$ctr % 2}])>
<td>[_ intranet-forum.Due_Date]</td>
<td>[philg_dateentrywidget due_date $due_date]</td>
</tr>\n"
......@@ -398,7 +398,7 @@ if {$task_or_incident_p} {
# In general, status changes are introduced by action buttons,
# so we don't show a status select box here.
if {[string equal $action_type "new_message"]} {
if {$action_type eq "new_message"} {
if {$task_or_incident_p} {
# A new taks/incident is in status "Assigned"
set topic_status_id [im_topic_status_id_assigned]
......@@ -415,7 +415,7 @@ if {[string equal $action_type "new_message"]} {
set html_p "f"
append table_body "
<tr $bgcolor([expr $ctr % 2])>
<tr $bgcolor([expr {$ctr % 2}])>
<td>$topic_type [_ intranet-forum.Body]</td>
<td>
<textarea name=message rows=15 cols=90 wrap=[im_html_textarea_wrap]>$message</textarea>
......@@ -434,7 +434,7 @@ if {$topic_type_id != [im_topic_type_id_reply]} {
if {$object_admin || $user_id == $owner_id} {
append table_body "
<tr $bgcolor([expr $ctr % 2])>
<tr $bgcolor([expr {$ctr % 2}])>
<td>[_ intranet-forum.Access_permissions]</td>
<td>
[im_forum_scope_select "scope" $user_id $scope]
......@@ -443,7 +443,7 @@ if {$topic_type_id != [im_topic_type_id_reply]} {
incr ctr
} else {
append table_body "
<tr $bgcolor([expr $ctr % 2])>
<tr $bgcolor([expr {$ctr % 2}])>
<td>[_ intranet-forum.Access_permissions]</td>
<td>[im_forum_scope_html $scope]
</td>
......@@ -457,7 +457,7 @@ if {$topic_type_id != [im_topic_type_id_reply]} {
if {$topic_type_id != [im_topic_type_id_reply]} {
append table_body "
<tr $bgcolor([expr $ctr % 2])>
<tr $bgcolor([expr {$ctr % 2}])>
<td>[_ intranet-forum.lt_Do_you_want_to_receiv]</td>
<td>[im_forum_notification_select "receive_updates" $receive_updates]</td>
</tr>"
......@@ -483,7 +483,7 @@ set actions ""
append actions "<option value=save selected>$submit_action</option>\n"
append table_body "
<tr $bgcolor([expr $ctr % 2])>
<tr $bgcolor([expr {$ctr % 2}])>
<td>[_ intranet-forum.Actions]</td>
<td>
<select name=actions>
......
<!-- This page goes into /packages/apm-tcl/lib/page-error.adp -->
<master>
<property name="title"><Server Error></property>
<property name="doc(title)"><Server Error></property>
<p>
......@@ -19,21 +19,21 @@
<form action="@report_url;noquote@" method=POST>
<input type=hidden name=error_url value=@error_url@>
<input type=hidden name=error_location value=@error_location@>
<input type=hidden name=system_url value=@system_url@>
<input type=hidden name=error_first_names value=@first_names;noquote@>
<input type=hidden name=error_last_name value=@last_name;noquote@>
<input type=hidden name=error_user_email value=@email;noquote@>
<input type=hidden name=package_versions value="@package_versions;noquote@">
<input type=hidden name=publisher_name value="@publisher_name;noquote@">
<input type="hidden" name="error_url" value="@error_url@">
<input type="hidden" name="error_location" value="@error_location@">
<input type="hidden" name="system_url" value="@system_url@">
<input type="hidden" name="error_first_names" value="@first_names;noquote@">
<input type="hidden" name="error_last_name" value="@last_name;noquote@">
<input type="hidden" name="error_user_email" value="@email;noquote@">
<input type="hidden" name="package_versions" value="@package_versions;noquote@">
<input type="hidden" name="publisher_name" value="@publisher_name;noquote@">
<if @message@ not nil>
<input type=hidden name=error_message value="@message;noquote@">
<input type="hidden" name="error_message" value="@message;noquote@">
</if>
<if @stacktrace@ not nil>
<input type=hidden name=error_info value="@stacktrace@">
<input type="hidden" name="error_info" value="@stacktrace@">
</if>
<input type=submit name=submit value="Report this Error">
<input type="submit" name="submit" value="Report this Error">
</form>
<if @message@ not nil>
......
......@@ -3,7 +3,7 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<master src="../../intranet-core/www/master">
<property name="title">@page_title@</property>
<property name="context">@context_bar@</property>
<property name="doc(title)">@page_title;literal@</property>
<property name="context">@context_bar;literal@</property>
<property name="main_navbar_label">forum</property>
@page_body;noquote@
\ No newline at end of file
......@@ -35,7 +35,7 @@ ad_page_contract {
# ------------------------------------------------------------------
set user_id [ad_maybe_redirect_for_registration]
set user_id [auth::require_login]
set object_name ""
set todays_date [lindex [split [ns_localsqltimestamp] " "] 0]
......@@ -88,7 +88,7 @@ if {![info exists topic_id]} {
"]"
}
if {$due_date == ""} { set due_date $todays_date }
if {$due_date eq ""} { set due_date $todays_date }
set old_asignee_id $asignee_id
set page_title "[_ intranet-forum.View_Topic]"
set context_bar [im_context_bar [list /intranet-forum/ "[_ intranet-forum.Forum]"] $page_title]
......@@ -175,12 +175,12 @@ if {$task_or_incident_p && $user_id == $asignee_id} {
# Allow to mark task as "closed" only after accepted
# 061114 fraber: Not anymore - really a hassle
if {![string equal $topic_status_id [im_topic_status_id_closed]]} {
if {$topic_status_id ne [im_topic_status_id_closed] } {
append actions "<option value=close>[_ intranet-forum.Close_topic_type]</option>\n"
}
# Always allow to ask for clarification from owner if not already in clarify
if {![string equal $topic_status_id [im_topic_status_id_needs_clarify]] && ![string equal $topic_status_id [im_topic_status_id_closed]]} {
if {$topic_status_id ne [im_topic_status_id_needs_clarify] && $topic_status_id ne [im_topic_status_id_closed] } {
append actions "<option value=clarify>[_ intranet-forum.lt_topic_type_needs_clar]</option>\n"
}
}
......@@ -198,7 +198,7 @@ if {$object_admin || $user_id==$owner_id} {
set assign_hidden "<input type=hidden name=asignee_id value=$asignee_id>"
}
# owner can also close topic
if {$user_id != $asignee_id && ![string equal $topic_status_id [im_topic_status_id_closed]]} {
if {$user_id != $asignee_id && $topic_status_id ne [im_topic_status_id_closed] } {
append actions "<option value=close>[_ intranet-forum.Close_topic_type]</option>\n"
}
}
......@@ -206,7 +206,7 @@ if {$object_admin || $user_id==$owner_id} {
append table_body "
<tr $bgcolor([expr $ctr % 2])>
<tr $bgcolor([expr {$ctr % 2}])>
<td>[_ intranet-forum.Actions]</td>
<td>
<select name=actions>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment