| @@ 507-524 (lines=18) @@ | ||
| 504 | * |
|
| 505 | * @return mixed |
|
| 506 | */ |
|
| 507 | public function topic_description($format = 'S') |
|
| 508 | { |
|
| 509 | $myts = MyTextSanitizer::getInstance(); |
|
| 510 | switch ($format) { |
|
| 511 | case 'S': |
|
| 512 | $topic_description = $myts->displayTarea($this->topic_description, 1); |
|
| 513 | break; |
|
| 514 | case 'P': |
|
| 515 | $topic_description = $myts->previewTarea($this->topic_description); |
|
| 516 | break; |
|
| 517 | case 'F': |
|
| 518 | case 'E': |
|
| 519 | $topic_description = $myts->htmlSpecialChars($myts->stripSlashesGPC($this->topic_description)); |
|
| 520 | break; |
|
| 521 | } |
|
| 522 | ||
| 523 | return $topic_description; |
|
| 524 | } |
|
| 525 | ||
| 526 | /** |
|
| 527 | * @param string $format |
|
| @@ 360-379 (lines=20) @@ | ||
| 357 | * |
|
| 358 | * @return mixed |
|
| 359 | */ |
|
| 360 | public function title($format = 'Show') |
|
| 361 | { |
|
| 362 | $myts = MyTextSanitizer::getInstance(); |
|
| 363 | $smiley = 1; |
|
| 364 | if ($this->nosmiley()) { |
|
| 365 | $smiley = 0; |
|
| 366 | } |
|
| 367 | switch ($format) { |
|
| 368 | case 'Show': |
|
| 369 | case 'Edit': |
|
| 370 | $title = $myts->htmlSpecialChars($this->title); |
|
| 371 | break; |
|
| 372 | case 'Preview': |
|
| 373 | case 'InForm': |
|
| 374 | $title = $myts->htmlSpecialChars($myts->stripSlashesGPC($this->title)); |
|
| 375 | break; |
|
| 376 | } |
|
| 377 | ||
| 378 | return $title; |
|
| 379 | } |
|
| 380 | ||
| 381 | /** |
|
| 382 | * @param string $format |
|