<commit_before><?php defined('SYSPATH') or die('No direct access allowed.');
/**
 * NewsfeedItem Venue
 *
 * @package    Venues
 * @author     <NAME>
 * @copyright  (c) 2010 <NAME>
 * @license    http://www.opensource.org/licenses/mit-license.php MIT license
 */
class Anqh_NewsfeedItem_Venues extends NewsfeedItem {

	/**
	 * Add a new venue
	 *
	 * Data: venue_id
	 */
	const TYPE_VENUE = 'venue';

	/**
	 * Edit a venue
	 *
	 * Data: venue_id
	 */
	const TYPE_VENUE_EDIT = 'venue_edit';


	/**
	 * Get newsfeed item as HTML
	 *
	 * @static
	 * @param   Model_NewsfeedItem  $item
	 * @return  string
	 */
	public static function get(Model_NewsFeedItem $item) {
		$text = '';
		switch ($item->type) {

			case self::TYPE_VENUE:
		    $venue = Jelly::select('venue')->load($item->data['venue_id']);
		    if ($venue->loaded()) {
			    $text = __('added new venue :venue', array(
				    ':venue' => HTML::anchor(Route::model($venue), HTML::chars($venue->name))
			    ));
		    }
		    break;

			case self::TYPE_VENUE_EDIT:
		    $venue = Jelly::select('venue')->load($item->data['venue_id']);
		    if ($venue->loaded()) {
			    $text = __('updated venue :venue', array(
				    ':venue' => HTML::anchor(Route::model($venue), HTML::chars($venue->name))
			    ));<commit_msg>Icons and line break<commit_after><?php defined('SYSPATH') or die('No direct access allowed.');
/**
 * NewsfeedItem Venue
 *
 * @package    Venues
 * @author     <NAME>
 * @copyright  (c) 2010 <NAME>
 * @license    http://www.opensource.org/licenses/mit-license.php MIT license
 */
class Anqh_NewsfeedItem_Venues extends NewsfeedItem {

	/**
	 * Add a new venue
	 *
	 * Data: venue_id
	 */
	const TYPE_VENUE = 'venue';

	/**
	 * Edit a venue
	 *
	 * Data: venue_id
	 */
	const TYPE_VENUE_EDIT = 'venue_edit';


	/**
	 * Get newsfeed item as HTML
	 *
	 * @static
	 * @param   Model_NewsfeedItem  $item
	 * @return  string
	 */
	public static function get(Model_NewsFeedItem $item) {
		$text = '';
		switch ($item->type) {

			case self::TYPE_VENUE:
		    $venue = Jelly::select('venue')->load($item->data['venue_id']);
		    if ($venue->loaded()) {
			    $text = __('added new venue<br />:venue', array(
				    ':venue' => HTML::anchor(Route::model($venue), HTML::chars($venue->name), array('class' => 'venue'))
			    ));
		    }
		    break;

			case self::TYPE_VENUE_EDIT:
		    $venue = Jelly::select('venue')->load($item->data['venue_id']);
		    if ($venue->loaded()) {
			    $text = __('updated venue<br />:venue', array(
				    ':venue' => HTML::anchor(Route::model($venue), HTML::chars($venue->name), array('class' => 'venue'))
			    ));
{'fraction_non_alphanumeric': 0.18486116394066185, 'fraction_numerical': 0.0030429821224800305, 'mean_word_length': 3.1482649842271293, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 33, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6120772', 'n_tokens_mistral': 987, 'n_tokens_neox': 852, 'n_words': 189}