<commit_before><?php
/**
 * Action that allow user to confirm anything that you want ;')
 *
 * @package    sfDoctrineGuardConfirmPlugin
 * @subpackage modules.sfGuardConfirm.actions
 * @author     <NAME> <<EMAIL>>
 */
class ConfirmAction extends sfAction
{
    /**
     * @param sfWebRequest $request
     */
    public function execute($request)
    {
        $hash = (string)$request->getParameter('hash');
        $kind = (string)$request->getParameter('kind');

        $sfGuardConfirm = sfGuardConfirmTable::getInstance()->findOneActiveByHash($hash, sfConfig::get('app_sfDoctrineGuardConfirmPlugin_expire_'.$kind, 604800));

        $this->forward404Unless($sfGuardConfirm instanceof sfGuardConfirm);

        $sfGuardConfirm->setConfirm(true);
        $sfGuardConfirm->save();

        $this->dispatcher->notify(new sfEvent($sfGuardConfirm, 'sf_doctrine_guard_confirm_plugin.confirm_success', array('hash' => $hash, 'kind' => $kind)));

        $url = sfConfig::get('app_sfDoctrineGuardConfirmPlugin_success_confirm_url_'.$kind, '@homepage');
        if ($url) {
            $this->redirect($url);
        }
    }
}<commit_msg>Changed notification's name in ConfirmAction.<commit_after><?php
/**
 * Action that allow user to confirm anything that you want ;')
 *
 * @package    sfDoctrineGuardConfirmPlugin
 * @subpackage modules.sfGuardConfirm.actions
 * @author     <NAME> <<EMAIL>>
 */
class ConfirmAction extends sfAction
{
    /**
     * @param sfWebRequest $request
     */
    public function execute($request)
    {
        $hash = (string)$request->getParameter('hash');
        $kind = (string)$request->getParameter('kind');

        $sfGuardConfirm = sfGuardConfirmTable::getInstance()->findOneActiveByHash($hash, sfConfig::get('app_sfDoctrineGuardConfirmPlugin_expire_'.$kind, 604800));

        $this->forward404Unless($sfGuardConfirm instanceof sfGuardConfirm);

        $sfGuardConfirm->setConfirm(true);
        $sfGuardConfirm->save();

        $this->dispatcher->notify(new sfEvent($sfGuardConfirm, 'sf_doctrine_guard_confirm_plugin.confirm_success_'.$kind));

        $url = sfConfig::get('app_sfDoctrineGuardConfirmPlugin_success_confirm_url_'.$kind, '@homepage');
        if ($url) {
            $this->redirect($url);
        }
    }
}
{'fraction_non_alphanumeric': 0.1413427561837456, 'fraction_numerical': 0.007950530035335688, 'mean_word_length': 3.9132321041214753, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 29, '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': '1082697', 'n_tokens_mistral': 661, 'n_tokens_neox': 639, 'n_words': 108}