Пример #1
0
 /**
  * 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));
 }
 /**
  * @see PMRuleAction::getAvailableDestinations()
  */
 public function getAvailableDestinations()
 {
     if (self::$userFolders === null) {
         self::$userFolders = array();
         require_once WCF_DIR . 'lib/data/message/pm/PMFolderList.class.php';
         $folders = PMFolderList::getUserFolders();
         foreach ($folders as $folder) {
             self::$userFolders[$folder['folderID']] = $folder['folderName'];
         }
     }
     return self::$userFolders;
 }