Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
O
OHR Support
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
97
Issues
97
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
OHR Support
Commits
afe5a2b2
Commit
afe5a2b2
authored
May 01, 2011
by
Eric Davis
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'ticket/master/347-execution-after-redirect'
parents
65692235
d2973a64
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
26 additions
and
16 deletions
+26
-16
application_controller.rb
app/controllers/application_controller.rb
+1
-0
custom_fields_controller.rb
app/controllers/custom_fields_controller.rb
+4
-2
enumerations_controller.rb
app/controllers/enumerations_controller.rb
+2
-0
issue_categories_controller.rb
app/controllers/issue_categories_controller.rb
+2
-0
roles_controller.rb
app/controllers/roles_controller.rb
+5
-3
settings_controller.rb
app/controllers/settings_controller.rb
+11
-10
roles_controller_test.rb
test/functional/roles_controller_test.rb
+1
-1
No files found.
app/controllers/application_controller.rb
View file @
afe5a2b2
...
...
@@ -274,6 +274,7 @@ class ApplicationController < ActionController::Base
end
end
redirect_to
default
false
end
def
render_403
(
options
=
{})
...
...
app/controllers/custom_fields_controller.rb
View file @
afe5a2b2
...
...
@@ -38,8 +38,9 @@ class CustomFieldsController < ApplicationController
flash
[
:notice
]
=
l
(
:notice_successful_create
)
call_hook
(
:controller_custom_fields_new_after_save
,
:params
=>
params
,
:custom_field
=>
@custom_field
)
redirect_to
:action
=>
'index'
,
:tab
=>
@custom_field
.
class
.
name
else
@trackers
=
Tracker
.
find
(
:all
,
:order
=>
'position'
)
end
@trackers
=
Tracker
.
find
(
:all
,
:order
=>
'position'
)
end
def
edit
...
...
@@ -48,8 +49,9 @@ class CustomFieldsController < ApplicationController
flash
[
:notice
]
=
l
(
:notice_successful_update
)
call_hook
(
:controller_custom_fields_edit_after_save
,
:params
=>
params
,
:custom_field
=>
@custom_field
)
redirect_to
:action
=>
'index'
,
:tab
=>
@custom_field
.
class
.
name
else
@trackers
=
Tracker
.
find
(
:all
,
:order
=>
'position'
)
end
@trackers
=
Tracker
.
find
(
:all
,
:order
=>
'position'
)
end
def
destroy
...
...
app/controllers/enumerations_controller.rb
View file @
afe5a2b2
...
...
@@ -75,10 +75,12 @@ class EnumerationsController < ApplicationController
# No associated objects
@enumeration
.
destroy
redirect_to
:action
=>
'index'
return
elsif
params
[
:reassign_to_id
]
if
reassign_to
=
@enumeration
.
class
.
find_by_id
(
params
[
:reassign_to_id
])
@enumeration
.
destroy
(
reassign_to
)
redirect_to
:action
=>
'index'
return
end
end
@enumerations
=
@enumeration
.
class
.
find
(
:all
)
-
[
@enumeration
]
...
...
app/controllers/issue_categories_controller.rb
View file @
afe5a2b2
...
...
@@ -65,10 +65,12 @@ class IssueCategoriesController < ApplicationController
# No issue assigned to this category
@category
.
destroy
redirect_to
:controller
=>
'projects'
,
:action
=>
'settings'
,
:id
=>
@project
,
:tab
=>
'categories'
return
elsif
params
[
:todo
]
reassign_to
=
@project
.
issue_categories
.
find_by_id
(
params
[
:reassign_to_id
])
if
params
[
:todo
]
==
'reassign'
@category
.
destroy
(
reassign_to
)
redirect_to
:controller
=>
'projects'
,
:action
=>
'settings'
,
:id
=>
@project
,
:tab
=>
'categories'
return
end
@categories
=
@project
.
issue_categories
-
[
@category
]
end
...
...
app/controllers/roles_controller.rb
View file @
afe5a2b2
...
...
@@ -38,9 +38,10 @@ class RolesController < ApplicationController
end
flash
[
:notice
]
=
l
(
:notice_successful_create
)
redirect_to
:action
=>
'index'
else
@permissions
=
@role
.
setable_permissions
@roles
=
Role
.
find
:all
,
:order
=>
'builtin, position'
end
@permissions
=
@role
.
setable_permissions
@roles
=
Role
.
find
:all
,
:order
=>
'builtin, position'
end
def
edit
...
...
@@ -48,8 +49,9 @@ class RolesController < ApplicationController
if
request
.
post?
and
@role
.
update_attributes
(
params
[
:role
])
flash
[
:notice
]
=
l
(
:notice_successful_update
)
redirect_to
:action
=>
'index'
else
@permissions
=
@role
.
setable_permissions
end
@permissions
=
@role
.
setable_permissions
end
def
destroy
...
...
app/controllers/settings_controller.rb
View file @
afe5a2b2
...
...
@@ -36,16 +36,16 @@ class SettingsController < ApplicationController
end
flash
[
:notice
]
=
l
(
:notice_successful_update
)
redirect_to
:action
=>
'edit'
,
:tab
=>
params
[
:tab
]
return
end
@options
=
{}
@options
[
:user_format
]
=
User
::
USER_FORMATS
.
keys
.
collect
{
|
f
|
[
User
.
current
.
name
(
f
),
f
.
to_s
]
}
@deliveries
=
ActionMailer
::
Base
.
perform_deliveries
else
@options
=
{}
@options
[
:user_format
]
=
User
::
USER_FORMATS
.
keys
.
collect
{
|
f
|
[
User
.
current
.
name
(
f
),
f
.
to_s
]
}
@deliveries
=
ActionMailer
::
Base
.
perform_deliveries
@guessed_host_and_path
=
request
.
host_with_port
.
dup
@guessed_host_and_path
<<
(
'/'
+
Redmine
::
Utils
.
relative_url_root
.
gsub
(
%r{^
\/
}
,
''
))
unless
Redmine
::
Utils
.
relative_url_root
.
blank?
@guessed_host_and_path
=
request
.
host_with_port
.
dup
@guessed_host_and_path
<<
(
'/'
+
Redmine
::
Utils
.
relative_url_root
.
gsub
(
%r{^
\/
}
,
''
))
unless
Redmine
::
Utils
.
relative_url_root
.
blank?
Redmine
::
Themes
.
rescan
Redmine
::
Themes
.
rescan
end
end
def
plugin
...
...
@@ -54,9 +54,10 @@ class SettingsController < ApplicationController
Setting
[
"plugin_
#{
@plugin
.
id
}
"
]
=
params
[
:settings
]
flash
[
:notice
]
=
l
(
:notice_successful_update
)
redirect_to
:action
=>
'plugin'
,
:id
=>
@plugin
.
id
else
@partial
=
@plugin
.
settings
[
:partial
]
@settings
=
Setting
[
"plugin_
#{
@plugin
.
id
}
"
]
end
@partial
=
@plugin
.
settings
[
:partial
]
@settings
=
Setting
[
"plugin_
#{
@plugin
.
id
}
"
]
rescue
Redmine
::
PluginNotFound
render_404
end
...
...
test/functional/roles_controller_test.rb
View file @
afe5a2b2
...
...
@@ -22,7 +22,7 @@ require 'roles_controller'
class
RolesController
;
def
rescue_action
(
e
)
raise
e
end
;
end
class
RolesControllerTest
<
ActionController
::
TestCase
fixtures
:roles
,
:users
,
:members
,
:member_roles
,
:workflows
fixtures
:roles
,
:users
,
:members
,
:member_roles
,
:workflows
,
:trackers
def
setup
@controller
=
RolesController
.
new
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment