<commit_before><?php

class StatusController extends \BaseController {

  public function status() {
    $user = Auth::user();

    // Get all info about application status.
    $application = Application::where('user_id', $user->id)->first();
    $profile = Profile::where('user_id', $user->id)->first();
    if ($application)
    {
      // Get recommendations
      $recommendations = Recommendation::where('application_id', $application->id)->get();

      foreach($recommendations as $rec)
      {
        $rec->isRecommendationComplete($rec);
      }
    }

    return View::make('status.index', compact('profile', 'application', 'recommendations'));
  }

  //@TODO refactor, move and combine into one function... etc etc. this code is the worst.
  public function resendEmailRequest()
  {
    $rec_id = Input::get('id');
    $recommendation = Recommendation::whereId($rec_id)->firstOrFail();
    $to = $recommendation->email;
    $from = Auth::user()->first_name .  " " . Auth::user()->last_name;
    $scholarship = Scholarship::firstOrFail()->pluck('title'); // @TODO: get the real scholarship
    $subject = $from . " would like you pleaseeee to to be a recommender for the " . $scholarship . " scholarship";

    $data = array(
      'to' => $to,
      'subject' => $subject,
      'applicant' => $from,
      'recommendation_id' => $recommendation->id,
      'token' => $recommendation->generateRecToken($recommendation)
    );
    Mail::send('emails.recommendation.request', $data, function($message) use ($data)
    {
      $message->to($data['to'])->subject($data['subject']);
    });

    return Redirect::route('status')->with('flash_message', 'We sent another email!');
  }

}
<commit_msg>Commented out broken email request, waiting on new copy?<commit_after><?php

class StatusController extends \BaseController {

  public function status() {
    $user = Auth::user();

    // Get all info about application status.
    $application = Application::where('user_id', $user->id)->first();
    $profile = Profile::where('user_id', $user->id)->first();
    if ($application)
    {
      // Get recommendations
      $recommendations = Recommendation::where('application_id', $application->id)->get();

      foreach($recommendations as $rec)
      {
        $rec->isRecommendationComplete($rec);
      }
    }

    return View::make('status.index', compact('profile', 'application', 'recommendations'));
  }

  //@TODO refactor, move and combine into one function... etc etc. this code is the worst.
  public function resendEmailRequest()
  {
    // @todo: redo this depending on copy.
    // $rec_id = Input::get('id');
    // $recommendation = Recommendation::whereId($rec_id)->firstOrFail();
    // $to = $recommendation->email;
    // $from = Auth::user()->first_name .  " " . Auth::user()->last_name;
    // $scholarship = Scholarship::firstOrFail()->pluck('title'); // @TODO: get the real scholarship
    // $subject = $from . " would like you pleaseeee to to be a recommender for the " . $scholarship . " scholarship";

    // $data = array(
    //   'to' => $to,
    //   'subject' => $subject,
    //   'applicant' => $from,
    //   'recommendation_id' => $recommendation->id,
    //   'token' => $recommendation->generateRecToken($recommendation)
    // );
    // Mail::send('emails.recommendation.request', $data, function($message) use ($data)
    // {
    //   $message->to($data['to'])->subject($data['subject']);
    // });

    return Redirect::route('status')->with('flash_message', 'We sent another email!');
  }

}

{'fraction_non_alphanumeric': 0.1794871794871795, 'fraction_numerical': 0.0, 'mean_word_length': 3.37192118226601, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 47, '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': '1540903', 'n_tokens_mistral': 1105, 'n_tokens_neox': 1058, 'n_words': 236}