From 1684e2c3f95ad5416541ea5e26be5803b9a5dfeb Mon Sep 17 00:00:00 2001 From: nek0 Date: Sun, 21 Sep 2014 18:42:07 +0200 Subject: [PATCH] changed order --- Handler/AdminAlbumSettings.hs | 4 ++-- Handler/AdminMediumSettings.hs | 2 +- Handler/Profile.hs | 2 +- Handler/Tag.hs | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Handler/AdminAlbumSettings.hs b/Handler/AdminAlbumSettings.hs index 376eb7d..fae2106 100644 --- a/Handler/AdminAlbumSettings.hs +++ b/Handler/AdminAlbumSettings.hs @@ -14,7 +14,7 @@ getAdminAlbumsR = do user <- runDB $ getJust userId case userAdmin user of True -> do - albums <- runDB $ selectList [] [Desc AlbumTitle] + albums <- runDB $ selectList [] [Asc AlbumTitle] defaultLayout $ do $(widgetFile "adminAlbums") False -> do @@ -36,7 +36,7 @@ getAdminAlbumMediaR albumId = do tempAlbum <- runDB $ get albumId case tempAlbum of Just album -> do - media <- runDB $ selectList [MediumAlbum ==. albumId] [Desc MediumTitle] + media <- runDB $ selectList [MediumAlbum ==. albumId] [Asc MediumTitle] defaultLayout $ do $(widgetFile "adminAlbumMedia") Nothing -> do diff --git a/Handler/AdminMediumSettings.hs b/Handler/AdminMediumSettings.hs index 4fa936f..daf0f71 100644 --- a/Handler/AdminMediumSettings.hs +++ b/Handler/AdminMediumSettings.hs @@ -14,7 +14,7 @@ getAdminMediaR = do user <- runDB $ getJust userId case userAdmin user of True -> do - media <- runDB $ selectList [] [Desc MediumTitle] + media <- runDB $ selectList [] [Asc MediumTitle] defaultLayout $ do $(widgetFile "adminMedia") False -> do diff --git a/Handler/Profile.hs b/Handler/Profile.hs index d891b20..02197f0 100644 --- a/Handler/Profile.hs +++ b/Handler/Profile.hs @@ -8,7 +8,7 @@ getProfileR :: UserId -> Handler Html getProfileR ownerId = do owner <- runDB $ get ownerId ownerSlug <- lift $ pure $ userSlug $ fromJust owner - userAlbs <- runDB $ selectList [AlbumOwner ==. ownerId] [Desc AlbumTitle] + userAlbs <- runDB $ selectList [AlbumOwner ==. ownerId] [Asc AlbumTitle] recentMedia <- (runDB $ selectList [MediumOwner ==. ownerId] [Desc MediumTime]) msu <- lookupSession "userId" presence <- case msu of diff --git a/Handler/Tag.hs b/Handler/Tag.hs index 962fd7b..0d0f7fb 100644 --- a/Handler/Tag.hs +++ b/Handler/Tag.hs @@ -5,7 +5,7 @@ import Data.Maybe getTagR :: Text -> Handler Html getTagR tag = do - tempMedia <- runDB $ selectList [] [Desc MediumTitle] + tempMedia <- runDB $ selectList [] [Asc MediumTitle] almostMedia <- mapM (\a -> do case tag `elem` (mediumTags $ entityVal a) of True -> return (Just a)