예제 #1
0
 public static function resetNodeInfoByDocId($lingotek_document_id)
 {
     $doc_ids = is_array($lingotek_document_id) ? $lingotek_document_id : array($lingotek_document_id);
     $count = 0;
     foreach ($doc_ids as $doc_id) {
         $node_id = LingotekSync::getNodeIdFromDocId($doc_id);
         // grab before node info is removed
         LingotekSync::removeNodeInfoByDocId($doc_id);
         //remove locally (regardless of success remotely)
         if ($node_id !== FALSE) {
             LingotekSync::setNodeStatus($node_id, LingotekSync::STATUS_EDITED);
             $count++;
         }
     }
     return $count;
 }