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
}
......
This diff is collapsed.
......@@ -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