/** * Begins an audit journal with the specified description. * @param string $description A brief description detailing why an audit journal is being recorded. * @return boolean True if the operation completed successfully; false if the operation failed. */ public function BeginJournal($description) { global $MySQL; $userID = "NULL"; $user = User::GetCurernt(); if ($user != null) { $userID = $user->ID; } $query = "INSERT INTO " . System::$Configuration["Database.TablePrefix"] . "TenantJournals (journal_TenantID, journal_Description, journal_CreationTimestamp, journal_CreationUserID) VALUES (" . $this->ID . ", '" . $MySQL->real_escape_string($description) . "', NOW(), " . $userID . ")"; $result = $MySQL->query($query); if ($result === false) { return false; } $this->mvarJournalID = $MySQL->insert_id; return true; }