From ee1329235dd1c42bc82e63f4d7d9e7d2eb1b4856 Mon Sep 17 00:00:00 2001 From: albert Date: Wed, 7 Dec 2011 16:58:52 -0500 Subject: [PATCH] fix to install script, add ordering to dmails --- INSTALL.debian | 6 +++--- app/controllers/dmails_controller.rb | 2 +- script/install/nginx.danbooru.conf | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/INSTALL.debian b/INSTALL.debian index 11c1bf93f..2a100787a 100644 --- a/INSTALL.debian +++ b/INSTALL.debian @@ -92,7 +92,7 @@ update-rc.d -f nginx defaults mkdir -p /opt/nginx/conf/sites curl -s https://raw.github.com/r888888888/danbooru/master/script/install/nginx.conf > /opt/nginx/conf/nginx.conf curl -s https://raw.github.com/r888888888/danbooru/master/script/install/nginx.danbooru.conf > /opt/nginx/conf/sites/danbooru.conf -sed -i -e 's/\$hostname/$HOSTNAME/g' /opt/nginx/conf/sites/danbooru.conf +sed -i -e 's/__hostname__/$HOSTNAME/g' /opt/nginx/conf/sites/danbooru.conf /etc/init.d/nginx start echo "%wheel ALL=(ALL) ALL" >> /etc/sudoers @@ -137,8 +137,8 @@ echo "* modify the config/deploy/staging.rb and production.rb *" echo "* files to point to the correct servers. Then run: *" echo "* cap deploy:setup && cap deploy *" echo "* *" -echo "* The first account will automatically be made an admin. You *" -echo "* can edit the configuration files by editing *" +echo "* The first account will automatically be made an admin. *" +echo "* You can edit the configuration files by editing *" echo "* /var/www/danbooru/shared/config/local_config and *" echo "* /var/www/danbooru/shared/config/database.yml *" echo "**************************************************************" diff --git a/app/controllers/dmails_controller.rb b/app/controllers/dmails_controller.rb index 0a21da4cc..154749c39 100644 --- a/app/controllers/dmails_controller.rb +++ b/app/controllers/dmails_controller.rb @@ -15,7 +15,7 @@ class DmailsController < ApplicationController def index @search = Dmail.search(params[:search]) - @dmails = @search.paginate(params[:page]) + @dmails = @search.paginate(params[:page]).order("id desc") @dmails.each {|x| check_privilege(x)} respond_with(@dmails) end diff --git a/script/install/nginx.danbooru.conf b/script/install/nginx.danbooru.conf index 5d0b5579f..029854a41 100644 --- a/script/install/nginx.danbooru.conf +++ b/script/install/nginx.danbooru.conf @@ -1,7 +1,7 @@ server { passenger_enabled on; listen 80; - server_name $hostname; + server_name __hostname__; root /var/www/danbooru/current/public; index index.html; access_log /var/log/www/danbooru.access.log; @@ -16,7 +16,7 @@ server { break; } location /data { - valid_referers none HOSTNAME; + valid_referers none __hostname__; if ($invalid_referer) { return 403; }