- Timestamp:
- 05/24/08 16:18:40 (5 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
downloadDatabase/files/lib/acp/form/DownloadDBKatAddForm.class.php
r453 r524 1 1 <?php 2 2 // wcf imports 3 require_once(WCF_DIR.'lib/acp/form/ ACPForm.class.php');3 require_once(WCF_DIR.'lib/acp/form/WysiwygCacheloaderForm.class.php'); 4 4 require_once(WCF_DIR.'lib/data/downloadDB/DownloadDBKatEditor.class.php'); 5 5 … … 14 14 */ 15 15 16 class DownloadDBKatAddForm extends ACPForm {16 class DownloadDBKatAddForm extends WysiwygCacheloaderForm { 17 17 public $templateName = 'downloadDBKatAdd'; 18 18 public $activeMenuItem = 'wcf.acp.menu.link.content.dldb'; … … 28 28 public $groupIDs = array(1); 29 29 public $uploadGroups = array(); 30 30 public $languageID = '1'; 31 32 public $showSettings = true; 33 public $showSmilies = true; 34 public $canUseSmilies = true; 35 public $showSignatureSetting = false; 36 31 37 public $action; 32 38 private $valid = false; … … 57 63 if (isset($_POST['sortOrder'])) $this->sortOrder = intval($_POST['sortOrder']); 58 64 if (isset($_POST['action'])) $this->action = escapeString($_POST['action']); 65 if (isset($_POST['languageID'])) $this->languageID = intval($_POST['languageID']); 59 66 } 60 67 … … 106 113 // Kategorie speichern 107 114 // Neues Kategorie Objekt 108 $category = DownloadDBKatEditor::createCategory($this->topID, $this->name, $this->description, $this->groupIDs, $this->uploadGroups, intval($this->sortOrder)); 115 $moreData = array( 116 'parseURL' => intval($this->parseURL), 117 'enableBBCodes' => intval($this->enableBBCodes), 118 'enableHtml' => intval($this->enableHtml), 119 'enableSmilies' => intval($this->enableSmilies), 120 'languageID' => intval($this->languageID) 121 ); 122 $category = DownloadDBKatEditor::createCategory($this->topID, $this->name, $this->description, $this->groupIDs, $this->uploadGroups, intval($this->sortOrder), $moreData); 109 123 } 110 124 $this->saved(); … … 120 134 public function readData() { 121 135 parent::readData(); 136 $this->languageID = WCF::getUser()->languageID; 122 137 $this->readCategorys(); 123 138 } … … 129 144 parent::assignVariables(); 130 145 146 WCFACP::getMenu()->setActiveMenuItem($this->activeMenuItem); 147 148 $languagesArray = WCF::getLanguage()->getAvailableLanguages(); 149 150 for ($i = 0; $i < count($languagesArray); $i++) { 151 $languageItems = $languagesArray[$i]; 152 153 $languageArray[] = array( 154 'languageID' => $languageItems['languageID'], 155 'languageName' => WCF::getLanguage()->get('wcf.global.language.'.$languageItems['languageCode']), 156 ); 157 } 158 131 159 WCF::getTPL()->assign(array( 132 160 'topID' => $this->topID, … … 138 166 'uploadGroups' => $this->uploadGroups, 139 167 'sortOrder' => $this->sortOrder, 140 'action' => 'add' 168 'action' => 'add', 169 'enableBBCodes' => $this->enableBBCodes, 170 'enableHtml' => $this->enableHtml, 171 'enableSmilies' => $this->enableSmilies, 172 'language' => $languageArray, 173 'languageID' => $this->languageID 141 174 )); 142 175 } … … 145 178 foreach ($this->katCache as $ID => $kategorie) { 146 179 if ($kategorie['topID'] == $katID) { 147 $this->katOptions[$kategorie['katID']] = " ". StringUtil::unescape($kategorie['name']);180 $this->katOptions[$kategorie['katID']] = " ".$kategorie['name']; 148 181 // weitere Unterkategorien suchen 149 182 $this->readSubKat($kategorie['katID']); … … 156 189 foreach ($this->katCache as $ID => $kategorie) { 157 190 if ($kategorie['topID'] == NULL) { 158 $this->katOptions[$kategorie['katID']] = " ". StringUtil::unescape($kategorie['name']);191 $this->katOptions[$kategorie['katID']] = " ".$kategorie['name']; 159 192 $this->readSubKat($kategorie['katID']); 160 193 }
