Commit 95efb767 authored by Ganesharatnam's avatar Ganesharatnam
Browse files

Run through code view

parent b71a9e3e
...@@ -19,8 +19,8 @@ function uw_lib_refshelf_menu() { ...@@ -19,8 +19,8 @@ function uw_lib_refshelf_menu() {
} }
/** /**
* Implements hook_block_info(). * Implements hook_block_info().
*/ */
function uw_lib_refshelf_block_info() { function uw_lib_refshelf_block_info() {
$blocks = array(); $blocks = array();
$blocks['online_ref_shelfVer'] = array( $blocks['online_ref_shelfVer'] = array(
...@@ -36,8 +36,8 @@ function uw_lib_refshelf_block_info() { ...@@ -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 = '') { function uw_lib_refshelf_block_view($delta = '') {
$block = array(); $block = array();
switch ($delta) { switch ($delta) {
...@@ -156,7 +156,6 @@ function uw_lib_refshelf_render_data() { ...@@ -156,7 +156,6 @@ function uw_lib_refshelf_render_data() {
$content .= $_SESSION['tit']; $content .= $_SESSION['tit'];
$content .= "<h3>" . $tit . "</h3><br />"; $content .= "<h3>" . $tit . "</h3><br />";
} }
//$content .= $txt;
$qparam = $toc_id; $qparam = $toc_id;
$content .= _getLinkAndDescORS($qparam, "resources"); $content .= _getLinkAndDescORS($qparam, "resources");
} }
...@@ -272,8 +271,8 @@ function _getLinkAndDescORS($param, $str) { ...@@ -272,8 +271,8 @@ function _getLinkAndDescORS($param, $str) {
} }
/** /**
* breadcrumbs * breadcrumbs
*/ */
function _setBreadCrumbsORS($str, $id, $title, $parent_id) { function _setBreadCrumbsORS($str, $id, $title, $parent_id) {
$breadcrumb = drupal_get_breadcrumb(); $breadcrumb = drupal_get_breadcrumb();
$main_title = drupal_get_title(); $main_title = drupal_get_title();
...@@ -296,7 +295,7 @@ function _setBreadCrumbsORS($str, $id, $title, $parent_id) { ...@@ -296,7 +295,7 @@ function _setBreadCrumbsORS($str, $id, $title, $parent_id) {
$parent_data = _getDataORS($parent_id, $url); $parent_data = _getDataORS($parent_id, $url);
$element = $parent_data['data']; $element = $parent_data['data'];
if (!empty($element)) { if (!empty($element)) {
$prev_title = $element[0]['name']; $prev_title = $element[0]['name'];
} }
$link_url = "?" . "cat_id" . "=" . $parent_id; $link_url = "?" . "cat_id" . "=" . $parent_id;
$parent_link = '<a href="' . $link_url . '">' . $prev_title . '</a>'; $parent_link = '<a href="' . $link_url . '">' . $prev_title . '</a>';
...@@ -376,8 +375,8 @@ function _refshelfDataSearchORS($word) { ...@@ -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) { function _filterRestrictedResourceORS($restricted, $url) {
$proxy_url = "http://proxy.lib.uwaterloo.ca/login?url="; $proxy_url = "http://proxy.lib.uwaterloo.ca/login?url=";
if ($restricted == 1) { if ($restricted == 1) {
...@@ -393,7 +392,7 @@ function _filterRestrictedResourceORS($restricted, $url) { ...@@ -393,7 +392,7 @@ function _filterRestrictedResourceORS($restricted, $url) {
* To highlight the search word in search results * To highlight the search word in search results
*/ */
function _highlightSearchWordORS($word, $str) { function _highlightSearchWordORS($word, $str) {
$str_uc_first = ucfirst($word); $str_uc_first = ucfirst($word);
//Replacement for a search keyword -- all uppercase //Replacement for a search keyword -- all uppercase
if (ctype_upper($word)) { if (ctype_upper($word)) {
...@@ -539,7 +538,7 @@ function _keywordSearchORS($word, $data) { ...@@ -539,7 +538,7 @@ function _keywordSearchORS($word, $data) {
} }
else { else {
return FALSE; return FALSE;
} }
} }
} }
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment