Fixed repoview generator
This commit is contained in:
2
app.rb
2
app.rb
@@ -613,7 +613,6 @@ post "/prjcfg/:id" do
|
||||
if prj_info.nil?
|
||||
print_error_page(503, "Путь к проектам не существует")
|
||||
else
|
||||
pp params
|
||||
unless params["cancel"].nil?
|
||||
redirect "/prjedit/#{params["id"]}"
|
||||
else
|
||||
@@ -1379,7 +1378,6 @@ end
|
||||
|
||||
get "/prjsignview/:id/*" do
|
||||
data_path = params[:splat]
|
||||
pp data_path
|
||||
if data_path.nil? || data_path.first.strip == ""
|
||||
data_path = "index.html"
|
||||
end
|
||||
|
||||
@@ -103,7 +103,8 @@ class RepoManager
|
||||
pkg_info[:stat] = File.stat(full_rpm_path).ctime
|
||||
pkg_info[:pname] = "noname"
|
||||
if info[:error].nil?
|
||||
pkg_info[:chlog] = info[:pkginfo].changelog.first(5)
|
||||
pkg_info[:chlog] = []
|
||||
pkg_info[:chlog] << info[:pkginfo].changelog.first
|
||||
pkg_info[:pname] = info[:pkginfo].name
|
||||
else
|
||||
pkg_info[:chlog] = []
|
||||
@@ -153,8 +154,6 @@ class RepoManager
|
||||
end
|
||||
end
|
||||
|
||||
pp repo_data
|
||||
|
||||
tpl_file = File.join(template_dir, "template.erb")
|
||||
template = File.read(tpl_file)
|
||||
renderer = ERB.new(template)
|
||||
|
||||
Reference in New Issue
Block a user