Project

General

Profile

« Previous | Next » 

Revision 4891

Added by walbridge about 15 years ago

Adding back fix for editing documents with multiple keywords, closing #3929

View differences:

src/perl/register-dataset.cgi
2217 2217

  
2218 2218
    my $count = 1;
2219 2219
    foreach $node ($results->get_nodelist) {
2220
    $tempResult = $node->findnodes('./keyword');
2221
    if ($tempResult->size() > 1) {
2222
        errMoreThanOne("keyword");
2223
    } else {
2220
        $tempResult = $node->findnodes('./keyword');
2224 2221
        foreach $tempNode ($tempResult->get_nodelist) {
2225 2222
            $$templateVars{"keyword$count"} = $tempNode->textContent();
2226 2223
            if ($tempNode->hasAttributes()) {
......
2230 2227
                $$templateVars{"kwType$count"} = $tmp;
2231 2228
            }
2232 2229
        }
2233
    }
2234
    $$templateVars{"kwTh$count"} = findValue($node, "keywordThesaurus");
2230
        $$templateVars{"kwTh$count"} = findValue($node, "keywordThesaurus");
2235 2231
        $count++;
2236 2232
    }
2233

  
2237 2234
    $$templateVars{'keyCount'} = $count;
2238
    if ($count > 0) {
2235
    if ($count > 1) {
2239 2236
       $$templateVars{'hasKeyword'} = "true";
2240 2237
    }
2241 2238

  
......
3514 3511
                if ($response != '1') {
3515 3512
                    return $failMessage;
3516 3513
                }
3517
                foreach (split(":",$moderators)) {
3514
                foreach (split(":", $moderators)) {
3518 3515
                    $response = $metacat->setaccess($id, $_, "all", "allow", "denyFirst");
3519 3516
                    if ($response != '1') {
3520 3517
                        return $failMessage;

Also available in: Unified diff