ref: refs/heads/master
commit 4f265c868657c8024f85874d02b47fedf4e82751
Author: Ladislav Slezak
Date: Fri Oct 23 18:52:59 2009 +0200
don't return XML to HTML requests
see http://lists.opensuse.org/yast-devel/2009-10/msg00133.html
---
plugins/eulas/app/controllers/eulas_controller.rb | 3 ---
plugins/ntp/app/controllers/ntp_controller.rb | 1 -
.../patches/app/controllers/packages_controller.rb | 1 -
.../patches/app/controllers/patches_controller.rb | 1 -
.../app/controllers/sambashares_controller.rb | 5 -----
.../app/controllers/services_controller.rb | 1 -
.../system/app/controllers/system_controller.rb | 1 -
.../time/app/controllers/systemtime_controller.rb | 1 -
8 files changed, 0 insertions(+), 14 deletions(-)
diff --git a/plugins/eulas/app/controllers/eulas_controller.rb b/plugins/eulas/app/controllers/eulas_controller.rb
index dd08392..8e4cc57 100644
--- a/plugins/eulas/app/controllers/eulas_controller.rb
+++ b/plugins/eulas/app/controllers/eulas_controller.rb
@@ -17,7 +17,6 @@ class EulasController < ApplicationController
def index
@licenses = License.find_all
respond_to do |format|
- format.html
format.xml { render :xml => @licenses.to_xml }
format.json{ render :json=> @licenses.to_json}
end
@@ -29,7 +28,6 @@ class EulasController < ApplicationController
@license.load_text params[:lang] unless params[:lang].nil?
logger.debug @license.inspect
respond_to do |format|
- format.html
format.xml { render :xml => @license.to_xml }
format.json{ render :json=> @license.to_json}
end
@@ -43,7 +41,6 @@ class EulasController < ApplicationController
@license.accepted = params[:eulas][:accepted] == "true" ? true : false
@license.save
respond_to do |format|
- format.html
format.xml { render :xml => @license.to_xml }
format.json{ render :json=> @license.to_json}
end
diff --git a/plugins/ntp/app/controllers/ntp_controller.rb b/plugins/ntp/app/controllers/ntp_controller.rb
index 21c777b..8af3666 100644
--- a/plugins/ntp/app/controllers/ntp_controller.rb
+++ b/plugins/ntp/app/controllers/ntp_controller.rb
@@ -7,7 +7,6 @@ class NtpController < ApplicationController
ntp = Ntp.find
respond_to do |format|
- format.html { render :xml => ntp.actions.to_xml(:root => :actions)} #return xml only
format.xml { render :xml => ntp.actions.to_xml(:root => :actions)}
format.json { render :json => ntp.actions.to_json }
end
diff --git a/plugins/patches/app/controllers/packages_controller.rb b/plugins/patches/app/controllers/packages_controller.rb
index c084766..fa974e5 100644
--- a/plugins/patches/app/controllers/packages_controller.rb
+++ b/plugins/patches/app/controllers/packages_controller.rb
@@ -61,7 +61,6 @@ class PackagesController < ApplicationController
@packages = compare_lists(@packages)
end
respond_to do |format|
- format.html { render :xml => @packages.to_xml( :root => "packages", :dasherize => false ) }
format.xml { render :xml => @packages.to_xml( :root => "packages", :dasherize => false ) }
format.json { render :json => @packages.to_json( :root => "packages", :dasherize => false ) }
end
diff --git a/plugins/patches/app/controllers/patches_controller.rb b/plugins/patches/app/controllers/patches_controller.rb
index 9e00faf..76276e4 100644
--- a/plugins/patches/app/controllers/patches_controller.rb
+++ b/plugins/patches/app/controllers/patches_controller.rb
@@ -44,7 +44,6 @@ class PatchesController < ApplicationController
# note: permission check was performed in :before_filter
@patches = Patch.find(:available)
respond_to do |format|
- format.html { render :xml => @patches.to_xml( :root => "patches", :dasherize => false ) }
format.xml { render :xml => @patches.to_xml( :root => "patches", :dasherize => false ) }
format.json { render :json => @patches.to_json( :root => "patches", :dasherize => false ) }
end
diff --git a/plugins/samba_server/app/controllers/sambashares_controller.rb b/plugins/samba_server/app/controllers/sambashares_controller.rb
index d25b70d..16cf0f0 100644
--- a/plugins/samba_server/app/controllers/sambashares_controller.rb
+++ b/plugins/samba_server/app/controllers/sambashares_controller.rb
@@ -15,7 +15,6 @@ class SambasharesController < ApplicationController
@shares = SambaShare.find_all
respond_to do |format|
- format.html { render :xml => @shares, :location => "none" } #return xml only
format.xml { render :xml => @shares, :location => "none" }
format.json { render :json => @shares.to_json, :location => "none" }
end
@@ -36,7 +35,6 @@ class SambasharesController < ApplicationController
end
respond_to do |format|
- format.html { render :xml => @share, :location => "none" } #return xml only
format.xml { render :xml => @share, :location => "none" }
format.json { render :json => @share.to_json, :location => "none" }
end
@@ -63,7 +61,6 @@ class SambasharesController < ApplicationController
end
respond_to do |format|
- format.html { render :xml => @share, :location => "none" } #return xml only
format.xml { render :xml => @share, :location => "none" }
format.json { render :json => @share.to_json, :location => "none" }
end
@@ -95,7 +92,6 @@ class SambasharesController < ApplicationController
end
respond_to do |format|
- format.html { render :xml => @share, :location => "none" } #return xml only
format.xml { render :xml => @share, :location => "none" }
format.json { render :json => @share.to_json, :location => "none" }
end
@@ -115,7 +111,6 @@ class SambasharesController < ApplicationController
end
respond_to do |format|
- format.html { render :xml => @share, :location => "none" } #return xml only
format.xml { render :xml => @share, :location => "none" }
format.json { render :json => @share.to_json, :location => "none" }
end
diff --git a/plugins/services/app/controllers/services_controller.rb b/plugins/services/app/controllers/services_controller.rb
index 7551305..e293071 100644
--- a/plugins/services/app/controllers/services_controller.rb
+++ b/plugins/services/app/controllers/services_controller.rb
@@ -31,7 +31,6 @@ class ServicesController < ApplicationController
end
respond_to do |format|
- format.html { render :xml => @service.to_xml(:root => 'service', :dasherize => false), :location => "none" } #return xml only
format.xml { render :xml => @service.to_xml(:root => 'service', :dasherize => false, :indent => 2), :location => "none" }
format.json { render :json => @service.to_json, :location => "none" }
end
diff --git a/plugins/system/app/controllers/system_controller.rb b/plugins/system/app/controllers/system_controller.rb
index 062c9ad..c52cdaf 100644
--- a/plugins/system/app/controllers/system_controller.rb
+++ b/plugins/system/app/controllers/system_controller.rb
@@ -7,7 +7,6 @@ class SystemController < ApplicationController
@actions = System.instance.actions
respond_to do |format|
- format.html { render :xml => @actions.to_xml(:root => :actions), :location => "none" } #return xml only
format.xml { render :xml => @actions.to_xml(:root => :actions), :location => "none" }
format.json { render :json => @actions.to_json, :location => "none" }
end
diff --git a/plugins/time/app/controllers/systemtime_controller.rb b/plugins/time/app/controllers/systemtime_controller.rb
index c489c90..3eef247 100644
--- a/plugins/time/app/controllers/systemtime_controller.rb
+++ b/plugins/time/app/controllers/systemtime_controller.rb
@@ -40,7 +40,6 @@ class SystemtimeController < ApplicationController
systemtime = Systemtime.find
respond_to do |format|
- format.html { render :xml => systemtime.to_xml( :root => "systemtime", :dasherize => false ) }
format.xml { render :xml => systemtime.to_xml( :root => "systemtime", :dasherize => false ) }
format.json { render :json => systemtime.to_json( :root => "systemtime", :dasherize => false ) }
end
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org