Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Riina Antikainen
/
Moya
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 895bd5f7
authored
Dec 09, 2014
by
Tuukka Kivilahti
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
2 parents
b56a335e
cc731e52
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
22 additions
and
8 deletions
code/moya-beans/ejbModule/fi/codecrew/moya/beans/PlaceBean.java
code/moya-beans/ejbModule/fi/codecrew/moya/facade/PlaceSlotFacade.java
code/moya-database/src/main/java/fi/codecrew/moya/model/Place.java
code/moya-web/WebContent/frontpage.xhtml
code/moya-web/src/main/java/fi/codecrew/moya/handler/SessionStore.java
code/moya-web/src/main/java/fi/codecrew/moya/web/cdiview/user/PasswordView.java
code/moya-beans/ejbModule/fi/codecrew/moya/beans/PlaceBean.java
View file @
895bd5f
...
@@ -617,7 +617,13 @@ public class PlaceBean implements PlaceBeanLocal {
...
@@ -617,7 +617,13 @@ public class PlaceBean implements PlaceBeanLocal {
place
.
setPlaceReserver
(
null
);
place
.
setPlaceReserver
(
null
);
gmemfacade
.
remove
(
res
);
gmemfacade
.
remove
(
res
);
}
// remove also slot from place
if
(
place
.
getReserverSlot
()
!=
null
)
{
PlaceSlot
slot
=
placeSlotFacade
.
reload
(
place
.
getReserverSlot
());
slot
.
setPlace
(
null
);
place
.
setReserverSlot
(
null
);
}
}
return
place
;
return
place
;
}
}
...
...
code/moya-beans/ejbModule/fi/codecrew/moya/facade/PlaceSlotFacade.java
View file @
895bd5f
...
@@ -103,7 +103,8 @@ public class PlaceSlotFacade extends IntegerPkGenericFacade<PlaceSlot> {
...
@@ -103,7 +103,8 @@ public class PlaceSlotFacade extends IntegerPkGenericFacade<PlaceSlot> {
cb
.
or
(
cb
.
isNull
(
billexp
),
cb
.
or
(
cb
.
isNull
(
billexp
),
cb
.
greaterThan
(
billexp
,
Calendar
.
getInstance
())
cb
.
greaterThan
(
billexp
,
Calendar
.
getInstance
())
),
),
cb
.
isNull
(
root
.
get
(
PlaceSlot_
.
place
))
cb
.
isNull
(
root
.
get
(
PlaceSlot_
.
place
)),
cb
.
isNull
(
root
.
get
(
PlaceSlot_
.
used
))
);
);
Long
count
=
super
.
getSingleNullableResult
(
getEm
().
createQuery
(
q
));
Long
count
=
super
.
getSingleNullableResult
(
getEm
().
createQuery
(
q
));
...
...
code/moya-database/src/main/java/fi/codecrew/moya/model/Place.java
View file @
895bd5f
...
@@ -310,6 +310,14 @@ public class Place extends GenericEntity implements Comparable<Place> {
...
@@ -310,6 +310,14 @@ public class Place extends GenericEntity implements Comparable<Place> {
return
buyable
;
return
buyable
;
}
}
public
PlaceSlot
getReserverSlot
()
{
return
reserverSlot
;
}
public
void
setReserverSlot
(
PlaceSlot
reserverSlot
)
{
this
.
reserverSlot
=
reserverSlot
;
}
public
void
setReleaseTime
(
Calendar
releaseTime
)
{
public
void
setReleaseTime
(
Calendar
releaseTime
)
{
this
.
releaseTime
=
releaseTime
;
this
.
releaseTime
=
releaseTime
;
}
}
...
...
code/moya-web/WebContent/frontpage.xhtml
View file @
895bd5f
...
@@ -9,10 +9,6 @@
...
@@ -9,10 +9,6 @@
<f:event
type=
"preRenderView"
listener=
"#{pageOutputView.initIndexView}"
/>
<f:event
type=
"preRenderView"
listener=
"#{pageOutputView.initIndexView}"
/>
</f:metadata>
</f:metadata>
<ui:define
name=
"content"
>
<ui:define
name=
"content"
>
<h:outputLabel
rendered=
"#{sessionHandler.isInDevelopmentMode()}"
>
Development-tilassa.
Täällä voit huoletta rikkoa.
</h:outputLabel>
<ui:fragment
rendered=
"#{layoutView.manageContent}"
>
<ui:fragment
rendered=
"#{layoutView.manageContent}"
>
<h:link
value=
"#{i18n['layout.editContent']}"
outcome=
"/pages/manage"
>
<h:link
value=
"#{i18n['layout.editContent']}"
outcome=
"/pages/manage"
>
<f:param
name=
"pagename"
value=
"#{layoutView.pagepath}"
/>
<f:param
name=
"pagename"
value=
"#{layoutView.pagepath}"
/>
...
...
code/moya-web/src/main/java/fi/codecrew/moya/handler/SessionStore.java
View file @
895bd5f
...
@@ -47,7 +47,7 @@ public class SessionStore implements Serializable {
...
@@ -47,7 +47,7 @@ public class SessionStore implements Serializable {
public
Locale
getLocale
()
{
public
Locale
getLocale
()
{
Locale
ret
=
locale
;
Locale
ret
=
locale
;
if
(
ret
==
null
)
if
(
ret
==
null
||
ret
.
toString
().
equals
(
""
)
)
{
{
String
retStr
=
eventbean
.
getCurrentEvent
().
getOrganiser
().
getBundleCountry
();
String
retStr
=
eventbean
.
getCurrentEvent
().
getOrganiser
().
getBundleCountry
();
...
@@ -60,11 +60,13 @@ public class SessionStore implements Serializable {
...
@@ -60,11 +60,13 @@ public class SessionStore implements Serializable {
}
}
}
}
if
(
ret
==
null
)
{
if
(
ret
==
null
||
ret
.
toString
().
equals
(
""
)
)
{
ret
=
DEFAULT_LOCALE
;
ret
=
DEFAULT_LOCALE
;
}
}
locale
=
ret
;
locale
=
ret
;
}
}
logger
.
info
(
"Using locale {}"
,
ret
);
return
ret
;
return
ret
;
}
}
...
...
code/moya-web/src/main/java/fi/codecrew/moya/web/cdiview/user/PasswordView.java
View file @
895bd5f
...
@@ -58,7 +58,8 @@ public class PasswordView extends GenericCDIView {
...
@@ -58,7 +58,8 @@ public class PasswordView extends GenericCDIView {
boolean
mod
=
permbean
.
hasPermission
(
UserPermission
.
MODIFY
);
boolean
mod
=
permbean
.
hasPermission
(
UserPermission
.
MODIFY
);
if
(
permbean
.
isCurrentUser
(
user
)
||
mod
)
{
if
(
permbean
.
isCurrentUser
(
user
)
||
mod
)
{
logger
.
debug
(
"foo {}, {}"
,
mod
,
user
.
checkPassword
(
oldPassword
));
logger
.
debug
(
"foo {}, {}"
,
mod
,
user
.
checkPassword
(
oldPassword
));
if
(!
mod
&&
!
user
.
checkPassword
(
oldPassword
))
{
if
(!
user
.
checkPassword
(
oldPassword
))
{
super
.
addFaceMessage
(
"userview.oldPasswordError"
);
super
.
addFaceMessage
(
"userview.oldPasswordError"
);
}
else
if
(
password
==
null
||
!
password
.
equals
(
passwordcheck
))
{
}
else
if
(
password
==
null
||
!
password
.
equals
(
passwordcheck
))
{
super
.
addFaceMessage
(
"userview.passwordsDontMatch"
);
super
.
addFaceMessage
(
"userview.passwordsDontMatch"
);
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment