/webroot/updates/concrete5.6.0.2/concrete/core/libraries/log_entry.php
PHP | 39 lines | 27 code | 9 blank | 3 comment | 5 complexity | 68cf3975403226f561ec38b38d284c7b MD5 | raw file
Possible License(s): MIT, LGPL-2.1, BSD-3-Clause
- <?php
- defined('C5_EXECUTE') or die("Access Denied.");
-
- class Concrete5_Library_LogEntry extends Object {
-
- public function getType() {return $this->logType;}
- public function getText() {return $this->logText;}
- public function getID() {return $this->logID;}
- public function getUserID() { return $this->logUserID;}
-
- public function getTimestamp($type = 'system') {
- if(ENABLE_USER_TIMEZONES && $type == 'user') {
- $dh = Loader::helper('date');
- $timestamp = $dh->getLocalDateTime($this->timestamp);
- } else {
- $timestamp = $this->timestamp;
- }
- return $timestamp;
- }
- /**
- * Returns a log entry by ID
- */
- public static function getByID($logID) {
- $db = Loader::db();
- $r = $db->Execute("select * from Logs where logID = ?", array($logID));
- if ($r) {
- $row = $r->FetchRow();
- $obj = new LogEntry();
- $obj->setPropertiesFromArray($row);
- return $obj;
- }
- }
-
-
- }