src/snac/server/ServerExecutor.php
/**
     * Check Mergability
     *
     * Checks if two Constellations, given by their ICIDs are mergeable.  If they are, this will
     * return boolean true.  If they are not, then this will return the Assertion object that
     * determines why they are non-mergeable or false if they are not mergeable because one or
     * both is currently checked out to another user.
     *
     * @param int $cId1 One Constellation ID
     * @param int $cId2 Another Constellation ID
     * @param int $cV1 First Constellation Version or null
     * @param int $cV2 Second Constellation Version or null
     * @return \snac\data\Assertion|boolean True if mergeable, false if unmergeable for editing reasons, or an
     *                                      Assertion if they are unmergeable because of a user-assertion
     */
Check Mergability
Checks if two Constellations, given by their ICIDs are mergeable.  If they are, this will
return boolean true.  If they are not, then this will return the Assertion object that
determines why they are non-mergeable or false if they are not mergeable because one or
both is currently checked out to another user.


Check Mergability Checks if two Constellations given by their ICIDs are mergeable . If they are this will return boolean true . If they are not then this will return the Assertion object that determines why they are non - mergeable or false if they are not mergeable because one or both is currently checked out to another user .
function isMergeable($cId1, $cId2, $cV1 = null, $cV2 = null) {
        if ($cId1 === $cId2)
            return null;
        if ($cV1 != null || $cV2 != null)
            return null;
        $status1 = $this->cStore->readConstellationStatus($cId1);
        $status2 = $this->cStore->readConstellationStatus($cId2);
        if ($status1 == "published" && $status2 == "published") {
            $c1 = new \snac\data\Constellation();
            $c1->setID($cId1);
            $c2 = new \snac\data\Constellation();
            $c2->setID($cId2);
            $assert = new \snac\data\Assertion();
            $assert->addConstellation($c1);
            $assert->addConstellation($c2);
            $assert->setType("not_same");
            $result = $this->cStore->readAssertion($assert, $this->uStore);
            if ($result === false) {
                return true;
            } else {
                return $result;
            }
        }
        return null;
    }
function isMergeable ( $ cId1 , $ cId2 , $ cV1 = null , $ cV2 = null ) { if ( $ cId1 === $ cId2 ) return null ; if ( $ cV1 != null || $ cV2 != null ) return null ; $ status1 = $ this -> cStore -> readConstellationStatus ( $ cId1 ) ; $ status2 = $ this -> cStore -> readConstellationStatus ( $ cId2 ) ; if ( $ status1 == " published " && $ status2 == " published " ) { $ c1 = new \ snac \ data \ Constellation ( ) ; $ c1 -> setID ( $ cId1 ) ; $ c2 = new \ snac \ data \ Constellation ( ) ; $ c2 -> setID ( $ cId2 ) ; $ assert = new \ snac \ data \ Assertion ( ) ; $ assert -> addConstellation ( $ c1 ) ; $ assert -> addConstellation ( $ c2 ) ; $ assert -> setType ( " not_same " ) ; $ result = $ this -> cStore -> readAssertion ( $ assert , $ this -> uStore ) ; if ( $ result === false ) { return true ; } else { return $ result ; } } return null ; }
Check Mergability
 Checks if two Constellations, given by their ICIDs are mergeable.
Check Mergability Checks if two Constellations given by their ICIDs are mergeable .
// If both are published, then check assertions