Permalink
Browse files

Update link.lib.php

  • Loading branch information...
jmontoyaa committed May 13, 2015
1 parent 23f2e75 commit aeac10a06115a810bd630f04d55f452c51be35d5
Showing with 22 additions and 21 deletions.
  1. +22 −21 main/inc/lib/link.lib.php
@@ -103,6 +103,28 @@ public function updateLink($linkId, $linkUrl, $courseId = null, $sessionId = nul
return false;
}
/**
*
* Get link info
* @param int link id
* @return array link info
*
**/
public static function get_link_info($id)
{
$tbl_link = Database:: get_course_table(TABLE_LINK);
$course_id = api_get_course_int_id();
$sql = "SELECT * FROM " . $tbl_link . "
WHERE c_id = $course_id AND id='" . intval($id) . "' ";
$result = Database::query($sql);
$data = array();
if (Database::num_rows($result)) {
$data = Database::fetch_array($result);
}
return $data;
}
}
/**
@@ -456,27 +478,6 @@ function delete_link_from_search_engine($course_id, $link_id)
require_once(api_get_path(LIBRARY_PATH) . 'specific_fields_manager.lib.php');
delete_all_values_for_item($course_id, TOOL_DOCUMENT, $link_id);
}
/**
*
* Get link info
* @param int link id
* @return array link info
*
**/
public static function get_link_info($id)
{
$tbl_link = Database:: get_course_table(TABLE_LINK);
$course_id = api_get_course_int_id();
$sql = "SELECT * FROM " . $tbl_link . "
WHERE c_id = $course_id AND id='" . intval($id) . "' ";
$result = Database::query($sql);
$data = array();
if (Database::num_rows($result)) {
$data = Database::fetch_array($result);
}
return $data;
}
}
/**

0 comments on commit aeac10a

Please sign in to comment.