| |
38 |
38 |
-privilege "read" \ |
| |
39 |
39 |
-object_id $private_parent_id \ |
| |
40 |
40 |
-party_id [ad_conn user_id]]} { |
| |
41 |
41 |
ns_returnnotfound |
| |
42 |
42 |
ad_script_abort |
| |
43 |
43 |
} |
| |
44 |
44 |
} elseif {$extra_arg eq ""} { |
| |
45 |
45 |
if {![permission::permission_p \ |
| |
46 |
46 |
-privilege "read" \ |
| |
47 |
47 |
-object_id $object_id \ |
| |
48 |
48 |
-party_id [ad_conn user_id]]} { |
| |
49 |
49 |
ns_returnnotfound |
| |
50 |
50 |
ad_script_abort |
| |
51 |
51 |
} |
| |
52 |
52 |
} |
| |
53 |
53 |
# find a cr_item and serve it |
| |
54 |
54 |
|
| |
55 |
55 |
if {$extra_arg eq "thumbnail"} { |
| |
56 |
56 |
#find the thumbnail object_id |
| |
57 |
57 |
set new_object_id [image::get_resized_item_id -item_id $object_id -size_name thumbnail] |
| |
58 |
|
if {$new_object_id ne ""} { |
| |
|
58 |
if {$new_object_id eq ""} { |
| |
59 |
59 |
# We need to resize the image it seems |
| |
60 |
60 |
set object_id [image::resize -item_id $object_id] |
| |
61 |
61 |
} |
| |
62 |
62 |
} |
| |
63 |
63 |
|
| |
64 |
64 |
if {$extra_arg eq "info"} { |
| |
65 |
65 |
rp_form_put item_id $object_id |
| |
66 |
66 |
rp_form_put filename $filename |
| |
67 |
67 |
rp_internal_redirect "/packages/acs-content-repository/www/image-info" |
| |
68 |
68 |
ad_script_abort |
| |
69 |
69 |
} else { |
| |
70 |
70 |
cr_write_content -item_id $object_id |
| |
71 |
71 |
} |
| |
72 |
72 |
|