diff --git a/include/class.dept.php b/include/class.dept.php
index f11727ba4a0ccd155e36649a980e31acd476ed4f..0eae779c9eb13f19c225f0c2ff6e15d366fb28b2 100644
--- a/include/class.dept.php
+++ b/include/class.dept.php
@@ -281,23 +281,6 @@ class Dept {
         return $num;
     }
 
-    //Replace staff's variables
-    function replaceVariables($text, $prefix='dept') {
-
-        $manager = $this->getManager();
-
-        $prefix = rtrim($prefix, '.');
-        $search = array("/%$prefix.name/", "/%$prefix.manager/", "/%$prefix.signature/");
-        $replace = array($this->getName(),
-                         ($manager?$manager->getName():''),
-                         $this->getSignature());
-        while ($text != ($T = preg_replace($search, $replace, $text))) {
-            $text = $T;
-        }
-
-        return $text;
-    }
-
     /*----Static functions-------*/
 	function getIdByName($name) {
         $id=0;
diff --git a/include/class.staff.php b/include/class.staff.php
index e83a403070d0297dcb05552ca2979aa2980373fc..ace8f2a0b785c2b31d6fc0d490d0f21113fad9a4 100644
--- a/include/class.staff.php
+++ b/include/class.staff.php
@@ -506,28 +506,7 @@ class Staff {
         return $num;
     }
 
-    //Replace staff's variables
-    function replaceVariables($text, $prefix='staff') {
-
-        $prefix = rtrim($prefix, '.');
-        $search = array("/%$prefix.username/", "/%$prefix.firstname/", "/%$prefix.lastname/", 
-                        "/%$prefix.name/", "/%$prefix.email/", "/%$prefix.signature/");
-        $replace = array($this->getUserName(),
-                         $this->getFirstName(),
-                         $this->getLastName(),
-                         $this->getName(),
-                         $this->getEmail(),
-                         $this->getSignature());
-
-        while ($text != ($T = preg_replace($search,$replace,$text))) {
-            $text = $T;
-        }
-
-        return $text;
-    }
-
     /**** Static functions ********/
-
     function getStaffMembers($availableonly=false) {
 
         $sql='SELECT s.staff_id,CONCAT_WS(", ",s.lastname, s.firstname) as name '
diff --git a/include/class.team.php b/include/class.team.php
index 7c9ac03f972d11a09a83fd0a6cf1e983980d96c4..367815b9637d7ab24d9e295379d11a1f6601df74 100644
--- a/include/class.team.php
+++ b/include/class.team.php
@@ -173,21 +173,6 @@ class Team {
         return true;
     }
 
-    //Replace staff's variables
-    function replaceVariables($text, $prefix='team') {
-
-        $lead = $this->getLead();
-
-        $prefix = rtrim($prefix, '.');
-        $search = array("/%$prefix.name/", "/%$prefix.lead/");
-        $replace = array($this->getName(), ($lead?$lead->getName():''));
-        while ($text != ($T = preg_replace($search, $replace, $text))) {
-            $text = $T;
-        }
-
-        return $text;
-    }
-
     /* ----------- Static function ------------------*/
     function lookup($id) {
         return ($id && is_numeric($id) && ($team= new Team($id)) && $team->getId()==$id)?$team:null;