version 1.2, 2011/02/15 14:54:51
|
version 1.3, 2012/05/15 14:13:14
|
Line 29
|
Line 29
|
package Apache::lonwishlistdisplay; |
package Apache::lonwishlistdisplay; |
|
|
use strict; |
use strict; |
use Apache::Constants qw(:common); |
use Apache::Constants qw(:common :http); |
use Apache::lonnet; |
use Apache::lonnet; |
use Apache::loncommon(); |
use Apache::loncommon(); |
use Apache::lonhtmlcommon; |
use Apache::lonhtmlcommon; |
Line 48 my %TreeHash;
|
Line 48 my %TreeHash;
|
# ----------------------------------------------------- Main Handler, package lonwishlistdisplay |
# ----------------------------------------------------- Main Handler, package lonwishlistdisplay |
sub handler { |
sub handler { |
my ($r) = @_; |
my ($r) = @_; |
&Apache::loncommon::content_type($r,'text/html'); |
|
$r->send_http_header; |
if ($r->header_only) { |
|
&Apache::loncommon::content_type($r,'text/html'); |
|
$r->send_http_header; |
|
return OK; |
|
} |
|
|
|
if ((&Apache::lonnet::allowed('bre',"/res/$env{'user.domain'}/")) || |
|
(&Apache::lonnet::allowed('bro',"/res/$env{'user.domain'}/"))) { |
|
&Apache::loncommon::content_type($r,'text/html'); |
|
$r->send_http_header; |
|
} else { |
|
$env{'user.error.msg'}= |
|
"/adm/wishlist:bre:0:0:No rights to access Stored Links"; |
|
return HTTP_NOT_ACCEPTABLE; |
|
} |
|
|
if (&Apache::lonwishlist::getWishlist() ne 'error') { |
if (&Apache::lonwishlist::getWishlist() ne 'error') { |
# get wishlist entries from user-data db-file and build a tree out of these entries |
# get wishlist entries from user-data db-file and build a tree out of these entries |