Esempio n. 1
0
 /**
  * @param array $logUser
  * @param array $content
  * @param $action
  * @param array $actionParams
  * @param null $parentContent
  * @return mixed
  */
 protected function _log(array $logUser, array $content, $action, array $actionParams = array(), $parentContent = null)
 {
     $dw = XenForo_DataWriter::create('XenForo_DataWriter_ModeratorLog');
     $dw->bulkSet(array('user_id' => $logUser['user_id'], 'content_type' => sonnb_XenGallery_Model_Photo::$xfContentType, 'content_id' => $content['content_id'], 'content_user_id' => $content['user_id'], 'content_username' => $content['username'], 'content_title' => XenForo_Helper_String::wordWrapString($content['title'], 140), 'content_url' => XenForo_Link::buildPublicLink('gallery/photos', $content), 'discussion_content_type' => sonnb_XenGallery_Model_Photo::$xfContentType, 'discussion_content_id' => $content['content_id'], 'action' => $action, 'action_params' => $actionParams));
     $dw->save();
     return $dw->get('moderator_log_id');
 }
Esempio n. 2
0
 /**
  * Wraps and HTML escapes the given string.
  *
  * @param string $string
  * @param integer|null $breakLength
  */
 public static function helperWrap($string, $breakLength)
 {
     return htmlspecialchars(XenForo_Helper_String::wordWrapString($string, $breakLength));
 }