/** * Shows private message specific form elements in the global search form. */ public function show($form = null) { $folderOptions = array(); foreach (PMFolderList::getFolders() as $folder) { $folderOptions[$folder['folderID']] = StringUtil::encodeHTML($folder['folderName']); } // get existing values if ($form !== null && isset($form->searchData['additionalData']['pm'])) { $this->folderIDs = $form->searchData['additionalData']['pm']['folderIDs']; } WCF::getTPL()->assign(array('folderOptions' => $folderOptions, 'folderIDs' => $this->folderIDs, 'selectAllFolders' => count($this->folderIDs) == 0 || $this->folderIDs[0] == -10)); }