| Línea 500... |
Línea 500... |
| 500 |
return trim(strtolower($str));
|
500 |
return trim(strtolower($str));
|
| 501 |
}
|
501 |
}
|
| Línea 502... |
Línea 502... |
| 502 |
|
502 |
|
| Línea 503... |
Línea 503... |
| 503 |
private function renderFeed($id , $now){
|
503 |
private function renderFeed($id , $now){
|
| 504 |
|
- |
|
| 505 |
$sandbox = $this->config['leaderslinked.runmode.sandbox'];
|
- |
|
| 506 |
if($sandbox) {
|
- |
|
| 507 |
$company_profile_url = $this->config['leaderslinked.frontend.sandbox_company_profile'];
|
- |
|
| 508 |
$user_profile_url = $this->config['leaderslinked.frontend.sandbox_user_profile'];
|
- |
|
| 509 |
|
- |
|
| 510 |
} else {
|
504 |
|
| 511 |
$company_profile_url = $this->config['leaderslinked.frontend.production_company_profile'];
|
- |
|
| Línea 512... |
Línea 505... |
| 512 |
$user_profile_url = $this->config['leaderslinked.frontend.production_user_profile'];
|
505 |
$currentNetworkPlugin = $this->plugin('currentNetworkPlugin');
|
| 513 |
}
|
506 |
$network = $currentNetworkPlugin->getNetwork();
|
| 514 |
|
507 |
|
| Línea 545... |
Línea 538... |
| 545 |
];
|
538 |
];
|
| Línea 546... |
Línea 539... |
| 546 |
|
539 |
|
| 547 |
$userMapper = UserMapper::getInstance($this->adapter);
|
540 |
$userMapper = UserMapper::getInstance($this->adapter);
|
| 548 |
$user = $userMapper->fetchOne($feed->user_id);
|
541 |
$user = $userMapper->fetchOne($feed->user_id);
|
| 549 |
$item['feed_delete_url'] = $this->url()->fromRoute('my-trainer/question/answer/delete', $params);
|
542 |
$item['feed_delete_url'] = $this->url()->fromRoute('my-trainer/question/answer/delete', $params);
|
| 550 |
$item['owner_url'] = str_replace('[uuid]', $company->uuid, $company_profile_url);
|
543 |
$item['owner_url'] = 'https://'. $network->main_hostname . '/company/view/' .$company->uuid;
|
| 551 |
$item['owner_image'] = $this->url()->fromRoute('storage', ['code' => $company->uuid, 'type' => 'user', 'filename' => $company->image]);
|
544 |
$item['owner_image'] = $this->url()->fromRoute('storage', ['code' => $company->uuid, 'type' => 'user', 'filename' => $company->image]);
|
| Línea 552... |
Línea 545... |
| 552 |
$item['owner_name'] = $company->name;
|
545 |
$item['owner_name'] = $company->name;
|
| Línea 591... |
Línea 584... |
| 591 |
$comment_count++;
|
584 |
$comment_count++;
|
| 592 |
$comment['comment_index']=$comment_count;
|
585 |
$comment['comment_index']=$comment_count;
|
| 593 |
$user = $userMapper->fetchOne($record->user_id);
|
586 |
$user = $userMapper->fetchOne($record->user_id);
|
| 594 |
if($user->id == $owner->user_id) {
|
587 |
if($user->id == $owner->user_id) {
|
| 595 |
$comment['user_image'] = $this->url()->fromRoute('storage', ['type' => 'company', 'code' => $company->uuid, 'filename' => $company->image ]);
|
588 |
$comment['user_image'] = $this->url()->fromRoute('storage', ['type' => 'company', 'code' => $company->uuid, 'filename' => $company->image ]);
|
| 596 |
$comment['user_url'] = str_replace('[uuid]', $company->uuid, $company_profile_url);
|
589 |
$comment['user_url'] = 'https://'. $network->main_hostname . '/company/view/' . $company->uuid;
|
| 597 |
$comment['user_name'] = $company->name;
|
590 |
$comment['user_name'] = $company->name;
|
| 598 |
} else {
|
591 |
} else {
|
| 599 |
$comment['user_image'] = $this->url()->fromRoute('storage', ['type' => 'user', 'code' => $user->uuid, 'filename' => $user->image ]);
|
592 |
$comment['user_image'] = $this->url()->fromRoute('storage', ['type' => 'user', 'code' => $user->uuid, 'filename' => $user->image ]);
|
| 600 |
$comment['user_url'] = str_replace('[uuid]', $user->uuid, $user_profile_url);
|
593 |
$comment['user_url'] = 'https://'. $network->main_hostname . '/profile/view/' . $user->uuid;
|
| 601 |
$comment['user_name'] = $user->first_name . ' ' . $user->last_name;
|
594 |
$comment['user_name'] = $user->first_name . ' ' . $user->last_name;
|
| 602 |
}
|
595 |
}
|
| 603 |
$comment['link_delete'] = $this->url()->fromRoute('my-trainer/question/answer/comments/delete',['id' => $feed->uuid, 'comment' => $record->uuid ]);
|
596 |
$comment['link_delete'] = $this->url()->fromRoute('my-trainer/question/answer/comments/delete',['id' => $feed->uuid, 'comment' => $record->uuid ]);
|
| Línea 620... |
Línea 613... |
| 620 |
|
613 |
|
| 621 |
|
614 |
|
| 622 |
$user = $userMapper->fetchOne($record2->user_id);
|
615 |
$user = $userMapper->fetchOne($record2->user_id);
|
| 623 |
if($user->id == $owner->user_id) {
|
616 |
if($user->id == $owner->user_id) {
|
| 624 |
$answer['user_image'] = $this->url()->fromRoute('storage', ['type' => 'company', 'code' => $company->uuid, 'filename' => $company->image ]);
|
617 |
$answer['user_image'] = $this->url()->fromRoute('storage', ['type' => 'company', 'code' => $company->uuid, 'filename' => $company->image ]);
|
| 625 |
$answer['user_url'] = str_replace('[uuid]', $company->uuid, $company_profile_url);
|
618 |
$answer['user_url'] = 'https://'. $network->main_hostname . '/company/view/' . $company->uuid;
|
| 626 |
$answer['user_name'] = $company->name;
|
619 |
$answer['user_name'] = $company->name;
|
| 627 |
} else {
|
620 |
} else {
|
| 628 |
$answer['user_image'] = $this->url()->fromRoute('storage', ['type' => 'user', 'code' => $user->uuid, 'filename' => $user->image ]);
|
621 |
$answer['user_image'] = $this->url()->fromRoute('storage', ['type' => 'user', 'code' => $user->uuid, 'filename' => $user->image ]);
|
| 629 |
$answer['user_url'] = str_replace('[uuid]', $user->uuid, $user_profile_url);
|
622 |
$answer['user_url'] = 'https://'. $network->main_hostname . '/profile/view/' .$user->uuid;
|
| Línea 630... |
Línea 623... |
| 630 |
$answer['user_name'] = $user->first_name . ' ' . $user->last_name;
|
623 |
$answer['user_name'] = $user->first_name . ' ' . $user->last_name;
|
| Línea 960... |
Línea 953... |
| 960 |
|
953 |
|
| 961 |
$companyUserMapper = CompanyUserMapper::getInstance($this->adapter);
|
954 |
$companyUserMapper = CompanyUserMapper::getInstance($this->adapter);
|
| Línea 962... |
Línea -... |
| 962 |
$owner = $companyUserMapper->fetchOwnerByCompanyId($currentCompany->id);
|
- |
|
| 963 |
|
955 |
$owner = $companyUserMapper->fetchOwnerByCompanyId($currentCompany->id);
|
| 964 |
|
- |
|
| 965 |
|
- |
|
| 966 |
$sandbox = $this->config['leaderslinked.runmode.sandbox'];
|
- |
|
| 967 |
if($sandbox) {
|
- |
|
| 968 |
$company_profile_url = $this->config['leaderslinked.frontend.sandbox_company_profile'];
|
- |
|
| 969 |
$user_profile_url = $this->config['leaderslinked.frontend.sandbox_user_profile'];
|
956 |
|
| 970 |
} else {
|
- |
|
| 971 |
$company_profile_url = $this->config['leaderslinked.frontend.production_company_profile'];
|
- |
|
| Línea 972... |
Línea 957... |
| 972 |
$user_profile_url = $this->config['leaderslinked.frontend.production_user_profile'];
|
957 |
|
| Línea 973... |
Línea 958... |
| 973 |
}
|
958 |
$currentNetworkPlugin = $this->plugin('currentNetworkPlugin');
|
| 974 |
|
959 |
$network = $currentNetworkPlugin->getNetwork();
|
| Línea 992... |
Línea 977... |
| 992 |
|
977 |
|
| 993 |
|
978 |
|
| 994 |
$user = $userMapper->fetchOne($record->user_id);
|
979 |
$user = $userMapper->fetchOne($record->user_id);
|
| 995 |
if($user->id == $owner->user_id) {
|
980 |
if($user->id == $owner->user_id) {
|
| 996 |
$item['user_image'] = $this->url()->fromRoute('storage', ['type' => 'company', 'code' => $company->uuid, 'filename' => $company->image ]);
|
981 |
$item['user_image'] = $this->url()->fromRoute('storage', ['type' => 'company', 'code' => $company->uuid, 'filename' => $company->image ]);
|
| 997 |
$item['user_url'] = str_replace('[uuid]', $company->uuid, $company_profile_url);
|
982 |
$item['user_url'] = 'https://'. $network->main_hostname . '/company/view/' . $company->uuid;
|
| 998 |
$item['user_name'] = $company->name;
|
983 |
$item['user_name'] = $company->name;
|
| 999 |
} else {
|
984 |
} else {
|
| 1000 |
$item['user_image'] = $this->url()->fromRoute('storage', ['type' => 'user', 'code' => $user->uuid, 'filename' => $user->image ]);
|
985 |
$item['user_image'] = $this->url()->fromRoute('storage', ['type' => 'user', 'code' => $user->uuid, 'filename' => $user->image ]);
|
| 1001 |
$item['user_url'] = str_replace('[uuid]', $user->uuid, $user_profile_url);
|
986 |
$item['user_url'] = 'https://'. $network->main_hostname . '/profile/view/' . $user->uuid;
|