Updates for Drupal 4.6
[tpope-extra.git] / drupal / modules / cvsfilter.module
index 9f02941bc59f9f1d636d2fd57adbf92cf7ee21ed..8102a4b38248f23f06b3b36e1ef1e5f65c400dfd 100644 (file)
@@ -4,20 +4,26 @@
 
 function cvsfilter_help($section) {
   switch ($section) {
+    case 'admin/modules#description':
     case 'admin/system/modules#description':
       return t("Automatically points cvs: style URLs at the appropriate location.");
+      break;
   }
 }
 
-function cvsfilter_filter($op, $text = "") {
+function cvsfilter_filter($op, $delta = 0, $format = -1, $text = "") {
   switch ($op) {
     case "name":
       return t("CVS Filter");
+    case "list":
+      return array(0 => t("CVS Filter"));
+    case 'description':
+      return cvsfilter_help('admin/modules#description');
     case "settings":
       return form_group(t("URL Filter"), t("CVS Filter is enabled.  This means that cvs: style URLs will automatically be pointed at the appropriate location."));
     case "process":
-      $text = preg_replace("/<a href=\"cvs:\/\/([^\"\/]*)\/?([^\"]*)\">/i", '<a href="http://sexygeek.us/cgi-bin/cvsweb/\2?cvsroot=\1">', $text);
-      $text = preg_replace("/<a href=\"cvs:([^\"]*)\">/i", '<a href="http://sexygeek.us/cgi-bin/cvsweb/\1?cvsroot=tpope">', $text);
+      $text = preg_replace("/<a href=\"cvs:\/\/([^\"\/]*)\/?([^\"]*)\">/i", '<a href="http://www.sexygeek.us/cgi-bin/cvsweb/\2?cvsroot=\1">', $text);
+      $text = preg_replace("/<a href=\"cvs:([^\"]*)\">/i", '<a href="http://www.sexygeek.us/cgi-bin/cvsweb/\1?cvsroot=tpope">', $text);
       return $text;
     default:
       return $text;