function roles($Permission, $OnlyIDs = true)
	{
		if (!is_numeric($Permission))
			$Permission = $this->returnId($Permission);

		if ($OnlyIDs)
		{
			$Res = Jf::sql ( "SELECT RoleID AS `ID` FROM
				{$this->tablePrefix()}rolepermissions WHERE PermissionID=? ORDER BY RoleID", $Permission );

			if (is_array ( $Res ))
			{
				$out = array ();
				foreach ( $Res as $R )
					$out [] = $R ['ID'];
				return $out;
			}
			else
				return null;
		} else {
		    return Jf::sql ( "SELECT `TP`.ID, `TP`.Title, `TP`.Description FROM {$this->tablePrefix()}roles AS `TP`
    		    LEFT JOIN {$this->tablePrefix()}rolepermissions AS `TR` ON (`TR`.RoleID=`TP`.ID)
    		    WHERE PermissionID=? ORDER BY TP.ID", $Permission );
		}
	}
function roles($Permission, $OnlyIDs = true)
	{
		if (!is_numeric($Permission))
			$Permission = $this->returnId($Permission);

		if ($OnlyIDs)
		{
			$Res = Jf::sql ( "SELECT RoleID AS `ID` FROM
				{$this->tablePrefix()}rolepermissions WHERE PermissionID=? ORDER BY RoleID", $Permission );

			if (is_array ( $Res ))
			{
				$out = array ();
				foreach ( $Res as $R )
					$out [] = $R ['ID'];
				return $out;
			}
			else
				return null;
		} else {
		    return Jf::sql ( "SELECT `TP`.ID, `TP`.Title, `TP`.Description FROM {$this->tablePrefix()}roles AS `TP`
    		    LEFT JOIN {$this->tablePrefix()}rolepermissions AS `TR` ON (`TR`.RoleID=`TP`.ID)
    		    WHERE PermissionID=? ORDER BY TP.ID", $Permission );
		}
	}
function roles ( $ Permission , $ OnlyIDs = true ) { if ( ! is_numeric ( $ Permission ) ) $ Permission = $ this -> returnId ( $ Permission ) ; if ( $ OnlyIDs ) { $ Res = Jf :: sql ( "SELECT RoleID AS `ID` FROM
				{$this->tablePrefix()}rolepermissions WHERE PermissionID=? ORDER BY RoleID" , $ Permission ) ; if ( is_array ( $ Res ) ) { $ out = array ( ) ; foreach ( $ Res as $ R ) $ out [ ] = $ R [ 'ID' ] ; return $ out ; } else return null ; } else { return Jf :: sql ( "SELECT `TP`.ID, `TP`.Title, `TP`.Description FROM {$this->tablePrefix()}roles AS `TP`
    		    LEFT JOIN {$this->tablePrefix()}rolepermissions AS `TR` ON (`TR`.RoleID=`TP`.ID)
    		    WHERE PermissionID=? ORDER BY TP.ID" , $ Permission ) ; } }
Returns all roles assigned to a permission

@param mixed $Permission
Id, Title, Path
@param boolean $OnlyIDs
if true, result will be a 1D array of IDs
@return Array 2D or 1D or null
Returns all roles assigned to a permission