version 1.7, 2008/11/28 20:50:25
|
version 1.9, 2009/01/06 08:58:30
|
Line 69 use lib '/home/httpd/lib/perl/';
|
Line 69 use lib '/home/httpd/lib/perl/';
|
use Apache::lonlocal; |
use Apache::lonlocal; |
use LONCAPA::Configuration; |
use LONCAPA::Configuration; |
use LONCAPA::loncgi; |
use LONCAPA::loncgi; |
|
use LONCAPA::lonauthcgi; |
|
|
# ---------------------------- Print MIME Content-type and other initialization |
# ---------------------------- Print MIME Content-type and other initialization |
print 'Content-type: text/plain'."\n\n"; |
print 'Content-type: text/plain'."\n\n"; |
Line 76 print 'Content-type: text/plain'."\n\n";
|
Line 77 print 'Content-type: text/plain'."\n\n";
|
&main(); |
&main(); |
|
|
sub main { |
sub main { |
if (!&LONCAPA::loncgi::check_ipbased_access('metadatakeywords')) { |
if (!&LONCAPA::lonauthcgi::check_ipbased_access('metadatakeywords')) { |
if (!&LONCAPA::loncgi::check_cookie_and_load_env()) { |
if (!&LONCAPA::loncgi::check_cookie_and_load_env()) { |
&Apache::lonlocal::get_language_handle(); |
&Apache::lonlocal::get_language_handle(); |
print(&LONCAPA::loncgi::missing_cookie_msg()); |
print(&LONCAPA::loncgi::missing_cookie_msg()); |
return; |
return; |
} |
} |
|
|
if (!&LONCAPA::loncgi::can_view('metadata_keywords')) { |
if (!&LONCAPA::lonauthcgi::can_view('metadata_keywords')) { |
&Apache::lonlocal::get_language_handle(); |
&Apache::lonlocal::get_language_handle(); |
print(&LONCAPA::loncgi::unauthorized_msg('metadata_keywords')); |
print(&LONCAPA::lonauthcgi::unauthorized_msg('metadata_keywords')); |
return; |
return; |
} |
} |
} |
} |
Line 101 sub main {
|
Line 102 sub main {
|
undef($perlvarref); |
undef($perlvarref); |
|
|
unless ($perlvar{'lonRole'} eq 'library') { |
unless ($perlvar{'lonRole'} eq 'library') { |
print(&Apache::lonlocal::mt('This can only be run on a library server!)."\n"); |
print(&Apache::lonlocal::mt('This can only be run on a library server!')."\n"); |
return; |
return; |
} |
} |
|
|