Changeset 1754 for trunk


Ignore:
Timestamp:
Apr 12, 2011, 12:14:59 PM (9 years ago)
Author:
work@…
Message:
  • removed default user from www config
  • trying to fix the homecontroller issue on an empty database
Location:
trunk/grails-app
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/conf/config-www.properties

    r1705 r1754  
    3434authentication.users.admin.email=admin@dbnp.org
    3535authentication.users.admin.administrator=true
    36 authentication.users.user.username=user
    37 authentication.users.user.password=useR123!
    38 authentication.users.user.email=user@dbnp.org
    39 authentication.users.user.administrator=false
     36#authentication.users.user.username=user
     37#authentication.users.user.password=useR123!
     38#authentication.users.user.email=user@dbnp.org
     39#authentication.users.user.administrator=false
  • trunk/grails-app/controllers/HomeController.groovy

    r1753 r1754  
    5353                def startDate, endDate, date, userTotal, studyTotal, templateTotal
    5454                def dailyStatistics = [:]
    55                 if (db == "org.postgresql.Driver" && studyCount) {
     55                if (db == "org.postgresql.Driver" && studyCount > 0) {
    5656                        //sql.eachRow("SELECT b.*,(select cast( now() - '120 day'::interval * random() as date) FROM Template c WHERE c.id=b.id) as newDate FROM Template b WHERE b.id IN (SELECT id FROM Template a)") {sql.execute(sprintf("UPDATE Template SET date_created='%s' WHERE id=%s", it.newDate, it.id))}
    5757                        def studiesPerDay       = sql.rows("SELECT DISTINCT date_trunc('day', a.date_created) as day, (SELECT count(b.*) FROM study b WHERE date_trunc('day', b.date_created) = date_trunc('day', a.date_created)) as count FROM study a ORDER BY day ASC")
Note: See TracChangeset for help on using the changeset viewer.