[LON-CAPA-cvs] cvs: loncom / lonenc.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Tue, 16 Nov 2004 15:26:36 -0000
albertel Tue Nov 16 10:26:36 2004 EDT
Modified files:
/loncom lonenc.pm
Log:
- supports both enc and non enc
Index: loncom/lonenc.pm
diff -u loncom/lonenc.pm:1.6 loncom/lonenc.pm:1.7
--- loncom/lonenc.pm:1.6 Sun Nov 14 02:54:41 2004
+++ loncom/lonenc.pm Tue Nov 16 10:26:36 2004
@@ -1,7 +1,7 @@
# The LearningOnline Network
# URL translation for encrypted filenames
#
-# $Id: lonenc.pm,v 1.6 2004/11/14 07:54:41 albertel Exp $
+# $Id: lonenc.pm,v 1.7 2004/11/16 15:26:36 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -112,7 +112,12 @@
sub check_decrypt {
my ($str)=@_;
- if ($$str=~m|^/enc/|) { $$str=&Apache::lonenc::unencrypted($$str); }
+ if (ref($str)) {
+ if ($$str=~m|^/enc/|) { $$str=&Apache::lonenc::unencrypted($$str); }
+ return;
+ }
+ if ($str=~m|^/enc/|) { return &Apache::lonenc::unencrypted($str); }
+ return $str;
}
1;