Subversion Repositories oidplus

Rev

Rev 1131 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1131 Rev 1243
Line 52... Line 52...
52
                // Redirect UUID to GUID
52
                // Redirect UUID to GUID
53
                // The OID-IP Internet Draft writes at section "Alternative Namespaces":
53
                // The OID-IP Internet Draft writes at section "Alternative Namespaces":
54
                //     "If available, a formal URN namespace identifier (as defined in RFC\08141, section\05.1 [RFC8141]) SHOULD be used, e.g. 'uuid' should be used instead of 'guid'."
54
                //     "If available, a formal URN namespace identifier (as defined in RFC\08141, section\05.1 [RFC8141]) SHOULD be used, e.g. 'uuid' should be used instead of 'guid'."
55
                // However, our plugin OIDplusObjectTypePluginGuid serves the namespace "guid".
55
                // However, our plugin OIDplusObjectTypePluginGuid serves the namespace "guid".
56
                // Therefore redirect "uuid" to "guid", so that people can use OID-IP or the GoTo-box with an "uuid:" input
56
                // Therefore redirect "uuid" to "guid", so that people can use OID-IP or the GoTo-box with an "uuid:" input
57
                return preg_replace('@^uuid:@', 'guid:', $static_node_id);
57
                $static_node_id = preg_replace('@^uuid:@', 'guid:', $static_node_id);
-
 
58
 
-
 
59
                // If someone enters a valid GUID/UUID in the goto-box, prepend "guid:" to it.
-
 
60
                if (uuid_valid($static_node_id)) {
-
 
61
                        $static_node_id = uuid_canonize($static_node_id); // optional: canonize it
-
 
62
                        $static_node_id = 'guid:'.$static_node_id;
-
 
63
                }
-
 
64
 
-
 
65
                return $static_node_id;
58
        }
66
        }
59
 
67
 
60
}
68
}