Mercurial > hg > marc_php
comparison anoclaims.php @ 1:caa68b502313 draft
Added the MARC DNS server (and small fixes in marcus and anoclaims)
author | Ivo Smits <Ivo@UCIS.nl> |
---|---|
date | Thu, 13 Nov 2014 17:22:12 +0100 |
parents | 3ac7bd7495fd |
children | c642254dc9ee |
comparison
equal
deleted
inserted
replaced
0:3ac7bd7495fd | 1:caa68b502313 |
---|---|
19 case 'CLAIM': | 19 case 'CLAIM': |
20 if (is_null($key)) throw new Exception('Key not found'); | 20 if (is_null($key)) throw new Exception('Key not found'); |
21 $label = argtolabel($argv, $argi); | 21 $label = argtolabel($argv, $argi); |
22 $resource = $database->GetResource($label); | 22 $resource = $database->GetResource($label); |
23 if (!$resource) $resource = array('label' => $label, 'value' => array()); | 23 if (!$resource) $resource = array('label' => $label, 'value' => array()); |
24 else $resource = $resource->ToArray(); | |
24 if (!$database->UpdateResource($resource, $key)) throw new Exception('Could not update resource'); | 25 if (!$database->UpdateResource($resource, $key)) throw new Exception('Could not update resource'); |
25 break; | 26 break; |
26 case 'SETNS': | 27 case 'SETNS': |
27 if (is_null($key)) throw new Exception('Key not found'); | 28 if (is_null($key)) throw new Exception('Key not found'); |
28 $label = argtolabel($argv, $argi); | 29 $label = argtolabel($argv, $argi); |