private function assembleContents($identifier, $contents) { $new_contents = ""; if (is_numeric($identifier)) { $new_contents = $this->getContents($identifier); } $datetime = new DateTime(); Filter_Datetime::user_zone($datetime); $datetime = $datetime->format(DATE_RSS); $session_logic = Session_Logic::getInstance(); $user = $session_logic->currentUser(); $new_contents .= "<p>{$user} ({$datetime}):</p>\n"; if ($contents == "<br>") { $contents = ""; } $lines = explode("\n", $contents); foreach ($lines as $line) { $line = trim($line); $new_contents .= "<p>{$line}</p>\n"; } return $new_contents; }