diff --git a/phpgwapi/inc/class.linkbox.inc.php b/phpgwapi/inc/class.linkbox.inc.php
index 2a68236ed1..f15267e351 100644
--- a/phpgwapi/inc/class.linkbox.inc.php
+++ b/phpgwapi/inc/class.linkbox.inc.php
@@ -2,9 +2,9 @@
   /**************************************************************************\
   * phpGroupWare API - Link box generator                                    *
   * http://www.phpgroupware.org/api                                          *
-  * This file written by Joseph Engo <jengo@phpgroupware.org>                *
+  * This file written by Mark Peters <skeeter@phpgroupware.org>              *
   * Creates linkboxes using templates                                        *
-  * Copyright (C) 2000, 2001 Joseph Engo                                     *
+  * Copyright (C) 2000, 2001 Mark Peters                                     *
   * -------------------------------------------------------------------------*
   * This library is part of phpGroupWare (http://www.phpgroupware.org)       * 
   * This library is free software; you can redistribute it and/or modify it  *
diff --git a/phpgwapi/inc/class.network.inc.php b/phpgwapi/inc/class.network.inc.php
index c34ffe6623..42e6ebaf24 100644
--- a/phpgwapi/inc/class.network.inc.php
+++ b/phpgwapi/inc/class.network.inc.php
@@ -40,6 +40,14 @@ class network
     $this->addcrlf = $value;
   }
 
+  function add_crlf($str)
+  {
+    if($this->addcrlf) {
+      $str .= "\r\n";
+    }
+    return $str;
+  }
+
   function set_error($code,$msg,$desc)
   {
     $this->error = array("code","msg","desc");
@@ -93,9 +101,7 @@ class network
 
   function write_port($str)
   {
-    if (isset($this->addcrlf) && $this->addcrlf == True) $str .= "\r\n";
-
-    $ok = fputs($this->socket,$str);
+    $ok = fputs($this->socket,$this->add_crlf($str));
     if (!$ok)
     {
       return $this->set_error("Error","Connection Lost","lost connection to server");
@@ -106,12 +112,10 @@ class network
 
   function bs_write_port($str,$bytes=0)
   {
-    if (isset($this->addcrlf) && $this->addcrlf == True) $str .= "\r\n";
-
     if ($bytes)
-      $ok = fwrite($this->socket,$str,$bytes);
+      $ok = fwrite($this->socket,$this->add_crlf($str),$bytes);
     else
-      $ok = fwrite($this->socket,$str);
+      $ok = fwrite($this->socket,$this->add_crlf($str));
 
     if (!$ok)
     {