Index: openacs-4/packages/attachments/attachments.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/attachments/attachments.info,v
diff -u -r1.18.4.4 -r1.18.4.5
--- openacs-4/packages/attachments/attachments.info 25 Sep 2013 09:31:47 -0000 1.18.4.4
+++ openacs-4/packages/attachments/attachments.info 2 Oct 2013 23:08:44 -0000 1.18.4.5
@@ -8,15 +8,15 @@
t
attachments
-
+
OpenACS
Attachment support
2
2013-09-08
OpenACS
Provide widgets and datamodel to support attachments on arbitrary objects. Used by forums.
-
+
Index: openacs-4/packages/attachments/tcl/attachments-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/attachments/tcl/attachments-procs.tcl,v
diff -u -r1.17 -r1.17.4.1
--- openacs-4/packages/attachments/tcl/attachments-procs.tcl 29 May 2009 18:13:24 -0000 1.17
+++ openacs-4/packages/attachments/tcl/attachments-procs.tcl 2 Oct 2013 23:08:44 -0000 1.17.4.1
@@ -31,7 +31,7 @@
{-package_id ""}
} {
} {
- if {[empty_string_p $package_id]} {
+ if {$package_id eq ""} {
# Get the package ID from the parent URL
array set parent_node [site_node::get_parent -node_id [ad_conn node_id]]
set package_id $parent_node(object_id)
@@ -91,7 +91,7 @@
} {
toggle approved_p for attachment
} {
- if {[empty_string_p $approved_p]} {
+ if {$approved_p eq ""} {
set approved_p [ad_decode [db_string select_attachment_approved_p {}] f t f]
}
Index: openacs-4/packages/attachments/www/attach.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/attachments/www/attach.tcl,v
diff -u -r1.11 -r1.11.4.1
--- openacs-4/packages/attachments/www/attach.tcl 29 May 2009 18:13:24 -0000 1.11
+++ openacs-4/packages/attachments/www/attach.tcl 2 Oct 2013 23:08:45 -0000 1.11.4.1
@@ -25,17 +25,17 @@
permission::require_permission -object_id $to_object_id -privilege write
# Give the object a nasty name if it doesn't have a pretty name
-if {[empty_string_p $pretty_object_name]} {
+if {$pretty_object_name eq ""} {
set pretty_object_name "[_ attachments.Object] #$to_object_id"
}
# Load up file storage information
-if {[empty_string_p $folder_id]} {
+if {$folder_id eq ""} {
set folder_id [attachments::get_root_folder]
}
# sanity check
-if {[empty_string_p $folder_id]} {
+if {$folder_id eq ""} {
ad_return_complaint 1 "[_ attachments.lt_Error_empty_folder_id]"
ad_script_abort
}
Index: openacs-4/packages/attachments/www/detach.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/attachments/www/detach.tcl,v
diff -u -r1.3 -r1.3.6.1
--- openacs-4/packages/attachments/www/detach.tcl 6 Jul 2007 12:13:23 -0000 1.3
+++ openacs-4/packages/attachments/www/detach.tcl 2 Oct 2013 23:08:45 -0000 1.3.6.1
@@ -72,7 +72,9 @@
} -on_request {
} -on_submit {
attachments::unattach -object_id $object_id -attachment_id $attachment_id
- if {[exists_and_not_null delete_button] && !$attached_to_other_objects_n} {
+ if {([info exists delete_button] && $delete_button ne "")
+ && !$attached_to_other_objects_n
+ } {
fs::delete_file -item_id $attachment_id
}
} -after_submit {
Index: openacs-4/packages/attachments/www/file-add-2.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/attachments/www/file-add-2.tcl,v
diff -u -r1.6.4.2 -r1.6.4.3
--- openacs-4/packages/attachments/www/file-add-2.tcl 7 Sep 2013 08:36:36 -0000 1.6.4.2
+++ openacs-4/packages/attachments/www/file-add-2.tcl 2 Oct 2013 23:08:45 -0000 1.6.4.3
@@ -14,7 +14,7 @@
description
} -validate {
valid_folder -requires {folder_id:integer} {
- if ![fs_folder_p $folder_id] {
+ if {![fs_folder_p $folder_id]} {
ad_complain "[_ attachments.lt_The_specified_parent_]"
}
}
@@ -34,7 +34,7 @@
permission::require_permission -object_id $folder_id -privilege write
# Get the filename part of the upload file
-if ![regexp {[^//\\]+$} $upload_file filename] {
+if {![regexp {[^//\\]+$} $upload_file filename]} {
# no match
set filename $upload_file
}
Index: openacs-4/packages/attachments/www/file-add.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/attachments/www/file-add.tcl,v
diff -u -r1.6.4.1 -r1.6.4.2
--- openacs-4/packages/attachments/www/file-add.tcl 6 Sep 2013 16:01:48 -0000 1.6.4.1
+++ openacs-4/packages/attachments/www/file-add.tcl 2 Oct 2013 23:08:45 -0000 1.6.4.2
@@ -13,7 +13,7 @@
{lock_title_p 0}
} -validate {
valid_folder -requires {folder_id:integer} {
- if ![fs_folder_p $folder_id] {
+ if {![fs_folder_p $folder_id]} {
ad_complain "[_ attachments.lt_The_specified_parent_]"
}
}
@@ -37,7 +37,7 @@
# double-click protection
# if title isn't passed in ignore lock_title_p
-if {[empty_string_p $title]} {
+if {$title eq ""} {
set lock_title_p 0
}
Index: openacs-4/packages/attachments/www/go-to-attachment.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/attachments/www/go-to-attachment.tcl,v
diff -u -r1.10 -r1.10.4.1
--- openacs-4/packages/attachments/www/go-to-attachment.tcl 9 Nov 2008 23:29:22 -0000 1.10
+++ openacs-4/packages/attachments/www/go-to-attachment.tcl 2 Oct 2013 23:08:45 -0000 1.10.4.1
@@ -13,7 +13,7 @@
# Get information about attachment
set content_type [item::get_type $attachment_id]
-if { [string length $content_type] == 0 } {
+if { $content_type eq "" } {
ad_return_complaint 1 [_ attachments.lt_No_such_attachment_fo]
return
}
Index: openacs-4/packages/attachments/www/simple-add-2.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/attachments/www/simple-add-2.tcl,v
diff -u -r1.5.4.1 -r1.5.4.2
--- openacs-4/packages/attachments/www/simple-add-2.tcl 6 Sep 2013 16:01:48 -0000 1.5.4.1
+++ openacs-4/packages/attachments/www/simple-add-2.tcl 2 Oct 2013 23:08:45 -0000 1.5.4.2
@@ -13,7 +13,7 @@
url:notnull,trim
} -validate {
valid_folder -requires {folder_id:integer} {
- if ![fs_folder_p $folder_id] {
+ if {![fs_folder_p $folder_id]} {
ad_complain "[_ attachments.lt_The_specified_parent_]"
}
}
Index: openacs-4/packages/attachments/www/simple-add.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/attachments/www/simple-add.tcl,v
diff -u -r1.9.4.1 -r1.9.4.2
--- openacs-4/packages/attachments/www/simple-add.tcl 7 Sep 2013 08:34:22 -0000 1.9.4.1
+++ openacs-4/packages/attachments/www/simple-add.tcl 2 Oct 2013 23:08:45 -0000 1.9.4.2
@@ -15,7 +15,7 @@
{lock_title_p 0}
} -validate {
valid_folder -requires {folder_id:integer} {
- if ![fs_folder_p $folder_id] {
+ if {![fs_folder_p $folder_id]} {
ad_complain "[_ attachments.lt_The_specified_parent_]"
}
}
@@ -31,7 +31,7 @@
# set templating datasources
set pretty_name "URL"
-if {[empty_string_p $pretty_name]} {
+if {$pretty_name eq ""} {
return -code error "[_ attachments.No_such_type]"
}
@@ -42,6 +42,6 @@
# double-click protection
# if title isn't passed in ignore lock_title_p
-if {[empty_string_p $title]} {
+if {$title eq ""} {
set lock_title_p 0
}