function _disqus_migrate_check_nid_exists in Disqus 6
Helper function to check if node exists from given path. If it does, return the NID... if not, return FALSE
1 call to _disqus_migrate_check_nid_exists()
- _disqus_migrate_import in include/
disqus_migrate.import.inc - The main function that handles importing comments from Disqus into Drupal
File
- include/
disqus_migrate.import.inc, line 342
Code
function _disqus_migrate_check_nid_exists($node_path) {
if (preg_match("/^node\\/([0-9]+)\$/", $node_path, $matches)) {
$node_exists = db_result(db_query("SELECT nid FROM {node} WHERE nid=%d", $matches[1]));
if ($node_exists !== FALSE) {
return $matches[1];
}
}
return FALSE;
}