Made quite a few changes so that the code works in the server
[vanilla-miry.git] / themes / post_formatter.php
blob90bdb036b13b74b95076e2402d0418b393b702b2
1 <?php
2 // Note: This file is included from the library/Vanilla/Vanilla.Control.DiscussionForm.php class.
4 if ($this->Context->Session->User->Preference('ShowFormatSelector') && $FormatCount > 1) {
5 $sReturn .= '<li id="CommentFormats">'
6 .$this->Context->GetDefinition('FormatCommentsAs')
7 .$f->Get()
8 .'</li>';
9 } else {
10 $FormatTypeToUse = $this->Context->Session->User->DefaultFormatType;
11 if (!array_key_exists($FormatTypeToUse, $this->Context->StringManipulator->Formatters)) {
12 $FormatTypeToUse = $this->Context->Configuration['DEFAULT_FORMAT_TYPE'];
15 $sReturn .= '<li class="Invisible"><input type="hidden" name="FormatType" value="'.$FormatTypeToUse.'" /></li>';