Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
e78b90ab
Commit
e78b90ab
authored
Dec 16, 2013
by
Takuya Nishigori
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix messages typo
parent
d476ac7d
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
8 additions
and
8 deletions
+8
-8
app/contexts/files/create_context.rb
app/contexts/files/create_context.rb
+3
-3
app/contexts/files/delete_context.rb
app/contexts/files/delete_context.rb
+1
-1
app/contexts/files/update_context.rb
app/contexts/files/update_context.rb
+1
-1
app/controllers/projects/blob_controller.rb
app/controllers/projects/blob_controller.rb
+1
-1
app/controllers/projects/edit_tree_controller.rb
app/controllers/projects/edit_tree_controller.rb
+1
-1
app/controllers/projects/new_tree_controller.rb
app/controllers/projects/new_tree_controller.rb
+1
-1
No files found.
app/contexts/files/create_context.rb
View file @
e78b90ab
...
...
@@ -21,13 +21,13 @@ module Files
file_path
=
path
unless
file_name
=~
Gitlab
::
Regex
.
path_regex
return
error
(
"Your changes could not be commited, because file name contains not allowed characters"
)
return
error
(
"Your changes could not be commit
t
ed, because file name contains not allowed characters"
)
end
blob
=
repository
.
blob_at
(
ref
,
file_path
)
if
blob
return
error
(
"Your changes could not be commited, because file with such name exists"
)
return
error
(
"Your changes could not be commit
t
ed, because file with such name exists"
)
end
new_file_action
=
Gitlab
::
Satellite
::
NewFileAction
.
new
(
current_user
,
project
,
ref
,
file_path
)
...
...
@@ -39,7 +39,7 @@ module Files
if
created_successfully
success
else
error
(
"Your changes could not be commited, because the file has been changed"
)
error
(
"Your changes could not be commit
t
ed, because the file has been changed"
)
end
end
end
...
...
app/contexts/files/delete_context.rb
View file @
e78b90ab
...
...
@@ -33,7 +33,7 @@ module Files
if
deleted_successfully
success
else
error
(
"Your changes could not be commited, because the file has been changed"
)
error
(
"Your changes could not be commit
t
ed, because the file has been changed"
)
end
end
end
...
...
app/contexts/files/update_context.rb
View file @
e78b90ab
...
...
@@ -32,7 +32,7 @@ module Files
if
created_successfully
success
else
error
(
"Your changes could not be commited, because the file has been changed"
)
error
(
"Your changes could not be commit
t
ed, because the file has been changed"
)
end
end
end
...
...
app/controllers/projects/blob_controller.rb
View file @
e78b90ab
...
...
@@ -16,7 +16,7 @@ class Projects::BlobController < Projects::ApplicationController
result
=
Files
::
DeleteContext
.
new
(
@project
,
current_user
,
params
,
@ref
,
@path
).
execute
if
result
[
:status
]
==
:success
flash
[
:notice
]
=
"Your changes have been successfully commited"
flash
[
:notice
]
=
"Your changes have been successfully commit
t
ed"
redirect_to
project_tree_path
(
@project
,
@ref
)
else
flash
[
:alert
]
=
result
[
:error
]
...
...
app/controllers/projects/edit_tree_controller.rb
View file @
e78b90ab
...
...
@@ -10,7 +10,7 @@ class Projects::EditTreeController < Projects::BaseTreeController
result
=
Files
::
UpdateContext
.
new
(
@project
,
current_user
,
params
,
@ref
,
@path
).
execute
if
result
[
:status
]
==
:success
flash
[
:notice
]
=
"Your changes have been successfully commited"
flash
[
:notice
]
=
"Your changes have been successfully commit
t
ed"
redirect_to
project_blob_path
(
@project
,
@id
)
else
flash
[
:alert
]
=
result
[
:error
]
...
...
app/controllers/projects/new_tree_controller.rb
View file @
e78b90ab
...
...
@@ -9,7 +9,7 @@ class Projects::NewTreeController < Projects::BaseTreeController
result
=
Files
::
CreateContext
.
new
(
@project
,
current_user
,
params
,
@ref
,
file_path
).
execute
if
result
[
:status
]
==
:success
flash
[
:notice
]
=
"Your changes have been successfully commited"
flash
[
:notice
]
=
"Your changes have been successfully commit
t
ed"
redirect_to
project_blob_path
(
@project
,
File
.
join
(
@ref
,
file_path
))
else
flash
[
:alert
]
=
result
[
:error
]
...
...
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