| @@ 558-573 (lines=16) @@ | ||
| 555 | } |
|
| 556 | ||
| 557 | $content = $this->get('content'); |
|
| 558 | if(!$this->hasUploadedFiles()) |
|
| 559 | { |
|
| 560 | if(!$content) |
|
| 561 | { |
|
| 562 | $args = new stdClass(); |
|
| 563 | $args->comment_srl = $this->comment_srl; |
|
| 564 | $output = executeQuery('document.getComment', $args, array('content')); |
|
| 565 | if($output->toBool() && $output->data) |
|
| 566 | { |
|
| 567 | $content = $output->data->content; |
|
| 568 | $this->add('content', $content); |
|
| 569 | } |
|
| 570 | } |
|
| 571 | ||
| 572 | if(!preg_match("!<img!is", $content)) return; |
|
| 573 | } |
|
| 574 | ||
| 575 | // get thumbail generation info on the doc module configuration. |
|
| 576 | if(!in_array($thumbnail_type, array('crop', 'ratio'))) |
|
| @@ 821-836 (lines=16) @@ | ||
| 818 | ||
| 819 | // Return false if neither attachement nor image files in the document |
|
| 820 | $content = $this->get('content'); |
|
| 821 | if(!$this->get('uploaded_count')) |
|
| 822 | { |
|
| 823 | if(!$content) |
|
| 824 | { |
|
| 825 | $args = new stdClass(); |
|
| 826 | $args->document_srl = $this->document_srl; |
|
| 827 | $output = executeQuery('document.getDocument', $args, array('content')); |
|
| 828 | if($output->toBool() && $output->data) |
|
| 829 | { |
|
| 830 | $content = $output->data->content; |
|
| 831 | $this->add('content', $content); |
|
| 832 | } |
|
| 833 | } |
|
| 834 | ||
| 835 | if(!preg_match("!<img!is", $content)) return; |
|
| 836 | } |
|
| 837 | // Get thumbnai_type information from document module's configuration |
|
| 838 | if(!in_array($thumbnail_type, array('crop','ratio'))) |
|
| 839 | { |
|