Skip to content

Commit

Permalink
Portfolio: Improve filtering + code style - refs #3626
Browse files Browse the repository at this point in the history
  • Loading branch information
ywarnier committed Nov 18, 2020
1 parent 9e7a427 commit 82828af
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions main/inc/lib/social.lib.php
Expand Up @@ -2469,12 +2469,12 @@ public static function getWallForm($urlForm)
*/
public static function getWallFormPortfolio($urlForm)
{
$userId = (int) isset($_GET['u']) ? $_GET['u'] : '';
$userId = isset($_GET['u']) ? (int) $_GET['u'] : '';
$userId = ($userId!=0) ? $userId : api_get_user_id();
$user_info = api_get_user_info($userId);
$portfolioName = ' '.$userId;
$friend = true;
if($userId != api_get_user_id()){
if ($userId != api_get_user_id()){
$portfolioName = $user_info['complete_name'];
$friend = self::get_relation_between_contacts(api_get_user_id(), $userId);
}
Expand Down
6 changes: 3 additions & 3 deletions main/social/profile.php
Expand Up @@ -20,7 +20,7 @@
header('Location: '.$url);
exit;
}
$portfolioRequest = (isset($_GET['p']))?true:false;
$portfolioRequest = isset($_GET['p']) ? true : false;
$productionString = '';
$bossId = isset($_REQUEST['sup']) ? (int) $_REQUEST['sup'] : 0;
$user_id = api_get_user_id();
Expand Down Expand Up @@ -289,10 +289,10 @@

$tpl->assign('social_friend_block', $friend_html);
$tpl->assign('social_menu_block', $menu);
if($portfolioRequest == true && api_get_setting('extended_profile') == true){
if ($portfolioRequest == true && api_get_setting('extended_profile') == true) {
$tpl->assign('add_post_form', $addPostFormPortfolio);
$socialRightInformation = null;
}else{
} else {
$tpl->assign('add_post_form', $addPostForm);
}
$tpl->assign('posts', $posts);
Expand Down

0 comments on commit 82828af

Please sign in to comment.