Commit a8ca3907 authored by Ganesharatnam's avatar Ganesharatnam
Browse files

fix for spelling mistakes

parent 21065ed3
...@@ -27,7 +27,7 @@ function uw_lib_refshelf_data($param, $url) { ...@@ -27,7 +27,7 @@ function uw_lib_refshelf_data($param, $url) {
$uri = $url . $param; $uri = $url . $param;
$file_headers = @get_headers($uri); $file_headers = @get_headers($uri);
if (!$file_headers || $file_headers[0] == 'HTTP/1.1 404 Not Found') { if (!$file_headers || $file_headers[0] == 'HTTP/1.1 404 Not Found') {
drupal_set_message(t('<h3>URL is not available to collect the data</h3>')); drupal_set_message(t('<h2>URL is not available to collect the data</h2>'));
} }
else{ else{
$response = file_get_contents($uri); $response = file_get_contents($uri);
...@@ -54,12 +54,12 @@ function uw_lib_refshelf_render_data() { ...@@ -54,12 +54,12 @@ function uw_lib_refshelf_render_data() {
if (isset($_GET['cat_id']) && !empty($_GET['cat_id'])) { if (isset($_GET['cat_id']) && !empty($_GET['cat_id'])) {
//Displaying Subcategories //Displaying Subcategories
$tit = html_entity_decode($_GET['title']); $tit = html_entity_decode($_GET['title']);
$txt = "<h3>" . $tit . "</h3><br />"; $txt = "<h2>" . $tit . "</h2><br />";
$_SESSION['tit'] = $txt; $_SESSION['tit'] = $txt;
$qparam = $_GET['cat_id']; $qparam = $_GET['cat_id'];
$links = uw_lib_refshelf_get_links($qparam, "toc_id"); $links = uw_lib_refshelf_get_links($qparam, "toc_id");
if (empty($links)) { if (empty($links)) {
$txt = "<h3>Resources for " . $tit . "</h3><br />"; $txt = "<h2>Resources for " . $tit . "</h2><br />";
$links .= uw_lib_refshelf_get_links($qparam, "resources"); $links .= uw_lib_refshelf_get_links($qparam, "resources");
} }
$_SESSION['toc_links'] = $links; $_SESSION['toc_links'] = $links;
...@@ -143,7 +143,8 @@ function uw_lib_refshelf_get_links($param, $str) { ...@@ -143,7 +143,8 @@ function uw_lib_refshelf_get_links($param, $str) {
$link_url = "?" . $str . "=" . $id . "&title=" . $link_name; $link_url = "?" . $str . "=" . $id . "&title=" . $link_name;
} }
if (isset($element['description'])) { if (isset($element['description'])) {
$page .= '<div><a href="' . $link_url . '" target=\"_blank\">' . $link_name . '</a></div>'; //$page .= '<div><a href="' . $link_url . '" target=\"_blank\">' . $link_name . '</a></div>';
$page .= '<div><a href="' . $link_url . '">' . $link_name . '</a></div>';
$page .= "<div>" . $element['description'] . "</div><br />"; $page .= "<div>" . $element['description'] . "</div><br />";
} }
else { else {
...@@ -252,8 +253,9 @@ function uw_lib_refshelf_search($word) { ...@@ -252,8 +253,9 @@ function uw_lib_refshelf_search($word) {
$no_duplicates = array_unique($all); $no_duplicates = array_unique($all);
$records_cnt = count($no_duplicates); $records_cnt = count($no_duplicates);
$actual_records = $records_cnt -1 ; $actual_records = $records_cnt -1 ;
if ($records_cnt < 25) { if ($records_cnt < 25) {
$msg = "<br /><br /><div><h3>The follwing " . $actual_records . " results found for the key word <b>" . $word . "</b></h3></div><br />"; $msg = "<br /><br /><div><h3>The following " . $actual_records . " results found for the keyword <b>" . $word . "</b></h3></div><br />";
if (!empty($no_duplicates)) { if (!empty($no_duplicates)) {
foreach ($no_duplicates as $result) { foreach ($no_duplicates as $result) {
$page .= $result; $page .= $result;
...@@ -301,7 +303,7 @@ function uw_lib_refshelf_view_results($no_duplicates, $word, $pagenum, $offset) ...@@ -301,7 +303,7 @@ function uw_lib_refshelf_view_results($no_duplicates, $word, $pagenum, $offset)
if (!empty($no_duplicates)) { if (!empty($no_duplicates)) {
if ($rec_count > $offset) { if ($rec_count > $offset) {
$msg = "<br /><br /><br /><p><h3>The following results found for the key word <b>" . $word . "</b></h3></p>"; $msg = "<br /><br /><br /><p><h3>The following results found for the keyword <b>" . $word . "</b></h3></p>";
$cnt = 0; $cnt = 0;
$c = 0; $c = 0;
foreach ($no_duplicates as $result) { foreach ($no_duplicates as $result) {
...@@ -333,9 +335,10 @@ function uw_lib_refshelf_search_results($status, $desc, $link_name, $link_url, $ ...@@ -333,9 +335,10 @@ function uw_lib_refshelf_search_results($status, $desc, $link_name, $link_url, $
$page = ""; $page = "";
$desc = uw_lib_refshelf_highlight_word($word, $desc); $desc = uw_lib_refshelf_highlight_word($word, $desc);
$link_name = uw_lib_refshelf_highlight_word($word, $link_name); $link_name = uw_lib_refshelf_highlight_word($word, $link_name);
if ($status) { if ($status) {
if (!empty($desc)) { if (!empty($desc)) {
$link = '<span class="ref_links"><a href="' . $link_url . '" target=\"_blank\">' . $link_name . '</a></span>'; $link = '<span class="ref_links"><a href="' . $link_url . '">' . $link_name . '</a></span>';
$page .= $link . "<p>" . $desc . "</p>"; $page .= $link . "<p>" . $desc . "</p>";
} }
else { else {
...@@ -385,8 +388,8 @@ function uw_lib_refshelf_keyword_search($word, $data) { ...@@ -385,8 +388,8 @@ function uw_lib_refshelf_keyword_search($word, $data) {
*/ */
function uw_lib_refshelf_pagination($pagenum, $left_rec, $rec_limit) { function uw_lib_refshelf_pagination($pagenum, $left_rec, $rec_limit) {
if ( $left_rec < $rec_limit ) { if ( $left_rec < $rec_limit ) {
$last = $pagenum - 2; $last = $pagenum - 2;
$content = "<a href = \"?pagenum={$last}\">Previous</a>"; $content = "<a href = \"?pagenum={$last}\">Previous</a>";
} }
elseif ($pagenum == 0 ) { elseif ($pagenum == 0 ) {
$content = "<a href = \"?pagenum={$pagenum}\">Next</a>"; $content = "<a href = \"?pagenum={$pagenum}\">Next</a>";
......
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