Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a5636bf2b5 | |||
| c0e25f5d10 | |||
| fc860c32ad | |||
| 69522b4836 |
@@ -681,16 +681,14 @@ class AnswerController extends Controller
|
||||
// But if that werent't the case, its value should have been tested
|
||||
// before assigning it to $responseTemp
|
||||
|
||||
if($answer->getCompany()){
|
||||
if($answer->getAd()){
|
||||
$responseTemp = $answer->getAd()->getTitle();
|
||||
}else{
|
||||
$responseTemp = "Candidature spontanée";
|
||||
}
|
||||
|
||||
if($answer->getAd()){
|
||||
$responseTemp = $answer->getAd()->getTitle();
|
||||
}else{
|
||||
$responseTemp = "ND";
|
||||
$responseTemp = "Candidature spontanée";
|
||||
}
|
||||
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -35,9 +35,9 @@ class MediaController extends Controller
|
||||
*/
|
||||
public function companyMediaAction(Request $request)
|
||||
{
|
||||
$event = new UserEvent($this->getUser());
|
||||
//$event = new UserEvent($this->getUser());
|
||||
$company = $this->getUser()->getCompany();
|
||||
$this->get('event_dispatcher')->dispatch(PrestashopBridgeEvents::USER_PROD_UPDATE, $event);
|
||||
//$this->get('event_dispatcher')->dispatch(PrestashopBridgeEvents::USER_PROD_UPDATE, $event);
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$medias = $em->getRepository('AppBundle:Media')->findBy(array('creator' => $this->getUser()));
|
||||
$form = $this->createForm(MediaType::class);
|
||||
@@ -66,8 +66,8 @@ class MediaController extends Controller
|
||||
*/
|
||||
public function territoryMediaAction(Request $request)
|
||||
{
|
||||
$event = new UserEvent($this->getUser());
|
||||
$this->get('event_dispatcher')->dispatch(PrestashopBridgeEvents::USER_PROD_UPDATE, $event);
|
||||
//$event = new UserEvent($this->getUser());
|
||||
//$this->get('event_dispatcher')->dispatch(PrestashopBridgeEvents::USER_PROD_UPDATE, $event);
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$medias = $em->getRepository('AppBundle:Media')->findBy(array('creator' => $this->getUser()));
|
||||
$form = $this->createForm(MediaType::class);
|
||||
|
||||
@@ -190,12 +190,14 @@ class AnswerRepository extends AbstractRepository
|
||||
->join('a.user', 'user')
|
||||
->leftjoin('a.ad', 'ad')
|
||||
->leftjoin('a.video', 'video')
|
||||
->leftjoin('a.company', 'company');
|
||||
->leftjoin('a.company', 'c')
|
||||
->leftjoin('ad.company', 'company');
|
||||
$countQuery
|
||||
->join('a.user', 'user')
|
||||
->leftjoin('a.ad', 'ad')
|
||||
->leftjoin('a.video', 'video')
|
||||
->leftjoin('a.company', 'company');
|
||||
->leftjoin('a.company', 'c')
|
||||
->leftjoin('ad.company', 'company');
|
||||
// $countQuery
|
||||
// ->join('town.department', 'department')
|
||||
// ->join('department.region', 'region');
|
||||
@@ -205,8 +207,8 @@ class AnswerRepository extends AbstractRepository
|
||||
{
|
||||
// No
|
||||
// However, add a "always true" condition to keep an uniform treatment in all cases
|
||||
$query->where("company.id=".$otherConditions);
|
||||
$countQuery->where("company.id=".$otherConditions);
|
||||
$query->where("(company.id=".$otherConditions." OR c.id=".$otherConditions.")");
|
||||
$countQuery->where("(company.id=".$otherConditions." OR c.id=".$otherConditions.")");
|
||||
$query->andWhere("a.status='SENDED'");
|
||||
$countQuery->andWhere("a.status='SENDED'");
|
||||
}else{
|
||||
|
||||
Reference in New Issue
Block a user