]> git.p6c8.net - selfforum.git/blobdiff - selfforum-cgi/shared/Id.pm
sort threads by number, not alphabetically
[selfforum.git] / selfforum-cgi / shared / Id.pm
index 480a57e2da7ff21179a7f10ca9482e4f3736ff2b..4d0914332a6a106a9f95e2611d6daf7da44be668 100644 (file)
@@ -4,7 +4,7 @@ package Id;
 #                                                                              #
 # File:        shared/Id.pm                                                    #
 #                                                                              #
-# Authors:     AndrĂ© Malo <nd@o3media.de>, 2001-05-03                          #
+# Authors:     AndrĂ© Malo <nd@o3media.de>                                      #
 #                                                                              #
 # Description: compose an unique ID (in CGI context)                           #
 #                                                                              #
@@ -16,6 +16,16 @@ use vars qw(
   @EXPORT
 );
 
+################################################################################
+#
+# Version check
+#
+# last modified:
+#    $Date$ (GMT)
+# by $Author$
+#
+sub VERSION {(q$Revision$ =~ /([\d.]+)\s*$/)[0] or '0.0'}
+
 ################################################################################
 #
 # Export
@@ -59,6 +69,8 @@ sub unique_id () {
 #
 sub to_base64 ($) {
   my $x = shift;
+  return '' unless defined $x;
+
   my $y = $table[$x % 64];
 
   $y = $table[$x % 64].$y while ($x = int ($x/64));
@@ -79,7 +91,7 @@ BEGIN {
   );
 }
 
-# keep require happy
+# keep 'require' happy
 1;
 
 #

patrick-canterino.de