Changeset 1054
- Timestamp:
- 10/03/09 21:55:55 (4 years ago)
- Location:
- de.wbb-security.database.importer.it4allfb.11x
- Files:
-
- 2 modified
-
files/lib/data/database/importer/IT4AllFilebase11xExporter.class.php (modified) (4 diffs)
-
package.xml (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
de.wbb-security.database.importer.it4allfb.11x/files/lib/data/database/importer/IT4AllFilebase11xExporter.class.php
r928 r1054 152 152 * @param Integer $right RightID of category 153 153 */ 154 protected function getParentID($categoryID,$left,$right) { 155 $parent = $this->getDB()->getFirstRow("SELECT * FROM ".$this->dbPrefix."fp".$this->settings['dbNumber']."_cats WHERE left_id < ".$left." AND right_id > ".$right." ORDER BY `left_id` DESC"); 154 protected function getParentID($left,$right,$root) { 155 156 $parent = $this->getDB()->getFirstRow("SELECT cat_id FROM ".$this->dbPrefix."fp".$this->settings['dbNumber']."_cats WHERE left_id < ".$left." AND right_id > ".$right." AND root_id = ".$root." ORDER BY `left_id` DESC"); 157 156 158 if($parent['cat_id'] > 0) { 157 159 return $parent['cat_id'] ; … … 166 168 */ 167 169 public function exportCategories($offset,$limit) { 168 $result = $this->getDB()->sendQuery("SELECT * FROM ".$this->dbPrefix."fp".$this->settings['dbNumber']."_cats",$limit,$offset); 169 while($row = $this->getDB()->fetchArray($result)) { 170 $this->getImporter()->importCategory("c".$row['cat_id'],$row['cat_name'],$row['cat_desc'],"c".$this->getParentID($row['cat_id'],$row['left_id'],$row['right_id']),$row['cat_order'],1,"",0); 170 $result = $this->getDB()->sendQuery("SELECT * FROM ".$this->dbPrefix."fp".$this->settings['dbNumber']."_cats ORDER BY root_id, left_id ASC",$limit,$offset); 171 172 while($row = $this->getDB()->fetchArray($result)) { 173 $this->getImporter()->importCategory("c".$row['cat_id'],$row['cat_name'],$row['cat_desc'],"c".$this->getParentID($row['left_id'],$row['right_id'],$row['root_id']),$row['cat_order'],1,"",0); 171 174 } 172 175 } … … 262 265 "isBinary" => 1, 263 266 "isImage" => 1, 264 " messageID" => $item['value'],265 " messageType" => "database",266 "packageID" => PACKAGE_ID,267 "containerID" => $item['value'], 268 "containerType" => "database", 269 "packageID" => WCF::getPackageID("de.wbb-security.database"), 267 270 "idHash" => StringUtil::getRandomID(), 268 271 "userID" => $row['userid'], … … 278 281 279 282 AttachmentsEditor::saveThumbnail($attachment); 283 284 //update inline attachments - its dirty! 285 $sql = "SELECT itemID, content 286 FROM wcf".WCF_N."_database_item 287 WHERE itemID='".$item['value']."'"; 288 289 $databaseItem = WCF::getDB()->getFirstRow($sql); 290 $message = str_replace("[attach=".$row['file_id']."][/attach]","[attach=".$attachment['attachmentID']."][/attach]", $databaseItem['content']); 291 292 if($message != $databaseItem['content']) { 293 $sql = "UPDATE 294 wcf".WCF_N."_database_item 295 SET content='".escapeString($message)."' 296 WHERE itemID='".$item['value']."'"; 297 298 WCF::getDB()->sendQuery($sql); 299 300 } 280 301 } 281 302 -
de.wbb-security.database.importer.it4allfb.11x/package.xml
r928 r1054 7 7 <standalone>0</standalone> 8 8 <isUnique>1</isUnique> 9 <version>1. 0.0 pl 1</version>9 <version>1.1.0</version> 10 10 <plugin>de.wbb-security.database</plugin> 11 <date>2009- 03-24</date>11 <date>2009-10-01</date> 12 12 </packageInformation> 13 13 … … 18 18 19 19 <requiredPackages> 20 <requiredPackage minversion="1. 0.0">com.woltlab.wcf</requiredPackage>20 <requiredPackage minversion="1.1.0 RC 2">com.woltlab.wcf</requiredPackage> 21 21 <requiredPackage minversion="1.0.0">de.wbb-security.database</requiredPackage> 22 22 <requiredPackage minversion="1.0.0">de.wbb-security.database.importer</requiredPackage> … … 33 33 </instructions> 34 34 35 <instructions type="update" fromversion="1.0.0 RC *">36 <files>files.tar</files>37 </instructions>38 39 35 <instructions type="update" fromversion="1.0.0"> 40 36 <files>files.tar</files> 41 37 </instructions> 42 38 39 <instructions type="update" fromversion="1.0.0 *"> 40 <files>files.tar</files> 41 </instructions> 42 43 43 </package>
