From 8a9c261f9a661840c5a21639260bfba35374275e Mon Sep 17 00:00:00 2001
From: Jared Hancock <jared@osticket.com>
Date: Wed, 10 Dec 2014 16:44:38 -0600
Subject: [PATCH] oops: Add two small utility functions

---
 include/class.ticket.php | 4 ++++
 include/class.topic.php  | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/include/class.ticket.php b/include/class.ticket.php
index 0d3296f1f..d25b006a0 100644
--- a/include/class.ticket.php
+++ b/include/class.ticket.php
@@ -411,6 +411,10 @@ class Ticket {
         return $this->ht['updated'];
     }
 
+    function getEffectiveDate() {
+        return $this->ht['lastupdate'];
+    }
+
     function getDueDate() {
         return $this->ht['duedate'];
     }
diff --git a/include/class.topic.php b/include/class.topic.php
index 8bc814c8d..375b6f2d1 100644
--- a/include/class.topic.php
+++ b/include/class.topic.php
@@ -250,6 +250,10 @@ class Topic extends VerySimpleModel {
         return true;
     }
 
+    function __toString() {
+        return $this->getFullName();
+    }
+
     /*** Static functions ***/
 
     static function create($vars=array()) {
-- 
GitLab