Fix PHP warnings.

remotes/angel/1.11.x
jmontoyaa 9 years ago
parent 094757e2d5
commit 94289d281d
  1. 32
      main/inc/lib/message.lib.php
  2. 11
      main/inc/lib/social.lib.php
  3. 4
      main/inc/lib/usergroup.lib.php
  4. 4
      main/social/group_topics.php
  5. 12
      main/social/group_view.php
  6. 7
      plugin/ticket/src/ticket.class.php

@ -1314,23 +1314,23 @@ class MessageManager
]);
if (api_is_platform_admin()) {
$links .= Display::url(
Display::returnFontAwesomeIcon('trash'),
'group_topics.php?action=delete&id='.$group_id.'&topic_id='.$topic_id,
[
'class' => 'btn btn-default'
]
);
Display::returnFontAwesomeIcon('trash'),
'group_topics.php?action=delete&id='.$group_id.'&topic_id='.$topic_id,
[
'class' => 'btn btn-default'
]
);
}
$links .= Display::url(
Display::returnFontAwesomeIcon('pencil'),
$urlEdit,
[
'class' => 'btn btn-default ajax',
'title' => get_lang('Edit'),
'data-title' => get_lang('Edit'),
'data-size' => 'lg'
]
);
Display::returnFontAwesomeIcon('pencil'),
$urlEdit,
[
'class' => 'btn btn-default ajax',
'title' => get_lang('Edit'),
'data-title' => get_lang('Edit'),
'data-size' => 'lg'
]
);
}
$urlReply = api_get_path(WEB_CODE_PATH);
@ -1358,7 +1358,7 @@ class MessageManager
$links.= '</div>';
$links.= '</div>';
$title = '<h4>'.Security::remove_XSS($main_message['title'].$delete_button, STUDENT, true).$links.'</h4>';
$title = '<h4>'.Security::remove_XSS($main_message['title'], STUDENT, true).$links.'</h4>';
$userPicture = $user_sender_info['avatar'];
$main_content .= '<div class="avatar-author">';

@ -1697,7 +1697,7 @@ class SocialManager extends UserManager
$groupId,
$userId
);
$profileEditionLink = null;
if ($currentUserId === $userId) {
@ -1815,7 +1815,7 @@ class SocialManager extends UserManager
* @param $show_full_profile
* @return string
*/
public static function listMyFriendsBlock($user_id, $link_shared, $show_full_profile)
public static function listMyFriendsBlock($user_id, $link_shared = '', $show_full_profile = '')
{
//SOCIALGOODFRIEND , USER_RELATION_TYPE_FRIEND, USER_RELATION_TYPE_PARENT
$friends = SocialManager::get_friends($user_id, USER_RELATION_TYPE_FRIEND);
@ -1828,8 +1828,9 @@ class SocialManager extends UserManager
$friendHtml.= '<div class="list-group">';
$j = 1;
for ($k=0; $k < $number_friends; $k++) {
if ($j > $number_of_images) break;
if ($j > $number_of_images) {
break;
}
if (isset($friends[$k])) {
$friend = $friends[$k];
$name_user = api_get_person_name($friend['firstName'], $friend['lastName']);
@ -1854,7 +1855,7 @@ class SocialManager extends UserManager
$friendHtml .= $friend_avatar.' <span class="username">' . $name_user . '</span>';
$friendHtml .= '<span class="status">' . $statusIcon . '</span>';
} else {
$link_shared = (empty($link_shared)) ? '' : '&'.$link_shared;
$link_shared = empty($link_shared) ? '' : '&'.$link_shared;
$friendHtml .= '<a href="profile.php?' .'u=' . $friend['friend_user_id'] . $link_shared . '" class="list-group-item">';
$friendHtml .= $friend_avatar.' <span class="username-all">' . $name_user . '</span>';
}

@ -2060,10 +2060,10 @@ class UserGroup extends Model
break;
}
if (!empty($links)) {
$list .= '<ul class="nav nav-pills">';
$list = '<ul class="nav nav-pills">';
$list .= $links;
$list .= '</ul>';
$html .= Display::panelCollapse(get_lang('SocialGroups'), $list, 'sm-groups', array(), 'groups-acordeon', 'groups-collapse');
$html .= Display::panelCollapse(get_lang('SocialGroups'), $list, 'sm-groups', array(), 'groups-acordeon', 'groups-collapse');
}
return $html;
}

@ -51,9 +51,7 @@ if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'delete') {
}
// My friends
$friend_html = SocialManager::listMyFriendsBlock(
$user_id,
$link_shared,
$show_full_profile
$user_id
);
$content = null;
$social_right_content = '';

@ -119,7 +119,7 @@ $usergroup = new UserGroup();
if ($group_id != 0) {
$group_info = $usergroup->get($group_id);
$interbreadcrumb[]= array ('url' =>'#','name' => $group_info['name']);
@ -236,14 +236,14 @@ if ($is_group_member || $group_info['visibility'] == GROUP_PERMISSION_OPEN) {
}
$members = $usergroup->get_users_by_group($group_id, true);
$member_content = '';
// My friends
$friend_html = SocialManager::listMyFriendsBlock(
$user_id,
$link_shared,
$show_full_profile
'',
''
);
// Members
if (count($members) > 0) {
if ($role == GROUP_USER_PERMISSION_ADMIN) {
@ -288,7 +288,7 @@ if ($is_group_member || $group_info['visibility'] == GROUP_PERMISSION_OPEN) {
}
$headers = array(get_lang('Discussions'), get_lang('Members'));
$socialForum = Display::tabs($headers, array($content, $member_content),'tabs');
} else {
// if I already sent an invitation message
if (!in_array(

@ -37,7 +37,7 @@ class TicketManager
{
$table_support_category = Database::get_main_table(TABLE_TICKET_CATEGORY);
$table_support_project = Database::get_main_table(TABLE_TICKET_PROJECT);
$order = empty($order) ? 'category.total_tickets DESC' : $order;
$sql = "SELECT category.*, project.other_area , project.email
FROM $table_support_category category, $table_support_project project
@ -1142,9 +1142,10 @@ class TicketManager
$keyword_category = Database::escape_string(
trim($_GET['keyword_category'])
);
$keyword_request_user = Database::escape_string(
$keyword_request_user = '';
/*$keyword_request_user = Database::escape_string(
trim($_GET['keyword_request_user'])
);
);*/
$keyword_admin = Database::escape_string(
trim($_GET['keyword_admin'])
);

Loading…
Cancel
Save