File tree 1 file changed +21
-0
lines changed
1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -456,6 +456,27 @@ function delete_link_from_search_engine($course_id, $link_id)
456
456
require_once (api_get_path (LIBRARY_PATH ) . 'specific_fields_manager.lib.php ' );
457
457
delete_all_values_for_item ($ course_id , TOOL_DOCUMENT , $ link_id );
458
458
}
459
+
460
+ /**
461
+ *
462
+ * Get link info
463
+ * @param int link id
464
+ * @return array link info
465
+ *
466
+ **/
467
+ public static function get_link_info ($ id )
468
+ {
469
+ $ tbl_link = Database:: get_course_table (TABLE_LINK );
470
+ $ course_id = api_get_course_int_id ();
471
+ $ sql = "SELECT * FROM " . $ tbl_link . "
472
+ WHERE c_id = $ course_id AND id=' " . intval ($ id ) . "' " ;
473
+ $ result = Database::query ($ sql );
474
+ $ data = array ();
475
+ if (Database::num_rows ($ result )) {
476
+ $ data = Database::fetch_array ($ result );
477
+ }
478
+ return $ data ;
479
+ }
459
480
}
460
481
461
482
/**
You can’t perform that action at this time.
0 commit comments