<commit_before><?php

/**
 * CommentController.php
 * controller used to manage operation on the comment object
 * 
 * Revision History:
 *      19.03.2015: created, doaa elfayoumi
 * 
 */

namespace Acme\bsceneBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Session\Session;



class CommentController extends Controller
{
   /**
    * doaa elfayoumi
    * function that get the list of new comment given the last login of the admin
    * @param type $lastLogin
    * @return type
    */
    public function adminIndexAction($lastLogin)
    {   
        //check if the admin is logged in
        if($request->getSession()->get('admin') == null)
        {
           return $this->redirect($this->generateUrl('acmebscene_login'));
        }
        
        $em = $this->getDoctrine()->getEntityManager();
        //$repository = $em->getRepository('\Acme\bsceneBundle\Entity\EventComments');
      
        $q = $em->createQuery("select e from \Acme\bsceneBundle\Entity\EventComments e where e.commentTime >= '$lastLogin'");
        $commentList = $q->getResult();

<commit_msg>a small fix<commit_after><?php

/**
 * CommentController.php
 * controller used to manage operation on the comment object
 * 
 * Revision History:
 *      19.03.2015: created, doaa elfayoumi
 * 
 */

namespace Acme\bsceneBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Session\Session;



class CommentController extends Controller
{
   /**
    * doaa elfayoumi
    * function that get the list of new comment given the last login of the admin
    * @param type $lastLogin
    * @return type
    */
    public function adminIndexAction(Request $request,$lastLogin)
    {   
        //check if the admin is logged in
        if($request->getSession()->get('admin') == null)
        {
           return $this->redirect($this->generateUrl('acmebscene_login'));
        }
        
        $em = $this->getDoctrine()->getEntityManager();
        //$repository = $em->getRepository('\Acme\bsceneBundle\Entity\EventComments');
      
        $q = $em->createQuery("select e from \Acme\bsceneBundle\Entity\EventComments e where e.commentTime >= '$lastLogin'");
        $commentList = $q->getResult();


{'fraction_non_alphanumeric': 0.12088370154230929, 'fraction_numerical': 0.006669445602334306, 'mean_word_length': 3.0816326530612246, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 23, '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': '2648199', 'n_tokens_mistral': 691, 'n_tokens_neox': 671, 'n_words': 163}