PageRenderTime 55ms CodeModel.GetById 31ms RepoModel.GetById 1ms app.codeStats 0ms

/webroot/updates/concrete5.6.0.2/concrete/core/libraries/log_entry.php

https://bitbucket.org/microwebedu/registratie_carem
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
  1. <?php
  2. defined('C5_EXECUTE') or die("Access Denied.");
  3. class Concrete5_Library_LogEntry extends Object {
  4. public function getType() {return $this->logType;}
  5. public function getText() {return $this->logText;}
  6. public function getID() {return $this->logID;}
  7. public function getUserID() { return $this->logUserID;}
  8. public function getTimestamp($type = 'system') {
  9. if(ENABLE_USER_TIMEZONES && $type == 'user') {
  10. $dh = Loader::helper('date');
  11. $timestamp = $dh->getLocalDateTime($this->timestamp);
  12. } else {
  13. $timestamp = $this->timestamp;
  14. }
  15. return $timestamp;
  16. }
  17. /**
  18. * Returns a log entry by ID
  19. */
  20. public static function getByID($logID) {
  21. $db = Loader::db();
  22. $r = $db->Execute("select * from Logs where logID = ?", array($logID));
  23. if ($r) {
  24. $row = $r->FetchRow();
  25. $obj = new LogEntry();
  26. $obj->setPropertiesFromArray($row);
  27. return $obj;
  28. }
  29. }
  30. }