--- loncom/lonsql 2006/02/10 09:51:27 1.76 +++ loncom/lonsql 2006/05/11 17:53:22 1.77 @@ -3,7 +3,7 @@ # The LearningOnline Network # lonsql - LON TCP-MySQL-Server Daemon for handling database requests. # -# $Id: lonsql,v 1.76 2006/02/10 09:51:27 albertel Exp $ +# $Id: lonsql,v 1.77 2006/05/11 17:53:22 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -102,6 +102,7 @@ the database. use strict; use lib '/home/httpd/lib/perl/'; +use LONCAPA; use LONCAPA::Configuration; use LONCAPA::lonmetadata(); @@ -724,52 +725,6 @@ sub reply { } ######################################################## -######################################################## - -=pod - -=item &escape - -Escape special characters in a string. - -Inputs: string to escape - -Returns: The input string with special characters escaped. - -=cut - -######################################################## -######################################################## -sub escape { - my $str=shift; - $str =~ s/(\W)/"%".unpack('H2',$1)/eg; - return $str; -} - -######################################################## -######################################################## - -=pod - -=item &unescape - -Unescape special characters in a string. - -Inputs: string to unescape - -Returns: The input string with special characters unescaped. - -=cut - -######################################################## -######################################################## -sub unescape { - my $str=shift; - $str =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C",hex($1))/eg; - return $str; -} - -######################################################## ######################################################## =pod