Index: openacs-4/packages/wp-slim/tcl/wp-slim-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/tcl/wp-slim-procs.tcl,v
diff -u -r1.5 -r1.6
--- openacs-4/packages/wp-slim/tcl/wp-slim-procs.tcl 13 Feb 2009 20:40:39 -0000 1.5
+++ openacs-4/packages/wp-slim/tcl/wp-slim-procs.tcl 27 Jun 2015 20:34:41 -0000 1.6
@@ -7,7 +7,7 @@
db_1row get_style_data { *SQL* }
set out ""
- if { $background_image != "" } {
+ if { $background_image ne "" } {
append out " background=\"[ad_conn package_url]/view-image?revision_id=$background_image\""
}
foreach property {
@@ -18,7 +18,7 @@
{ alink alink_color }
} {
set value [set [lindex $property 1]]
- if { $value != "" } {
+ if { $value ne "" } {
append out " [lindex $property 0]=[ad_color_to_hex $value]"
}
}
@@ -28,7 +28,7 @@
ad_proc wp_check_style_authorization { style_id user_id } { Verifies that the user owns this style. } {
set owner [db_string wp_style_owner_select { *SQL* } -default "not_found"]
- if { $owner == "not_found" } {
+ if { $owner eq "not_found" } {
set err "Error"
set errmsg "Style $style_id was not found in the database."
} else {
Index: openacs-4/packages/wp-slim/www/add-edit-presentation.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/add-edit-presentation.tcl,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/wp-slim/www/add-edit-presentation.tcl 7 Aug 2014 13:00:22 -0000 1.4
+++ openacs-4/packages/wp-slim/www/add-edit-presentation.tcl 27 Jun 2015 20:34:41 -0000 1.5
@@ -90,7 +90,7 @@
}
} -edit_data {
set title "[_ wp-slim.Edit_Presentation]"
- set context [list [list "presentation-top?[export_vars -url {pres_item_id}]" "$pres_title"] "[_ wp-slim.Edit_Presentation]"]
+ set context [list [list [export_vars -base presentation-top {pres_item_id}] "$pres_title"] "[_ wp-slim.Edit_Presentation]"]
db_exec_plsql update_wp_presentation { *SQL* }
if {$public_p == "t"} {
db_exec_plsql grant_public_read { *SQL* }
@@ -111,9 +111,9 @@
set audience [ad_quotehtml $audience]
set background [ad_quotehtml $background]
set title "[_ wp-slim.Edit_Presentation]"
- set context [list [list "presentation-top?[export_vars -url {pres_item_id}]" "$pres_title"] "[_ wp-slim.Edit_Presentation]"]
+ set context [list [list [export_vars -base presentation-top {pres_item_id}] "$pres_title"] "[_ wp-slim.Edit_Presentation]"]
} -after_submit {
- ad_returnredirect "presentation-top?[export_vars -url {pres_item_id}]"
+ ad_returnredirect [export_vars -base presentation-top {pres_item_id}]
ad_script_abort
}
Index: openacs-4/packages/wp-slim/www/add-edit-slide.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/add-edit-slide.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/wp-slim/www/add-edit-slide.tcl 12 Sep 2013 20:47:19 -0000 1.3
+++ openacs-4/packages/wp-slim/www/add-edit-slide.tcl 27 Jun 2015 20:34:41 -0000 1.4
@@ -37,12 +37,12 @@
db_1row get_presentation { *SQL* }
-if {![empty_string_p $edit_slide]} {
+if {$edit_slide ne ""} {
db_1row get_bullets_stored { *SQL* }
append bullet_num [llength $bullets_stored]
db_1row get_slide_sort_key { *SQL* }
} else {
- if {[empty_string_p $sort_key] } {
+ if {$sort_key eq "" } {
set sort_key [db_string get_sort_key { *SQL* }]
}
}
@@ -62,7 +62,7 @@
################################################################################
-if { $edit_preamble == ""} {
+if { $edit_preamble eq ""} {
set edit_preamble 1
}
@@ -109,7 +109,7 @@
if { $bullet_num <= 2} {
set array_max 5
} else {
- set array_max [expr $bullet_num + 3]
+ set array_max [expr {$bullet_num + 3}]
}
###################################################################################
@@ -126,12 +126,12 @@
lappend element [list after_html " "]
}
if { $j == $array_max } {
- set swap_num [expr $array_max - 1]
+ set swap_num [expr {$array_max - 1}]
lappend element [list help_text "$you_can"]
lappend element [list after_html " "]
}
if { $j > 1 && $j < $array_max } {
- set swap_num [expr $j - 1 ]
+ set swap_num [expr {$j - 1 }]
lappend element [list after_html " "]
}
lappend element [list label "Bullet $j:" ]
@@ -178,7 +178,7 @@
}
if { $edit_slide == 1} {
- set context [list [list "presentation-top?[export_vars -url {pres_item_id}]" "$pres_title"] "[_ wp-slim.Edit_Slide]"]
+ set context [list [list [export_vars -base presentation-top {pres_item_id}] "$pres_title"] "[_ wp-slim.Edit_Slide]"]
ad_form -extend -name f -form {
{attach:text(radio)
{label "#wp-slim.Upload_Attachments#"}
@@ -187,7 +187,7 @@
}
}
} else {
- set context [list [list "presentation-top?[export_vars -url {pres_item_id}]" "$pres_title"] "[_ wp-slim.New_Slide]"]
+ set context [list [list [export_vars -base presentation-top {pres_item_id}] "$pres_title"] "[_ wp-slim.New_Slide]"]
ad_form -extend -name f -form {
{attach:text(hidden)
{value "f"}
@@ -205,37 +205,43 @@
set bullet_list [list]
for {set i 1} {$i <= $array_max} {incr i} {
set bullet_value [set bullet.$i]
- if { ![empty_string_p $bullet_value ] } {
+ if { $bullet_value ne "" } {
lappend bullet_list [set bullet.$i]
}
}
#insert the slide
db_exec_plsql wp_slide_insert { *SQL* }
if { $attach == "t"} {
- set context [list [list "presentation-top?[export_vars -url {pres_item_id}]" "$pres_title"] [list "add-edit-slide?[export_vars -url {slide_item_id pres_item_id edit_slide}]" "[_ wp-slim.Edit_Slide]"] "$slide_title"]
- ad_returnredirect attach-list?[export_vars -url {pres_item_id slide_item_id}]
+ set context [list \
+ [list [export_vars -base presentation-top {pres_item_id}] "$pres_title"] \
+ [list [export_vars -base add-edit-slide {slide_item_id pres_item_id edit_slide}] "[_ wp-slim.Edit_Slide]"] \
+ $slide_title]
+ ad_returnredirect [export_vars -base attach-list {pres_item_id slide_item_id}]
} else {
- ad_returnredirect presentation-top?[export_vars -url {pres_item_id}]
+ ad_returnredirect [export_vars -base presentation-top {pres_item_id}]
}
} -edit_data {
# makes a bullet list to send to the procedure
set bullet_items [list]
for {set i 1} {$i <= $array_max} {incr i} {
set bullet_value [set bullet.$i]
- if { ![empty_string_p $bullet_value ] } {
+ if { $bullet_value ne "" } {
lappend bullet_items [set bullet.$i]
}
}
# update the slide in the db
db_exec_plsql update_slide { *SQL* }
if { $attach == "t"} {
- set context [list [list "presentation-top?[export_vars -url {pres_item_id}]" "$pres_title"] [list "add-edit-slide?[export_vars -url {slide_item_id pres_item_id edit_slide}]" "[_ wp-slim.Edit_Slide]"] "$slide_title"]
- ad_returnredirect attach-list?[export_vars -url {pres_item_id slide_item_id}]
+ set context [list \
+ [list [export_vars -base presentation-top {pres_item_id}] "$pres_title"] \
+ [list [export_vars -base add-edit-slide {slide_item_id pres_item_id edit_slide}] "[_ wp-slim.Edit_Slide]"] \
+ $slide_title]
+ ad_returnredirect [export_vars -base attach-list {pres_item_id slide_item_id}]
} else {
- ad_returnredirect presentation-top?[export_vars -url {pres_item_id}]
+ ad_returnredirect [export_vars -base presentation-top {pres_item_id}]
}
} -edit_request {
Index: openacs-4/packages/wp-slim/www/attach-del.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/attach-del.tcl,v
diff -u -r1.8 -r1.9
--- openacs-4/packages/wp-slim/www/attach-del.tcl 12 Sep 2013 20:47:19 -0000 1.8
+++ openacs-4/packages/wp-slim/www/attach-del.tcl 27 Jun 2015 20:34:41 -0000 1.9
@@ -24,4 +24,4 @@
end;
}
-ad_returnredirect "attach-list?[export_vars -url {slide_item_id pres_item_id}]"
+ad_returnredirect [export_vars -base attach-list {slide_item_id pres_item_id}]
Index: openacs-4/packages/wp-slim/www/attach-detail.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/attach-detail.tcl,v
diff -u -r1.9 -r1.10
--- openacs-4/packages/wp-slim/www/attach-detail.tcl 12 Sep 2013 20:47:19 -0000 1.9
+++ openacs-4/packages/wp-slim/www/attach-detail.tcl 27 Jun 2015 20:34:41 -0000 1.10
@@ -35,7 +35,7 @@
permission::require_permission -party_id $user_id -object_id $pres_item_id -privilege wp_edit_presentation
set edit-slide 1
-set context [list [list "add-edit-slide?[export_vars -url {slide_item_id pres_item_id edit-slide}]" "[_ wp-slim.Edit_Slide]"] "[_ wp-slim.Details]"]
+set context [list [list [export_vars -base add-edit-slide {slide_item_id pres_item_id edit-slide}] "[_ wp-slim.Edit_Slide]"] "[_ wp-slim.Details]"]
db_multirow revisions revisions_get {
select r.revision_id,
@@ -65,6 +65,6 @@
set ${display}_selected "selected"
-set return_url [ns_urlencode "attach-detail?[export_vars -url {slide_item_id attach_item_id file_name}]"]
+set return_url [ns_urlencode [export_vars -base attach-detail {slide_item_id attach_item_id file_name}]]
ad_return_template
Index: openacs-4/packages/wp-slim/www/attach-list.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/attach-list.tcl,v
diff -u -r1.8 -r1.9
--- openacs-4/packages/wp-slim/www/attach-list.tcl 12 Sep 2013 20:47:19 -0000 1.8
+++ openacs-4/packages/wp-slim/www/attach-list.tcl 27 Jun 2015 20:34:41 -0000 1.9
@@ -29,7 +29,7 @@
and item_id = :slide_item_id
}]
set edit_slide 1
-set context [list [list "presentation-top?[export_vars -url {pres_item_id }]" "[_ wp-slim.Edit_Slide]"] "[_ wp-slim.List_Attachments]"]
+set context [list [list [export_vars -base presentation-top {pres_item_id }] "[_ wp-slim.Edit_Slide]"] "[_ wp-slim.List_Attachments]"]
db_multirow att attachments_get {
select name, item_id
Index: openacs-4/packages/wp-slim/www/attach.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/attach.tcl,v
diff -u -r1.13 -r1.14
--- openacs-4/packages/wp-slim/www/attach.tcl 26 Jun 2015 20:56:07 -0000 1.13
+++ openacs-4/packages/wp-slim/www/attach.tcl 27 Jun 2015 20:34:41 -0000 1.14
@@ -23,7 +23,7 @@
set tmp_size [file size $tmp_filename]
# strip off the C:\directories... crud and just get the file name
-if ![regexp {([^/\\]+)$} $attachment match client_filename] {
+if {![regexp {([^/\\]+)$} $attachment match client_filename]} {
set client_filename $attachment
}
@@ -35,7 +35,7 @@
incr exception_count
}
-if { ![empty_string_p [parameter::get -parameter MaxAttachmentSize -default "comments"]] && $tmp_size > [parameter::get -parameter MaxAttachmentSize -default "comments"] } {
+if { [parameter::get -parameter MaxAttachmentSize -default "comments"] ne "" && $tmp_size > [parameter::get -parameter MaxAttachmentSize -default "comments"] } {
set system_name [ad_system_name]
set bytes [util_commify_number [parameter::get -parameter MaxAttachmentSize -default "comments"]]
append exception_text "
[_ wp-slim.lt_Your_file_is_too_larg]\n"
@@ -47,7 +47,7 @@
ad_script_abort
}
-if {[string equal $mime_type "*/*"]} {
+if {$mime_type eq "*/*"} {
set mime_type "application/octet-stream"
}
@@ -69,4 +69,4 @@
}
set edit_slide 1
-ad_returnredirect add-edit-slide?[export_vars -url {slide_item_id pres_item_id edit_slide}]
+ad_returnredirect [export_vars -base add-edit-slide {slide_item_id pres_item_id edit_slide}]
Index: openacs-4/packages/wp-slim/www/delete-presentation-2.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/delete-presentation-2.tcl,v
diff -u -r1.9 -r1.10
--- openacs-4/packages/wp-slim/www/delete-presentation-2.tcl 12 Sep 2013 20:47:19 -0000 1.9
+++ openacs-4/packages/wp-slim/www/delete-presentation-2.tcl 27 Jun 2015 20:34:41 -0000 1.10
@@ -20,7 +20,7 @@
with_catch errmsg {
array set result [auth::authentication::Authenticate -username $username -authority_id $authority_id -password $password]
- if { [string equal $result(auth_status) "ok"] } {
+ if {$result(auth_status) eq "ok"} {
#Ok
} else {
ad_return_error "[_ wp-slim.Bad_Password]" "[_ wp-slim.Bad_Password]"
Index: openacs-4/packages/wp-slim/www/delete-presentation.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/delete-presentation.tcl,v
diff -u -r1.5 -r1.6
--- openacs-4/packages/wp-slim/www/delete-presentation.tcl 12 Sep 2013 20:47:19 -0000 1.5
+++ openacs-4/packages/wp-slim/www/delete-presentation.tcl 27 Jun 2015 20:34:41 -0000 1.6
@@ -17,6 +17,6 @@
permission::require_permission -object_id $pres_item_id -privilege wp_delete_presentation
-set context [list [list "presentation-top?[export_vars -url {pres_item_id}]" "$title"] "[_ wp-slim.Delete_Presentation]"]
+set context [list [list [export_vars -base presentation-top {pres_item_id}] "$title"] "[_ wp-slim.Delete_Presentation]"]
ad_return_template
Index: openacs-4/packages/wp-slim/www/delete-slide-2.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/delete-slide-2.tcl,v
diff -u -r1.8 -r1.9
--- openacs-4/packages/wp-slim/www/delete-slide-2.tcl 12 Sep 2013 20:47:19 -0000 1.8
+++ openacs-4/packages/wp-slim/www/delete-slide-2.tcl 27 Jun 2015 20:34:41 -0000 1.9
@@ -23,4 +23,4 @@
end;
}
-ad_returnredirect presentation-top?[export_vars -url {pres_item_id}]
+ad_returnredirect [export_vars -base presentation-top {pres_item_id}]
Index: openacs-4/packages/wp-slim/www/display-change.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/display-change.tcl,v
diff -u -r1.7 -r1.8
--- openacs-4/packages/wp-slim/www/display-change.tcl 12 Sep 2013 20:47:19 -0000 1.7
+++ openacs-4/packages/wp-slim/www/display-change.tcl 27 Jun 2015 20:34:41 -0000 1.8
@@ -28,13 +28,13 @@
where revision_id = :revision_id
}]
-if { ![empty_string_p $display] } {
- if { [cr_registered_type_for_mime_type $mime_type] != "image" } {
+if { $display ne "" } {
+ if { [cr_registered_type_for_mime_type $mime_type] ne "image" } {
ad_return_complaint 1 "[_ wp-slim.lt_The_file_is_neither_a]"
ad_script_abort
}
db_dml display_change ""
}
-ad_returnredirect "attach-detail?[export_vars -url {slide_item_id attach_item_id file_name}]"
+ad_returnredirect [export_vars -base attach-detail {slide_item_id attach_item_id file_name}]
Index: openacs-4/packages/wp-slim/www/index.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/index.tcl,v
diff -u -r1.9 -r1.10
--- openacs-4/packages/wp-slim/www/index.tcl 1 Mar 2005 00:01:46 -0000 1.9
+++ openacs-4/packages/wp-slim/www/index.tcl 27 Jun 2015 20:34:41 -0000 1.10
@@ -24,7 +24,7 @@
set show_age_value "show_age=$show_age"
if {$show_age != 0} {
- if {[db_type] == "oracle"} {
+ if {[db_type] eq "oracle"} {
set extra_where_clauses "and ao.creation_date >= (sysdate - $show_age)"
} else {
set extra_where_clauses "and ao.creation_date >= (now() - interval '$show_age days')"
@@ -45,7 +45,7 @@
set creation_date [lc_time_fmt $creation_date "%Q"]
}
- if {$show_user == "all"} {
+ if {$show_user eq "all"} {
db_multirow allpresentations get_all_visible_presentations { *SQL* } {
set creation_date [lc_time_fmt $creation_date "%Q"]
}
Index: openacs-4/packages/wp-slim/www/invite-2.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/invite-2.tcl,v
diff -u -r1.7 -r1.8
--- openacs-4/packages/wp-slim/www/invite-2.tcl 2 Dec 2013 09:01:40 -0000 1.7
+++ openacs-4/packages/wp-slim/www/invite-2.tcl 27 Jun 2015 20:34:41 -0000 1.8
@@ -22,7 +22,7 @@
permission::require_permission -object_id $pres_item_id -privilege wp_admin_presentation
-set context [list [list "presentation-top?[export_vars -url {pres_item_id}]" "$title"] [list "presentation-acl?[export_vars -url {pres_item_id}]" "[_ wp-slim.Authorization]"] [list "invite?[export_vars -url {pres_item_id role title}]" "[_ wp-slim.Invite_User]"] "[_ wp-slim.Email_Sent]"]
+set context [list [list [export_vars -base presentation-top {pres_item_id}] "$title"] [list [export_vars -base presentation-acl {pres_item_id}] "[_ wp-slim.Authorization]"] [list [export_vars -base invite {pres_item_id role title}] "[_ wp-slim.Invite_User]"] "[_ wp-slim.Email_Sent]"]
set user_id [ad_conn user_id]
Index: openacs-4/packages/wp-slim/www/invite.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/invite.tcl,v
diff -u -r1.5 -r1.6
--- openacs-4/packages/wp-slim/www/invite.tcl 12 Sep 2013 20:47:19 -0000 1.5
+++ openacs-4/packages/wp-slim/www/invite.tcl 27 Jun 2015 20:34:41 -0000 1.6
@@ -20,7 +20,7 @@
permission::require_permission -object_id $pres_item_id -privilege wp_admin_presentation
-set context [list [list "presentation-top?[export_vars -url {pres_item_id}]" "$title"] [list "presentation-acl?[export_vars -url {pres_item_id}]" "[_ wp-slim.Authorization]"] "[_ wp-slim.Invite_User]"]
+set context [list [list [export_vars -base presentation-top {pres_item_id}] "$title"] [list [export_vars -base presentation-acl {pres_item_id}] "[_ wp-slim.Authorization]"] "[_ wp-slim.Invite_User]"]
set encoded_title [ad_urlencode $title]
ad_return_template
Index: openacs-4/packages/wp-slim/www/presentation-acl-add-2.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/presentation-acl-add-2.tcl,v
diff -u -r1.5 -r1.6
--- openacs-4/packages/wp-slim/www/presentation-acl-add-2.tcl 12 Sep 2013 20:47:19 -0000 1.5
+++ openacs-4/packages/wp-slim/www/presentation-acl-add-2.tcl 27 Jun 2015 20:34:41 -0000 1.6
@@ -23,19 +23,19 @@
permission::require_permission -object_id $pres_item_id -privilege wp_admin_presentation
-set context [list [list "presentation-top?[export_vars -url {pres_item_id}]" "$title"] [list "presentation-acl?[export_vars -url {pres_item_id}]" "[_ wp-slim.Authorization]"] "[_ wp-slim.Confirm_Add_User]"]
+set context [list [list [export_vars -base presentation-top {pres_item_id}] "$title"] [list [export_vars -base presentation-acl {pres_item_id}] "[_ wp-slim.Authorization]"] "[_ wp-slim.Confirm_Add_User]"]
set privilege [ad_decode $role "read" "wp_view_presentation" "write" "wp_edit_presentation" "admin" "wp_admin_presentation" ""]
-if [db_0or1row privilege_check {
+if {[db_0or1row privilege_check {
select 1
from acs_permissions
where object_id = :pres_item_id
and grantee_id = :user_id_from_search
and privilege = :privilege
-}] {
- set vars [export_vars -url {pres_item_id}]
+}]} {
+ set vars [export_vars {pres_item_id}]
ad_return_error "[_ wp-slim.lt_User_Already_Had_That]" "[_ wp-slim.lt_That_user_can_already]"
db_release_unused_handles
return
Index: openacs-4/packages/wp-slim/www/presentation-acl-add-3.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/presentation-acl-add-3.tcl,v
diff -u -r1.7 -r1.8
--- openacs-4/packages/wp-slim/www/presentation-acl-add-3.tcl 2 Dec 2013 09:01:40 -0000 1.7
+++ openacs-4/packages/wp-slim/www/presentation-acl-add-3.tcl 27 Jun 2015 20:34:41 -0000 1.8
@@ -20,7 +20,7 @@
permission::require_permission -object_id $pres_item_id -privilege wp_admin_presentation
-if {![empty_string_p $email]} {
+if {$email ne ""} {
set user_id [ad_conn user_id]
db_1row email_get {
select email as sender_email
@@ -35,10 +35,10 @@
}
set privilege_list "wp_view_presentation"
-if { [string equal $role "write"] } {
+if {$role eq "write"} {
lappend privilege_list "wp_edit_presentation"
}
-if { [string equal $role "write"] } {
+if {$role eq "write"} {
lappend privilege_list "wp_edit_presentation"
}
@@ -64,4 +64,4 @@
}
}
-ad_returnredirect presentation-acl?[export_vars -url { pres_item_id }]
+ad_returnredirect [export_vars -base presentation-acl { pres_item_id }]
Index: openacs-4/packages/wp-slim/www/presentation-acl-add-group-2.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/presentation-acl-add-group-2.tcl,v
diff -u -r1.6 -r1.7
--- openacs-4/packages/wp-slim/www/presentation-acl-add-group-2.tcl 7 Aug 2014 13:00:22 -0000 1.6
+++ openacs-4/packages/wp-slim/www/presentation-acl-add-group-2.tcl 27 Jun 2015 20:34:42 -0000 1.7
@@ -22,7 +22,7 @@
permission::require_permission -object_id $pres_item_id -privilege wp_admin_presentation
-set context [list [list "presentation-top?[export_vars -url {pres_item_id}]" "$title"] [list "presentation-acl?[export_vars -url {pres_item_id}]" "[_ wp-slim.Authorization]"] "[_ wp-slim.Confirm_Add_Users]"]
+set context [list [list [export_vars -base presentation-top {pres_item_id}] "$title"] [list [export_vars -base presentation-acl {pres_item_id}] "[_ wp-slim.Authorization]"] "[_ wp-slim.Confirm_Add_Users]"]
db_multirow group users_get {
select p.first_names,
Index: openacs-4/packages/wp-slim/www/presentation-acl-add-group-3.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/presentation-acl-add-group-3.tcl,v
diff -u -r1.6 -r1.7
--- openacs-4/packages/wp-slim/www/presentation-acl-add-group-3.tcl 7 Aug 2014 13:00:22 -0000 1.6
+++ openacs-4/packages/wp-slim/www/presentation-acl-add-group-3.tcl 27 Jun 2015 20:34:42 -0000 1.7
@@ -17,14 +17,14 @@
# adds a group of users
db_foreach group_grant { *SQL } {
- if {$role == "write"} {
+ if {$role eq "write"} {
set permission "wp_edit_presentation"
- } elseif {$role == "admin"} {
+ } elseif {$role eq "admin"} {
set permission "wp_admin_presentation"
} else {
set permission "wp_view_presentation"
}
db_exec_plsql permission_grant { *SQL }
}
-ad_returnredirect presentation-acl?[export_vars -url {pres_item_id}]
+ad_returnredirect [export_vars -base presentation-acl {pres_item_id}]
Index: openacs-4/packages/wp-slim/www/presentation-acl-add-group.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/presentation-acl-add-group.tcl,v
diff -u -r1.5 -r1.6
--- openacs-4/packages/wp-slim/www/presentation-acl-add-group.tcl 12 Sep 2013 20:47:19 -0000 1.5
+++ openacs-4/packages/wp-slim/www/presentation-acl-add-group.tcl 27 Jun 2015 20:34:42 -0000 1.6
@@ -21,7 +21,7 @@
permission::require_permission -object_id $pres_item_id -privilege wp_admin_presentation
-set context [list [list "presentation-top?[export_vars -url {pres_item_id}]" "$title"] [list "presentation-acl?[export_vars -url {pres_item_id}]" "[_ wp-slim.Authorization]"] "[_ wp-slim.Add_Group]"]
+set context [list [list [export_vars -base presentation-top {pres_item_id}] "$title"] [list [export_vars -base presentation-acl {pres_item_id}] "[_ wp-slim.Authorization]"] "[_ wp-slim.Add_Group]"]
db_multirow groups groups_get {
select group_id, group_name
Index: openacs-4/packages/wp-slim/www/presentation-acl-add.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/presentation-acl-add.tcl,v
diff -u -r1.6 -r1.7
--- openacs-4/packages/wp-slim/www/presentation-acl-add.tcl 12 Sep 2013 20:47:20 -0000 1.6
+++ openacs-4/packages/wp-slim/www/presentation-acl-add.tcl 27 Jun 2015 20:34:42 -0000 1.7
@@ -20,7 +20,7 @@
permission::require_permission -object_id $pres_item_id -privilege wp_admin_presentation
-set context [list [list "presentation-top?[export_vars -url {pres_item_id}]" "$title"] [list "presentation-acl?[export_vars -url {pres_item_id}]" "[_ wp-slim.Authorization]"] "[_ wp-slim.Add_User]"]
+set context [list [list [export_vars -base presentation-top {pres_item_id}] "$title"] [list [export_vars -base presentation-acl {pres_item_id}] "[_ wp-slim.Authorization]"] "[_ wp-slim.Add_User]"]
set encoded_title [ns_urlencode $title]
Index: openacs-4/packages/wp-slim/www/presentation-acl-delete.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/presentation-acl-delete.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/wp-slim/www/presentation-acl-delete.tcl 12 Sep 2013 20:47:20 -0000 1.3
+++ openacs-4/packages/wp-slim/www/presentation-acl-delete.tcl 27 Jun 2015 20:34:42 -0000 1.4
@@ -31,4 +31,4 @@
end;
}
-ad_returnredirect presentation-acl?[export_vars -url {pres_item_id}]
\ No newline at end of file
+ad_returnredirect [export_vars -base presentation-acl {pres_item_id}]
Index: openacs-4/packages/wp-slim/www/presentation-acl.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/presentation-acl.tcl,v
diff -u -r1.7 -r1.8
--- openacs-4/packages/wp-slim/www/presentation-acl.tcl 12 Sep 2013 20:47:20 -0000 1.7
+++ openacs-4/packages/wp-slim/www/presentation-acl.tcl 27 Jun 2015 20:34:42 -0000 1.8
@@ -34,7 +34,7 @@
set encoded_title [ns_urlencode $title]
-set context [list [list "presentation-top?[export_vars -url {pres_item_id}]" "$title"] "[_ wp-slim.Authorization]"]
+set context [list [list [export_vars -base presentation-top {pres_item_id}] "$title"] "[_ wp-slim.Authorization]"]
Index: openacs-4/packages/wp-slim/www/presentation-public.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/presentation-public.tcl,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/wp-slim/www/presentation-public.tcl 26 Jun 2015 20:56:07 -0000 1.4
+++ openacs-4/packages/wp-slim/www/presentation-public.tcl 27 Jun 2015 20:34:42 -0000 1.5
@@ -36,4 +36,4 @@
where item_id = :pres_item_id)
}
-ad_returnredirect presentation-acl?[export_vars -url {pres_item_id}]
\ No newline at end of file
+ad_returnredirect [export_vars -base presentation-acl {pres_item_id}]
Index: openacs-4/packages/wp-slim/www/presentation-revisions.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/presentation-revisions.tcl,v
diff -u -r1.10 -r1.11
--- openacs-4/packages/wp-slim/www/presentation-revisions.tcl 7 Aug 2014 13:00:22 -0000 1.10
+++ openacs-4/packages/wp-slim/www/presentation-revisions.tcl 27 Jun 2015 20:34:42 -0000 1.11
@@ -39,8 +39,8 @@
set creation_date [lc_time_fmt $creation_date "%X %Q"]
}
db_1row get_presentation {}
-set context [list [list "presentation-top?[export_vars -url {pres_item_id}]" "$pres_title"] "[_ wp-slim.All_Revisions]"]
+set context [list [list [export_vars -base presentation-top {pres_item_id}] "$pres_title"] "[_ wp-slim.All_Revisions]"]
-set return_url [ns_urlencode "presentation-revisions?[export_vars -url {pres_item_id}]"]
+set return_url [ns_urlencode [export_vars -base presentation-revisions {pres_item_id}]]
ad_return_template
Index: openacs-4/packages/wp-slim/www/search.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/search.tcl,v
diff -u -r1.5 -r1.6
--- openacs-4/packages/wp-slim/www/search.tcl 7 Aug 2014 13:00:22 -0000 1.5
+++ openacs-4/packages/wp-slim/www/search.tcl 27 Jun 2015 20:34:42 -0000 1.6
@@ -36,27 +36,27 @@
set exception_count 0
set exception_text ""
-if [info exists keyword] {
+if {[info exists keyword]} {
# this is an administrator
- if { [empty_string_p $keyword] } {
+ if { $keyword eq "" } {
incr exception_count
append exception_text "[_ wp-slim.lt_You_forgot_to_type_a_]\n"
}
} else {
# from one of the user pages
- if { (![info exists email] || [empty_string_p $email]) && \
- (![info exists last_name] || [empty_string_p $last_name]) } {
+ if { (![info exists email] || $email eq "") && \
+ (![info exists last_name] || $last_name eq "") } {
incr exception_count
append exception_text "[_ wp-slim.lt_You_must_specify_eith]\n"
}
if { [info exists email] && [info exists last_name] && \
- ![empty_string_p $email] && ![empty_string_p $last_name] } {
+ $email ne "" && $last_name ne "" } {
incr exception_count
append exception_text "[_ wp-slim.lt_You_can_only_specify_]\n"
}
- if { ![info exists target] || [empty_string_p $target] } {
+ if { ![info exists target] || $target eq "" } {
incr exception_count
set host_administrator [ad_host_administrator]
append exception_text "[_ wp-slim.lt_Target_was_not_specif]\n"
@@ -76,7 +76,7 @@
set search_type "keyword"
set sql_keyword "%[string tolower $keyword]%"
lappend where_clause "(email like :sql_keyword or lower(first_names || ' ' || last_name) like :sql_keyword)"
-} elseif { [info exists email] && ![empty_string_p $email] } {
+} elseif { [info exists email] && $email ne "" } {
set search_type "email"
set sql_email "%[string tolower $email]%"
lappend where_clause "email like :sql_email"
@@ -94,7 +94,7 @@
set passthrough_parameters "[export_entire_form_as_url_vars $passthrough]"
}
-if { [exists_and_not_null limit_to_users_in_group_id] } {
+if { ([info exists limit_to_users_in_group_id] && $limit_to_users_in_group_id ne "") } {
set query "select distinct first_names, last_name, email, member_state, email_verified_p, cu.user_id
from cc_users cu, group_member_map gm, membership_rels mr
where cu.user_id = gm.member_id
@@ -128,14 +128,14 @@
set user_search:[set rowcount](first_names) $first_names
set user_search:[set rowcount](last_name) $last_name
set user_search:[set rowcount](email) $email
- set user_search:[set rowcount](export_vars) [export_vars -url {user_id_from_search first_names_from_search last_name_from_search email_from_search}]
+ set user_search:[set rowcount](export_vars) [export_vars {user_id_from_search first_names_from_search last_name_from_search email_from_search}]
set user_search:[set rowcount](member_state) $member_state
}
set user_search:rowcount $rowcount
# We are limiting the search to one group - display that group's name
-if { [exists_and_not_null limit_to_users_in_group_id] && ![regexp {[^0-9]} $limit_to_users_in_group_id] } {
+if { ([info exists limit_to_users_in_group_id] && $limit_to_users_in_group_id ne "") && ![regexp {[^0-9]} $limit_to_users_in_group_id] } {
set group_name [db_string user_group_name_from_id "select group_name from user_groups where group_id = :limit_to_users_in_group_id"]
} else {
set group_name ""
Index: openacs-4/packages/wp-slim/www/serve-presentation-revision.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/serve-presentation-revision.tcl,v
diff -u -r1.9 -r1.10
--- openacs-4/packages/wp-slim/www/serve-presentation-revision.tcl 12 Sep 2013 20:47:20 -0000 1.9
+++ openacs-4/packages/wp-slim/www/serve-presentation-revision.tcl 27 Jun 2015 20:34:42 -0000 1.10
@@ -57,6 +57,6 @@
and r.revision_id = pb.id
}
-set context [list [list "$subsite_name/presentation-top?[export_vars -url {pres_item_id}]" "$pres_title"] "[_ wp-slim.One_Revision]"]
+set context [list [list [export_vars -base $subsite_name/presentation-top {pres_item_id}] "$pres_title"] "[_ wp-slim.One_Revision]"]
ad_return_template
Index: openacs-4/packages/wp-slim/www/serve-slide.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/serve-slide.tcl,v
diff -u -r1.12 -r1.13
--- openacs-4/packages/wp-slim/www/serve-slide.tcl 23 Jun 2015 16:19:30 -0000 1.12
+++ openacs-4/packages/wp-slim/www/serve-slide.tcl 27 Jun 2015 20:34:42 -0000 1.13
@@ -89,7 +89,7 @@
# Figure out what the next slide link should be.
-set next_sort_key [expr $sort_key + 1]
+set next_sort_key [expr {$sort_key + 1}]
set found_slide [db_0or1row get_next_slide {
select i.item_id as next_slide_item_id
Index: openacs-4/packages/wp-slim/www/serve-style.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/serve-style.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/wp-slim/www/serve-style.tcl 28 Aug 2003 09:42:00 -0000 1.2
+++ openacs-4/packages/wp-slim/www/serve-style.tcl 27 Jun 2015 20:34:42 -0000 1.3
@@ -13,7 +13,7 @@
ad_abort_script
}
-if { $style_id == "default" } {
+if { $style_id eq "default" } {
set style_id -1
}
Index: openacs-4/packages/wp-slim/www/slide-revisions.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/slide-revisions.tcl,v
diff -u -r1.8 -r1.9
--- openacs-4/packages/wp-slim/www/slide-revisions.tcl 12 Sep 2013 20:47:20 -0000 1.8
+++ openacs-4/packages/wp-slim/www/slide-revisions.tcl 27 Jun 2015 20:34:42 -0000 1.9
@@ -23,7 +23,7 @@
set subsite_name [ad_conn package_url]
-set context [list [list "presentation-top?[export_vars -url {pres_item_id}]" "[_ wp-slim.Presentation]"] "[_ wp-slim.Slide_Revisions]"]
+set context [list [list [export_vars -base presentation-top {pres_item_id}] "[_ wp-slim.Presentation]"] "[_ wp-slim.Slide_Revisions]"]
db_multirow revisions revisions_get {
@@ -45,6 +45,6 @@
set creation_date [lc_time_fmt $creation_date "%X %Q"]
}
-set return_url [ns_urlencode "slide-revisions?[export_vars -url {slide_item_id pres_item_id}]"]
+set return_url [ns_urlencode [export_vars -base slide-revisions {slide_item_id pres_item_id}]]
ad_return_template
Index: openacs-4/packages/wp-slim/www/slides-reorder-2.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/slides-reorder-2.tcl,v
diff -u -r1.7 -r1.8
--- openacs-4/packages/wp-slim/www/slides-reorder-2.tcl 12 Sep 2013 20:47:20 -0000 1.7
+++ openacs-4/packages/wp-slim/www/slides-reorder-2.tcl 27 Jun 2015 20:34:42 -0000 1.8
@@ -30,4 +30,4 @@
db_release_unused_handles
-ad_returnredirect "presentation-top?[export_vars -url {pres_item_id}]"
+ad_returnredirect [export_vars -base presentation-top {pres_item_id}]
Index: openacs-4/packages/wp-slim/www/slides-reorder.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/slides-reorder.tcl,v
diff -u -r1.10 -r1.11
--- openacs-4/packages/wp-slim/www/slides-reorder.tcl 12 Sep 2013 20:47:20 -0000 1.10
+++ openacs-4/packages/wp-slim/www/slides-reorder.tcl 27 Jun 2015 20:34:42 -0000 1.11
@@ -21,7 +21,7 @@
set header [ad_header "[_ wp-slim.Reorder_Slides]"]
db_1row get_presentation {}
-set context [list [list "presentation-top?[export_vars -url {pres_item_id}]" "$pres_title"] "[_ wp-slim.Reorder_Slides]"]
+set context [list [list [export_vars -base presentation-top {pres_item_id}] "$pres_title"] "[_ wp-slim.Reorder_Slides]"]
set counter 0
Index: openacs-4/packages/wp-slim/www/style-edit-2.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/style-edit-2.tcl,v
diff -u -r1.7 -r1.8
--- openacs-4/packages/wp-slim/www/style-edit-2.tcl 26 Jun 2015 20:56:07 -0000 1.7
+++ openacs-4/packages/wp-slim/www/style-edit-2.tcl 27 Jun 2015 20:34:42 -0000 1.8
@@ -37,11 +37,11 @@
}
# check for naughty html
-if { [info exists name] && ![empty_string_p [ad_html_security_check $name]] } {
+if { [info exists name] && [ad_html_security_check $name] ne "" } {
ad_return_complaint 1 "[ad_html_security_check $name]\n"
return
}
-if { [info exists css] && ![empty_string_p [ad_html_security_check $css]] } {
+if { [info exists css] && [ad_html_security_check $css] ne "" } {
ad_return_complaint 1 "[ad_html_security_check $css]\n"
return
}
@@ -82,4 +82,4 @@
db_release_unused_handles
-ad_returnredirect "style-view?[export_vars -url {style_id presentation_id}]"
+ad_returnredirect [export_vars -base style-view {style_id presentation_id}]
Index: openacs-4/packages/wp-slim/www/style-edit.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/style-edit.tcl,v
diff -u -r1.5 -r1.6
--- openacs-4/packages/wp-slim/www/style-edit.tcl 12 Sep 2013 20:47:20 -0000 1.5
+++ openacs-4/packages/wp-slim/www/style-edit.tcl 27 Jun 2015 20:34:42 -0000 1.6
@@ -50,7 +50,7 @@
db_release_unused_handles
-if { $items == "" } {
+if { $items eq "" } {
set background_images "[_ wp-slim.lt_There_are_not_yet_any]
"
Index: openacs-4/packages/wp-slim/www/style-image-add.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/style-image-add.tcl,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/wp-slim/www/style-image-add.tcl 1 Mar 2005 00:01:47 -0000 1.4
+++ openacs-4/packages/wp-slim/www/style-image-add.tcl 27 Jun 2015 20:34:42 -0000 1.5
@@ -25,7 +25,7 @@
set n_bytes [file size $tmp_filename]
# strip off the C:\directories... crud and just get the file name
-if ![regexp {([^/\\]+)$} $image match client_filename] {
+if {![regexp {([^/\\]+)$} $image match client_filename]} {
set client_filename $image
}
Index: openacs-4/packages/wp-slim/www/style-list.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/style-list.tcl,v
diff -u -r1.5 -r1.6
--- openacs-4/packages/wp-slim/www/style-list.tcl 1 Mar 2005 00:01:47 -0000 1.5
+++ openacs-4/packages/wp-slim/www/style-list.tcl 27 Jun 2015 20:34:42 -0000 1.6
@@ -14,8 +14,8 @@
db_multirow styles_select style_select_data { *SQL* } {
- if {$total_size == ""} { set total_size 0 }
- set total_size "[format "%.1f" [expr $total_size / 1024.0]]K"
+ if {$total_size eq ""} { set total_size 0 }
+ set total_size "[format "%.1f" [expr {$total_size / 1024.0}]]K"
}
db_release_unused_handles
Index: openacs-4/packages/wp-slim/www/style-view.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/style-view.tcl,v
diff -u -r1.6 -r1.7
--- openacs-4/packages/wp-slim/www/style-view.tcl 7 Aug 2014 13:00:22 -0000 1.6
+++ openacs-4/packages/wp-slim/www/style-view.tcl 27 Jun 2015 20:34:43 -0000 1.7
@@ -17,22 +17,22 @@
db_1row style_select { *SQL* }
-set url_vars "[export_vars -url {style_id presentation_id}]"
+set url_vars "[export_vars {style_id presentation_id}]"
-if { $background_color == "" } {
+if { $background_color eq "" } {
set bgcolor_str ""
} else {
set bgcolor_str "bgcolor=[ad_color_to_hex $background_color]"
}
-if { $background_image == "" } {
+if { $background_image eq "" } {
set bgimage_str ""
} else {
# this needs to be modified in order to handle the background images!!
set bgimage_str "style=\"background-image: url(view-image?revision_id=$background_image)\""
}
foreach property { text_color link_color alink_color vlink_color } {
- if { [set $property] == "" } {
+ if { [set $property] eq "" } {
set "${property}_font" ""
set "${property}_font_end" ""
} else {
@@ -42,7 +42,7 @@
}
# set the return link to the presentation we were editing, if id exists
-if { [exists_and_not_null presentation_id] } {
+if { ([info exists presentation_id] && $presentation_id ne "") } {
set last_link " [list "presentation-top?pres_item_id=$presentation_id" "[db_string pres_name_select "select title from cr_wp_presentations where presentation_id = :presentation_id"]"]"
} else {
set last_link [list "style-list?user_id=$user_id" "[_ wp-slim.Your_Styles]"]
@@ -54,7 +54,7 @@
db_multirow style_images style_image_select { *SQL* } {
- set file_size "[format "%.1f" [expr $file_size / 1024.0]]K"
+ set file_size "[format "%.1f" [expr {$file_size / 1024.0}]]K"
}
db_release_unused_handles