About page, lots of fixin

This commit is contained in:
magnolia-fan
2011-06-29 08:11:54 +04:00
parent 08295f01aa
commit bfd1cd3ff8
31 changed files with 267 additions and 69 deletions
+2 -1
View File
@@ -4,7 +4,8 @@ class ApplicationController < ActionController::Base
protect_from_forgery
def authorized?
secret_key = request.host == 'beathaven.org' ? 'sdgwSbl3nNE4ZxafuPrp' : 's5zyjb693z6uV4rbhEyc'
# secret_key = request.host == 'beathaven.org' ? 'sdgwSbl3nNE4ZxafuPrp' : 's5zyjb693z6uV4rbhEyc'
secret_key = 'sdgwSbl3nNE4ZxafuPrp'
unless params[:expire].nil? or params[:mid].nil? or params[:secret].nil? or params[:sid].nil? or params[:sig].nil?
# Calculating hash
hash = 'expire='+ params[:expire] +'mid='+ params[:mid] +'secret='+ params[:secret] +'sid='+ params[:sid] + secret_key
+4
View File
@@ -4,6 +4,10 @@ class ArtistController < ApplicationController
@@default_album_types = ['Album', 'Soundtrack']
def data
data = {}
if params[:name].nil? or params[:name].length == 0
render :json => {status: 'loading_failed', pics: []}
return
end
name = params[:name].gsub('%20', ' ').gsub('+', ' ')
artist = Artist.find_by_name(name)
if artist and artist.status == 0