##// END OF EJS Templates
r18633@gaspard (orig r1875): jplang | 2008-09-17 21:18:31 +0200...
r18633@gaspard (orig r1875): jplang | 2008-09-17 21:18:31 +0200 reposman: change #log arguments. r18634@gaspard (orig r1876): jplang | 2008-09-17 21:38:20 +0200 Slight change on git repository creation command. r18635@gaspard (orig r1877): jplang | 2008-09-17 21:47:36 +0200 Make --command option usable on Windows. r18636@gaspard (orig r1878): jplang | 2008-09-19 17:32:52 +0200 Adds watch/unwatch functionality at forum topic level (#1912). Users who create/reply a topic are automatically added as watchers but are now able to unwatch the topic. r18637@gaspard (orig r1879): winterheart | 2008-09-19 18:15:49 +0200 update of ru.yml r18638@gaspard (orig r1880): winterheart | 2008-09-19 18:17:35 +0200 #1918, translation for zh-tw r18639@gaspard (orig r1881): winterheart | 2008-09-19 18:20:45 +0200 fixed #1920, patch for Hungarian language r18640@gaspard (orig r1882): winterheart | 2008-09-19 18:23:04 +0200 patch #1922, update for nl.yml r18641@gaspard (orig r1883): winterheart | 2008-09-19 18:26:19 +0200 #1923, updated zh.yml r18642@gaspard (orig r1884): winterheart | 2008-09-19 18:30:39 +0200 #1924, update for da.yml r18643@gaspard (orig r1885): winterheart | 2008-09-19 18:33:08 +0200 #1925, patch for lt.yml git-svn-id: http://redmine.rubyforge.org/svn/branches/nbc@1886 e93f8b46-1217-0410-a6f0-8f06a7374b81

File last commit:

r1884:d8549c55411a
r1884:d8549c55411a
Show More
098_set_topic_authors_as_watchers.rb
14 lines | 704 B | text/x-ruby | RubyLexer
/ db / migrate / 098_set_topic_authors_as_watchers.rb
class SetTopicAuthorsAsWatchers < ActiveRecord::Migration
def self.up
# Sets active users who created/replied a topic as watchers of the topic
# so that the new watch functionality at topic level doesn't affect notifications behaviour
Message.connection.execute("INSERT INTO watchers (watchable_type, watchable_id, user_id)" +
" SELECT DISTINCT 'Message', COALESCE(messages.parent_id, messages.id), messages.author_id FROM messages, users" +
" WHERE messages.author_id = users.id AND users.status = 1")
end
def self.down
# Removes all message watchers
Watcher.delete_all("watchable_type = 'Message'")
end
end