| @@ 525-542 (lines=18) @@ | ||
| 522 | * |
|
| 523 | * @return mixed |
|
| 524 | */ |
|
| 525 | public function topic_description($format = 'S') |
|
| 526 | { |
|
| 527 | $myts = MyTextSanitizer::getInstance(); |
|
| 528 | switch ($format) { |
|
| 529 | case 'S': |
|
| 530 | $topic_description = $myts->displayTarea($this->topic_description, 1); |
|
| 531 | break; |
|
| 532 | case 'P': |
|
| 533 | $topic_description = $myts->previewTarea($this->topic_description); |
|
| 534 | break; |
|
| 535 | case 'F': |
|
| 536 | case 'E': |
|
| 537 | $topic_description = $myts->htmlSpecialChars($myts->stripSlashesGPC($this->topic_description)); |
|
| 538 | break; |
|
| 539 | } |
|
| 540 | ||
| 541 | return $topic_description; |
|
| 542 | } |
|
| 543 | ||
| 544 | /** |
|
| 545 | * @param string $format |
|
| @@ 369-388 (lines=20) @@ | ||
| 366 | * |
|
| 367 | * @return mixed |
|
| 368 | */ |
|
| 369 | public function title($format = 'Show') |
|
| 370 | { |
|
| 371 | $myts = MyTextSanitizer::getInstance(); |
|
| 372 | $smiley = 1; |
|
| 373 | if ($this->nosmiley()) { |
|
| 374 | $smiley = 0; |
|
| 375 | } |
|
| 376 | switch ($format) { |
|
| 377 | case 'Show': |
|
| 378 | case 'Edit': |
|
| 379 | $title = $myts->htmlSpecialChars($this->title); |
|
| 380 | break; |
|
| 381 | case 'Preview': |
|
| 382 | case 'InForm': |
|
| 383 | $title = $myts->htmlSpecialChars($myts->stripSlashesGPC($this->title)); |
|
| 384 | break; |
|
| 385 | } |
|
| 386 | ||
| 387 | return $title; |
|
| 388 | } |
|
| 389 | ||
| 390 | /** |
|
| 391 | * @param string $format |
|