Commit 2389279a authored by tombui's avatar tombui

replaced To Do with TODO.

parent 5821c1b1
......@@ -344,7 +344,7 @@ class NCIPConnection {
public function get_timestamp() {
static $sql;
//To Do From Tom, need to compare this query
//TODO from Tom, need to compare this query
if (isset($sql)) {
$sql = "SELECT timestamp
FROM {ncip_connection}
......
......@@ -70,7 +70,7 @@ function xc_dewey_menu() {
* @see http://drupal.org/node/1354
*/
function xc_dewey_resolve() {
//To Do From Tom, could use explode to replace split if needed.
//TODO from Tom, could use explode to replace split if needed.
$dewey_numbers = explode(',', $_GET['numbers']);
$items = array();
......
......@@ -152,7 +152,7 @@ function xc_external_get_object_by_id($id, $id_type, $service_type, $do_trace =
AND info.updated_at >= :info.updated_at';
}
$timeframe = format_date(time() - XC_EX_TIMEOUT, 'custom', 'Y-m-d H:i:s');
//To Do From Tom
//TODO from Tom
$final_sql = xc_util_get_sql($sql, $id_type, $id, $service_type, $timeframe);
$result = db_query($sql, array(':conn.identifier_type' => $id_type, ':conn.identifier' => $id, ':info.service_type' => $service_type, ':info.updated_at' => $timeframe));
$connections = array();
......@@ -180,7 +180,7 @@ function xc_external_get_object_by_ids($ids, $service_type, $do_trace = FALSE) {
xc_external_clear_old_entries();
$do_clear = FALSE;
}
//To Do From Tom, need to check on this query
//TODO from Tom, need to check on this query
if (!isset($sql)) {
$sql = <<< END
SELECT info.* FROM {xc_external_connection} AS conn
......
......@@ -1419,7 +1419,7 @@ function xc_oaiharvester_bridge_oaiharvester_schedule_view($schedule_id) {
'admin/xc/metadata/location/' . $location->location_id
);
}
/* To do from Tom
/* TODO from Tom
$ping = xc_solr_ping($locations);
$ping_report = array();
foreach ($ping as $ping_result) {
......
......@@ -97,7 +97,7 @@ function xc_search_date_facet_properties_list() {
$sql = 'SELECT set_id, name, description FROM {xc_search_date_facet_properties}';
$result = db_query($sql);
//while ($data = db_fetch_object($result)) {
//To Do From Tom, need to check the result. Could use foreach to loop for through the result.
//TODO from Tom, need to check the result. Could use foreach to loop for through the result.
while ($data = $result->fetchObject()) {
$rows[] = array(
l($data->name, 'admin/xc/search/facet/datefacetset/' . $data->set_id),
......
......@@ -318,7 +318,7 @@ function xc_search_display_template_import_defaults($delete = FALSE) {
*/
function xc_search_display_template_save_to_file($record) {
$dirname = drupal_get_path('module', 'xc_search') . '/' . XC_SEARCH_TEMPLATE_DIR;
//To Do From Tom, need to check dir name
//TODO from Tom, need to check dir name
$filename = $dirname . '/' . $record->entity_type . '-' . $record->display_type . '.tpl.php';
$options = array('ftp' => array('overwrite' => TRUE));
$stream = stream_context_create($options);
......
......@@ -1895,7 +1895,7 @@ function xc_search_display_template_element_get($entity_type, $element_name = NU
if (!isset($template_element_cache)) {
$template_element_cache = array();
}
// To Do From Tom, convert to D7 query
// TODO from Tom, convert to D7 query
if (!isset($sql_without_name)) {
$sql_without_name = "SELECT element_name, template
FROM {xc_search_display_template_element}
......
......@@ -326,7 +326,7 @@ function xc_solr_onestop_indexer($metadata_id, $clear_cache = FALSE) {
$mapping = xc_index_facet_for_edit_load($facet->name);
$function = $facet->fn;
//To Do From Tom
//TODO from Tom
//$values = $function(&$document, $metadata, $mapping->fields);
$values = $function($document, $metadata, $mapping->fields);
}
......@@ -442,7 +442,7 @@ function xc_solr_get_metadata($metadata_id) {
return FALSE;
}
// xc_log_info('solr', 'get #' . $metadata_id);
//To Do From Tom, need to compare with D6
//TODO from Tom, need to compare with D6
if (!isset($sql)) {
$sql = 'SELECT e.identifier, e.identifier_int, e.node_id, e.node_type, e.metadata_id, e.metadata_type, e.source_id,
m.metadata AS metadata
......@@ -511,7 +511,7 @@ function xc_solr_get_metadata_by_identifier_int($identifier_int) {
if ($queries->strategy == 'join') {
// TODO Please convert this statement to the D7 database API syntax.
// To Do From Tom
// TODO from Tom
$entity = db_query($queries->join,array(':identifier'=>$identifier_int))->fetchObject();
$ts2 = microtime(TRUE);
xc_oaiharvester_statistics_set('03 step3/02 iterator/01 xc_solr_onestop_indexer/xc_solr_get_parent/xc_solr_get_metadata_by_identifier/sql', ($ts2 - $ts1));
......@@ -541,7 +541,7 @@ function xc_solr_get_metadata_by_identifier_int($identifier_int) {
if ($entity != FALSE) {
// TODO Please convert this statement to the D7 database API syntax.
// To Do From Tom, need to convert this query
// TODO from Tom, need to convert this query
//$entity->metadata = db_query('SELECT metadata FROM {xc_sql_metadata} WHERE metadata_id = ' . $entity->metadata_id)->fetchField();
$entity->metadata = db_query($queries->metadata, array(':metadata_id' => $entity->metadata_id))->fetchField();
$ts3 = microtime(TRUE);
......@@ -1060,7 +1060,7 @@ function xc_solr_onestop_indexer_batch_prepare($locations = array(), $saved_batc
$stored_offset_id = variable_get('xc_solr_reindex_offset_id', -1);
if ($stored_offset_id == -1) {
// TODO Please convert this statement to the D7 database API syntax.
// To Do From Tom. Need to check the original query for conversion
// TODO from Tom. Need to check the original query for conversion
$offset_id = db_query('SELECT min(metadata_id) FROM {xc_entity_properties} WHERE ' . $metadata_types_condition)->fetchField() - 1;
}
else {
......
......@@ -746,7 +746,7 @@ function xc_solr_location_submit($form, &$form_state) {
}
function xc_solr_server_set($solr) {
//To Do From Tom, need to convert to D7
//TODO from Tom, need to convert to D7
$sql = 'SELECT sid FROM {xc_solr_servers} WHERE sid = :d';
$update = empty($solr->sid)
......@@ -781,7 +781,7 @@ function xc_solr_get_location_id($sid) {
static $cache;
if (empty($cache[$sid])) {
$sql = 'SELECT location_id FROM {xc_solr_servers} WHERE sid = :d';
// To Do From Tom, need to check db_result for D7
// TODO from Tom, need to check db_result for D7
$cache[$sid] = db_result(db_query($sql, array(':d' => $sid)));
}
return $cache[$sid];
......
......@@ -42,7 +42,7 @@ function xc_solr_field_type_list() {
l($data->suffix, 'admin/xc/solr/field_type/' . $data->type_id)
);
}
//To Do From Tom about the theme output.
//TODO from Tom about the theme output.
//$output .= theme('table', $headers, $rows);
$output .= theme('table', array('header' => $headers, 'rows' => $rows));
$output .= '<p>' . l(t('Reorder this list'), 'admin/xc/solr/field_type/reorder') . '</p>';
......@@ -107,7 +107,7 @@ function xc_solr_field_type_reorder_form_submit($form, &$form_state) {
$form_state['redirect'] = 'admin/xc/solr/field_type';
}
//To do From Tom admin/xc/solr/field_type/reorder
//TODO from Tom admin/xc/solr/field_type/reorder
//function theme_xc_solr_field_type_reorder_form($form, &$form_state) {
function theme_xc_solr_field_type_reorder_form($form, &$form_state) {
......
......@@ -757,7 +757,7 @@ function xc_util_get_sql($query) {
if (isset($args[0]) and is_array($args[0])) { // 'All arguments in one array' syntax
$args = $args[0];
}
// To Do From Tom
// TODO from Tom
// _db_query_callback($args, TRUE);
// $query = preg_replace_callback(DB_QUERY_REGEXP, '_db_query_callback', $query);
return $query;
......
Markdown is supported
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