aboutsummaryrefslogtreecommitdiffstats
path: root/doc/CREDITS
blob: d53f6de0811e83e9df74c3471a35ecc0bf2879f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
The authors thank the following people:

- The Gaim team, for letting us steal their code.
- Sander van Schouwenburg, for his testing.
- Marten Klencke, for his testing.
- Lennart Kats, for putting up with Sjoerd, who bothered him many times to
  test things.
- Ralph Slooten, for creating the RPM packages and testing the program.
- Erik Hensema, for creating SuSE RPM packages and some patching.
- Tony Vroon, for being a happy user and patch-submitter.
- Lots of Twente University students (and of course all the other users,
  it's just that BitlBee seems to be some sort of hype over there ;-),
  for spreading the word of the Bee.
- Han Boetes, for testing on and porting to OpenBSD.
- Paul Foote for some hints on running BitlBee on FreeBSD.
- Floris Kruisselbrink, for submitting the "help set ..." patch.
- Jan-Willem Lenting, for putting up with Wilmer, who wanted to test the
  MSN away messages in the middle of the night.
- Jan Sabbe, for the hints about running BitlBee on Mac OS X.
- Kenny Gryp, for thoroughly testing the groupchat code and submitting
  bug reports.
- Bryan Williams, for the help in getting BitlBee to run on Cygwin.
- Peter van Dijk for discovering a security leak in BitlBee.
- Christian H�ggestr�m, for the fix for the Jabber barf on high ASCII
  characters in away messages.
- James Ray, for some testing, development and patching.
- Yuri Pimenov, for writing the charset/iconv code, requested by a
  lot of people.
- Wouter Paesen, for the MSN friendlyname code and the MSNP8 fix.
- Tony Perrie, for the RPM's and the Yahoo! patch.
- Andrej Kacian/Ticho for some patches.
- Jochem Kossen, for giving an account on his OpenBSD box to do some
  portability testing.
- Geert Hauwaerts, for maintaining quite a big public BitlBee server
  (msn.irssi.org, down for now) and reporting some very nice bugs.
- Robert C Lorentz and other AIM users, for all the reports on bugs (and
  providing test accounts) about the stupid AIM spaces-in-screenname
  handling.
- Scott Cruzen, for patching up strip_html() and more.
- Samuel Tardieu, for random patches.
- Tibor Csoegoer, for adding support for receiving URL messages to the
  ICQ module.
- Jonathan/rise, for reporting and fixing a problem with the Yahoo! servers
  and supporting BitlBee in other ways.
- Philip S Tellis, for libyahoo2.
- Simon Schubert, for providing code to read the names of ICQ contacts.
- NETRIC (www.netric.org) for auditting the BitlBee code security (and
  finding some small problems).
- Elizabeth Krumbach, for her help on the docs.
- Frank Thieme, for the info-command enhancements and other patches.
- Marcus Dennis, for some bitlbeed enhancements.
- infamous41md, for security auditing BitlBee code.
- Tijmen Ruizendaal, for some useful BitlBee-related irssi scripts.
- Ed Schouten, for reporting bugs.
- Greg (gropeep.org), for updating the Yahoo! module to fix some issues
  that were there for quite some time already.
- misc@mandriva.org for lots of Jabber contributions.

- And all other users who help us by sending useful bug reports, positive
  feedback, nice patches and cool addons. Mentioning you all would make
  this list fill up the whole source tree, so please don't be offended
  by not seeing your name here.

- All the people who run public BitlBee servers.
hod='get' action='/mirrors/MimesBronn/alaveteli/log/app/controllers/track_controller.rb'>
path: root/app/controllers/track_controller.rb
blob: e78d3959ca33d179cba3a404691db220d1cd685e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
# app/controllers/track_controller.rb:
# Publically visible email alerts and RSS - think an alert system crossed with
# social bookmarking.
#
# Copyright (c) 2008 UK Citizens Online Democracy. All rights reserved.
# Email: francis@mysociety.org; WWW: http://www.mysociety.org/
#
# $Id: track_controller.rb,v 1.26 2008-08-09 00:25:28 francis Exp $

class TrackController < ApplicationController

    # Track all updates to a particular request
    def track_request
        @info_request = InfoRequest.find_by_url_title(params[:url_title])
        @track_thing = TrackThing.create_track_for_request(@info_request)

        return atom_feed_internal if params[:feed] == 'feed'

        if self.track_set
            redirect_to request_url(@info_request)
        end
    end

    # Track all new/successful requests
    def track_list
        @view = params[:view]

        if @view.nil?
            @track_thing = TrackThing.create_track_for_all_new_requests
        elsif @view == 'successful'
            @track_thing = TrackThing.create_track_for_all_successful_requests
        else
            raise "unknown request list view " + @view.to_s
        end

        return atom_feed_internal if params[:feed] == 'feed'

        if self.track_set
            redirect_to request_list_url(:view => @view)
        end
    end

    # Track all updates to a particular public body
    def track_public_body
        @public_body = PublicBody.find_by_url_name(params[:url_name])
        @track_thing = TrackThing.create_track_for_public_body(@public_body)

        return atom_feed_internal if params[:feed] == 'feed'

        if self.track_set
            redirect_to public_body_url(@public_body)
        end
    end

    # Track a user
    def track_user
        @track_user = User.find_by_url_name(params[:url_name])
        @track_thing = TrackThing.create_track_for_user(@track_user)

        return atom_feed_internal if params[:feed] == 'feed'

        if self.track_set
            redirect_to user_url(@track_user)
        end
    end

    # Track a search term
    def track_search_query
        # XXX should be better thing in rails routes than having to do this
        # join just to get / and . to work in a query.
        query_array = params[:query_array]
        @query = query_array.join("/")
        @track_thing = TrackThing.create_track_for_search_query(@query)

        return atom_feed_internal if params[:feed] == 'feed'

        if self.track_set
            redirect_to search_url(@query)
        end
    end

    # Generic request tracker - set @track_thing before calling
    def track_set
        if @user
            @existing_track = TrackThing.find_by_existing_track(@user, @track_thing)
            if @existing_track
                flash[:notice] = "You are already being emailed updates about " + @track_thing.params[:list_description]
                return true
            end
        end

        if not authenticated?(@track_thing.params)
            return false
        end

        @track_thing.track_medium = 'email_daily'
        @track_thing.tracking_user_id = @user.id
        @track_thing.save!

        flash[:notice] = "You will now be emailed updates about " + @track_thing.params[:list_description]
        return true
    end 

    # Atom feed (like RSS) for the track
    def atom_feed
        @track_thing = TrackThing.find(params[:track_id].to_i)
        if @track_thing.track_medium != 'feed'
            raise "can only view feeds for feed tracks, not email ones"
        end
        atom_feed_internal
    end
    def atom_feed_internal
        @xapian_object = perform_search([InfoRequestEvent], @track_thing.track_query, @track_thing.params[:feed_sortby], nil, 25, 1) 
        respond_to do |format|
            format.atom { render :template => 'track/atom_feed' }
        end
    end

    # Change or delete a track
    def update
        track_thing = TrackThing.find(params[:track_id].to_i)

        if not authenticated_as_user?(track_thing.tracking_user,
                :web => "To cancel this alert",
                :email => "Then you can cancel the alert.",
                :email_subject => "Cancel a WhatDoTheyKnow alert"
            )
            # do nothing - as "authenticated?" has done the redirect to signin page for us
            return
        end

        STDOUT.puts(params.to_yaml)
        new_medium = params[:track_medium]
        if new_medium == 'delete'
            track_thing.destroy
            flash[:notice] = "You will no longer be emailed updates about " + track_thing.params[:list_description]
            redirect_to params[:r]
        # Reuse code like this if we let medium change again.
        #elsif new_medium == 'email_daily'
        #    track_thing.track_medium = new_medium
        #    track_thing.created_at = Time.now() # as created_at is used to limit the alerts to start with
        #    track_thing.save!
        #    flash[:notice] = "You are now tracking " + track_thing.params[:list_description] + " by email daily"
        #    redirect_to user_url(track_thing.tracking_user)
        else
            raise "new medium not handled " + new_medium
        end
    end

end