signatures are dropped in replies
authorx99bachelart <x99bachelart>
Sun, 28 Sep 2003 12:09:58 +0000 (12:09 +0000)
committerx99bachelart <x99bachelart>
Sun, 28 Sep 2003 12:09:58 +0000 (12:09 +0000)
install.d/profile.inc.php
post.php

index b61e863..7d62c5e 100644 (file)
@@ -32,6 +32,7 @@ function getprofile() {
   $array['lastnews'] = time()-86400;
   $array['locale'] = "locales/fr.inc.php";
   $array['subscribe'] = array();
+  $array['dropsig'] = true;
   return $array;
 }
 ?>
index 2a00705..fe848f2 100644 (file)
--- a/post.php
+++ b/post.php
@@ -48,7 +48,12 @@ if (isset($group) && isset($id) && isset($_REQUEST['type']) &&
   if ($post) {
     $subject = (preg_match("/^re:/i",$post->headers->subject)?"":"Re: ")
       .$post->headers->subject;
-    $body = $post->headers->name." wrote :\n".wrap($post->body, ">");
+       if ($profile['dropsig']) {
+         $quotetext = preg_replace("/^(.*)\n-- \n.*$/m","\1",$post->body);
+       } else {
+         $quotetext = $post->body;
+       }
+    $body = $post->headers->name." wrote :\n".wrap($quotetext, "> ");
     if (isset($post->headers->followup))
       $target=$post->headers->followup;
     else