| @@ 764-780 (lines=17) @@ | ||
| 761 | ||
| 762 | $output = executeQuery('document.insertDocument', $obj); |
|
| 763 | ||
| 764 | if($output->toBool() && $obj->tags) |
|
| 765 | { |
|
| 766 | $tag_list = explode(',',$obj->tags); |
|
| 767 | $tag_count = count($tag_list); |
|
| 768 | for($i=0;$i<$tag_count;$i++) |
|
| 769 | { |
|
| 770 | $args = new stdClass; |
|
| 771 | $args->tag_srl = getNextSequence(); |
|
| 772 | $args->module_srl = $module_srl; |
|
| 773 | $args->document_srl = $obj->document_srl; |
|
| 774 | $args->tag = trim($tag_list[$i]); |
|
| 775 | $args->regdate = $obj->regdate; |
|
| 776 | if(!$args->tag) continue; |
|
| 777 | $output = executeQuery('tag.insertTag', $args); |
|
| 778 | } |
|
| 779 | ||
| 780 | } |
|
| 781 | // Add extra variables |
|
| 782 | if(count($extra_vars)) |
|
| 783 | { |
|
| @@ 258-277 (lines=20) @@ | ||
| 255 | // Document |
|
| 256 | $output = executeQuery('document.insertDocument', $obj); |
|
| 257 | ||
| 258 | if($output->toBool()) |
|
| 259 | { |
|
| 260 | // Tags |
|
| 261 | if($obj->tags) |
|
| 262 | { |
|
| 263 | $tag_list = explode(',',$obj->tags); |
|
| 264 | $tag_count = count($tag_list); |
|
| 265 | for($i=0;$i<$tag_count;$i++) |
|
| 266 | { |
|
| 267 | $args = new stdClass; |
|
| 268 | $args->tag_srl = getNextSequence(); |
|
| 269 | $args->module_srl = $module_srl; |
|
| 270 | $args->document_srl = $obj->document_srl; |
|
| 271 | $args->tag = trim($tag_list[$i]); |
|
| 272 | $args->regdate = $obj->regdate; |
|
| 273 | if(!$args->tag) continue; |
|
| 274 | $output = executeQuery('tag.insertTag', $args); |
|
| 275 | } |
|
| 276 | } |
|
| 277 | } |
|
| 278 | ||
| 279 | fclose($fp); |
|
| 280 | FileHandler::removeFile($target_file); |
|