<commit_before><?php
namespace Craft;

/**
 * Asset Count Controller
 */
class AssetCountController extends BaseController
{
    /**
     * Reset count
     */
    public function actionReset()
    {
        $assetId = craft()->request->getRequiredParam('assetId');

        craft()->assetCount->reset($assetId);

        craft()->userSession->setNotice(Craft::t('Asset count reset.'));

        $this->redirect('assetcount');
    }

    public function actionCount()
    {
        $assetId = craft()->request->getRequiredParam('id');

        craft()->assetCount->increment($assetId);

        $asset = craft()->assets->getFileById($assetId);

        $this->redirect($asset->url);
    }

}<commit_msg>fix to actually let anonymous users view assets<commit_after><?php
namespace Craft;

/**
 * Asset Count Controller
 */
class AssetCountController extends BaseController
{
    protected $allowAnonymous = array('actionCount');
    
    /**
     * Reset count
     */
    public function actionReset()
    {
        $assetId = craft()->request->getRequiredParam('assetId');

        craft()->assetCount->reset($assetId);

        craft()->userSession->setNotice(Craft::t('Asset count reset.'));

        $this->redirect('assetcount');
    }

    public function actionCount()
    {
        $assetId = craft()->request->getRequiredParam('id');

        craft()->assetCount->increment($assetId);

        $asset = craft()->assets->getFileById($assetId);

        $this->redirect($asset->url);
    }

}
{'fraction_non_alphanumeric': 0.16344229486324216, 'fraction_numerical': 0.0, 'mean_word_length': 2.9787798408488064, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 33, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '5281303', 'n_tokens_mistral': 419, 'n_tokens_neox': 398, 'n_words': 72}