@ -1080,14 +1089,14 @@ class UserGroup extends Model
/**
* Creates new group pictures in various sizes of a user, or deletes user pfotos.
* Note: This method relies on configuration setting from main/inc/conf/profile.conf.php
* @param int The group id
* @param string $file The common file name for the newly created photos.
* @param int The group id
* @param string $file The common file name for the newly created photos.
* It will be checked and modified for compatibility with the file system.
* If full name is provided, path component is ignored.
* If an empty name is provided, then old user photos are deleted only,
* @see UserManager::delete_user_picture() as the prefered way for deletion.
* @param string $source_file The full system name of the image from which user photos will be created.
* @return mixed Returns the resulting common file name of created images which usually should be stored in database.
* @param string $source_file The full system name of the image from which user photos will be created.
* @return mixed Returns the resulting common file name of created images which usually should be stored in database.
* When an image is removed the function returns an empty string. In case of internal error or negative validation it returns FALSE.
*/
public function update_group_picture($group_id, $file = null, $source_file = null)
@ -1233,7 +1242,7 @@ class UserGroup extends Model
WHERE usergroup_id = $id";
Database::query($sql);*/
$result = parent::delete($id);
parent::delete($id);
}
/**
@ -1401,8 +1410,13 @@ class UserGroup extends Model
* @param string style css
* @return array with the file and the style of an image i.e $array['file'] $array['style']
*/
public function get_picture_group($id, $picture_file, $height, $size_picture = GROUP_IMAGE_SIZE_MEDIUM, $style = '')
{
public function get_picture_group(
$id,
$picture_file,
$height,
$size_picture = GROUP_IMAGE_SIZE_MEDIUM,
$style = ''
) {
$picture = array();
//$picture['style'] = $style;
if ($picture_file === 'unknown.jpg') {
@ -1457,11 +1471,11 @@ class UserGroup extends Model
* with dirname() or the file with basename(). This also works for the
* functions dealing with the user's productions, as they are located in
* the same directory.
* @param integer User ID
* @param string Type of path to return (can be 'none', 'system', 'rel', 'web')
* @param bool Whether we want to have the directory name returned 'as if' there was a file or not (in the case we want to know which directory to create - otherwise no file means no split subdir)
* @param bool If we want that the function returns the /main/img/unknown.jpg image set it at true
* @return array Array of 2 elements: 'dir' and 'file' which contain the dir and file as the name implies if image does not exist it will return the unknow image if anonymous parameter is true if not it returns an empty er's
* @param integer User ID
* @param string Type of path to return (can be 'none', 'system', 'rel', 'web')
* @param bool Whether we want to have the directory name returned 'as if' there was a file or not (in the case we want to know which directory to create - otherwise no file means no split subdir)
* @param bool If we want that the function returns the /main/img/unknown.jpg image set it at true
* @return array Array of 2 elements: 'dir' and 'file' which contain the dir and file as the name implies if image does not exist it will return the unknow image if anonymous parameter is true if not it returns an empty er's
*/
public function get_group_picture_path_by_id($id, $type = 'none', $preview = false, $anonymous = false)
{
@ -1664,8 +1678,9 @@ class UserGroup extends Model
* @author Julio Montoya
* @param array $user_list
* @param array $group_list
* @param int $relation_type
* */
* @param int $relation_type
* @return array
**/
public function add_users_to_groups($user_list, $group_list, $relation_type = GROUP_USER_PERMISSION_READER)