changeset 568:049a1bcf38f1 cannam_integration

Merge from branch feature_36
author Chris Cannam <chris.cannam@soundsoftware.ac.uk>
date Tue, 09 Aug 2011 14:30:39 +0100
parents a47abc953e45 (current diff) 5404f7dfb4b3 (diff)
children fca539d668a2
files
diffstat 3 files changed, 3 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/vendor/plugins/redmine_bibliography/app/controllers/publications_controller.rb	Tue Aug 09 10:58:37 2011 +0100
+++ b/vendor/plugins/redmine_bibliography/app/controllers/publications_controller.rb	Tue Aug 09 14:30:39 2011 +0100
@@ -223,7 +223,7 @@
     end
     
     authors_list.each do |author|      
-      @results << author unless users_list.include?(author.user_id)
+      @results << author unless users_list.include?(author.user)
     end
                  
     render :layout => false
--- a/vendor/plugins/redmine_bibliography/app/models/publication.rb	Tue Aug 09 10:58:37 2011 +0100
+++ b/vendor/plugins/redmine_bibliography/app/models/publication.rb	Tue Aug 09 14:30:39 2011 +0100
@@ -16,7 +16,7 @@
   
   has_and_belongs_to_many :projects, :uniq => true
   
-  after_save :set_initial_author_order
+  before_save :set_initial_author_order
   
   def set_initial_author_order
     authorships = self.authorships
@@ -26,7 +26,6 @@
     authorships.each_with_index do |authorship, index|
       if authorship.auth_order.nil?
          authorship.auth_order = index
-         authorship.update
       end
     end    
   end
--- a/vendor/plugins/redmine_bibliography/lib/bibliography/user_author_patch.rb	Tue Aug 09 10:58:37 2011 +0100
+++ b/vendor/plugins/redmine_bibliography/lib/bibliography/user_author_patch.rb	Tue Aug 09 14:30:39 2011 +0100
@@ -6,10 +6,6 @@
       base.send(:include, InstanceMethods) 
       extend ClassMethods     
           
-      base.class_eval do
-        has_one :publication
-                                    
-      end
     end #self.included
     
     module ClassMethods
@@ -48,4 +44,4 @@
     end #InstanceMethods
     
   end #UserPublicationsPatch
-end #RedmineBibliography
\ No newline at end of file
+end #RedmineBibliography