From c0b7871dbc0dfdfa8f770186263f98f4aeab5afd Mon Sep 17 00:00:00 2001 From: Alinson Xavier Date: Thu, 3 Sep 2015 20:54:13 -0400 Subject: [PATCH] Update copyright notice --- app/controllers/application_controller.rb | 14 ++++++++----- app/controllers/attachments_controller.rb | 14 ++++++++----- app/controllers/courses_controller.rb | 10 +++++++--- app/controllers/events_controller.rb | 10 +++++++--- app/controllers/log_controller.rb | 20 +++++++++++-------- app/controllers/news_controller.rb | 10 +++++++--- app/controllers/stylesheets_controller.rb | 10 +++++++--- app/controllers/users_controller.rb | 14 ++++++++----- app/controllers/wiki_controller.rb | 10 +++++++--- app/helpers/application_helper.rb | 14 ++++++++----- app/helpers/attachments_helper.rb | 14 ++++++++----- app/helpers/courses_helper.rb | 12 +++++++---- app/helpers/events_helper.rb | 10 +++++++--- app/helpers/log_helper.rb | 10 +++++++--- app/helpers/news_helper.rb | 10 +++++++--- app/helpers/stylesheets_helper.rb | 16 +++++++++------ app/helpers/user_helper.rb | 10 +++++++--- app/helpers/wiki_helper.rb | 12 +++++++---- app/models/attachment.rb | 10 +++++++--- app/models/course.rb | 10 +++++++--- app/models/event.rb | 14 ++++++++----- app/models/log_entry.rb | 10 +++++++--- app/models/log_entry/attachment_log_entry.rb | 10 +++++++--- app/models/log_entry/event_log_entry.rb | 10 +++++++--- app/models/log_entry/news_log_entry.rb | 10 +++++++--- app/models/log_entry/wiki_log_entry.rb | 11 ++++++---- app/models/message.rb | 10 +++++++--- app/models/notifications.rb | 10 +++++++--- app/models/user.rb | 20 +++++++++++-------- app/models/wiki_page.rb | 10 +++++++--- config/routes.rb | 13 +++++++----- db/migrate/010_message_sender.rb | 8 +++++++- test/fixtures/attachments.yml | 10 +++++++--- test/fixtures/courses.yml | 10 +++++++--- test/fixtures/events.yml | 10 +++++++--- test/fixtures/log_entries.yml | 10 +++++++--- test/fixtures/messages.yml | 10 +++++++--- test/fixtures/users.yml | 10 +++++++--- .../functional/attachments_controller_test.rb | 10 +++++++--- test/functional/courses_controller_test.rb | 10 +++++++--- test/functional/events_controller_test.rb | 10 +++++++--- test/functional/log_controller_test.rb | 12 +++++++---- test/functional/news_controller_test.rb | 10 +++++++--- .../functional/stylesheets_controller_test.rb | 12 +++++++---- test/functional/user_controller_test.rb | 10 +++++++--- test/functional/wiki_controller_test.rb | 10 +++++++--- test/unit/attachment_test.rb | 12 +++++++---- test/unit/course_test.rb | 10 +++++++--- test/unit/event_test.rb | 12 +++++++---- test/unit/log_entry_test.rb | 12 +++++++---- test/unit/message_test.rb | 12 +++++++---- test/unit/notifications_test.rb | 12 +++++++---- test/unit/user_test.rb | 12 +++++++---- test/unit/wiki_page_test.rb | 12 +++++++---- 54 files changed, 415 insertions(+), 199 deletions(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 747f0fc..5462b4a 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -1,7 +1,11 @@ # -*- encoding : utf-8 -*- -# Wiki UFC -# Copyright (C) 2007, Adriano, Alinson, Andre, Rafael e Bustamante -# +# This file is part of Wiki UFC. +# Copyright (C) 2007-2015 by Álinson Xavier +# Copyright (C) 2007-2008 by Adriano Freitas +# Copyright (C) 2007-2008 by André Castro +# Copyright (C) 2007-2008 by Rafael Barbosa <86.rafael@gmail.com> +# Copyright (C) 2007-2008 by Henrique Bustamante +# # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the @@ -33,7 +37,7 @@ class ApplicationController < ActionController::Base # Acesso negado if exception.is_a?(AccessDenied) respond_to do |format| - format.html { + format.html { if logged_in? render :file => "#{Rails.root}/public/401.html", :status => 401 else @@ -66,7 +70,7 @@ class ApplicationController < ActionController::Base #def set_timezone # #Time.zone = session[:user].tz # Time.zone = "America/Fortaleza" - #end + #end def startup if session[:user_id] diff --git a/app/controllers/attachments_controller.rb b/app/controllers/attachments_controller.rb index 36e8c9f..fce83a8 100644 --- a/app/controllers/attachments_controller.rb +++ b/app/controllers/attachments_controller.rb @@ -1,7 +1,11 @@ # -*- encoding : utf-8 -*- -# Wiki UFC -# Copyright (C) 2007, Adriano, Alinson, Andre, Rafael e Bustamante -# +# This file is part of Wiki UFC. +# Copyright (C) 2007-2015 by Álinson Xavier +# Copyright (C) 2007-2008 by Adriano Freitas +# Copyright (C) 2007-2008 by André Castro +# Copyright (C) 2007-2008 by Rafael Barbosa <86.rafael@gmail.com> +# Copyright (C) 2007-2008 by Henrique Bustamante +# # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the @@ -23,7 +27,7 @@ class AttachmentsController < ApplicationController #after_filter :cache_sweep, :only => [ :create, :update, :destroy ] before_filter :find_attachment - + def show respond_to do |format| format.html @@ -89,7 +93,7 @@ class AttachmentsController < ApplicationController log = AttachmentDeleteLogEntry.create!(:target_id => @attachment.id, :user => @current_user, :course => @course) flash[:undo] = undo_course_log_url(@course, log) - + respond_to do |format| format.html { redirect_to course_url(@course) } format.xml { head :ok } diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index c702563..9206668 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -1,7 +1,11 @@ # -*- encoding : utf-8 -*- -# Wiki UFC -# Copyright (C) 2007, Adriano, Alinson, Andre, Rafael e Bustamante -# +# This file is part of Wiki UFC. +# Copyright (C) 2007-2015 by Álinson Xavier +# Copyright (C) 2007-2008 by Adriano Freitas +# Copyright (C) 2007-2008 by André Castro +# Copyright (C) 2007-2008 by Rafael Barbosa <86.rafael@gmail.com> +# Copyright (C) 2007-2008 by Henrique Bustamante +# # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/app/controllers/events_controller.rb b/app/controllers/events_controller.rb index 41fc2da..a492fb2 100644 --- a/app/controllers/events_controller.rb +++ b/app/controllers/events_controller.rb @@ -1,7 +1,11 @@ # -*- encoding : utf-8 -*- -# Wiki UFC -# Copyright (C) 2007, Adriano, Alinson, Andre, Rafael e Bustamante -# +# This file is part of Wiki UFC. +# Copyright (C) 2007-2015 by Álinson Xavier +# Copyright (C) 2007-2008 by Adriano Freitas +# Copyright (C) 2007-2008 by André Castro +# Copyright (C) 2007-2008 by Rafael Barbosa <86.rafael@gmail.com> +# Copyright (C) 2007-2008 by Henrique Bustamante +# # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/app/controllers/log_controller.rb b/app/controllers/log_controller.rb index d54386c..593a853 100644 --- a/app/controllers/log_controller.rb +++ b/app/controllers/log_controller.rb @@ -1,7 +1,11 @@ # -*- encoding : utf-8 -*- -# Wiki UFC -# Copyright (C) 2007, Adriano, Alinson, Andre, Rafael e Bustamante -# +# This file is part of Wiki UFC. +# Copyright (C) 2007-2015 by Álinson Xavier +# Copyright (C) 2007-2008 by Adriano Freitas +# Copyright (C) 2007-2008 by André Castro +# Copyright (C) 2007-2008 by Rafael Barbosa <86.rafael@gmail.com> +# Copyright (C) 2007-2008 by Henrique Bustamante +# # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the @@ -25,7 +29,7 @@ class LogController < ApplicationController else @log_entries = LogEntry.paginate(:page => params[:page], :per_page => 30, :conditions => [ "course_id not in (select id from courses where hidden = ?)", true], - :order => "created_at desc") + :order => "created_at desc") end respond_to do |format| @@ -41,10 +45,10 @@ class LogController < ApplicationController respond_to do |format| format.html do - redirect_to course_event_url(@log_entry.course, @log_entry.target_id) if @log_entry.kind_of?(EventDeleteLogEntry) - redirect_to course_attachment_url(@log_entry.course, @log_entry.target_id) if @log_entry.kind_of?(AttachmentDeleteLogEntry) - redirect_to course_news_instance_url(@log_entry.course, @log_entry.target_id) if @log_entry.kind_of?(NewsDeleteLogEntry) - redirect_to course_wiki_instance_url(@log_entry.course, @log_entry.target_id) if @log_entry.kind_of?(WikiDeleteLogEntry) + redirect_to course_event_url(@log_entry.course, @log_entry.target_id) if @log_entry.kind_of?(EventDeleteLogEntry) + redirect_to course_attachment_url(@log_entry.course, @log_entry.target_id) if @log_entry.kind_of?(AttachmentDeleteLogEntry) + redirect_to course_news_instance_url(@log_entry.course, @log_entry.target_id) if @log_entry.kind_of?(NewsDeleteLogEntry) + redirect_to course_wiki_instance_url(@log_entry.course, @log_entry.target_id) if @log_entry.kind_of?(WikiDeleteLogEntry) end end end diff --git a/app/controllers/news_controller.rb b/app/controllers/news_controller.rb index beeb686..94f32d4 100644 --- a/app/controllers/news_controller.rb +++ b/app/controllers/news_controller.rb @@ -1,7 +1,11 @@ # -*- encoding : utf-8 -*- -# Wiki UFC -# Copyright (C) 2007, Adriano, Alinson, Andre, Rafael e Bustamante -# +# This file is part of Wiki UFC. +# Copyright (C) 2007-2015 by Álinson Xavier +# Copyright (C) 2007-2008 by Adriano Freitas +# Copyright (C) 2007-2008 by André Castro +# Copyright (C) 2007-2008 by Rafael Barbosa <86.rafael@gmail.com> +# Copyright (C) 2007-2008 by Henrique Bustamante +# # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/app/controllers/stylesheets_controller.rb b/app/controllers/stylesheets_controller.rb index 5654924..5e98075 100644 --- a/app/controllers/stylesheets_controller.rb +++ b/app/controllers/stylesheets_controller.rb @@ -1,7 +1,11 @@ # -*- encoding : utf-8 -*- -# Wiki UFC -# Copyright (C) 2007, Adriano, Alinson, Andre, Rafael e Bustamante -# +# This file is part of Wiki UFC. +# Copyright (C) 2007-2015 by Álinson Xavier +# Copyright (C) 2007-2008 by Adriano Freitas +# Copyright (C) 2007-2008 by André Castro +# Copyright (C) 2007-2008 by Rafael Barbosa <86.rafael@gmail.com> +# Copyright (C) 2007-2008 by Henrique Bustamante +# # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 02e68d6..f2228df 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -1,7 +1,11 @@ # -*- encoding : utf-8 -*- -# Wiki UFC -# Copyright (C) 2007, Adriano, Alinson, Andre, Rafael e Bustamante -# +# This file is part of Wiki UFC. +# Copyright (C) 2007-2015 by Álinson Xavier +# Copyright (C) 2007-2008 by Adriano Freitas +# Copyright (C) 2007-2008 by André Castro +# Copyright (C) 2007-2008 by Rafael Barbosa <86.rafael@gmail.com> +# Copyright (C) 2007-2008 by Henrique Bustamante +# # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the @@ -36,7 +40,7 @@ class UsersController < ApplicationController format.xml { render :xml => @user } end end - + def edit end @@ -116,7 +120,7 @@ class UsersController < ApplicationController def dashboard @news = [] @events = [] - + if params[:secret] @user = User.find_by_secret(params[:secret]) else diff --git a/app/controllers/wiki_controller.rb b/app/controllers/wiki_controller.rb index 9502c48..dbc4ed4 100644 --- a/app/controllers/wiki_controller.rb +++ b/app/controllers/wiki_controller.rb @@ -1,7 +1,11 @@ # -*- encoding : utf-8 -*- -# Wiki UFC -# Copyright (C) 2007, Adriano, Alinson, Andre, Rafael e Bustamante -# +# This file is part of Wiki UFC. +# Copyright (C) 2007-2015 by Álinson Xavier +# Copyright (C) 2007-2008 by Adriano Freitas +# Copyright (C) 2007-2008 by André Castro +# Copyright (C) 2007-2008 by Rafael Barbosa <86.rafael@gmail.com> +# Copyright (C) 2007-2008 by Henrique Bustamante +# # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index fe97b34..eddfe53 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1,7 +1,11 @@ # -*- encoding : utf-8 -*- -# Wiki UFC -# Copyright (C) 2007, Adriano, Alinson, Andre, Rafael e Bustamante -# +# This file is part of Wiki UFC. +# Copyright (C) 2007-2015 by Álinson Xavier +# Copyright (C) 2007-2008 by Adriano Freitas +# Copyright (C) 2007-2008 by André Castro +# Copyright (C) 2007-2008 by Rafael Barbosa <86.rafael@gmail.com> +# Copyright (C) 2007-2008 by Henrique Bustamante +# # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the @@ -27,7 +31,7 @@ module ApplicationHelper time_at end - FLASH_NAMES = [:notice, :warning, :message] + FLASH_NAMES = [:notice, :warning, :message] def flash_div output = "" @@ -58,7 +62,7 @@ module ApplicationHelper end def highlight(name) - return {:class => 'highlight'} if (flash[:highlight] == name) + return {:class => 'highlight'} if (flash[:highlight] == name) return {} end diff --git a/app/helpers/attachments_helper.rb b/app/helpers/attachments_helper.rb index fdd2e44..5c8624f 100644 --- a/app/helpers/attachments_helper.rb +++ b/app/helpers/attachments_helper.rb @@ -1,7 +1,11 @@ # -*- encoding : utf-8 -*- -# Wiki UFC -# Copyright (C) 2007, Adriano, Alinson, Andre, Rafael e Bustamante -# +# This file is part of Wiki UFC. +# Copyright (C) 2007-2015 by Álinson Xavier +# Copyright (C) 2007-2008 by Adriano Freitas +# Copyright (C) 2007-2008 by André Castro +# Copyright (C) 2007-2008 by Rafael Barbosa <86.rafael@gmail.com> +# Copyright (C) 2007-2008 by Henrique Bustamante +# # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the @@ -21,7 +25,7 @@ module AttachmentsHelper paths = atts.collect { |item| item.path.nil? ? [] : item.path.split("/") } return nest_path(atts, paths, 0, paths.size-1, 0) end - + def nest_path(items, paths, from, to, level) result = {} @@ -54,7 +58,7 @@ module AttachmentsHelper def nested_attachments_to_html(atts, level=0) out = (level > 0 ? "