Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
library
uw_lib_refshelf
Commits
95efb767
Commit
95efb767
authored
Jan 24, 2018
by
Ganesharatnam
Browse files
Run through code view
parent
b71a9e3e
Changes
1
Hide whitespace changes
Inline
Side-by-side
uw_lib_refshelf.module
View file @
95efb767
...
...
@@ -19,8 +19,8 @@ function uw_lib_refshelf_menu() {
}
/**
* Implements hook_block_info().
*/
* Implements hook_block_info().
*/
function
uw_lib_refshelf_block_info
()
{
$blocks
=
array
();
$blocks
[
'online_ref_shelfVer'
]
=
array
(
...
...
@@ -36,8 +36,8 @@ function uw_lib_refshelf_block_info() {
}
/**
* Implements hook_block_
info
().
*/
* Implements hook_block_
view
().
*/
function
uw_lib_refshelf_block_view
(
$delta
=
''
)
{
$block
=
array
();
switch
(
$delta
)
{
...
...
@@ -156,7 +156,6 @@ function uw_lib_refshelf_render_data() {
$content
.
=
$_SESSION
[
'tit'
];
$content
.
=
"<h3>"
.
$tit
.
"</h3><br />"
;
}
//$content .= $txt;
$qparam
=
$toc_id
;
$content
.
=
_getLinkAndDescORS
(
$qparam
,
"resources"
);
}
...
...
@@ -272,8 +271,8 @@ function _getLinkAndDescORS($param, $str) {
}
/**
* breadcrumbs
*/
* breadcrumbs
*/
function
_setBreadCrumbsORS
(
$str
,
$id
,
$title
,
$parent_id
)
{
$breadcrumb
=
drupal_get_breadcrumb
();
$main_title
=
drupal_get_title
();
...
...
@@ -296,7 +295,7 @@ function _setBreadCrumbsORS($str, $id, $title, $parent_id) {
$parent_data
=
_getDataORS
(
$parent_id
,
$url
);
$element
=
$parent_data
[
'data'
];
if
(
!
empty
(
$element
))
{
$prev_title
=
$element
[
0
][
'name'
];
$prev_title
=
$element
[
0
][
'name'
];
}
$link_url
=
"?"
.
"cat_id"
.
"="
.
$parent_id
;
$parent_link
=
'<a href="'
.
$link_url
.
'">'
.
$prev_title
.
'</a>'
;
...
...
@@ -376,8 +375,8 @@ function _refshelfDataSearchORS($word) {
}
/**
Resctriced URL is passed through the proxy
*/
*
Resctriced URL is passed through the proxy
*/
function
_filterRestrictedResourceORS
(
$restricted
,
$url
)
{
$proxy_url
=
"http://proxy.lib.uwaterloo.ca/login?url="
;
if
(
$restricted
==
1
)
{
...
...
@@ -393,7 +392,7 @@ function _filterRestrictedResourceORS($restricted, $url) {
* To highlight the search word in search results
*/
function
_highlightSearchWordORS
(
$word
,
$str
)
{
$str_uc_first
=
ucfirst
(
$word
);
$str_uc_first
=
ucfirst
(
$word
);
//Replacement for a search keyword -- all uppercase
if
(
ctype_upper
(
$word
))
{
...
...
@@ -539,7 +538,7 @@ function _keywordSearchORS($word, $data) {
}
else
{
return
FALSE
;
}
}
}
}
}
...
...
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