Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Michael Joyce
digitallibsfuca_custom_navigation
Commits
dbbf1356
Commit
dbbf1356
authored
Apr 26, 2016
by
Mark Jordan
Browse files
Some cleanup.
parent
ef076e1c
Changes
1
Hide whitespace changes
Inline
Side-by-side
digitallibsfuca_custom_navigation.module
View file @
dbbf1356
...
...
@@ -40,15 +40,8 @@ function digitallibsfuca_custom_navigation_collection_home_link_visibility($pid)
$root_collection
=
variable_get
(
'islandora_repository_pid'
,
'islandora:root'
);
$object_collections
=
$object
->
relationships
->
get
(
FEDORA_RELS_EXT_URI
,
'isMemberOfCollection'
);
foreach
(
$object_collections
as
$object_collection
)
{
if
(
$host
=
$base_url
)
{
if
(
in_array
(
'islandora:collectionCModel'
,
$object
->
models
))
{
return
TRUE
;
}
}
else
{
if
(
$object_collection
[
'object'
][
'value'
]
==
$root_collection
)
{
return
TRUE
;
}
if
(
$object_collection
[
'object'
][
'value'
]
==
$root_collection
)
{
return
TRUE
;
}
}
}
...
...
@@ -80,7 +73,7 @@ function digitallibsfuca_custom_navigation_get_pid_from_url_to_arg($arg) {
$pid
=
arg
(
2
);
global
$base_url
;
$host
=
'http://newspapers.lib.sfu.ca'
;
if
(
$host
=
$base_url
)
{
if
(
$host
=
=
$base_url
)
{
// Get the object with PID arg(2), if it's a newspaper then
// get the PID of its parent collection and return its PID.
if
(
$object
=
islandora_object_load
(
$pid
))
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
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 comment