/**
  * Answer a Plugin history comment for an element. Extensions of this
  * class may wish to override this method to modify the comment and/or store
  * the import date/user instead of that listed in the history.
  * 
  * @param object DOMElement $element
  * @return string
  * @access protected
  * @since 1/25/08
  */
 protected function getPluginHistoryComment(DOMElement $element)
 {
     $agentMgr = Services::getService('Agent');
     $origComment = parent::getPluginHistoryComment($element);
     $origAgentId = parent::getPluginHistoryAgentId($element);
     $origAgent = $agentMgr->getAgent($origAgentId);
     $origTstamp = parent::getPluginHistoryTimestamp($element);
     $agent = $agentMgr->getAgent($this->getPluginHistoryAgentId($element));
     $tstamp = $this->getPluginHistoryTimestamp($element);
     // If there is no change in authoriship, just return the original comment.
     if (!$this->addChangedAgentComment($origAgentId, $agent->getId())) {
         return $origComment;
     }
     // Otherwise, note the change.
     $time = $tstamp->asTime();
     $tstampString = $tstamp->ymdString() . " " . $time->string12(false);
     $time = $origTstamp->asTime();
     $origTstampString = $origTstamp->ymdString() . " " . $time->string12(false);
     $additional = _("Imported by %agent% on %tstamp%, marked as being created by %origAgent% on %origTstamp%.");
     $additional = str_replace("%agent%", $agent->getDisplayName(), $additional);
     $additional = str_replace("%tstamp%", $tstampString, $additional);
     $additional = str_replace("%origAgent%", $origAgent->getDisplayName(), $additional);
     $additional = str_replace("%origTstamp%", $origTstampString, $additional);
     return $origComment . " " . $additional;
 }