17,7 → 17,7 |
* limitations under the License. |
*/ |
|
if (!defined('INSIDE_OIDPLUS')) die(); |
namespace ViaThinkSoft\OIDplus; |
|
class OIDplusObjectTypePluginOid extends OIDplusObjectTypePlugin { |
|
48,10 → 48,10 |
// Convert WEID to OID |
// A WEID is just a different notation of an OID. |
// To allow that people use OID-IP or the GoTo-box with a "weid:" identifier, rewrite it to "oid:", so that the plugin OIDplusObjectTypePluginOid can handle it. |
if (str_starts_with($static_node_id,'weid:') && class_exists('WeidOidConverter')) { |
if (str_starts_with($static_node_id,'weid:') && class_exists('\Frdl\Weid\WeidOidConverter')) { |
$ary = explode('$', $static_node_id, 2); |
$weid = $ary[0]; |
$oid = WeidOidConverter::weid2oid($weid); |
$oid = \Frdl\Weid\WeidOidConverter::weid2oid($weid); |
if ($oid === false) { |
if ($throw_exception) throw new OIDplusException('This is not a valid WEID'); |
} else { |